@villedemontreal/angular-ui 3.2.0-pre.build.1 → 3.3.1
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/bao.module.mjs +11 -10
- package/esm2020/lib/dropdown-menu/dropdown-menu.component.mjs +522 -0
- package/esm2020/lib/dropdown-menu/index.mjs +8 -0
- package/esm2020/lib/dropdown-menu/module.mjs +47 -0
- package/esm2020/lib/modal/module.mjs +19 -4
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/villedemontreal-angular-ui.mjs +592 -15
- package/fesm2015/villedemontreal-angular-ui.mjs.map +1 -1
- package/fesm2020/villedemontreal-angular-ui.mjs +592 -15
- package/fesm2020/villedemontreal-angular-ui.mjs.map +1 -1
- package/global.scss +2 -0
- package/lib/bao.module.d.ts +12 -11
- package/lib/dropdown-menu/dropdown-menu.component.d.ts +170 -0
- package/lib/dropdown-menu/index.d.ts +2 -0
- package/lib/dropdown-menu/module.d.ts +11 -0
- package/lib/modal/module.d.ts +2 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -12,13 +12,13 @@ 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 } from '@angular/cdk/portal';
|
|
15
|
+
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, PortalModule, DomPortal } from '@angular/cdk/portal';
|
|
16
16
|
import { Subject, filter, take, defer, startWith, Subscription } from 'rxjs';
|
|
17
17
|
import { __awaiter } from 'tslib';
|
|
18
18
|
import { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
|
|
19
19
|
import { trigger, state, style, transition, group, animate, query, animateChild } from '@angular/animations';
|
|
20
20
|
import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
21
|
-
import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
|
|
21
|
+
import { ANIMATION_MODULE_TYPE, BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations';
|
|
22
22
|
|
|
23
23
|
function baoColorToHex(baoColor) {
|
|
24
24
|
switch (baoColor) {
|
|
@@ -3841,12 +3841,26 @@ const MODAL_DIRECTIVES = [BaoModalContainer, BaoModalClose];
|
|
|
3841
3841
|
class BaoModalModule {
|
|
3842
3842
|
}
|
|
3843
3843
|
BaoModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3844
|
-
BaoModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoModalModule, declarations: [BaoModalContainer, BaoModalClose], imports: [CommonModule,
|
|
3845
|
-
|
|
3844
|
+
BaoModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoModalModule, declarations: [BaoModalContainer, BaoModalClose], imports: [CommonModule,
|
|
3845
|
+
OverlayModule,
|
|
3846
|
+
PortalModule,
|
|
3847
|
+
BrowserAnimationsModule,
|
|
3848
|
+
NoopAnimationsModule], exports: [BaoModalContainer, BaoModalClose] });
|
|
3849
|
+
BaoModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalModule, providers: [BaoModal], imports: [CommonModule,
|
|
3850
|
+
OverlayModule,
|
|
3851
|
+
PortalModule,
|
|
3852
|
+
BrowserAnimationsModule,
|
|
3853
|
+
NoopAnimationsModule] });
|
|
3846
3854
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalModule, decorators: [{
|
|
3847
3855
|
type: NgModule,
|
|
3848
3856
|
args: [{
|
|
3849
|
-
imports: [
|
|
3857
|
+
imports: [
|
|
3858
|
+
CommonModule,
|
|
3859
|
+
OverlayModule,
|
|
3860
|
+
PortalModule,
|
|
3861
|
+
BrowserAnimationsModule,
|
|
3862
|
+
NoopAnimationsModule
|
|
3863
|
+
],
|
|
3850
3864
|
declarations: MODAL_DIRECTIVES,
|
|
3851
3865
|
exports: MODAL_DIRECTIVES,
|
|
3852
3866
|
providers: [BaoModal]
|
|
@@ -3952,6 +3966,569 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
3952
3966
|
* See LICENSE file in the project root for full license information.
|
|
3953
3967
|
*/
|
|
3954
3968
|
|
|
3969
|
+
/*
|
|
3970
|
+
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
3971
|
+
* Licensed under the MIT license.
|
|
3972
|
+
* See LICENSE file in the project root for full license information.
|
|
3973
|
+
*/
|
|
3974
|
+
/**
|
|
3975
|
+
* Unique ID for each dropdown menu
|
|
3976
|
+
*/
|
|
3977
|
+
let dropdownMenuUniqueId = 0;
|
|
3978
|
+
class BaoDropdownMenuItem {
|
|
3979
|
+
constructor(renderer, elementRef, _parent) {
|
|
3980
|
+
this.renderer = renderer;
|
|
3981
|
+
this.elementRef = elementRef;
|
|
3982
|
+
this._parent = _parent;
|
|
3983
|
+
/**
|
|
3984
|
+
* Is the list item disabled
|
|
3985
|
+
*/
|
|
3986
|
+
this.disabled = false;
|
|
3987
|
+
}
|
|
3988
|
+
get nativeElement() {
|
|
3989
|
+
return this.elementRef.nativeElement;
|
|
3990
|
+
}
|
|
3991
|
+
spaceKeyEvent() {
|
|
3992
|
+
if (document.activeElement == this.nativeElement) {
|
|
3993
|
+
this.nativeElement.click();
|
|
3994
|
+
}
|
|
3995
|
+
}
|
|
3996
|
+
onClick(el) {
|
|
3997
|
+
if (this.nativeElement.attributes['href']) {
|
|
3998
|
+
this._parent.setNavigationAttribute(this.nativeElement);
|
|
3999
|
+
}
|
|
4000
|
+
// Prevent double-click on checkbox input that undoes the toggle
|
|
4001
|
+
if (!el.classList.contains('bao-checkbox-content-container')) {
|
|
4002
|
+
this.propagateClick();
|
|
4003
|
+
}
|
|
4004
|
+
}
|
|
4005
|
+
enterKeyEvent() {
|
|
4006
|
+
if (document.activeElement == this.nativeElement) {
|
|
4007
|
+
if (this.nativeElement.attributes['href']) {
|
|
4008
|
+
this._parent.setNavigationAttribute(this.nativeElement);
|
|
4009
|
+
}
|
|
4010
|
+
this.propagateClick();
|
|
4011
|
+
}
|
|
4012
|
+
}
|
|
4013
|
+
ngAfterViewInit() {
|
|
4014
|
+
this.addContentDiv();
|
|
4015
|
+
if (!this.disabled) {
|
|
4016
|
+
this.renderer.setAttribute(this.nativeElement, 'tabIndex', '0');
|
|
4017
|
+
}
|
|
4018
|
+
this.addPaddingClass();
|
|
4019
|
+
// Remove input element inside item from keyboard navigation sequence
|
|
4020
|
+
if (this.nativeElement.classList.contains('has-element-left')) {
|
|
4021
|
+
this.renderer.setAttribute(this.nativeElement.children.item(0).firstElementChild, 'tabIndex', '-1');
|
|
4022
|
+
}
|
|
4023
|
+
}
|
|
4024
|
+
ngOnChanges(changes) {
|
|
4025
|
+
if (changes['disabled'] && changes['disabled'].currentValue == true) {
|
|
4026
|
+
this.disableItem();
|
|
4027
|
+
}
|
|
4028
|
+
}
|
|
4029
|
+
/** Regroups label and description in a new div to help with layout */
|
|
4030
|
+
addContentDiv() {
|
|
4031
|
+
const children = Array.from(this.nativeElement.children);
|
|
4032
|
+
const labelIndex = children.findIndex(c => c.localName === 'bao-dropdown-menu-item-label');
|
|
4033
|
+
const labelElement = children[labelIndex];
|
|
4034
|
+
this.renderer.removeChild(this.nativeElement, children[labelIndex]);
|
|
4035
|
+
const contentDiv = this.renderer.createElement('div');
|
|
4036
|
+
this.renderer.addClass(contentDiv, 'bao-dropdown-menu-item-content');
|
|
4037
|
+
this.renderer.appendChild(this.nativeElement, contentDiv);
|
|
4038
|
+
this.renderer.appendChild(contentDiv, labelElement);
|
|
4039
|
+
const descriptionIndex = children.findIndex(c => c.localName === 'bao-dropdown-menu-item-description');
|
|
4040
|
+
if (descriptionIndex > 0) {
|
|
4041
|
+
const descriptionElement = children[descriptionIndex];
|
|
4042
|
+
this.renderer.removeChild(this.nativeElement, children[descriptionIndex]);
|
|
4043
|
+
this.renderer.appendChild(contentDiv, descriptionElement);
|
|
4044
|
+
}
|
|
4045
|
+
}
|
|
4046
|
+
addPaddingClass() {
|
|
4047
|
+
const children = Array.from(this.nativeElement.children);
|
|
4048
|
+
// Menu item has extra element next to label
|
|
4049
|
+
if (children.length > 1) {
|
|
4050
|
+
// Only toggle element can be on the right
|
|
4051
|
+
if (children.findIndex(c => c.localName === 'bao-toggle') > 0) {
|
|
4052
|
+
this.renderer.addClass(this.nativeElement, 'has-element-right');
|
|
4053
|
+
}
|
|
4054
|
+
// Icon, checkbox, radio button or avatar must be on the left
|
|
4055
|
+
else {
|
|
4056
|
+
this.renderer.addClass(this.nativeElement, 'has-element-left');
|
|
4057
|
+
}
|
|
4058
|
+
}
|
|
4059
|
+
}
|
|
4060
|
+
disableItem() {
|
|
4061
|
+
if (this.disabled) {
|
|
4062
|
+
this.renderer.setAttribute(this.nativeElement, 'aria-disabled', 'true');
|
|
4063
|
+
this.renderer.setAttribute(this.nativeElement, 'tabIndex', '-1');
|
|
4064
|
+
}
|
|
4065
|
+
}
|
|
4066
|
+
/**
|
|
4067
|
+
* This method propagates a click event to menu item children with inputs (checkbox, radio button)
|
|
4068
|
+
*/
|
|
4069
|
+
propagateClick() {
|
|
4070
|
+
for (let i = 0; i < this.nativeElement.children.length; i++) {
|
|
4071
|
+
if (this.nativeElement.children.item(i).firstElementChild.localName ==
|
|
4072
|
+
'input') {
|
|
4073
|
+
this.nativeElement.children.item(i).firstElementChild.click();
|
|
4074
|
+
}
|
|
4075
|
+
}
|
|
4076
|
+
}
|
|
4077
|
+
}
|
|
4078
|
+
BaoDropdownMenuItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuItem, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: BaoDropdownMenuComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4079
|
+
BaoDropdownMenuItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoDropdownMenuItem, selector: "bao-dropdown-menu-item, [bao-dropdown-menu-item]", inputs: { disabled: "disabled" }, host: { listeners: { "window:keyup.space": "spaceKeyEvent()", "click": "onClick($event.target)", "window:keydown.enter": "enterKeyEvent()" }, properties: { "class.bao-dropdown-menu-item-disabled": "disabled===true" }, classAttribute: "bao-dropdown-menu-item" }, usesOnChanges: true, ngImport: i0 });
|
|
4080
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuItem, decorators: [{
|
|
4081
|
+
type: Directive,
|
|
4082
|
+
args: [{
|
|
4083
|
+
selector: 'bao-dropdown-menu-item, [bao-dropdown-menu-item]',
|
|
4084
|
+
host: {
|
|
4085
|
+
class: 'bao-dropdown-menu-item',
|
|
4086
|
+
'[class.bao-dropdown-menu-item-disabled]': 'disabled===true'
|
|
4087
|
+
}
|
|
4088
|
+
}]
|
|
4089
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: BaoDropdownMenuComponent }]; }, propDecorators: { disabled: [{
|
|
4090
|
+
type: Input
|
|
4091
|
+
}], spaceKeyEvent: [{
|
|
4092
|
+
type: HostListener,
|
|
4093
|
+
args: ['window:keyup.space']
|
|
4094
|
+
}], onClick: [{
|
|
4095
|
+
type: HostListener,
|
|
4096
|
+
args: ['click', ['$event.target']]
|
|
4097
|
+
}], enterKeyEvent: [{
|
|
4098
|
+
type: HostListener,
|
|
4099
|
+
args: ['window:keydown.enter']
|
|
4100
|
+
}] } });
|
|
4101
|
+
class BaoDropdownMenuComponent {
|
|
4102
|
+
constructor(cdr, renderer, elementRef) {
|
|
4103
|
+
this.cdr = cdr;
|
|
4104
|
+
this.renderer = renderer;
|
|
4105
|
+
this.elementRef = elementRef;
|
|
4106
|
+
/**
|
|
4107
|
+
* Fired when the dropdown-menu changes its 'isOpen' value
|
|
4108
|
+
*/
|
|
4109
|
+
this.isOpenChange = new EventEmitter();
|
|
4110
|
+
/**
|
|
4111
|
+
* Fired when menu is closed by key event triggered from menu item
|
|
4112
|
+
*/
|
|
4113
|
+
this.isClosedByKeyEvent = new EventEmitter();
|
|
4114
|
+
/**
|
|
4115
|
+
* Unique identifier of the dropdown menu
|
|
4116
|
+
*/
|
|
4117
|
+
this.menuId = `bao-dropdown-menu-${++dropdownMenuUniqueId}`;
|
|
4118
|
+
/**
|
|
4119
|
+
* Is the dropwdown menu currently open
|
|
4120
|
+
*/
|
|
4121
|
+
this._isOpen = false;
|
|
4122
|
+
}
|
|
4123
|
+
get isOpen() {
|
|
4124
|
+
return this._isOpen;
|
|
4125
|
+
}
|
|
4126
|
+
get activeItemIndex() {
|
|
4127
|
+
return this._activeItemIndex;
|
|
4128
|
+
}
|
|
4129
|
+
get menuPortal() {
|
|
4130
|
+
return this._menuPortal;
|
|
4131
|
+
}
|
|
4132
|
+
get nativeElement() {
|
|
4133
|
+
return this.elementRef.nativeElement;
|
|
4134
|
+
}
|
|
4135
|
+
set isOpen(isOpen) {
|
|
4136
|
+
this._isOpen = isOpen;
|
|
4137
|
+
this.cdr.detectChanges();
|
|
4138
|
+
this.isOpenChange.emit(isOpen);
|
|
4139
|
+
}
|
|
4140
|
+
set activeItemIndex(index) {
|
|
4141
|
+
this._activeItemIndex = index;
|
|
4142
|
+
}
|
|
4143
|
+
upKeyEvent() {
|
|
4144
|
+
if (this.isOpen) {
|
|
4145
|
+
const index = isNaN(this._activeItemIndex) ? 0 : this._activeItemIndex;
|
|
4146
|
+
const nextIndex = this.getNextActivableItemIndex(index, false);
|
|
4147
|
+
this.focusNextItem(nextIndex);
|
|
4148
|
+
}
|
|
4149
|
+
}
|
|
4150
|
+
downKeyEvent() {
|
|
4151
|
+
if (this.isOpen) {
|
|
4152
|
+
const index = isNaN(this._activeItemIndex) ? 0 : this._activeItemIndex;
|
|
4153
|
+
const nextIndex = this.getNextActivableItemIndex(index, true);
|
|
4154
|
+
this.focusNextItem(nextIndex);
|
|
4155
|
+
}
|
|
4156
|
+
}
|
|
4157
|
+
/** Prevents focus to be lost when TAB has reached end of menu */
|
|
4158
|
+
tabKeyEvent() {
|
|
4159
|
+
if (this.isOpen) {
|
|
4160
|
+
if (document.activeElement === this._listItems.last.nativeElement) {
|
|
4161
|
+
this.isClosedByKeyEvent.emit();
|
|
4162
|
+
}
|
|
4163
|
+
}
|
|
4164
|
+
}
|
|
4165
|
+
/** Prevents focus to be lost when SHIFT + TAB has reached beginning of menu */
|
|
4166
|
+
shiftTabKeyEvent() {
|
|
4167
|
+
if (this.isOpen) {
|
|
4168
|
+
if (document.activeElement === this._listItems.first.nativeElement) {
|
|
4169
|
+
this.isClosedByKeyEvent.emit();
|
|
4170
|
+
}
|
|
4171
|
+
}
|
|
4172
|
+
}
|
|
4173
|
+
ngAfterViewInit() {
|
|
4174
|
+
this.renderer.setAttribute(this.nativeElement, 'id', this.menuId);
|
|
4175
|
+
this._menuPortal = new DomPortal(this._menuContent);
|
|
4176
|
+
}
|
|
4177
|
+
focusFirstItem() {
|
|
4178
|
+
this._activeItemIndex = 0;
|
|
4179
|
+
this._listItems.first.nativeElement.focus();
|
|
4180
|
+
}
|
|
4181
|
+
open() {
|
|
4182
|
+
this.isOpen = true;
|
|
4183
|
+
}
|
|
4184
|
+
close() {
|
|
4185
|
+
this.isOpen = false;
|
|
4186
|
+
}
|
|
4187
|
+
/** Move the aria-current attribute to new active page */
|
|
4188
|
+
setNavigationAttribute(activePageElement) {
|
|
4189
|
+
const previousActivePage = this._listItems.find((item) => {
|
|
4190
|
+
return item.nativeElement.attributes['aria-current'] === 'page';
|
|
4191
|
+
});
|
|
4192
|
+
if (previousActivePage) {
|
|
4193
|
+
this.renderer.removeAttribute(previousActivePage.nativeElement, 'aria-current');
|
|
4194
|
+
this.renderer.removeClass(previousActivePage.nativeElement, 'active-link');
|
|
4195
|
+
}
|
|
4196
|
+
this.renderer.setAttribute(activePageElement, 'aria-current', 'page');
|
|
4197
|
+
this.renderer.addClass(activePageElement, 'active-link');
|
|
4198
|
+
}
|
|
4199
|
+
focusNextItem(nextIndex) {
|
|
4200
|
+
this._activeItemIndex = nextIndex;
|
|
4201
|
+
this._listItems.get(nextIndex).nativeElement.focus();
|
|
4202
|
+
}
|
|
4203
|
+
/**
|
|
4204
|
+
* Finds the next activable tab index when navigating with up and down arrow or TAB keys
|
|
4205
|
+
* @param currentIndex List item index which currently has focus
|
|
4206
|
+
* @param isDown Whether the navigation is going in the down direction or not
|
|
4207
|
+
* @param isBackward If recursive function is going backward looking for last activable item in list
|
|
4208
|
+
* @returns Index of the next item that will receive focus
|
|
4209
|
+
*/
|
|
4210
|
+
getNextActivableItemIndex(currentIndex, isDown, isBackward = false) {
|
|
4211
|
+
if (!this._listItems.get(currentIndex).disabled) {
|
|
4212
|
+
if (!this.canMove(currentIndex, isDown)) {
|
|
4213
|
+
return currentIndex;
|
|
4214
|
+
}
|
|
4215
|
+
}
|
|
4216
|
+
else {
|
|
4217
|
+
if (!this.canMove(currentIndex, isDown)) {
|
|
4218
|
+
const previousIndex = isDown ? currentIndex - 1 : currentIndex + 1;
|
|
4219
|
+
return this.getNextActivableItemIndex(previousIndex, isDown, true);
|
|
4220
|
+
}
|
|
4221
|
+
}
|
|
4222
|
+
const nextIndex = isDown ? currentIndex + 1 : currentIndex - 1;
|
|
4223
|
+
if (this._listItems.get(nextIndex).disabled) {
|
|
4224
|
+
if (isBackward) {
|
|
4225
|
+
return currentIndex;
|
|
4226
|
+
}
|
|
4227
|
+
return this.getNextActivableItemIndex(nextIndex, isDown);
|
|
4228
|
+
}
|
|
4229
|
+
return nextIndex;
|
|
4230
|
+
}
|
|
4231
|
+
/**
|
|
4232
|
+
* Finds if focus has reached end or beginning of list
|
|
4233
|
+
* @param currentIndex List item index which currently has focus
|
|
4234
|
+
* @param isDown Whether the navigation is going in the down direction or not
|
|
4235
|
+
* @returns Can focus move to next item or not
|
|
4236
|
+
*/
|
|
4237
|
+
canMove(currentIndex, isDown) {
|
|
4238
|
+
return !((currentIndex == 0 && !isDown) ||
|
|
4239
|
+
(currentIndex == this._listItems.length - 1 && isDown));
|
|
4240
|
+
}
|
|
4241
|
+
}
|
|
4242
|
+
BaoDropdownMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4243
|
+
BaoDropdownMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoDropdownMenuComponent, selector: "bao-dropdown-menu", outputs: { isOpenChange: "isOpenChange", isClosedByKeyEvent: "isClosedByKeyEvent" }, host: { listeners: { "window:keyup.arrowup": "upKeyEvent()", "window:keyup.arrowdown": "downKeyEvent()", "window:keydown.tab": "tabKeyEvent()", "window:keydown.shift.tab": "shiftTabKeyEvent()" }, properties: { "class.bao-overlay-transparent-backdrop": "isOpen===false", "class.bao-dropdown-menu-closed": "isOpen===false", "attr.aria-expanded": "isOpen" }, classAttribute: "bao-dropdown-menu-container" }, queries: [{ propertyName: "_listItems", predicate: BaoDropdownMenuItem, descendants: true }], viewQueries: [{ propertyName: "_menuContent", first: true, predicate: ["menuContent"], descendants: true }], ngImport: i0, template: "<div #menuContent class=\"bao-dropdown-menu\" tabindex=\"-1\">\n <ng-content></ng-content>\n</div>\n", styles: [".bao-dropdown-menu-container.bao-dropdown-menu-closed{display:none}.bao-dropdown-menu{min-width:16rem;max-width:32rem;overflow-y:auto;background:#ffffff;box-shadow:0 .5rem 2rem #0000001a;border-radius:.25rem;padding-top:.5rem;padding-bottom:.5rem}.bao-dropdown-menu .bao-overlay-transparent-backdrop{background-color:#fff0;display:none}.bao-dropdown-menu ul{list-style-type:none;padding:0;margin:0}.bao-dropdown-menu h5{padding:.5rem 0 .5rem 1rem;margin:0}.bao-dropdown-menu .bao-dropdown-menu-item{display:flex;align-items:center;text-decoration:none;border-bottom:none;cursor:default}.bao-dropdown-menu .bao-dropdown-menu-item:hover{background-color:#f8f9fa}.bao-dropdown-menu .bao-dropdown-menu-item:active{background-color:#eefaf8}.bao-dropdown-menu .bao-dropdown-menu-item:focus{box-shadow:inset 0 0 0 .25rem #98bcde}.bao-dropdown-menu .bao-dropdown-menu-item.active-link{background-color:#eefaf8}.bao-dropdown-menu .bao-dropdown-menu-item.has-element-right{padding-right:1.5rem}.bao-dropdown-menu .bao-dropdown-menu-item.has-element-left{padding-left:1rem}.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled{cursor:not-allowed;pointer-events:none}.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled:hover,.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled:active{background:#ffffff}.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled .bao-dropdown-menu-item-content .bao-dropdown-menu-item-label,.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled .bao-dropdown-menu-item-content .bao-dropdown-menu-item-description{color:#adb2bd}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-dropdown-menu-item-content{display:flex;flex-direction:column;margin:.5rem 1rem;background-color:inherit}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-dropdown-menu-item-content .bao-dropdown-menu-item-label{font-weight:400;font-size:1rem;line-height:1.5rem;color:#212529}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-dropdown-menu-item-content .bao-dropdown-menu-item-description{font-weight:400;font-size:.875rem;line-height:1.25rem;color:#637381}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-icon{color:#adb2bd;flex-shrink:0}.bao-dropdown-menu .bao-dropdown-menu-divider hr{margin-top:.5rem;margin-bottom:.5rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
4244
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuComponent, decorators: [{
|
|
4245
|
+
type: Component,
|
|
4246
|
+
args: [{ selector: 'bao-dropdown-menu', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
4247
|
+
class: 'bao-dropdown-menu-container',
|
|
4248
|
+
'[class.bao-overlay-transparent-backdrop]': 'isOpen===false',
|
|
4249
|
+
'[class.bao-dropdown-menu-closed]': 'isOpen===false',
|
|
4250
|
+
'[attr.aria-expanded]': 'isOpen'
|
|
4251
|
+
}, template: "<div #menuContent class=\"bao-dropdown-menu\" tabindex=\"-1\">\n <ng-content></ng-content>\n</div>\n", styles: [".bao-dropdown-menu-container.bao-dropdown-menu-closed{display:none}.bao-dropdown-menu{min-width:16rem;max-width:32rem;overflow-y:auto;background:#ffffff;box-shadow:0 .5rem 2rem #0000001a;border-radius:.25rem;padding-top:.5rem;padding-bottom:.5rem}.bao-dropdown-menu .bao-overlay-transparent-backdrop{background-color:#fff0;display:none}.bao-dropdown-menu ul{list-style-type:none;padding:0;margin:0}.bao-dropdown-menu h5{padding:.5rem 0 .5rem 1rem;margin:0}.bao-dropdown-menu .bao-dropdown-menu-item{display:flex;align-items:center;text-decoration:none;border-bottom:none;cursor:default}.bao-dropdown-menu .bao-dropdown-menu-item:hover{background-color:#f8f9fa}.bao-dropdown-menu .bao-dropdown-menu-item:active{background-color:#eefaf8}.bao-dropdown-menu .bao-dropdown-menu-item:focus{box-shadow:inset 0 0 0 .25rem #98bcde}.bao-dropdown-menu .bao-dropdown-menu-item.active-link{background-color:#eefaf8}.bao-dropdown-menu .bao-dropdown-menu-item.has-element-right{padding-right:1.5rem}.bao-dropdown-menu .bao-dropdown-menu-item.has-element-left{padding-left:1rem}.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled{cursor:not-allowed;pointer-events:none}.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled:hover,.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled:active{background:#ffffff}.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled .bao-dropdown-menu-item-content .bao-dropdown-menu-item-label,.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled .bao-dropdown-menu-item-content .bao-dropdown-menu-item-description{color:#adb2bd}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-dropdown-menu-item-content{display:flex;flex-direction:column;margin:.5rem 1rem;background-color:inherit}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-dropdown-menu-item-content .bao-dropdown-menu-item-label{font-weight:400;font-size:1rem;line-height:1.5rem;color:#212529}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-dropdown-menu-item-content .bao-dropdown-menu-item-description{font-weight:400;font-size:.875rem;line-height:1.25rem;color:#637381}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-icon{color:#adb2bd;flex-shrink:0}.bao-dropdown-menu .bao-dropdown-menu-divider hr{margin-top:.5rem;margin-bottom:.5rem}\n"] }]
|
|
4252
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { isOpenChange: [{
|
|
4253
|
+
type: Output
|
|
4254
|
+
}], isClosedByKeyEvent: [{
|
|
4255
|
+
type: Output
|
|
4256
|
+
}], _menuContent: [{
|
|
4257
|
+
type: ViewChild,
|
|
4258
|
+
args: ['menuContent']
|
|
4259
|
+
}], _listItems: [{
|
|
4260
|
+
type: ContentChildren,
|
|
4261
|
+
args: [BaoDropdownMenuItem, { descendants: true }]
|
|
4262
|
+
}], upKeyEvent: [{
|
|
4263
|
+
type: HostListener,
|
|
4264
|
+
args: ['window:keyup.arrowup']
|
|
4265
|
+
}], downKeyEvent: [{
|
|
4266
|
+
type: HostListener,
|
|
4267
|
+
args: ['window:keyup.arrowdown']
|
|
4268
|
+
}], tabKeyEvent: [{
|
|
4269
|
+
type: HostListener,
|
|
4270
|
+
args: ['window:keydown.tab']
|
|
4271
|
+
}], shiftTabKeyEvent: [{
|
|
4272
|
+
type: HostListener,
|
|
4273
|
+
args: ['window:keydown.shift.tab']
|
|
4274
|
+
}] } });
|
|
4275
|
+
/**
|
|
4276
|
+
* Directive to be applied on element that will trigger the opening and closing of menu.
|
|
4277
|
+
*/
|
|
4278
|
+
class BaoDropdownMenuTrigger {
|
|
4279
|
+
constructor(renderer, elementRef, overlay) {
|
|
4280
|
+
this.renderer = renderer;
|
|
4281
|
+
this.elementRef = elementRef;
|
|
4282
|
+
this.overlay = overlay;
|
|
4283
|
+
this._overlayRef = null;
|
|
4284
|
+
this._isMenuOpen = false;
|
|
4285
|
+
}
|
|
4286
|
+
get nativeElement() {
|
|
4287
|
+
return this.elementRef.nativeElement;
|
|
4288
|
+
}
|
|
4289
|
+
escapeKeyEvent() {
|
|
4290
|
+
if (this._isMenuOpen) {
|
|
4291
|
+
this.closeMenu();
|
|
4292
|
+
this.nativeElement.focus();
|
|
4293
|
+
}
|
|
4294
|
+
}
|
|
4295
|
+
/** Enter key event triggers click event which opens menu,
|
|
4296
|
+
* then focus is put on first item in the menu */
|
|
4297
|
+
enterKeyEvent() {
|
|
4298
|
+
if (this._isMenuOpen && document.activeElement === this.nativeElement) {
|
|
4299
|
+
this.menu.focusFirstItem();
|
|
4300
|
+
}
|
|
4301
|
+
}
|
|
4302
|
+
onClick() {
|
|
4303
|
+
this.toggleMenu();
|
|
4304
|
+
}
|
|
4305
|
+
ngAfterViewInit() {
|
|
4306
|
+
this.renderer.setAttribute(this.nativeElement, 'role', 'button');
|
|
4307
|
+
this.renderer.setAttribute(this.nativeElement, 'aria-controls', `bao-dropdown-menu-${dropdownMenuUniqueId}`);
|
|
4308
|
+
this.menu.isClosedByKeyEvent.subscribe(() => {
|
|
4309
|
+
this.closeMenu();
|
|
4310
|
+
this.nativeElement.focus();
|
|
4311
|
+
});
|
|
4312
|
+
}
|
|
4313
|
+
ngOnDestroy() {
|
|
4314
|
+
if (this._overlayRef) {
|
|
4315
|
+
this._overlayRef.dispose();
|
|
4316
|
+
}
|
|
4317
|
+
}
|
|
4318
|
+
toggleMenu() {
|
|
4319
|
+
return this._isMenuOpen ? this.closeMenu() : this.openMenu();
|
|
4320
|
+
}
|
|
4321
|
+
closeMenu() {
|
|
4322
|
+
this._isMenuOpen = false;
|
|
4323
|
+
this.menu.close();
|
|
4324
|
+
if (this._overlayRef) {
|
|
4325
|
+
this._overlayRef.detach();
|
|
4326
|
+
}
|
|
4327
|
+
}
|
|
4328
|
+
openMenu() {
|
|
4329
|
+
if (!this.menu) {
|
|
4330
|
+
return;
|
|
4331
|
+
}
|
|
4332
|
+
const overlayRef = this.createOverlay();
|
|
4333
|
+
overlayRef.attach(this.menu.menuPortal);
|
|
4334
|
+
this._isMenuOpen = true;
|
|
4335
|
+
this.menu.open();
|
|
4336
|
+
}
|
|
4337
|
+
createOverlay() {
|
|
4338
|
+
if (!this._overlayRef) {
|
|
4339
|
+
const config = this.getOverlayConfig();
|
|
4340
|
+
this._overlayRef = this.overlay.create(config);
|
|
4341
|
+
}
|
|
4342
|
+
this._overlayRef.backdropClick().subscribe(() => {
|
|
4343
|
+
this.closeMenu();
|
|
4344
|
+
});
|
|
4345
|
+
return this._overlayRef;
|
|
4346
|
+
}
|
|
4347
|
+
getOverlayConfig() {
|
|
4348
|
+
return new OverlayConfig({
|
|
4349
|
+
positionStrategy: this.overlay
|
|
4350
|
+
.position()
|
|
4351
|
+
.flexibleConnectedTo(this.elementRef)
|
|
4352
|
+
.withLockedPosition()
|
|
4353
|
+
.withGrowAfterOpen()
|
|
4354
|
+
.withPositions([
|
|
4355
|
+
{
|
|
4356
|
+
// top-left of the overlay is connected to bottom-left of the origin;
|
|
4357
|
+
originX: 'start',
|
|
4358
|
+
originY: 'bottom',
|
|
4359
|
+
overlayX: 'start',
|
|
4360
|
+
overlayY: 'top'
|
|
4361
|
+
},
|
|
4362
|
+
{
|
|
4363
|
+
// bottom-left of the overlay is connected to top-left of the origin;
|
|
4364
|
+
originX: 'start',
|
|
4365
|
+
originY: 'top',
|
|
4366
|
+
overlayX: 'start',
|
|
4367
|
+
overlayY: 'bottom'
|
|
4368
|
+
}
|
|
4369
|
+
]),
|
|
4370
|
+
backdropClass: 'bao-overlay-transparent-backdrop',
|
|
4371
|
+
hasBackdrop: true,
|
|
4372
|
+
scrollStrategy: this.overlay.scrollStrategies.block()
|
|
4373
|
+
});
|
|
4374
|
+
}
|
|
4375
|
+
}
|
|
4376
|
+
BaoDropdownMenuTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuTrigger, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1$4.Overlay }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4377
|
+
BaoDropdownMenuTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoDropdownMenuTrigger, selector: "bao-dropdown-menu-trigger, [bao-dropdown-menu-trigger], [baoDropdownMenuTriggerFor]", inputs: { menu: ["baoDropdownMenuTriggerFor", "menu"] }, host: { listeners: { "window:keyup.escape": "escapeKeyEvent()", "window:keyup.enter": "enterKeyEvent()", "click": "onClick()" }, classAttribute: "bao-dropdown-menu-trigger" }, ngImport: i0 });
|
|
4378
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuTrigger, decorators: [{
|
|
4379
|
+
type: Directive,
|
|
4380
|
+
args: [{
|
|
4381
|
+
selector: 'bao-dropdown-menu-trigger, [bao-dropdown-menu-trigger], [baoDropdownMenuTriggerFor]',
|
|
4382
|
+
host: { class: 'bao-dropdown-menu-trigger' }
|
|
4383
|
+
}]
|
|
4384
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i1$4.Overlay }]; }, propDecorators: { menu: [{
|
|
4385
|
+
type: Input,
|
|
4386
|
+
args: ['baoDropdownMenuTriggerFor']
|
|
4387
|
+
}], escapeKeyEvent: [{
|
|
4388
|
+
type: HostListener,
|
|
4389
|
+
args: ['window:keyup.escape']
|
|
4390
|
+
}], enterKeyEvent: [{
|
|
4391
|
+
type: HostListener,
|
|
4392
|
+
args: ['window:keyup.enter']
|
|
4393
|
+
}], onClick: [{
|
|
4394
|
+
type: HostListener,
|
|
4395
|
+
args: ['click']
|
|
4396
|
+
}] } });
|
|
4397
|
+
/**
|
|
4398
|
+
* Sections of list items in menu. Apply proper styling to section's title if there is one.
|
|
4399
|
+
*/
|
|
4400
|
+
class BaoDropdownMenuSection {
|
|
4401
|
+
constructor(elementRef, renderer) {
|
|
4402
|
+
this.elementRef = elementRef;
|
|
4403
|
+
this.renderer = renderer;
|
|
4404
|
+
}
|
|
4405
|
+
get nativeElement() {
|
|
4406
|
+
return this.elementRef.nativeElement;
|
|
4407
|
+
}
|
|
4408
|
+
ngAfterViewInit() {
|
|
4409
|
+
const children = Array.from(this.nativeElement.childNodes);
|
|
4410
|
+
const textIndex = children.findIndex((c) => c.nodeName === '#text');
|
|
4411
|
+
if (textIndex > -1) {
|
|
4412
|
+
this.insertTitle(children, textIndex);
|
|
4413
|
+
}
|
|
4414
|
+
}
|
|
4415
|
+
insertTitle(children, txtIdx) {
|
|
4416
|
+
const titleElement = this.renderer.createElement('h5');
|
|
4417
|
+
this.renderer.setProperty(titleElement, 'textContent', children[txtIdx].nodeValue);
|
|
4418
|
+
this.renderer.removeChild(this.nativeElement, children[txtIdx]);
|
|
4419
|
+
const listIndex = children.findIndex((c) => c.nodeName === 'UL');
|
|
4420
|
+
this.renderer.insertBefore(this.nativeElement, titleElement, children[listIndex]);
|
|
4421
|
+
}
|
|
4422
|
+
}
|
|
4423
|
+
BaoDropdownMenuSection.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuSection, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4424
|
+
BaoDropdownMenuSection.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoDropdownMenuSection, selector: "bao-dropdown-menu-section, [bao-dropdown-menu-section]", host: { classAttribute: "bao-dropdown-menu-section" }, ngImport: i0 });
|
|
4425
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuSection, decorators: [{
|
|
4426
|
+
type: Directive,
|
|
4427
|
+
args: [{
|
|
4428
|
+
selector: 'bao-dropdown-menu-section, [bao-dropdown-menu-section]',
|
|
4429
|
+
host: { class: 'bao-dropdown-menu-section' }
|
|
4430
|
+
}]
|
|
4431
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; } });
|
|
4432
|
+
/**
|
|
4433
|
+
* Label of a list item, add css class to apply proper styling.
|
|
4434
|
+
*/
|
|
4435
|
+
class BaoDropdownMenuItemLabel {
|
|
4436
|
+
}
|
|
4437
|
+
BaoDropdownMenuItemLabel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuItemLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
4438
|
+
BaoDropdownMenuItemLabel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoDropdownMenuItemLabel, selector: "bao-dropdown-menu-item-label, [bao-dropdown-menu-item-label]", host: { classAttribute: "bao-dropdown-menu-item-label" }, ngImport: i0 });
|
|
4439
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuItemLabel, decorators: [{
|
|
4440
|
+
type: Directive,
|
|
4441
|
+
args: [{
|
|
4442
|
+
selector: 'bao-dropdown-menu-item-label, [bao-dropdown-menu-item-label]',
|
|
4443
|
+
host: { class: 'bao-dropdown-menu-item-label' }
|
|
4444
|
+
}]
|
|
4445
|
+
}] });
|
|
4446
|
+
/**
|
|
4447
|
+
* Description of a list item, add css class to apply proper styling.
|
|
4448
|
+
*/
|
|
4449
|
+
class BaoDropdownMenuItemDescription {
|
|
4450
|
+
}
|
|
4451
|
+
BaoDropdownMenuItemDescription.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuItemDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
4452
|
+
BaoDropdownMenuItemDescription.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoDropdownMenuItemDescription, selector: "bao-dropdown-menu-item-description, [bao-dropdown-menu-item-description]", host: { classAttribute: "bao-dropdown-menu-item-description" }, ngImport: i0 });
|
|
4453
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuItemDescription, decorators: [{
|
|
4454
|
+
type: Directive,
|
|
4455
|
+
args: [{
|
|
4456
|
+
selector: 'bao-dropdown-menu-item-description, [bao-dropdown-menu-item-description]',
|
|
4457
|
+
host: { class: 'bao-dropdown-menu-item-description' }
|
|
4458
|
+
}]
|
|
4459
|
+
}] });
|
|
4460
|
+
/**
|
|
4461
|
+
* Divider to separate sections.
|
|
4462
|
+
*/
|
|
4463
|
+
class BaoDropdownMenuDivider {
|
|
4464
|
+
constructor(renderer, elementRef) {
|
|
4465
|
+
this.renderer = renderer;
|
|
4466
|
+
this.elementRef = elementRef;
|
|
4467
|
+
}
|
|
4468
|
+
get nativeElement() {
|
|
4469
|
+
return this.elementRef.nativeElement;
|
|
4470
|
+
}
|
|
4471
|
+
ngAfterContentInit() {
|
|
4472
|
+
this.renderer.setAttribute(this.nativeElement, 'role', 'separator');
|
|
4473
|
+
}
|
|
4474
|
+
}
|
|
4475
|
+
BaoDropdownMenuDivider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuDivider, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4476
|
+
BaoDropdownMenuDivider.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoDropdownMenuDivider, selector: "bao-dropdown-menu-divider, [bao-dropdown-menu-divider]", host: { classAttribute: "bao-dropdown-menu-divider" }, ngImport: i0, template: `<hr />`, isInline: true });
|
|
4477
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuDivider, decorators: [{
|
|
4478
|
+
type: Component,
|
|
4479
|
+
args: [{
|
|
4480
|
+
template: `<hr />`,
|
|
4481
|
+
selector: 'bao-dropdown-menu-divider, [bao-dropdown-menu-divider]',
|
|
4482
|
+
host: { class: 'bao-dropdown-menu-divider' }
|
|
4483
|
+
}]
|
|
4484
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; } });
|
|
4485
|
+
|
|
4486
|
+
/*
|
|
4487
|
+
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
4488
|
+
* Licensed under the MIT license.
|
|
4489
|
+
* See LICENSE file in the project root for full license information.
|
|
4490
|
+
*/
|
|
4491
|
+
const DROPDOWN_MENU_DIRECTIVES = [
|
|
4492
|
+
BaoDropdownMenuComponent,
|
|
4493
|
+
BaoDropdownMenuTrigger,
|
|
4494
|
+
BaoDropdownMenuItem,
|
|
4495
|
+
BaoDropdownMenuSection,
|
|
4496
|
+
BaoDropdownMenuItemLabel,
|
|
4497
|
+
BaoDropdownMenuItemDescription,
|
|
4498
|
+
BaoDropdownMenuDivider
|
|
4499
|
+
];
|
|
4500
|
+
class BaoDropdownMenuModule {
|
|
4501
|
+
}
|
|
4502
|
+
BaoDropdownMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4503
|
+
BaoDropdownMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuModule, declarations: [BaoDropdownMenuComponent,
|
|
4504
|
+
BaoDropdownMenuTrigger,
|
|
4505
|
+
BaoDropdownMenuItem,
|
|
4506
|
+
BaoDropdownMenuSection,
|
|
4507
|
+
BaoDropdownMenuItemLabel,
|
|
4508
|
+
BaoDropdownMenuItemDescription,
|
|
4509
|
+
BaoDropdownMenuDivider], imports: [CommonModule, ObserversModule, OverlayModule, PortalModule], exports: [BaoDropdownMenuComponent,
|
|
4510
|
+
BaoDropdownMenuTrigger,
|
|
4511
|
+
BaoDropdownMenuItem,
|
|
4512
|
+
BaoDropdownMenuSection,
|
|
4513
|
+
BaoDropdownMenuItemLabel,
|
|
4514
|
+
BaoDropdownMenuItemDescription,
|
|
4515
|
+
BaoDropdownMenuDivider] });
|
|
4516
|
+
BaoDropdownMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuModule, imports: [CommonModule, ObserversModule, OverlayModule, PortalModule] });
|
|
4517
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuModule, decorators: [{
|
|
4518
|
+
type: NgModule,
|
|
4519
|
+
args: [{
|
|
4520
|
+
imports: [CommonModule, ObserversModule, OverlayModule, PortalModule],
|
|
4521
|
+
declarations: [DROPDOWN_MENU_DIRECTIVES],
|
|
4522
|
+
exports: [...DROPDOWN_MENU_DIRECTIVES]
|
|
4523
|
+
}]
|
|
4524
|
+
}] });
|
|
4525
|
+
|
|
4526
|
+
/*
|
|
4527
|
+
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
4528
|
+
* Licensed under the MIT license.
|
|
4529
|
+
* See LICENSE file in the project root for full license information.
|
|
4530
|
+
*/
|
|
4531
|
+
|
|
3955
4532
|
/*
|
|
3956
4533
|
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
3957
4534
|
* Licensed under the MIT license.
|
|
@@ -3964,8 +4541,7 @@ BaoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
|
3964
4541
|
BaoButtonModule,
|
|
3965
4542
|
BaoAlertModule,
|
|
3966
4543
|
BaoCardModule,
|
|
3967
|
-
BaoBreadcrumbModule,
|
|
3968
|
-
BaoModalModule], exports: [BaoIconModule,
|
|
4544
|
+
BaoBreadcrumbModule], exports: [BaoIconModule,
|
|
3969
4545
|
BaoButtonModule,
|
|
3970
4546
|
BaoAlertModule,
|
|
3971
4547
|
BaoBreadcrumbModule,
|
|
@@ -3980,7 +4556,8 @@ BaoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
|
3980
4556
|
BaoAvatarModule,
|
|
3981
4557
|
BaoTabsModule,
|
|
3982
4558
|
BaoModalModule,
|
|
3983
|
-
BaoHyperlinkModule
|
|
4559
|
+
BaoHyperlinkModule,
|
|
4560
|
+
BaoDropdownMenuModule
|
|
3984
4561
|
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
3985
4562
|
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
3986
4563
|
] });
|
|
@@ -3988,8 +4565,7 @@ BaoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
|
3988
4565
|
BaoButtonModule,
|
|
3989
4566
|
BaoAlertModule,
|
|
3990
4567
|
BaoCardModule,
|
|
3991
|
-
BaoBreadcrumbModule,
|
|
3992
|
-
BaoModalModule, BaoIconModule,
|
|
4568
|
+
BaoBreadcrumbModule, BaoIconModule,
|
|
3993
4569
|
BaoButtonModule,
|
|
3994
4570
|
BaoAlertModule,
|
|
3995
4571
|
BaoBreadcrumbModule,
|
|
@@ -4004,7 +4580,8 @@ BaoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
|
4004
4580
|
BaoAvatarModule,
|
|
4005
4581
|
BaoTabsModule,
|
|
4006
4582
|
BaoModalModule,
|
|
4007
|
-
BaoHyperlinkModule
|
|
4583
|
+
BaoHyperlinkModule,
|
|
4584
|
+
BaoDropdownMenuModule
|
|
4008
4585
|
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
4009
4586
|
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
4010
4587
|
] });
|
|
@@ -4016,8 +4593,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4016
4593
|
BaoButtonModule,
|
|
4017
4594
|
BaoAlertModule,
|
|
4018
4595
|
BaoCardModule,
|
|
4019
|
-
BaoBreadcrumbModule
|
|
4020
|
-
BaoModalModule
|
|
4596
|
+
BaoBreadcrumbModule
|
|
4021
4597
|
],
|
|
4022
4598
|
exports: [
|
|
4023
4599
|
BaoIconModule,
|
|
@@ -4035,7 +4611,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4035
4611
|
BaoAvatarModule,
|
|
4036
4612
|
BaoTabsModule,
|
|
4037
4613
|
BaoModalModule,
|
|
4038
|
-
BaoHyperlinkModule
|
|
4614
|
+
BaoHyperlinkModule,
|
|
4615
|
+
BaoDropdownMenuModule
|
|
4039
4616
|
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
4040
4617
|
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
4041
4618
|
]
|
|
@@ -4115,5 +4692,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4115
4692
|
* Generated bundle index. Do not edit.
|
|
4116
4693
|
*/
|
|
4117
4694
|
|
|
4118
|
-
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, 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 };
|
|
4695
|
+
export { BAO_MODAL_DATA, BAO_RADIO_GROUP, BaoAlertActions, BaoAlertComponent, BaoAlertContent, BaoAlertLink, BaoAlertModule, BaoAlertTitle, BaoAvatarComponent, BaoAvatarContent, BaoAvatarModule, BaoBadgeComponent, BaoBadgeModule, BaoBreadcrumbComponent, BaoBreadcrumbModule, BaoButtonComponent, BaoButtonModule, BaoCardComponent, BaoCardContent, BaoCardHeader, BaoCardModule, BaoCardTextInterface, BaoCardTitle, BaoCheckBoxDescription, BaoCheckboxComponent, BaoCheckboxGroupComponent, BaoCheckboxModule, BaoCommonComponentsModule, BaoDropdownMenuComponent, BaoDropdownMenuDivider, BaoDropdownMenuItem, BaoDropdownMenuItemDescription, BaoDropdownMenuItemLabel, BaoDropdownMenuModule, BaoDropdownMenuSection, BaoDropdownMenuTrigger, BaoErrorTextComponent, BaoGuidingTextComponent, BaoHeaderInfoComponent, BaoHeaderInfoContent, BaoHeaderInfoModule, BaoHeaderInfoSubtitle, BaoHeaderInfoSurtitle, BaoHeaderInfoTitle, BaoHeaderInfoTitleGroupComponent, BaoHyperlinkComponent, BaoHyperlinkModule, BaoIconComponent, BaoIconModule, BaoLabelTextComponent, BaoList, BaoListItem, BaoListItemDescription, BaoListItemTitle, BaoListModule, BaoListSummary, BaoListSummaryItem, BaoModal, BaoModalBase, BaoModalClose, BaoModalContainer, BaoModalInitialConfig, BaoModalModule, BaoModalRef, BaoModule, BaoNavList, BaoRadioButtonComponent, BaoRadioButtonGroupComponent, BaoRadioDescription, BaoRadioModule, BaoSummaryComponent, BaoSummaryDescription, BaoSummaryModule, BaoTabHeader, BaoTabPanel, BaoTablistComponent, BaoTabsContainer, BaoTabsModule, BaoTagComponent, BaoTagModule, BaoTitleTextComponent, _BaoModalContainerBase, _closeModalVia, eModalDesktopWidthSize, eModalMobileWidthSize, throwBaoModalContentAlreadyAttachedError };
|
|
4119
4696
|
//# sourceMappingURL=villedemontreal-angular-ui.mjs.map
|