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