@villedemontreal/angular-ui 2.2.1 → 3.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/esm2020/lib/alert/alert.component.mjs +24 -26
- package/esm2020/lib/alert/module.mjs +5 -5
- package/esm2020/lib/avatar/avatar.component.mjs +102 -0
- package/esm2020/lib/avatar/index.mjs +8 -0
- package/esm2020/lib/avatar/module.mjs +24 -0
- package/esm2020/lib/badge/badge.component.mjs +3 -3
- package/esm2020/lib/badge/module.mjs +5 -5
- package/esm2020/lib/bao.module.mjs +24 -14
- package/esm2020/lib/breadcrumb/breadcrumb.component.mjs +8 -8
- package/esm2020/lib/breadcrumb/module.mjs +5 -5
- package/esm2020/lib/button/button.component.mjs +7 -7
- package/esm2020/lib/button/module.mjs +5 -5
- package/esm2020/lib/card/card.component.mjs +15 -15
- package/esm2020/lib/card/module.mjs +5 -5
- package/esm2020/lib/checkbox/checkbox-group.component.mjs +8 -9
- package/esm2020/lib/checkbox/checkbox.component.mjs +45 -46
- package/esm2020/lib/checkbox/module.mjs +5 -5
- package/esm2020/lib/common-components/error-text/errorText.component.mjs +3 -3
- package/esm2020/lib/common-components/guiding-text/guidingText.component.mjs +3 -3
- package/esm2020/lib/common-components/label-text/labelText.component.mjs +3 -3
- package/esm2020/lib/common-components/module.mjs +5 -5
- package/esm2020/lib/common-components/title-text/titleText.component.mjs +3 -3
- package/esm2020/lib/header-info/header-info.component.mjs +18 -18
- package/esm2020/lib/header-info/module.mjs +5 -5
- package/esm2020/lib/icon/bao-icon-registry.mjs +3 -3
- package/esm2020/lib/icon/icon.component.mjs +30 -34
- package/esm2020/lib/icon/icons-dictionary.mjs +3 -2
- package/esm2020/lib/icon/module.mjs +5 -5
- package/esm2020/lib/list/list.component.mjs +15 -15
- package/esm2020/lib/list/module.mjs +5 -5
- package/esm2020/lib/modal/index.mjs +12 -0
- package/esm2020/lib/modal/modal-animations.mjs +29 -0
- package/esm2020/lib/modal/modal-config.mjs +65 -0
- package/esm2020/lib/modal/modal-container.mjs +254 -0
- package/esm2020/lib/modal/modal-directives.mjs +84 -0
- package/esm2020/lib/modal/modal-ref.mjs +195 -0
- package/esm2020/lib/modal/modal.mjs +293 -0
- package/esm2020/lib/modal/module.mjs +44 -0
- package/esm2020/lib/radio/module.mjs +10 -12
- package/esm2020/lib/radio/radio-group.component.mjs +43 -44
- package/esm2020/lib/radio/radio.component.mjs +45 -46
- package/esm2020/lib/summary/list-summary.component.mjs +9 -16
- package/esm2020/lib/summary/module.mjs +5 -5
- package/esm2020/lib/summary/summary.component.mjs +10 -11
- package/esm2020/lib/tabs/index.mjs +8 -0
- package/esm2020/lib/tabs/module.mjs +35 -0
- package/esm2020/lib/tabs/tabs.component.mjs +295 -0
- package/esm2020/lib/tag/module.mjs +5 -5
- package/esm2020/lib/tag/tag.component.mjs +5 -5
- package/esm2020/public-api.mjs +4 -1
- package/fesm2015/villedemontreal-angular-ui.mjs +1778 -384
- package/fesm2015/villedemontreal-angular-ui.mjs.map +1 -1
- package/fesm2020/villedemontreal-angular-ui.mjs +1770 -384
- package/fesm2020/villedemontreal-angular-ui.mjs.map +1 -1
- package/{villedemontreal-angular-ui.d.ts → index.d.ts} +0 -0
- package/lib/alert/alert.component.d.ts +6 -7
- package/lib/avatar/avatar.component.d.ts +26 -0
- package/lib/avatar/index.d.ts +2 -0
- package/lib/avatar/module.d.ts +8 -0
- package/lib/badge/badge.component.d.ts +1 -1
- package/lib/bao.module.d.ts +4 -1
- package/lib/breadcrumb/breadcrumb.component.d.ts +2 -2
- package/lib/button/button.component.d.ts +2 -2
- package/lib/card/card.component.d.ts +5 -5
- package/lib/checkbox/checkbox-group.component.d.ts +3 -3
- package/lib/checkbox/checkbox.component.d.ts +28 -28
- package/lib/common-components/error-text/errorText.component.d.ts +1 -1
- package/lib/common-components/guiding-text/guidingText.component.d.ts +1 -1
- package/lib/common-components/label-text/labelText.component.d.ts +1 -1
- package/lib/common-components/title-text/titleText.component.d.ts +1 -1
- package/lib/header-info/header-info.component.d.ts +6 -6
- package/lib/icon/icon.component.d.ts +11 -11
- package/lib/list/list.component.d.ts +5 -5
- package/lib/modal/index.d.ts +6 -0
- package/lib/modal/modal-animations.d.ts +8 -0
- package/lib/modal/modal-config.d.ts +105 -0
- package/lib/modal/modal-container.d.ts +106 -0
- package/lib/modal/modal-directives.d.ts +25 -0
- package/lib/modal/modal-ref.d.ts +91 -0
- package/lib/modal/modal.d.ts +91 -0
- package/lib/modal/module.d.ts +12 -0
- package/lib/radio/radio-group.component.d.ts +19 -19
- package/lib/radio/radio.component.d.ts +28 -28
- package/lib/summary/list-summary.component.d.ts +2 -2
- package/lib/summary/summary.component.d.ts +7 -7
- package/lib/tabs/index.d.ts +2 -0
- package/lib/tabs/module.d.ts +8 -0
- package/lib/tabs/tabs.component.d.ts +95 -0
- package/lib/tag/tag.component.d.ts +2 -2
- package/package.json +7 -7
- package/public-api.d.ts +3 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { SecurityContext, Injectable, Inject, Component, ViewEncapsulation, ChangeDetectionStrategy,
|
|
2
|
+
import { SecurityContext, Injectable, Inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, NgModule, Directive, EventEmitter, Output, CUSTOM_ELEMENTS_SCHEMA, ViewChild, forwardRef, InjectionToken, ContentChildren, Optional, HostListener, ContentChild, Injector, TemplateRef, SkipSelf } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@angular/common';
|
|
4
4
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/platform-browser';
|
|
@@ -9,6 +9,16 @@ import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/fo
|
|
|
9
9
|
import * as i1$3 from '@angular/cdk/a11y';
|
|
10
10
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
11
11
|
import * as i2 from '@angular/cdk/collections';
|
|
12
|
+
import * as i1$4 from '@angular/cdk/overlay';
|
|
13
|
+
import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
14
|
+
import * as i3 from '@angular/cdk/portal';
|
|
15
|
+
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
|
16
|
+
import { Subject, filter, take, defer, startWith, Subscription } from 'rxjs';
|
|
17
|
+
import { __awaiter } from 'tslib';
|
|
18
|
+
import { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
|
|
19
|
+
import { trigger, state, style, transition, group, animate, query, animateChild } from '@angular/animations';
|
|
20
|
+
import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
21
|
+
import { ANIMATION_MODULE_TYPE, BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations';
|
|
12
22
|
|
|
13
23
|
function baoColorToHex(baoColor) {
|
|
14
24
|
switch (baoColor) {
|
|
@@ -155,7 +165,8 @@ const ICONS_DCT = {
|
|
|
155
165
|
'icon-x-circle-full': "<path fill-rule='evenodd' d='M10.586 12l-2.829 2.828a1 1 0 001.415 1.415L12 13.414l2.828 2.829a1 1 0 001.415-1.415L13.414 12l2.829-2.828a1 1 0 10-1.415-1.415L12 10.586 9.172 7.757a1 1 0 00-1.415 1.415L10.586 12zM12 23C5.925 23 1 18.075 1 12S5.925 1 12 1s11 4.925 11 11-4.925 11-11 11z'/>",
|
|
156
166
|
'icon-x-circle': "<path fill-rule='evenodd' d='M10.586 12L7.757 9.172a1 1 0 011.415-1.415L12 10.586l2.828-2.829a1 1 0 011.415 1.415L13.414 12l2.829 2.828a1 1 0 01-1.415 1.415L12 13.414l-2.828 2.829a1 1 0 11-1.415-1.415L10.586 12zm10.956 5.477a1 1 0 01-1.734-.997A8.953 8.953 0 0021 12a9 9 0 10-9 9 8.953 8.953 0 004.484-1.195 1 1 0 01.998 1.733A10.953 10.953 0 0112 23C5.925 23 1 18.075 1 12S5.925 1 12 1s11 4.925 11 11c0 1.948-.508 3.824-1.458 5.477z'/>",
|
|
157
167
|
'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'/>",
|
|
158
|
-
'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'/>"
|
|
168
|
+
'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'/>",
|
|
169
|
+
'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'/>"
|
|
159
170
|
};
|
|
160
171
|
|
|
161
172
|
/*
|
|
@@ -187,9 +198,9 @@ class BaoIconDictionary {
|
|
|
187
198
|
return svg;
|
|
188
199
|
}
|
|
189
200
|
}
|
|
190
|
-
BaoIconDictionary.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
191
|
-
BaoIconDictionary.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
192
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
201
|
+
BaoIconDictionary.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconDictionary, deps: [{ token: DOCUMENT }, { token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
202
|
+
BaoIconDictionary.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconDictionary, providedIn: 'root' });
|
|
203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconDictionary, decorators: [{
|
|
193
204
|
type: Injectable,
|
|
194
205
|
args: [{ providedIn: 'root' }]
|
|
195
206
|
}], ctorParameters: function () {
|
|
@@ -204,7 +215,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
204
215
|
* Licensed under the MIT license.
|
|
205
216
|
* See LICENSE file in the project root for full license information.
|
|
206
217
|
*/
|
|
207
|
-
const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
|
|
218
|
+
const SVG_NAMESPACE$1 = 'http://www.w3.org/2000/svg';
|
|
208
219
|
const TITLE = 'title';
|
|
209
220
|
/**
|
|
210
221
|
* Component to display an icon. It can be used in the following ways:
|
|
@@ -214,7 +225,7 @@ const TITLE = 'title';
|
|
|
214
225
|
* `<bao-icon svgIcon="heart"></bao-icon>`
|
|
215
226
|
*/
|
|
216
227
|
class BaoIconComponent {
|
|
217
|
-
constructor(elementRef, iconRegistry, renderer
|
|
228
|
+
constructor(elementRef, iconRegistry, renderer) {
|
|
218
229
|
this.elementRef = elementRef;
|
|
219
230
|
this.iconRegistry = iconRegistry;
|
|
220
231
|
this.renderer = renderer;
|
|
@@ -222,11 +233,6 @@ class BaoIconComponent {
|
|
|
222
233
|
* The size of the icon
|
|
223
234
|
*/
|
|
224
235
|
this.size = 'x-small';
|
|
225
|
-
// If the user has not explicitly set aria-hidden, mark the icon as hidden, as this is
|
|
226
|
-
// the right thing to do for the majority of icon use-cases.
|
|
227
|
-
if (!ariaHidden) {
|
|
228
|
-
this.elementRef.nativeElement.setAttribute('aria-hidden', 'true');
|
|
229
|
-
}
|
|
230
236
|
this._titleId = '';
|
|
231
237
|
this._title = '';
|
|
232
238
|
this._svgIcon = '';
|
|
@@ -235,6 +241,18 @@ class BaoIconComponent {
|
|
|
235
241
|
get svgIcon() {
|
|
236
242
|
return this._svgIcon;
|
|
237
243
|
}
|
|
244
|
+
/** Title that will be used as an aria-label for the icon */
|
|
245
|
+
get title() {
|
|
246
|
+
return this._title;
|
|
247
|
+
}
|
|
248
|
+
get hexColor() {
|
|
249
|
+
if (this.color) {
|
|
250
|
+
return baoColorToHex(this.color);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
get titleId() {
|
|
254
|
+
return this._titleId;
|
|
255
|
+
}
|
|
238
256
|
set svgIcon(value) {
|
|
239
257
|
if (value !== this._svgIcon) {
|
|
240
258
|
if (value) {
|
|
@@ -247,15 +265,6 @@ class BaoIconComponent {
|
|
|
247
265
|
this.renderer.addClass(this.elementRef.nativeElement, `bao-${this._svgIcon}`);
|
|
248
266
|
}
|
|
249
267
|
}
|
|
250
|
-
get hexColor() {
|
|
251
|
-
if (this.color) {
|
|
252
|
-
return baoColorToHex(this.color);
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
/** Title that will be used as an aria-label for the icon */
|
|
256
|
-
get title() {
|
|
257
|
-
return this._title;
|
|
258
|
-
}
|
|
259
268
|
set title(value) {
|
|
260
269
|
if (value !== this._title) {
|
|
261
270
|
this._title = value;
|
|
@@ -263,9 +272,6 @@ class BaoIconComponent {
|
|
|
263
272
|
this.updateSvgIcon(this.svgIcon, value);
|
|
264
273
|
}
|
|
265
274
|
}
|
|
266
|
-
get titleId() {
|
|
267
|
-
return this._titleId;
|
|
268
|
-
}
|
|
269
275
|
ngOnDestroy() {
|
|
270
276
|
if (this._elementsWithExternalReferences) {
|
|
271
277
|
this._elementsWithExternalReferences.clear();
|
|
@@ -307,26 +313,32 @@ class BaoIconComponent {
|
|
|
307
313
|
if (title) {
|
|
308
314
|
svg = this.addTitleToSVG(svg, title);
|
|
309
315
|
}
|
|
316
|
+
if (!title) {
|
|
317
|
+
svg.setAttribute('aria-hidden', 'true');
|
|
318
|
+
}
|
|
310
319
|
this.setSvgElement(svg);
|
|
311
320
|
}
|
|
312
321
|
}
|
|
313
322
|
addTitleToSVG(svg, title) {
|
|
314
|
-
const titleNode = this.renderer.createElement(TITLE, SVG_NAMESPACE);
|
|
323
|
+
const titleNode = this.renderer.createElement(TITLE, SVG_NAMESPACE$1);
|
|
315
324
|
titleNode.id = this._titleId;
|
|
316
325
|
const titleText = this.renderer.createText(title);
|
|
317
326
|
this.renderer.appendChild(titleNode, titleText);
|
|
318
327
|
this.renderer.appendChild(svg, titleNode);
|
|
328
|
+
svg.setAttribute('aria-labelledby', this._titleId);
|
|
319
329
|
return svg;
|
|
320
330
|
}
|
|
321
331
|
generateUniqueTitleId() {
|
|
322
332
|
return this.title
|
|
323
|
-
? `${this.title
|
|
333
|
+
? `${this.title
|
|
334
|
+
.replace(/[^A-Z0-9]+/gi, '')
|
|
335
|
+
.toLocaleLowerCase()}-${Math.floor(Math.random() * 10000000000000000)}`
|
|
324
336
|
: '';
|
|
325
337
|
}
|
|
326
338
|
}
|
|
327
|
-
BaoIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
328
|
-
BaoIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
329
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
339
|
+
BaoIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconComponent, deps: [{ token: i0.ElementRef }, { token: BaoIconDictionary }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
340
|
+
BaoIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoIconComponent, selector: "bao-icon", inputs: { color: "color", size: "size", svgIcon: "svgIcon", title: "title" }, host: { attributes: { "role": "img" }, properties: { "class.bao-icon": "true", "class.notranslate": "true", "class.bao-icon-medium": "size === \"medium\"", "class.bao-icon-small": "size === \"small\"", "class.bao-icon-x-small": "size === \"x-small\"", "class.bao-icon-xx-small": "size === \"xx-small\"", "attr.data-bao-icon-type": "\"svg\"", "style.color": "hexColor" } }, exportAs: ["baoIcon"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: ["bao-icon{background-repeat:no-repeat;display:inline-block;fill:currentColor;line-height:normal}bao-icon svg{height:100%;width:100%}bao-icon.bao-icon-medium{height:2.5rem;width:2.5rem}bao-icon.bao-icon-small{height:2rem;width:2rem;line-height:1.75rem}bao-icon.bao-icon-x-small{height:1.5rem;width:1.5rem;line-height:.5rem}bao-icon.bao-icon-xx-small{height:1rem;width:1rem;line-height:.85rem}bao-icon.bao-icon-spinner{animation:spin .75s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
341
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconComponent, decorators: [{
|
|
330
342
|
type: Component,
|
|
331
343
|
args: [{ template: '<ng-content></ng-content>', selector: 'bao-icon', exportAs: 'baoIcon', host: {
|
|
332
344
|
role: 'img',
|
|
@@ -338,22 +350,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
338
350
|
'[class.bao-icon-x-small]': 'size === "x-small"',
|
|
339
351
|
'[class.bao-icon-xx-small]': 'size === "xx-small"',
|
|
340
352
|
'[attr.data-bao-icon-type]': '"svg"',
|
|
341
|
-
'[attr.aria-labelledby]': 'titleId',
|
|
342
|
-
'[attr.aria-hidden]': '!title',
|
|
343
353
|
'[style.color]': 'hexColor'
|
|
344
|
-
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["bao-icon{background-repeat:no-repeat;display:inline-
|
|
345
|
-
}], ctorParameters: function () {
|
|
346
|
-
return [{ type: i0.ElementRef }, { type: BaoIconDictionary }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
|
|
347
|
-
type: Attribute,
|
|
348
|
-
args: ['aria-hidden']
|
|
349
|
-
}] }];
|
|
350
|
-
}, propDecorators: { svgIcon: [{
|
|
354
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["bao-icon{background-repeat:no-repeat;display:inline-block;fill:currentColor;line-height:normal}bao-icon svg{height:100%;width:100%}bao-icon.bao-icon-medium{height:2.5rem;width:2.5rem}bao-icon.bao-icon-small{height:2rem;width:2rem;line-height:1.75rem}bao-icon.bao-icon-x-small{height:1.5rem;width:1.5rem;line-height:.5rem}bao-icon.bao-icon-xx-small{height:1rem;width:1rem;line-height:.85rem}bao-icon.bao-icon-spinner{animation:spin .75s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
|
|
355
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: BaoIconDictionary }, { type: i0.Renderer2 }]; }, propDecorators: { color: [{
|
|
351
356
|
type: Input
|
|
352
|
-
}],
|
|
357
|
+
}], size: [{
|
|
353
358
|
type: Input
|
|
354
|
-
}],
|
|
359
|
+
}], svgIcon: [{
|
|
355
360
|
type: Input
|
|
356
|
-
}],
|
|
361
|
+
}], title: [{
|
|
357
362
|
type: Input
|
|
358
363
|
}] } });
|
|
359
364
|
|
|
@@ -365,10 +370,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
365
370
|
const ICON_DIRECTIVES = [BaoIconComponent];
|
|
366
371
|
class BaoIconModule {
|
|
367
372
|
}
|
|
368
|
-
BaoIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
369
|
-
BaoIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
370
|
-
BaoIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
371
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
373
|
+
BaoIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
374
|
+
BaoIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, declarations: [BaoIconComponent], imports: [CommonModule], exports: [BaoIconComponent] });
|
|
375
|
+
BaoIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, imports: [CommonModule] });
|
|
376
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, decorators: [{
|
|
372
377
|
type: NgModule,
|
|
373
378
|
args: [{
|
|
374
379
|
imports: [CommonModule],
|
|
@@ -438,9 +443,9 @@ class BaoButtonComponent {
|
|
|
438
443
|
this.cdr.detectChanges();
|
|
439
444
|
}
|
|
440
445
|
}
|
|
441
|
-
BaoButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
442
|
-
BaoButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
443
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
446
|
+
BaoButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
447
|
+
BaoButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoButtonComponent, selector: "button[bao-button]", inputs: { displayType: "displayType", level: "level", size: "size", loading: "loading", reversed: "reversed", loadingSpinnerAriaLabel: "loadingSpinnerAriaLabel", fullWidth: "fullWidth" }, host: { properties: { "class.bao-button-utility": "displayType === \"utility\"", "class.bao-button-editorial": "displayType === \"editorial\"", "class.bao-button-primary": "level === \"primary\"", "class.bao-button-secondary": "level === \"secondary\"", "class.bao-button-tertiary": "level === \"tertiary\"", "class.bao-button-large": "size === \"large\"", "class.bao-button-medium": "size === \"medium\"", "class.bao-button-small": "size === \"small\"", "class.bao-button-reversed": "reversed === true", "class.bao-button-loading": "loading === true", "class.bao-button-no-text": "noText === true", "class.bao-button-full-width": "fullWidth === true" }, classAttribute: "bao-button" }, ngImport: i0, template: "<bao-icon\n *ngIf=\"loading && !rightIcon\"\n class=\"loading-spinner\"\n svgIcon=\"icon-spinner\"\n [title]=\"loadingSpinnerAriaLabel\"\n></bao-icon>\n<ng-content></ng-content>\n<bao-icon\n *ngIf=\"loading && rightIcon\"\n class=\"loading-spinner loading-spinner-right\"\n svgIcon=\"icon-spinner\"\n [title]=\"loadingSpinnerAriaLabel\"\n></bao-icon>\n", styles: [".bao-button{font-weight:700;font-size:.875rem;line-height:1.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center}.bao-button.bao-button-full-width{width:100%;display:block}.bao-button span{font-weight:700;font-size:.875rem;line-height:1.25rem}.bao-button:focus{outline:none;box-shadow:0 0 0 .1875rem #98bcde}.bao-button:focus.bao-button-reversed{outline:none;box-shadow:0 0 0 .1875rem #98bcde;box-shadow:0 0 0 .1875rem #ffffff4d}.bao-button:disabled,.bao-button.bao-button-loading{cursor:not-allowed}.bao-button.bao-button-utility{border-radius:.25rem;padding:.5625rem 1rem}.bao-button.bao-button-utility:disabled.bao-button-secondary,.bao-button.bao-button-utility:disabled.bao-button-tertiary{color:#adb2bd}.bao-button.bao-button-primary{background-color:#097d6c;border:solid .0625rem #097d6c;color:#fff}.bao-button.bao-button-primary.bao-button-reversed{background-color:#fff;border:solid .0625rem #ffffff;color:#000}.bao-button.bao-button-primary:hover{background-color:#075b4f}.bao-button.bao-button-primary:hover.bao-button-reversed{background-color:#eefaf8;color:#097d6c}.bao-button.bao-button-primary:focus.bao-button-reversed{background-color:#eefaf8;color:#097d6c}.bao-button.bao-button-primary:disabled,.bao-button.bao-button-primary.bao-button-loading{color:#637381;background-color:#dee2e6;border:solid .0625rem #dee2e6}.bao-button.bao-button-primary:disabled.bao-button-reversed,.bao-button.bao-button-primary.bao-button-loading.bao-button-reversed{background-color:#ffffff4d;border:solid .0625rem gba(#ffffff,.3);color:#ffffff80}.bao-button.bao-button-secondary{background-color:#fff0;color:#097d6c;border:solid .0625rem #ced4da}.bao-button.bao-button-secondary.bao-button-reversed{background-color:#fff0;color:#fff;border:solid .0625rem rgba(206,212,218,.5)}.bao-button.bao-button-secondary:hover{border:solid .0625rem #097d6c;background-color:#eefaf8}.bao-button.bao-button-secondary:hover.bao-button-reversed{background-color:#fff0;color:#fff;border:solid .0625rem #ced4da}.bao-button.bao-button-secondary:focus{border:solid .0625rem #097d6c;background-color:#eefaf8}.bao-button.bao-button-secondary:focus.bao-button-reversed{background-color:#ffffff4d;color:#fff;border:solid .0625rem #ced4da}.bao-button.bao-button-secondary:disabled,.bao-button.bao-button-secondary.bao-button-loading{color:#637381}.bao-button.bao-button-secondary:disabled:hover,.bao-button.bao-button-secondary.bao-button-loading:hover{border-color:#ced4da;background-color:#fff}.bao-button.bao-button-secondary:disabled:hover.bao-button-reversed,.bao-button.bao-button-secondary.bao-button-loading:hover.bao-button-reversed{border:solid .0625rem rgba(206,212,218,.5);background-color:#fff0;color:#637381}.bao-button.bao-button-secondary:disabled:focus,.bao-button.bao-button-secondary.bao-button-loading:focus{border-color:#ced4da;background-color:#fff}.bao-button.bao-button-secondary:disabled:focus.bao-button-reversed,.bao-button.bao-button-secondary.bao-button-loading:focus.bao-button-reversed{background-color:#fff0}.bao-button.bao-button-tertiary{border:solid .0625rem rgba(255,255,255,.0001);background-color:#fff0;color:#097d6c}.bao-button.bao-button-tertiary.bao-button-reversed{color:#fff}.bao-button.bao-button-tertiary:hover{background-color:#eefaf8}.bao-button.bao-button-tertiary:hover.bao-button-reversed{background-color:#ffffff4d;color:#fff}.bao-button.bao-button-tertiary:focus{background-color:#eefaf8}.bao-button.bao-button-tertiary:focus.bao-button-reversed{background-color:#ffffff4d;color:#fff}.bao-button.bao-button-tertiary:disabled,.bao-button.bao-button-tertiary.bao-button-loading{color:#637381}.bao-button.bao-button-tertiary:disabled:hover,.bao-button.bao-button-tertiary.bao-button-loading:hover{background-color:#fff0}.bao-button.bao-button-tertiary:disabled:hover.bao-button-reversed,.bao-button.bao-button-tertiary.bao-button-loading:hover.bao-button-reversed{color:#637381}.bao-button.bao-button-tertiary:disabled:focus,.bao-button.bao-button-tertiary.bao-button-loading:focus{background-color:#fff0}.bao-button.bao-button-tertiary:disabled:focus.bao-button-reversed,.bao-button.bao-button-tertiary.bao-button-loading:focus.bao-button-reversed{color:#637381}.bao-button.bao-button-editorial{border-radius:1.25rem;padding:.625rem 2rem}.bao-button.bao-button-editorial.bao-button-small{padding:.4375rem 1rem}.bao-button.bao-button-editorial.bao-button-large{border-radius:4rem;font-weight:700;font-size:1rem;line-height:1.5rem;padding:.9375rem 2rem}.bao-button.bao-button-editorial.bao-button-medium{padding:.5625rem 2rem}.bao-button.bao-button-editorial:disabled.bao-button-secondary,.bao-button.bao-button-editorial:disabled.bao-button-tertiary{color:#adb2bd}.bao-button.bao-button-small{font-weight:700;font-size:.75rem;line-height:1rem;padding:.4375rem}.bao-button.bao-button-small span{font-weight:700;font-size:.75rem;line-height:1rem}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.bao-button .loading-spinner{margin-right:.5rem;margin-left:-.5rem}.bao-button .loading-spinner-right{margin-right:-.5rem;margin-left:.5rem}.bao-button.bao-button-no-text .loading-spinner-right{margin:-.125rem -.5625rem}.bao-button.bao-button-small .loading-spinner{width:1rem;height:1rem;margin-right:.25rem;margin-left:0}.bao-button.bao-button-small .loading-spinner-right{margin-right:0;margin-left:.25rem}.bao-button.bao-button-loading>bao-icon:not(.loading-spinner){display:none}.bao-button>.bao-button-no-text.bao-button-loading>.loading-spinner{margin:-.125rem -.5625rem}.bao-button>bao-icon{margin:-.125rem 0rem}.bao-button>bao-icon:first-child:not(.loading-spinner){margin-right:.5rem;margin-left:-.5rem}.bao-button>bao-icon:last-child:not(.loading-spinner){margin-left:.5rem;margin-right:-.5rem}.bao-button>bao-icon:first-child:last-child:not(.loading-spinner){margin:-.125rem -.5625rem}.bao-button.bao-button-small>bao-icon{height:1rem;width:1rem;margin:-.125rem 0rem}.bao-button.bao-button-small>bao-icon:first-child:not(.loading-spinner){margin-left:0rem;margin-right:.25rem}.bao-button.bao-button-small>bao-icon:last-child:not(.loading-spinner){margin-left:.25rem;margin-right:0rem}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BaoIconComponent, selector: "bao-icon", inputs: ["color", "size", "svgIcon", "title"], exportAs: ["baoIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
448
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonComponent, decorators: [{
|
|
444
449
|
type: Component,
|
|
445
450
|
args: [{ selector: 'button[bao-button]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
446
451
|
class: 'bao-button',
|
|
@@ -456,7 +461,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
456
461
|
'[class.bao-button-loading]': 'loading === true',
|
|
457
462
|
'[class.bao-button-no-text]': 'noText === true',
|
|
458
463
|
'[class.bao-button-full-width]': 'fullWidth === true'
|
|
459
|
-
}, template: "<bao-icon\n *ngIf=\"loading && !rightIcon\"\n class=\"loading-spinner\"\n svgIcon=\"icon-spinner\"\n [title]=\"
|
|
464
|
+
}, template: "<bao-icon\n *ngIf=\"loading && !rightIcon\"\n class=\"loading-spinner\"\n svgIcon=\"icon-spinner\"\n [title]=\"loadingSpinnerAriaLabel\"\n></bao-icon>\n<ng-content></ng-content>\n<bao-icon\n *ngIf=\"loading && rightIcon\"\n class=\"loading-spinner loading-spinner-right\"\n svgIcon=\"icon-spinner\"\n [title]=\"loadingSpinnerAriaLabel\"\n></bao-icon>\n", styles: [".bao-button{font-weight:700;font-size:.875rem;line-height:1.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center}.bao-button.bao-button-full-width{width:100%;display:block}.bao-button span{font-weight:700;font-size:.875rem;line-height:1.25rem}.bao-button:focus{outline:none;box-shadow:0 0 0 .1875rem #98bcde}.bao-button:focus.bao-button-reversed{outline:none;box-shadow:0 0 0 .1875rem #98bcde;box-shadow:0 0 0 .1875rem #ffffff4d}.bao-button:disabled,.bao-button.bao-button-loading{cursor:not-allowed}.bao-button.bao-button-utility{border-radius:.25rem;padding:.5625rem 1rem}.bao-button.bao-button-utility:disabled.bao-button-secondary,.bao-button.bao-button-utility:disabled.bao-button-tertiary{color:#adb2bd}.bao-button.bao-button-primary{background-color:#097d6c;border:solid .0625rem #097d6c;color:#fff}.bao-button.bao-button-primary.bao-button-reversed{background-color:#fff;border:solid .0625rem #ffffff;color:#000}.bao-button.bao-button-primary:hover{background-color:#075b4f}.bao-button.bao-button-primary:hover.bao-button-reversed{background-color:#eefaf8;color:#097d6c}.bao-button.bao-button-primary:focus.bao-button-reversed{background-color:#eefaf8;color:#097d6c}.bao-button.bao-button-primary:disabled,.bao-button.bao-button-primary.bao-button-loading{color:#637381;background-color:#dee2e6;border:solid .0625rem #dee2e6}.bao-button.bao-button-primary:disabled.bao-button-reversed,.bao-button.bao-button-primary.bao-button-loading.bao-button-reversed{background-color:#ffffff4d;border:solid .0625rem gba(#ffffff,.3);color:#ffffff80}.bao-button.bao-button-secondary{background-color:#fff0;color:#097d6c;border:solid .0625rem #ced4da}.bao-button.bao-button-secondary.bao-button-reversed{background-color:#fff0;color:#fff;border:solid .0625rem rgba(206,212,218,.5)}.bao-button.bao-button-secondary:hover{border:solid .0625rem #097d6c;background-color:#eefaf8}.bao-button.bao-button-secondary:hover.bao-button-reversed{background-color:#fff0;color:#fff;border:solid .0625rem #ced4da}.bao-button.bao-button-secondary:focus{border:solid .0625rem #097d6c;background-color:#eefaf8}.bao-button.bao-button-secondary:focus.bao-button-reversed{background-color:#ffffff4d;color:#fff;border:solid .0625rem #ced4da}.bao-button.bao-button-secondary:disabled,.bao-button.bao-button-secondary.bao-button-loading{color:#637381}.bao-button.bao-button-secondary:disabled:hover,.bao-button.bao-button-secondary.bao-button-loading:hover{border-color:#ced4da;background-color:#fff}.bao-button.bao-button-secondary:disabled:hover.bao-button-reversed,.bao-button.bao-button-secondary.bao-button-loading:hover.bao-button-reversed{border:solid .0625rem rgba(206,212,218,.5);background-color:#fff0;color:#637381}.bao-button.bao-button-secondary:disabled:focus,.bao-button.bao-button-secondary.bao-button-loading:focus{border-color:#ced4da;background-color:#fff}.bao-button.bao-button-secondary:disabled:focus.bao-button-reversed,.bao-button.bao-button-secondary.bao-button-loading:focus.bao-button-reversed{background-color:#fff0}.bao-button.bao-button-tertiary{border:solid .0625rem rgba(255,255,255,.0001);background-color:#fff0;color:#097d6c}.bao-button.bao-button-tertiary.bao-button-reversed{color:#fff}.bao-button.bao-button-tertiary:hover{background-color:#eefaf8}.bao-button.bao-button-tertiary:hover.bao-button-reversed{background-color:#ffffff4d;color:#fff}.bao-button.bao-button-tertiary:focus{background-color:#eefaf8}.bao-button.bao-button-tertiary:focus.bao-button-reversed{background-color:#ffffff4d;color:#fff}.bao-button.bao-button-tertiary:disabled,.bao-button.bao-button-tertiary.bao-button-loading{color:#637381}.bao-button.bao-button-tertiary:disabled:hover,.bao-button.bao-button-tertiary.bao-button-loading:hover{background-color:#fff0}.bao-button.bao-button-tertiary:disabled:hover.bao-button-reversed,.bao-button.bao-button-tertiary.bao-button-loading:hover.bao-button-reversed{color:#637381}.bao-button.bao-button-tertiary:disabled:focus,.bao-button.bao-button-tertiary.bao-button-loading:focus{background-color:#fff0}.bao-button.bao-button-tertiary:disabled:focus.bao-button-reversed,.bao-button.bao-button-tertiary.bao-button-loading:focus.bao-button-reversed{color:#637381}.bao-button.bao-button-editorial{border-radius:1.25rem;padding:.625rem 2rem}.bao-button.bao-button-editorial.bao-button-small{padding:.4375rem 1rem}.bao-button.bao-button-editorial.bao-button-large{border-radius:4rem;font-weight:700;font-size:1rem;line-height:1.5rem;padding:.9375rem 2rem}.bao-button.bao-button-editorial.bao-button-medium{padding:.5625rem 2rem}.bao-button.bao-button-editorial:disabled.bao-button-secondary,.bao-button.bao-button-editorial:disabled.bao-button-tertiary{color:#adb2bd}.bao-button.bao-button-small{font-weight:700;font-size:.75rem;line-height:1rem;padding:.4375rem}.bao-button.bao-button-small span{font-weight:700;font-size:.75rem;line-height:1rem}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.bao-button .loading-spinner{margin-right:.5rem;margin-left:-.5rem}.bao-button .loading-spinner-right{margin-right:-.5rem;margin-left:.5rem}.bao-button.bao-button-no-text .loading-spinner-right{margin:-.125rem -.5625rem}.bao-button.bao-button-small .loading-spinner{width:1rem;height:1rem;margin-right:.25rem;margin-left:0}.bao-button.bao-button-small .loading-spinner-right{margin-right:0;margin-left:.25rem}.bao-button.bao-button-loading>bao-icon:not(.loading-spinner){display:none}.bao-button>.bao-button-no-text.bao-button-loading>.loading-spinner{margin:-.125rem -.5625rem}.bao-button>bao-icon{margin:-.125rem 0rem}.bao-button>bao-icon:first-child:not(.loading-spinner){margin-right:.5rem;margin-left:-.5rem}.bao-button>bao-icon:last-child:not(.loading-spinner){margin-left:.5rem;margin-right:-.5rem}.bao-button>bao-icon:first-child:last-child:not(.loading-spinner){margin:-.125rem -.5625rem}.bao-button.bao-button-small>bao-icon{height:1rem;width:1rem;margin:-.125rem 0rem}.bao-button.bao-button-small>bao-icon:first-child:not(.loading-spinner){margin-left:0rem;margin-right:.25rem}.bao-button.bao-button-small>bao-icon:last-child:not(.loading-spinner){margin-left:.25rem;margin-right:0rem}\n"] }]
|
|
460
465
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { displayType: [{
|
|
461
466
|
type: Input
|
|
462
467
|
}], level: [{
|
|
@@ -481,10 +486,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
481
486
|
const BUTTON_DIRECTIVES = [BaoButtonComponent];
|
|
482
487
|
class BaoButtonModule {
|
|
483
488
|
}
|
|
484
|
-
BaoButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
485
|
-
BaoButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
486
|
-
BaoButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
487
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
489
|
+
BaoButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
490
|
+
BaoButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, declarations: [BaoButtonComponent], imports: [CommonModule, BaoIconModule], exports: [BaoButtonComponent, BaoIconModule] });
|
|
491
|
+
BaoButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, imports: [CommonModule, BaoIconModule, BaoIconModule] });
|
|
492
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, decorators: [{
|
|
488
493
|
type: NgModule,
|
|
489
494
|
args: [{
|
|
490
495
|
imports: [CommonModule, BaoIconModule],
|
|
@@ -513,9 +518,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
513
518
|
*/
|
|
514
519
|
class BaoAlertTitle {
|
|
515
520
|
}
|
|
516
|
-
BaoAlertTitle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
517
|
-
BaoAlertTitle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
518
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
521
|
+
BaoAlertTitle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAlertTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
522
|
+
BaoAlertTitle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoAlertTitle, selector: "bao-alert-title", host: { classAttribute: "bao-alert-title" }, ngImport: i0 });
|
|
523
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAlertTitle, decorators: [{
|
|
519
524
|
type: Directive,
|
|
520
525
|
args: [{
|
|
521
526
|
selector: 'bao-alert-title',
|
|
@@ -531,9 +536,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
531
536
|
*/
|
|
532
537
|
class BaoAlertContent {
|
|
533
538
|
}
|
|
534
|
-
BaoAlertContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
535
|
-
BaoAlertContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
536
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
539
|
+
BaoAlertContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAlertContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
540
|
+
BaoAlertContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoAlertContent, selector: "bao-alert-content", host: { classAttribute: "bao-alert-content" }, ngImport: i0 });
|
|
541
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAlertContent, decorators: [{
|
|
537
542
|
type: Directive,
|
|
538
543
|
args: [{
|
|
539
544
|
selector: 'bao-alert-content',
|
|
@@ -549,9 +554,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
549
554
|
*/
|
|
550
555
|
class BaoAlertActions {
|
|
551
556
|
}
|
|
552
|
-
BaoAlertActions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
553
|
-
BaoAlertActions.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
554
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
557
|
+
BaoAlertActions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAlertActions, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
558
|
+
BaoAlertActions.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoAlertActions, selector: "bao-alert-actions", host: { classAttribute: "bao-alert-actions" }, exportAs: ["baoAlertActions"], ngImport: i0 });
|
|
559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAlertActions, decorators: [{
|
|
555
560
|
type: Directive,
|
|
556
561
|
args: [{
|
|
557
562
|
selector: 'bao-alert-actions',
|
|
@@ -570,9 +575,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
570
575
|
*/
|
|
571
576
|
class BaoAlertLink {
|
|
572
577
|
}
|
|
573
|
-
BaoAlertLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
574
|
-
BaoAlertLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
575
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
578
|
+
BaoAlertLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAlertLink, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
579
|
+
BaoAlertLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoAlertLink, selector: "bao-alert-link", host: { classAttribute: "bao-alert-link" }, ngImport: i0 });
|
|
580
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAlertLink, decorators: [{
|
|
576
581
|
type: Directive,
|
|
577
582
|
args: [{
|
|
578
583
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -595,12 +600,9 @@ class BaoAlertComponent {
|
|
|
595
600
|
/**
|
|
596
601
|
* Alert type
|
|
597
602
|
*/
|
|
598
|
-
this.type = '';
|
|
603
|
+
this.type = 'info';
|
|
599
604
|
this.dismissible = false;
|
|
600
|
-
this.showIcon = true;
|
|
601
605
|
this.dismiss = new EventEmitter();
|
|
602
|
-
this.iconType = 'icon-info';
|
|
603
|
-
this.iconTitle = 'Information';
|
|
604
606
|
}
|
|
605
607
|
ngOnChanges(changes) {
|
|
606
608
|
if (changes['type']) {
|
|
@@ -613,6 +615,7 @@ class BaoAlertComponent {
|
|
|
613
615
|
success: 'icon-check-circle',
|
|
614
616
|
danger: 'icon-error',
|
|
615
617
|
warning: 'icon-warning',
|
|
618
|
+
emergency: 'icon-emergency',
|
|
616
619
|
default: 'icon-info'
|
|
617
620
|
};
|
|
618
621
|
return typesAlertIcon[value] || typesAlertIcon.default;
|
|
@@ -622,6 +625,7 @@ class BaoAlertComponent {
|
|
|
622
625
|
success: 'Succès',
|
|
623
626
|
danger: 'Erreur',
|
|
624
627
|
warning: 'Attention',
|
|
628
|
+
emergency: 'Urgence',
|
|
625
629
|
default: 'Information'
|
|
626
630
|
};
|
|
627
631
|
return titleIcon[value] || titleIcon.default;
|
|
@@ -630,9 +634,9 @@ class BaoAlertComponent {
|
|
|
630
634
|
this.dismiss.emit();
|
|
631
635
|
}
|
|
632
636
|
}
|
|
633
|
-
BaoAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
634
|
-
BaoAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
635
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
637
|
+
BaoAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
638
|
+
BaoAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoAlertComponent, selector: "bao-alert", inputs: { type: "type", dismissible: "dismissible" }, outputs: { dismiss: "dismiss" }, host: { attributes: { "role": "alert" }, properties: { "class.bao-alert-success": "type === \"success\"", "class.bao-alert-danger": "type === \"danger\"", "class.bao-alert-warning": "type === \"warning\"", "class.bao-alert-info": "type === \"info\"", "class.bao-alert-emergency": "type === \"emergency\"" }, classAttribute: "bao-alert bao-alert-with-icon bao-alert-dismissible fade show" }, usesOnChanges: true, ngImport: i0, template: "<bao-icon [svgIcon]=\"iconType\" [title]=\"iconTitle\"></bao-icon>\n<div class=\"bao-alert-content-container\">\n <ng-content></ng-content>\n</div>\n<button\n bao-button\n *ngIf=\"dismissible\"\n type=\"utility\"\n level=\"tertiary\"\n data-dismiss=\"alert\"\n role=\"button\"\n aria-label=\"Cacher le message\"\n (click)=\"onDismissClicked()\"\n>\n <bao-icon svgIcon=\"icon-x\"></bao-icon>\n</button>\n", styles: [".bao-alert{font-weight:400;font-size:1rem;line-height:1.5rem;display:flex;padding:1rem;margin-bottom:1rem;border-radius:0rem}.bao-alert .bao-alert-content-container{margin:0 .5rem 0 1rem;display:flex;flex-direction:column}.bao-alert .bao-alert-title{font-weight:700;padding-bottom:.5rem}.bao-alert a{font-weight:700}.bao-alert.bao-alert-dismissible .bao-button[data-dismiss=alert]{background-color:#fff0;border-radius:0rem;height:2.5rem;width:2.5rem;margin-left:auto;margin-right:-.5rem;margin-top:-.5rem}.bao-alert.bao-alert-dismissible .bao-button[data-dismiss=alert]:hover,.bao-alert.bao-alert-dismissible .bao-button[data-dismiss=alert]:focus{opacity:.75}.bao-alert .bao-alert-actions .bao-button{margin:1rem 1rem 0 0}.bao-alert-info{background-color:#e6f5f9;border-left:.125rem solid #0079c4;border-top:none;border-right:none;border-bottom:none;color:#004b7b}.bao-alert-info .bao-alert-title,.bao-alert-info a{color:#004b7b}.bao-alert-info a:hover,.bao-alert-info a:focus{background-color:#f2fafc}.bao-alert-info .bao-icon svg{fill:#004b7b}.bao-alert-info .bao-button.bao-button-primary{background-color:#004b7b;border-color:#004b7b}.bao-alert-info .bao-button.bao-button-primary:hover,.bao-alert-info .bao-button.bao-button-primary:focus{background-color:#002c48;border-color:#002c48}.bao-alert-info .bao-button.bao-button-primary:focus{box-shadow:0 0 0 .1875rem #004b7b4d}.bao-alert-info .bao-button.bao-button-secondary{background-color:#e6f5f9;color:#004b7b}.bao-alert-info .bao-button.bao-button-secondary:hover,.bao-alert-info .bao-button.bao-button-secondary:focus{background-color:#e6f5f9;border-color:#004b7b}.bao-alert-info .bao-button.bao-button-secondary:focus{box-shadow:0 0 0 .1875rem #004b7b4d}.bao-alert-info .bao-button.bao-button-tertiary{background-color:#e6f5f9;color:#004b7b}.bao-alert-info .bao-button.bao-button-tertiary:hover,.bao-alert-info .bao-button.bao-button-tertiary:focus{background-color:#e6f5f9}.bao-alert-info .bao-button.bao-button-tertiary:focus{box-shadow:0 0 0 .1875rem #004b7b4d}.bao-alert-success{background-color:#e7f6f0;border-left:.125rem solid #0da566;border-top:none;border-right:none;border-bottom:none;color:#025d29}.bao-alert-success .bao-alert-title,.bao-alert-success a{color:#025d29}.bao-alert-success a:hover,.bao-alert-success a:focus{background-color:#f2faf7}.bao-alert-success .bao-icon svg{fill:#025d29}.bao-alert-success .bao-button.bao-button-primary{background-color:#025d29;border-color:#025d29}.bao-alert-success .bao-button.bao-button-primary:hover,.bao-alert-success .bao-button.bao-button-primary:focus{background-color:#012b13;border-color:#012b13}.bao-alert-success .bao-button.bao-button-primary:focus{box-shadow:0 0 0 .1875rem #025d294d}.bao-alert-success .bao-button.bao-button-secondary{background-color:#e7f6f0;color:#025d29}.bao-alert-success .bao-button.bao-button-secondary:hover,.bao-alert-success .bao-button.bao-button-secondary:focus{background-color:#e7f6f0;border-color:#025d29}.bao-alert-success .bao-button.bao-button-secondary:focus{box-shadow:0 0 0 .1875rem #025d294d}.bao-alert-success .bao-button.bao-button-tertiary{background-color:#e7f6f0;color:#025d29}.bao-alert-success .bao-button.bao-button-tertiary:hover,.bao-alert-success .bao-button.bao-button-tertiary:focus{background-color:#e7f6f0}.bao-alert-success .bao-button.bao-button-tertiary:focus{box-shadow:0 0 0 .1875rem #025d294d}.bao-alert-warning{background-color:#fefae6;border-left:.125rem solid #ffb833;border-top:none;border-right:none;border-bottom:none;color:#6c4600}.bao-alert-warning .bao-alert-title,.bao-alert-warning a{color:#6c4600}.bao-alert-warning a:hover,.bao-alert-warning a:focus{background-color:#fffdf5}.bao-alert-warning .bao-icon svg{fill:#6c4600}.bao-alert-warning .bao-button.bao-button-primary{background-color:#6c4600;border-color:#6c4600}.bao-alert-warning .bao-button.bao-button-primary:hover,.bao-alert-warning .bao-button.bao-button-primary:focus{background-color:#392500;border-color:#392500}.bao-alert-warning .bao-button.bao-button-primary:focus{box-shadow:0 0 0 .1875rem #6c46004d}.bao-alert-warning .bao-button.bao-button-secondary{background-color:#fefae6;color:#6c4600}.bao-alert-warning .bao-button.bao-button-secondary:hover,.bao-alert-warning .bao-button.bao-button-secondary:focus{background-color:#fefae6;border-color:#6c4600}.bao-alert-warning .bao-button.bao-button-secondary:focus{box-shadow:0 0 0 .1875rem #6c46004d}.bao-alert-warning .bao-button.bao-button-tertiary{background-color:#fefae6;color:#6c4600}.bao-alert-warning .bao-button.bao-button-tertiary:hover,.bao-alert-warning .bao-button.bao-button-tertiary:focus{background-color:#fefae6}.bao-alert-warning .bao-button.bao-button-tertiary:focus{box-shadow:0 0 0 .1875rem #6c46004d}.bao-alert-danger{background-color:#ffebe6;border-left:.125rem solid #d3310a;border-top:none;border-right:none;border-bottom:none;color:#851a00}.bao-alert-danger .bao-alert-title,.bao-alert-danger a{color:#851a00}.bao-alert-danger a:hover,.bao-alert-danger a:focus{background-color:#fff7f5}.bao-alert-danger .bao-icon svg{fill:#851a00}.bao-alert-danger .bao-button.bao-button-primary{background-color:#851a00;border-color:#851a00}.bao-alert-danger .bao-button.bao-button-primary:hover,.bao-alert-danger .bao-button.bao-button-primary:focus{background-color:#521000;border-color:#521000}.bao-alert-danger .bao-button.bao-button-primary:focus{box-shadow:0 0 0 .1875rem #851a004d}.bao-alert-danger .bao-button.bao-button-secondary{background-color:#ffebe6;color:#851a00}.bao-alert-danger .bao-button.bao-button-secondary:hover,.bao-alert-danger .bao-button.bao-button-secondary:focus{background-color:#ffebe6;border-color:#851a00}.bao-alert-danger .bao-button.bao-button-secondary:focus{box-shadow:0 0 0 .1875rem #851a004d}.bao-alert-danger .bao-button.bao-button-tertiary{background-color:#ffebe6;color:#851a00}.bao-alert-danger .bao-button.bao-button-tertiary:hover,.bao-alert-danger .bao-button.bao-button-tertiary:focus{background-color:#ffebe6}.bao-alert-danger .bao-button.bao-button-tertiary:focus{box-shadow:0 0 0 .1875rem #851a004d}.bao-alert-emergency{background-color:#ffebe6;border-left:.125rem solid #d3310a;border-top:none;border-right:none;border-bottom:none;color:#851a00}.bao-alert-emergency .bao-alert-title,.bao-alert-emergency a{color:#851a00}.bao-alert-emergency a:hover,.bao-alert-emergency a:focus{background-color:#fff7f5}.bao-alert-emergency .bao-icon svg{fill:#851a00}.bao-alert-emergency .bao-button.bao-button-primary{background-color:#851a00;border-color:#851a00}.bao-alert-emergency .bao-button.bao-button-primary:hover,.bao-alert-emergency .bao-button.bao-button-primary:focus{background-color:#521000;border-color:#521000}.bao-alert-emergency .bao-button.bao-button-primary:focus{box-shadow:0 0 0 .1875rem #851a004d}.bao-alert-emergency .bao-button.bao-button-secondary{background-color:#ffebe6;color:#851a00}.bao-alert-emergency .bao-button.bao-button-secondary:hover,.bao-alert-emergency .bao-button.bao-button-secondary:focus{background-color:#ffebe6;border-color:#851a00}.bao-alert-emergency .bao-button.bao-button-secondary:focus{box-shadow:0 0 0 .1875rem #851a004d}.bao-alert-emergency .bao-button.bao-button-tertiary{background-color:#ffebe6;color:#851a00}.bao-alert-emergency .bao-button.bao-button-tertiary:hover,.bao-alert-emergency .bao-button.bao-button-tertiary:focus{background-color:#ffebe6}.bao-alert-emergency .bao-button.bao-button-tertiary:focus{box-shadow:0 0 0 .1875rem #851a004d}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BaoIconComponent, selector: "bao-icon", inputs: ["color", "size", "svgIcon", "title"], exportAs: ["baoIcon"] }, { kind: "component", type: BaoButtonComponent, selector: "button[bao-button]", inputs: ["displayType", "level", "size", "loading", "reversed", "loadingSpinnerAriaLabel", "fullWidth"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
639
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAlertComponent, decorators: [{
|
|
636
640
|
type: Component,
|
|
637
641
|
args: [{ selector: 'bao-alert', encapsulation: ViewEncapsulation.None, host: {
|
|
638
642
|
class: 'bao-alert bao-alert-with-icon bao-alert-dismissible fade show',
|
|
@@ -640,14 +644,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
640
644
|
'[class.bao-alert-danger]': 'type === "danger"',
|
|
641
645
|
'[class.bao-alert-warning]': 'type === "warning"',
|
|
642
646
|
'[class.bao-alert-info]': 'type === "info"',
|
|
647
|
+
'[class.bao-alert-emergency]': 'type === "emergency"',
|
|
643
648
|
role: 'alert'
|
|
644
|
-
}, template: "<
|
|
649
|
+
}, template: "<bao-icon [svgIcon]=\"iconType\" [title]=\"iconTitle\"></bao-icon>\n<div class=\"bao-alert-content-container\">\n <ng-content></ng-content>\n</div>\n<button\n bao-button\n *ngIf=\"dismissible\"\n type=\"utility\"\n level=\"tertiary\"\n data-dismiss=\"alert\"\n role=\"button\"\n aria-label=\"Cacher le message\"\n (click)=\"onDismissClicked()\"\n>\n <bao-icon svgIcon=\"icon-x\"></bao-icon>\n</button>\n", styles: [".bao-alert{font-weight:400;font-size:1rem;line-height:1.5rem;display:flex;padding:1rem;margin-bottom:1rem;border-radius:0rem}.bao-alert .bao-alert-content-container{margin:0 .5rem 0 1rem;display:flex;flex-direction:column}.bao-alert .bao-alert-title{font-weight:700;padding-bottom:.5rem}.bao-alert a{font-weight:700}.bao-alert.bao-alert-dismissible .bao-button[data-dismiss=alert]{background-color:#fff0;border-radius:0rem;height:2.5rem;width:2.5rem;margin-left:auto;margin-right:-.5rem;margin-top:-.5rem}.bao-alert.bao-alert-dismissible .bao-button[data-dismiss=alert]:hover,.bao-alert.bao-alert-dismissible .bao-button[data-dismiss=alert]:focus{opacity:.75}.bao-alert .bao-alert-actions .bao-button{margin:1rem 1rem 0 0}.bao-alert-info{background-color:#e6f5f9;border-left:.125rem solid #0079c4;border-top:none;border-right:none;border-bottom:none;color:#004b7b}.bao-alert-info .bao-alert-title,.bao-alert-info a{color:#004b7b}.bao-alert-info a:hover,.bao-alert-info a:focus{background-color:#f2fafc}.bao-alert-info .bao-icon svg{fill:#004b7b}.bao-alert-info .bao-button.bao-button-primary{background-color:#004b7b;border-color:#004b7b}.bao-alert-info .bao-button.bao-button-primary:hover,.bao-alert-info .bao-button.bao-button-primary:focus{background-color:#002c48;border-color:#002c48}.bao-alert-info .bao-button.bao-button-primary:focus{box-shadow:0 0 0 .1875rem #004b7b4d}.bao-alert-info .bao-button.bao-button-secondary{background-color:#e6f5f9;color:#004b7b}.bao-alert-info .bao-button.bao-button-secondary:hover,.bao-alert-info .bao-button.bao-button-secondary:focus{background-color:#e6f5f9;border-color:#004b7b}.bao-alert-info .bao-button.bao-button-secondary:focus{box-shadow:0 0 0 .1875rem #004b7b4d}.bao-alert-info .bao-button.bao-button-tertiary{background-color:#e6f5f9;color:#004b7b}.bao-alert-info .bao-button.bao-button-tertiary:hover,.bao-alert-info .bao-button.bao-button-tertiary:focus{background-color:#e6f5f9}.bao-alert-info .bao-button.bao-button-tertiary:focus{box-shadow:0 0 0 .1875rem #004b7b4d}.bao-alert-success{background-color:#e7f6f0;border-left:.125rem solid #0da566;border-top:none;border-right:none;border-bottom:none;color:#025d29}.bao-alert-success .bao-alert-title,.bao-alert-success a{color:#025d29}.bao-alert-success a:hover,.bao-alert-success a:focus{background-color:#f2faf7}.bao-alert-success .bao-icon svg{fill:#025d29}.bao-alert-success .bao-button.bao-button-primary{background-color:#025d29;border-color:#025d29}.bao-alert-success .bao-button.bao-button-primary:hover,.bao-alert-success .bao-button.bao-button-primary:focus{background-color:#012b13;border-color:#012b13}.bao-alert-success .bao-button.bao-button-primary:focus{box-shadow:0 0 0 .1875rem #025d294d}.bao-alert-success .bao-button.bao-button-secondary{background-color:#e7f6f0;color:#025d29}.bao-alert-success .bao-button.bao-button-secondary:hover,.bao-alert-success .bao-button.bao-button-secondary:focus{background-color:#e7f6f0;border-color:#025d29}.bao-alert-success .bao-button.bao-button-secondary:focus{box-shadow:0 0 0 .1875rem #025d294d}.bao-alert-success .bao-button.bao-button-tertiary{background-color:#e7f6f0;color:#025d29}.bao-alert-success .bao-button.bao-button-tertiary:hover,.bao-alert-success .bao-button.bao-button-tertiary:focus{background-color:#e7f6f0}.bao-alert-success .bao-button.bao-button-tertiary:focus{box-shadow:0 0 0 .1875rem #025d294d}.bao-alert-warning{background-color:#fefae6;border-left:.125rem solid #ffb833;border-top:none;border-right:none;border-bottom:none;color:#6c4600}.bao-alert-warning .bao-alert-title,.bao-alert-warning a{color:#6c4600}.bao-alert-warning a:hover,.bao-alert-warning a:focus{background-color:#fffdf5}.bao-alert-warning .bao-icon svg{fill:#6c4600}.bao-alert-warning .bao-button.bao-button-primary{background-color:#6c4600;border-color:#6c4600}.bao-alert-warning .bao-button.bao-button-primary:hover,.bao-alert-warning .bao-button.bao-button-primary:focus{background-color:#392500;border-color:#392500}.bao-alert-warning .bao-button.bao-button-primary:focus{box-shadow:0 0 0 .1875rem #6c46004d}.bao-alert-warning .bao-button.bao-button-secondary{background-color:#fefae6;color:#6c4600}.bao-alert-warning .bao-button.bao-button-secondary:hover,.bao-alert-warning .bao-button.bao-button-secondary:focus{background-color:#fefae6;border-color:#6c4600}.bao-alert-warning .bao-button.bao-button-secondary:focus{box-shadow:0 0 0 .1875rem #6c46004d}.bao-alert-warning .bao-button.bao-button-tertiary{background-color:#fefae6;color:#6c4600}.bao-alert-warning .bao-button.bao-button-tertiary:hover,.bao-alert-warning .bao-button.bao-button-tertiary:focus{background-color:#fefae6}.bao-alert-warning .bao-button.bao-button-tertiary:focus{box-shadow:0 0 0 .1875rem #6c46004d}.bao-alert-danger{background-color:#ffebe6;border-left:.125rem solid #d3310a;border-top:none;border-right:none;border-bottom:none;color:#851a00}.bao-alert-danger .bao-alert-title,.bao-alert-danger a{color:#851a00}.bao-alert-danger a:hover,.bao-alert-danger a:focus{background-color:#fff7f5}.bao-alert-danger .bao-icon svg{fill:#851a00}.bao-alert-danger .bao-button.bao-button-primary{background-color:#851a00;border-color:#851a00}.bao-alert-danger .bao-button.bao-button-primary:hover,.bao-alert-danger .bao-button.bao-button-primary:focus{background-color:#521000;border-color:#521000}.bao-alert-danger .bao-button.bao-button-primary:focus{box-shadow:0 0 0 .1875rem #851a004d}.bao-alert-danger .bao-button.bao-button-secondary{background-color:#ffebe6;color:#851a00}.bao-alert-danger .bao-button.bao-button-secondary:hover,.bao-alert-danger .bao-button.bao-button-secondary:focus{background-color:#ffebe6;border-color:#851a00}.bao-alert-danger .bao-button.bao-button-secondary:focus{box-shadow:0 0 0 .1875rem #851a004d}.bao-alert-danger .bao-button.bao-button-tertiary{background-color:#ffebe6;color:#851a00}.bao-alert-danger .bao-button.bao-button-tertiary:hover,.bao-alert-danger .bao-button.bao-button-tertiary:focus{background-color:#ffebe6}.bao-alert-danger .bao-button.bao-button-tertiary:focus{box-shadow:0 0 0 .1875rem #851a004d}.bao-alert-emergency{background-color:#ffebe6;border-left:.125rem solid #d3310a;border-top:none;border-right:none;border-bottom:none;color:#851a00}.bao-alert-emergency .bao-alert-title,.bao-alert-emergency a{color:#851a00}.bao-alert-emergency a:hover,.bao-alert-emergency a:focus{background-color:#fff7f5}.bao-alert-emergency .bao-icon svg{fill:#851a00}.bao-alert-emergency .bao-button.bao-button-primary{background-color:#851a00;border-color:#851a00}.bao-alert-emergency .bao-button.bao-button-primary:hover,.bao-alert-emergency .bao-button.bao-button-primary:focus{background-color:#521000;border-color:#521000}.bao-alert-emergency .bao-button.bao-button-primary:focus{box-shadow:0 0 0 .1875rem #851a004d}.bao-alert-emergency .bao-button.bao-button-secondary{background-color:#ffebe6;color:#851a00}.bao-alert-emergency .bao-button.bao-button-secondary:hover,.bao-alert-emergency .bao-button.bao-button-secondary:focus{background-color:#ffebe6;border-color:#851a00}.bao-alert-emergency .bao-button.bao-button-secondary:focus{box-shadow:0 0 0 .1875rem #851a004d}.bao-alert-emergency .bao-button.bao-button-tertiary{background-color:#ffebe6;color:#851a00}.bao-alert-emergency .bao-button.bao-button-tertiary:hover,.bao-alert-emergency .bao-button.bao-button-tertiary:focus{background-color:#ffebe6}.bao-alert-emergency .bao-button.bao-button-tertiary:focus{box-shadow:0 0 0 .1875rem #851a004d}\n"] }]
|
|
645
650
|
}], propDecorators: { type: [{
|
|
646
651
|
type: Input
|
|
647
652
|
}], dismissible: [{
|
|
648
653
|
type: Input
|
|
649
|
-
}], showIcon: [{
|
|
650
|
-
type: Input
|
|
651
654
|
}], dismiss: [{
|
|
652
655
|
type: Output
|
|
653
656
|
}] } });
|
|
@@ -666,8 +669,8 @@ const ALERT_DIRECTIVES = [
|
|
|
666
669
|
];
|
|
667
670
|
class BaoAlertModule {
|
|
668
671
|
}
|
|
669
|
-
BaoAlertModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
670
|
-
BaoAlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
672
|
+
BaoAlertModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
673
|
+
BaoAlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoAlertModule, declarations: [BaoAlertTitle,
|
|
671
674
|
BaoAlertContent,
|
|
672
675
|
BaoAlertActions,
|
|
673
676
|
BaoAlertLink,
|
|
@@ -676,8 +679,8 @@ BaoAlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
676
679
|
BaoAlertActions,
|
|
677
680
|
BaoAlertLink,
|
|
678
681
|
BaoAlertComponent, BaoIconModule, BaoButtonModule] });
|
|
679
|
-
BaoAlertModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
680
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
682
|
+
BaoAlertModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAlertModule, imports: [CommonModule, BaoIconModule, BaoButtonModule, BaoIconModule, BaoButtonModule] });
|
|
683
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAlertModule, decorators: [{
|
|
681
684
|
type: NgModule,
|
|
682
685
|
args: [{
|
|
683
686
|
imports: [CommonModule, BaoIconModule, BaoButtonModule],
|
|
@@ -703,20 +706,20 @@ class BaoBreadcrumbComponent {
|
|
|
703
706
|
constructor(renderer) {
|
|
704
707
|
this.renderer = renderer;
|
|
705
708
|
}
|
|
706
|
-
setLastLinkAttribute() {
|
|
707
|
-
const children = Array.from(this.staticContainer.nativeElement.children);
|
|
708
|
-
this.renderer.setAttribute(children[children.length - 1], Object.keys(LAST_NODE_ATTRIBUTE)[0], Object.values(LAST_NODE_ATTRIBUTE)[0]);
|
|
709
|
-
}
|
|
710
709
|
ngAfterViewInit() {
|
|
711
710
|
this.setLastLinkAttribute();
|
|
712
711
|
}
|
|
713
712
|
onContentChange() {
|
|
714
713
|
this.setLastLinkAttribute();
|
|
715
714
|
}
|
|
715
|
+
setLastLinkAttribute() {
|
|
716
|
+
const children = Array.from(this.staticContainer.nativeElement.children);
|
|
717
|
+
this.renderer.setAttribute(children[children.length - 1], Object.keys(LAST_NODE_ATTRIBUTE)[0], Object.values(LAST_NODE_ATTRIBUTE)[0]);
|
|
718
|
+
}
|
|
716
719
|
}
|
|
717
|
-
BaoBreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
718
|
-
BaoBreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
719
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
720
|
+
BaoBreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBreadcrumbComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
721
|
+
BaoBreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoBreadcrumbComponent, selector: "bao-breadcrumb", host: { classAttribute: "bao-breadcrumb" }, viewQueries: [{ propertyName: "staticContainer", first: true, predicate: ["container"], descendants: true }], ngImport: i0, template: "<nav\n #container\n class=\"bao-breadcrumb-nav\"\n aria-label=\"Breadcrumb\"\n (cdkObserveContent)=\"onContentChange()\"\n>\n <ng-content></ng-content>\n</nav>\n", styles: [".bao-breadcrumb-nav{display:inline-flex;flex-direction:row;flex-wrap:wrap}.bao-breadcrumb-nav>a{font-weight:700;font-size:.75rem;line-height:1rem;display:inline-flex;align-items:end;text-decoration:none;text-transform:uppercase;color:#637381;margin-bottom:.5rem;margin-right:.25rem;border-bottom:none;background-color:#fff0}.bao-breadcrumb-nav>a:hover{color:#097d6c}.bao-breadcrumb-nav>a:last-child{margin-right:0}.bao-breadcrumb-nav>a:last-child:after{content:none}.bao-breadcrumb-nav>a:after{display:inline-block;content:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ADB5BD' fill-rule='evenodd'><path d='M12.586 12L9.293 8.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L12.586 12z'/></svg>\");height:1rem;width:1rem;margin-left:.25rem;color:#637381;background-color:#fff0;cursor:default;flex-shrink:0}\n"], dependencies: [{ kind: "directive", type: i1$2.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
722
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBreadcrumbComponent, decorators: [{
|
|
720
723
|
type: Component,
|
|
721
724
|
args: [{ selector: 'bao-breadcrumb', encapsulation: ViewEncapsulation.None, host: {
|
|
722
725
|
class: 'bao-breadcrumb'
|
|
@@ -734,10 +737,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
734
737
|
const BREADCRUMB_DIRECTIVES = [BaoBreadcrumbComponent];
|
|
735
738
|
class BaoBreadcrumbModule {
|
|
736
739
|
}
|
|
737
|
-
BaoBreadcrumbModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
738
|
-
BaoBreadcrumbModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
739
|
-
BaoBreadcrumbModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
740
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
740
|
+
BaoBreadcrumbModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBreadcrumbModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
741
|
+
BaoBreadcrumbModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoBreadcrumbModule, declarations: [BaoBreadcrumbComponent], imports: [CommonModule, ObserversModule], exports: [BaoBreadcrumbComponent] });
|
|
742
|
+
BaoBreadcrumbModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBreadcrumbModule, imports: [CommonModule, ObserversModule] });
|
|
743
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBreadcrumbModule, decorators: [{
|
|
741
744
|
type: NgModule,
|
|
742
745
|
args: [{
|
|
743
746
|
imports: [CommonModule, ObserversModule],
|
|
@@ -778,9 +781,9 @@ class BaoCardComponent {
|
|
|
778
781
|
this.padding = 'normal';
|
|
779
782
|
}
|
|
780
783
|
}
|
|
781
|
-
BaoCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
782
|
-
BaoCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
783
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
784
|
+
BaoCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
785
|
+
BaoCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoCardComponent, selector: "bao-card, [bao-card], [baoCard]", inputs: { padding: "padding" }, host: { properties: { "class.bao-card-large-padding": "padding === \"large\"" }, classAttribute: "bao-card" }, ngImport: i0, template: "<ng-content select=\"bao-card-header\"></ng-content>\n<ng-content select=\"bao-card-content\"></ng-content>\n", styles: ["ul.cards{padding-left:0}ul.cards>li{display:flex}.bao-card{background-color:#fff;border:.063rem solid #ced4da;border-radius:.25rem;display:block;font-weight:400;margin-bottom:2rem;padding:1rem;text-decoration:none;width:100%}.bao-card:hover,.bao-card:focus{text-decoration:none;background-color:#fff;border:1px solid transparent;box-shadow:0 .5rem 2rem #0000001a}.bao-card:hover .bao-card-content .bao-card-title,.bao-card:focus .bao-card-content .bao-card-title{color:#097d6c}.bao-card:hover>bao-card-header,.bao-card:focus>bao-card-header{color:#097d6c}.bao-card .bao-card-content{display:flex;flex-flow:column}.bao-card .bao-card-content>:last-child{margin-bottom:0}.bao-card .bao-card-content .bao-card-title{font-weight:700;font-size:1.25rem;line-height:1.75rem;color:#000;margin:0 0 1rem}.bao-card .bao-card-content .bao-card-title:last-child{margin-bottom:0}.bao-card .bao-card-content .bao-card-text-interface{line-height:1.5rem;color:#637381}.bao-card>bao-card-header{color:#adb2bd}.bao-card>bao-card-header+bao-card-content{margin-top:1rem}.bao-card.bao-card-large-padding{padding:2rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
786
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCardComponent, decorators: [{
|
|
784
787
|
type: Component,
|
|
785
788
|
args: [{ selector: 'bao-card, [bao-card], [baoCard]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
786
789
|
class: 'bao-card',
|
|
@@ -794,9 +797,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
794
797
|
*/
|
|
795
798
|
class BaoCardHeader {
|
|
796
799
|
}
|
|
797
|
-
BaoCardHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
798
|
-
BaoCardHeader.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
799
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
800
|
+
BaoCardHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCardHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
801
|
+
BaoCardHeader.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoCardHeader, selector: "bao-card-header, [bao-card-header], [baoCardHeader]", host: { classAttribute: "bao-card-header" }, ngImport: i0 });
|
|
802
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCardHeader, decorators: [{
|
|
800
803
|
type: Directive,
|
|
801
804
|
args: [{
|
|
802
805
|
selector: 'bao-card-header, [bao-card-header], [baoCardHeader]',
|
|
@@ -808,9 +811,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
808
811
|
*/
|
|
809
812
|
class BaoCardContent {
|
|
810
813
|
}
|
|
811
|
-
BaoCardContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
812
|
-
BaoCardContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
813
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
814
|
+
BaoCardContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCardContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
815
|
+
BaoCardContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoCardContent, selector: "bao-card-content, [bao-card-content], [baoCardContent]", host: { classAttribute: "bao-card-content" }, ngImport: i0 });
|
|
816
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCardContent, decorators: [{
|
|
814
817
|
type: Directive,
|
|
815
818
|
args: [{
|
|
816
819
|
selector: 'bao-card-content, [bao-card-content], [baoCardContent]',
|
|
@@ -822,9 +825,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
822
825
|
*/
|
|
823
826
|
class BaoCardTitle {
|
|
824
827
|
}
|
|
825
|
-
BaoCardTitle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
826
|
-
BaoCardTitle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
827
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
828
|
+
BaoCardTitle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCardTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
829
|
+
BaoCardTitle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoCardTitle, selector: "bao-card-title, [bao-card-title], [baoCardTitle]", host: { classAttribute: "bao-card-title" }, ngImport: i0 });
|
|
830
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCardTitle, decorators: [{
|
|
828
831
|
type: Directive,
|
|
829
832
|
args: [{
|
|
830
833
|
selector: `bao-card-title, [bao-card-title], [baoCardTitle]`,
|
|
@@ -838,9 +841,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
838
841
|
*/
|
|
839
842
|
class BaoCardTextInterface {
|
|
840
843
|
}
|
|
841
|
-
BaoCardTextInterface.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
842
|
-
BaoCardTextInterface.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
843
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
844
|
+
BaoCardTextInterface.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCardTextInterface, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
845
|
+
BaoCardTextInterface.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoCardTextInterface, selector: "bao-card-text-interface, [bao-card-text-interface], [baoCardTextInterface]", host: { classAttribute: "bao-card-text-interface" }, ngImport: i0 });
|
|
846
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCardTextInterface, decorators: [{
|
|
844
847
|
type: Directive,
|
|
845
848
|
args: [{
|
|
846
849
|
selector: `bao-card-text-interface, [bao-card-text-interface], [baoCardTextInterface]`,
|
|
@@ -864,8 +867,8 @@ const CARD_DIRECTIVES = [
|
|
|
864
867
|
];
|
|
865
868
|
class BaoCardModule {
|
|
866
869
|
}
|
|
867
|
-
BaoCardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
868
|
-
BaoCardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
870
|
+
BaoCardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
871
|
+
BaoCardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoCardModule, declarations: [BaoCardComponent,
|
|
869
872
|
BaoCardContent,
|
|
870
873
|
BaoCardHeader,
|
|
871
874
|
BaoCardTextInterface,
|
|
@@ -874,8 +877,8 @@ BaoCardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
874
877
|
BaoCardHeader,
|
|
875
878
|
BaoCardTextInterface,
|
|
876
879
|
BaoCardTitle] });
|
|
877
|
-
BaoCardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
878
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
880
|
+
BaoCardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCardModule, imports: [CommonModule] });
|
|
881
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCardModule, decorators: [{
|
|
879
882
|
type: NgModule,
|
|
880
883
|
args: [{
|
|
881
884
|
imports: [CommonModule],
|
|
@@ -897,9 +900,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
897
900
|
*/
|
|
898
901
|
class BaoErrorTextComponent {
|
|
899
902
|
}
|
|
900
|
-
BaoErrorTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
901
|
-
BaoErrorTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
902
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
903
|
+
BaoErrorTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoErrorTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
904
|
+
BaoErrorTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoErrorTextComponent, selector: "bao-error, [bao-error]", ngImport: i0, template: '<div class="bao-error"><ng-content></ng-content></div>', isInline: true, styles: [".bao-error{color:#851a00;font-weight:700;font-size:.875rem;line-height:1.25rem}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
905
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoErrorTextComponent, decorators: [{
|
|
903
906
|
type: Component,
|
|
904
907
|
args: [{ selector: 'bao-error, [bao-error]', template: '<div class="bao-error"><ng-content></ng-content></div>', encapsulation: ViewEncapsulation.None, styles: [".bao-error{color:#851a00;font-weight:700;font-size:.875rem;line-height:1.25rem}\n"] }]
|
|
905
908
|
}] });
|
|
@@ -911,9 +914,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
911
914
|
*/
|
|
912
915
|
class BaoGuidingTextComponent {
|
|
913
916
|
}
|
|
914
|
-
BaoGuidingTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
915
|
-
BaoGuidingTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
916
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
917
|
+
BaoGuidingTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoGuidingTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
918
|
+
BaoGuidingTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoGuidingTextComponent, selector: "bao-guiding-text, [bao-guiding-text]", ngImport: i0, template: '<div class="bao-guiding-text"><ng-content></ng-content></div>', isInline: true, styles: [".bao-guiding-text{color:#637381;font-size:.875rem;line-height:1.25rem}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
919
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoGuidingTextComponent, decorators: [{
|
|
917
920
|
type: Component,
|
|
918
921
|
args: [{ selector: 'bao-guiding-text, [bao-guiding-text]', template: '<div class="bao-guiding-text"><ng-content></ng-content></div>', encapsulation: ViewEncapsulation.None, styles: [".bao-guiding-text{color:#637381;font-size:.875rem;line-height:1.25rem}\n"] }]
|
|
919
922
|
}] });
|
|
@@ -928,9 +931,9 @@ class BaoLabelTextComponent {
|
|
|
928
931
|
this.required = false;
|
|
929
932
|
}
|
|
930
933
|
}
|
|
931
|
-
BaoLabelTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
932
|
-
BaoLabelTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
933
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
934
|
+
BaoLabelTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoLabelTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
935
|
+
BaoLabelTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoLabelTextComponent, selector: "bao-label, [bao-label]", inputs: { required: "required" }, host: { classAttribute: "bao-label" }, ngImport: i0, template: '<div class="bao-label"><ng-content></ng-content><span *ngIf="required"> *</span></div>', isInline: true, styles: [".bao-label{color:#212529!important;font-weight:700;line-height:1.5em;font-size:1rem;margin-bottom:0}.bao-label span{color:#d3310a}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
936
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoLabelTextComponent, decorators: [{
|
|
934
937
|
type: Component,
|
|
935
938
|
args: [{ selector: 'bao-label, [bao-label]', encapsulation: ViewEncapsulation.None, template: '<div class="bao-label"><ng-content></ng-content><span *ngIf="required"> *</span></div>', host: { class: 'bao-label' }, styles: [".bao-label{color:#212529!important;font-weight:700;line-height:1.5em;font-size:1rem;margin-bottom:0}.bao-label span{color:#d3310a}\n"] }]
|
|
936
939
|
}], propDecorators: { required: [{
|
|
@@ -944,9 +947,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
944
947
|
*/
|
|
945
948
|
class BaoTitleTextComponent {
|
|
946
949
|
}
|
|
947
|
-
BaoTitleTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
948
|
-
BaoTitleTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
949
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
950
|
+
BaoTitleTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoTitleTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
951
|
+
BaoTitleTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoTitleTextComponent, selector: "bao-title-text, [bao-title-text]", ngImport: i0, template: '<div class="bao-title-text"><ng-content></ng-content></div>', isInline: true, styles: [".bao-title-text{font-weight:700;font-size:1.25rem;line-height:1.75rem;margin:0rem 0rem .5rem 0;color:#212529}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
952
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoTitleTextComponent, decorators: [{
|
|
950
953
|
type: Component,
|
|
951
954
|
args: [{ selector: 'bao-title-text, [bao-title-text]', template: '<div class="bao-title-text"><ng-content></ng-content></div>', encapsulation: ViewEncapsulation.None, styles: [".bao-title-text{font-weight:700;font-size:1.25rem;line-height:1.75rem;margin:0rem 0rem .5rem 0;color:#212529}\n"] }]
|
|
952
955
|
}] });
|
|
@@ -970,16 +973,16 @@ const DIRECTIVES$2 = [
|
|
|
970
973
|
];
|
|
971
974
|
class BaoCommonComponentsModule {
|
|
972
975
|
}
|
|
973
|
-
BaoCommonComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
974
|
-
BaoCommonComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
976
|
+
BaoCommonComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCommonComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
977
|
+
BaoCommonComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoCommonComponentsModule, declarations: [BaoErrorTextComponent,
|
|
975
978
|
BaoGuidingTextComponent,
|
|
976
979
|
BaoLabelTextComponent,
|
|
977
980
|
BaoTitleTextComponent], imports: [CommonModule], exports: [BaoErrorTextComponent,
|
|
978
981
|
BaoGuidingTextComponent,
|
|
979
982
|
BaoLabelTextComponent,
|
|
980
983
|
BaoTitleTextComponent] });
|
|
981
|
-
BaoCommonComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
982
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
984
|
+
BaoCommonComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCommonComponentsModule, imports: [CommonModule] });
|
|
985
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCommonComponentsModule, decorators: [{
|
|
983
986
|
type: NgModule,
|
|
984
987
|
args: [{
|
|
985
988
|
imports: [CommonModule],
|
|
@@ -1000,15 +1003,14 @@ let checkboxGroupNextUniqueId = 0;
|
|
|
1000
1003
|
class BaoCheckboxGroupComponent {
|
|
1001
1004
|
constructor(cdr) {
|
|
1002
1005
|
this.cdr = cdr;
|
|
1003
|
-
this._uniqueId = `bao-checkbox-group-${++checkboxGroupNextUniqueId}`;
|
|
1004
|
-
/**
|
|
1005
|
-
* The checkbox group ID. It is set dynamically with an unique ID by default
|
|
1006
|
-
*/
|
|
1007
|
-
this.id = this._uniqueId;
|
|
1008
1006
|
/**
|
|
1009
1007
|
* The aria-describedby id for web accessibilty
|
|
1010
1008
|
*/
|
|
1011
1009
|
this.ariaDescribedby = undefined;
|
|
1010
|
+
this._uniqueId = `bao-checkbox-group-${++checkboxGroupNextUniqueId}`;
|
|
1011
|
+
if (!this.id) {
|
|
1012
|
+
this.id = this._uniqueId;
|
|
1013
|
+
}
|
|
1012
1014
|
}
|
|
1013
1015
|
ngAfterViewInit() {
|
|
1014
1016
|
this.setAriaDescribedByToDescription();
|
|
@@ -1032,9 +1034,9 @@ class BaoCheckboxGroupComponent {
|
|
|
1032
1034
|
this.ariaDescribedby = value ? `${this.id}-ariadescribedby` : undefined;
|
|
1033
1035
|
}
|
|
1034
1036
|
}
|
|
1035
|
-
BaoCheckboxGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1036
|
-
BaoCheckboxGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1037
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1037
|
+
BaoCheckboxGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCheckboxGroupComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1038
|
+
BaoCheckboxGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoCheckboxGroupComponent, selector: "bao-checkbox-group, [bao-checkbox-group]", inputs: { id: "id" }, viewQueries: [{ propertyName: "staticContainer", first: true, predicate: ["container"], descendants: true }], ngImport: i0, template: "<fieldset\n class=\"bao-checkbox-group\"\n [id]=\"id\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n>\n <ng-content></ng-content>\n <div\n class=\"bao-checkbox-group-description\"\n [attr.id]=\"ariaDescribedby\"\n #container\n (cdkObserveContent)=\"onContentChange()\"\n >\n <ng-content\n select=\"bao-error, [bao-error], bao-guiding-text, [bao-guiding-text]\"\n ></ng-content>\n </div>\n</fieldset>\n", styles: [".bao-checkbox-group .bao-label{margin-bottom:.5rem}.bao-checkbox-group .bao-error,.bao-checkbox-group .bao-guiding-text{margin-top:.5rem}\n"], dependencies: [{ kind: "directive", type: i1$2.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1039
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCheckboxGroupComponent, decorators: [{
|
|
1038
1040
|
type: Component,
|
|
1039
1041
|
args: [{ selector: 'bao-checkbox-group, [bao-checkbox-group]', encapsulation: ViewEncapsulation.None, template: "<fieldset\n class=\"bao-checkbox-group\"\n [id]=\"id\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n>\n <ng-content></ng-content>\n <div\n class=\"bao-checkbox-group-description\"\n [attr.id]=\"ariaDescribedby\"\n #container\n (cdkObserveContent)=\"onContentChange()\"\n >\n <ng-content\n select=\"bao-error, [bao-error], bao-guiding-text, [bao-guiding-text]\"\n ></ng-content>\n </div>\n</fieldset>\n", styles: [".bao-checkbox-group .bao-label{margin-bottom:.5rem}.bao-checkbox-group .bao-error,.bao-checkbox-group .bao-guiding-text{margin-top:.5rem}\n"] }]
|
|
1040
1042
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { id: [{
|
|
@@ -1053,14 +1055,6 @@ class BaoCheckboxComponent {
|
|
|
1053
1055
|
this.elementRef = elementRef;
|
|
1054
1056
|
this.cdr = cdr;
|
|
1055
1057
|
this.focusMonitor = focusMonitor;
|
|
1056
|
-
this._disabled = false;
|
|
1057
|
-
this._checked = false;
|
|
1058
|
-
this._indeterminate = false;
|
|
1059
|
-
this._uniqueId = `bao-checkbox-${++checkboxNextUniqueId}`;
|
|
1060
|
-
/**
|
|
1061
|
-
* The checkbox ID. It is set dynamically with an unique ID by default
|
|
1062
|
-
*/
|
|
1063
|
-
this.id = this._uniqueId;
|
|
1064
1058
|
/**
|
|
1065
1059
|
* Whether the checkbox has a border and is considered as a card.
|
|
1066
1060
|
*/
|
|
@@ -1081,8 +1075,15 @@ class BaoCheckboxComponent {
|
|
|
1081
1075
|
* Inderminate value of the checkbox whenever
|
|
1082
1076
|
*/
|
|
1083
1077
|
this.indeterminateChange = new EventEmitter();
|
|
1078
|
+
this._disabled = false;
|
|
1079
|
+
this._checked = false;
|
|
1080
|
+
this._indeterminate = false;
|
|
1081
|
+
this._uniqueId = `bao-checkbox-${++checkboxNextUniqueId}`;
|
|
1084
1082
|
this.onModelChange = () => undefined;
|
|
1085
1083
|
this.onTouch = () => undefined;
|
|
1084
|
+
if (!this.id) {
|
|
1085
|
+
this.id = this._uniqueId;
|
|
1086
|
+
}
|
|
1086
1087
|
}
|
|
1087
1088
|
/**
|
|
1088
1089
|
* Whether the checkbox is checked. Default value : false
|
|
@@ -1090,41 +1091,44 @@ class BaoCheckboxComponent {
|
|
|
1090
1091
|
get checked() {
|
|
1091
1092
|
return this._checked;
|
|
1092
1093
|
}
|
|
1093
|
-
set checked(value) {
|
|
1094
|
-
if (value !== this.checked) {
|
|
1095
|
-
this._checked = value;
|
|
1096
|
-
this.cdr.markForCheck();
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
1094
|
/**
|
|
1100
1095
|
* Whether the checkbox is disabled. Default value : false
|
|
1101
1096
|
*/
|
|
1102
1097
|
get disabled() {
|
|
1103
1098
|
return this._disabled;
|
|
1104
1099
|
}
|
|
1105
|
-
set disabled(value) {
|
|
1106
|
-
// In the case the value is string or boolean
|
|
1107
|
-
const newValue = value;
|
|
1108
|
-
if (newValue !== this.disabled) {
|
|
1109
|
-
this._disabled = newValue;
|
|
1110
|
-
this.cdr.markForCheck();
|
|
1111
|
-
}
|
|
1112
|
-
}
|
|
1113
1100
|
/**
|
|
1114
1101
|
* Whether the checkbox is required. Default value : false
|
|
1115
1102
|
*/
|
|
1116
1103
|
get required() {
|
|
1117
1104
|
return this._required;
|
|
1118
1105
|
}
|
|
1119
|
-
set required(value) {
|
|
1120
|
-
this._required = value;
|
|
1121
|
-
}
|
|
1122
1106
|
/**
|
|
1123
1107
|
* Whether the checkbox is indeterminate. Default value : false
|
|
1124
1108
|
*/
|
|
1125
1109
|
get indeterminate() {
|
|
1126
1110
|
return this._indeterminate;
|
|
1127
1111
|
}
|
|
1112
|
+
get nativeElement() {
|
|
1113
|
+
return this.elementRef.nativeElement;
|
|
1114
|
+
}
|
|
1115
|
+
set checked(value) {
|
|
1116
|
+
if (value !== this.checked) {
|
|
1117
|
+
this._checked = value;
|
|
1118
|
+
this.cdr.markForCheck();
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
set disabled(value) {
|
|
1122
|
+
// In the case the value is string or boolean
|
|
1123
|
+
const newValue = value;
|
|
1124
|
+
if (newValue !== this.disabled) {
|
|
1125
|
+
this._disabled = newValue;
|
|
1126
|
+
this.cdr.markForCheck();
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
set required(value) {
|
|
1130
|
+
this._required = value;
|
|
1131
|
+
}
|
|
1128
1132
|
set indeterminate(value) {
|
|
1129
1133
|
const newValue = value;
|
|
1130
1134
|
if (newValue !== this._indeterminate) {
|
|
@@ -1134,9 +1138,6 @@ class BaoCheckboxComponent {
|
|
|
1134
1138
|
// Update the inderteminate value of the html element object
|
|
1135
1139
|
this.syncIndeterminate(this._indeterminate);
|
|
1136
1140
|
}
|
|
1137
|
-
get nativeElement() {
|
|
1138
|
-
return this.elementRef.nativeElement;
|
|
1139
|
-
}
|
|
1140
1141
|
ngOnInit() {
|
|
1141
1142
|
// Set all unique ids for the html elements
|
|
1142
1143
|
this.inputID = `${this.id}-input`;
|
|
@@ -1278,15 +1279,15 @@ class BaoCheckboxComponent {
|
|
|
1278
1279
|
this.checked = !this.checked;
|
|
1279
1280
|
}
|
|
1280
1281
|
}
|
|
1281
|
-
BaoCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1282
|
-
BaoCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1282
|
+
BaoCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCheckboxComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$3.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component });
|
|
1283
|
+
BaoCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoCheckboxComponent, selector: "bao-checkbox, [bao-checkbox]", inputs: { id: "id", ariaLabel: ["aria-label", "ariaLabel"], brandBorder: "brandBorder", inline: "inline", name: "name", hiddenLabel: "hiddenLabel", checked: "checked", disabled: "disabled", required: "required", indeterminate: "indeterminate" }, outputs: { change: "change", indeterminateChange: "indeterminateChange" }, host: { properties: { "class.bao-checkbox-inline": "inline", "class.bao-checkbox-checked": "checked", "class.bao-checkbox-indeterminate": "indeterminate", "class.bao-checkbox-disabled": "disabled", "class.bao-checkbox-card": "brandBorder", "class.bao-checkbox-required": "required", "class.bao-checkbox-hidden-label": "hiddenLabel" }, classAttribute: "bao-checkbox" }, providers: [
|
|
1283
1284
|
{
|
|
1284
1285
|
provide: NG_VALUE_ACCESSOR,
|
|
1285
1286
|
useExisting: forwardRef(() => BaoCheckboxComponent),
|
|
1286
1287
|
multi: true
|
|
1287
1288
|
}
|
|
1288
|
-
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<input\n #input\n type=\"checkbox\"\n [id]=\"inputID\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [attr.name]=\"name\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-checked]=\"getAriaState()\"\n (change)=\"onInteractionEvent($event)\"\n (click)=\"onInputClick($event)\"\n role=\"checkbox\"\n/>\n<label class=\"bao-checkbox-content-container\" [attr.for]=\"inputID\">\n <div class=\"bao-checkbox-label\" [id]=\"ariaLabelledby\">\n <ng-content></ng-content>\n </div>\n <ng-content\n select=\"bao-checkbox-description, [bao-checkbox-description], [baoCheckboxDescription]\"\n ></ng-content>\n</label>\n", styles: [".bao-checkbox{display:block;font-size:1rem;line-height:1.5rem;min-height:1.5rem;padding-top:.5rem;padding-bottom:.5rem;padding-left:2rem;position:relative;z-index:1}.bao-checkbox input{box-sizing:border-box;left:0;opacity:0;overflow:visible;padding:0;position:absolute;z-index:-1}.bao-checkbox input:focus~.bao-checkbox-content-container:before{box-shadow:0 0 0 .1875rem #0079c480}.bao-checkbox label.bao-checkbox-content-container{color:#212529;font-weight:400;font-size:1rem;line-height:1.5rem;margin-bottom:0;position:relative;vertical-align:top}.bao-checkbox label.bao-checkbox-content-container:before{border-radius:.125rem;box-sizing:border-box;position:absolute;top:0;left:-2rem;display:block;margin:.125rem;width:1.25rem;height:1.25rem;pointer-events:none;content:\"\";background-color:#fff;border:#ced4da solid 1px;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.bao-checkbox label.bao-checkbox-content-container:after{box-sizing:border-box;background:no-repeat 50%/1.5rem;content:\"\";display:block;height:1.5rem;left:-2rem;margin:0;position:absolute;top:0;width:1.5rem}.bao-checkbox label.bao-checkbox-content-container .bao-checkbox-label{color:#212529;display:block}.bao-checkbox label.bao-checkbox-content-container .bao-checkbox-description{color:#637381;display:block;margin-top:.5rem}.bao-checkbox.bao-checkbox-inline{display:inline-flex;margin-right:1rem}.bao-checkbox.bao-checkbox-card{padding:0;margin-bottom:1rem}.bao-checkbox.bao-checkbox-card:last-of-type{margin-bottom:0}.bao-checkbox.bao-checkbox-card label.bao-checkbox-content-container{display:flex;flex-direction:column;flex:1;justify-content:center;padding:1rem 1rem 1rem 3.5rem;position:relative;border:1px solid #ced4da;border-radius:.25rem;color:#637381;min-height:3.5rem}.bao-checkbox.bao-checkbox-card label.bao-checkbox-content-container:before{top:1rem;left:0;margin-left:1.125rem}.bao-checkbox.bao-checkbox-card label.bao-checkbox-content-container:after{top:1rem;left:0;margin-left:1rem}.bao-checkbox.bao-checkbox-indeterminate .bao-checkbox-content-container:after{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23097d6c' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e\")}.bao-checkbox input:checked~.bao-checkbox-content-container:before{border-color:#097d6c;background-color:#097d6c}.bao-checkbox input:checked~.bao-checkbox-content-container:after{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath fill='%23ffffff' d='M16.7 8.3C17.1 8.7 17.1 9.3 16.7 9.7L10.7 15.7 10.7 15.7C10.6 15.9 10.4 15.9 10.2 16L10.1 16 10.1 16 9.9 16C9.7 16 9.5 15.9 9.3 15.7L7.3 13.7C6.9 13.3 6.9 12.7 7.3 12.3 7.7 11.9 8.3 11.9 8.7 12.3L10 13.6 15.3 8.3C15.7 7.9 16.3 7.9 16.7 8.3Z'/%3e%3c/svg%3e\")}.bao-checkbox input:disabled~.bao-checkbox-content-container{color:#adb2bd;border-color:#dee2e6}.bao-checkbox input:disabled~.bao-checkbox-content-container:before{border-color:#ced4da;background-color:#ced4da}.bao-checkbox input:disabled~.bao-checkbox-content-container .bao-checkbox-label,.bao-checkbox input:disabled~.bao-checkbox-content-container .bao-checkbox-description{color:#adb2bd}.bao-checkbox.bao-checkbox-hidden-label .bao-checkbox-label{clip:rect(1px,1px,1px,1px)
|
|
1289
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1289
|
+
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<input\n #input\n type=\"checkbox\"\n [id]=\"inputID\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [attr.name]=\"name\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-checked]=\"getAriaState()\"\n (change)=\"onInteractionEvent($event)\"\n (click)=\"onInputClick($event)\"\n role=\"checkbox\"\n/>\n<label class=\"bao-checkbox-content-container\" [attr.for]=\"inputID\">\n <div class=\"bao-checkbox-label\" [id]=\"ariaLabelledby\">\n <ng-content></ng-content>\n </div>\n <ng-content\n select=\"bao-checkbox-description, [bao-checkbox-description], [baoCheckboxDescription]\"\n ></ng-content>\n</label>\n", styles: [".bao-checkbox{display:block;font-size:1rem;line-height:1.5rem;min-height:1.5rem;padding-top:.5rem;padding-bottom:.5rem;padding-left:2rem;position:relative;z-index:1}.bao-checkbox input{box-sizing:border-box;left:0;opacity:0;overflow:visible;padding:0;position:absolute;z-index:-1}.bao-checkbox input:focus~.bao-checkbox-content-container:before{box-shadow:0 0 0 .1875rem #0079c480}.bao-checkbox label.bao-checkbox-content-container{color:#212529;font-weight:400;font-size:1rem;line-height:1.5rem;margin-bottom:0;position:relative;vertical-align:top}.bao-checkbox label.bao-checkbox-content-container:before{border-radius:.125rem;box-sizing:border-box;position:absolute;top:0;left:-2rem;display:block;margin:.125rem;width:1.25rem;height:1.25rem;pointer-events:none;content:\"\";background-color:#fff;border:#ced4da solid 1px;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.bao-checkbox label.bao-checkbox-content-container:after{box-sizing:border-box;background:no-repeat 50%/1.5rem;content:\"\";display:block;height:1.5rem;left:-2rem;margin:0;position:absolute;top:0;width:1.5rem}.bao-checkbox label.bao-checkbox-content-container .bao-checkbox-label{color:#212529;display:block}.bao-checkbox label.bao-checkbox-content-container .bao-checkbox-description{color:#637381;display:block;margin-top:.5rem}.bao-checkbox.bao-checkbox-inline{display:inline-flex;margin-right:1rem}.bao-checkbox.bao-checkbox-card{padding:0;margin-bottom:1rem}.bao-checkbox.bao-checkbox-card:last-of-type{margin-bottom:0}.bao-checkbox.bao-checkbox-card label.bao-checkbox-content-container{display:flex;flex-direction:column;flex:1;justify-content:center;padding:1rem 1rem 1rem 3.5rem;position:relative;border:1px solid #ced4da;border-radius:.25rem;color:#637381;min-height:3.5rem}.bao-checkbox.bao-checkbox-card label.bao-checkbox-content-container:before{top:1rem;left:0;margin-left:1.125rem}.bao-checkbox.bao-checkbox-card label.bao-checkbox-content-container:after{top:1rem;left:0;margin-left:1rem}.bao-checkbox.bao-checkbox-indeterminate .bao-checkbox-content-container:after{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23097d6c' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e\")}.bao-checkbox input:checked~.bao-checkbox-content-container:before{border-color:#097d6c;background-color:#097d6c}.bao-checkbox input:checked~.bao-checkbox-content-container:after{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath fill='%23ffffff' d='M16.7 8.3C17.1 8.7 17.1 9.3 16.7 9.7L10.7 15.7 10.7 15.7C10.6 15.9 10.4 15.9 10.2 16L10.1 16 10.1 16 9.9 16C9.7 16 9.5 15.9 9.3 15.7L7.3 13.7C6.9 13.3 6.9 12.7 7.3 12.3 7.7 11.9 8.3 11.9 8.7 12.3L10 13.6 15.3 8.3C15.7 7.9 16.3 7.9 16.7 8.3Z'/%3e%3c/svg%3e\")}.bao-checkbox input:disabled~.bao-checkbox-content-container{color:#adb2bd;border-color:#dee2e6}.bao-checkbox input:disabled~.bao-checkbox-content-container:before{border-color:#ced4da;background-color:#ced4da}.bao-checkbox input:disabled~.bao-checkbox-content-container .bao-checkbox-label,.bao-checkbox input:disabled~.bao-checkbox-content-container .bao-checkbox-description{color:#adb2bd}.bao-checkbox.bao-checkbox-hidden-label .bao-checkbox-label{clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}.bao-checkbox.bao-checkbox-hidden-label label.bao-checkbox-content-container .bao-checkbox-description{margin-top:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1290
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCheckboxComponent, decorators: [{
|
|
1290
1291
|
type: Component,
|
|
1291
1292
|
args: [{ selector: 'bao-checkbox, [bao-checkbox]', providers: [
|
|
1292
1293
|
{
|
|
@@ -1303,16 +1304,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1303
1304
|
'[class.bao-checkbox-card]': 'brandBorder',
|
|
1304
1305
|
'[class.bao-checkbox-required]': 'required',
|
|
1305
1306
|
'[class.bao-checkbox-hidden-label]': 'hiddenLabel'
|
|
1306
|
-
}, template: "<input\n #input\n type=\"checkbox\"\n [id]=\"inputID\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [attr.name]=\"name\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-checked]=\"getAriaState()\"\n (change)=\"onInteractionEvent($event)\"\n (click)=\"onInputClick($event)\"\n role=\"checkbox\"\n/>\n<label class=\"bao-checkbox-content-container\" [attr.for]=\"inputID\">\n <div class=\"bao-checkbox-label\" [id]=\"ariaLabelledby\">\n <ng-content></ng-content>\n </div>\n <ng-content\n select=\"bao-checkbox-description, [bao-checkbox-description], [baoCheckboxDescription]\"\n ></ng-content>\n</label>\n", styles: [".bao-checkbox{display:block;font-size:1rem;line-height:1.5rem;min-height:1.5rem;padding-top:.5rem;padding-bottom:.5rem;padding-left:2rem;position:relative;z-index:1}.bao-checkbox input{box-sizing:border-box;left:0;opacity:0;overflow:visible;padding:0;position:absolute;z-index:-1}.bao-checkbox input:focus~.bao-checkbox-content-container:before{box-shadow:0 0 0 .1875rem #0079c480}.bao-checkbox label.bao-checkbox-content-container{color:#212529;font-weight:400;font-size:1rem;line-height:1.5rem;margin-bottom:0;position:relative;vertical-align:top}.bao-checkbox label.bao-checkbox-content-container:before{border-radius:.125rem;box-sizing:border-box;position:absolute;top:0;left:-2rem;display:block;margin:.125rem;width:1.25rem;height:1.25rem;pointer-events:none;content:\"\";background-color:#fff;border:#ced4da solid 1px;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.bao-checkbox label.bao-checkbox-content-container:after{box-sizing:border-box;background:no-repeat 50%/1.5rem;content:\"\";display:block;height:1.5rem;left:-2rem;margin:0;position:absolute;top:0;width:1.5rem}.bao-checkbox label.bao-checkbox-content-container .bao-checkbox-label{color:#212529;display:block}.bao-checkbox label.bao-checkbox-content-container .bao-checkbox-description{color:#637381;display:block;margin-top:.5rem}.bao-checkbox.bao-checkbox-inline{display:inline-flex;margin-right:1rem}.bao-checkbox.bao-checkbox-card{padding:0;margin-bottom:1rem}.bao-checkbox.bao-checkbox-card:last-of-type{margin-bottom:0}.bao-checkbox.bao-checkbox-card label.bao-checkbox-content-container{display:flex;flex-direction:column;flex:1;justify-content:center;padding:1rem 1rem 1rem 3.5rem;position:relative;border:1px solid #ced4da;border-radius:.25rem;color:#637381;min-height:3.5rem}.bao-checkbox.bao-checkbox-card label.bao-checkbox-content-container:before{top:1rem;left:0;margin-left:1.125rem}.bao-checkbox.bao-checkbox-card label.bao-checkbox-content-container:after{top:1rem;left:0;margin-left:1rem}.bao-checkbox.bao-checkbox-indeterminate .bao-checkbox-content-container:after{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23097d6c' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e\")}.bao-checkbox input:checked~.bao-checkbox-content-container:before{border-color:#097d6c;background-color:#097d6c}.bao-checkbox input:checked~.bao-checkbox-content-container:after{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath fill='%23ffffff' d='M16.7 8.3C17.1 8.7 17.1 9.3 16.7 9.7L10.7 15.7 10.7 15.7C10.6 15.9 10.4 15.9 10.2 16L10.1 16 10.1 16 9.9 16C9.7 16 9.5 15.9 9.3 15.7L7.3 13.7C6.9 13.3 6.9 12.7 7.3 12.3 7.7 11.9 8.3 11.9 8.7 12.3L10 13.6 15.3 8.3C15.7 7.9 16.3 7.9 16.7 8.3Z'/%3e%3c/svg%3e\")}.bao-checkbox input:disabled~.bao-checkbox-content-container{color:#adb2bd;border-color:#dee2e6}.bao-checkbox input:disabled~.bao-checkbox-content-container:before{border-color:#ced4da;background-color:#ced4da}.bao-checkbox input:disabled~.bao-checkbox-content-container .bao-checkbox-label,.bao-checkbox input:disabled~.bao-checkbox-content-container .bao-checkbox-description{color:#adb2bd}.bao-checkbox.bao-checkbox-hidden-label .bao-checkbox-label{clip:rect(1px,1px,1px,1px)
|
|
1307
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$3.FocusMonitor }]; }, propDecorators: {
|
|
1308
|
-
type: Input
|
|
1309
|
-
}], disabled: [{
|
|
1310
|
-
type: Input
|
|
1311
|
-
}], required: [{
|
|
1312
|
-
type: Input
|
|
1313
|
-
}], indeterminate: [{
|
|
1314
|
-
type: Input
|
|
1315
|
-
}], id: [{
|
|
1307
|
+
}, template: "<input\n #input\n type=\"checkbox\"\n [id]=\"inputID\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [attr.name]=\"name\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-checked]=\"getAriaState()\"\n (change)=\"onInteractionEvent($event)\"\n (click)=\"onInputClick($event)\"\n role=\"checkbox\"\n/>\n<label class=\"bao-checkbox-content-container\" [attr.for]=\"inputID\">\n <div class=\"bao-checkbox-label\" [id]=\"ariaLabelledby\">\n <ng-content></ng-content>\n </div>\n <ng-content\n select=\"bao-checkbox-description, [bao-checkbox-description], [baoCheckboxDescription]\"\n ></ng-content>\n</label>\n", styles: [".bao-checkbox{display:block;font-size:1rem;line-height:1.5rem;min-height:1.5rem;padding-top:.5rem;padding-bottom:.5rem;padding-left:2rem;position:relative;z-index:1}.bao-checkbox input{box-sizing:border-box;left:0;opacity:0;overflow:visible;padding:0;position:absolute;z-index:-1}.bao-checkbox input:focus~.bao-checkbox-content-container:before{box-shadow:0 0 0 .1875rem #0079c480}.bao-checkbox label.bao-checkbox-content-container{color:#212529;font-weight:400;font-size:1rem;line-height:1.5rem;margin-bottom:0;position:relative;vertical-align:top}.bao-checkbox label.bao-checkbox-content-container:before{border-radius:.125rem;box-sizing:border-box;position:absolute;top:0;left:-2rem;display:block;margin:.125rem;width:1.25rem;height:1.25rem;pointer-events:none;content:\"\";background-color:#fff;border:#ced4da solid 1px;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.bao-checkbox label.bao-checkbox-content-container:after{box-sizing:border-box;background:no-repeat 50%/1.5rem;content:\"\";display:block;height:1.5rem;left:-2rem;margin:0;position:absolute;top:0;width:1.5rem}.bao-checkbox label.bao-checkbox-content-container .bao-checkbox-label{color:#212529;display:block}.bao-checkbox label.bao-checkbox-content-container .bao-checkbox-description{color:#637381;display:block;margin-top:.5rem}.bao-checkbox.bao-checkbox-inline{display:inline-flex;margin-right:1rem}.bao-checkbox.bao-checkbox-card{padding:0;margin-bottom:1rem}.bao-checkbox.bao-checkbox-card:last-of-type{margin-bottom:0}.bao-checkbox.bao-checkbox-card label.bao-checkbox-content-container{display:flex;flex-direction:column;flex:1;justify-content:center;padding:1rem 1rem 1rem 3.5rem;position:relative;border:1px solid #ced4da;border-radius:.25rem;color:#637381;min-height:3.5rem}.bao-checkbox.bao-checkbox-card label.bao-checkbox-content-container:before{top:1rem;left:0;margin-left:1.125rem}.bao-checkbox.bao-checkbox-card label.bao-checkbox-content-container:after{top:1rem;left:0;margin-left:1rem}.bao-checkbox.bao-checkbox-indeterminate .bao-checkbox-content-container:after{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23097d6c' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e\")}.bao-checkbox input:checked~.bao-checkbox-content-container:before{border-color:#097d6c;background-color:#097d6c}.bao-checkbox input:checked~.bao-checkbox-content-container:after{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath fill='%23ffffff' d='M16.7 8.3C17.1 8.7 17.1 9.3 16.7 9.7L10.7 15.7 10.7 15.7C10.6 15.9 10.4 15.9 10.2 16L10.1 16 10.1 16 9.9 16C9.7 16 9.5 15.9 9.3 15.7L7.3 13.7C6.9 13.3 6.9 12.7 7.3 12.3 7.7 11.9 8.3 11.9 8.7 12.3L10 13.6 15.3 8.3C15.7 7.9 16.3 7.9 16.7 8.3Z'/%3e%3c/svg%3e\")}.bao-checkbox input:disabled~.bao-checkbox-content-container{color:#adb2bd;border-color:#dee2e6}.bao-checkbox input:disabled~.bao-checkbox-content-container:before{border-color:#ced4da;background-color:#ced4da}.bao-checkbox input:disabled~.bao-checkbox-content-container .bao-checkbox-label,.bao-checkbox input:disabled~.bao-checkbox-content-container .bao-checkbox-description{color:#adb2bd}.bao-checkbox.bao-checkbox-hidden-label .bao-checkbox-label{clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}.bao-checkbox.bao-checkbox-hidden-label label.bao-checkbox-content-container .bao-checkbox-description{margin-top:0}\n"] }]
|
|
1308
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$3.FocusMonitor }]; }, propDecorators: { id: [{
|
|
1316
1309
|
type: Input
|
|
1317
1310
|
}], ariaLabel: [{
|
|
1318
1311
|
type: Input,
|
|
@@ -1332,12 +1325,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1332
1325
|
}], inputElement: [{
|
|
1333
1326
|
type: ViewChild,
|
|
1334
1327
|
args: ['input', { static: false }]
|
|
1328
|
+
}], checked: [{
|
|
1329
|
+
type: Input
|
|
1330
|
+
}], disabled: [{
|
|
1331
|
+
type: Input
|
|
1332
|
+
}], required: [{
|
|
1333
|
+
type: Input
|
|
1334
|
+
}], indeterminate: [{
|
|
1335
|
+
type: Input
|
|
1335
1336
|
}] } });
|
|
1336
1337
|
class BaoCheckBoxDescription {
|
|
1337
1338
|
}
|
|
1338
|
-
BaoCheckBoxDescription.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1339
|
-
BaoCheckBoxDescription.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1340
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1339
|
+
BaoCheckBoxDescription.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCheckBoxDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1340
|
+
BaoCheckBoxDescription.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoCheckBoxDescription, selector: "bao-checkbox-description, [bao-checkbox-description], [baoCheckboxDescription]", host: { classAttribute: "bao-checkbox-description" }, ngImport: i0 });
|
|
1341
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCheckBoxDescription, decorators: [{
|
|
1341
1342
|
type: Directive,
|
|
1342
1343
|
args: [{
|
|
1343
1344
|
selector: 'bao-checkbox-description, [bao-checkbox-description], [baoCheckboxDescription]',
|
|
@@ -1357,14 +1358,14 @@ const CHECKBOX_DIRECTIVES = [
|
|
|
1357
1358
|
];
|
|
1358
1359
|
class BaoCheckboxModule {
|
|
1359
1360
|
}
|
|
1360
|
-
BaoCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1361
|
-
BaoCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
1361
|
+
BaoCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1362
|
+
BaoCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoCheckboxModule, declarations: [BaoCheckboxComponent,
|
|
1362
1363
|
BaoCheckboxGroupComponent,
|
|
1363
1364
|
BaoCheckBoxDescription], imports: [CommonModule, BaoCommonComponentsModule, ObserversModule], exports: [BaoCheckboxComponent,
|
|
1364
1365
|
BaoCheckboxGroupComponent,
|
|
1365
1366
|
BaoCheckBoxDescription] });
|
|
1366
|
-
BaoCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1367
|
+
BaoCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCheckboxModule, imports: [CommonModule, BaoCommonComponentsModule, ObserversModule] });
|
|
1368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoCheckboxModule, decorators: [{
|
|
1368
1369
|
type: NgModule,
|
|
1369
1370
|
args: [{
|
|
1370
1371
|
imports: [CommonModule, BaoCommonComponentsModule, ObserversModule],
|
|
@@ -1402,9 +1403,9 @@ class BaoHeaderInfoComponent {
|
|
|
1402
1403
|
this.brandBorder = false;
|
|
1403
1404
|
}
|
|
1404
1405
|
}
|
|
1405
|
-
BaoHeaderInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1406
|
-
BaoHeaderInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1407
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1406
|
+
BaoHeaderInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoHeaderInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1407
|
+
BaoHeaderInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoHeaderInfoComponent, selector: "bao-header-info", inputs: { notch: "notch", imageUrl: "imageUrl", brandBorder: "brandBorder" }, host: { properties: { "class.document-heading-left-notch": "notch === \"left\"" }, classAttribute: "bao-document-heading" }, ngImport: i0, template: "<div *ngIf=\"imageUrl\" class=\"document-heading-image-container\">\n <div\n [ngStyle]=\"{\n 'background-image': 'url(\\'' + imageUrl + '\\')'}\"\n class=\"document-heading-background\"\n ></div>\n</div>\n\n<div class=\"bao-container document-heading-header-container\">\n <div class=\"bao-row document-heading-header\">\n <div class=\"bao-col-12 bao-col-lg-7\">\n <ng-content select=\"bao-header-info-title-group\"></ng-content>\n <div class=\"bao-header-content\">\n <ng-content></ng-content>\n </div>\n <div *ngIf=\"brandBorder\" class=\"brand-border-bottom\"></div>\n </div>\n </div>\n <div *ngIf=\"notch\" class=\"document-heading-wrapper notch\">\n <div class=\"document-heading-content-wrapper\">\n <div class=\"document-heading-content\"></div>\n </div>\n </div>\n</div>\n", styles: [".bao-container{padding-right:16px;padding-left:16px;margin-right:auto;margin-left:auto;width:100%}@media (min-width: 576px){.bao-container{max-width:576px}}@media (min-width: 768px){.bao-container{max-width:768px}}@media (min-width: 992px){.bao-container{max-width:992px}}@media (min-width: 1200px){.bao-container{max-width:1200px}}.bao-row{display:flex;flex-wrap:wrap;margin-right:-16px;margin-left:-16px}.bao-col-12,.bao-col-lg-7{position:relative;width:100%;padding-right:1rem;padding-left:1rem}@media (min-width: 992px){.bao-col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}}.bao-header-info-title-group,.bao-header-info-content,.document-heading-subtitle,.document-heading-surtitle{display:block}.document-heading-header-container{position:relative!important}.bao-document-heading{display:block;padding:2rem 0;position:relative;width:100%}.bao-document-heading .document-heading-title{font-weight:700;color:#212529;font-size:2rem;line-height:2.5rem;margin-bottom:0}.bao-document-heading .document-heading-surtitle{font-weight:700;font-size:1rem;line-height:1.5rem;margin-bottom:1rem;color:#212529}.bao-document-heading .document-heading-subtitle{font-weight:400;font-size:1rem;line-height:1.5rem;color:#000}.bao-document-heading .bao-header-info-title-group>*:not(:first-child){margin-top:1rem}.bao-document-heading .bao-header-content:not(:empty){margin-top:2rem}.bao-document-heading .brand-border-bottom{margin-top:2rem}.bao-document-heading .document-heading-background{background-color:#f8f9fa;background-position:center center;background-repeat:no-repeat;background-size:cover;height:100%;overflow:hidden;position:absolute;top:0;width:100%;z-index:0}.bao-document-heading .document-heading-content{background-color:#fff;height:2rem;padding-left:1rem;padding-right:1rem;position:relative;bottom:-2rem}@media (min-width: 768px){.bao-document-heading .document-heading-title{font-weight:700;color:#212529;font-size:2.5rem;line-height:3.5rem}.bao-document-heading .document-heading-surtitle{font-weight:700;font-size:1.25rem;line-height:1.75rem;margin-bottom:1rem;color:#212529}.bao-document-heading .document-heading-subtitle{font-weight:400;font-size:1.25rem;line-height:1.75rem;color:#000}}@media (min-width: 992px){.bao-document-heading{padding-top:4rem;padding-bottom:4rem}.bao-document-heading .document-heading-content{bottom:-4rem;height:3.5rem;margin:auto}.bao-document-heading.document-heading-left-notch .document-heading-content{max-width:66.66667%;margin:0}.bao-document-heading.document-heading-left-notch .document-heading-content:before{content:\"\";background:#ffffff;width:1000px;height:100%;position:absolute;left:-1000px}.bao-document-heading.document-heading-left-notch .document-heading-content:after{content:\"\";background:#ffffff;width:1rem;height:100%;position:absolute}}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1408
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoHeaderInfoComponent, decorators: [{
|
|
1408
1409
|
type: Component,
|
|
1409
1410
|
args: [{ selector: 'bao-header-info', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1410
1411
|
class: 'bao-document-heading',
|
|
@@ -1419,9 +1420,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1419
1420
|
}] } });
|
|
1420
1421
|
class BaoHeaderInfoTitleGroupComponent {
|
|
1421
1422
|
}
|
|
1422
|
-
BaoHeaderInfoTitleGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1423
|
-
BaoHeaderInfoTitleGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1424
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1423
|
+
BaoHeaderInfoTitleGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoHeaderInfoTitleGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1424
|
+
BaoHeaderInfoTitleGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoHeaderInfoTitleGroupComponent, selector: "bao-header-info-title-group", host: { classAttribute: "bao-header-info-title-group" }, ngImport: i0, template: "<ng-content></ng-content>\n<ng-content\n select=\"bao-header-surtitle, [bao-header-surtitle], [baoHeaderSurtitle], \n bao-header-title, [bao-header-title], [baoHeaderTitle],\n bao-header-subtitle, [bao-header-subtitle], [baoHeaderSubtitle]\"\n></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1425
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoHeaderInfoTitleGroupComponent, decorators: [{
|
|
1425
1426
|
type: Component,
|
|
1426
1427
|
args: [{ selector: 'bao-header-info-title-group', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1427
1428
|
class: 'bao-header-info-title-group'
|
|
@@ -1429,9 +1430,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1429
1430
|
}] });
|
|
1430
1431
|
class BaoHeaderInfoContent {
|
|
1431
1432
|
}
|
|
1432
|
-
BaoHeaderInfoContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1433
|
-
BaoHeaderInfoContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1434
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1433
|
+
BaoHeaderInfoContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoHeaderInfoContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1434
|
+
BaoHeaderInfoContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoHeaderInfoContent, selector: "bao-header-info-content", host: { classAttribute: "bao-header-info-content" }, ngImport: i0 });
|
|
1435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoHeaderInfoContent, decorators: [{
|
|
1435
1436
|
type: Directive,
|
|
1436
1437
|
args: [{
|
|
1437
1438
|
selector: 'bao-header-info-content',
|
|
@@ -1442,9 +1443,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1442
1443
|
}] });
|
|
1443
1444
|
class BaoHeaderInfoSurtitle {
|
|
1444
1445
|
}
|
|
1445
|
-
BaoHeaderInfoSurtitle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1446
|
-
BaoHeaderInfoSurtitle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1447
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1446
|
+
BaoHeaderInfoSurtitle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoHeaderInfoSurtitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1447
|
+
BaoHeaderInfoSurtitle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoHeaderInfoSurtitle, selector: "bao-header-info-surtitle, [bao-header-info-surtitle], [baoHeaderInfoSurtitle]", host: { classAttribute: "document-heading-surtitle" }, ngImport: i0 });
|
|
1448
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoHeaderInfoSurtitle, decorators: [{
|
|
1448
1449
|
type: Directive,
|
|
1449
1450
|
args: [{
|
|
1450
1451
|
selector: 'bao-header-info-surtitle, [bao-header-info-surtitle], [baoHeaderInfoSurtitle]',
|
|
@@ -1455,9 +1456,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1455
1456
|
}] });
|
|
1456
1457
|
class BaoHeaderInfoSubtitle {
|
|
1457
1458
|
}
|
|
1458
|
-
BaoHeaderInfoSubtitle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1459
|
-
BaoHeaderInfoSubtitle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1460
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1459
|
+
BaoHeaderInfoSubtitle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoHeaderInfoSubtitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1460
|
+
BaoHeaderInfoSubtitle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoHeaderInfoSubtitle, selector: "bao-header-info-subtitle, [bao-header-info-subtitle], [baoHeaderInfoSubtitle]", host: { classAttribute: "document-heading-subtitle" }, ngImport: i0 });
|
|
1461
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoHeaderInfoSubtitle, decorators: [{
|
|
1461
1462
|
type: Directive,
|
|
1462
1463
|
args: [{
|
|
1463
1464
|
selector: 'bao-header-info-subtitle, [bao-header-info-subtitle], [baoHeaderInfoSubtitle]',
|
|
@@ -1468,9 +1469,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1468
1469
|
}] });
|
|
1469
1470
|
class BaoHeaderInfoTitle {
|
|
1470
1471
|
}
|
|
1471
|
-
BaoHeaderInfoTitle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1472
|
-
BaoHeaderInfoTitle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1473
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1472
|
+
BaoHeaderInfoTitle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoHeaderInfoTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1473
|
+
BaoHeaderInfoTitle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoHeaderInfoTitle, selector: "bao-header-info-title, [bao-header-info-title], [baoHeaderInfoTitle]", host: { classAttribute: "document-heading-title" }, ngImport: i0 });
|
|
1474
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoHeaderInfoTitle, decorators: [{
|
|
1474
1475
|
type: Directive,
|
|
1475
1476
|
args: [{
|
|
1476
1477
|
selector: 'bao-header-info-title, [bao-header-info-title], [baoHeaderInfoTitle]',
|
|
@@ -1495,8 +1496,8 @@ const DIRECTIVES$1 = [
|
|
|
1495
1496
|
];
|
|
1496
1497
|
class BaoHeaderInfoModule {
|
|
1497
1498
|
}
|
|
1498
|
-
BaoHeaderInfoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1499
|
-
BaoHeaderInfoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
1499
|
+
BaoHeaderInfoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoHeaderInfoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1500
|
+
BaoHeaderInfoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoHeaderInfoModule, declarations: [BaoHeaderInfoComponent,
|
|
1500
1501
|
BaoHeaderInfoContent,
|
|
1501
1502
|
BaoHeaderInfoTitleGroupComponent,
|
|
1502
1503
|
BaoHeaderInfoSubtitle,
|
|
@@ -1507,8 +1508,8 @@ BaoHeaderInfoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ver
|
|
|
1507
1508
|
BaoHeaderInfoSubtitle,
|
|
1508
1509
|
BaoHeaderInfoSurtitle,
|
|
1509
1510
|
BaoHeaderInfoTitle] });
|
|
1510
|
-
BaoHeaderInfoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1511
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1511
|
+
BaoHeaderInfoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoHeaderInfoModule, imports: [CommonModule] });
|
|
1512
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoHeaderInfoModule, decorators: [{
|
|
1512
1513
|
type: NgModule,
|
|
1513
1514
|
args: [{
|
|
1514
1515
|
imports: [CommonModule],
|
|
@@ -1536,9 +1537,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1536
1537
|
*/
|
|
1537
1538
|
class BaoListItem {
|
|
1538
1539
|
}
|
|
1539
|
-
BaoListItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1540
|
-
BaoListItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1541
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1540
|
+
BaoListItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoListItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1541
|
+
BaoListItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoListItem, selector: "bao-list-item, [bao-list-item]", host: { attributes: { "role": "listitem" }, classAttribute: "bao-list-item" }, ngImport: i0, template: "<div class=\"bao-list-item-header\">\n <ng-content select=\"baoIconItemType, [baoIconItemType]\"></ng-content>\n</div>\n<div class=\"bao-list-item-content\">\n <div class=\"bao-list-item-text\">\n <ng-content></ng-content>\n </div>\n <div class=\"bao-list-item-tag\">\n <ng-content\n select=\"bao-tag, [bao-tag], baoIconTag, [baoIconTag]\"\n ></ng-content>\n </div>\n</div>\n", styles: [".bao-container{padding-right:16px;padding-left:16px;margin-right:auto;margin-left:auto;width:100%}@media (min-width: 576px){.bao-container{max-width:576px}}@media (min-width: 768px){.bao-container{max-width:768px}}@media (min-width: 992px){.bao-container{max-width:992px}}@media (min-width: 1200px){.bao-container{max-width:1200px}}.bao-row{display:flex;flex-wrap:wrap;margin-right:-16px;margin-left:-16px}.bao-col-12,.bao-col-lg-7{position:relative;width:100%;padding-right:1rem;padding-left:1rem}@media (min-width: 992px){.bao-col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}}.bao-list{padding:0;margin:0}.bao-list>.bao-list-item:last-child{border-radius:.125rem;box-shadow:inset 0 .0625rem #ced4da,inset 0 -.0625rem #ced4da}.bao-list>a.bao-list-item{border-bottom:none}.bao-list>a.bao-list-item:focus{box-shadow:0 0 0 .1875rem #98bcde;background-color:#f8f9fa}.bao-list>a.bao-list-item:focus .bao-list-item-title{color:#097d6c}.bao-list>a.bao-list-item:hover{background-color:#f8f9fa}.bao-list>a.bao-list-item:hover .bao-list-item-text,.bao-list>a.bao-list-item:hover .bao-list-item-title{color:#097d6c}.bao-list .bao-list-item{display:flex;padding:1rem;background-color:#fff0;border-radius:.125rem .125rem 0rem 0rem;box-shadow:inset 0 .0625rem #ced4da}.bao-list .bao-list-item>.bao-list-item-header{align-self:flex-start;color:#adb2bd;line-height:0}.bao-list .bao-list-item>.bao-list-item-header .bao-icon{margin-right:1em}.bao-list .bao-list-item>.bao-list-item-content{display:flex;flex-grow:2}@media (min-width: 0){.bao-list .bao-list-item>.bao-list-item-content{flex-direction:column}}@media (min-width: 768px){.bao-list .bao-list-item>.bao-list-item-content{flex-direction:row;justify-content:space-between}}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text{display:flex;flex-direction:column;color:#212529;font-weight:700;font-size:1rem;line-height:1.5rem}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-title{font-weight:700;font-size:1rem;line-height:1.5rem}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>ul.bao-list-item-description{padding:0;margin:0}@media (min-width: 768px){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>ul.bao-list-item-description{display:inline-flex;flex-wrap:wrap}}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description{color:#637381;margin-right:0 1rem}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>*{font-weight:400;font-size:.875rem;line-height:1.25rem;list-style-type:none}@media (min-width: 0){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description{display:block}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>*{margin-bottom:.25rem}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>*:last-child{margin-bottom:0}}@media (min-width: 768px){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>li{display:inline-flex;align-items:center;margin-bottom:0}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>li:before{content:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ADB5BD' fill-rule='evenodd'><circle cx='12' cy='12' r='2'/></svg>\");height:1rem;width:1rem;margin:0 .25rem;flex-shrink:0}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>li:first-child:before{content:none}}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-tag{line-height:0}@media (min-width: 0){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-tag>*{margin:.5rem 0 0}}@media (min-width: 768px){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-tag>*{margin:0 0 0 1rem}}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
1542
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoListItem, decorators: [{
|
|
1542
1543
|
type: Component,
|
|
1543
1544
|
args: [{ selector: 'bao-list-item, [bao-list-item]', encapsulation: ViewEncapsulation.None, host: {
|
|
1544
1545
|
class: 'bao-list-item',
|
|
@@ -1547,9 +1548,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1547
1548
|
}] });
|
|
1548
1549
|
class BaoList {
|
|
1549
1550
|
}
|
|
1550
|
-
BaoList.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1551
|
-
BaoList.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1552
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1551
|
+
BaoList.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoList, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1552
|
+
BaoList.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoList, selector: "bao-list, [bao-list]", host: { attributes: { "role": "list" }, classAttribute: "bao-list" }, ngImport: i0 });
|
|
1553
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoList, decorators: [{
|
|
1553
1554
|
type: Directive,
|
|
1554
1555
|
args: [{
|
|
1555
1556
|
selector: 'bao-list, [bao-list]',
|
|
@@ -1561,9 +1562,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1561
1562
|
}] });
|
|
1562
1563
|
class BaoNavList {
|
|
1563
1564
|
}
|
|
1564
|
-
BaoNavList.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1565
|
-
BaoNavList.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1566
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1565
|
+
BaoNavList.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoNavList, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1566
|
+
BaoNavList.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoNavList, selector: "bao-nav-list, [bao-nav-list]", host: { attributes: { "role": "navigation" }, classAttribute: "bao-list" }, ngImport: i0 });
|
|
1567
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoNavList, decorators: [{
|
|
1567
1568
|
type: Directive,
|
|
1568
1569
|
args: [{
|
|
1569
1570
|
selector: 'bao-nav-list, [bao-nav-list]',
|
|
@@ -1575,9 +1576,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1575
1576
|
}] });
|
|
1576
1577
|
class BaoListItemDescription {
|
|
1577
1578
|
}
|
|
1578
|
-
BaoListItemDescription.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1579
|
-
BaoListItemDescription.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1580
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1579
|
+
BaoListItemDescription.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoListItemDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1580
|
+
BaoListItemDescription.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoListItemDescription, selector: "bao-list-item-description, [bao-list-item-description]", host: { classAttribute: "bao-list-item-description" }, ngImport: i0 });
|
|
1581
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoListItemDescription, decorators: [{
|
|
1581
1582
|
type: Directive,
|
|
1582
1583
|
args: [{
|
|
1583
1584
|
selector: 'bao-list-item-description, [bao-list-item-description]',
|
|
@@ -1588,9 +1589,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1588
1589
|
}] });
|
|
1589
1590
|
class BaoListItemTitle {
|
|
1590
1591
|
}
|
|
1591
|
-
BaoListItemTitle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1592
|
-
BaoListItemTitle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1593
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1592
|
+
BaoListItemTitle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoListItemTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1593
|
+
BaoListItemTitle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoListItemTitle, selector: "bao-list-item-title, [bao-list-item-title]", host: { classAttribute: "bao-list-item-title" }, ngImport: i0 });
|
|
1594
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoListItemTitle, decorators: [{
|
|
1594
1595
|
type: Directive,
|
|
1595
1596
|
args: [{
|
|
1596
1597
|
selector: 'bao-list-item-title, [bao-list-item-title]',
|
|
@@ -1614,8 +1615,8 @@ const DIRECTIVES = [
|
|
|
1614
1615
|
];
|
|
1615
1616
|
class BaoListModule {
|
|
1616
1617
|
}
|
|
1617
|
-
BaoListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1618
|
-
BaoListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
1618
|
+
BaoListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1619
|
+
BaoListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoListModule, declarations: [BaoListItem,
|
|
1619
1620
|
BaoList,
|
|
1620
1621
|
BaoNavList,
|
|
1621
1622
|
BaoListItemDescription,
|
|
@@ -1624,8 +1625,8 @@ BaoListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
1624
1625
|
BaoNavList,
|
|
1625
1626
|
BaoListItemDescription,
|
|
1626
1627
|
BaoListItemTitle] });
|
|
1627
|
-
BaoListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1628
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1628
|
+
BaoListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoListModule, imports: [CommonModule] });
|
|
1629
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoListModule, decorators: [{
|
|
1629
1630
|
type: NgModule,
|
|
1630
1631
|
args: [{
|
|
1631
1632
|
imports: [CommonModule],
|
|
@@ -1656,17 +1657,6 @@ let radioGroupNextUniqueId = 0;
|
|
|
1656
1657
|
class BaoRadioButtonGroupComponent {
|
|
1657
1658
|
constructor(cdr) {
|
|
1658
1659
|
this.cdr = cdr;
|
|
1659
|
-
this._value = null;
|
|
1660
|
-
this._name = null;
|
|
1661
|
-
this._selected = null;
|
|
1662
|
-
this._isInitialized = false;
|
|
1663
|
-
this._disabled = false;
|
|
1664
|
-
this._required = false;
|
|
1665
|
-
this._uniqueId = `bao-checkbox-group-${++radioGroupNextUniqueId}`;
|
|
1666
|
-
/**
|
|
1667
|
-
* The checkbox group ID. It is set dynamically with an unique ID by default
|
|
1668
|
-
*/
|
|
1669
|
-
this.id = this._uniqueId;
|
|
1670
1660
|
/**
|
|
1671
1661
|
* Emit the value of the selected radio button
|
|
1672
1662
|
*/
|
|
@@ -1675,8 +1665,18 @@ class BaoRadioButtonGroupComponent {
|
|
|
1675
1665
|
* The aria-describedby for web accessibilty
|
|
1676
1666
|
*/
|
|
1677
1667
|
this.ariaDescribedby = null;
|
|
1668
|
+
this._value = null;
|
|
1669
|
+
this._name = null;
|
|
1670
|
+
this._selected = null;
|
|
1671
|
+
this._isInitialized = false;
|
|
1672
|
+
this._disabled = false;
|
|
1673
|
+
this._required = false;
|
|
1674
|
+
this._uniqueId = `bao-checkbox-group-${++radioGroupNextUniqueId}`;
|
|
1678
1675
|
this.onModelChange = () => undefined;
|
|
1679
1676
|
this.onTouch = () => undefined;
|
|
1677
|
+
if (!this.id) {
|
|
1678
|
+
this.id = this._uniqueId;
|
|
1679
|
+
}
|
|
1680
1680
|
}
|
|
1681
1681
|
/**
|
|
1682
1682
|
* Define the name property of all radio buttons. Default : null
|
|
@@ -1684,50 +1684,50 @@ class BaoRadioButtonGroupComponent {
|
|
|
1684
1684
|
get name() {
|
|
1685
1685
|
return this._name;
|
|
1686
1686
|
}
|
|
1687
|
-
set name(value) {
|
|
1688
|
-
this._name = value;
|
|
1689
|
-
this.updateRadioButtonNames();
|
|
1690
|
-
}
|
|
1691
1687
|
/**
|
|
1692
1688
|
* Define the value of the selected radio button. Default : null
|
|
1693
1689
|
*/
|
|
1694
1690
|
get value() {
|
|
1695
1691
|
return this._value;
|
|
1696
1692
|
}
|
|
1697
|
-
set value(newValue) {
|
|
1698
|
-
if (this._value !== newValue) {
|
|
1699
|
-
this._value = newValue;
|
|
1700
|
-
this.updateSelectedRadioFromValue();
|
|
1701
|
-
this.checkSelectedRadioButton();
|
|
1702
|
-
}
|
|
1703
|
-
}
|
|
1704
1693
|
/**
|
|
1705
1694
|
* Define which radio button is selected. Default : null
|
|
1706
1695
|
*/
|
|
1707
1696
|
get selected() {
|
|
1708
1697
|
return this._selected;
|
|
1709
1698
|
}
|
|
1710
|
-
set selected(selected) {
|
|
1711
|
-
this._selected = selected;
|
|
1712
|
-
this.value = selected ? selected.value : null;
|
|
1713
|
-
this.checkSelectedRadioButton();
|
|
1714
|
-
}
|
|
1715
1699
|
/**
|
|
1716
1700
|
* Whether the radio button groupd is disabled. Default : false
|
|
1717
1701
|
*/
|
|
1718
1702
|
get disabled() {
|
|
1719
1703
|
return this._disabled;
|
|
1720
1704
|
}
|
|
1721
|
-
set disabled(value) {
|
|
1722
|
-
this._disabled = coerceBooleanProperty(value);
|
|
1723
|
-
this.markRadiosForCheck();
|
|
1724
|
-
}
|
|
1725
1705
|
/**
|
|
1726
1706
|
* Whether the radio button groupd is required. Default : false
|
|
1727
1707
|
*/
|
|
1728
1708
|
get required() {
|
|
1729
1709
|
return this._required;
|
|
1730
1710
|
}
|
|
1711
|
+
set name(value) {
|
|
1712
|
+
this._name = value;
|
|
1713
|
+
this.updateRadioButtonNames();
|
|
1714
|
+
}
|
|
1715
|
+
set value(newValue) {
|
|
1716
|
+
if (this._value !== newValue) {
|
|
1717
|
+
this._value = newValue;
|
|
1718
|
+
this.updateSelectedRadioFromValue();
|
|
1719
|
+
this.checkSelectedRadioButton();
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
set selected(selected) {
|
|
1723
|
+
this._selected = selected;
|
|
1724
|
+
this.value = selected ? selected.value : null;
|
|
1725
|
+
this.checkSelectedRadioButton();
|
|
1726
|
+
}
|
|
1727
|
+
set disabled(value) {
|
|
1728
|
+
this._disabled = coerceBooleanProperty(value);
|
|
1729
|
+
this.markRadiosForCheck();
|
|
1730
|
+
}
|
|
1731
1731
|
set required(value) {
|
|
1732
1732
|
this._required = coerceBooleanProperty(value);
|
|
1733
1733
|
this.markRadiosForCheck();
|
|
@@ -1841,16 +1841,16 @@ class BaoRadioButtonGroupComponent {
|
|
|
1841
1841
|
this.ariaDescribedby = value ? `${this.id}-ariadescribedby` : null;
|
|
1842
1842
|
}
|
|
1843
1843
|
}
|
|
1844
|
-
BaoRadioButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1845
|
-
BaoRadioButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1844
|
+
BaoRadioButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoRadioButtonGroupComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1845
|
+
BaoRadioButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoRadioButtonGroupComponent, selector: "bao-radio-button-group, [bao-radio-button-group], [baoRadioButtonGroup]", inputs: { id: "id", name: "name", value: "value", selected: "selected", disabled: "disabled", required: "required" }, outputs: { change: "change" }, providers: [
|
|
1846
1846
|
{
|
|
1847
1847
|
provide: NG_VALUE_ACCESSOR,
|
|
1848
1848
|
useExisting: forwardRef(() => BaoRadioButtonGroupComponent),
|
|
1849
1849
|
multi: true
|
|
1850
1850
|
},
|
|
1851
1851
|
{ provide: BAO_RADIO_GROUP, useExisting: BaoRadioButtonGroupComponent }
|
|
1852
|
-
], queries: [{ propertyName: "
|
|
1853
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1852
|
+
], queries: [{ propertyName: "staticContainer", predicate: i0.forwardRef(function () { return BaoRadioButtonComponent; }), descendants: true }], viewQueries: [{ propertyName: "staticContainer", first: true, predicate: ["container"], descendants: true }], exportAs: ["baoRadioGroup"], ngImport: i0, template: "<fieldset\n role=\"radiogroup\"\n class=\"bao-radio-button-group\"\n [id]=\"id\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n>\n <ng-content></ng-content>\n <div\n class=\"bao-radio-button-group-description\"\n [attr.id]=\"ariaDescribedby\"\n #container\n (cdkObserveContent)=\"onContentChange()\"\n >\n <ng-content\n select=\"bao-error, [bao-error], bao-guiding-text, [bao-guiding-text]\"\n ></ng-content>\n </div>\n</fieldset>\n", styles: [".bao-radio-button-group .bao-legend{margin-bottom:.5rem}.bao-radio-button-group .bao-error,.bao-radio-button-group .bao-guiding-text{margin-top:.5rem}\n"], dependencies: [{ kind: "directive", type: i1$2.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1853
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoRadioButtonGroupComponent, decorators: [{
|
|
1854
1854
|
type: Component,
|
|
1855
1855
|
args: [{ selector: 'bao-radio-button-group, [bao-radio-button-group], [baoRadioButtonGroup]', exportAs: 'baoRadioGroup', encapsulation: ViewEncapsulation.None, providers: [
|
|
1856
1856
|
{
|
|
@@ -1860,13 +1860,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1860
1860
|
},
|
|
1861
1861
|
{ provide: BAO_RADIO_GROUP, useExisting: BaoRadioButtonGroupComponent }
|
|
1862
1862
|
], template: "<fieldset\n role=\"radiogroup\"\n class=\"bao-radio-button-group\"\n [id]=\"id\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n>\n <ng-content></ng-content>\n <div\n class=\"bao-radio-button-group-description\"\n [attr.id]=\"ariaDescribedby\"\n #container\n (cdkObserveContent)=\"onContentChange()\"\n >\n <ng-content\n select=\"bao-error, [bao-error], bao-guiding-text, [bao-guiding-text]\"\n ></ng-content>\n </div>\n</fieldset>\n", styles: [".bao-radio-button-group .bao-legend{margin-bottom:.5rem}.bao-radio-button-group .bao-error,.bao-radio-button-group .bao-guiding-text{margin-top:.5rem}\n"] }]
|
|
1863
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: {
|
|
1863
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { id: [{
|
|
1864
|
+
type: Input
|
|
1865
|
+
}], change: [{
|
|
1866
|
+
type: Output
|
|
1867
|
+
}], staticContainer: [{
|
|
1864
1868
|
type: ContentChildren,
|
|
1865
1869
|
args: [forwardRef(() => BaoRadioButtonComponent), {
|
|
1866
1870
|
descendants: true
|
|
1867
1871
|
}]
|
|
1868
|
-
}
|
|
1869
|
-
type:
|
|
1872
|
+
}, {
|
|
1873
|
+
type: ViewChild,
|
|
1874
|
+
args: ['container', { static: false }]
|
|
1870
1875
|
}], name: [{
|
|
1871
1876
|
type: Input
|
|
1872
1877
|
}], value: [{
|
|
@@ -1877,11 +1882,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1877
1882
|
type: Input
|
|
1878
1883
|
}], required: [{
|
|
1879
1884
|
type: Input
|
|
1880
|
-
}], change: [{
|
|
1881
|
-
type: Output
|
|
1882
|
-
}], staticContainer: [{
|
|
1883
|
-
type: ViewChild,
|
|
1884
|
-
args: ['container', { static: false }]
|
|
1885
1885
|
}] } });
|
|
1886
1886
|
|
|
1887
1887
|
/**
|
|
@@ -1894,15 +1894,6 @@ class BaoRadioButtonComponent {
|
|
|
1894
1894
|
this.cdr = cdr;
|
|
1895
1895
|
this.focusMonitor = focusMonitor;
|
|
1896
1896
|
this.radioDispatcher = radioDispatcher;
|
|
1897
|
-
this._checked = false;
|
|
1898
|
-
this._disabled = false;
|
|
1899
|
-
this._required = false;
|
|
1900
|
-
this._value = null;
|
|
1901
|
-
this._uniqueId = `bao-radio-button-${++radioNextUniqueId}`;
|
|
1902
|
-
/**
|
|
1903
|
-
* The radio button ID. It is set dynamically with an unique ID by default
|
|
1904
|
-
*/
|
|
1905
|
-
this.id = this._uniqueId;
|
|
1906
1897
|
/**
|
|
1907
1898
|
* The aria-label for web accessibility
|
|
1908
1899
|
*/
|
|
@@ -1935,6 +1926,11 @@ class BaoRadioButtonComponent {
|
|
|
1935
1926
|
* The aria-labeledby id for web accessibilty
|
|
1936
1927
|
*/
|
|
1937
1928
|
this.ariaLabelledby = null;
|
|
1929
|
+
this._checked = false;
|
|
1930
|
+
this._disabled = false;
|
|
1931
|
+
this._required = false;
|
|
1932
|
+
this._value = null;
|
|
1933
|
+
this._uniqueId = `bao-radio-button-${++radioNextUniqueId}`;
|
|
1938
1934
|
/** Unregister function for radioDispatcher */
|
|
1939
1935
|
this._removeUniqueSelectionListener = () => undefined;
|
|
1940
1936
|
this.radioGroup = radioGroup;
|
|
@@ -1943,6 +1939,9 @@ class BaoRadioButtonComponent {
|
|
|
1943
1939
|
this.checked = false;
|
|
1944
1940
|
}
|
|
1945
1941
|
});
|
|
1942
|
+
if (!this.id) {
|
|
1943
|
+
this.id = this._uniqueId;
|
|
1944
|
+
}
|
|
1946
1945
|
}
|
|
1947
1946
|
/**
|
|
1948
1947
|
* Whether the radio button is checked. Default : false
|
|
@@ -1950,6 +1949,27 @@ class BaoRadioButtonComponent {
|
|
|
1950
1949
|
get checked() {
|
|
1951
1950
|
return this._checked;
|
|
1952
1951
|
}
|
|
1952
|
+
/**
|
|
1953
|
+
* Define the radio button value. Default : null
|
|
1954
|
+
*/
|
|
1955
|
+
get value() {
|
|
1956
|
+
return this._value;
|
|
1957
|
+
}
|
|
1958
|
+
/**
|
|
1959
|
+
* Whether the radio button is disabled. Default : false
|
|
1960
|
+
*/
|
|
1961
|
+
get disabled() {
|
|
1962
|
+
return this._disabled || (this.radioGroup && this.radioGroup.disabled);
|
|
1963
|
+
}
|
|
1964
|
+
/**
|
|
1965
|
+
* Whether the radio button is required. Default : false
|
|
1966
|
+
*/
|
|
1967
|
+
get required() {
|
|
1968
|
+
return this._required || (this.radioGroup && this.radioGroup.required);
|
|
1969
|
+
}
|
|
1970
|
+
get nativeElement() {
|
|
1971
|
+
return this.elementRef.nativeElement;
|
|
1972
|
+
}
|
|
1953
1973
|
set checked(value) {
|
|
1954
1974
|
const newCheckedState = coerceBooleanProperty(value);
|
|
1955
1975
|
if (this._checked !== newCheckedState) {
|
|
@@ -1970,12 +1990,6 @@ class BaoRadioButtonComponent {
|
|
|
1970
1990
|
this.cdr.markForCheck();
|
|
1971
1991
|
}
|
|
1972
1992
|
}
|
|
1973
|
-
/**
|
|
1974
|
-
* Define the radio button value. Default : null
|
|
1975
|
-
*/
|
|
1976
|
-
get value() {
|
|
1977
|
-
return this._value;
|
|
1978
|
-
}
|
|
1979
1993
|
set value(value) {
|
|
1980
1994
|
if (value !== this._value) {
|
|
1981
1995
|
this._value = value;
|
|
@@ -1989,27 +2003,12 @@ class BaoRadioButtonComponent {
|
|
|
1989
2003
|
}
|
|
1990
2004
|
}
|
|
1991
2005
|
}
|
|
1992
|
-
/**
|
|
1993
|
-
* Whether the radio button is disabled. Default : false
|
|
1994
|
-
*/
|
|
1995
|
-
get disabled() {
|
|
1996
|
-
return this._disabled || (this.radioGroup && this.radioGroup.disabled);
|
|
1997
|
-
}
|
|
1998
2006
|
set disabled(value) {
|
|
1999
2007
|
this.setDisabled(coerceBooleanProperty(value));
|
|
2000
2008
|
}
|
|
2001
|
-
/**
|
|
2002
|
-
* Whether the radio button is required. Default : false
|
|
2003
|
-
*/
|
|
2004
|
-
get required() {
|
|
2005
|
-
return this._required || (this.radioGroup && this.radioGroup.required);
|
|
2006
|
-
}
|
|
2007
2009
|
set required(value) {
|
|
2008
2010
|
this._required = coerceBooleanProperty(value);
|
|
2009
2011
|
}
|
|
2010
|
-
get nativeElement() {
|
|
2011
|
-
return this.elementRef.nativeElement;
|
|
2012
|
-
}
|
|
2013
2012
|
focus(options, origin) {
|
|
2014
2013
|
if (origin) {
|
|
2015
2014
|
this.focusMonitor.focusVia(this.inputElement, origin, options);
|
|
@@ -2100,15 +2099,15 @@ class BaoRadioButtonComponent {
|
|
|
2100
2099
|
}
|
|
2101
2100
|
}
|
|
2102
2101
|
}
|
|
2103
|
-
BaoRadioButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2104
|
-
BaoRadioButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2102
|
+
BaoRadioButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoRadioButtonComponent, deps: [{ token: BAO_RADIO_GROUP, optional: true }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$3.FocusMonitor }, { token: i2.UniqueSelectionDispatcher }], target: i0.ɵɵFactoryTarget.Component });
|
|
2103
|
+
BaoRadioButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoRadioButtonComponent, selector: "bao-radio-button, [bao-radio-button]", inputs: { id: "id", ariaLabel: ["aria-label", "ariaLabel"], brandBorder: "brandBorder", inline: "inline", name: "name", hiddenLabel: "hiddenLabel", checked: "checked", value: "value", disabled: "disabled", required: "required" }, outputs: { change: "change" }, host: { properties: { "class.bao-radio-button-inline": "inline", "class.bao-radio-button-checked": "checked", "class.bao-radio-button-disabled": "disabled", "class.bao-radio-button-card": "brandBorder", "class.bao-radio-button-hidden-label": "hiddenLabel" }, classAttribute: "bao-radio-button" }, providers: [
|
|
2105
2104
|
{
|
|
2106
2105
|
provide: NG_VALUE_ACCESSOR,
|
|
2107
2106
|
useExisting: forwardRef(() => BaoRadioButtonComponent),
|
|
2108
2107
|
multi: true
|
|
2109
2108
|
}
|
|
2110
|
-
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<input\n #input\n type=\"radio\"\n [id]=\"inputID\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"onInputInteraction($event)\"\n role=\"radio\"\n/>\n<label class=\"bao-radio-button-content-container\" [attr.for]=\"inputID\">\n <div class=\"bao-radio-button-label\" [id]=\"ariaLabelledby\">\n <ng-content></ng-content>\n </div>\n <ng-content\n select=\"bao-radio-button-description, [bao-radio-button-description], [baoRadioButtonDescription]\"\n ></ng-content>\n</label>\n", styles: [".bao-radio-button{display:block;font-size:1rem;line-height:1.5rem;min-height:1.5rem;padding-top:.5rem;padding-bottom:.5rem;padding-left:2rem;position:relative;z-index:1}.bao-radio-button input{box-sizing:border-box;left:0;opacity:0;overflow:visible;padding:0;position:absolute;z-index:-1}.bao-radio-button input:focus~.bao-radio-button-content-container:before{box-shadow:0 0 0 .1875rem #0079c480}.bao-radio-button label.bao-radio-button-content-container{color:#212529;font-weight:400;font-size:1rem;line-height:1.5rem;margin-bottom:0;position:relative;vertical-align:top}.bao-radio-button label.bao-radio-button-content-container:before{border-radius:50%;box-sizing:border-box;position:absolute;top:0;left:-2rem;display:block;margin:.125rem;width:1.25rem;height:1.25rem;pointer-events:none;content:\"\";background-color:#fff;border:#ced4da solid 1px;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.bao-radio-button label.bao-radio-button-content-container:after{box-sizing:border-box;background:no-repeat 50%/1.5rem;content:\"\";display:block;height:1.5rem;left:-2rem;margin:0;position:absolute;top:0;width:1.5rem}.bao-radio-button label.bao-radio-button-content-container .bao-radio-button-label{color:#212529;display:block}.bao-radio-button label.bao-radio-button-content-container .bao-radio-button-description{color:#637381;display:block;margin-top:.5rem}.bao-radio-button.bao-radio-button-inline{display:inline-flex;margin-right:1rem}.bao-radio-button.bao-radio-button-card{padding:0;margin-bottom:1rem}.bao-radio-button.bao-radio-button-card:last-of-type{margin-bottom:0}.bao-radio-button.bao-radio-button-card label.bao-radio-button-content-container{display:flex;flex-direction:column;flex:1;justify-content:center;padding:1rem 1rem 1rem 3.5rem;position:relative;border:1px solid #ced4da;border-radius:.25rem;color:#637381;min-height:3.5rem}.bao-radio-button.bao-radio-button-card label.bao-radio-button-content-container:before{top:1rem;left:0;margin-left:1.125rem}.bao-radio-button.bao-radio-button-card label.bao-radio-button-content-container:after{top:1rem;left:0;margin-left:1rem}.bao-radio-button input:checked~.bao-radio-button-content-container:before{border-color:#097d6c;background-color:#097d6c}.bao-radio-button input:checked~.bao-radio-button-content-container:after{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3ccircle cx='12' cy='12' r='4' fill='%23ffffff'/%3e%3c/svg%3e\")}.bao-radio-button input:disabled~.bao-radio-button-content-container{color:#adb2bd;border-color:#dee2e6}.bao-radio-button input:disabled~.bao-radio-button-content-container:before{border-color:#ced4da;background-color:#ced4da}.bao-radio-button input:disabled~.bao-radio-button-content-container .bao-radio-button-label,.bao-radio-button input:disabled~.bao-radio-button-content-container .bao-radio-button-description{color:#adb2bd}.bao-radio-button.bao-radio-button-hidden-label .bao-radio-button-label{clip:rect(1px,1px,1px,1px)
|
|
2111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2109
|
+
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<input\n #input\n type=\"radio\"\n [id]=\"inputID\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"onInputInteraction($event)\"\n role=\"radio\"\n/>\n<label class=\"bao-radio-button-content-container\" [attr.for]=\"inputID\">\n <div class=\"bao-radio-button-label\" [id]=\"ariaLabelledby\">\n <ng-content></ng-content>\n </div>\n <ng-content\n select=\"bao-radio-button-description, [bao-radio-button-description], [baoRadioButtonDescription]\"\n ></ng-content>\n</label>\n", styles: [".bao-radio-button{display:block;font-size:1rem;line-height:1.5rem;min-height:1.5rem;padding-top:.5rem;padding-bottom:.5rem;padding-left:2rem;position:relative;z-index:1}.bao-radio-button input{box-sizing:border-box;left:0;opacity:0;overflow:visible;padding:0;position:absolute;z-index:-1}.bao-radio-button input:focus~.bao-radio-button-content-container:before{box-shadow:0 0 0 .1875rem #0079c480}.bao-radio-button label.bao-radio-button-content-container{color:#212529;font-weight:400;font-size:1rem;line-height:1.5rem;margin-bottom:0;position:relative;vertical-align:top}.bao-radio-button label.bao-radio-button-content-container:before{border-radius:50%;box-sizing:border-box;position:absolute;top:0;left:-2rem;display:block;margin:.125rem;width:1.25rem;height:1.25rem;pointer-events:none;content:\"\";background-color:#fff;border:#ced4da solid 1px;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.bao-radio-button label.bao-radio-button-content-container:after{box-sizing:border-box;background:no-repeat 50%/1.5rem;content:\"\";display:block;height:1.5rem;left:-2rem;margin:0;position:absolute;top:0;width:1.5rem}.bao-radio-button label.bao-radio-button-content-container .bao-radio-button-label{color:#212529;display:block}.bao-radio-button label.bao-radio-button-content-container .bao-radio-button-description{color:#637381;display:block;margin-top:.5rem}.bao-radio-button.bao-radio-button-inline{display:inline-flex;margin-right:1rem}.bao-radio-button.bao-radio-button-card{padding:0;margin-bottom:1rem}.bao-radio-button.bao-radio-button-card:last-of-type{margin-bottom:0}.bao-radio-button.bao-radio-button-card label.bao-radio-button-content-container{display:flex;flex-direction:column;flex:1;justify-content:center;padding:1rem 1rem 1rem 3.5rem;position:relative;border:1px solid #ced4da;border-radius:.25rem;color:#637381;min-height:3.5rem}.bao-radio-button.bao-radio-button-card label.bao-radio-button-content-container:before{top:1rem;left:0;margin-left:1.125rem}.bao-radio-button.bao-radio-button-card label.bao-radio-button-content-container:after{top:1rem;left:0;margin-left:1rem}.bao-radio-button input:checked~.bao-radio-button-content-container:before{border-color:#097d6c;background-color:#097d6c}.bao-radio-button input:checked~.bao-radio-button-content-container:after{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3ccircle cx='12' cy='12' r='4' fill='%23ffffff'/%3e%3c/svg%3e\")}.bao-radio-button input:disabled~.bao-radio-button-content-container{color:#adb2bd;border-color:#dee2e6}.bao-radio-button input:disabled~.bao-radio-button-content-container:before{border-color:#ced4da;background-color:#ced4da}.bao-radio-button input:disabled~.bao-radio-button-content-container .bao-radio-button-label,.bao-radio-button input:disabled~.bao-radio-button-content-container .bao-radio-button-description{color:#adb2bd}.bao-radio-button.bao-radio-button-hidden-label .bao-radio-button-label{clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}.bao-radio-button.bao-radio-button-hidden-label label.bao-radio-button-content-container .bao-radio-button-description{margin-top:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoRadioButtonComponent, decorators: [{
|
|
2112
2111
|
type: Component,
|
|
2113
2112
|
args: [{ selector: 'bao-radio-button, [bao-radio-button]', providers: [
|
|
2114
2113
|
{
|
|
@@ -2123,7 +2122,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2123
2122
|
'[class.bao-radio-button-disabled]': 'disabled',
|
|
2124
2123
|
'[class.bao-radio-button-card]': 'brandBorder',
|
|
2125
2124
|
'[class.bao-radio-button-hidden-label]': 'hiddenLabel'
|
|
2126
|
-
}, template: "<input\n #input\n type=\"radio\"\n [id]=\"inputID\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"onInputInteraction($event)\"\n role=\"radio\"\n/>\n<label class=\"bao-radio-button-content-container\" [attr.for]=\"inputID\">\n <div class=\"bao-radio-button-label\" [id]=\"ariaLabelledby\">\n <ng-content></ng-content>\n </div>\n <ng-content\n select=\"bao-radio-button-description, [bao-radio-button-description], [baoRadioButtonDescription]\"\n ></ng-content>\n</label>\n", styles: [".bao-radio-button{display:block;font-size:1rem;line-height:1.5rem;min-height:1.5rem;padding-top:.5rem;padding-bottom:.5rem;padding-left:2rem;position:relative;z-index:1}.bao-radio-button input{box-sizing:border-box;left:0;opacity:0;overflow:visible;padding:0;position:absolute;z-index:-1}.bao-radio-button input:focus~.bao-radio-button-content-container:before{box-shadow:0 0 0 .1875rem #0079c480}.bao-radio-button label.bao-radio-button-content-container{color:#212529;font-weight:400;font-size:1rem;line-height:1.5rem;margin-bottom:0;position:relative;vertical-align:top}.bao-radio-button label.bao-radio-button-content-container:before{border-radius:50%;box-sizing:border-box;position:absolute;top:0;left:-2rem;display:block;margin:.125rem;width:1.25rem;height:1.25rem;pointer-events:none;content:\"\";background-color:#fff;border:#ced4da solid 1px;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.bao-radio-button label.bao-radio-button-content-container:after{box-sizing:border-box;background:no-repeat 50%/1.5rem;content:\"\";display:block;height:1.5rem;left:-2rem;margin:0;position:absolute;top:0;width:1.5rem}.bao-radio-button label.bao-radio-button-content-container .bao-radio-button-label{color:#212529;display:block}.bao-radio-button label.bao-radio-button-content-container .bao-radio-button-description{color:#637381;display:block;margin-top:.5rem}.bao-radio-button.bao-radio-button-inline{display:inline-flex;margin-right:1rem}.bao-radio-button.bao-radio-button-card{padding:0;margin-bottom:1rem}.bao-radio-button.bao-radio-button-card:last-of-type{margin-bottom:0}.bao-radio-button.bao-radio-button-card label.bao-radio-button-content-container{display:flex;flex-direction:column;flex:1;justify-content:center;padding:1rem 1rem 1rem 3.5rem;position:relative;border:1px solid #ced4da;border-radius:.25rem;color:#637381;min-height:3.5rem}.bao-radio-button.bao-radio-button-card label.bao-radio-button-content-container:before{top:1rem;left:0;margin-left:1.125rem}.bao-radio-button.bao-radio-button-card label.bao-radio-button-content-container:after{top:1rem;left:0;margin-left:1rem}.bao-radio-button input:checked~.bao-radio-button-content-container:before{border-color:#097d6c;background-color:#097d6c}.bao-radio-button input:checked~.bao-radio-button-content-container:after{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3ccircle cx='12' cy='12' r='4' fill='%23ffffff'/%3e%3c/svg%3e\")}.bao-radio-button input:disabled~.bao-radio-button-content-container{color:#adb2bd;border-color:#dee2e6}.bao-radio-button input:disabled~.bao-radio-button-content-container:before{border-color:#ced4da;background-color:#ced4da}.bao-radio-button input:disabled~.bao-radio-button-content-container .bao-radio-button-label,.bao-radio-button input:disabled~.bao-radio-button-content-container .bao-radio-button-description{color:#adb2bd}.bao-radio-button.bao-radio-button-hidden-label .bao-radio-button-label{clip:rect(1px,1px,1px,1px)
|
|
2125
|
+
}, template: "<input\n #input\n type=\"radio\"\n [id]=\"inputID\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"onInputInteraction($event)\"\n role=\"radio\"\n/>\n<label class=\"bao-radio-button-content-container\" [attr.for]=\"inputID\">\n <div class=\"bao-radio-button-label\" [id]=\"ariaLabelledby\">\n <ng-content></ng-content>\n </div>\n <ng-content\n select=\"bao-radio-button-description, [bao-radio-button-description], [baoRadioButtonDescription]\"\n ></ng-content>\n</label>\n", styles: [".bao-radio-button{display:block;font-size:1rem;line-height:1.5rem;min-height:1.5rem;padding-top:.5rem;padding-bottom:.5rem;padding-left:2rem;position:relative;z-index:1}.bao-radio-button input{box-sizing:border-box;left:0;opacity:0;overflow:visible;padding:0;position:absolute;z-index:-1}.bao-radio-button input:focus~.bao-radio-button-content-container:before{box-shadow:0 0 0 .1875rem #0079c480}.bao-radio-button label.bao-radio-button-content-container{color:#212529;font-weight:400;font-size:1rem;line-height:1.5rem;margin-bottom:0;position:relative;vertical-align:top}.bao-radio-button label.bao-radio-button-content-container:before{border-radius:50%;box-sizing:border-box;position:absolute;top:0;left:-2rem;display:block;margin:.125rem;width:1.25rem;height:1.25rem;pointer-events:none;content:\"\";background-color:#fff;border:#ced4da solid 1px;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.bao-radio-button label.bao-radio-button-content-container:after{box-sizing:border-box;background:no-repeat 50%/1.5rem;content:\"\";display:block;height:1.5rem;left:-2rem;margin:0;position:absolute;top:0;width:1.5rem}.bao-radio-button label.bao-radio-button-content-container .bao-radio-button-label{color:#212529;display:block}.bao-radio-button label.bao-radio-button-content-container .bao-radio-button-description{color:#637381;display:block;margin-top:.5rem}.bao-radio-button.bao-radio-button-inline{display:inline-flex;margin-right:1rem}.bao-radio-button.bao-radio-button-card{padding:0;margin-bottom:1rem}.bao-radio-button.bao-radio-button-card:last-of-type{margin-bottom:0}.bao-radio-button.bao-radio-button-card label.bao-radio-button-content-container{display:flex;flex-direction:column;flex:1;justify-content:center;padding:1rem 1rem 1rem 3.5rem;position:relative;border:1px solid #ced4da;border-radius:.25rem;color:#637381;min-height:3.5rem}.bao-radio-button.bao-radio-button-card label.bao-radio-button-content-container:before{top:1rem;left:0;margin-left:1.125rem}.bao-radio-button.bao-radio-button-card label.bao-radio-button-content-container:after{top:1rem;left:0;margin-left:1rem}.bao-radio-button input:checked~.bao-radio-button-content-container:before{border-color:#097d6c;background-color:#097d6c}.bao-radio-button input:checked~.bao-radio-button-content-container:after{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3ccircle cx='12' cy='12' r='4' fill='%23ffffff'/%3e%3c/svg%3e\")}.bao-radio-button input:disabled~.bao-radio-button-content-container{color:#adb2bd;border-color:#dee2e6}.bao-radio-button input:disabled~.bao-radio-button-content-container:before{border-color:#ced4da;background-color:#ced4da}.bao-radio-button input:disabled~.bao-radio-button-content-container .bao-radio-button-label,.bao-radio-button input:disabled~.bao-radio-button-content-container .bao-radio-button-description{color:#adb2bd}.bao-radio-button.bao-radio-button-hidden-label .bao-radio-button-label{clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}.bao-radio-button.bao-radio-button-hidden-label label.bao-radio-button-content-container .bao-radio-button-description{margin-top:0}\n"] }]
|
|
2127
2126
|
}], ctorParameters: function () {
|
|
2128
2127
|
return [{ type: BaoRadioButtonGroupComponent, decorators: [{
|
|
2129
2128
|
type: Optional
|
|
@@ -2142,6 +2141,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2142
2141
|
type: Input
|
|
2143
2142
|
}], name: [{
|
|
2144
2143
|
type: Input
|
|
2144
|
+
}], hiddenLabel: [{
|
|
2145
|
+
type: Input
|
|
2146
|
+
}], change: [{
|
|
2147
|
+
type: Output
|
|
2148
|
+
}], inputElement: [{
|
|
2149
|
+
type: ViewChild,
|
|
2150
|
+
args: ['input', { static: false }]
|
|
2145
2151
|
}], checked: [{
|
|
2146
2152
|
type: Input
|
|
2147
2153
|
}], value: [{
|
|
@@ -2150,19 +2156,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2150
2156
|
type: Input
|
|
2151
2157
|
}], required: [{
|
|
2152
2158
|
type: Input
|
|
2153
|
-
}], hiddenLabel: [{
|
|
2154
|
-
type: Input
|
|
2155
|
-
}], change: [{
|
|
2156
|
-
type: Output
|
|
2157
|
-
}], inputElement: [{
|
|
2158
|
-
type: ViewChild,
|
|
2159
|
-
args: ['input', { static: false }]
|
|
2160
2159
|
}] } });
|
|
2161
2160
|
class BaoRadioDescription {
|
|
2162
2161
|
}
|
|
2163
|
-
BaoRadioDescription.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2164
|
-
BaoRadioDescription.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2165
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2162
|
+
BaoRadioDescription.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoRadioDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2163
|
+
BaoRadioDescription.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoRadioDescription, selector: "bao-radio-button-description, [bao-radio-button-description], [baoRadioButtonDescription]", host: { classAttribute: "bao-radio-button-description" }, ngImport: i0 });
|
|
2164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoRadioDescription, decorators: [{
|
|
2166
2165
|
type: Directive,
|
|
2167
2166
|
args: [{
|
|
2168
2167
|
selector: 'bao-radio-button-description, [bao-radio-button-description], [baoRadioButtonDescription]',
|
|
@@ -2182,8 +2181,8 @@ const RADIO_DIRECTIVES = [
|
|
|
2182
2181
|
];
|
|
2183
2182
|
class BaoRadioModule {
|
|
2184
2183
|
}
|
|
2185
|
-
BaoRadioModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2186
|
-
BaoRadioModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
2184
|
+
BaoRadioModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2185
|
+
BaoRadioModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoRadioModule, declarations: [BaoRadioButtonComponent,
|
|
2187
2186
|
BaoRadioDescription,
|
|
2188
2187
|
BaoRadioButtonGroupComponent], imports: [CommonModule,
|
|
2189
2188
|
FormsModule,
|
|
@@ -2193,15 +2192,13 @@ BaoRadioModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
2193
2192
|
ObserversModule], exports: [BaoRadioButtonComponent,
|
|
2194
2193
|
BaoRadioDescription,
|
|
2195
2194
|
BaoRadioButtonGroupComponent] });
|
|
2196
|
-
BaoRadioModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
]] });
|
|
2204
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BaoRadioModule, decorators: [{
|
|
2195
|
+
BaoRadioModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoRadioModule, imports: [CommonModule,
|
|
2196
|
+
FormsModule,
|
|
2197
|
+
ReactiveFormsModule,
|
|
2198
|
+
BaoCommonComponentsModule,
|
|
2199
|
+
BaoButtonModule,
|
|
2200
|
+
ObserversModule] });
|
|
2201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoRadioModule, decorators: [{
|
|
2205
2202
|
type: NgModule,
|
|
2206
2203
|
args: [{
|
|
2207
2204
|
imports: [
|
|
@@ -2229,8 +2226,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2229
2226
|
* See LICENSE file in the project root for full license information.
|
|
2230
2227
|
*/
|
|
2231
2228
|
const SPAN = 'span';
|
|
2232
|
-
const SPAN_TEXT_PROPERTY = 'textContent';
|
|
2233
|
-
const SCREEN_READER_CLASS_NAME = 'sr-only';
|
|
2229
|
+
const SPAN_TEXT_PROPERTY$1 = 'textContent';
|
|
2230
|
+
const SCREEN_READER_CLASS_NAME$1 = 'sr-only';
|
|
2234
2231
|
const BAO_ICON = 'bao-icon';
|
|
2235
2232
|
const HAS_ICON = 'has-icon';
|
|
2236
2233
|
class BaoTagComponent {
|
|
@@ -2259,8 +2256,8 @@ class BaoTagComponent {
|
|
|
2259
2256
|
}
|
|
2260
2257
|
addHiddenText() {
|
|
2261
2258
|
const screenReaderSpan = this.renderer.createElement(SPAN);
|
|
2262
|
-
this.renderer.setProperty(screenReaderSpan, SPAN_TEXT_PROPERTY, this.hiddenText);
|
|
2263
|
-
this.renderer.addClass(screenReaderSpan, SCREEN_READER_CLASS_NAME);
|
|
2259
|
+
this.renderer.setProperty(screenReaderSpan, SPAN_TEXT_PROPERTY$1, this.hiddenText);
|
|
2260
|
+
this.renderer.addClass(screenReaderSpan, SCREEN_READER_CLASS_NAME$1);
|
|
2264
2261
|
const labelChild = Array.from(this.nativeElement.children).find(c => c.localName === SPAN);
|
|
2265
2262
|
this.renderer.insertBefore(this.nativeElement, screenReaderSpan, labelChild);
|
|
2266
2263
|
}
|
|
@@ -2271,9 +2268,9 @@ class BaoTagComponent {
|
|
|
2271
2268
|
}
|
|
2272
2269
|
}
|
|
2273
2270
|
}
|
|
2274
|
-
BaoTagComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2275
|
-
BaoTagComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2276
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2271
|
+
BaoTagComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoTagComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2272
|
+
BaoTagComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoTagComponent, selector: "bao-tag, [bao-tag], [baoTag]", inputs: { type: "type", variant: "variant", hiddenText: "hiddenText" }, host: { properties: { "class.bao-tag-neutral-light": "type === \"neutral\" && variant === \"light\"", "class.bao-tag-neutral-strong": "type === \"neutral\" && variant === \"strong\"", "class.bao-tag-info-light": "type === \"info\" && variant === \"light\"", "class.bao-tag-info-strong": "type === \"info\" && variant === \"strong\"", "class.bao-tag-positive-light": "type === \"positive\" && variant === \"light\"", "class.bao-tag-positive-strong": "type === \"positive\" && variant === \"strong\"", "class.bao-tag-alert-light": "type === \"alert\" && variant === \"light\"", "class.bao-tag-alert-strong": "type === \"alert\" && variant === \"strong\"", "class.bao-tag-negative-light": "type === \"negative\" && variant === \"light\"", "class.bao-tag-negative-strong": "type === \"negative\" && variant === \"strong\"" }, classAttribute: "bao-tag" }, ngImport: i0, template: "<ng-content select=\"bao-icon\"></ng-content>\n<ng-content></ng-content>\n", styles: [".bao-tag{display:inline-flex;align-items:center;padding:.125rem .5rem;border-radius:.125rem;line-height:1.5rem}.bao-tag.has-icon{padding-left:.25rem}.bao-tag.bao-tag-info-light{background-color:#e6f5f9;color:#004b7b}.bao-tag.bao-tag-info-strong{background-color:#0079c4;color:#fff}.bao-tag.bao-tag-positive-light{background-color:#e7f6f0;color:#025d29}.bao-tag.bao-tag-positive-strong{background-color:#0da566;color:#fff}.bao-tag.bao-tag-negative-light{background-color:#ffebe6;color:#851a00}.bao-tag.bao-tag-negative-strong{background-color:#d3310a;color:#fff}.bao-tag.bao-tag-alert-light{background-color:#fefae6;color:#6c4600}.bao-tag.bao-tag-alert-strong{background-color:#ffb833;color:#212529}.bao-tag.bao-tag-neutral-light{background-color:#dee2e6;color:#212529}.bao-tag.bao-tag-neutral-strong{background-color:#212529;color:#fff}.bao-tag>span{font-weight:700;font-size:.875rem;line-height:1.25rem}.bao-tag>.bao-icon{height:1rem;width:1rem;margin-right:.25rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2273
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoTagComponent, decorators: [{
|
|
2277
2274
|
type: Component,
|
|
2278
2275
|
args: [{ selector: 'bao-tag, [bao-tag], [baoTag]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2279
2276
|
class: 'bao-tag',
|
|
@@ -2287,7 +2284,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2287
2284
|
'[class.bao-tag-alert-strong]': 'type === "alert" && variant === "strong"',
|
|
2288
2285
|
'[class.bao-tag-negative-light]': 'type === "negative" && variant === "light"',
|
|
2289
2286
|
'[class.bao-tag-negative-strong]': 'type === "negative" && variant === "strong"'
|
|
2290
|
-
}, template: "<ng-content select=\"bao-icon\"></ng-content>\n<ng-content></ng-content>\n", styles: [".bao-tag{display:inline-flex;align-items:center;padding:.125rem .5rem;border-radius:.125rem;line-height:1.5rem}.bao-tag.has-icon{padding-left:.25rem}.bao-tag.bao-tag-info-light{background-color:#e6f5f9;color:#004b7b}.bao-tag.bao-tag-info-strong{background-color:#0079c4;color:#fff}.bao-tag.bao-tag-positive-light{background-color:#e7f6f0;color:#025d29}.bao-tag.bao-tag-positive-strong{background-color:#0da566;color:#fff}.bao-tag.bao-tag-negative-light{background-color:#ffebe6;color:#851a00}.bao-tag.bao-tag-negative-strong{background-color:#d3310a;color:#fff}.bao-tag.bao-tag-alert-light{background-color:#fefae6;color:#6c4600}.bao-tag.bao-tag-alert-strong{background-color:#ffb833;color:#212529}.bao-tag.bao-tag-neutral-light{background-color:#dee2e6;color:#212529}.bao-tag.bao-tag-neutral-strong{background-color:#212529;color:#fff}.bao-tag>span{font-weight:700;font-size:.875rem;line-height:1.25rem}.bao-tag>.bao-icon{height:1rem;width:1rem;
|
|
2287
|
+
}, template: "<ng-content select=\"bao-icon\"></ng-content>\n<ng-content></ng-content>\n", styles: [".bao-tag{display:inline-flex;align-items:center;padding:.125rem .5rem;border-radius:.125rem;line-height:1.5rem}.bao-tag.has-icon{padding-left:.25rem}.bao-tag.bao-tag-info-light{background-color:#e6f5f9;color:#004b7b}.bao-tag.bao-tag-info-strong{background-color:#0079c4;color:#fff}.bao-tag.bao-tag-positive-light{background-color:#e7f6f0;color:#025d29}.bao-tag.bao-tag-positive-strong{background-color:#0da566;color:#fff}.bao-tag.bao-tag-negative-light{background-color:#ffebe6;color:#851a00}.bao-tag.bao-tag-negative-strong{background-color:#d3310a;color:#fff}.bao-tag.bao-tag-alert-light{background-color:#fefae6;color:#6c4600}.bao-tag.bao-tag-alert-strong{background-color:#ffb833;color:#212529}.bao-tag.bao-tag-neutral-light{background-color:#dee2e6;color:#212529}.bao-tag.bao-tag-neutral-strong{background-color:#212529;color:#fff}.bao-tag>span{font-weight:700;font-size:.875rem;line-height:1.25rem}.bao-tag>.bao-icon{height:1rem;width:1rem;margin-right:.25rem}\n"] }]
|
|
2291
2288
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { type: [{
|
|
2292
2289
|
type: Input
|
|
2293
2290
|
}], variant: [{
|
|
@@ -2304,10 +2301,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2304
2301
|
const TAG_DIRECTIVES = [BaoTagComponent];
|
|
2305
2302
|
class BaoTagModule {
|
|
2306
2303
|
}
|
|
2307
|
-
BaoTagModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2308
|
-
BaoTagModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
2309
|
-
BaoTagModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2310
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2304
|
+
BaoTagModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoTagModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2305
|
+
BaoTagModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoTagModule, declarations: [BaoTagComponent], imports: [CommonModule], exports: [BaoTagComponent] });
|
|
2306
|
+
BaoTagModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoTagModule, imports: [CommonModule] });
|
|
2307
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoTagModule, decorators: [{
|
|
2311
2308
|
type: NgModule,
|
|
2312
2309
|
args: [{
|
|
2313
2310
|
imports: [CommonModule],
|
|
@@ -2341,10 +2338,9 @@ class BaoSummaryComponent {
|
|
|
2341
2338
|
* Initialize the ID for summary
|
|
2342
2339
|
*/
|
|
2343
2340
|
this._uniqueId = `bao-summary-${++summaryUniqueId}`;
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
this.id = this._uniqueId;
|
|
2341
|
+
if (!this.id) {
|
|
2342
|
+
this.id = this._uniqueId;
|
|
2343
|
+
}
|
|
2348
2344
|
}
|
|
2349
2345
|
get nativeElement() {
|
|
2350
2346
|
return this.elementRef.nativeElement;
|
|
@@ -2389,9 +2385,9 @@ class BaoSummaryComponent {
|
|
|
2389
2385
|
return element;
|
|
2390
2386
|
}
|
|
2391
2387
|
}
|
|
2392
|
-
BaoSummaryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2393
|
-
BaoSummaryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2394
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2388
|
+
BaoSummaryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSummaryComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2389
|
+
BaoSummaryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoSummaryComponent, selector: "bao-summary, [bao-summary], [baoSummary]", inputs: { displayMode: "displayMode", id: "id" }, host: { properties: { "class.bao-displaymode-compact": "displayMode === \"compact\"" }, classAttribute: "bao-summary" }, ngImport: i0, template: "<ng-content select=\"bao-label\"></ng-content>\n<ng-content select=\"bao-guiding-text, [bao-guiding-text]\"></ng-content>\n\n<div class=\"bao-summary-content\">\n <div class=\"bao-summary-text\">\n <ng-content select=\"bao-title-text, [bao-title-text]\"></ng-content>\n <ng-content select=\"bao-summary-description\"></ng-content>\n <ng-content\n select=\"bao-list-summary, [bao-list-summary], [baoListSummary]\"\n ></ng-content>\n </div>\n <ng-content select=\"button[bao-button]\"></ng-content>\n</div>\n<ng-content select=\"bao-error, [bao-error]\"></ng-content>\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-summary .bao-label,.bao-summary .bao-guiding-text{margin:0 0 .5rem}.bao-summary .bao-summary-content{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;border:.063rem solid #ced4da;box-sizing:border-box;border-radius:.25rem;padding:.5rem .5rem 1rem 1rem}.bao-summary .bao-summary-content .bao-summary-text{display:flex;flex-direction:column;padding:.5rem .5rem 0 0}.bao-summary .bao-summary-content .bao-summary-text .bao-summary-description{font-weight:400;font-size:1rem;line-height:1.5rem}.bao-summary .bao-summary-content .bao-summary-text .bao-summary-description p{margin-bottom:0}.bao-summary .bao-summary-content button.buttonText{display:none}.bao-summary .bao-summary-content button.buttonIcon{margin-left:.5rem}@media (min-width: 576px){.bao-summary:not(.bao-displaymode-compact) .bao-summary-content{padding:1.5rem 1.5rem 2rem 2rem}.bao-summary:not(.bao-displaymode-compact) .bao-summary-content button.buttonText{display:block;margin-left:.5rem}.bao-summary:not(.bao-displaymode-compact) .bao-summary-content button.buttonIcon{display:none}}.bao-summary .bao-error{margin-top:.5rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSummaryComponent, decorators: [{
|
|
2395
2391
|
type: Component,
|
|
2396
2392
|
args: [{ selector: 'bao-summary, [bao-summary], [baoSummary]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2397
2393
|
class: 'bao-summary',
|
|
@@ -2404,9 +2400,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2404
2400
|
}] } });
|
|
2405
2401
|
class BaoSummaryDescription {
|
|
2406
2402
|
}
|
|
2407
|
-
BaoSummaryDescription.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2408
|
-
BaoSummaryDescription.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2409
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2403
|
+
BaoSummaryDescription.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSummaryDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2404
|
+
BaoSummaryDescription.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoSummaryDescription, selector: "bao-summary-description, [bao-summary-description], [baoSummaryDescription]", host: { classAttribute: "bao-summary-description" }, ngImport: i0 });
|
|
2405
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSummaryDescription, decorators: [{
|
|
2410
2406
|
type: Directive,
|
|
2411
2407
|
args: [{
|
|
2412
2408
|
selector: 'bao-summary-description, [bao-summary-description], [baoSummaryDescription]',
|
|
@@ -2421,9 +2417,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2421
2417
|
*/
|
|
2422
2418
|
class BaoListSummaryItem {
|
|
2423
2419
|
}
|
|
2424
|
-
BaoListSummaryItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2425
|
-
BaoListSummaryItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2426
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2420
|
+
BaoListSummaryItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoListSummaryItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2421
|
+
BaoListSummaryItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoListSummaryItem, selector: "bao-list-summary-item, [bao-list-summary-item], [baoListSummaryItem]", host: { attributes: { "role": "listitem" }, classAttribute: "bao-list-summary-item" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: ["@charset \"UTF-8\";.bao-list-summary-item{font-weight:600;color:#000}.bao-list-summary-item:before{content:\"\\2022\";color:#d3310a;font-weight:700;display:inline-block;width:1em;margin-left:-1em}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2422
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoListSummaryItem, decorators: [{
|
|
2427
2423
|
type: Component,
|
|
2428
2424
|
args: [{ selector: 'bao-list-summary-item, [bao-list-summary-item], [baoListSummaryItem]', template: `<ng-content></ng-content>`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2429
2425
|
class: 'bao-list-summary-item',
|
|
@@ -2432,21 +2428,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2432
2428
|
}] });
|
|
2433
2429
|
class BaoListSummary {
|
|
2434
2430
|
}
|
|
2435
|
-
BaoListSummary.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2436
|
-
BaoListSummary.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2437
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2431
|
+
BaoListSummary.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoListSummary, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2432
|
+
BaoListSummary.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoListSummary, selector: "bao-list-summary, [bao-list-summary], [baoListSummary]", host: { attributes: { "role": "list" }, classAttribute: "bao-list-summary" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [".bao-list-summary{padding-left:2rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2433
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoListSummary, decorators: [{
|
|
2438
2434
|
type: Component,
|
|
2439
|
-
args: [{
|
|
2440
|
-
selector: 'bao-list-summary, [bao-list-summary], [baoListSummary]',
|
|
2441
|
-
template: `<ng-content></ng-content>`,
|
|
2442
|
-
styles: ['.bao-list-summary { padding-left:2rem }'],
|
|
2443
|
-
encapsulation: ViewEncapsulation.None,
|
|
2444
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2445
|
-
host: {
|
|
2435
|
+
args: [{ selector: 'bao-list-summary, [bao-list-summary], [baoListSummary]', template: `<ng-content></ng-content>`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2446
2436
|
class: 'bao-list-summary',
|
|
2447
2437
|
role: 'list'
|
|
2448
|
-
}
|
|
2449
|
-
}]
|
|
2438
|
+
}, styles: [".bao-list-summary{padding-left:2rem}\n"] }]
|
|
2450
2439
|
}] });
|
|
2451
2440
|
|
|
2452
2441
|
/*
|
|
@@ -2462,16 +2451,16 @@ const SUMMARY_DIRECTIVES = [
|
|
|
2462
2451
|
];
|
|
2463
2452
|
class BaoSummaryModule {
|
|
2464
2453
|
}
|
|
2465
|
-
BaoSummaryModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2466
|
-
BaoSummaryModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
2454
|
+
BaoSummaryModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSummaryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2455
|
+
BaoSummaryModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoSummaryModule, declarations: [BaoSummaryComponent,
|
|
2467
2456
|
BaoSummaryDescription,
|
|
2468
2457
|
BaoListSummary,
|
|
2469
2458
|
BaoListSummaryItem], imports: [CommonModule, BaoCommonComponentsModule], exports: [BaoSummaryComponent,
|
|
2470
2459
|
BaoSummaryDescription,
|
|
2471
2460
|
BaoListSummary,
|
|
2472
2461
|
BaoListSummaryItem] });
|
|
2473
|
-
BaoSummaryModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2474
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2462
|
+
BaoSummaryModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSummaryModule, imports: [CommonModule, BaoCommonComponentsModule] });
|
|
2463
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSummaryModule, decorators: [{
|
|
2475
2464
|
type: NgModule,
|
|
2476
2465
|
args: [{
|
|
2477
2466
|
imports: [CommonModule, BaoCommonComponentsModule],
|
|
@@ -2486,6 +2475,1398 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2486
2475
|
* See LICENSE file in the project root for full license information.
|
|
2487
2476
|
*/
|
|
2488
2477
|
|
|
2478
|
+
/*
|
|
2479
|
+
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
2480
|
+
* Licensed under the MIT license.
|
|
2481
|
+
* See LICENSE file in the project root for full license information.
|
|
2482
|
+
*/
|
|
2483
|
+
class BaoAvatarContent {
|
|
2484
|
+
}
|
|
2485
|
+
BaoAvatarContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAvatarContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2486
|
+
BaoAvatarContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoAvatarContent, selector: "bao-avatar-content, [bao-avatar-content]", host: { classAttribute: "bao-avatar-content" }, exportAs: ["baoAvatarContent"], ngImport: i0 });
|
|
2487
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAvatarContent, decorators: [{
|
|
2488
|
+
type: Directive,
|
|
2489
|
+
args: [{
|
|
2490
|
+
selector: 'bao-avatar-content, [bao-avatar-content]',
|
|
2491
|
+
exportAs: 'baoAvatarContent',
|
|
2492
|
+
host: {
|
|
2493
|
+
class: 'bao-avatar-content'
|
|
2494
|
+
}
|
|
2495
|
+
}]
|
|
2496
|
+
}] });
|
|
2497
|
+
const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
|
|
2498
|
+
const SVG_PROFILE_ICON = "<svg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'><circle cx='12' cy='12' r='12' fill='#DEE2E6'/><path fill-rule='evenodd' clip-rule='evenodd' d='M20.6328 20.3314C18.4504 22.5932 15.3877 24 11.9964 24C8.60514 24 5.54243 22.5932 3.36 20.3314C3.99242 18.9554 5.38284 18 6.99642 18H16.9964C18.61 18 20.0004 18.9554 20.6328 20.3314ZM17.9964 10C17.9964 13.3137 15.3101 16 11.9964 16C8.68272 16 5.99642 13.3137 5.99642 10C5.99642 6.68629 8.68272 4 11.9964 4C15.3101 4 17.9964 6.68629 17.9964 10Z' fill='#ADB2BD'/></svg>";
|
|
2499
|
+
const SCREEN_READER_CLASS_NAME = 'sr-only';
|
|
2500
|
+
const SPAN_TEXT_PROPERTY = 'textContent';
|
|
2501
|
+
class BaoAvatarComponent {
|
|
2502
|
+
constructor(renderer, elementRef) {
|
|
2503
|
+
this.renderer = renderer;
|
|
2504
|
+
this.elementRef = elementRef;
|
|
2505
|
+
/**
|
|
2506
|
+
* Name of the profile to be used as title of the avatar.
|
|
2507
|
+
*/
|
|
2508
|
+
this.profileName = 'Avatar du profil';
|
|
2509
|
+
/**
|
|
2510
|
+
* ID of the background color to be used if avatar's content is text.
|
|
2511
|
+
*/
|
|
2512
|
+
this.color = 'background-color-1';
|
|
2513
|
+
}
|
|
2514
|
+
get nativeElement() {
|
|
2515
|
+
return this.elementRef.nativeElement;
|
|
2516
|
+
}
|
|
2517
|
+
ngAfterViewInit() {
|
|
2518
|
+
if (!this.nativeElement.childNodes.length) {
|
|
2519
|
+
this.addIcon();
|
|
2520
|
+
}
|
|
2521
|
+
if (this.nativeElement.firstChild.nodeName === 'SPAN') {
|
|
2522
|
+
this.formatInitials(this.nativeElement.firstChild);
|
|
2523
|
+
}
|
|
2524
|
+
this.setProfileName(this.profileName, this.nativeElement.firstChild);
|
|
2525
|
+
}
|
|
2526
|
+
addIcon() {
|
|
2527
|
+
const div = this.renderer.createElement('DIV');
|
|
2528
|
+
div.innerHTML = SVG_PROFILE_ICON;
|
|
2529
|
+
const svg = div.querySelector('svg');
|
|
2530
|
+
const titleNode = this.renderer.createElement('title', SVG_NAMESPACE);
|
|
2531
|
+
const titleText = this.renderer.createText(this.profileName);
|
|
2532
|
+
this.renderer.appendChild(titleNode, titleText);
|
|
2533
|
+
this.renderer.insertBefore(svg, titleNode, svg.firstChild);
|
|
2534
|
+
this.renderer.appendChild(this.nativeElement, svg);
|
|
2535
|
+
}
|
|
2536
|
+
setProfileName(name, content) {
|
|
2537
|
+
switch (content.nodeName) {
|
|
2538
|
+
case 'IMG':
|
|
2539
|
+
this.renderer.setAttribute(content, 'alt', name);
|
|
2540
|
+
break;
|
|
2541
|
+
case 'SPAN':
|
|
2542
|
+
this.renderer.setAttribute(content, 'aria-hidden', 'true');
|
|
2543
|
+
const screenReaderSpan = this.renderer.createElement('span');
|
|
2544
|
+
this.renderer.setProperty(screenReaderSpan, SPAN_TEXT_PROPERTY, name);
|
|
2545
|
+
this.renderer.addClass(screenReaderSpan, SCREEN_READER_CLASS_NAME);
|
|
2546
|
+
this.renderer.insertBefore(this.nativeElement, screenReaderSpan, content);
|
|
2547
|
+
break;
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
formatInitials(content) {
|
|
2551
|
+
this.renderer.setValue(content.firstChild, content.firstChild.nodeValue.slice(0, 2));
|
|
2552
|
+
this.renderer.addClass(this.nativeElement, 'display-color');
|
|
2553
|
+
}
|
|
2554
|
+
}
|
|
2555
|
+
BaoAvatarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAvatarComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2556
|
+
BaoAvatarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoAvatarComponent, selector: "bao-avatar", inputs: { profileName: "profileName", color: "color" }, host: { properties: { "class.bao-avatar-color-1": "color === \"background-color-1\"", "class.bao-avatar-color-2": "color === \"background-color-2\"", "class.bao-avatar-color-3": "color === \"background-color-3\"", "class.bao-avatar-color-4": "color === \"background-color-4\"", "class.bao-avatar-color-5": "color === \"background-color-5\"", "class.bao-avatar-color-6": "color === \"background-color-6\"", "class.bao-avatar-color-7": "color === \"background-color-7\"", "class.bao-avatar-color-8": "color === \"background-color-8\"", "class.bao-avatar-color-9": "color === \"background-color-9\"", "class.bao-avatar-color-10": "color === \"background-color-10\"" }, classAttribute: "bao-avatar" }, ngImport: i0, template: "<ng-content select=\"bao-avatar-content, [bao-avatar-content]\"></ng-content>\n", styles: [".bao-avatar-color-1.display-color{background-color:#0380a9}.bao-avatar-color-2.display-color{background-color:#bd4f00}.bao-avatar-color-3.display-color{background-color:#448600}.bao-avatar-color-4.display-color{background-color:#dc00ac}.bao-avatar-color-5.display-color{background-color:#01866e}.bao-avatar-color-6.display-color{background-color:#e00}.bao-avatar-color-7.display-color{background-color:#980bad}.bao-avatar-color-8.display-color{background-color:#0057ff}.bao-avatar-color-9.display-color{background-color:#a36b00}.bao-avatar-color-10.display-color{background-color:#e0007c}.bao-avatar{display:inline-flex;justify-content:center;align-items:center;border:.0625rem solid transparent;width:1.5rem;height:1.5rem;border-radius:2rem}.bao-avatar>span.bao-avatar-content{font-weight:700;font-size:.875rem;line-height:1.25rem;text-transform:uppercase;color:#fff}.bao-avatar>img.bao-avatar-content{border-radius:2rem;max-width:100%}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
2557
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAvatarComponent, decorators: [{
|
|
2558
|
+
type: Component,
|
|
2559
|
+
args: [{ selector: 'bao-avatar', encapsulation: ViewEncapsulation.None, host: {
|
|
2560
|
+
class: 'bao-avatar',
|
|
2561
|
+
'[class.bao-avatar-color-1]': 'color === "background-color-1"',
|
|
2562
|
+
'[class.bao-avatar-color-2]': 'color === "background-color-2"',
|
|
2563
|
+
'[class.bao-avatar-color-3]': 'color === "background-color-3"',
|
|
2564
|
+
'[class.bao-avatar-color-4]': 'color === "background-color-4"',
|
|
2565
|
+
'[class.bao-avatar-color-5]': 'color === "background-color-5"',
|
|
2566
|
+
'[class.bao-avatar-color-6]': 'color === "background-color-6"',
|
|
2567
|
+
'[class.bao-avatar-color-7]': 'color === "background-color-7"',
|
|
2568
|
+
'[class.bao-avatar-color-8]': 'color === "background-color-8"',
|
|
2569
|
+
'[class.bao-avatar-color-9]': 'color === "background-color-9"',
|
|
2570
|
+
'[class.bao-avatar-color-10]': 'color === "background-color-10"'
|
|
2571
|
+
}, template: "<ng-content select=\"bao-avatar-content, [bao-avatar-content]\"></ng-content>\n", styles: [".bao-avatar-color-1.display-color{background-color:#0380a9}.bao-avatar-color-2.display-color{background-color:#bd4f00}.bao-avatar-color-3.display-color{background-color:#448600}.bao-avatar-color-4.display-color{background-color:#dc00ac}.bao-avatar-color-5.display-color{background-color:#01866e}.bao-avatar-color-6.display-color{background-color:#e00}.bao-avatar-color-7.display-color{background-color:#980bad}.bao-avatar-color-8.display-color{background-color:#0057ff}.bao-avatar-color-9.display-color{background-color:#a36b00}.bao-avatar-color-10.display-color{background-color:#e0007c}.bao-avatar{display:inline-flex;justify-content:center;align-items:center;border:.0625rem solid transparent;width:1.5rem;height:1.5rem;border-radius:2rem}.bao-avatar>span.bao-avatar-content{font-weight:700;font-size:.875rem;line-height:1.25rem;text-transform:uppercase;color:#fff}.bao-avatar>img.bao-avatar-content{border-radius:2rem;max-width:100%}\n"] }]
|
|
2572
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { profileName: [{
|
|
2573
|
+
type: Input
|
|
2574
|
+
}], color: [{
|
|
2575
|
+
type: Input
|
|
2576
|
+
}] } });
|
|
2577
|
+
|
|
2578
|
+
/*
|
|
2579
|
+
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
2580
|
+
* Licensed under the MIT license.
|
|
2581
|
+
* See LICENSE file in the project root for full license information.
|
|
2582
|
+
*/
|
|
2583
|
+
const AVATAR_DIRECTIVES = [BaoAvatarComponent, BaoAvatarContent];
|
|
2584
|
+
class BaoAvatarModule {
|
|
2585
|
+
}
|
|
2586
|
+
BaoAvatarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAvatarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2587
|
+
BaoAvatarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoAvatarModule, declarations: [BaoAvatarComponent, BaoAvatarContent], imports: [CommonModule], exports: [BaoAvatarComponent, BaoAvatarContent] });
|
|
2588
|
+
BaoAvatarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAvatarModule, imports: [CommonModule] });
|
|
2589
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAvatarModule, decorators: [{
|
|
2590
|
+
type: NgModule,
|
|
2591
|
+
args: [{
|
|
2592
|
+
imports: [CommonModule],
|
|
2593
|
+
declarations: [AVATAR_DIRECTIVES],
|
|
2594
|
+
exports: [AVATAR_DIRECTIVES]
|
|
2595
|
+
}]
|
|
2596
|
+
}] });
|
|
2597
|
+
|
|
2598
|
+
/*
|
|
2599
|
+
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
2600
|
+
* Licensed under the MIT license.
|
|
2601
|
+
* See LICENSE file in the project root for full license information.
|
|
2602
|
+
*/
|
|
2603
|
+
|
|
2604
|
+
/*
|
|
2605
|
+
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
2606
|
+
* Licensed under the MIT license.
|
|
2607
|
+
* See LICENSE file in the project root for full license information.
|
|
2608
|
+
*/
|
|
2609
|
+
/**
|
|
2610
|
+
* Unique number to generate a unique ID
|
|
2611
|
+
*/
|
|
2612
|
+
let tabsNextUniqueId = 0;
|
|
2613
|
+
class BaoTabHeader {
|
|
2614
|
+
constructor(renderer, elementRef) {
|
|
2615
|
+
this.renderer = renderer;
|
|
2616
|
+
this.elementRef = elementRef;
|
|
2617
|
+
/**
|
|
2618
|
+
* Emits its index when tab is clicked
|
|
2619
|
+
*/
|
|
2620
|
+
this.onTabClick = new EventEmitter();
|
|
2621
|
+
}
|
|
2622
|
+
get nativeElement() {
|
|
2623
|
+
return this.elementRef.nativeElement;
|
|
2624
|
+
}
|
|
2625
|
+
onClick(el) {
|
|
2626
|
+
const tabIndex = el.id.split('-')[el.id.split('-').length - 1];
|
|
2627
|
+
this.onTabClick.emit(tabIndex);
|
|
2628
|
+
}
|
|
2629
|
+
ngAfterViewInit() {
|
|
2630
|
+
this.renderer.setAttribute(this.nativeElement, 'role', 'tab');
|
|
2631
|
+
this.renderer.setAttribute(this.nativeElement, 'aria-selected', 'false');
|
|
2632
|
+
this.renderer.setAttribute(this.nativeElement, 'tabindex', '-1');
|
|
2633
|
+
}
|
|
2634
|
+
}
|
|
2635
|
+
BaoTabHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoTabHeader, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2636
|
+
BaoTabHeader.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoTabHeader, selector: "bao-tab-header, [bao-tab-header]", outputs: { onTabClick: "onTabClick" }, host: { listeners: { "click": "onClick($event.target)" }, classAttribute: "bao-tab-header" }, exportAs: ["baoTabHeader"], ngImport: i0 });
|
|
2637
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoTabHeader, decorators: [{
|
|
2638
|
+
type: Directive,
|
|
2639
|
+
args: [{
|
|
2640
|
+
selector: 'bao-tab-header, [bao-tab-header]',
|
|
2641
|
+
exportAs: 'baoTabHeader',
|
|
2642
|
+
host: {
|
|
2643
|
+
class: 'bao-tab-header'
|
|
2644
|
+
}
|
|
2645
|
+
}]
|
|
2646
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { onTabClick: [{
|
|
2647
|
+
type: Output
|
|
2648
|
+
}], onClick: [{
|
|
2649
|
+
type: HostListener,
|
|
2650
|
+
args: ['click', ['$event.target']]
|
|
2651
|
+
}] } });
|
|
2652
|
+
class BaoTabPanel {
|
|
2653
|
+
constructor(renderer, elementRef) {
|
|
2654
|
+
this.renderer = renderer;
|
|
2655
|
+
this.elementRef = elementRef;
|
|
2656
|
+
}
|
|
2657
|
+
get nativeElement() {
|
|
2658
|
+
return this.elementRef.nativeElement;
|
|
2659
|
+
}
|
|
2660
|
+
ngAfterViewInit() {
|
|
2661
|
+
this.renderer.setAttribute(this.nativeElement, 'role', 'tabpanel');
|
|
2662
|
+
this.renderer.setAttribute(this.nativeElement, 'hidden', 'true');
|
|
2663
|
+
this.renderer.setAttribute(this.nativeElement, 'tabindex', '0');
|
|
2664
|
+
this.renderer.setAttribute(this.nativeElement, 'aria-expanded', 'false');
|
|
2665
|
+
}
|
|
2666
|
+
}
|
|
2667
|
+
BaoTabPanel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoTabPanel, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2668
|
+
BaoTabPanel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoTabPanel, selector: "bao-panel, [bao-panel]", host: { classAttribute: "bao-panel" }, exportAs: ["baoPanel"], ngImport: i0 });
|
|
2669
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoTabPanel, decorators: [{
|
|
2670
|
+
type: Directive,
|
|
2671
|
+
args: [{
|
|
2672
|
+
selector: 'bao-panel, [bao-panel]',
|
|
2673
|
+
exportAs: 'baoPanel',
|
|
2674
|
+
host: {
|
|
2675
|
+
class: 'bao-panel'
|
|
2676
|
+
}
|
|
2677
|
+
}]
|
|
2678
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; } });
|
|
2679
|
+
class BaoTablistComponent {
|
|
2680
|
+
constructor(renderer, elementRef) {
|
|
2681
|
+
this.renderer = renderer;
|
|
2682
|
+
this.elementRef = elementRef;
|
|
2683
|
+
/**
|
|
2684
|
+
* Size of the tabs displayed
|
|
2685
|
+
*/
|
|
2686
|
+
this.size = 'large';
|
|
2687
|
+
/**
|
|
2688
|
+
* Optionnal value to be used as aria-label property on tablist component
|
|
2689
|
+
*/
|
|
2690
|
+
this.ariaLabel = 'onglets';
|
|
2691
|
+
/**
|
|
2692
|
+
* Emits the index of the new active tab
|
|
2693
|
+
*/
|
|
2694
|
+
this.activeTabChange = new EventEmitter();
|
|
2695
|
+
this.uniqueId = `bao-tablist-${tabsNextUniqueId++}`;
|
|
2696
|
+
}
|
|
2697
|
+
get nativeElement() {
|
|
2698
|
+
return this.elementRef.nativeElement;
|
|
2699
|
+
}
|
|
2700
|
+
get tabs() {
|
|
2701
|
+
return this.elementRef.nativeElement.children;
|
|
2702
|
+
}
|
|
2703
|
+
leftKeyEvent() {
|
|
2704
|
+
if (document.activeElement.parentElement.id === this.uniqueId) {
|
|
2705
|
+
this.activeTabIndex = this.getNextActivableTabIndex(parseInt(this.activeTabIndex), false);
|
|
2706
|
+
this.changeActiveTab(this.activeTabIndex, true);
|
|
2707
|
+
this.activeTabChange.emit(this.activeTabIndex);
|
|
2708
|
+
}
|
|
2709
|
+
}
|
|
2710
|
+
rightKeyEvent() {
|
|
2711
|
+
if (document.activeElement.parentElement.id === this.uniqueId) {
|
|
2712
|
+
this.activeTabIndex = this.getNextActivableTabIndex(parseInt(this.activeTabIndex), true);
|
|
2713
|
+
this.changeActiveTab(this.activeTabIndex, true);
|
|
2714
|
+
this.activeTabChange.emit(this.activeTabIndex);
|
|
2715
|
+
}
|
|
2716
|
+
}
|
|
2717
|
+
/**
|
|
2718
|
+
* Makes the focus visible on tab header when changing from mouse to keyboard navigation
|
|
2719
|
+
*/
|
|
2720
|
+
tabKeyEvent() {
|
|
2721
|
+
if (document.activeElement.parentElement.id === this.uniqueId) {
|
|
2722
|
+
this.renderer.addClass(this.tabs[this.activeTabIndex], 'focus-visible');
|
|
2723
|
+
}
|
|
2724
|
+
}
|
|
2725
|
+
/**
|
|
2726
|
+
* Makes the focus visible on tab header when changing from mouse to keyboard navigation
|
|
2727
|
+
*/
|
|
2728
|
+
tabShiftKeyEvent() {
|
|
2729
|
+
if (document.activeElement.parentElement.id === this.uniqueId) {
|
|
2730
|
+
this.renderer.addClass(this.tabs[this.activeTabIndex], 'focus-visible');
|
|
2731
|
+
}
|
|
2732
|
+
}
|
|
2733
|
+
ngAfterViewInit() {
|
|
2734
|
+
this.setTablistAttributes();
|
|
2735
|
+
if (this.nativeElement.childElementCount) {
|
|
2736
|
+
this.setInitialActiveTab();
|
|
2737
|
+
}
|
|
2738
|
+
}
|
|
2739
|
+
ngAfterContentInit() {
|
|
2740
|
+
this.tabHeaders.forEach((tab) => {
|
|
2741
|
+
tab.onTabClick.subscribe((index) => {
|
|
2742
|
+
this.renderer.removeClass(this.tabs[index], 'focus-visible');
|
|
2743
|
+
this.activeTabIndex = index;
|
|
2744
|
+
this.changeActiveTab(index, false);
|
|
2745
|
+
this.activeTabChange.emit(index);
|
|
2746
|
+
});
|
|
2747
|
+
});
|
|
2748
|
+
}
|
|
2749
|
+
ngOnDestroy() {
|
|
2750
|
+
this.tabHeaders.forEach((tab) => {
|
|
2751
|
+
tab.onTabClick.unsubscribe();
|
|
2752
|
+
});
|
|
2753
|
+
}
|
|
2754
|
+
setTablistAttributes() {
|
|
2755
|
+
this.renderer.setAttribute(this.nativeElement, 'role', 'tablist');
|
|
2756
|
+
this.renderer.setAttribute(this.nativeElement, 'aria-label', this.ariaLabel);
|
|
2757
|
+
this.renderer.setProperty(this.nativeElement, 'id', this.uniqueId);
|
|
2758
|
+
}
|
|
2759
|
+
setInitialActiveTab() {
|
|
2760
|
+
const firstTabIndex = Array.from(this.tabs).findIndex((tab) => !tab.attributes['disabled']);
|
|
2761
|
+
this.activeTabIndex = firstTabIndex.toString();
|
|
2762
|
+
this.renderer.setAttribute(this.tabs[firstTabIndex], 'aria-selected', 'true');
|
|
2763
|
+
this.renderer.addClass(this.tabs[firstTabIndex], 'active');
|
|
2764
|
+
this.renderer.addClass(this.tabs[firstTabIndex], 'focus-visible');
|
|
2765
|
+
this.renderer.removeAttribute(this.tabs[firstTabIndex], 'tabindex');
|
|
2766
|
+
}
|
|
2767
|
+
changeActiveTab(newActiveTabIndex, isFocusVisible) {
|
|
2768
|
+
Array.from(this.tabs).forEach((tab) => {
|
|
2769
|
+
if (tab.id === `bao-tab-${newActiveTabIndex}`) {
|
|
2770
|
+
if (isFocusVisible) {
|
|
2771
|
+
this.renderer.addClass(tab, 'focus-visible');
|
|
2772
|
+
}
|
|
2773
|
+
this.renderer.setAttribute(tab, 'aria-selected', 'true');
|
|
2774
|
+
this.renderer.addClass(tab, 'active');
|
|
2775
|
+
this.renderer.removeAttribute(tab, 'tabindex');
|
|
2776
|
+
tab.focus();
|
|
2777
|
+
}
|
|
2778
|
+
else {
|
|
2779
|
+
this.renderer.setAttribute(tab, 'aria-selected', 'false');
|
|
2780
|
+
this.renderer.removeClass(tab, 'active');
|
|
2781
|
+
this.renderer.setAttribute(tab, 'tabindex', '-1');
|
|
2782
|
+
this.renderer.removeClass(tab, 'focus-visible');
|
|
2783
|
+
}
|
|
2784
|
+
});
|
|
2785
|
+
}
|
|
2786
|
+
/**
|
|
2787
|
+
* Finds the next activable tab index when navigating with left and right arrow keys
|
|
2788
|
+
* @param currentIndex Tab index which currently has focus
|
|
2789
|
+
* @param isRight Whether the tab navigation is going in the right direction or not
|
|
2790
|
+
* @returns Index of the new tab that will receive focus
|
|
2791
|
+
*/
|
|
2792
|
+
getNextActivableTabIndex(currentIndex, isRight) {
|
|
2793
|
+
const nextIndex = isRight ? currentIndex + 1 : currentIndex - 1;
|
|
2794
|
+
const nextIndexInTablist = ((nextIndex % this.tabs.length) + this.tabs.length) % this.tabs.length;
|
|
2795
|
+
if (this.tabs[nextIndexInTablist].attributes['disabled']) {
|
|
2796
|
+
return this.getNextActivableTabIndex(nextIndexInTablist, isRight);
|
|
2797
|
+
}
|
|
2798
|
+
return nextIndexInTablist.toString();
|
|
2799
|
+
}
|
|
2800
|
+
}
|
|
2801
|
+
BaoTablistComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoTablistComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2802
|
+
BaoTablistComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoTablistComponent, selector: "bao-tablist, [bao-tablist]", inputs: { size: "size", ariaLabel: "ariaLabel" }, outputs: { activeTabChange: "activeTabChange" }, host: { listeners: { "window:keydown.arrowleft": "leftKeyEvent()", "window:keydown.arrowright": "rightKeyEvent()", "window:keydown.tab": "tabKeyEvent()", "window:keydown.shift.tab": "tabShiftKeyEvent()" }, properties: { "class.bao-tablist-small": "size === \"small\"", "class.bao-tablist-medium": "size === \"medium\"", "class.bao-tablist-large": "size === \"large\"" }, classAttribute: "bao-tablist" }, queries: [{ propertyName: "tabHeaders", predicate: BaoTabHeader }], ngImport: i0, template: "<ng-content></ng-content>\n", styles: [".bao-tablist{color:#637381;display:block;overflow:auto;white-space:nowrap;box-shadow:inset 0 -.125rem #ced4da}.bao-tablist.bao-tablist-small{font-weight:700;font-size:.75rem;line-height:1rem}.bao-tablist.bao-tablist-small>.bao-tab-header{padding:.5rem}.bao-tablist.bao-tablist-medium{font-weight:700;font-size:.875rem;line-height:1.25rem}.bao-tablist.bao-tablist-medium>.bao-tab-header{padding:.625rem 1rem}.bao-tablist.bao-tablist-large{font-weight:700;font-size:1rem;line-height:1.5rem}.bao-tablist.bao-tablist-large>.bao-tab-header{padding:1rem}.bao-tablist button{all:unset}.bao-tablist>.bao-tab-header:hover:not(:disabled){color:#097d6c;cursor:pointer;box-shadow:inset 0 -.125rem #097d6c}.bao-tablist>.bao-tab-header.active{color:#097d6c;box-shadow:inset 0 -.125rem #097d6c}.bao-tablist>.bao-tab-header:focus.focus-visible{box-shadow:inset 0 0 0 .1875rem #98bcde;color:#637381}.bao-tablist>.bao-tab-header:disabled{color:#adb2bd}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
2803
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoTablistComponent, decorators: [{
|
|
2804
|
+
type: Component,
|
|
2805
|
+
args: [{ selector: 'bao-tablist, [bao-tablist]', encapsulation: ViewEncapsulation.None, host: {
|
|
2806
|
+
class: 'bao-tablist',
|
|
2807
|
+
'[class.bao-tablist-small]': 'size === "small"',
|
|
2808
|
+
'[class.bao-tablist-medium]': 'size === "medium"',
|
|
2809
|
+
'[class.bao-tablist-large]': 'size === "large"'
|
|
2810
|
+
}, template: "<ng-content></ng-content>\n", styles: [".bao-tablist{color:#637381;display:block;overflow:auto;white-space:nowrap;box-shadow:inset 0 -.125rem #ced4da}.bao-tablist.bao-tablist-small{font-weight:700;font-size:.75rem;line-height:1rem}.bao-tablist.bao-tablist-small>.bao-tab-header{padding:.5rem}.bao-tablist.bao-tablist-medium{font-weight:700;font-size:.875rem;line-height:1.25rem}.bao-tablist.bao-tablist-medium>.bao-tab-header{padding:.625rem 1rem}.bao-tablist.bao-tablist-large{font-weight:700;font-size:1rem;line-height:1.5rem}.bao-tablist.bao-tablist-large>.bao-tab-header{padding:1rem}.bao-tablist button{all:unset}.bao-tablist>.bao-tab-header:hover:not(:disabled){color:#097d6c;cursor:pointer;box-shadow:inset 0 -.125rem #097d6c}.bao-tablist>.bao-tab-header.active{color:#097d6c;box-shadow:inset 0 -.125rem #097d6c}.bao-tablist>.bao-tab-header:focus.focus-visible{box-shadow:inset 0 0 0 .1875rem #98bcde;color:#637381}.bao-tablist>.bao-tab-header:disabled{color:#adb2bd}\n"] }]
|
|
2811
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { tabHeaders: [{
|
|
2812
|
+
type: ContentChildren,
|
|
2813
|
+
args: [BaoTabHeader]
|
|
2814
|
+
}], size: [{
|
|
2815
|
+
type: Input
|
|
2816
|
+
}], ariaLabel: [{
|
|
2817
|
+
type: Input
|
|
2818
|
+
}], activeTabChange: [{
|
|
2819
|
+
type: Output
|
|
2820
|
+
}], leftKeyEvent: [{
|
|
2821
|
+
type: HostListener,
|
|
2822
|
+
args: ['window:keydown.arrowleft']
|
|
2823
|
+
}], rightKeyEvent: [{
|
|
2824
|
+
type: HostListener,
|
|
2825
|
+
args: ['window:keydown.arrowright']
|
|
2826
|
+
}], tabKeyEvent: [{
|
|
2827
|
+
type: HostListener,
|
|
2828
|
+
args: ['window:keydown.tab']
|
|
2829
|
+
}], tabShiftKeyEvent: [{
|
|
2830
|
+
type: HostListener,
|
|
2831
|
+
args: ['window:keydown.shift.tab']
|
|
2832
|
+
}] } });
|
|
2833
|
+
class BaoTabsContainer {
|
|
2834
|
+
constructor(renderer, elementRef) {
|
|
2835
|
+
this.renderer = renderer;
|
|
2836
|
+
this.elementRef = elementRef;
|
|
2837
|
+
this.panelIdPrefix = 'bao-panel-';
|
|
2838
|
+
this.tabIdPrefix = 'bao-tab-';
|
|
2839
|
+
}
|
|
2840
|
+
get tabs() {
|
|
2841
|
+
return this.elementRef.nativeElement.querySelector('.bao-tablist').children;
|
|
2842
|
+
}
|
|
2843
|
+
get panels() {
|
|
2844
|
+
return this.elementRef.nativeElement.querySelectorAll('.bao-panel');
|
|
2845
|
+
}
|
|
2846
|
+
ngAfterViewInit() {
|
|
2847
|
+
this.setInitialActivePanel();
|
|
2848
|
+
Array.from(this.tabs).forEach((tab, idx) => {
|
|
2849
|
+
const tabId = `${this.tabIdPrefix}${idx}`;
|
|
2850
|
+
const panelId = `${this.panelIdPrefix}${idx}`;
|
|
2851
|
+
this.renderer.setProperty(tab, 'id', tabId);
|
|
2852
|
+
this.renderer.setProperty(this.panels[idx], 'id', panelId);
|
|
2853
|
+
this.renderer.setAttribute(tab, 'aria-controls', panelId);
|
|
2854
|
+
this.renderer.setAttribute(this.panels[idx], 'aria-labelledby', tabId);
|
|
2855
|
+
});
|
|
2856
|
+
}
|
|
2857
|
+
ngAfterContentInit() {
|
|
2858
|
+
this.tablist.activeTabChange.subscribe((index) => this.changeActivePanel(index));
|
|
2859
|
+
}
|
|
2860
|
+
ngOnDestroy() {
|
|
2861
|
+
this.tablist.activeTabChange.unsubscribe();
|
|
2862
|
+
}
|
|
2863
|
+
setInitialActivePanel() {
|
|
2864
|
+
const firstTabIndex = Array.from(this.tabs).findIndex((tab) => !tab.attributes['disabled']);
|
|
2865
|
+
this.renderer.removeAttribute(this.panels[firstTabIndex], 'hidden');
|
|
2866
|
+
this.renderer.setAttribute(this.panels[firstTabIndex], 'aria-expanded', 'true');
|
|
2867
|
+
}
|
|
2868
|
+
changeActivePanel(newActiveId) {
|
|
2869
|
+
this.panels.forEach((panel) => {
|
|
2870
|
+
if (panel.id === `${this.panelIdPrefix}${newActiveId}`) {
|
|
2871
|
+
this.renderer.removeAttribute(panel, 'hidden');
|
|
2872
|
+
this.renderer.setAttribute(panel, 'aria-expanded', 'true');
|
|
2873
|
+
}
|
|
2874
|
+
else {
|
|
2875
|
+
this.renderer.setAttribute(panel, 'hidden', 'true');
|
|
2876
|
+
this.renderer.setAttribute(panel, 'aria-expanded', 'false');
|
|
2877
|
+
}
|
|
2878
|
+
});
|
|
2879
|
+
}
|
|
2880
|
+
}
|
|
2881
|
+
BaoTabsContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoTabsContainer, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2882
|
+
BaoTabsContainer.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoTabsContainer, selector: "bao-tabs, [bao-tabs]", host: { classAttribute: "bao-tabs" }, queries: [{ propertyName: "tablist", first: true, predicate: BaoTablistComponent, descendants: true }], exportAs: ["baoTabs"], ngImport: i0 });
|
|
2883
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoTabsContainer, decorators: [{
|
|
2884
|
+
type: Directive,
|
|
2885
|
+
args: [{
|
|
2886
|
+
selector: 'bao-tabs, [bao-tabs]',
|
|
2887
|
+
exportAs: 'baoTabs',
|
|
2888
|
+
host: {
|
|
2889
|
+
class: 'bao-tabs'
|
|
2890
|
+
}
|
|
2891
|
+
}]
|
|
2892
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { tablist: [{
|
|
2893
|
+
type: ContentChild,
|
|
2894
|
+
args: [BaoTablistComponent]
|
|
2895
|
+
}] } });
|
|
2896
|
+
|
|
2897
|
+
/*
|
|
2898
|
+
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
2899
|
+
* Licensed under the MIT license.
|
|
2900
|
+
* See LICENSE file in the project root for full license information.
|
|
2901
|
+
*/
|
|
2902
|
+
const TABS_DIRECTIVES = [
|
|
2903
|
+
BaoTabsContainer,
|
|
2904
|
+
BaoTablistComponent,
|
|
2905
|
+
BaoTabHeader,
|
|
2906
|
+
BaoTabPanel
|
|
2907
|
+
];
|
|
2908
|
+
class BaoTabsModule {
|
|
2909
|
+
}
|
|
2910
|
+
BaoTabsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2911
|
+
BaoTabsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoTabsModule, declarations: [BaoTabsContainer,
|
|
2912
|
+
BaoTablistComponent,
|
|
2913
|
+
BaoTabHeader,
|
|
2914
|
+
BaoTabPanel], imports: [CommonModule], exports: [BaoTabsContainer,
|
|
2915
|
+
BaoTablistComponent,
|
|
2916
|
+
BaoTabHeader,
|
|
2917
|
+
BaoTabPanel] });
|
|
2918
|
+
BaoTabsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoTabsModule, imports: [CommonModule] });
|
|
2919
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoTabsModule, decorators: [{
|
|
2920
|
+
type: NgModule,
|
|
2921
|
+
args: [{
|
|
2922
|
+
imports: [CommonModule],
|
|
2923
|
+
declarations: [TABS_DIRECTIVES],
|
|
2924
|
+
exports: [TABS_DIRECTIVES]
|
|
2925
|
+
}]
|
|
2926
|
+
}] });
|
|
2927
|
+
|
|
2928
|
+
/*
|
|
2929
|
+
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
2930
|
+
* Licensed under the MIT license.
|
|
2931
|
+
* See LICENSE file in the project root for full license information.
|
|
2932
|
+
*/
|
|
2933
|
+
|
|
2934
|
+
/*
|
|
2935
|
+
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
2936
|
+
* Licensed under the MIT license.
|
|
2937
|
+
* See LICENSE file in the project root for full license information.
|
|
2938
|
+
*/
|
|
2939
|
+
/**
|
|
2940
|
+
* Animations used by MatDialog.
|
|
2941
|
+
* @docs-private
|
|
2942
|
+
*/
|
|
2943
|
+
const baoModalAnimations = {
|
|
2944
|
+
/** Animation that is applied on the modal container by default. */
|
|
2945
|
+
modalContainer: trigger('modalContainer', [
|
|
2946
|
+
// Note: The `enter` animation transitions to `transform: none`, because for some reason
|
|
2947
|
+
// specifying the transform explicitly, causes IE both to blur the modal content and
|
|
2948
|
+
// decimate the animation performance. Leaving it as `none` solves both issues.
|
|
2949
|
+
state('void, exit', style({ opacity: 0, transform: 'scale(0.7)' })),
|
|
2950
|
+
state('enter', style({ transform: 'none' })),
|
|
2951
|
+
transition('* => enter', group([
|
|
2952
|
+
animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'none', opacity: 1 })),
|
|
2953
|
+
query('@*', animateChild(), { optional: true })
|
|
2954
|
+
])),
|
|
2955
|
+
transition('* => void, * => exit', group([
|
|
2956
|
+
animate('75ms cubic-bezier(0.4, 0.0, 0.2, 1)', style({ opacity: 0 })),
|
|
2957
|
+
query('@*', animateChild(), { optional: true })
|
|
2958
|
+
]))
|
|
2959
|
+
])
|
|
2960
|
+
};
|
|
2961
|
+
|
|
2962
|
+
/*
|
|
2963
|
+
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
2964
|
+
* Licensed under the MIT license.
|
|
2965
|
+
* See LICENSE file in the project root for full license information.
|
|
2966
|
+
*/
|
|
2967
|
+
var eModalDesktopWidthSize;
|
|
2968
|
+
(function (eModalDesktopWidthSize) {
|
|
2969
|
+
eModalDesktopWidthSize["SMALL"] = "bao-modal-sm";
|
|
2970
|
+
eModalDesktopWidthSize["MEDIUM"] = "bao-modal-md";
|
|
2971
|
+
eModalDesktopWidthSize["LARGE"] = "bao-modal-lg"; // Full width minus 32px (global margin : left and rigth)
|
|
2972
|
+
})(eModalDesktopWidthSize || (eModalDesktopWidthSize = {}));
|
|
2973
|
+
var eModalMobileWidthSize;
|
|
2974
|
+
(function (eModalMobileWidthSize) {
|
|
2975
|
+
eModalMobileWidthSize["FULL"] = "bao-modal-mobil-full";
|
|
2976
|
+
eModalMobileWidthSize["COMPACT"] = "bao-modal-mobil-compact"; // 300px
|
|
2977
|
+
})(eModalMobileWidthSize || (eModalMobileWidthSize = {}));
|
|
2978
|
+
/**
|
|
2979
|
+
* Configuration for opening a modal dialog with the BaoModal service.
|
|
2980
|
+
*/
|
|
2981
|
+
class BaoModalInitialConfig {
|
|
2982
|
+
constructor() {
|
|
2983
|
+
/** The ARIA role of the dialog element. */
|
|
2984
|
+
this.role = 'dialog';
|
|
2985
|
+
/** Custom class for the overlay pane. */
|
|
2986
|
+
this.panelClass = '';
|
|
2987
|
+
/** Whether the dialog has a backdrop. */
|
|
2988
|
+
this.hasBackdrop = true;
|
|
2989
|
+
/** Custom class for the backdrop. */
|
|
2990
|
+
this.backdropClass = '';
|
|
2991
|
+
/** Whether the user can use escape or clicking on the backdrop to close the modal. */
|
|
2992
|
+
this.disableClose = false;
|
|
2993
|
+
/** Width of the dialog. */
|
|
2994
|
+
this.width = '';
|
|
2995
|
+
/** Height of the dialog. */
|
|
2996
|
+
this.height = '';
|
|
2997
|
+
/** Max-width of the dialog. If a number is provided, assumes pixel units. Defaults to 80vw. */
|
|
2998
|
+
this.maxWidth = '80vw';
|
|
2999
|
+
/** Data being injected into the child component. */
|
|
3000
|
+
this.data = null;
|
|
3001
|
+
/** ID of the element that describes the dialog. */
|
|
3002
|
+
this.ariaDescribedBy = null;
|
|
3003
|
+
/** ID of the element that labels the dialog. */
|
|
3004
|
+
this.ariaLabelledBy = null;
|
|
3005
|
+
/** Aria label to assign to the dialog element. */
|
|
3006
|
+
this.ariaLabel = null;
|
|
3007
|
+
/**
|
|
3008
|
+
* Where the dialog should focus on open.
|
|
3009
|
+
*/
|
|
3010
|
+
this.autoFocus = 'first-tabbable';
|
|
3011
|
+
/**
|
|
3012
|
+
* Whether the dialog should restore focus to the
|
|
3013
|
+
* previously-focused element, after it's closed.
|
|
3014
|
+
*/
|
|
3015
|
+
this.restoreFocus = true;
|
|
3016
|
+
/** Whether to wait for the opening animation to finish before trapping focus. */
|
|
3017
|
+
this.delayFocusTrap = true;
|
|
3018
|
+
/**
|
|
3019
|
+
* Whether the dialog should close when the user goes backwards/forwards in history.
|
|
3020
|
+
* Note that this usually doesn't include clicking on links (unless the user is using
|
|
3021
|
+
* the `HashLocationStrategy`).
|
|
3022
|
+
*/
|
|
3023
|
+
this.closeOnNavigation = true;
|
|
3024
|
+
}
|
|
3025
|
+
}
|
|
3026
|
+
|
|
3027
|
+
/**
|
|
3028
|
+
* Throws an exception for the case when a ComponentPortal is
|
|
3029
|
+
* attached to a DomPortalOutlet without an origin.
|
|
3030
|
+
* @docs-private
|
|
3031
|
+
*/
|
|
3032
|
+
function throwBaoModalContentAlreadyAttachedError() {
|
|
3033
|
+
throw Error('Attempting to attach modal content after content is already attached');
|
|
3034
|
+
}
|
|
3035
|
+
/**
|
|
3036
|
+
* Base class for the `BaoModalContainer`. The base class does not implement
|
|
3037
|
+
* animations as these are left to implementers of the modal container.
|
|
3038
|
+
*/
|
|
3039
|
+
class _BaoModalContainerBase extends BasePortalOutlet {
|
|
3040
|
+
constructor(_elementRef, _focusTrapFactory, _changeDetectorRef, _document,
|
|
3041
|
+
/** The modal configuration. */
|
|
3042
|
+
_config, _interactivityChecker, _ngZone, _focusMonitor) {
|
|
3043
|
+
super();
|
|
3044
|
+
this._elementRef = _elementRef;
|
|
3045
|
+
this._focusTrapFactory = _focusTrapFactory;
|
|
3046
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
3047
|
+
this._config = _config;
|
|
3048
|
+
this._interactivityChecker = _interactivityChecker;
|
|
3049
|
+
this._ngZone = _ngZone;
|
|
3050
|
+
this._focusMonitor = _focusMonitor;
|
|
3051
|
+
/** Emits when an animation state changes. */
|
|
3052
|
+
this._animationStateChanged = new EventEmitter();
|
|
3053
|
+
/**
|
|
3054
|
+
* Type of interaction that led to the modal being closed. This is used to determine
|
|
3055
|
+
* whether the focus style will be applied when returning focus to its original location
|
|
3056
|
+
* after the modal is closed.
|
|
3057
|
+
*/
|
|
3058
|
+
this._closeInteractionType = null;
|
|
3059
|
+
/** Element that was focused before the modal was opened. Save this to restore upon close. */
|
|
3060
|
+
this._elementFocusedBeforeDialogWasOpened = null;
|
|
3061
|
+
this._ariaLabelledBy = _config.ariaLabelledBy || null;
|
|
3062
|
+
this._document = _document;
|
|
3063
|
+
}
|
|
3064
|
+
/** Initializes the modal container with the attached content. */
|
|
3065
|
+
_initializeWithAttachedContent() {
|
|
3066
|
+
this._setupFocusTrap();
|
|
3067
|
+
// Save the previously focused element. This element will be re-focused
|
|
3068
|
+
// when the modal closes.
|
|
3069
|
+
this._capturePreviouslyFocusedElement();
|
|
3070
|
+
}
|
|
3071
|
+
/**
|
|
3072
|
+
* Attach a ComponentPortal as content to this modal container.
|
|
3073
|
+
*/
|
|
3074
|
+
attachComponentPortal(portal) {
|
|
3075
|
+
return this._portalOutlet.attachComponentPortal(portal);
|
|
3076
|
+
}
|
|
3077
|
+
/**
|
|
3078
|
+
* Attach a TemplatePortal as content to this modal container.
|
|
3079
|
+
*/
|
|
3080
|
+
attachTemplatePortal(portal) {
|
|
3081
|
+
return this._portalOutlet.attachTemplatePortal(portal);
|
|
3082
|
+
}
|
|
3083
|
+
/** Moves focus back into the modal if it was moved out. */
|
|
3084
|
+
_recaptureFocus() {
|
|
3085
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3086
|
+
if (!this._containsFocus()) {
|
|
3087
|
+
yield this._trapFocus();
|
|
3088
|
+
}
|
|
3089
|
+
});
|
|
3090
|
+
}
|
|
3091
|
+
/**
|
|
3092
|
+
* Moves the focus inside the focus trap. When autoFocus is not set to 'modal', if focus
|
|
3093
|
+
* cannot be moved then focus will go to the modal container.
|
|
3094
|
+
*/
|
|
3095
|
+
_trapFocus() {
|
|
3096
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3097
|
+
const element = this._elementRef.nativeElement;
|
|
3098
|
+
// If were to attempt to focus immediately, then the content of the modal would not yet be
|
|
3099
|
+
// ready in instances where change detection has to run first. To deal with this, we simply
|
|
3100
|
+
// wait for the microtask queue to be empty when setting focus when autoFocus isn't set to
|
|
3101
|
+
// modal. If the element inside the modal can't be focused, then the container is focused
|
|
3102
|
+
// so the user can't tab into other elements behind it.
|
|
3103
|
+
switch (this._config.autoFocus) {
|
|
3104
|
+
case 'modal':
|
|
3105
|
+
// Ensure that focus is on the modal container. It's possible that a different
|
|
3106
|
+
// component tried to move focus while the open animation was running. See:
|
|
3107
|
+
// https://github.com/angular/components/issues/16215. Note that we only want to do this
|
|
3108
|
+
// if the focus isn't inside the modal already, because it's possible that the consumer
|
|
3109
|
+
// turned off `autoFocus` in order to move focus themselves.
|
|
3110
|
+
if (!this._containsFocus()) {
|
|
3111
|
+
element.focus();
|
|
3112
|
+
}
|
|
3113
|
+
break;
|
|
3114
|
+
case 'first-tabbable':
|
|
3115
|
+
// If we weren't able to find a focusable element in the modal, then focus the modal
|
|
3116
|
+
// container instead.
|
|
3117
|
+
const focusedSuccessfully = yield this._focusTrap.focusInitialElementWhenReady();
|
|
3118
|
+
if (!focusedSuccessfully) {
|
|
3119
|
+
this._focusDialogContainer();
|
|
3120
|
+
}
|
|
3121
|
+
break;
|
|
3122
|
+
case 'first-heading':
|
|
3123
|
+
this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');
|
|
3124
|
+
break;
|
|
3125
|
+
default:
|
|
3126
|
+
this._focusByCssSelector(this._config.autoFocus);
|
|
3127
|
+
break;
|
|
3128
|
+
}
|
|
3129
|
+
});
|
|
3130
|
+
}
|
|
3131
|
+
/** Restores focus to the element that was focused before the modal opened. */
|
|
3132
|
+
_restoreFocus() {
|
|
3133
|
+
const previousElement = this._elementFocusedBeforeDialogWasOpened;
|
|
3134
|
+
// We need the extra check, because IE can set the `activeElement` to null in some cases.
|
|
3135
|
+
if (this._config.restoreFocus &&
|
|
3136
|
+
previousElement &&
|
|
3137
|
+
typeof previousElement.focus === 'function') {
|
|
3138
|
+
const activeElement = _getFocusedElementPierceShadowDom();
|
|
3139
|
+
const element = this._elementRef.nativeElement;
|
|
3140
|
+
// Make sure that focus is still inside the modal or is on the body (usually because a
|
|
3141
|
+
// non-focusable element like the backdrop was clicked) before moving it. It's possible that
|
|
3142
|
+
// the consumer moved it themselves before the animation was done, in which case we shouldn't
|
|
3143
|
+
// do anything.
|
|
3144
|
+
if (!activeElement ||
|
|
3145
|
+
activeElement === this._document.body ||
|
|
3146
|
+
activeElement === element ||
|
|
3147
|
+
element.contains(activeElement)) {
|
|
3148
|
+
if (this._focusMonitor) {
|
|
3149
|
+
this._focusMonitor.focusVia(previousElement, this._closeInteractionType);
|
|
3150
|
+
this._closeInteractionType = null;
|
|
3151
|
+
}
|
|
3152
|
+
else {
|
|
3153
|
+
previousElement.focus();
|
|
3154
|
+
}
|
|
3155
|
+
}
|
|
3156
|
+
}
|
|
3157
|
+
if (this._focusTrap) {
|
|
3158
|
+
this._focusTrap.destroy();
|
|
3159
|
+
}
|
|
3160
|
+
}
|
|
3161
|
+
/**
|
|
3162
|
+
* Focuses the provided element. If the element is not focusable, it will add a tabIndex
|
|
3163
|
+
* attribute to forcefully focus it. The attribute is removed after focus is moved.
|
|
3164
|
+
*/
|
|
3165
|
+
_forceFocus(element, options) {
|
|
3166
|
+
if (!this._interactivityChecker.isFocusable(element)) {
|
|
3167
|
+
element.tabIndex = -1;
|
|
3168
|
+
// The tabindex attribute should be removed to avoid navigating to that element again
|
|
3169
|
+
this._ngZone.runOutsideAngular(() => {
|
|
3170
|
+
element.addEventListener('blur', () => element.removeAttribute('tabindex'));
|
|
3171
|
+
element.addEventListener('mousedown', () => element.removeAttribute('tabindex'));
|
|
3172
|
+
});
|
|
3173
|
+
}
|
|
3174
|
+
element.focus(options);
|
|
3175
|
+
}
|
|
3176
|
+
/**
|
|
3177
|
+
* Focuses the first element that matches the given selector within the focus trap.
|
|
3178
|
+
*/
|
|
3179
|
+
_focusByCssSelector(selector, options) {
|
|
3180
|
+
const elementToFocus = this._elementRef.nativeElement.querySelector(selector);
|
|
3181
|
+
if (elementToFocus) {
|
|
3182
|
+
this._forceFocus(elementToFocus, options);
|
|
3183
|
+
}
|
|
3184
|
+
}
|
|
3185
|
+
/** Sets up the focus trap. */
|
|
3186
|
+
_setupFocusTrap() {
|
|
3187
|
+
this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);
|
|
3188
|
+
}
|
|
3189
|
+
/** Captures the element that was focused before the modal was opened. */
|
|
3190
|
+
_capturePreviouslyFocusedElement() {
|
|
3191
|
+
if (this._document) {
|
|
3192
|
+
this._elementFocusedBeforeDialogWasOpened =
|
|
3193
|
+
_getFocusedElementPierceShadowDom();
|
|
3194
|
+
}
|
|
3195
|
+
}
|
|
3196
|
+
/** Focuses the modal container. */
|
|
3197
|
+
_focusDialogContainer() {
|
|
3198
|
+
// Note that there is no focus method when rendering on the server.
|
|
3199
|
+
if (this._elementRef.nativeElement.focus) {
|
|
3200
|
+
this._elementRef.nativeElement.focus();
|
|
3201
|
+
}
|
|
3202
|
+
}
|
|
3203
|
+
/** Returns whether focus is inside the modal. */
|
|
3204
|
+
_containsFocus() {
|
|
3205
|
+
const element = this._elementRef.nativeElement;
|
|
3206
|
+
const activeElement = _getFocusedElementPierceShadowDom();
|
|
3207
|
+
return element === activeElement || element.contains(activeElement);
|
|
3208
|
+
}
|
|
3209
|
+
}
|
|
3210
|
+
_BaoModalContainerBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: _BaoModalContainerBase, deps: [{ token: i0.ElementRef }, { token: i1$3.ConfigurableFocusTrapFactory }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT, optional: true }, { token: BaoModalInitialConfig }, { token: i1$3.InteractivityChecker }, { token: i0.NgZone }, { token: i1$3.FocusMonitor }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3211
|
+
_BaoModalContainerBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: _BaoModalContainerBase, viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0 });
|
|
3212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: _BaoModalContainerBase, decorators: [{
|
|
3213
|
+
type: Directive
|
|
3214
|
+
}], ctorParameters: function () {
|
|
3215
|
+
return [{ type: i0.ElementRef }, { type: i1$3.ConfigurableFocusTrapFactory }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
3216
|
+
type: Optional
|
|
3217
|
+
}, {
|
|
3218
|
+
type: Inject,
|
|
3219
|
+
args: [DOCUMENT]
|
|
3220
|
+
}] }, { type: BaoModalInitialConfig }, { type: i1$3.InteractivityChecker }, { type: i0.NgZone }, { type: i1$3.FocusMonitor }];
|
|
3221
|
+
}, propDecorators: { _portalOutlet: [{
|
|
3222
|
+
type: ViewChild,
|
|
3223
|
+
args: [CdkPortalOutlet, { static: true }]
|
|
3224
|
+
}] } });
|
|
3225
|
+
class BaoModalContainer extends _BaoModalContainerBase {
|
|
3226
|
+
constructor() {
|
|
3227
|
+
super(...arguments);
|
|
3228
|
+
/** State of the modal animation. */
|
|
3229
|
+
this._state = 'enter';
|
|
3230
|
+
}
|
|
3231
|
+
/** Callback, invoked whenever an animation on the host completes. */
|
|
3232
|
+
_onAnimationDone({ toState, totalTime }) {
|
|
3233
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3234
|
+
if (toState === 'enter') {
|
|
3235
|
+
yield this._trapFocus();
|
|
3236
|
+
this._animationStateChanged.next({ state: 'opened', totalTime });
|
|
3237
|
+
}
|
|
3238
|
+
else if (toState === 'exit') {
|
|
3239
|
+
this._restoreFocus();
|
|
3240
|
+
this._animationStateChanged.next({ state: 'closed', totalTime });
|
|
3241
|
+
}
|
|
3242
|
+
});
|
|
3243
|
+
}
|
|
3244
|
+
/** Callback, invoked when an animation on the host starts. */
|
|
3245
|
+
_onAnimationStart({ toState, totalTime }) {
|
|
3246
|
+
if (toState === 'enter') {
|
|
3247
|
+
this._animationStateChanged.next({ state: 'opening', totalTime });
|
|
3248
|
+
}
|
|
3249
|
+
else if (toState === 'exit' || toState === 'void') {
|
|
3250
|
+
this._animationStateChanged.next({ state: 'closing', totalTime });
|
|
3251
|
+
}
|
|
3252
|
+
}
|
|
3253
|
+
/** Starts the modal exit animation. */
|
|
3254
|
+
_startExitAnimation() {
|
|
3255
|
+
this._state = 'exit';
|
|
3256
|
+
// Mark the container for check so it can react if the
|
|
3257
|
+
// view container is using OnPush change detection.
|
|
3258
|
+
this._changeDetectorRef.markForCheck();
|
|
3259
|
+
}
|
|
3260
|
+
}
|
|
3261
|
+
BaoModalContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalContainer, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3262
|
+
BaoModalContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoModalContainer, selector: "bao-modal-container", host: { attributes: { "tabindex": "-1", "aria-modal": "true" }, listeners: { "@modalContainer.start": "_onAnimationStart($event)", "@modalContainer.done": "_onAnimationDone($event)" }, 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", "@modalContainer": "_state" }, classAttribute: "bao-modal-container" }, usesInheritance: true, ngImport: i0, template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: [".bao-container{padding-right:16px;padding-left:16px;margin-right:auto;margin-left:auto;width:100%}@media (min-width: 576px){.bao-container{max-width:576px}}@media (min-width: 768px){.bao-container{max-width:768px}}@media (min-width: 992px){.bao-container{max-width:992px}}@media (min-width: 1200px){.bao-container{max-width:1200px}}.bao-row{display:flex;flex-wrap:wrap;margin-right:-16px;margin-left:-16px}.bao-col-12,.bao-col-lg-7{position:relative;width:100%;padding-right:1rem;padding-left:1rem}@media (min-width: 992px){.bao-col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex}.cdk-overlay-pane.bao-modal-mobil-full{width:100%;height:100%}.cdk-overlay-pane.bao-modal-mobil-compact{width:300px;height:100%}@media (min-width: 768px){.cdk-overlay-pane{width:500px;height:auto}.cdk-overlay-pane.bao-modal-lg{width:calc(100% - 4rem);height:calc(100% - 4rem)}.cdk-overlay-pane.bao-modal-md,.cdk-overlay-pane.bao-modal-sm{width:500px;height:auto}}@media (min-width: 992px){.cdk-overlay-pane{width:500px;height:auto}.cdk-overlay-pane.bao-modal-lg{width:calc(100% - 4rem);height:calc(100% - 4rem)}.cdk-overlay-pane.bao-modal-md{width:800px;height:auto}.cdk-overlay-pane.bao-modal-sm{width:500px;height:auto}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.5}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:black}.cdk-overlay-transparent-backdrop,.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:.5}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.bao-modal-container{display:block;overflow:auto;width:100%;height:100%;min-height:inherit;max-height:inherit;background-color:#fff;background-clip:padding-box;border:0 solid rgba(0,0,0,.2);border-radius:.5rem;outline:0}.bao-modal-content{display:flex;flex-direction:column;height:100%}.bao-modal-header{flex:0 0 auto;display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid #ced4da;border-top-left-radius:.5rem;border-top-right-radius:.5rem}.bao-modal-header .bao-modal-title{font-size:1rem;line-height:1.5rem;margin:1rem 0 1rem 1rem}.bao-modal-header button{margin:.5rem}.bao-modal-body{display:block;padding:1rem;overflow:auto;flex-grow:1}@media (min-width: 768px){.bao-modal-body{padding:2rem}}.bao-modal-footer{display:flex;flex-wrap:wrap;padding:1rem;border-top:1px solid #ced4da;border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.bao-modal-footer.bao-modal-footer-order{justify-content:unset;flex-direction:column-reverse}.bao-modal-footer button{text-align:center}.bao-modal-footer .bao-button-primary,.bao-modal-footer .bao-button-secondary{width:100%;display:block}.bao-modal-footer .bao-button-secondary{margin-bottom:.5rem}.bao-modal-footer .bao-button-tertiary{display:none}@media (min-width: 768px){.bao-modal-footer{justify-content:flex-end}.bao-modal-footer.bao-modal-footer-order{flex-direction:row-reverse}.bao-modal-footer .bao-button-primary{margin-left:1rem}.bao-modal-footer .bao-button-secondary{margin-bottom:0}.bao-modal-footer .bao-button-primary,.bao-modal-footer .bao-button-secondary{width:auto}.bao-modal-footer .bao-button-tertiary{display:block}}\n"], dependencies: [{ kind: "directive", type: i3.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [baoModalAnimations.modalContainer], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
3263
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalContainer, decorators: [{
|
|
3264
|
+
type: Component,
|
|
3265
|
+
args: [{ selector: 'bao-modal-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, animations: [baoModalAnimations.modalContainer], host: {
|
|
3266
|
+
class: 'bao-modal-container',
|
|
3267
|
+
tabindex: '-1',
|
|
3268
|
+
'aria-modal': 'true',
|
|
3269
|
+
'[id]': '_id',
|
|
3270
|
+
'[attr.role]': '_config.role',
|
|
3271
|
+
'[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy',
|
|
3272
|
+
'[attr.aria-label]': '_config.ariaLabel',
|
|
3273
|
+
'[attr.aria-describedby]': '_config.ariaDescribedBy || null',
|
|
3274
|
+
'[@modalContainer]': '_state',
|
|
3275
|
+
'(@modalContainer.start)': '_onAnimationStart($event)',
|
|
3276
|
+
'(@modalContainer.done)': '_onAnimationDone($event)'
|
|
3277
|
+
}, template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: [".bao-container{padding-right:16px;padding-left:16px;margin-right:auto;margin-left:auto;width:100%}@media (min-width: 576px){.bao-container{max-width:576px}}@media (min-width: 768px){.bao-container{max-width:768px}}@media (min-width: 992px){.bao-container{max-width:992px}}@media (min-width: 1200px){.bao-container{max-width:1200px}}.bao-row{display:flex;flex-wrap:wrap;margin-right:-16px;margin-left:-16px}.bao-col-12,.bao-col-lg-7{position:relative;width:100%;padding-right:1rem;padding-left:1rem}@media (min-width: 992px){.bao-col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex}.cdk-overlay-pane.bao-modal-mobil-full{width:100%;height:100%}.cdk-overlay-pane.bao-modal-mobil-compact{width:300px;height:100%}@media (min-width: 768px){.cdk-overlay-pane{width:500px;height:auto}.cdk-overlay-pane.bao-modal-lg{width:calc(100% - 4rem);height:calc(100% - 4rem)}.cdk-overlay-pane.bao-modal-md,.cdk-overlay-pane.bao-modal-sm{width:500px;height:auto}}@media (min-width: 992px){.cdk-overlay-pane{width:500px;height:auto}.cdk-overlay-pane.bao-modal-lg{width:calc(100% - 4rem);height:calc(100% - 4rem)}.cdk-overlay-pane.bao-modal-md{width:800px;height:auto}.cdk-overlay-pane.bao-modal-sm{width:500px;height:auto}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.5}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:black}.cdk-overlay-transparent-backdrop,.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:.5}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.bao-modal-container{display:block;overflow:auto;width:100%;height:100%;min-height:inherit;max-height:inherit;background-color:#fff;background-clip:padding-box;border:0 solid rgba(0,0,0,.2);border-radius:.5rem;outline:0}.bao-modal-content{display:flex;flex-direction:column;height:100%}.bao-modal-header{flex:0 0 auto;display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid #ced4da;border-top-left-radius:.5rem;border-top-right-radius:.5rem}.bao-modal-header .bao-modal-title{font-size:1rem;line-height:1.5rem;margin:1rem 0 1rem 1rem}.bao-modal-header button{margin:.5rem}.bao-modal-body{display:block;padding:1rem;overflow:auto;flex-grow:1}@media (min-width: 768px){.bao-modal-body{padding:2rem}}.bao-modal-footer{display:flex;flex-wrap:wrap;padding:1rem;border-top:1px solid #ced4da;border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.bao-modal-footer.bao-modal-footer-order{justify-content:unset;flex-direction:column-reverse}.bao-modal-footer button{text-align:center}.bao-modal-footer .bao-button-primary,.bao-modal-footer .bao-button-secondary{width:100%;display:block}.bao-modal-footer .bao-button-secondary{margin-bottom:.5rem}.bao-modal-footer .bao-button-tertiary{display:none}@media (min-width: 768px){.bao-modal-footer{justify-content:flex-end}.bao-modal-footer.bao-modal-footer-order{flex-direction:row-reverse}.bao-modal-footer .bao-button-primary{margin-left:1rem}.bao-modal-footer .bao-button-secondary{margin-bottom:0}.bao-modal-footer .bao-button-primary,.bao-modal-footer .bao-button-secondary{width:auto}.bao-modal-footer .bao-button-tertiary{display:block}}\n"] }]
|
|
3278
|
+
}] });
|
|
3279
|
+
|
|
3280
|
+
// Counter for unique modal ids.
|
|
3281
|
+
let uniqueId = 0;
|
|
3282
|
+
/**
|
|
3283
|
+
* Reference to a modal opened via the BaoModalService.
|
|
3284
|
+
*/
|
|
3285
|
+
class BaoModalRef {
|
|
3286
|
+
constructor(_overlayRef, _containerInstance,
|
|
3287
|
+
/** Id of the modal. */
|
|
3288
|
+
id = `bao-modal-${uniqueId++}`) {
|
|
3289
|
+
this._overlayRef = _overlayRef;
|
|
3290
|
+
this._containerInstance = _containerInstance;
|
|
3291
|
+
this.id = id;
|
|
3292
|
+
/** Whether the user is allowed to close the modal. */
|
|
3293
|
+
this.disableClose = this._containerInstance._config.disableClose;
|
|
3294
|
+
/** Subject for notifying the user that the modal has finished opening. */
|
|
3295
|
+
this._afterOpened = new Subject();
|
|
3296
|
+
/** Subject for notifying the user that the modal has finished closing. */
|
|
3297
|
+
this._afterClosed = new Subject();
|
|
3298
|
+
/** Subject for notifying the user that the modal has started closing. */
|
|
3299
|
+
this._beforeClosed = new Subject();
|
|
3300
|
+
/** Current state of the modal. */
|
|
3301
|
+
this._state = 0 /* OPEN */;
|
|
3302
|
+
// Pass the id along to the container.
|
|
3303
|
+
_containerInstance._id = id;
|
|
3304
|
+
// Emit when opening animation completes
|
|
3305
|
+
_containerInstance._animationStateChanged
|
|
3306
|
+
.pipe(filter(event => event.state === 'opened'), take(1))
|
|
3307
|
+
.subscribe(() => {
|
|
3308
|
+
this._afterOpened.next();
|
|
3309
|
+
this._afterOpened.complete();
|
|
3310
|
+
});
|
|
3311
|
+
// Dispose overlay when closing animation is complete
|
|
3312
|
+
_containerInstance._animationStateChanged
|
|
3313
|
+
.pipe(filter(event => event.state === 'closed'), take(1))
|
|
3314
|
+
.subscribe(() => {
|
|
3315
|
+
clearTimeout(this._closeFallbackTimeout);
|
|
3316
|
+
this._finishModalClose();
|
|
3317
|
+
});
|
|
3318
|
+
_overlayRef.detachments().subscribe(() => {
|
|
3319
|
+
this._beforeClosed.next(this._result);
|
|
3320
|
+
this._beforeClosed.complete();
|
|
3321
|
+
this._afterClosed.next(this._result);
|
|
3322
|
+
this._afterClosed.complete();
|
|
3323
|
+
this.componentInstance = null;
|
|
3324
|
+
this._overlayRef.dispose();
|
|
3325
|
+
});
|
|
3326
|
+
_overlayRef
|
|
3327
|
+
.keydownEvents()
|
|
3328
|
+
.pipe(filter(event => {
|
|
3329
|
+
return (event.keyCode === ESCAPE &&
|
|
3330
|
+
!this.disableClose &&
|
|
3331
|
+
!hasModifierKey(event));
|
|
3332
|
+
}))
|
|
3333
|
+
.subscribe(event => {
|
|
3334
|
+
event.preventDefault();
|
|
3335
|
+
_closeModalVia(this, 'keyboard');
|
|
3336
|
+
});
|
|
3337
|
+
_overlayRef.backdropClick().subscribe(() => __awaiter(this, void 0, void 0, function* () {
|
|
3338
|
+
if (this.disableClose) {
|
|
3339
|
+
yield this._containerInstance._recaptureFocus();
|
|
3340
|
+
}
|
|
3341
|
+
else {
|
|
3342
|
+
_closeModalVia(this, 'mouse');
|
|
3343
|
+
}
|
|
3344
|
+
}));
|
|
3345
|
+
}
|
|
3346
|
+
/**
|
|
3347
|
+
* Close the modal.
|
|
3348
|
+
* @param modalResult Optional result to return to the modal opener.
|
|
3349
|
+
*/
|
|
3350
|
+
close(modalResult) {
|
|
3351
|
+
this._result = modalResult;
|
|
3352
|
+
// Transition the backdrop in parallel to the modal.
|
|
3353
|
+
this._containerInstance._animationStateChanged
|
|
3354
|
+
.pipe(filter(event => event.state === 'closing'), take(1))
|
|
3355
|
+
.subscribe(event => {
|
|
3356
|
+
this._beforeClosed.next(modalResult);
|
|
3357
|
+
this._beforeClosed.complete();
|
|
3358
|
+
this._overlayRef.detachBackdrop();
|
|
3359
|
+
// The logic that disposes of the overlay depends on the exit animation completing, however
|
|
3360
|
+
// it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback
|
|
3361
|
+
// timeout which will clean everything up if the animation hasn't fired within the specified
|
|
3362
|
+
// amount of time plus 100ms. We don't need to run this outside the NgZone, because for the
|
|
3363
|
+
// vast majority of cases the timeout will have been cleared before it has the chance to fire.
|
|
3364
|
+
this._closeFallbackTimeout = setTimeout(() => this._finishModalClose(), event.totalTime + 100);
|
|
3365
|
+
});
|
|
3366
|
+
this._state = 1 /* CLOSING */;
|
|
3367
|
+
this._containerInstance._startExitAnimation();
|
|
3368
|
+
}
|
|
3369
|
+
/**
|
|
3370
|
+
* Gets an observable that is notified when the modal is finished opening.
|
|
3371
|
+
*/
|
|
3372
|
+
afterOpened() {
|
|
3373
|
+
return this._afterOpened;
|
|
3374
|
+
}
|
|
3375
|
+
/**
|
|
3376
|
+
* Gets an observable that is notified when the modal is finished closing.
|
|
3377
|
+
*/
|
|
3378
|
+
afterClosed() {
|
|
3379
|
+
return this._afterClosed;
|
|
3380
|
+
}
|
|
3381
|
+
/**
|
|
3382
|
+
* Gets an observable that is notified when the modal has started closing.
|
|
3383
|
+
*/
|
|
3384
|
+
beforeClosed() {
|
|
3385
|
+
return this._beforeClosed;
|
|
3386
|
+
}
|
|
3387
|
+
/**
|
|
3388
|
+
* Gets an observable that emits when the overlay's backdrop has been clicked.
|
|
3389
|
+
*/
|
|
3390
|
+
backdropClick() {
|
|
3391
|
+
return this._overlayRef.backdropClick();
|
|
3392
|
+
}
|
|
3393
|
+
/**
|
|
3394
|
+
* Gets an observable that emits when keydown events are targeted on the overlay.
|
|
3395
|
+
*/
|
|
3396
|
+
keydownEvents() {
|
|
3397
|
+
return this._overlayRef.keydownEvents();
|
|
3398
|
+
}
|
|
3399
|
+
/**
|
|
3400
|
+
* Updates the dialog's position.
|
|
3401
|
+
*/
|
|
3402
|
+
updatePosition(position) {
|
|
3403
|
+
const strategy = this._getPositionStrategy();
|
|
3404
|
+
if (position && (position.left || position.right)) {
|
|
3405
|
+
position.left
|
|
3406
|
+
? strategy.left(position.left)
|
|
3407
|
+
: strategy.right(position.right);
|
|
3408
|
+
}
|
|
3409
|
+
else {
|
|
3410
|
+
strategy.centerHorizontally();
|
|
3411
|
+
}
|
|
3412
|
+
if (position && (position.top || position.bottom)) {
|
|
3413
|
+
position.top
|
|
3414
|
+
? strategy.top(position.top)
|
|
3415
|
+
: strategy.bottom(position.bottom);
|
|
3416
|
+
}
|
|
3417
|
+
else {
|
|
3418
|
+
strategy.centerVertically();
|
|
3419
|
+
}
|
|
3420
|
+
this._overlayRef.updatePosition();
|
|
3421
|
+
return this;
|
|
3422
|
+
}
|
|
3423
|
+
/**
|
|
3424
|
+
* Updates the modal's width and height.
|
|
3425
|
+
*/
|
|
3426
|
+
updateSize(width = '', height = '') {
|
|
3427
|
+
this._overlayRef.updateSize({ width, height });
|
|
3428
|
+
this._overlayRef.updatePosition();
|
|
3429
|
+
return this;
|
|
3430
|
+
}
|
|
3431
|
+
/** Add a CSS class or an array of classes to the overlay pane. */
|
|
3432
|
+
addPanelClass(classes) {
|
|
3433
|
+
this._overlayRef.addPanelClass(classes);
|
|
3434
|
+
return this;
|
|
3435
|
+
}
|
|
3436
|
+
/** Remove a CSS class or an array of classes from the overlay pane. */
|
|
3437
|
+
removePanelClass(classes) {
|
|
3438
|
+
this._overlayRef.removePanelClass(classes);
|
|
3439
|
+
return this;
|
|
3440
|
+
}
|
|
3441
|
+
/** Gets the current state of the modal's lifecycle. */
|
|
3442
|
+
getState() {
|
|
3443
|
+
return this._state;
|
|
3444
|
+
}
|
|
3445
|
+
/**
|
|
3446
|
+
* Finishes the modal close by updating the state of the modal
|
|
3447
|
+
* and disposing the overlay.
|
|
3448
|
+
*/
|
|
3449
|
+
_finishModalClose() {
|
|
3450
|
+
this._state = 2 /* CLOSED */;
|
|
3451
|
+
this._overlayRef.dispose();
|
|
3452
|
+
}
|
|
3453
|
+
/** Fetches the position strategy object from the overlay ref. */
|
|
3454
|
+
_getPositionStrategy() {
|
|
3455
|
+
return this._overlayRef.getConfig()
|
|
3456
|
+
.positionStrategy;
|
|
3457
|
+
}
|
|
3458
|
+
}
|
|
3459
|
+
/**
|
|
3460
|
+
* Closes the modal with the specified interaction type. This is currently not part of
|
|
3461
|
+
* `BaoModalRef` as that would conflict with custom modal ref mocks provided in tests.
|
|
3462
|
+
* More details. See: https://github.com/angular/components/pull/9257#issuecomment-651342226.
|
|
3463
|
+
*/
|
|
3464
|
+
function _closeModalVia(ref, interactionType, result) {
|
|
3465
|
+
// Some mock modal ref instances in tests do not have the `_containerInstance` property.
|
|
3466
|
+
// For those, we keep the behavior as is and do not deal with the interaction type.
|
|
3467
|
+
if (ref._containerInstance !== undefined) {
|
|
3468
|
+
ref._containerInstance._closeInteractionType = interactionType;
|
|
3469
|
+
}
|
|
3470
|
+
return ref.close(result);
|
|
3471
|
+
}
|
|
3472
|
+
|
|
3473
|
+
/*
|
|
3474
|
+
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
3475
|
+
* Licensed under the MIT license.
|
|
3476
|
+
* See LICENSE file in the project root for full license information.
|
|
3477
|
+
*/
|
|
3478
|
+
/** Injection token that can be used to access the data that was passed in to a modal. */
|
|
3479
|
+
const BAO_MODAL_DATA = new InjectionToken('BaoModalData');
|
|
3480
|
+
class BaoModalBase {
|
|
3481
|
+
constructor(_overlay, _injector, _parentModal, _overlayContainer, _modalRefConstructor, _modalContainerType, _modalDataToken, _animationMode) {
|
|
3482
|
+
this._overlay = _overlay;
|
|
3483
|
+
this._injector = _injector;
|
|
3484
|
+
this._parentModal = _parentModal;
|
|
3485
|
+
this._overlayContainer = _overlayContainer;
|
|
3486
|
+
this._modalRefConstructor = _modalRefConstructor;
|
|
3487
|
+
this._modalContainerType = _modalContainerType;
|
|
3488
|
+
this._modalDataToken = _modalDataToken;
|
|
3489
|
+
this._animationMode = _animationMode;
|
|
3490
|
+
this.afterAllClosed = defer(() => this.openModals.length
|
|
3491
|
+
? this.getAfterAllClosed()
|
|
3492
|
+
: this.getAfterAllClosed().pipe(startWith(undefined)));
|
|
3493
|
+
this._openModalsAtThisLevel = [];
|
|
3494
|
+
this._afterAllClosedAtThisLevel = new Subject();
|
|
3495
|
+
this._afterOpenedAtThisLevel = new Subject();
|
|
3496
|
+
this._ariaHiddenElements = new Map();
|
|
3497
|
+
this._modalAnimatingOpen = false;
|
|
3498
|
+
}
|
|
3499
|
+
/** Keeps track of the currently-open modals. */
|
|
3500
|
+
get openModals() {
|
|
3501
|
+
return this._parentModal
|
|
3502
|
+
? this._parentModal.openModals
|
|
3503
|
+
: this._openModalsAtThisLevel;
|
|
3504
|
+
}
|
|
3505
|
+
/** Stream that emits when a modal has been opened. */
|
|
3506
|
+
get afterOpened() {
|
|
3507
|
+
// Maybe typescript version difference
|
|
3508
|
+
return this._parentModal
|
|
3509
|
+
? this._parentModal.afterOpened
|
|
3510
|
+
: this._afterOpenedAtThisLevel;
|
|
3511
|
+
}
|
|
3512
|
+
getAfterAllClosed() {
|
|
3513
|
+
const parent = this._parentModal;
|
|
3514
|
+
return parent
|
|
3515
|
+
? parent.getAfterAllClosed()
|
|
3516
|
+
: this._afterAllClosedAtThisLevel;
|
|
3517
|
+
}
|
|
3518
|
+
/**
|
|
3519
|
+
* Opens a modal modal containing the given template.
|
|
3520
|
+
*/
|
|
3521
|
+
open(componentOrTemplateRef, config) {
|
|
3522
|
+
const conf = this._applyConfigDefaults(config, new BaoModalInitialConfig());
|
|
3523
|
+
// If there is a modal that is currently animating open, return the MatmodalRef of that modal
|
|
3524
|
+
if (this._modalAnimatingOpen) {
|
|
3525
|
+
return this._lastModalRef;
|
|
3526
|
+
}
|
|
3527
|
+
const overlayRef = this._createOverlay(conf);
|
|
3528
|
+
const modalContainer = this._attachModalContainer(overlayRef, conf);
|
|
3529
|
+
if (this._animationMode !== 'NoopAnimations') {
|
|
3530
|
+
const animationStateSubscription = modalContainer._animationStateChanged.subscribe(modalAnimationEvent => {
|
|
3531
|
+
if (modalAnimationEvent.state === 'opening') {
|
|
3532
|
+
this._modalAnimatingOpen = true;
|
|
3533
|
+
}
|
|
3534
|
+
if (modalAnimationEvent.state === 'opened') {
|
|
3535
|
+
this._modalAnimatingOpen = false;
|
|
3536
|
+
animationStateSubscription.unsubscribe();
|
|
3537
|
+
}
|
|
3538
|
+
});
|
|
3539
|
+
if (!this._animationStateSubscriptions) {
|
|
3540
|
+
this._animationStateSubscriptions = new Subscription();
|
|
3541
|
+
}
|
|
3542
|
+
this._animationStateSubscriptions.add(animationStateSubscription);
|
|
3543
|
+
}
|
|
3544
|
+
const modalRef = this._attachModalContent(componentOrTemplateRef, modalContainer, overlayRef, conf);
|
|
3545
|
+
this._lastModalRef = modalRef;
|
|
3546
|
+
// If this is the first modal that we're opening, hide all the non-overlay content.
|
|
3547
|
+
if (!this.openModals.length) {
|
|
3548
|
+
this._hideNonModalContentFromAssistiveTechnology();
|
|
3549
|
+
}
|
|
3550
|
+
this.openModals.push(modalRef);
|
|
3551
|
+
modalRef.afterClosed().subscribe(() => this._removeOpenModal(modalRef));
|
|
3552
|
+
this.afterOpened.next(modalRef);
|
|
3553
|
+
// Notify the modal container that the content has been attached.
|
|
3554
|
+
modalContainer._initializeWithAttachedContent();
|
|
3555
|
+
return modalRef;
|
|
3556
|
+
}
|
|
3557
|
+
/**
|
|
3558
|
+
* Closes all of the currently-open modals.
|
|
3559
|
+
*/
|
|
3560
|
+
closeAll() {
|
|
3561
|
+
this._closeModals(this.openModals);
|
|
3562
|
+
}
|
|
3563
|
+
/**
|
|
3564
|
+
* Finds an open modal by its id.
|
|
3565
|
+
*/
|
|
3566
|
+
getModalById(id) {
|
|
3567
|
+
return this.openModals.find(modal => modal.id === id);
|
|
3568
|
+
}
|
|
3569
|
+
ngOnDestroy() {
|
|
3570
|
+
// Only close the modals at this level on destroy
|
|
3571
|
+
// since the parent service may still be active.
|
|
3572
|
+
this._closeModals(this._openModalsAtThisLevel);
|
|
3573
|
+
this._afterAllClosedAtThisLevel.complete();
|
|
3574
|
+
this._afterOpenedAtThisLevel.complete();
|
|
3575
|
+
// Clean up any subscriptions to modals that never finished opening.
|
|
3576
|
+
if (this._animationStateSubscriptions) {
|
|
3577
|
+
this._animationStateSubscriptions.unsubscribe();
|
|
3578
|
+
}
|
|
3579
|
+
}
|
|
3580
|
+
/**
|
|
3581
|
+
* Creates the overlay into which the modal will be loaded.
|
|
3582
|
+
*/
|
|
3583
|
+
_createOverlay(config) {
|
|
3584
|
+
const overlayConfig = this._getOverlayConfig(config);
|
|
3585
|
+
return this._overlay.create(overlayConfig);
|
|
3586
|
+
}
|
|
3587
|
+
/**
|
|
3588
|
+
* Creates an overlay config from a modal config.
|
|
3589
|
+
*/
|
|
3590
|
+
_getOverlayConfig(config) {
|
|
3591
|
+
const state = new OverlayConfig({
|
|
3592
|
+
positionStrategy: this._overlay.position().global(),
|
|
3593
|
+
scrollStrategy: this._overlay.scrollStrategies.block(),
|
|
3594
|
+
panelClass: config.panelClass,
|
|
3595
|
+
hasBackdrop: config.hasBackdrop,
|
|
3596
|
+
disposeOnNavigation: config.closeOnNavigation
|
|
3597
|
+
});
|
|
3598
|
+
if (config.backdropClass) {
|
|
3599
|
+
state.backdropClass = config.backdropClass;
|
|
3600
|
+
}
|
|
3601
|
+
return state;
|
|
3602
|
+
}
|
|
3603
|
+
/**
|
|
3604
|
+
* Attaches a modal container to a modal's already-created overlay.
|
|
3605
|
+
*/
|
|
3606
|
+
_attachModalContainer(overlay, config) {
|
|
3607
|
+
const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
|
|
3608
|
+
const injector = Injector.create({
|
|
3609
|
+
parent: userInjector || this._injector,
|
|
3610
|
+
providers: [{ provide: BaoModalInitialConfig, useValue: config }]
|
|
3611
|
+
});
|
|
3612
|
+
const containerPortal = new ComponentPortal(this._modalContainerType, config.viewContainerRef, injector);
|
|
3613
|
+
const containerRef = overlay.attach(containerPortal);
|
|
3614
|
+
return containerRef.instance;
|
|
3615
|
+
}
|
|
3616
|
+
/**
|
|
3617
|
+
* Attaches the user-provided component to the already-created modal container.
|
|
3618
|
+
*/
|
|
3619
|
+
_attachModalContent(componentOrTemplateRef, modalContainer, overlayRef, config) {
|
|
3620
|
+
// Create a reference to the modal we're creating in order to give the user a handle
|
|
3621
|
+
// to modify and close it.
|
|
3622
|
+
const modalRef = new this._modalRefConstructor(overlayRef, modalContainer, config.id);
|
|
3623
|
+
if (componentOrTemplateRef instanceof TemplateRef) {
|
|
3624
|
+
modalContainer.attachTemplatePortal(new TemplatePortal(componentOrTemplateRef, null, {
|
|
3625
|
+
$implicit: config.data,
|
|
3626
|
+
modalRef
|
|
3627
|
+
}));
|
|
3628
|
+
}
|
|
3629
|
+
else {
|
|
3630
|
+
const injector = this._createInjector(config, modalRef, modalContainer);
|
|
3631
|
+
const contentRef = modalContainer.attachComponentPortal(new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector));
|
|
3632
|
+
modalRef.componentInstance = contentRef.instance;
|
|
3633
|
+
}
|
|
3634
|
+
modalRef
|
|
3635
|
+
.updateSize(config.width, config.height)
|
|
3636
|
+
.updatePosition(config.position);
|
|
3637
|
+
return modalRef;
|
|
3638
|
+
}
|
|
3639
|
+
/**
|
|
3640
|
+
* Creates a custom injector to be used inside the modal. This allows a component loaded inside
|
|
3641
|
+
* of a modal to close itself and, optionally, to return a value.
|
|
3642
|
+
*/
|
|
3643
|
+
_createInjector(config, modalRef, modalContainer) {
|
|
3644
|
+
const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
|
|
3645
|
+
// The modal container should be provided as the modal container and the modal's
|
|
3646
|
+
// content are created out of the same `ViewContainerRef` and as such, are siblings
|
|
3647
|
+
// for injector purposes. To allow the hierarchy that is expected, the modal
|
|
3648
|
+
// container is explicitly provided in the injector.
|
|
3649
|
+
const providers = [
|
|
3650
|
+
{ provide: this._modalContainerType, useValue: modalContainer },
|
|
3651
|
+
{ provide: this._modalDataToken, useValue: config.data },
|
|
3652
|
+
{ provide: this._modalRefConstructor, useValue: modalRef }
|
|
3653
|
+
];
|
|
3654
|
+
return Injector.create({
|
|
3655
|
+
parent: userInjector || this._injector,
|
|
3656
|
+
providers
|
|
3657
|
+
});
|
|
3658
|
+
}
|
|
3659
|
+
/**
|
|
3660
|
+
* Removes a modal from the array of open modals.
|
|
3661
|
+
*/
|
|
3662
|
+
_removeOpenModal(modalRef) {
|
|
3663
|
+
const index = this.openModals.indexOf(modalRef);
|
|
3664
|
+
if (index > -1) {
|
|
3665
|
+
this.openModals.splice(index, 1);
|
|
3666
|
+
// If all the modals were closed, remove/restore the `aria-hidden`
|
|
3667
|
+
// to a the siblings and emit to the `afterAllClosed` stream.
|
|
3668
|
+
if (!this.openModals.length) {
|
|
3669
|
+
this._ariaHiddenElements.forEach((previousValue, element) => {
|
|
3670
|
+
if (previousValue) {
|
|
3671
|
+
element.setAttribute('aria-hidden', previousValue);
|
|
3672
|
+
}
|
|
3673
|
+
else {
|
|
3674
|
+
element.removeAttribute('aria-hidden');
|
|
3675
|
+
}
|
|
3676
|
+
});
|
|
3677
|
+
this._ariaHiddenElements.clear();
|
|
3678
|
+
this.getAfterAllClosed().next();
|
|
3679
|
+
}
|
|
3680
|
+
}
|
|
3681
|
+
}
|
|
3682
|
+
/**
|
|
3683
|
+
* Hides all of the content that isn't an overlay from assistive technology.
|
|
3684
|
+
*/
|
|
3685
|
+
_hideNonModalContentFromAssistiveTechnology() {
|
|
3686
|
+
const overlayContainer = this._overlayContainer.getContainerElement();
|
|
3687
|
+
// Ensure that the overlay container is attached to the DOM.
|
|
3688
|
+
if (overlayContainer.parentElement) {
|
|
3689
|
+
const siblings = overlayContainer.parentElement.children;
|
|
3690
|
+
for (let i = siblings.length - 1; i > -1; i--) {
|
|
3691
|
+
const sibling = siblings[i];
|
|
3692
|
+
if (sibling !== overlayContainer &&
|
|
3693
|
+
sibling.nodeName !== 'SCRIPT' &&
|
|
3694
|
+
sibling.nodeName !== 'STYLE' &&
|
|
3695
|
+
!sibling.hasAttribute('aria-live')) {
|
|
3696
|
+
this._ariaHiddenElements.set(sibling, sibling.getAttribute('aria-hidden'));
|
|
3697
|
+
sibling.setAttribute('aria-hidden', 'true');
|
|
3698
|
+
}
|
|
3699
|
+
}
|
|
3700
|
+
}
|
|
3701
|
+
}
|
|
3702
|
+
/** Closes all of the modals in an array. */
|
|
3703
|
+
_closeModals(modals) {
|
|
3704
|
+
let i = modals.length;
|
|
3705
|
+
while (i--) {
|
|
3706
|
+
modals[i].close();
|
|
3707
|
+
}
|
|
3708
|
+
}
|
|
3709
|
+
/**
|
|
3710
|
+
* Applies default options to the modal config.
|
|
3711
|
+
*/
|
|
3712
|
+
_applyConfigDefaults(config, defaultOptions) {
|
|
3713
|
+
const desktopClass = (config === null || config === void 0 ? void 0 : config.size) || eModalDesktopWidthSize.SMALL;
|
|
3714
|
+
const mobilClass = (config === null || config === void 0 ? void 0 : config.mobileSize) || eModalMobileWidthSize.FULL;
|
|
3715
|
+
const data = (config === null || config === void 0 ? void 0 : config.data) || null;
|
|
3716
|
+
const ariaLabelledBy = (config === null || config === void 0 ? void 0 : config.ariaLabelledBy) || null;
|
|
3717
|
+
return Object.assign(Object.assign({}, defaultOptions), {
|
|
3718
|
+
panelClass: [desktopClass, mobilClass],
|
|
3719
|
+
ariaLabelledBy,
|
|
3720
|
+
data
|
|
3721
|
+
});
|
|
3722
|
+
}
|
|
3723
|
+
}
|
|
3724
|
+
BaoModalBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalBase, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
3725
|
+
BaoModalBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoModalBase, ngImport: i0 });
|
|
3726
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalBase, decorators: [{
|
|
3727
|
+
type: Directive
|
|
3728
|
+
}], ctorParameters: function () { return [{ type: i1$4.Overlay }, { type: i0.Injector }, { type: undefined }, { type: i1$4.OverlayContainer }, { type: i0.Type }, { type: i0.Type }, { type: i0.InjectionToken }, { type: undefined }]; } });
|
|
3729
|
+
/**
|
|
3730
|
+
* Service to open modal.
|
|
3731
|
+
*/
|
|
3732
|
+
class BaoModal extends BaoModalBase {
|
|
3733
|
+
constructor(overlay, injector, parentModal, overlayContainer, animationMode) {
|
|
3734
|
+
super(overlay, injector, parentModal, overlayContainer, BaoModalRef, BaoModalContainer, BAO_MODAL_DATA, animationMode);
|
|
3735
|
+
}
|
|
3736
|
+
}
|
|
3737
|
+
BaoModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModal, deps: [{ token: i1$4.Overlay }, { token: i0.Injector }, { token: BaoModal, optional: true, skipSelf: true }, { token: i1$4.OverlayContainer }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3738
|
+
BaoModal.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModal });
|
|
3739
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModal, decorators: [{
|
|
3740
|
+
type: Injectable
|
|
3741
|
+
}], ctorParameters: function () {
|
|
3742
|
+
return [{ type: i1$4.Overlay }, { type: i0.Injector }, { type: BaoModal, decorators: [{
|
|
3743
|
+
type: Optional
|
|
3744
|
+
}, {
|
|
3745
|
+
type: SkipSelf
|
|
3746
|
+
}] }, { type: i1$4.OverlayContainer }, { type: undefined, decorators: [{
|
|
3747
|
+
type: Optional
|
|
3748
|
+
}, {
|
|
3749
|
+
type: Inject,
|
|
3750
|
+
args: [ANIMATION_MODULE_TYPE]
|
|
3751
|
+
}] }];
|
|
3752
|
+
} });
|
|
3753
|
+
|
|
3754
|
+
/*
|
|
3755
|
+
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
3756
|
+
* Licensed under the MIT license.
|
|
3757
|
+
* See LICENSE file in the project root for full license information.
|
|
3758
|
+
*/
|
|
3759
|
+
/**
|
|
3760
|
+
* Button that will close the current dialog.
|
|
3761
|
+
*/
|
|
3762
|
+
class BaoModalClose {
|
|
3763
|
+
constructor(modalRef, _elementRef, _dialog) {
|
|
3764
|
+
this.modalRef = modalRef;
|
|
3765
|
+
this._elementRef = _elementRef;
|
|
3766
|
+
this._dialog = _dialog;
|
|
3767
|
+
/** Default to "button" to prevents accidental form submits. */
|
|
3768
|
+
this.type = 'button';
|
|
3769
|
+
}
|
|
3770
|
+
ngOnInit() {
|
|
3771
|
+
if (!this.modalRef) {
|
|
3772
|
+
// When this directive is included in a dialog via TemplateRef (rather than being
|
|
3773
|
+
// in a Component), the modalRef isn't available via injection because embedded
|
|
3774
|
+
// views cannot be given a custom injector. Instead, we look up the modalRef by
|
|
3775
|
+
// ID. This must occur in `onInit`, as the ID binding for the dialog container won't
|
|
3776
|
+
// be resolved at constructor time.
|
|
3777
|
+
this.modalRef =
|
|
3778
|
+
getClosestDialog(this._elementRef, this._dialog.openModals) || null;
|
|
3779
|
+
}
|
|
3780
|
+
}
|
|
3781
|
+
ngOnChanges(changes) {
|
|
3782
|
+
const proxiedChange = changes['_baoModalClose'] || changes['_baoModalCloseResult'];
|
|
3783
|
+
if (proxiedChange) {
|
|
3784
|
+
this.dialogResult = proxiedChange.currentValue;
|
|
3785
|
+
}
|
|
3786
|
+
}
|
|
3787
|
+
_onButtonClick(event) {
|
|
3788
|
+
// Determinate the focus origin using the click event, because using the FocusMonitor will
|
|
3789
|
+
// result in incorrect origins. Most of the time, close buttons will be auto focused in the
|
|
3790
|
+
// dialog, and therefore clicking the button won't result in a focus change. This means that
|
|
3791
|
+
// the FocusMonitor won't detect any origin change, and will always output `program`.
|
|
3792
|
+
_closeModalVia(this.modalRef, event.screenX === 0 && event.screenY === 0 ? 'keyboard' : 'mouse', this.dialogResult);
|
|
3793
|
+
}
|
|
3794
|
+
}
|
|
3795
|
+
BaoModalClose.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalClose, deps: [{ token: BaoModalRef, optional: true }, { token: i0.ElementRef }, { token: BaoModal }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3796
|
+
BaoModalClose.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoModalClose, selector: "[bao-modal-close], [baoModalClose]", inputs: { ariaLabel: ["aria-label", "ariaLabel"], type: "type", dialogResult: ["bao-modal-close", "dialogResult"], _baoModalClose: ["baoModalClose", "_baoModalClose"] }, host: { listeners: { "click": "_onButtonClick($event)" }, properties: { "attr.aria-label": "ariaLabel || null", "attr.type": "type" } }, exportAs: ["BaoModalClose"], usesOnChanges: true, ngImport: i0 });
|
|
3797
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalClose, decorators: [{
|
|
3798
|
+
type: Directive,
|
|
3799
|
+
args: [{
|
|
3800
|
+
selector: '[bao-modal-close], [baoModalClose]',
|
|
3801
|
+
exportAs: 'BaoModalClose',
|
|
3802
|
+
host: {
|
|
3803
|
+
'(click)': '_onButtonClick($event)',
|
|
3804
|
+
'[attr.aria-label]': 'ariaLabel || null',
|
|
3805
|
+
'[attr.type]': 'type'
|
|
3806
|
+
}
|
|
3807
|
+
}]
|
|
3808
|
+
}], ctorParameters: function () {
|
|
3809
|
+
return [{ type: BaoModalRef, decorators: [{
|
|
3810
|
+
type: Optional
|
|
3811
|
+
}] }, { type: i0.ElementRef }, { type: BaoModal }];
|
|
3812
|
+
}, propDecorators: { ariaLabel: [{
|
|
3813
|
+
type: Input,
|
|
3814
|
+
args: ['aria-label']
|
|
3815
|
+
}], type: [{
|
|
3816
|
+
type: Input
|
|
3817
|
+
}], dialogResult: [{
|
|
3818
|
+
type: Input,
|
|
3819
|
+
args: ['bao-modal-close']
|
|
3820
|
+
}], _baoModalClose: [{
|
|
3821
|
+
type: Input,
|
|
3822
|
+
args: ['baoModalClose']
|
|
3823
|
+
}] } });
|
|
3824
|
+
/**
|
|
3825
|
+
* Finds the closest BaoModalRef to an element by looking at the DOM.
|
|
3826
|
+
*/
|
|
3827
|
+
function getClosestDialog(element, openDialogs) {
|
|
3828
|
+
let parent = element.nativeElement.parentElement;
|
|
3829
|
+
while (parent && !parent.classList.contains('bao-modal-container')) {
|
|
3830
|
+
parent = parent.parentElement;
|
|
3831
|
+
}
|
|
3832
|
+
return parent ? openDialogs.find(dialog => dialog.id === parent.id) : null;
|
|
3833
|
+
}
|
|
3834
|
+
|
|
3835
|
+
/*
|
|
3836
|
+
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
3837
|
+
* Licensed under the MIT license.
|
|
3838
|
+
* See LICENSE file in the project root for full license information.
|
|
3839
|
+
*/
|
|
3840
|
+
const MODAL_DIRECTIVES = [BaoModalContainer, BaoModalClose];
|
|
3841
|
+
class BaoModalModule {
|
|
3842
|
+
}
|
|
3843
|
+
BaoModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3844
|
+
BaoModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoModalModule, declarations: [BaoModalContainer, BaoModalClose], imports: [CommonModule,
|
|
3845
|
+
OverlayModule,
|
|
3846
|
+
PortalModule,
|
|
3847
|
+
BrowserAnimationsModule,
|
|
3848
|
+
NoopAnimationsModule], exports: [BaoModalContainer, BaoModalClose] });
|
|
3849
|
+
BaoModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalModule, providers: [BaoModal], imports: [CommonModule,
|
|
3850
|
+
OverlayModule,
|
|
3851
|
+
PortalModule,
|
|
3852
|
+
BrowserAnimationsModule,
|
|
3853
|
+
NoopAnimationsModule] });
|
|
3854
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalModule, decorators: [{
|
|
3855
|
+
type: NgModule,
|
|
3856
|
+
args: [{
|
|
3857
|
+
imports: [
|
|
3858
|
+
CommonModule,
|
|
3859
|
+
OverlayModule,
|
|
3860
|
+
PortalModule,
|
|
3861
|
+
BrowserAnimationsModule,
|
|
3862
|
+
NoopAnimationsModule
|
|
3863
|
+
],
|
|
3864
|
+
declarations: MODAL_DIRECTIVES,
|
|
3865
|
+
exports: MODAL_DIRECTIVES,
|
|
3866
|
+
providers: [BaoModal]
|
|
3867
|
+
}]
|
|
3868
|
+
}] });
|
|
3869
|
+
|
|
2489
3870
|
/*
|
|
2490
3871
|
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
2491
3872
|
* Licensed under the MIT license.
|
|
@@ -2493,8 +3874,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2493
3874
|
*/
|
|
2494
3875
|
class BaoModule {
|
|
2495
3876
|
}
|
|
2496
|
-
BaoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2497
|
-
BaoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
3877
|
+
BaoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3878
|
+
BaoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoModule, imports: [BaoIconModule,
|
|
2498
3879
|
BaoButtonModule,
|
|
2499
3880
|
BaoAlertModule,
|
|
2500
3881
|
BaoCardModule,
|
|
@@ -2509,17 +3890,18 @@ BaoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
|
2509
3890
|
BaoCommonComponentsModule,
|
|
2510
3891
|
BaoCheckboxModule,
|
|
2511
3892
|
BaoRadioModule,
|
|
2512
|
-
BaoSummaryModule
|
|
3893
|
+
BaoSummaryModule,
|
|
3894
|
+
BaoAvatarModule,
|
|
3895
|
+
BaoTabsModule,
|
|
3896
|
+
BaoModalModule
|
|
2513
3897
|
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
2514
3898
|
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
2515
3899
|
] });
|
|
2516
|
-
BaoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
BaoBreadcrumbModule
|
|
2522
|
-
], BaoIconModule,
|
|
3900
|
+
BaoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModule, imports: [BaoIconModule,
|
|
3901
|
+
BaoButtonModule,
|
|
3902
|
+
BaoAlertModule,
|
|
3903
|
+
BaoCardModule,
|
|
3904
|
+
BaoBreadcrumbModule, BaoIconModule,
|
|
2523
3905
|
BaoButtonModule,
|
|
2524
3906
|
BaoAlertModule,
|
|
2525
3907
|
BaoBreadcrumbModule,
|
|
@@ -2530,11 +3912,14 @@ BaoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
|
2530
3912
|
BaoCommonComponentsModule,
|
|
2531
3913
|
BaoCheckboxModule,
|
|
2532
3914
|
BaoRadioModule,
|
|
2533
|
-
BaoSummaryModule
|
|
3915
|
+
BaoSummaryModule,
|
|
3916
|
+
BaoAvatarModule,
|
|
3917
|
+
BaoTabsModule,
|
|
3918
|
+
BaoModalModule
|
|
2534
3919
|
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
2535
3920
|
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
2536
3921
|
] });
|
|
2537
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3922
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModule, decorators: [{
|
|
2538
3923
|
type: NgModule,
|
|
2539
3924
|
args: [{
|
|
2540
3925
|
imports: [
|
|
@@ -2556,7 +3941,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2556
3941
|
BaoCommonComponentsModule,
|
|
2557
3942
|
BaoCheckboxModule,
|
|
2558
3943
|
BaoRadioModule,
|
|
2559
|
-
BaoSummaryModule
|
|
3944
|
+
BaoSummaryModule,
|
|
3945
|
+
BaoAvatarModule,
|
|
3946
|
+
BaoTabsModule,
|
|
3947
|
+
BaoModalModule
|
|
2560
3948
|
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
2561
3949
|
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
2562
3950
|
]
|
|
@@ -2573,9 +3961,9 @@ class BaoBadgeComponent {
|
|
|
2573
3961
|
this.type = '';
|
|
2574
3962
|
}
|
|
2575
3963
|
}
|
|
2576
|
-
BaoBadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2577
|
-
BaoBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2578
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3964
|
+
BaoBadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3965
|
+
BaoBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoBadgeComponent, selector: "bao-badge", inputs: { type: "type" }, host: { properties: { "class.positive": "type === \"success\"", "class.negative": "type === \"danger\"", "class.warning": "type === \"warning\"", "class.informative": "type === \"info\"" } }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{display:inline-block;border:.0625rem solid transparent;color:#fff;padding:0 .4375rem;border-radius:10rem;min-width:1.5rem;font-size:.875rem;font-weight:700;line-height:1.25rem;text-align:center;white-space:nowrap;overflow:hidden;vertical-align:baseline}:host.informative{background-color:#0079c4}:host.positive{background-color:#0da566}:host.warning{background-color:#ffb833;color:#000}:host.negative{background-color:#d3310a}\n"] });
|
|
3966
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBadgeComponent, decorators: [{
|
|
2579
3967
|
type: Component,
|
|
2580
3968
|
args: [{ selector: 'bao-badge', host: {
|
|
2581
3969
|
class: '',
|
|
@@ -2596,10 +3984,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2596
3984
|
const BADGE_DIRECTIVES = [BaoBadgeComponent];
|
|
2597
3985
|
class BaoBadgeModule {
|
|
2598
3986
|
}
|
|
2599
|
-
BaoBadgeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2600
|
-
BaoBadgeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
2601
|
-
BaoBadgeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2602
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3987
|
+
BaoBadgeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBadgeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3988
|
+
BaoBadgeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoBadgeModule, declarations: [BaoBadgeComponent], imports: [CommonModule], exports: [BaoBadgeComponent] });
|
|
3989
|
+
BaoBadgeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBadgeModule, imports: [CommonModule] });
|
|
3990
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBadgeModule, decorators: [{
|
|
2603
3991
|
type: NgModule,
|
|
2604
3992
|
args: [{
|
|
2605
3993
|
imports: [CommonModule],
|
|
@@ -2626,9 +4014,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2626
4014
|
* See LICENSE file in the project root for full license information.
|
|
2627
4015
|
*/
|
|
2628
4016
|
|
|
4017
|
+
/*
|
|
4018
|
+
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
4019
|
+
* Licensed under the MIT license.
|
|
4020
|
+
* See LICENSE file in the project root for full license information.
|
|
4021
|
+
*/
|
|
4022
|
+
|
|
2629
4023
|
/**
|
|
2630
4024
|
* Generated bundle index. Do not edit.
|
|
2631
4025
|
*/
|
|
2632
4026
|
|
|
2633
|
-
export { BAO_RADIO_GROUP, BaoAlertActions, BaoAlertComponent, BaoAlertContent, BaoAlertLink, BaoAlertModule, BaoAlertTitle, 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, BaoIconComponent, BaoIconModule, BaoLabelTextComponent, BaoList, BaoListItem, BaoListItemDescription, BaoListItemTitle, BaoListModule, BaoListSummary, BaoListSummaryItem, BaoModule, BaoNavList, BaoRadioButtonComponent, BaoRadioButtonGroupComponent, BaoRadioDescription, BaoRadioModule, BaoSummaryComponent, BaoSummaryDescription, BaoSummaryModule, BaoTagComponent, BaoTagModule, BaoTitleTextComponent };
|
|
4027
|
+
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, 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 };
|
|
2634
4028
|
//# sourceMappingURL=villedemontreal-angular-ui.mjs.map
|