@villedemontreal/angular-ui 17.0.0 → 17.1.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/esm2022/lib/bao.module.mjs +8 -9
- package/esm2022/lib/icon/icons-dictionary.mjs +3 -2
- package/esm2022/lib/modal/modal-config.mjs +9 -1
- package/esm2022/lib/modal/modal-container.mjs +2 -2
- package/esm2022/lib/modal/modal-ref.mjs +17 -16
- package/esm2022/lib/modal/modal.mjs +86 -14
- package/esm2022/lib/pagination/index.mjs +8 -0
- package/esm2022/lib/pagination/module.mjs +25 -0
- package/esm2022/lib/pagination/pagination.component.mjs +217 -0
- package/esm2022/public-api.mjs +17 -16
- package/fesm2022/villedemontreal-angular-ui.mjs +408 -91
- package/fesm2022/villedemontreal-angular-ui.mjs.map +1 -1
- package/lib/bao.module.d.ts +2 -1
- package/lib/modal/modal-config.d.ts +12 -1
- package/lib/modal/modal.d.ts +3 -3
- package/lib/pagination/index.d.ts +2 -0
- package/lib/pagination/module.d.ts +10 -0
- package/lib/pagination/pagination.component.d.ts +106 -0
- package/package.json +1 -1
- package/public-api.d.ts +16 -15
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { SecurityContext, Inject, Injectable, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule, Directive, EventEmitter, Output, CUSTOM_ELEMENTS_SCHEMA, ViewChild, forwardRef, HostListener, ContentChildren, Optional, SkipSelf, ViewChildren, InjectionToken, Injector, TemplateRef, inject, ContentChild } from '@angular/core';
|
|
3
1
|
import * as i1$1 from '@angular/common';
|
|
4
2
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { SecurityContext, Inject, Injectable, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule, Directive, EventEmitter, Output, CUSTOM_ELEMENTS_SCHEMA, ViewChild, forwardRef, HostListener, ContentChildren, Optional, SkipSelf, ViewChildren, InjectionToken, Injector, TemplateRef, inject, ContentChild } from '@angular/core';
|
|
5
5
|
import * as i1 from '@angular/platform-browser';
|
|
6
6
|
import * as i1$2 from '@angular/cdk/observers';
|
|
7
7
|
import { ObserversModule } from '@angular/cdk/observers';
|
|
8
|
+
import * as i3$1 from '@angular/forms';
|
|
8
9
|
import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
9
10
|
import * as i1$3 from '@angular/cdk/a11y';
|
|
10
11
|
import * as i1$4 from '@angular/cdk/overlay';
|
|
11
|
-
import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
12
|
+
import { OverlayConfig, OverlayModule, GlobalPositionStrategy } from '@angular/cdk/overlay';
|
|
12
13
|
import * as i3 from '@angular/cdk/portal';
|
|
13
14
|
import { DomPortal, PortalModule, BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, PortalInjector } from '@angular/cdk/portal';
|
|
14
15
|
import { Subject, filter, take, defer, startWith } from 'rxjs';
|
|
@@ -169,7 +170,8 @@ const ICONS_DCT = {
|
|
|
169
170
|
'icon-x': "<path fill-rule='evenodd' d='M12 13.414l-5.293 5.293a1 1 0 11-1.414-1.414L10.586 12 5.293 6.707a1 1 0 011.414-1.414l12 12a1 1 0 01-1.414 1.414L12 13.414zm5.293-8.121a1 1 0 011.414 1.414l-3 3a1 1 0 11-1.414-1.414l3-3z'/>",
|
|
170
171
|
'icon-spinner': "<path d='M24 12C24 14.3734 23.2962 16.6935 21.9776 18.6668C20.6591 20.6402 18.7849 22.1783 16.5922 23.0866C14.3995 23.9948 11.9867 24.2324 9.65892 23.7694C7.33114 23.3064 5.19295 22.1635 3.51472 20.4853C1.83649 18.8071 0.693599 16.6689 0.230577 14.3411C-0.232446 12.0133 0.00519403 9.60051 0.913446 7.4078C1.8217 5.21509 3.35977 3.34094 5.33316 2.02236C7.30655 0.703788 9.62662 -2.83022e-08 12 0L12 3C10.22 3 8.47991 3.52784 6.99987 4.51677C5.51983 5.50571 4.36627 6.91131 3.68508 8.55585C3.0039 10.2004 2.82567 12.01 3.17293 13.7558C3.5202 15.5016 4.37737 17.1053 5.63604 18.364C6.89471 19.6226 8.49836 20.4798 10.2442 20.8271C11.99 21.1743 13.7996 20.9961 15.4442 20.3149C17.0887 19.6337 18.4943 18.4802 19.4832 17.0001C20.4722 15.5201 21 13.78 21 12H24Z'/>",
|
|
171
172
|
'icon-emergency': "<path fill-rule='evenodd' clip-rule='evenodd' d='M11.067 7.87a.957.957 0 011.914 0v4.786a.957.957 0 11-1.914 0V7.87zM12.024 15.527a.958.958 0 10.001 1.916.958.958 0 00-.001-1.916z M9.878 1.879a3 3 0 014.243 0l8 7.999a3 3 0 010 4.242l-7.999 8.001a3 3 0 01-4.242 0l-8.001-7.999a3 3 0 010-4.242l7.999-8.001zm2.829 1.414a1 1 0 00-1.415 0l-8 8a1 1 0 00.001 1.415l8 8a1 1 0 001.415 0l8-8.002a1 1 0 000-1.414l-8.001-8z'/>",
|
|
172
|
-
'icon-error-octagon': "<path fill-rule='evenodd' clip-rule='evenodd' d='M34.9 27C35.3971 27 35.8 26.597 35.8 26.1C35.8 25.6029 35.3971 25.2 34.9 25.2C34.4029 25.2 34 25.6029 34 26.1C34 26.597 34.4029 27 34.9 27Z' /><path fill-rule='evenodd' clip-rule='evenodd' d='M13.493 13.4928C13.8835 13.1023 14.5167 13.1023 14.9072 13.4928L26.5072 25.0928C26.8977 25.4834 26.8977 26.1165 26.5072 26.5071C26.1167 26.8976 25.4835 26.8976 25.093 26.5071L13.493 14.9071C13.1024 14.5165 13.1024 13.8834 13.493 13.4928Z' /><path fill-rule='evenodd' clip-rule='evenodd' d='M26.5072 13.4928C26.8977 13.8834 26.8977 14.5165 26.5072 14.9071L14.8072 26.6071C14.4167 26.9976 13.7835 26.9976 13.393 26.6071C13.0025 26.2165 13.0025 25.5834 13.393 25.1928L25.093 13.4928C25.4835 13.1023 26.1167 13.1023 26.5072 13.4928Z' /><path fill-rule='evenodd' clip-rule='evenodd' d='M12.7929 3.59294C12.9805 3.40541 13.2348 3.30005 13.5 3.30005H26.5C26.7653 3.30005 27.0196 3.40541 27.2072 3.59294L36.4072 12.7929C36.5947 12.9805 36.7001 13.2348 36.7001 13.5V23.5C36.7001 24.0523 36.2523 24.5 35.7001 24.5C35.1478 24.5 34.7001 24.0523 34.7001 23.5V13.9143L26.0858 5.30005H13.9143L5.30005 13.9143V26.0858L13.9143 34.7001H26.0858L32.8929 27.8929C33.2835 27.5024 33.9166 27.5024 34.3072 27.8929C34.6977 28.2835 34.6977 28.9166 34.3072 29.3072L27.2072 36.4072C27.0196 36.5947 26.7653 36.7001 26.5 36.7001H13.5C13.2348 36.7001 12.9805 36.5947 12.7929 36.4072L3.59294 27.2072C3.40541 27.0196 3.30005 26.7653 3.30005 26.5V13.5C3.30005 13.2348 3.40541 12.9805 3.59294 12.7929L12.7929 3.59294Z'/>"
|
|
173
|
+
'icon-error-octagon': "<path fill-rule='evenodd' clip-rule='evenodd' d='M34.9 27C35.3971 27 35.8 26.597 35.8 26.1C35.8 25.6029 35.3971 25.2 34.9 25.2C34.4029 25.2 34 25.6029 34 26.1C34 26.597 34.4029 27 34.9 27Z' /><path fill-rule='evenodd' clip-rule='evenodd' d='M13.493 13.4928C13.8835 13.1023 14.5167 13.1023 14.9072 13.4928L26.5072 25.0928C26.8977 25.4834 26.8977 26.1165 26.5072 26.5071C26.1167 26.8976 25.4835 26.8976 25.093 26.5071L13.493 14.9071C13.1024 14.5165 13.1024 13.8834 13.493 13.4928Z' /><path fill-rule='evenodd' clip-rule='evenodd' d='M26.5072 13.4928C26.8977 13.8834 26.8977 14.5165 26.5072 14.9071L14.8072 26.6071C14.4167 26.9976 13.7835 26.9976 13.393 26.6071C13.0025 26.2165 13.0025 25.5834 13.393 25.1928L25.093 13.4928C25.4835 13.1023 26.1167 13.1023 26.5072 13.4928Z' /><path fill-rule='evenodd' clip-rule='evenodd' d='M12.7929 3.59294C12.9805 3.40541 13.2348 3.30005 13.5 3.30005H26.5C26.7653 3.30005 27.0196 3.40541 27.2072 3.59294L36.4072 12.7929C36.5947 12.9805 36.7001 13.2348 36.7001 13.5V23.5C36.7001 24.0523 36.2523 24.5 35.7001 24.5C35.1478 24.5 34.7001 24.0523 34.7001 23.5V13.9143L26.0858 5.30005H13.9143L5.30005 13.9143V26.0858L13.9143 34.7001H26.0858L32.8929 27.8929C33.2835 27.5024 33.9166 27.5024 34.3072 27.8929C34.6977 28.2835 34.6977 28.9166 34.3072 29.3072L27.2072 36.4072C27.0196 36.5947 26.7653 36.7001 26.5 36.7001H13.5C13.2348 36.7001 12.9805 36.5947 12.7929 36.4072L3.59294 27.2072C3.40541 27.0196 3.30005 26.7653 3.30005 26.5V13.5C3.30005 13.2348 3.40541 12.9805 3.59294 12.7929L12.7929 3.59294Z'/>",
|
|
174
|
+
'icon-slash': "<path fill-rule='evenodd' d='M12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1ZM6.38231 4.9681C7.92199 3.73647 9.87499 3 12 3C16.9706 3 21 7.02944 21 12C21 14.125 20.2635 16.078 19.0319 17.6177L6.38231 4.9681ZM4.9681 6.38231C3.73647 7.92199 3 9.87499 3 12C3 16.9706 7.02944 21 12 21C14.125 21 16.078 20.2635 17.6177 19.0319L4.9681 6.38231Z'/>"
|
|
173
175
|
};
|
|
174
176
|
/* 40x40 illlustrative icons - https://zeroheight.com/575tugn0n/v/0/p/39c76f-icones-illustratives/t/page-39c76f-32902091-13 */
|
|
175
177
|
const ILLUSTRATIVE_ICONS = ['icon-error-octagon'];
|
|
@@ -837,6 +839,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
837
839
|
* See LICENSE file in the project root for full license information.
|
|
838
840
|
*/
|
|
839
841
|
|
|
842
|
+
/*
|
|
843
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
844
|
+
* Licensed under the MIT license.
|
|
845
|
+
* See LICENSE file in the project root for full license information.
|
|
846
|
+
*/
|
|
847
|
+
class BaoBadgeComponent {
|
|
848
|
+
constructor() {
|
|
849
|
+
this.type = '';
|
|
850
|
+
}
|
|
851
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaoBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
852
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", 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"] }); }
|
|
853
|
+
}
|
|
854
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaoBadgeComponent, decorators: [{
|
|
855
|
+
type: Component,
|
|
856
|
+
args: [{ selector: 'bao-badge', host: {
|
|
857
|
+
class: '',
|
|
858
|
+
'[class.positive]': 'type === "success"',
|
|
859
|
+
'[class.negative]': 'type === "danger"',
|
|
860
|
+
'[class.warning]': 'type === "warning"',
|
|
861
|
+
'[class.informative]': 'type === "info"'
|
|
862
|
+
}, 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"] }]
|
|
863
|
+
}], propDecorators: { type: [{
|
|
864
|
+
type: Input
|
|
865
|
+
}] } });
|
|
866
|
+
|
|
867
|
+
/*
|
|
868
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
869
|
+
* Licensed under the MIT license.
|
|
870
|
+
* See LICENSE file in the project root for full license information.
|
|
871
|
+
*/
|
|
872
|
+
const BADGE_DIRECTIVES = [BaoBadgeComponent];
|
|
873
|
+
class BaoBadgeModule {
|
|
874
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaoBadgeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
875
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: BaoBadgeModule, declarations: [BaoBadgeComponent], imports: [CommonModule], exports: [BaoBadgeComponent] }); }
|
|
876
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaoBadgeModule, imports: [CommonModule] }); }
|
|
877
|
+
}
|
|
878
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaoBadgeModule, decorators: [{
|
|
879
|
+
type: NgModule,
|
|
880
|
+
args: [{
|
|
881
|
+
imports: [CommonModule],
|
|
882
|
+
declarations: [BADGE_DIRECTIVES],
|
|
883
|
+
exports: [BADGE_DIRECTIVES]
|
|
884
|
+
}]
|
|
885
|
+
}] });
|
|
886
|
+
|
|
887
|
+
/*
|
|
888
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
889
|
+
* Licensed under the MIT license.
|
|
890
|
+
* See LICENSE file in the project root for full license information.
|
|
891
|
+
*/
|
|
892
|
+
|
|
840
893
|
/*
|
|
841
894
|
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
842
895
|
* Licensed under the MIT license.
|
|
@@ -3127,12 +3180,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
3127
3180
|
* Licensed under the MIT license.
|
|
3128
3181
|
* See LICENSE file in the project root for full license information.
|
|
3129
3182
|
*/
|
|
3183
|
+
const FILTER_MODAL_WIDTH = '360px';
|
|
3130
3184
|
var eModalDesktopWidthSize;
|
|
3131
3185
|
(function (eModalDesktopWidthSize) {
|
|
3132
3186
|
eModalDesktopWidthSize["SMALL"] = "bao-modal-sm";
|
|
3133
3187
|
eModalDesktopWidthSize["MEDIUM"] = "bao-modal-md";
|
|
3134
3188
|
eModalDesktopWidthSize["LARGE"] = "bao-modal-lg"; // Full width minus 32px (global margin : left and rigth)
|
|
3135
3189
|
})(eModalDesktopWidthSize || (eModalDesktopWidthSize = {}));
|
|
3190
|
+
var eModalVariant;
|
|
3191
|
+
(function (eModalVariant) {
|
|
3192
|
+
eModalVariant["GLOBAL"] = "global";
|
|
3193
|
+
eModalVariant["FILTER"] = "filter";
|
|
3194
|
+
})(eModalVariant || (eModalVariant = {}));
|
|
3136
3195
|
var eModalMobileWidthSize;
|
|
3137
3196
|
(function (eModalMobileWidthSize) {
|
|
3138
3197
|
eModalMobileWidthSize["FULL"] = "bao-modal-mobil-full";
|
|
@@ -3167,6 +3226,8 @@ class BaoModalInitialConfig {
|
|
|
3167
3226
|
this.ariaLabelledBy = null;
|
|
3168
3227
|
/** Aria label to assign to the dialog element. */
|
|
3169
3228
|
this.ariaLabel = null;
|
|
3229
|
+
/** Modal variant (default or filter). */
|
|
3230
|
+
this.variant = eModalVariant.GLOBAL;
|
|
3170
3231
|
/**
|
|
3171
3232
|
* Where the dialog should focus on open.
|
|
3172
3233
|
*/
|
|
@@ -3403,7 +3464,7 @@ class BaoModalContainer extends _BaoModalContainerBase {
|
|
|
3403
3464
|
this._animationStateChanged.next({ state: 'opened', totalTime });
|
|
3404
3465
|
}
|
|
3405
3466
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaoModalContainer, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3406
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", 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;inset: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:#000}.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 }); }
|
|
3467
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", 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;inset: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:#000}.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-filter .bao-modal-container{box-shadow:0 .5rem 2rem #00000026;overflow:auto;max-height:calc(100vh - 16px);width:inherit}.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-global .bao-modal-body{padding:2rem}}.bao-modal-global .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-global .bao-modal-footer.bao-modal-footer-order{justify-content:unset;flex-direction:column-reverse}.bao-modal-global .bao-modal-footer button{text-align:center}.bao-modal-global .bao-modal-footer .bao-button-primary,.bao-modal-global .bao-modal-footer .bao-button-secondary{width:100%;display:block}.bao-modal-global .bao-modal-footer .bao-button-secondary{margin-bottom:.5rem}.bao-modal-global .bao-modal-footer .bao-button-tertiary{display:none}@media (min-width: 768px){.bao-modal-global .bao-modal-footer{justify-content:flex-end}.bao-modal-global .bao-modal-footer.bao-modal-footer-order{flex-direction:row-reverse}.bao-modal-global .bao-modal-footer .bao-button-primary{margin-left:1rem}.bao-modal-global .bao-modal-footer .bao-button-secondary{margin-bottom:0}.bao-modal-global .bao-modal-footer .bao-button-primary,.bao-modal-global .bao-modal-footer .bao-button-secondary{width:auto}.bao-modal-global .bao-modal-footer .bao-button-tertiary{display:block}}.bao-modal-filter .bao-modal-footer{display:flex;justify-content:space-between;padding:1rem;border-top:1px solid #ced4da;border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.bao-modal-filter .bao-modal-footer>button{flex-grow:1;justify-content:center}.bao-modal-filter .bao-modal-footer>button:first-child{margin-right:1rem}\n"], dependencies: [{ kind: "directive", type: i3.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3407
3468
|
}
|
|
3408
3469
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaoModalContainer, decorators: [{
|
|
3409
3470
|
type: Component,
|
|
@@ -3416,7 +3477,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
3416
3477
|
'[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy',
|
|
3417
3478
|
'[attr.aria-label]': '_config.ariaLabel',
|
|
3418
3479
|
'[attr.aria-describedby]': '_config.ariaDescribedBy || null'
|
|
3419
|
-
}, 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;inset: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:#000}.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"] }]
|
|
3480
|
+
}, 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;inset: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:#000}.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-filter .bao-modal-container{box-shadow:0 .5rem 2rem #00000026;overflow:auto;max-height:calc(100vh - 16px);width:inherit}.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-global .bao-modal-body{padding:2rem}}.bao-modal-global .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-global .bao-modal-footer.bao-modal-footer-order{justify-content:unset;flex-direction:column-reverse}.bao-modal-global .bao-modal-footer button{text-align:center}.bao-modal-global .bao-modal-footer .bao-button-primary,.bao-modal-global .bao-modal-footer .bao-button-secondary{width:100%;display:block}.bao-modal-global .bao-modal-footer .bao-button-secondary{margin-bottom:.5rem}.bao-modal-global .bao-modal-footer .bao-button-tertiary{display:none}@media (min-width: 768px){.bao-modal-global .bao-modal-footer{justify-content:flex-end}.bao-modal-global .bao-modal-footer.bao-modal-footer-order{flex-direction:row-reverse}.bao-modal-global .bao-modal-footer .bao-button-primary{margin-left:1rem}.bao-modal-global .bao-modal-footer .bao-button-secondary{margin-bottom:0}.bao-modal-global .bao-modal-footer .bao-button-primary,.bao-modal-global .bao-modal-footer .bao-button-secondary{width:auto}.bao-modal-global .bao-modal-footer .bao-button-tertiary{display:block}}.bao-modal-filter .bao-modal-footer{display:flex;justify-content:space-between;padding:1rem;border-top:1px solid #ced4da;border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.bao-modal-filter .bao-modal-footer>button{flex-grow:1;justify-content:center}.bao-modal-filter .bao-modal-footer>button:first-child{margin-right:1rem}\n"] }]
|
|
3420
3481
|
}] });
|
|
3421
3482
|
|
|
3422
3483
|
// Counter for unique modal ids.
|
|
@@ -3546,19 +3607,20 @@ class BaoModalRef {
|
|
|
3546
3607
|
*/
|
|
3547
3608
|
updatePosition(position) {
|
|
3548
3609
|
const strategy = this._getPositionStrategy();
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3610
|
+
// Only apply custom position for GlobalPositionStrategy
|
|
3611
|
+
if (strategy instanceof GlobalPositionStrategy) {
|
|
3612
|
+
if (position && (position.left || position.right)) {
|
|
3613
|
+
this.applyPositionStrategy(position, strategy, 'horizontal');
|
|
3614
|
+
}
|
|
3615
|
+
else {
|
|
3616
|
+
strategy.centerHorizontally();
|
|
3617
|
+
}
|
|
3618
|
+
if (position && (position.top || position.bottom)) {
|
|
3619
|
+
this.applyPositionStrategy(position, strategy, 'vertical');
|
|
3620
|
+
}
|
|
3621
|
+
else {
|
|
3622
|
+
strategy.centerVertically();
|
|
3623
|
+
}
|
|
3562
3624
|
}
|
|
3563
3625
|
this._overlayRef.updatePosition();
|
|
3564
3626
|
return this;
|
|
@@ -3595,8 +3657,7 @@ class BaoModalRef {
|
|
|
3595
3657
|
}
|
|
3596
3658
|
/** Fetches the position strategy object from the overlay ref. */
|
|
3597
3659
|
_getPositionStrategy() {
|
|
3598
|
-
return this._overlayRef.getConfig()
|
|
3599
|
-
.positionStrategy;
|
|
3660
|
+
return this._overlayRef.getConfig().positionStrategy;
|
|
3600
3661
|
}
|
|
3601
3662
|
/**
|
|
3602
3663
|
* Applies the position strategy to the overlay.
|
|
@@ -3745,15 +3806,71 @@ class BaoModalBase {
|
|
|
3745
3806
|
* Creates an overlay config from a modal config.
|
|
3746
3807
|
*/
|
|
3747
3808
|
_getOverlayConfig(config) {
|
|
3809
|
+
let positionStrategy;
|
|
3810
|
+
let hasBackdrop = config.hasBackdrop;
|
|
3811
|
+
let backdropClass = config.backdropClass;
|
|
3812
|
+
if (config.variant === eModalVariant.FILTER && config.triggerElement) {
|
|
3813
|
+
// Use connected positioning for filter variant
|
|
3814
|
+
positionStrategy = this._overlay
|
|
3815
|
+
.position()
|
|
3816
|
+
.flexibleConnectedTo(config.triggerElement.nativeElement)
|
|
3817
|
+
.withLockedPosition()
|
|
3818
|
+
.withGrowAfterOpen()
|
|
3819
|
+
.withPositions([
|
|
3820
|
+
{
|
|
3821
|
+
// top-left of the overlay is connected to bottom-left of the origin;
|
|
3822
|
+
originX: 'start',
|
|
3823
|
+
originY: 'bottom',
|
|
3824
|
+
overlayX: 'start',
|
|
3825
|
+
overlayY: 'top'
|
|
3826
|
+
},
|
|
3827
|
+
{
|
|
3828
|
+
// bottom-left of the overlay is connected to top-left of the origin;
|
|
3829
|
+
originX: 'start',
|
|
3830
|
+
originY: 'top',
|
|
3831
|
+
overlayX: 'start',
|
|
3832
|
+
overlayY: 'bottom'
|
|
3833
|
+
},
|
|
3834
|
+
{
|
|
3835
|
+
// top-right of the overlay is connected to bottom-right of the origin;
|
|
3836
|
+
originX: 'end',
|
|
3837
|
+
originY: 'bottom',
|
|
3838
|
+
overlayX: 'end',
|
|
3839
|
+
overlayY: 'top'
|
|
3840
|
+
},
|
|
3841
|
+
{
|
|
3842
|
+
// bottom-right of the overlay is connected to top-right of the origin;
|
|
3843
|
+
originX: 'end',
|
|
3844
|
+
originY: 'top',
|
|
3845
|
+
overlayX: 'end',
|
|
3846
|
+
overlayY: 'bottom'
|
|
3847
|
+
}
|
|
3848
|
+
]);
|
|
3849
|
+
// Filter variant should have transparent backdrop
|
|
3850
|
+
hasBackdrop = true;
|
|
3851
|
+
backdropClass = 'bao-overlay-transparent-backdrop';
|
|
3852
|
+
}
|
|
3853
|
+
else {
|
|
3854
|
+
// Use global positioning for default variant
|
|
3855
|
+
positionStrategy = this._overlay.position().global();
|
|
3856
|
+
}
|
|
3748
3857
|
const state = new OverlayConfig({
|
|
3749
|
-
positionStrategy
|
|
3858
|
+
positionStrategy,
|
|
3750
3859
|
scrollStrategy: this._overlay.scrollStrategies.block(),
|
|
3751
3860
|
panelClass: config.panelClass,
|
|
3752
|
-
hasBackdrop
|
|
3753
|
-
disposeOnNavigation: config.closeOnNavigation
|
|
3861
|
+
hasBackdrop,
|
|
3862
|
+
disposeOnNavigation: config.closeOnNavigation,
|
|
3863
|
+
// Set dimensions for filter variant in OverlayConfig instead of via updateSize()
|
|
3864
|
+
width: config.variant === eModalVariant.FILTER
|
|
3865
|
+
? FILTER_MODAL_WIDTH
|
|
3866
|
+
: config.width,
|
|
3867
|
+
minWidth: config.minWidth,
|
|
3868
|
+
minHeight: config.minHeight,
|
|
3869
|
+
maxWidth: config.maxWidth,
|
|
3870
|
+
maxHeight: config.maxHeight
|
|
3754
3871
|
});
|
|
3755
|
-
if (
|
|
3756
|
-
state.backdropClass =
|
|
3872
|
+
if (backdropClass) {
|
|
3873
|
+
state.backdropClass = backdropClass;
|
|
3757
3874
|
}
|
|
3758
3875
|
return state;
|
|
3759
3876
|
}
|
|
@@ -3789,9 +3906,13 @@ class BaoModalBase {
|
|
|
3789
3906
|
const contentRef = modalContainer.attachComponentPortal(new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector));
|
|
3790
3907
|
modalRef.componentInstance = contentRef.instance;
|
|
3791
3908
|
}
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3909
|
+
// Only update size and position for global variant
|
|
3910
|
+
// Filter variant dimensions are set in OverlayConfig and positioning is handled by FlexibleConnectedPositionStrategy
|
|
3911
|
+
if (config.variant !== eModalVariant.FILTER) {
|
|
3912
|
+
modalRef
|
|
3913
|
+
.updateSize(config.width, config.height)
|
|
3914
|
+
.updatePosition(config.position);
|
|
3915
|
+
}
|
|
3795
3916
|
return modalRef;
|
|
3796
3917
|
}
|
|
3797
3918
|
/**
|
|
@@ -3872,12 +3993,24 @@ class BaoModalBase {
|
|
|
3872
3993
|
const mobilClass = config?.mobileSize || eModalMobileWidthSize.FULL;
|
|
3873
3994
|
const data = config?.data || null;
|
|
3874
3995
|
const ariaLabelledBy = config?.ariaLabelledBy || null;
|
|
3996
|
+
const variant = config?.variant || eModalVariant.GLOBAL;
|
|
3997
|
+
const triggerElement = config?.triggerElement;
|
|
3998
|
+
// Add variant class for styling
|
|
3999
|
+
const variantClass = variant === eModalVariant.FILTER
|
|
4000
|
+
? 'bao-modal-filter'
|
|
4001
|
+
: 'bao-modal-global';
|
|
4002
|
+
// Filter variant does not have responsive css classes
|
|
4003
|
+
const panelClass = variant === eModalVariant.FILTER
|
|
4004
|
+
? [variantClass]
|
|
4005
|
+
: [desktopClass, mobilClass, variantClass];
|
|
3875
4006
|
return {
|
|
3876
4007
|
...defaultOptions,
|
|
3877
4008
|
...{
|
|
3878
|
-
panelClass
|
|
4009
|
+
panelClass,
|
|
3879
4010
|
ariaLabelledBy,
|
|
3880
|
-
data
|
|
4011
|
+
data,
|
|
4012
|
+
variant,
|
|
4013
|
+
triggerElement
|
|
3881
4014
|
}
|
|
3882
4015
|
};
|
|
3883
4016
|
}
|
|
@@ -4005,6 +4138,243 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
4005
4138
|
}]
|
|
4006
4139
|
}] });
|
|
4007
4140
|
|
|
4141
|
+
/*
|
|
4142
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
4143
|
+
* Licensed under the MIT license.
|
|
4144
|
+
* See LICENSE file in the project root for full license information.
|
|
4145
|
+
*/
|
|
4146
|
+
class BaoPaginationComponent {
|
|
4147
|
+
constructor(cdr) {
|
|
4148
|
+
this.cdr = cdr;
|
|
4149
|
+
/**
|
|
4150
|
+
* The number of items per page as selected.
|
|
4151
|
+
*/
|
|
4152
|
+
this.itemsPerPage = 10;
|
|
4153
|
+
/**
|
|
4154
|
+
* The current page number.
|
|
4155
|
+
*/
|
|
4156
|
+
this.currentPage = 1;
|
|
4157
|
+
/**
|
|
4158
|
+
* The different page size options.
|
|
4159
|
+
*/
|
|
4160
|
+
this.pageSizeOptions = [10, 25, 50, 100];
|
|
4161
|
+
/**
|
|
4162
|
+
* The label for the type of items that are displayed on the page
|
|
4163
|
+
*/
|
|
4164
|
+
this.itemLabel = 'items';
|
|
4165
|
+
/**
|
|
4166
|
+
* If selector for number of items per page should be displayed or not
|
|
4167
|
+
*/
|
|
4168
|
+
this.showItemsPerPageSelector = true;
|
|
4169
|
+
/**
|
|
4170
|
+
* EventEmitter that triggers when there is a page change and emits page number (index adjusted)
|
|
4171
|
+
*/
|
|
4172
|
+
this.pageChanged = new EventEmitter();
|
|
4173
|
+
/**
|
|
4174
|
+
* EventEmitter that triggers when the number of items per page is changed.
|
|
4175
|
+
*/
|
|
4176
|
+
this.itemsPerPageChanged = new EventEmitter();
|
|
4177
|
+
/**
|
|
4178
|
+
* Max number of pages to display
|
|
4179
|
+
*/
|
|
4180
|
+
this._maxPages = 5;
|
|
4181
|
+
this.displayedPages = [];
|
|
4182
|
+
}
|
|
4183
|
+
get totalPages() {
|
|
4184
|
+
return this._totalPages;
|
|
4185
|
+
}
|
|
4186
|
+
set totalPages(value) {
|
|
4187
|
+
this._totalPages = value;
|
|
4188
|
+
}
|
|
4189
|
+
get startItem() {
|
|
4190
|
+
return this._startItem;
|
|
4191
|
+
}
|
|
4192
|
+
set startItem(value) {
|
|
4193
|
+
this._startItem = value;
|
|
4194
|
+
}
|
|
4195
|
+
get endItem() {
|
|
4196
|
+
return this._endItem;
|
|
4197
|
+
}
|
|
4198
|
+
set endItem(value) {
|
|
4199
|
+
this._endItem = value;
|
|
4200
|
+
}
|
|
4201
|
+
get rangeLabel() {
|
|
4202
|
+
return `${this.startItem} à ${this.endItem} sur ${this.totalItems} ${this.itemLabel}`;
|
|
4203
|
+
}
|
|
4204
|
+
/**
|
|
4205
|
+
* Flag that indicates if a previous page exists for the current list
|
|
4206
|
+
*/
|
|
4207
|
+
get hasPrevious() {
|
|
4208
|
+
return this.currentPage !== 1;
|
|
4209
|
+
}
|
|
4210
|
+
/**
|
|
4211
|
+
* Flag that indicates if a next page exists for the current list
|
|
4212
|
+
*/
|
|
4213
|
+
get hasNext() {
|
|
4214
|
+
return this.currentPage < this.totalPages;
|
|
4215
|
+
}
|
|
4216
|
+
ngOnInit() {
|
|
4217
|
+
this.startItem = this.updateStartItem();
|
|
4218
|
+
this.endItem = this.updateEndItem();
|
|
4219
|
+
this.totalPages = this.updateTotalPages();
|
|
4220
|
+
this.displayedPages = this.buildPageNumbers();
|
|
4221
|
+
this.cdr.detectChanges();
|
|
4222
|
+
}
|
|
4223
|
+
/**
|
|
4224
|
+
* Update list of displayed pages when current page is changed.
|
|
4225
|
+
*/
|
|
4226
|
+
ngOnChanges(changes) {
|
|
4227
|
+
if (changes.hasOwnProperty('currentPage')) {
|
|
4228
|
+
this.displayedPages = this.buildPageNumbers();
|
|
4229
|
+
}
|
|
4230
|
+
if (changes.hasOwnProperty('totalItems')) {
|
|
4231
|
+
this.startItem = this.updateStartItem();
|
|
4232
|
+
this.endItem = this.updateEndItem();
|
|
4233
|
+
this.totalPages = this.updateTotalPages();
|
|
4234
|
+
this.displayedPages = this.buildPageNumbers();
|
|
4235
|
+
}
|
|
4236
|
+
}
|
|
4237
|
+
/**
|
|
4238
|
+
* Navigate to specific page
|
|
4239
|
+
*/
|
|
4240
|
+
goTo(page) {
|
|
4241
|
+
this.currentPage = page;
|
|
4242
|
+
this.startItem = this.updateStartItem();
|
|
4243
|
+
this.endItem = this.updateEndItem();
|
|
4244
|
+
this.displayedPages = this.buildPageNumbers();
|
|
4245
|
+
this.pageChanged.emit(page - 1);
|
|
4246
|
+
}
|
|
4247
|
+
/**
|
|
4248
|
+
* Navigate to previous page
|
|
4249
|
+
*/
|
|
4250
|
+
handlePreviousClick() {
|
|
4251
|
+
if (this.hasPrevious) {
|
|
4252
|
+
this.goTo(this.currentPage - 1);
|
|
4253
|
+
}
|
|
4254
|
+
}
|
|
4255
|
+
/**
|
|
4256
|
+
* Navigate to next page
|
|
4257
|
+
*/
|
|
4258
|
+
handleNextClick() {
|
|
4259
|
+
if (this.hasNext) {
|
|
4260
|
+
this.goTo(this.currentPage + 1);
|
|
4261
|
+
}
|
|
4262
|
+
}
|
|
4263
|
+
/**
|
|
4264
|
+
* Update all required variables whenever the number of items displayed per page is changed.
|
|
4265
|
+
* @param value New amount of items per page
|
|
4266
|
+
*/
|
|
4267
|
+
handlePageSizeChange(value) {
|
|
4268
|
+
this.currentPage = 1;
|
|
4269
|
+
this.startItem = this.updateStartItem();
|
|
4270
|
+
this.endItem = this.updateEndItem();
|
|
4271
|
+
this.totalPages = this.updateTotalPages();
|
|
4272
|
+
this.displayedPages = this.buildPageNumbers();
|
|
4273
|
+
this.itemsPerPageChanged.emit(value);
|
|
4274
|
+
}
|
|
4275
|
+
updateTotalPages() {
|
|
4276
|
+
return Math.ceil(this.totalItems / this.itemsPerPage);
|
|
4277
|
+
}
|
|
4278
|
+
updateStartItem() {
|
|
4279
|
+
const startItem = Math.min((this.currentPage - 1) * this.itemsPerPage + 1, Math.floor(this.totalItems / 10) * 10);
|
|
4280
|
+
return startItem || 1;
|
|
4281
|
+
}
|
|
4282
|
+
updateEndItem() {
|
|
4283
|
+
return Math.min(this.startItem + Number(this.itemsPerPage) - 1, this.totalItems);
|
|
4284
|
+
}
|
|
4285
|
+
/**
|
|
4286
|
+
* Generate series of page numbers to display. The list always starts with page 1
|
|
4287
|
+
* and ends with last page.
|
|
4288
|
+
* Adds negative numbers for ellipsis.
|
|
4289
|
+
*/
|
|
4290
|
+
buildPageNumbers() {
|
|
4291
|
+
const pages = [];
|
|
4292
|
+
// If total pages are 5 or less, include all pages
|
|
4293
|
+
if (this.totalPages <= this._maxPages) {
|
|
4294
|
+
for (let i = 1; i <= this.totalPages; i++) {
|
|
4295
|
+
pages.push(i);
|
|
4296
|
+
}
|
|
4297
|
+
}
|
|
4298
|
+
else {
|
|
4299
|
+
pages.push(1);
|
|
4300
|
+
// Determine middle pages
|
|
4301
|
+
let middlePages = [];
|
|
4302
|
+
if (this.currentPage <= 3) {
|
|
4303
|
+
middlePages = [2, 3, 4, -1];
|
|
4304
|
+
}
|
|
4305
|
+
else if (this.currentPage >= this.totalPages - 2) {
|
|
4306
|
+
middlePages = [
|
|
4307
|
+
-1,
|
|
4308
|
+
this.totalPages - 3,
|
|
4309
|
+
this.totalPages - 2,
|
|
4310
|
+
this.totalPages - 1
|
|
4311
|
+
];
|
|
4312
|
+
}
|
|
4313
|
+
else {
|
|
4314
|
+
middlePages = [
|
|
4315
|
+
-1,
|
|
4316
|
+
this.currentPage - 1,
|
|
4317
|
+
this.currentPage,
|
|
4318
|
+
this.currentPage + 1,
|
|
4319
|
+
-1
|
|
4320
|
+
];
|
|
4321
|
+
}
|
|
4322
|
+
pages.push(...middlePages);
|
|
4323
|
+
pages.push(this.totalPages);
|
|
4324
|
+
}
|
|
4325
|
+
return pages;
|
|
4326
|
+
}
|
|
4327
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaoPaginationComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4328
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: BaoPaginationComponent, selector: "bao-pagination", inputs: { totalItems: "totalItems", itemsPerPage: "itemsPerPage", currentPage: "currentPage", pageSizeOptions: "pageSizeOptions", itemLabel: "itemLabel", showItemsPerPageSelector: "showItemsPerPageSelector" }, outputs: { pageChanged: "pageChanged", itemsPerPageChanged: "itemsPerPageChanged" }, host: { classAttribute: "bao-pagination" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"items-diplayed-controls\">\n <span class=\"range-display\">\n {{ rangeLabel }}\n </span>\n <div *ngIf=\"showItemsPerPageSelector\" class=\"items-per-page\">\n <label for=\"items-per-page-select\" class=\"select-label\"\n >Items par page\n </label>\n <select\n [(ngModel)]=\"itemsPerPage\"\n (ngModelChange)=\"handlePageSizeChange($event)\"\n name=\"items-per-page\"\n id=\"items-per-page-select\"\n class=\"dropdown-select\"\n >\n <option *ngFor=\"let size of pageSizeOptions\" [value]=\"size\">\n {{ size }}\n </option>\n </select>\n </div>\n</div>\n<nav aria-label=\"Pagination\" class=\"page-controls\">\n <ul>\n <li\n class=\"page-item\"\n [ngClass]=\"{ disabled: !hasPrevious }\"\n [attr.aria-disabled]=\"!hasPrevious ? 'true' : null\"\n >\n <a\n class=\"page-link\"\n (click)=\"$event.preventDefault(); handlePreviousClick()\"\n (keydown.enter)=\"$event.preventDefault(); handlePreviousClick()\"\n (keydown.space)=\"$event.preventDefault(); handlePreviousClick()\"\n tabindex=\"0\"\n >\n <bao-icon title=\"Page pr\u00E9c\u00E9dente\" svgIcon=\"icon-chevron-left\"></bao-icon\n ></a>\n </li>\n <li\n class=\"page-item\"\n *ngFor=\"let page of displayedPages\"\n [ngClass]=\"{ active: page === currentPage }\"\n [attr.aria-current]=\"page === currentPage ? 'page' : null\"\n >\n <ng-container *ngIf=\"page > 0; else ellipsis\">\n <span class=\"sr-only\">{{ page }}</span>\n <a\n class=\"page-link\"\n (click)=\"$event.preventDefault(); goTo(page)\"\n (keydown.enter)=\"$event.preventDefault(); goTo(page)\"\n (keydown.space)=\"$event.preventDefault(); goTo(page)\"\n tabindex=\"0\"\n >{{ page }}</a\n >\n </ng-container>\n <ng-template #ellipsis>\n <span class=\"page-link ellipsis\" aria-hidden=\"true\">...</span>\n </ng-template>\n </li>\n\n <li\n class=\"page-item\"\n [ngClass]=\"{ disabled: !hasNext }\"\n [attr.aria-disabled]=\"!hasNext ? 'true' : null\"\n >\n <a\n class=\"page-link\"\n (click)=\"$event.preventDefault(); handleNextClick()\"\n (keydown.enter)=\"$event.preventDefault(); handleNextClick()\"\n (keydown.space)=\"$event.preventDefault(); handleNextClick()\"\n tabindex=\"0\"\n >\n <bao-icon title=\"Page suivante\" svgIcon=\"icon-chevron-right\"></bao-icon\n ></a>\n </li>\n </ul>\n</nav>\n", styles: [".bao-container{padding-right:16px;padding-left:16px;margin-right:auto;margin-left:auto;width:100%}@media (min-width: 576px){.bao-container{max-width:576px}}@media (min-width: 768px){.bao-container{max-width:768px}}@media (min-width: 992px){.bao-container{max-width:992px}}@media (min-width: 1200px){.bao-container{max-width:1200px}}.bao-row{display:flex;flex-wrap:wrap;margin-right:-16px;margin-left:-16px}.bao-col-12,.bao-col-lg-7{position:relative;width:100%;padding-right:1rem;padding-left:1rem}@media (min-width: 992px){.bao-col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}}.bao-pagination{display:flex;flex-direction:column;justify-content:center}@media (min-width: 768px){.bao-pagination{justify-content:flex-start}}.bao-pagination>.items-diplayed-controls{display:flex;flex-direction:column;justify-content:center;align-self:center}@media (min-width: 768px){.bao-pagination>.items-diplayed-controls{flex-direction:row;justify-content:space-between;align-self:auto;margin-bottom:1rem}}.bao-pagination>.items-diplayed-controls .range-display{font-weight:700;font-size:.875rem;line-height:1.25rem;margin-bottom:1rem}@media (min-width: 768px){.bao-pagination>.items-diplayed-controls .range-display{margin-bottom:0rem}}.bao-pagination>.items-diplayed-controls>.items-per-page{display:flex;align-items:baseline;margin-bottom:2rem}@media (min-width: 768px){.bao-pagination>.items-diplayed-controls>.items-per-page{margin-bottom:0rem}}.bao-pagination>.items-diplayed-controls>.items-per-page>.select-label{font-weight:700;font-size:.875rem;line-height:1.25rem;color:#637381;margin-right:1rem}.bao-pagination>.items-diplayed-controls>.items-per-page>.dropdown-select{background-color:#fff;border-radius:.25rem;border-color:#ced4da;border-style:solid;border-width:thin;padding:.4375rem 2.4375rem .4375rem .4375rem;font-weight:400;font-size:1rem;line-height:1.5rem;color:#212529;appearance:none;background:#fff url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath fill='%23adb2bd' d='M12 12.586l3.293-3.293a1 1 0 011.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L12 12.586z'/%3e%3c/svg%3e\") right .4375rem center/24px 24px no-repeat}.bao-pagination .page-controls{align-self:center}.bao-pagination .page-controls>ul{display:flex;padding-left:0;margin-bottom:0}.bao-pagination .page-controls>ul>.page-item.disabled>.page-link>.bao-icon{color:#adb2bd}.bao-pagination .page-controls>ul>.page-item>.page-link{border-style:none}.bao-pagination .page-controls>ul>.page-item.active>.page-link{background-color:#eefaf8;border:1px solid #097d6c;border-radius:.25rem}.bao-pagination .page-controls>ul>.page-item>.page-link{font-size:.875rem}.bao-pagination .page-controls>ul>.page-item>.page-link:focus{box-shadow:inset 0 0 0 2px #0079c4}.bao-pagination .page-controls>ul>.page-item>.ellipsis{font-weight:700}.bao-pagination .page-controls>ul>.page-item>.ellipsis:hover{background-color:#fff}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BaoIconComponent, selector: "bao-icon", inputs: ["color", "size", "svgIcon", "title"], exportAs: ["baoIcon"] }, { kind: "directive", type: i3$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
4329
|
+
}
|
|
4330
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaoPaginationComponent, decorators: [{
|
|
4331
|
+
type: Component,
|
|
4332
|
+
args: [{ selector: 'bao-pagination', encapsulation: ViewEncapsulation.None, host: {
|
|
4333
|
+
class: 'bao-pagination'
|
|
4334
|
+
}, template: "<div class=\"items-diplayed-controls\">\n <span class=\"range-display\">\n {{ rangeLabel }}\n </span>\n <div *ngIf=\"showItemsPerPageSelector\" class=\"items-per-page\">\n <label for=\"items-per-page-select\" class=\"select-label\"\n >Items par page\n </label>\n <select\n [(ngModel)]=\"itemsPerPage\"\n (ngModelChange)=\"handlePageSizeChange($event)\"\n name=\"items-per-page\"\n id=\"items-per-page-select\"\n class=\"dropdown-select\"\n >\n <option *ngFor=\"let size of pageSizeOptions\" [value]=\"size\">\n {{ size }}\n </option>\n </select>\n </div>\n</div>\n<nav aria-label=\"Pagination\" class=\"page-controls\">\n <ul>\n <li\n class=\"page-item\"\n [ngClass]=\"{ disabled: !hasPrevious }\"\n [attr.aria-disabled]=\"!hasPrevious ? 'true' : null\"\n >\n <a\n class=\"page-link\"\n (click)=\"$event.preventDefault(); handlePreviousClick()\"\n (keydown.enter)=\"$event.preventDefault(); handlePreviousClick()\"\n (keydown.space)=\"$event.preventDefault(); handlePreviousClick()\"\n tabindex=\"0\"\n >\n <bao-icon title=\"Page pr\u00E9c\u00E9dente\" svgIcon=\"icon-chevron-left\"></bao-icon\n ></a>\n </li>\n <li\n class=\"page-item\"\n *ngFor=\"let page of displayedPages\"\n [ngClass]=\"{ active: page === currentPage }\"\n [attr.aria-current]=\"page === currentPage ? 'page' : null\"\n >\n <ng-container *ngIf=\"page > 0; else ellipsis\">\n <span class=\"sr-only\">{{ page }}</span>\n <a\n class=\"page-link\"\n (click)=\"$event.preventDefault(); goTo(page)\"\n (keydown.enter)=\"$event.preventDefault(); goTo(page)\"\n (keydown.space)=\"$event.preventDefault(); goTo(page)\"\n tabindex=\"0\"\n >{{ page }}</a\n >\n </ng-container>\n <ng-template #ellipsis>\n <span class=\"page-link ellipsis\" aria-hidden=\"true\">...</span>\n </ng-template>\n </li>\n\n <li\n class=\"page-item\"\n [ngClass]=\"{ disabled: !hasNext }\"\n [attr.aria-disabled]=\"!hasNext ? 'true' : null\"\n >\n <a\n class=\"page-link\"\n (click)=\"$event.preventDefault(); handleNextClick()\"\n (keydown.enter)=\"$event.preventDefault(); handleNextClick()\"\n (keydown.space)=\"$event.preventDefault(); handleNextClick()\"\n tabindex=\"0\"\n >\n <bao-icon title=\"Page suivante\" svgIcon=\"icon-chevron-right\"></bao-icon\n ></a>\n </li>\n </ul>\n</nav>\n", styles: [".bao-container{padding-right:16px;padding-left:16px;margin-right:auto;margin-left:auto;width:100%}@media (min-width: 576px){.bao-container{max-width:576px}}@media (min-width: 768px){.bao-container{max-width:768px}}@media (min-width: 992px){.bao-container{max-width:992px}}@media (min-width: 1200px){.bao-container{max-width:1200px}}.bao-row{display:flex;flex-wrap:wrap;margin-right:-16px;margin-left:-16px}.bao-col-12,.bao-col-lg-7{position:relative;width:100%;padding-right:1rem;padding-left:1rem}@media (min-width: 992px){.bao-col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}}.bao-pagination{display:flex;flex-direction:column;justify-content:center}@media (min-width: 768px){.bao-pagination{justify-content:flex-start}}.bao-pagination>.items-diplayed-controls{display:flex;flex-direction:column;justify-content:center;align-self:center}@media (min-width: 768px){.bao-pagination>.items-diplayed-controls{flex-direction:row;justify-content:space-between;align-self:auto;margin-bottom:1rem}}.bao-pagination>.items-diplayed-controls .range-display{font-weight:700;font-size:.875rem;line-height:1.25rem;margin-bottom:1rem}@media (min-width: 768px){.bao-pagination>.items-diplayed-controls .range-display{margin-bottom:0rem}}.bao-pagination>.items-diplayed-controls>.items-per-page{display:flex;align-items:baseline;margin-bottom:2rem}@media (min-width: 768px){.bao-pagination>.items-diplayed-controls>.items-per-page{margin-bottom:0rem}}.bao-pagination>.items-diplayed-controls>.items-per-page>.select-label{font-weight:700;font-size:.875rem;line-height:1.25rem;color:#637381;margin-right:1rem}.bao-pagination>.items-diplayed-controls>.items-per-page>.dropdown-select{background-color:#fff;border-radius:.25rem;border-color:#ced4da;border-style:solid;border-width:thin;padding:.4375rem 2.4375rem .4375rem .4375rem;font-weight:400;font-size:1rem;line-height:1.5rem;color:#212529;appearance:none;background:#fff url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath fill='%23adb2bd' d='M12 12.586l3.293-3.293a1 1 0 011.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L12 12.586z'/%3e%3c/svg%3e\") right .4375rem center/24px 24px no-repeat}.bao-pagination .page-controls{align-self:center}.bao-pagination .page-controls>ul{display:flex;padding-left:0;margin-bottom:0}.bao-pagination .page-controls>ul>.page-item.disabled>.page-link>.bao-icon{color:#adb2bd}.bao-pagination .page-controls>ul>.page-item>.page-link{border-style:none}.bao-pagination .page-controls>ul>.page-item.active>.page-link{background-color:#eefaf8;border:1px solid #097d6c;border-radius:.25rem}.bao-pagination .page-controls>ul>.page-item>.page-link{font-size:.875rem}.bao-pagination .page-controls>ul>.page-item>.page-link:focus{box-shadow:inset 0 0 0 2px #0079c4}.bao-pagination .page-controls>ul>.page-item>.ellipsis{font-weight:700}.bao-pagination .page-controls>ul>.page-item>.ellipsis:hover{background-color:#fff}\n"] }]
|
|
4335
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { totalItems: [{
|
|
4336
|
+
type: Input
|
|
4337
|
+
}], itemsPerPage: [{
|
|
4338
|
+
type: Input
|
|
4339
|
+
}], currentPage: [{
|
|
4340
|
+
type: Input
|
|
4341
|
+
}], pageSizeOptions: [{
|
|
4342
|
+
type: Input
|
|
4343
|
+
}], itemLabel: [{
|
|
4344
|
+
type: Input
|
|
4345
|
+
}], showItemsPerPageSelector: [{
|
|
4346
|
+
type: Input
|
|
4347
|
+
}], pageChanged: [{
|
|
4348
|
+
type: Output
|
|
4349
|
+
}], itemsPerPageChanged: [{
|
|
4350
|
+
type: Output
|
|
4351
|
+
}] } });
|
|
4352
|
+
|
|
4353
|
+
/*
|
|
4354
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
4355
|
+
* Licensed under the MIT license.
|
|
4356
|
+
* See LICENSE file in the project root for full license information.
|
|
4357
|
+
*/
|
|
4358
|
+
class BaoPaginationModule {
|
|
4359
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaoPaginationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4360
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: BaoPaginationModule, declarations: [BaoPaginationComponent], imports: [CommonModule, BaoIconModule, FormsModule], exports: [BaoPaginationComponent] }); }
|
|
4361
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaoPaginationModule, imports: [CommonModule, BaoIconModule, FormsModule] }); }
|
|
4362
|
+
}
|
|
4363
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaoPaginationModule, decorators: [{
|
|
4364
|
+
type: NgModule,
|
|
4365
|
+
args: [{
|
|
4366
|
+
imports: [CommonModule, BaoIconModule, FormsModule],
|
|
4367
|
+
declarations: [BaoPaginationComponent],
|
|
4368
|
+
exports: [BaoPaginationComponent]
|
|
4369
|
+
}]
|
|
4370
|
+
}] });
|
|
4371
|
+
|
|
4372
|
+
/*
|
|
4373
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
4374
|
+
* Licensed under the MIT license.
|
|
4375
|
+
* See LICENSE file in the project root for full license information.
|
|
4376
|
+
*/
|
|
4377
|
+
|
|
4008
4378
|
/*
|
|
4009
4379
|
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
4010
4380
|
* Licensed under the MIT license.
|
|
@@ -6143,9 +6513,8 @@ class BaoModule {
|
|
|
6143
6513
|
BaoFileModule,
|
|
6144
6514
|
BaoSnackBarModule,
|
|
6145
6515
|
BaoSystemHeaderModule,
|
|
6146
|
-
BaoMessageBarModule
|
|
6147
|
-
|
|
6148
|
-
] }); }
|
|
6516
|
+
BaoMessageBarModule,
|
|
6517
|
+
BaoPaginationModule] }); }
|
|
6149
6518
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaoModule, imports: [BaoIconModule,
|
|
6150
6519
|
BaoButtonModule,
|
|
6151
6520
|
BaoAlertModule,
|
|
@@ -6171,9 +6540,8 @@ class BaoModule {
|
|
|
6171
6540
|
BaoFileModule,
|
|
6172
6541
|
BaoSnackBarModule,
|
|
6173
6542
|
BaoSystemHeaderModule,
|
|
6174
|
-
BaoMessageBarModule
|
|
6175
|
-
|
|
6176
|
-
] }); }
|
|
6543
|
+
BaoMessageBarModule,
|
|
6544
|
+
BaoPaginationModule] }); }
|
|
6177
6545
|
}
|
|
6178
6546
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaoModule, decorators: [{
|
|
6179
6547
|
type: NgModule,
|
|
@@ -6207,63 +6575,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
6207
6575
|
BaoFileModule,
|
|
6208
6576
|
BaoSnackBarModule,
|
|
6209
6577
|
BaoSystemHeaderModule,
|
|
6210
|
-
BaoMessageBarModule
|
|
6211
|
-
|
|
6578
|
+
BaoMessageBarModule,
|
|
6579
|
+
BaoPaginationModule
|
|
6212
6580
|
]
|
|
6213
6581
|
}]
|
|
6214
6582
|
}] });
|
|
6215
6583
|
|
|
6216
|
-
/*
|
|
6217
|
-
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
6218
|
-
* Licensed under the MIT license.
|
|
6219
|
-
* See LICENSE file in the project root for full license information.
|
|
6220
|
-
*/
|
|
6221
|
-
class BaoBadgeComponent {
|
|
6222
|
-
constructor() {
|
|
6223
|
-
this.type = '';
|
|
6224
|
-
}
|
|
6225
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaoBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6226
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", 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"] }); }
|
|
6227
|
-
}
|
|
6228
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaoBadgeComponent, decorators: [{
|
|
6229
|
-
type: Component,
|
|
6230
|
-
args: [{ selector: 'bao-badge', host: {
|
|
6231
|
-
class: '',
|
|
6232
|
-
'[class.positive]': 'type === "success"',
|
|
6233
|
-
'[class.negative]': 'type === "danger"',
|
|
6234
|
-
'[class.warning]': 'type === "warning"',
|
|
6235
|
-
'[class.informative]': 'type === "info"'
|
|
6236
|
-
}, 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"] }]
|
|
6237
|
-
}], propDecorators: { type: [{
|
|
6238
|
-
type: Input
|
|
6239
|
-
}] } });
|
|
6240
|
-
|
|
6241
|
-
/*
|
|
6242
|
-
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
6243
|
-
* Licensed under the MIT license.
|
|
6244
|
-
* See LICENSE file in the project root for full license information.
|
|
6245
|
-
*/
|
|
6246
|
-
const BADGE_DIRECTIVES = [BaoBadgeComponent];
|
|
6247
|
-
class BaoBadgeModule {
|
|
6248
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaoBadgeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
6249
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: BaoBadgeModule, declarations: [BaoBadgeComponent], imports: [CommonModule], exports: [BaoBadgeComponent] }); }
|
|
6250
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaoBadgeModule, imports: [CommonModule] }); }
|
|
6251
|
-
}
|
|
6252
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaoBadgeModule, decorators: [{
|
|
6253
|
-
type: NgModule,
|
|
6254
|
-
args: [{
|
|
6255
|
-
imports: [CommonModule],
|
|
6256
|
-
declarations: [BADGE_DIRECTIVES],
|
|
6257
|
-
exports: [BADGE_DIRECTIVES]
|
|
6258
|
-
}]
|
|
6259
|
-
}] });
|
|
6260
|
-
|
|
6261
|
-
/*
|
|
6262
|
-
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
6263
|
-
* Licensed under the MIT license.
|
|
6264
|
-
* See LICENSE file in the project root for full license information.
|
|
6265
|
-
*/
|
|
6266
|
-
|
|
6267
6584
|
/*
|
|
6268
6585
|
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
6269
6586
|
* Licensed under the MIT license.
|
|
@@ -6298,5 +6615,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
6298
6615
|
* Generated bundle index. Do not edit.
|
|
6299
6616
|
*/
|
|
6300
6617
|
|
|
6301
|
-
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, BaoMessageBarComponent, BaoMessageBarContent, BaoMessageBarModule, BaoModal, BaoModalBase, BaoModalClose, BaoModalContainer, BaoModalInitialConfig, BaoModalModule, BaoModalRef, BaoModule, BaoNavList, BaoRadioButtonComponent, BaoRadioButtonGroupComponent, BaoRadioDescription, BaoRadioModule, BaoSimpleSnackBarComponent, BaoSnackBarConfig, BaoSnackBarContainerComponent, BaoSnackBarModule, BaoSnackBarRef, BaoSnackBarService, BaoSummaryComponent, BaoSummaryDescription, BaoSummaryModule, BaoSystemHeaderComponent, BaoSystemHeaderModule, BaoTabHeader, BaoTabPanel, BaoTablistComponent, BaoTabsContainer, BaoTabsModule, BaoTagComponent, BaoTagModule, BaoTitleTextComponent, _BaoModalContainerBase, _closeModalVia, baoFactory, eModalDesktopWidthSize, eModalMobileWidthSize, throwBaoModalContentAlreadyAttachedError };
|
|
6618
|
+
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, BaoMessageBarComponent, BaoMessageBarContent, BaoMessageBarModule, BaoModal, BaoModalBase, BaoModalClose, BaoModalContainer, BaoModalInitialConfig, BaoModalModule, BaoModalRef, BaoModule, BaoNavList, BaoPaginationComponent, BaoPaginationModule, BaoRadioButtonComponent, BaoRadioButtonGroupComponent, BaoRadioDescription, BaoRadioModule, BaoSimpleSnackBarComponent, BaoSnackBarConfig, BaoSnackBarContainerComponent, BaoSnackBarModule, BaoSnackBarRef, BaoSnackBarService, BaoSummaryComponent, BaoSummaryDescription, BaoSummaryModule, BaoSystemHeaderComponent, BaoSystemHeaderModule, BaoTabHeader, BaoTabPanel, BaoTablistComponent, BaoTabsContainer, BaoTabsModule, BaoTagComponent, BaoTagModule, BaoTitleTextComponent, FILTER_MODAL_WIDTH, _BaoModalContainerBase, _closeModalVia, baoFactory, eModalDesktopWidthSize, eModalMobileWidthSize, eModalVariant, throwBaoModalContentAlreadyAttachedError };
|
|
6302
6619
|
//# sourceMappingURL=villedemontreal-angular-ui.mjs.map
|