@bravura/ui 6.1.0 → 7.0.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/CHANGELOG.md +656 -642
- package/README.md +1 -0
- package/alert/index.d.ts +126 -3
- package/alert/testing/index.d.ts +28 -5
- package/behavior/index.d.ts +231 -3
- package/clip-note/index.d.ts +125 -3
- package/common/index.d.ts +24 -3
- package/currency-input/index.d.ts +69 -3
- package/decimal-input/index.d.ts +39 -3
- package/discrete-input/index.d.ts +139 -3
- package/fesm2022/bravura-ui-alert-testing.mjs.map +1 -1
- package/fesm2022/bravura-ui-alert.mjs +18 -21
- package/fesm2022/bravura-ui-alert.mjs.map +1 -1
- package/fesm2022/bravura-ui-behavior.mjs +18 -18
- package/fesm2022/bravura-ui-behavior.mjs.map +1 -1
- package/fesm2022/bravura-ui-clip-note.mjs +10 -10
- package/fesm2022/bravura-ui-clip-note.mjs.map +1 -1
- package/fesm2022/bravura-ui-common.mjs +5 -6
- package/fesm2022/bravura-ui-common.mjs.map +1 -1
- package/fesm2022/bravura-ui-currency-input.mjs +7 -7
- package/fesm2022/bravura-ui-currency-input.mjs.map +1 -1
- package/fesm2022/bravura-ui-decimal-input.mjs +7 -7
- package/fesm2022/bravura-ui-decimal-input.mjs.map +1 -1
- package/fesm2022/bravura-ui-discrete-input.mjs +10 -11
- package/fesm2022/bravura-ui-discrete-input.mjs.map +1 -1
- package/fesm2022/bravura-ui-file-upload.mjs +18 -18
- package/fesm2022/bravura-ui-file-upload.mjs.map +1 -1
- package/fesm2022/bravura-ui-form-field.mjs +10 -10
- package/fesm2022/bravura-ui-form-field.mjs.map +1 -1
- package/fesm2022/bravura-ui-icon-font.mjs +7 -7
- package/fesm2022/bravura-ui-icon-font.mjs.map +1 -1
- package/fesm2022/bravura-ui-panel.mjs +16 -16
- package/fesm2022/bravura-ui-panel.mjs.map +1 -1
- package/fesm2022/bravura-ui-phone-number.mjs +13 -13
- package/fesm2022/bravura-ui-phone-number.mjs.map +1 -1
- package/fesm2022/bravura-ui-radio-panel-testing.mjs.map +1 -1
- package/fesm2022/bravura-ui-radio-panel.mjs +12 -14
- package/fesm2022/bravura-ui-radio-panel.mjs.map +1 -1
- package/fesm2022/bravura-ui-selection-panel.mjs +11 -11
- package/fesm2022/bravura-ui-selection-panel.mjs.map +1 -1
- package/fesm2022/bravura-ui-skeletons.mjs +10 -10
- package/fesm2022/bravura-ui-skeletons.mjs.map +1 -1
- package/fesm2022/bravura-ui-stepper.mjs +18 -18
- package/fesm2022/bravura-ui-stepper.mjs.map +1 -1
- package/fesm2022/bravura-ui-tooltip.mjs +13 -13
- package/fesm2022/bravura-ui-tooltip.mjs.map +1 -1
- package/file-upload/index.d.ts +200 -3
- package/form-field/index.d.ts +49 -3
- package/icon-font/index.d.ts +79 -3
- package/index.d.ts +3 -5
- package/package.json +30 -30
- package/panel/index.d.ts +107 -3
- package/phone-number/index.d.ts +108 -3
- package/radio-panel/index.d.ts +71 -3
- package/radio-panel/testing/index.d.ts +32 -5
- package/selection-panel/index.d.ts +149 -3
- package/skeletons/index.d.ts +79 -3
- package/stepper/index.d.ts +106 -3
- package/tooltip/index.d.ts +83 -3
- package/alert/alert-container.component.d.ts +0 -71
- package/alert/alert-message.component.d.ts +0 -47
- package/alert/alert.module.d.ts +0 -14
- package/alert/public-api.d.ts +0 -1
- package/alert/testing/test-api.d.ts +0 -24
- package/behavior/await.directive.d.ts +0 -71
- package/behavior/behavior.module.d.ts +0 -17
- package/behavior/observe-content-class.directive.d.ts +0 -29
- package/behavior/public-api.d.ts +0 -5
- package/behavior/sizing-monitor.directive.d.ts +0 -23
- package/behavior/sizing.directive.d.ts +0 -98
- package/clip-note/clip-note.component.d.ts +0 -45
- package/clip-note/clip-note.directive.d.ts +0 -69
- package/clip-note/clip-note.module.d.ts +0 -19
- package/clip-note/public-api.d.ts +0 -1
- package/common/common-utils.d.ts +0 -11
- package/common/common.module.d.ts +0 -11
- package/common/public-api.d.ts +0 -2
- package/currency-input/currency-input.directive.d.ts +0 -62
- package/currency-input/currency-input.module.d.ts +0 -10
- package/currency-input/public-api.d.ts +0 -1
- package/decimal-input/decimal-input.directive.d.ts +0 -32
- package/decimal-input/decimal-input.module.d.ts +0 -10
- package/decimal-input/public-api.d.ts +0 -1
- package/discrete-input/discrete-input.component.d.ts +0 -128
- package/discrete-input/discrete-input.module.d.ts +0 -11
- package/discrete-input/public-api.d.ts +0 -2
- package/file-upload/file-upload.component.d.ts +0 -148
- package/file-upload/file-upload.module.d.ts +0 -14
- package/file-upload/file-upload.service.d.ts +0 -42
- package/file-upload/public-api.d.ts +0 -6
- package/form-field/form-field.component.d.ts +0 -39
- package/form-field/form-field.module.d.ts +0 -13
- package/form-field/public-api.d.ts +0 -2
- package/icon-font/icon-font.module.d.ts +0 -12
- package/icon-font/icon.directive.d.ts +0 -46
- package/icon-font/public-api.d.ts +0 -3
- package/icon-font/utilities.d.ts +0 -20
- package/panel/panel-section.component.d.ts +0 -15
- package/panel/panel.component.d.ts +0 -60
- package/panel/panel.module.d.ts +0 -16
- package/panel/public-api.d.ts +0 -1
- package/panel/tinted.directive.d.ts +0 -26
- package/phone-number/phone-number.directive.d.ts +0 -66
- package/phone-number/phone-number.module.d.ts +0 -17
- package/phone-number/phone-number.pipe.d.ts +0 -13
- package/phone-number/phone-number.validator.d.ts +0 -31
- package/phone-number/public-api.d.ts +0 -1
- package/public-api.d.ts +0 -1
- package/radio-panel/public-api.d.ts +0 -3
- package/radio-panel/radio-panel-item.component.d.ts +0 -22
- package/radio-panel/radio-panel.component.d.ts +0 -38
- package/radio-panel/radio-panel.module.d.ts +0 -15
- package/radio-panel/testing/test-api.d.ts +0 -27
- package/selection-panel/public-api.d.ts +0 -3
- package/selection-panel/selection-panel-item.component.d.ts +0 -77
- package/selection-panel/selection-panel.directive.d.ts +0 -67
- package/selection-panel/selection-panel.module.d.ts +0 -13
- package/skeletons/public-api.d.ts +0 -3
- package/skeletons/skeleton-loader-presets.directive.d.ts +0 -23
- package/skeletons/skeleton-loader.component.d.ts +0 -44
- package/skeletons/skeletons.module.d.ts +0 -16
- package/stepper/public-api.d.ts +0 -3
- package/stepper/step-label-top.directive.d.ts +0 -17
- package/stepper/stepper-animation.d.ts +0 -6
- package/stepper/stepper.component.d.ts +0 -75
- package/stepper/stepper.module.d.ts +0 -17
- package/tooltip/public-api.d.ts +0 -3
- package/tooltip/tooltip.component.d.ts +0 -26
- package/tooltip/tooltip.directive.d.ts +0 -48
- package/tooltip/tooltip.module.d.ts +0 -13
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Input, Inject, Directive, Host, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
|
-
import {
|
|
2
|
+
import { DOCUMENT, Input, Inject, Directive, Host, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { generateID } from '@bravura/ui/common';
|
|
5
5
|
import * as i2 from '@angular/material/card';
|
|
6
6
|
import { MatCardModule } from '@angular/material/card';
|
|
@@ -45,10 +45,10 @@ class TintedDirective {
|
|
|
45
45
|
` background-color: var(--bui-color-${this.color}); top: 0; left: 0; ` +
|
|
46
46
|
` bottom: 0; right: 0; pointer-events: none; }`;
|
|
47
47
|
}
|
|
48
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
49
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
48
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TintedDirective, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
49
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: TintedDirective, isStandalone: false, selector: "[buiTinted], bui-panel", inputs: { color: ["buiTinted", "color"] }, host: { classAttribute: "bui-host" }, exportAs: ["buiTinted"], ngImport: i0 }); }
|
|
50
50
|
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TintedDirective, decorators: [{
|
|
52
52
|
type: Directive,
|
|
53
53
|
args: [{
|
|
54
54
|
selector: '[buiTinted], bui-panel',
|
|
@@ -122,16 +122,16 @@ class PanelComponent {
|
|
|
122
122
|
this._width = width;
|
|
123
123
|
this._cd.markForCheck();
|
|
124
124
|
}
|
|
125
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
126
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
125
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PanelComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: TintedDirective, host: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
126
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: PanelComponent, isStandalone: false, selector: "bui-panel", inputs: { backdropClass: "backdropClass", cardClass: "cardClass", color: "color", appearance: "appearance", breakpoint: "breakpoint" }, host: { properties: { "class.bui-panel-vertical": "_width < breakpoint", "class.bui-panel-horizontal": "_width >= breakpoint" }, classAttribute: "bui-panel bui-host" }, ngImport: i0, template: "<mat-card\r\n\t[buiSizingBy]=\"'parent'\"\r\n\t(buiResized)=\"_resized($event.width)\"\r\n\t[appearance]=\"appearance === 'flat' ? 'raised' : appearance\"\r\n\tclass=\"bui-border-{{ color || 'none' }} {{ cardClass }} {{\r\n\t\tappearance === 'flat' ? 'mat-elevation-z' : appearance === 'outlined' ? 'mat-elevation-z bui-panel-border' : ''\r\n\t}}\"\r\n>\r\n\t<ng-content></ng-content>\r\n</mat-card>\r\n", styles: [":host{border-radius:var(--mat-card-elevated-container-shape, var(--mat-shape-medium, 4px));position:relative}:host .bui-panel-border{border-width:1px;border-style:solid}:host ::ng-deep .bui-panel-section-container{display:flex;box-sizing:border-box!important}:host(:not([hidden])){display:block}:host(:not([hidden])) .mat-mdc-card{background-color:transparent;padding:16px}:host(:not([hidden])) .mat-mdc-card ::ng-deep .mat-mdc-card-header,:host(:not([hidden])) .mat-mdc-card ::ng-deep .mat-mdc-card-content,:host(:not([hidden])) .mat-mdc-card ::ng-deep .mat-mdc-card-actions{padding:0}:host(:not([hidden])) .mat-mdc-card ::ng-deep .mat-mdc-card-actions{margin-inline-start:-10px}:host(:not([hidden])) .mat-mdc-card ::ng-deep .mat-mdc-card-footer{margin:0 -16px -16px}:host(:not([hidden])) .mat-mdc-card.mat-elevation-z{box-shadow:none!important}:host(.bui-panel-horizontal) ::ng-deep .bui-panel-section-container{flex-direction:row}:host(.bui-panel-vertical) ::ng-deep .bui-panel-section-container{flex-direction:column}\n"], dependencies: [{ kind: "component", type: i2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3.SizingDirective, selector: "[buiSizing],[buiResized],[buiSizingBy],[buiFixedHeight]", inputs: ["buiSizing", "sizingBy", "buiSizingBy", "buiFixedHeight"], outputs: ["buiResized"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
127
127
|
}
|
|
128
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PanelComponent, decorators: [{
|
|
129
129
|
type: Component,
|
|
130
130
|
args: [{ selector: 'bui-panel', host: {
|
|
131
131
|
class: 'bui-panel bui-host',
|
|
132
132
|
'[class.bui-panel-vertical]': `_width < breakpoint`,
|
|
133
133
|
'[class.bui-panel-horizontal]': `_width >= breakpoint`
|
|
134
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<mat-card\r\n\t[buiSizingBy]=\"'parent'\"\r\n\t(buiResized)=\"_resized($event.width)\"\r\n\t[appearance]=\"appearance === 'flat' ? 'raised' : appearance\"\r\n\tclass=\"bui-border-{{ color || 'none' }} {{ cardClass }} {{\r\n\t\tappearance === 'flat' ? 'mat-elevation-z' : appearance === 'outlined' ? 'mat-elevation-z bui-panel-border' : ''\r\n\t}}\"\r\n>\r\n\t<ng-content></ng-content>\r\n</mat-card>\r\n", styles: [":host{border-radius:var(--
|
|
134
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<mat-card\r\n\t[buiSizingBy]=\"'parent'\"\r\n\t(buiResized)=\"_resized($event.width)\"\r\n\t[appearance]=\"appearance === 'flat' ? 'raised' : appearance\"\r\n\tclass=\"bui-border-{{ color || 'none' }} {{ cardClass }} {{\r\n\t\tappearance === 'flat' ? 'mat-elevation-z' : appearance === 'outlined' ? 'mat-elevation-z bui-panel-border' : ''\r\n\t}}\"\r\n>\r\n\t<ng-content></ng-content>\r\n</mat-card>\r\n", styles: [":host{border-radius:var(--mat-card-elevated-container-shape, var(--mat-shape-medium, 4px));position:relative}:host .bui-panel-border{border-width:1px;border-style:solid}:host ::ng-deep .bui-panel-section-container{display:flex;box-sizing:border-box!important}:host(:not([hidden])){display:block}:host(:not([hidden])) .mat-mdc-card{background-color:transparent;padding:16px}:host(:not([hidden])) .mat-mdc-card ::ng-deep .mat-mdc-card-header,:host(:not([hidden])) .mat-mdc-card ::ng-deep .mat-mdc-card-content,:host(:not([hidden])) .mat-mdc-card ::ng-deep .mat-mdc-card-actions{padding:0}:host(:not([hidden])) .mat-mdc-card ::ng-deep .mat-mdc-card-actions{margin-inline-start:-10px}:host(:not([hidden])) .mat-mdc-card ::ng-deep .mat-mdc-card-footer{margin:0 -16px -16px}:host(:not([hidden])) .mat-mdc-card.mat-elevation-z{box-shadow:none!important}:host(.bui-panel-horizontal) ::ng-deep .bui-panel-section-container{flex-direction:row}:host(.bui-panel-vertical) ::ng-deep .bui-panel-section-container{flex-direction:column}\n"] }]
|
|
135
135
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: TintedDirective, decorators: [{
|
|
136
136
|
type: Host
|
|
137
137
|
}] }], propDecorators: { backdropClass: [{
|
|
@@ -175,10 +175,10 @@ class PanelSectionComponent {
|
|
|
175
175
|
this._parentElement.setAttribute(COUNT_ATTR, count);
|
|
176
176
|
this._parentElement.classList.add(`${CONTAINER_PREFIX}-${count}`);
|
|
177
177
|
}
|
|
178
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
179
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
178
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PanelSectionComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
179
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: PanelSectionComponent, isStandalone: false, selector: "bui-panel-section", host: { classAttribute: "bui-panel-section" }, ngImport: i0, template: "<ng-content></ng-content>\r\n", styles: [":host{flex-grow:1}:host-context(.bui-panel-horizontal) :host:not(:first-child){border-inline-start:1px solid rgba(128,128,128,.2);padding-inline-start:16px}:host-context(.bui-panel-horizontal) :host:not(:last-child){padding-inline-end:16px}:host-context(.bui-panel-vertical) :host:not(:first-child){border-top:1px solid rgba(128,128,128,.2);padding-top:16px}:host-context(.bui-panel-vertical) :host:not(:last-child){padding-bottom:16px}:host-context(.bui-panel-horizontal .bui-panel-section-container-2){flex-basis:50%}:host-context(.bui-panel-horizontal .bui-panel-section-container-3){flex-basis:33.3333333333%}:host-context(.bui-panel-horizontal .bui-panel-section-container-4){flex-basis:25%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
180
180
|
}
|
|
181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PanelSectionComponent, decorators: [{
|
|
182
182
|
type: Component,
|
|
183
183
|
args: [{ selector: 'bui-panel-section', host: {
|
|
184
184
|
class: 'bui-panel-section'
|
|
@@ -186,11 +186,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
186
186
|
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
187
187
|
|
|
188
188
|
class PanelModule {
|
|
189
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
190
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
191
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
189
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
190
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: PanelModule, declarations: [PanelComponent, PanelSectionComponent, TintedDirective], imports: [CommonModule, MatCardModule, BehaviorModule], exports: [MatCardModule, PanelComponent, PanelSectionComponent, TintedDirective] }); }
|
|
191
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PanelModule, imports: [CommonModule, MatCardModule, BehaviorModule, MatCardModule] }); }
|
|
192
192
|
}
|
|
193
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PanelModule, decorators: [{
|
|
194
194
|
type: NgModule,
|
|
195
195
|
args: [{
|
|
196
196
|
declarations: [PanelComponent, PanelSectionComponent, TintedDirective],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bravura-ui-panel.mjs","sources":["../../../projects/ui/panel/tinted.directive.ts","../../../projects/ui/panel/panel.component.ts","../../../projects/ui/panel/panel.component.html","../../../projects/ui/panel/panel-section.component.ts","../../../projects/ui/panel/panel-section.component.html","../../../projects/ui/panel/panel.module.ts","../../../projects/ui/panel/bravura-ui-panel.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\r\nimport { Directive, ElementRef, Inject, Input, OnDestroy, OnInit } from '@angular/core';\r\nimport { ThemePalette } from '@angular/material/core';\r\nimport { generateID } from '@bravura/ui/common';\r\n\r\n/**\r\n * A \"tinted\" element has a shaded background specified by the `ThemePalette`, which\r\n * is compatible with both light and dark themes.\r\n */\r\n@Directive({\r\n\tselector: '[buiTinted], bui-panel',\r\n\thost: { class: 'bui-host' },\r\n\texportAs: 'buiTinted',\r\n\tstandalone: false\r\n})\r\nexport class TintedDirective implements OnInit, OnDestroy {\r\n\t/**\r\n\t * The base color of the shaded background\r\n\t * @default 'primary'\r\n\t */\r\n\t@Input('buiTinted')\r\n\tget color(): ThemePalette {\r\n\t\treturn this._color;\r\n\t}\r\n\tset color(c: ThemePalette) {\r\n\t\tthis._color = c;\r\n\t\tthis.generateStyle();\r\n\t}\r\n\r\n\tprivate _color: any = 'default';\r\n\r\n\tprivate readonly _addedStyle: HTMLStyleElement;\r\n\tprivate readonly _attr: string;\r\n\tprivate _element: HTMLElement;\r\n\r\n\tconstructor(\r\n\t\t@Inject(DOCUMENT) private _doc: Document,\r\n\t\telemRef: ElementRef<HTMLElement>\r\n\t) {\r\n\t\tthis._addedStyle = this._doc.createElement('style');\r\n\t\tthis._attr = 'bui-tinted-' + generateID();\r\n\t\tthis._element = elemRef.nativeElement;\r\n\t\telemRef.nativeElement.setAttribute(this._attr, '');\r\n\t}\r\n\r\n\tngOnInit(): void {\r\n\t\tthis._element.style.position = 'relative';\r\n\t\tthis.generateStyle();\r\n\t\tthis._element.appendChild(this._addedStyle);\r\n\t}\r\n\r\n\tngOnDestroy(): void {\r\n\t\tthis._element.removeChild(this._addedStyle);\r\n\t}\r\n\r\n\tprivate generateStyle(): void {\r\n\t\tthis._addedStyle.innerText =\r\n\t\t\t`[${this._attr}]::after { position: absolute; opacity: 0.1; border-radius: inherit; display: block; content: ''; ` +\r\n\t\t\t` background-color: var(--bui-color-${this.color}); top: 0; left: 0; ` +\r\n\t\t\t` bottom: 0; right: 0; pointer-events: none; }`;\r\n\t}\r\n}\r\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Host, Input, OnInit } from '@angular/core';\r\nimport { ThemePalette } from '@angular/material/core';\r\nimport { TintedDirective } from './tinted.directive';\r\n\r\n/**\r\n * A `bui-panel` consists of a `mat-card` and a tinted backdrop.\r\n *\r\n * Unlike `mat-card`, `bui-panel` has a flat appearance by default and a transparent background.\r\n * The backdrop is nearly transparent, blending the theme palette `color`\r\n * and the effective background color of the DOM ancestors.\r\n *\r\n * `bui-panel` supports all the content child directives of `mat-card` as well as `bui-panel-section`.\r\n *\r\n * `bui-panel-section`s are subdivisions of `bui-panel` that rearrange their orientation based on the width of the container element.\r\n *\r\n */\r\n@Component({\r\n\tselector: 'bui-panel',\r\n\ttemplateUrl: './panel.component.html',\r\n\tstyleUrls: ['./panel.component.scss'],\r\n\thost: {\r\n\t\tclass: 'bui-panel bui-host',\r\n\t\t'[class.bui-panel-vertical]': `_width < breakpoint`,\r\n\t\t'[class.bui-panel-horizontal]': `_width >= breakpoint`\r\n\t},\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\r\n\tstandalone: false\r\n})\r\nexport class PanelComponent implements OnInit {\r\n\t/**\r\n\t * Additional style classes on the tinted backdrop element.\r\n\t * @deprecated\r\n\t * @ignore\r\n\t */\r\n\t@Input()\r\n\tbackdropClass?: string;\r\n\r\n\t/**\r\n\t * Additional style classes on the `<mat-card>` element.\r\n\t */\r\n\t@Input()\r\n\tcardClass?: string;\r\n\r\n\t/**\r\n\t * This property defines the background (shaded) and border colors of the panel\r\n\t */\r\n\t@Input()\r\n\tget color(): ThemePalette {\r\n\t\treturn this._color;\r\n\t}\r\n\tset color(value: ThemePalette) {\r\n\t\tthis._color = value;\r\n\t\tthis._tinted.color = value;\r\n\t\tthis._cd.markForCheck();\r\n\t}\r\n\r\n\t/**\r\n\t * In contrast to using a `mat-card` alone, a `bui-panel` does not have a elevated appearance by default.\r\n\t *\r\n\t * This property can change the default appearance to\r\n\t *\r\n\t * * `raised` - the original `mat-card` default\r\n\t * * `outline` - a `mat-card` with borders\r\n\t * * `flat` - no border or elevation\r\n\t */\r\n\t@Input()\r\n\tget appearance(): 'outlined' | 'raised' | 'flat' {\r\n\t\treturn this._appearance;\r\n\t}\r\n\tset appearance(value: 'outlined' | 'raised' | 'flat') {\r\n\t\tthis._appearance = value;\r\n\t\tthis._cd.markForCheck();\r\n\t}\r\n\r\n\t/**\r\n\t * The width of the host element, at which the panel section container will change its orientation.\r\n\t */\r\n\t@Input()\r\n\tbreakpoint = 600;\r\n\r\n\t/** @ignore */\r\n\t_width = 600;\r\n\r\n\tprivate _color: ThemePalette = 'primary';\r\n\r\n\tprivate _appearance: 'outlined' | 'raised' | 'flat' = 'flat';\r\n\r\n\tconstructor(\r\n\t\tprivate _cd: ChangeDetectorRef,\r\n\t\t@Host() private _tinted: TintedDirective\r\n\t) {}\r\n\r\n\tngOnInit(): void {}\r\n\r\n\t/** @ignore */\r\n\t_resized(width: number): void {\r\n\t\tthis._width = width;\r\n\t\tthis._cd.markForCheck();\r\n\t}\r\n}\r\n","<mat-card\r\n\t[buiSizingBy]=\"'parent'\"\r\n\t(buiResized)=\"_resized($event.width)\"\r\n\t[appearance]=\"appearance === 'flat' ? 'raised' : appearance\"\r\n\tclass=\"bui-border-{{ color || 'none' }} {{ cardClass }} {{\r\n\t\tappearance === 'flat' ? 'mat-elevation-z' : appearance === 'outlined' ? 'mat-elevation-z bui-panel-border' : ''\r\n\t}}\"\r\n>\r\n\t<ng-content></ng-content>\r\n</mat-card>\r\n","import { ChangeDetectionStrategy, Component, ElementRef, OnDestroy, OnInit } from '@angular/core';\r\n\r\nconst CONTAINER_PREFIX = 'bui-panel-section-container';\r\n\r\nconst COUNT_ATTR = 'bui-section-count';\r\n/**\r\n * `bui-panel-section`s are subdivisions of `bui-panel` that rearrange their orientation based on the width of the container element.\r\n */\r\n@Component({\r\n\tselector: 'bui-panel-section',\r\n\ttemplateUrl: './panel-section.component.html',\r\n\tstyleUrls: ['./panel-section.component.scss'],\r\n\thost: {\r\n\t\tclass: 'bui-panel-section'\r\n\t},\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\r\n\tstandalone: false\r\n})\r\nexport class PanelSectionComponent implements OnInit, OnDestroy {\r\n\tprivate _parentElement!: HTMLElement;\r\n\r\n\tconstructor(private _elementRef: ElementRef<HTMLElement>) {}\r\n\r\n\tngOnInit(): void {\r\n\t\tthis._parentElement = this._elementRef.nativeElement.parentElement!;\r\n\t\tthis._parentElement.classList.add(CONTAINER_PREFIX);\r\n\t\tthis._calcCount(1);\r\n\t}\r\n\r\n\tngOnDestroy(): void {\r\n\t\tthis._calcCount(-1);\r\n\t}\r\n\r\n\tprivate _calcCount(delta: number) {\r\n\t\tlet count = this._parentElement.getAttribute(COUNT_ATTR);\r\n\t\tif (count) {\r\n\t\t\tthis._parentElement.classList.remove(`${CONTAINER_PREFIX}-${count}`);\r\n\t\t} else {\r\n\t\t\tcount = '0';\r\n\t\t}\r\n\t\tcount = `${Math.max(Number(count) + delta, 0)}`;\r\n\t\tthis._parentElement.setAttribute(COUNT_ATTR, count);\r\n\t\tthis._parentElement.classList.add(`${CONTAINER_PREFIX}-${count}`);\r\n\t}\r\n}\r\n","<ng-content></ng-content>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { PanelComponent } from './panel.component';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { BehaviorModule } from '@bravura/ui/behavior';\r\nimport { PanelSectionComponent } from './panel-section.component';\r\nimport { TintedDirective } from './tinted.directive';\r\n\r\n@NgModule({\r\n\tdeclarations: [PanelComponent, PanelSectionComponent, TintedDirective],\r\n\timports: [CommonModule, MatCardModule, BehaviorModule],\r\n\texports: [MatCardModule, PanelComponent, PanelSectionComponent, TintedDirective]\r\n})\r\nexport class PanelModule {}\r\n\r\nexport { PanelComponent, PanelSectionComponent, TintedDirective };\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.TintedDirective"],"mappings":";;;;;;;;;AAKA;;;AAGG;MAOU,eAAe,CAAA;AAC3B;;;AAGG;AACH,IAAA,IACI,KAAK,GAAA;QACR,OAAO,IAAI,CAAC,MAAM;;IAEnB,IAAI,KAAK,CAAC,CAAe,EAAA;AACxB,QAAA,IAAI,CAAC,MAAM,GAAG,CAAC;QACf,IAAI,CAAC,aAAa,EAAE;;IASrB,WAC2B,CAAA,IAAc,EACxC,OAAgC,EAAA;QADN,IAAI,CAAA,IAAA,GAAJ,IAAI;QAPvB,IAAM,CAAA,MAAA,GAAQ,SAAS;QAU9B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;AACnD,QAAA,IAAI,CAAC,KAAK,GAAG,aAAa,GAAG,UAAU,EAAE;AACzC,QAAA,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,aAAa;QACrC,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC;;IAGnD,QAAQ,GAAA;QACP,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU;QACzC,IAAI,CAAC,aAAa,EAAE;QACpB,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC;;IAG5C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Ac,EAAE,qBAAqB,EAAE,eAAe,CAAC;AACtE,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,cAAc,CAAC;oBACtD,OAAO,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,qBAAqB,EAAE,eAAe;AAC/E,iBAAA;;;ACZD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"bravura-ui-panel.mjs","sources":["../../../projects/ui/panel/tinted.directive.ts","../../../projects/ui/panel/panel.component.ts","../../../projects/ui/panel/panel.component.html","../../../projects/ui/panel/panel-section.component.ts","../../../projects/ui/panel/panel-section.component.html","../../../projects/ui/panel/panel.module.ts","../../../projects/ui/panel/bravura-ui-panel.ts"],"sourcesContent":["import { Directive, ElementRef, Inject, Input, OnDestroy, OnInit, DOCUMENT } from '@angular/core';\nimport { ThemePalette } from '@angular/material/core';\nimport { generateID } from '@bravura/ui/common';\n\n/**\n * A \"tinted\" element has a shaded background specified by the `ThemePalette`, which\n * is compatible with both light and dark themes.\n */\n@Directive({\n\tselector: '[buiTinted], bui-panel',\n\thost: { class: 'bui-host' },\n\texportAs: 'buiTinted',\n\tstandalone: false\n})\nexport class TintedDirective implements OnInit, OnDestroy {\n\t/**\n\t * The base color of the shaded background\n\t * @default 'primary'\n\t */\n\t@Input('buiTinted')\n\tget color(): ThemePalette {\n\t\treturn this._color;\n\t}\n\tset color(c: ThemePalette) {\n\t\tthis._color = c;\n\t\tthis.generateStyle();\n\t}\n\n\tprivate _color: any = 'default';\n\n\tprivate readonly _addedStyle: HTMLStyleElement;\n\tprivate readonly _attr: string;\n\tprivate _element: HTMLElement;\n\n\tconstructor(\n\t\t@Inject(DOCUMENT) private _doc: Document,\n\t\telemRef: ElementRef<HTMLElement>\n\t) {\n\t\tthis._addedStyle = this._doc.createElement('style');\n\t\tthis._attr = 'bui-tinted-' + generateID();\n\t\tthis._element = elemRef.nativeElement;\n\t\telemRef.nativeElement.setAttribute(this._attr, '');\n\t}\n\n\tngOnInit(): void {\n\t\tthis._element.style.position = 'relative';\n\t\tthis.generateStyle();\n\t\tthis._element.appendChild(this._addedStyle);\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._element.removeChild(this._addedStyle);\n\t}\n\n\tprivate generateStyle(): void {\n\t\tthis._addedStyle.innerText =\n\t\t\t`[${this._attr}]::after { position: absolute; opacity: 0.1; border-radius: inherit; display: block; content: ''; ` +\n\t\t\t` background-color: var(--bui-color-${this.color}); top: 0; left: 0; ` +\n\t\t\t` bottom: 0; right: 0; pointer-events: none; }`;\n\t}\n}\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Host, Input, OnInit } from '@angular/core';\r\nimport { ThemePalette } from '@angular/material/core';\r\nimport { TintedDirective } from './tinted.directive';\r\n\r\n/**\r\n * A `bui-panel` consists of a `mat-card` and a tinted backdrop.\r\n *\r\n * Unlike `mat-card`, `bui-panel` has a flat appearance by default and a transparent background.\r\n * The backdrop is nearly transparent, blending the theme palette `color`\r\n * and the effective background color of the DOM ancestors.\r\n *\r\n * `bui-panel` supports all the content child directives of `mat-card` as well as `bui-panel-section`.\r\n *\r\n * `bui-panel-section`s are subdivisions of `bui-panel` that rearrange their orientation based on the width of the container element.\r\n *\r\n */\r\n@Component({\r\n\tselector: 'bui-panel',\r\n\ttemplateUrl: './panel.component.html',\r\n\tstyleUrls: ['./panel.component.scss'],\r\n\thost: {\r\n\t\tclass: 'bui-panel bui-host',\r\n\t\t'[class.bui-panel-vertical]': `_width < breakpoint`,\r\n\t\t'[class.bui-panel-horizontal]': `_width >= breakpoint`\r\n\t},\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\r\n\tstandalone: false\r\n})\r\nexport class PanelComponent implements OnInit {\r\n\t/**\r\n\t * Additional style classes on the tinted backdrop element.\r\n\t * @deprecated\r\n\t * @ignore\r\n\t */\r\n\t@Input()\r\n\tbackdropClass?: string;\r\n\r\n\t/**\r\n\t * Additional style classes on the `<mat-card>` element.\r\n\t */\r\n\t@Input()\r\n\tcardClass?: string;\r\n\r\n\t/**\r\n\t * This property defines the background (shaded) and border colors of the panel\r\n\t */\r\n\t@Input()\r\n\tget color(): ThemePalette {\r\n\t\treturn this._color;\r\n\t}\r\n\tset color(value: ThemePalette) {\r\n\t\tthis._color = value;\r\n\t\tthis._tinted.color = value;\r\n\t\tthis._cd.markForCheck();\r\n\t}\r\n\r\n\t/**\r\n\t * In contrast to using a `mat-card` alone, a `bui-panel` does not have a elevated appearance by default.\r\n\t *\r\n\t * This property can change the default appearance to\r\n\t *\r\n\t * * `raised` - the original `mat-card` default\r\n\t * * `outline` - a `mat-card` with borders\r\n\t * * `flat` - no border or elevation\r\n\t */\r\n\t@Input()\r\n\tget appearance(): 'outlined' | 'raised' | 'flat' {\r\n\t\treturn this._appearance;\r\n\t}\r\n\tset appearance(value: 'outlined' | 'raised' | 'flat') {\r\n\t\tthis._appearance = value;\r\n\t\tthis._cd.markForCheck();\r\n\t}\r\n\r\n\t/**\r\n\t * The width of the host element, at which the panel section container will change its orientation.\r\n\t */\r\n\t@Input()\r\n\tbreakpoint = 600;\r\n\r\n\t/** @ignore */\r\n\t_width = 600;\r\n\r\n\tprivate _color: ThemePalette = 'primary';\r\n\r\n\tprivate _appearance: 'outlined' | 'raised' | 'flat' = 'flat';\r\n\r\n\tconstructor(\r\n\t\tprivate _cd: ChangeDetectorRef,\r\n\t\t@Host() private _tinted: TintedDirective\r\n\t) {}\r\n\r\n\tngOnInit(): void {}\r\n\r\n\t/** @ignore */\r\n\t_resized(width: number): void {\r\n\t\tthis._width = width;\r\n\t\tthis._cd.markForCheck();\r\n\t}\r\n}\r\n","<mat-card\r\n\t[buiSizingBy]=\"'parent'\"\r\n\t(buiResized)=\"_resized($event.width)\"\r\n\t[appearance]=\"appearance === 'flat' ? 'raised' : appearance\"\r\n\tclass=\"bui-border-{{ color || 'none' }} {{ cardClass }} {{\r\n\t\tappearance === 'flat' ? 'mat-elevation-z' : appearance === 'outlined' ? 'mat-elevation-z bui-panel-border' : ''\r\n\t}}\"\r\n>\r\n\t<ng-content></ng-content>\r\n</mat-card>\r\n","import { ChangeDetectionStrategy, Component, ElementRef, OnDestroy, OnInit } from '@angular/core';\r\n\r\nconst CONTAINER_PREFIX = 'bui-panel-section-container';\r\n\r\nconst COUNT_ATTR = 'bui-section-count';\r\n/**\r\n * `bui-panel-section`s are subdivisions of `bui-panel` that rearrange their orientation based on the width of the container element.\r\n */\r\n@Component({\r\n\tselector: 'bui-panel-section',\r\n\ttemplateUrl: './panel-section.component.html',\r\n\tstyleUrls: ['./panel-section.component.scss'],\r\n\thost: {\r\n\t\tclass: 'bui-panel-section'\r\n\t},\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\r\n\tstandalone: false\r\n})\r\nexport class PanelSectionComponent implements OnInit, OnDestroy {\r\n\tprivate _parentElement!: HTMLElement;\r\n\r\n\tconstructor(private _elementRef: ElementRef<HTMLElement>) {}\r\n\r\n\tngOnInit(): void {\r\n\t\tthis._parentElement = this._elementRef.nativeElement.parentElement!;\r\n\t\tthis._parentElement.classList.add(CONTAINER_PREFIX);\r\n\t\tthis._calcCount(1);\r\n\t}\r\n\r\n\tngOnDestroy(): void {\r\n\t\tthis._calcCount(-1);\r\n\t}\r\n\r\n\tprivate _calcCount(delta: number) {\r\n\t\tlet count = this._parentElement.getAttribute(COUNT_ATTR);\r\n\t\tif (count) {\r\n\t\t\tthis._parentElement.classList.remove(`${CONTAINER_PREFIX}-${count}`);\r\n\t\t} else {\r\n\t\t\tcount = '0';\r\n\t\t}\r\n\t\tcount = `${Math.max(Number(count) + delta, 0)}`;\r\n\t\tthis._parentElement.setAttribute(COUNT_ATTR, count);\r\n\t\tthis._parentElement.classList.add(`${CONTAINER_PREFIX}-${count}`);\r\n\t}\r\n}\r\n","<ng-content></ng-content>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { PanelComponent } from './panel.component';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { BehaviorModule } from '@bravura/ui/behavior';\r\nimport { PanelSectionComponent } from './panel-section.component';\r\nimport { TintedDirective } from './tinted.directive';\r\n\r\n@NgModule({\r\n\tdeclarations: [PanelComponent, PanelSectionComponent, TintedDirective],\r\n\timports: [CommonModule, MatCardModule, BehaviorModule],\r\n\texports: [MatCardModule, PanelComponent, PanelSectionComponent, TintedDirective]\r\n})\r\nexport class PanelModule {}\r\n\r\nexport { PanelComponent, PanelSectionComponent, TintedDirective };\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.TintedDirective"],"mappings":";;;;;;;;;AAIA;;;AAGG;MAOU,eAAe,CAAA;AAC3B;;;AAGG;AACH,IAAA,IACI,KAAK,GAAA;QACR,OAAO,IAAI,CAAC,MAAM;IACnB;IACA,IAAI,KAAK,CAAC,CAAe,EAAA;AACxB,QAAA,IAAI,CAAC,MAAM,GAAG,CAAC;QACf,IAAI,CAAC,aAAa,EAAE;IACrB;IAQA,WAAA,CAC2B,IAAc,EACxC,OAAgC,EAAA;QADN,IAAA,CAAA,IAAI,GAAJ,IAAI;QAPvB,IAAA,CAAA,MAAM,GAAQ,SAAS;QAU9B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;AACnD,QAAA,IAAI,CAAC,KAAK,GAAG,aAAa,GAAG,UAAU,EAAE;AACzC,QAAA,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,aAAa;QACrC,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC;IACnD;IAEA,QAAQ,GAAA;QACP,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU;QACzC,IAAI,CAAC,aAAa,EAAE;QACpB,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC;IAC5C;IAEA,WAAW,GAAA;QACV,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,C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AE,cAAc,EAAE,qBAAqB,EAAE,eAAe;AAC/E,iBAAA;;;ACZD;;AAEG;;;;"}
|
|
@@ -36,10 +36,10 @@ class PhoneNumberPipe {
|
|
|
36
36
|
return result;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
40
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
39
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PhoneNumberPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
40
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: PhoneNumberPipe, isStandalone: false, name: "buiPhone" }); }
|
|
41
41
|
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PhoneNumberPipe, decorators: [{
|
|
43
43
|
type: Pipe,
|
|
44
44
|
args: [{
|
|
45
45
|
name: 'buiPhone',
|
|
@@ -102,10 +102,10 @@ class PhoneNumberValidator {
|
|
|
102
102
|
validate(_) {
|
|
103
103
|
return PhoneNumberValidator.validateControl(this._el.nativeElement, this.telType, false);
|
|
104
104
|
}
|
|
105
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
106
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
105
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PhoneNumberValidator, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
106
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: PhoneNumberValidator, isStandalone: false, selector: "[buiTelInput], input([type=tel])[ngModel], input([type=tel])[formControlName], input([type=tel])[formControl]", inputs: { telType: "telType" }, providers: [PHONE_VALIDATOR], ngImport: i0 }); }
|
|
107
107
|
}
|
|
108
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PhoneNumberValidator, decorators: [{
|
|
109
109
|
type: Directive,
|
|
110
110
|
args: [{
|
|
111
111
|
selector: SELECTOR,
|
|
@@ -265,10 +265,10 @@ class PhoneNumberDirective {
|
|
|
265
265
|
}
|
|
266
266
|
}, 20);
|
|
267
267
|
}
|
|
268
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
269
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
268
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PhoneNumberDirective, deps: [{ token: i0.ElementRef }, { token: i1.NgModel, optional: true }, { token: i1.FormControlName, optional: true }, { token: i1.FormControlDirective, optional: true }, { token: LOCALE_ID }, { token: i0.NgZone }, { token: i2.MatFormField, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
269
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: PhoneNumberDirective, isStandalone: false, selector: "[buiTelInput], input([type=tel])[ngModel], input([type=tel])[formControlName], input([type=tel])[formControl]", inputs: { telType: "telType", telDropdown: "telDropdown" }, outputs: { telCountryChange: "telCountryChange" }, host: { listeners: { "input": "onInput()" } }, usesOnChanges: true, ngImport: i0 }); }
|
|
270
270
|
}
|
|
271
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PhoneNumberDirective, decorators: [{
|
|
272
272
|
type: Directive,
|
|
273
273
|
args: [{
|
|
274
274
|
selector: SELECTOR,
|
|
@@ -300,11 +300,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
300
300
|
* @internal
|
|
301
301
|
*/
|
|
302
302
|
class PhoneModule {
|
|
303
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
304
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
305
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
303
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PhoneModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
304
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: PhoneModule, declarations: [PhoneNumberPipe, PhoneNumberDirective, PhoneNumberValidator], imports: [CommonModule], exports: [PhoneNumberDirective, PhoneNumberPipe, PhoneNumberValidator] }); }
|
|
305
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PhoneModule, imports: [CommonModule] }); }
|
|
306
306
|
}
|
|
307
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
307
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PhoneModule, decorators: [{
|
|
308
308
|
type: NgModule,
|
|
309
309
|
args: [{
|
|
310
310
|
declarations: [PhoneNumberPipe, PhoneNumberDirective, PhoneNumberValidator],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bravura-ui-phone-number.mjs","sources":["../../../projects/ui/phone-number/phone-number.pipe.ts","../../../projects/ui/phone-number/phone-number.validator.ts","../../../projects/ui/phone-number/phone-number.directive.ts","../../../projects/ui/phone-number/phone-number.module.ts","../../../projects/ui/phone-number/bravura-ui-phone-number.ts"],"sourcesContent":["import { Inject, LOCALE_ID, Pipe, PipeTransform } from '@angular/core';\r\n\r\ndeclare const intlTelInputUtils: any;\r\n\r\n/**\r\n * @internal\r\n */\r\n@Pipe({\r\n\tname: 'buiPhone',\r\n\tpure: true,\r\n\tstandalone: false\r\n})\r\nexport class PhoneNumberPipe implements PipeTransform {\r\n\tconstructor(@Inject(LOCALE_ID) private _locale: string) {}\r\n\r\n\ttransform(value: any, mode?: string, renderLink?: boolean): string {\r\n\t\tif (!value) {\r\n\t\t\treturn value;\r\n\t\t}\r\n\r\n\t\tconst countryCode = getCountryCodeFromLocale(this._locale);\r\n\r\n\t\tlet format: number;\r\n\t\tswitch (mode) {\r\n\t\t\tcase 'NATIONAL':\r\n\t\t\t\tformat = intlTelInputUtils.numberFormat.NATIONAL;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tformat = intlTelInputUtils.numberFormat.INTERNATIONAL;\r\n\t\t}\r\n\t\tconst result = intlTelInputUtils.formatNumber(value, countryCode, format);\r\n\t\tif (renderLink) {\r\n\t\t\treturn `<a href=\"tel:${result}\">${result}</a>`;\r\n\t\t} else {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport function getCountryCodeFromLocale(locale: string): string {\r\n\treturn locale.replace(/.+[-_]([a-z][a-z])$/i, '$1');\r\n}\r\n","import { Directive, ElementRef, Input, StaticProvider, forwardRef } from '@angular/core';\r\nimport { AbstractControl, NG_VALIDATORS, Validator } from '@angular/forms';\r\n\r\n/**\r\n * @internal\r\n */\r\nexport const SELECTOR =\r\n\t'[buiTelInput], input([type=tel])[ngModel], input([type=tel])[formControlName], input([type=tel])[formControl]';\r\n\r\n/**\r\n * @internal\r\n */\r\nexport const PHONE_VALIDATOR: StaticProvider = {\r\n\tprovide: NG_VALIDATORS,\r\n\tuseExisting: forwardRef(() => PhoneNumberValidator),\r\n\tmulti: true\r\n};\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type TEL_TYPE = 'MOBILE' | 'FIXED_LINE_OR_MOBILE' | 'FIXED_LINE';\r\n\r\n/**\r\n * @internal\r\n */\r\ndeclare const intlTelInputUtils: any;\r\n\r\n/**\r\n * @internal\r\n */\r\n@Directive({\r\n\tselector: SELECTOR,\r\n\tproviders: [PHONE_VALIDATOR],\r\n\tstandalone: false\r\n})\r\nexport class PhoneNumberValidator implements Validator {\r\n\t@Input()\r\n\ttelType: TEL_TYPE = 'FIXED_LINE';\r\n\r\n\tstatic validateControl(inp: HTMLInputElement, type: TEL_TYPE, update: boolean): { [key: string]: any } | null {\r\n\t\tconst err = { tel: true };\r\n\t\tif (!inp.value) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tconst iti = (inp as any).$$iti;\r\n\t\tif (!iti) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tif (iti.isValidNumber()) {\r\n\t\t\tconst n = iti.getNumber(intlTelInputUtils.numberFormat.INTERNATIONAL);\r\n\t\t\tif (update) {\r\n\t\t\t\tinp.value = n;\r\n\t\t\t}\r\n\r\n\t\t\tconst t = iti.getNumberType();\r\n\t\t\tif (t !== intlTelInputUtils.numberType.FIXED_LINE_OR_MOBILE) {\r\n\t\t\t\tif (\r\n\t\t\t\t\t(type === 'MOBILE' && t !== intlTelInputUtils.numberType.MOBILE) ||\r\n\t\t\t\t\t(type === 'FIXED_LINE' && t !== intlTelInputUtils.numberType.FIXED_LINE)\r\n\t\t\t\t) {\r\n\t\t\t\t\treturn err;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn err;\r\n\t}\r\n\r\n\tconstructor(private _el: ElementRef<HTMLInputElement>) {}\r\n\r\n\tvalidate(_: AbstractControl): { [key: string]: any } | null {\r\n\t\treturn PhoneNumberValidator.validateControl(this._el.nativeElement, this.telType, false);\r\n\t}\r\n}\r\n","import {\r\n\tDirective,\r\n\tElementRef,\r\n\tEventEmitter,\r\n\tHostListener,\r\n\tInject,\r\n\tInput,\r\n\tLOCALE_ID,\r\n\tNgZone,\r\n\tOnChanges,\r\n\tOnDestroy,\r\n\tOnInit,\r\n\tOptional,\r\n\tOutput,\r\n\tSimpleChanges\r\n} from '@angular/core';\r\nimport { UntypedFormControl, FormControlDirective, FormControlName, NgModel } from '@angular/forms';\r\nimport { MatFormField } from '@angular/material/form-field';\r\nimport intlTelInput from 'intl-tel-input';\r\nimport { of } from 'rxjs';\r\nimport { debounceTime, take } from 'rxjs/operators';\r\n\r\nimport { getCountryCodeFromLocale } from './phone-number.pipe';\r\nimport { PhoneNumberValidator, SELECTOR, TEL_TYPE } from './phone-number.validator';\r\n\r\n/**\r\n * @ignore\r\n */\r\ndeclare const intlTelInputUtils: any;\r\n\r\n/**\r\n * Add phone number validation support by specifying the `type` attribute as `tel` in an `<input>` element.\r\n *\r\n * To use this feature, please install a peer dependency `intl-tel-input` in your project and add the following\r\n * to your application polyfills:\r\n *\r\n * ```javascript\r\n * import 'intl-tel-input/build/js/utils.js';\r\n * ```\r\n *\r\n * You will also need to add the following statements to one of your global SCSS files:\r\n *\r\n * ```scss\r\n * $flagsImagePath: '~intl-tel-input/build/img/' !default;\r\n * @import '~intl-tel-input/src/css/intlTelInput';\r\n * ```\r\n */\r\n@Directive({\r\n\tselector: SELECTOR,\r\n\tstandalone: false\r\n})\r\nexport class PhoneNumberDirective implements OnInit, OnChanges, OnDestroy {\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tstatic POST_RENDER_INIT_DELAY = 20;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tstatic BYPASS_SHADOW_DETECTION = false;\r\n\r\n\t/**\r\n\t * The type of phone number to validate for\r\n\t */\r\n\t@Input()\r\n\ttelType: TEL_TYPE = 'FIXED_LINE';\r\n\r\n\t/**\r\n\t * Disable country dropdown by setting this property to `false`.\r\n\t */\r\n\t@Input()\r\n\ttelDropdown = true;\r\n\r\n\t/**\r\n\t * This event is triggered when a new country is selected from the dropdown. The event detail is the ISO country code.\r\n\t */\r\n\t@Output()\r\n\ttelCountryChange = new EventEmitter<string>();\r\n\r\n\tprivate _control: UntypedFormControl | undefined;\r\n\tprivate _reactive = false;\r\n\tprivate _countryChangeListener: () => void = () => null;\r\n\tprivate _input: HTMLInputElement | undefined;\r\n\tprivate _iti: any;\r\n\r\n\tconstructor(\r\n\t\tprivate _el: ElementRef<HTMLInputElement>,\r\n\t\t@Optional() private _ngModel: NgModel,\r\n\t\t@Optional() private _formControlName: FormControlName,\r\n\t\t@Optional() private _formControlDirective: FormControlDirective,\r\n\t\t@Inject(LOCALE_ID) private _locale: string,\r\n\t\tprivate _zone: NgZone,\r\n\t\t@Optional() private _matField: MatFormField\r\n\t) {}\r\n\r\n\t/** @internal */\r\n\t@HostListener('input')\r\n\tonInput() {\r\n\t\tconst err = PhoneNumberValidator.validateControl(this._input!, this.telType, true);\r\n\t\tthis._control!.patchValue(this._input!.value, { emitEvent: false });\r\n\r\n\t\tif (this._reactive && err) {\r\n\t\t\tthis._control!.setErrors({ ...this._control!.errors, ...err });\r\n\t\t}\r\n\t}\r\n\r\n\tngOnInit() {\r\n\t\tconst ctrDirective = this._ngModel || this._formControlName || this._formControlDirective;\r\n\t\tthis._control = ctrDirective.control as UntypedFormControl;\r\n\t\tthis._reactive = this._ngModel ? false : true;\r\n\t\tthis._input = this._el.nativeElement;\r\n\r\n\t\tthis._countryChangeListener = (() => {\r\n\t\t\tthis._zone.run(() => {\r\n\t\t\t\tthis._control!.markAsDirty();\r\n\t\t\t\tthis._control!.updateValueAndValidity({ emitEvent: true });\r\n\t\t\t\tthis.telCountryChange.emit(this._iti.getSelectedCountryData().iso2);\r\n\t\t\t});\r\n\t\t}).bind(this);\r\n\r\n\t\t(PhoneNumberDirective.BYPASS_SHADOW_DETECTION ? of(0 as any) : this._zone.onStable)\r\n\t\t\t.pipe(debounceTime(10), take(1))\r\n\t\t\t.subscribe(() => this.initElement());\r\n\t}\r\n\r\n\tngOnDestroy() {\r\n\t\tthis._input!.removeEventListener('countrychange', this._countryChangeListener);\r\n\t\tthis._iti?.destroy();\r\n\t}\r\n\r\n\tngOnChanges(changes: SimpleChanges): void {\r\n\t\tconst td = changes.telDropdown;\r\n\t\tif (td && !td.firstChange) {\r\n\t\t\tthis.ngOnDestroy();\r\n\t\t\tthis.ngOnInit();\r\n\t\t}\r\n\t\tconst type = changes.telType;\r\n\t\tif (type && !type.firstChange) {\r\n\t\t\tthis.onInput();\r\n\t\t}\r\n\t}\r\n\r\n\tprivate initElement() {\r\n\t\tconst countryCode = getCountryCodeFromLocale(this._locale).toLowerCase();\r\n\r\n\t\tconst root: ShadowRoot | Document = this._input!.getRootNode() as ShadowRoot | Document;\r\n\t\tif (!root.querySelector('#bui-tel-input-style')) {\r\n\t\t\tconst styleTag = document.createElement('style');\r\n\t\t\tstyleTag.id = 'bui-tel-input-style';\r\n\t\t\tstyleTag.innerText =\r\n\t\t\t\t'.mat-mdc-form-field .bui-tel-input-placeholder:not(.mdc-floating-label--float-above){margin-left:44px;}' +\r\n\t\t\t\t'.iti--allow-dropdown{margin-left:-8px}' +\r\n\t\t\t\t'.bui-tel-input-with-value:disabled{cursor:pointer;}';\r\n\t\t\t(root instanceof Document ? (root.querySelector('head') as any) : root).appendChild(styleTag);\r\n\t\t}\r\n\t\tthis._iti = intlTelInput(this._input!, {\r\n\t\t\tinitialCountry: countryCode,\r\n\t\t\tplaceholderNumberType: this.telType,\r\n\t\t\tpreferredCountries: [countryCode, ...['au', 'ca', 'nz', 'us', 'gb'].filter(c => c !== countryCode)],\r\n\t\t\tdropdownContainer: root instanceof ShadowRoot ? root.querySelector('overlay-root') || root : (root.body as any),\r\n\t\t\tautoPlaceholder: 'off',\r\n\t\t\tallowDropdown: this.telDropdown\r\n\t\t});\r\n\r\n\t\t(this._input as any).$$iti = this._iti;\r\n\t\tthis._input!.addEventListener('countrychange', this._countryChangeListener);\r\n\t\tconst frameTime = Date.now();\r\n\t\tconst postRenderWork = () => {\r\n\t\t\tif (frameTime + PhoneNumberDirective.POST_RENDER_INIT_DELAY > Date.now()) {\r\n\t\t\t\twindow.requestAnimationFrame(postRenderWork);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tlet label: HTMLLabelElement | undefined;\r\n\t\t\tif (this._matField?.getLabelId() && typeof root.getElementById === 'function') {\r\n\t\t\t\tlabel = root.getElementById(this._matField.getLabelId()!) as HTMLLabelElement;\r\n\t\t\t\tlabel?.classList.remove('bui-tel-input-placeholder');\r\n\t\t\t}\r\n\t\t\tif (label && this.telDropdown) {\r\n\t\t\t\tlabel.classList.add('bui-tel-input-placeholder');\r\n\t\t\t}\r\n\r\n\t\t\tif (this._input?.value) {\r\n\t\t\t\tthis._input.classList.add('bui-tel-input-with-value');\r\n\t\t\t}\r\n\t\t};\r\n\t\twindow.requestAnimationFrame(postRenderWork);\r\n\r\n\t\tthis._input!.addEventListener('click', () => {\r\n\t\t\tif (this._control?.disabled && this._control.value) {\r\n\t\t\t\twindow.location.href = 'tel://' + this._control.value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis._control?.registerOnDisabledChange(isDisabled => this._patchValueByState(isDisabled));\r\n\t\tthis._patchValueByState(this._control!.disabled);\r\n\t}\r\n\r\n\tprivate _patchValueByState(isDisabled: boolean) {\r\n\t\tsetTimeout(() => {\r\n\t\t\tif (!isDisabled) {\r\n\t\t\t\tthis.onInput();\r\n\t\t\t} else {\r\n\t\t\t\tconst v = this._iti.getNumber(intlTelInputUtils.numberFormat.NATIONAL);\r\n\t\t\t\tthis._input!.value = v;\r\n\t\t\t\tthis._control?.patchValue(this._input?.value, { emitEvent: false });\r\n\t\t\t}\r\n\t\t}, 20);\r\n\t}\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\n\r\nimport { PhoneNumberDirective } from './phone-number.directive';\r\nimport { PhoneNumberPipe } from './phone-number.pipe';\r\nimport { PhoneNumberValidator } from './phone-number.validator';\r\n\r\n/**\r\n * @internal\r\n */\r\n@NgModule({\r\n\tdeclarations: [PhoneNumberPipe, PhoneNumberDirective, PhoneNumberValidator],\r\n\timports: [CommonModule],\r\n\texports: [PhoneNumberDirective, PhoneNumberPipe, PhoneNumberValidator]\r\n})\r\nexport class PhoneModule {}\r\n\r\nexport { PhoneNumberDirective, PhoneNumberPipe, PhoneNumberValidator };\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAIA;;AAEG;MAMU,eAAe,CAAA;AAC3B,IAAA,WAAA,CAAuC,OAAe,EAAA;QAAf,IAAO,CAAA,OAAA,GAAP,OAAO;;AAE9C,IAAA,SAAS,CAAC,KAAU,EAAE,IAAa,EAAE,UAAoB,EAAA;QACxD,IAAI,CAAC,KAAK,EAAE;AACX,YAAA,OAAO,KAAK;;QAGb,MAAM,WAAW,GAAG,wBAAwB,CAAC,IAAI,CAAC,OAAO,CAAC;AAE1D,QAAA,IAAI,MAAc;QAClB,QAAQ,IAAI;AACX,YAAA,KAAK,UAAU;AACd,gBAAA,MAAM,GAAG,iBAAiB,CAAC,YAAY,CAAC,QAAQ;gBAChD;AACD,YAAA;AACC,gBAAA,MAAM,GAAG,iBAAiB,CAAC,YAAY,CAAC,aAAa;;AAEvD,QAAA,MAAM,MAAM,GAAG,iBAAiB,CAAC,YAAY,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,CAAC;QACzE,IAAI,UAAU,EAAE;AACf,YAAA,OAAO,CAAgB,aAAA,EAAA,MAAM,CAAK,EAAA,EAAA,MAAM,MAAM;;aACxC;AACN,YAAA,OAAO,MAAM;;;AAtBH,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,C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,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YAHb,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAGV,WAAW,EAAA,UAAA,EAAA,CAAA;kBALvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE,CAAC,eAAe,EAAE,oBAAoB,EAAE,oBAAoB,CAAC;oBAC3E,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,eAAe,EAAE,oBAAoB;AACrE,iBAAA;;;ACdD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"bravura-ui-phone-number.mjs","sources":["../../../projects/ui/phone-number/phone-number.pipe.ts","../../../projects/ui/phone-number/phone-number.validator.ts","../../../projects/ui/phone-number/phone-number.directive.ts","../../../projects/ui/phone-number/phone-number.module.ts","../../../projects/ui/phone-number/bravura-ui-phone-number.ts"],"sourcesContent":["import { Inject, LOCALE_ID, Pipe, PipeTransform } from '@angular/core';\r\n\r\ndeclare const intlTelInputUtils: any;\r\n\r\n/**\r\n * @internal\r\n */\r\n@Pipe({\r\n\tname: 'buiPhone',\r\n\tpure: true,\r\n\tstandalone: false\r\n})\r\nexport class PhoneNumberPipe implements PipeTransform {\r\n\tconstructor(@Inject(LOCALE_ID) private _locale: string) {}\r\n\r\n\ttransform(value: any, mode?: string, renderLink?: boolean): string {\r\n\t\tif (!value) {\r\n\t\t\treturn value;\r\n\t\t}\r\n\r\n\t\tconst countryCode = getCountryCodeFromLocale(this._locale);\r\n\r\n\t\tlet format: number;\r\n\t\tswitch (mode) {\r\n\t\t\tcase 'NATIONAL':\r\n\t\t\t\tformat = intlTelInputUtils.numberFormat.NATIONAL;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tformat = intlTelInputUtils.numberFormat.INTERNATIONAL;\r\n\t\t}\r\n\t\tconst result = intlTelInputUtils.formatNumber(value, countryCode, format);\r\n\t\tif (renderLink) {\r\n\t\t\treturn `<a href=\"tel:${result}\">${result}</a>`;\r\n\t\t} else {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport function getCountryCodeFromLocale(locale: string): string {\r\n\treturn locale.replace(/.+[-_]([a-z][a-z])$/i, '$1');\r\n}\r\n","import { Directive, ElementRef, Input, StaticProvider, forwardRef } from '@angular/core';\r\nimport { AbstractControl, NG_VALIDATORS, Validator } from '@angular/forms';\r\n\r\n/**\r\n * @internal\r\n */\r\nexport const SELECTOR =\r\n\t'[buiTelInput], input([type=tel])[ngModel], input([type=tel])[formControlName], input([type=tel])[formControl]';\r\n\r\n/**\r\n * @internal\r\n */\r\nexport const PHONE_VALIDATOR: StaticProvider = {\r\n\tprovide: NG_VALIDATORS,\r\n\tuseExisting: forwardRef(() => PhoneNumberValidator),\r\n\tmulti: true\r\n};\r\n\r\n/**\r\n * @internal\r\n */\r\nexport type TEL_TYPE = 'MOBILE' | 'FIXED_LINE_OR_MOBILE' | 'FIXED_LINE';\r\n\r\n/**\r\n * @internal\r\n */\r\ndeclare const intlTelInputUtils: any;\r\n\r\n/**\r\n * @internal\r\n */\r\n@Directive({\r\n\tselector: SELECTOR,\r\n\tproviders: [PHONE_VALIDATOR],\r\n\tstandalone: false\r\n})\r\nexport class PhoneNumberValidator implements Validator {\r\n\t@Input()\r\n\ttelType: TEL_TYPE = 'FIXED_LINE';\r\n\r\n\tstatic validateControl(inp: HTMLInputElement, type: TEL_TYPE, update: boolean): { [key: string]: any } | null {\r\n\t\tconst err = { tel: true };\r\n\t\tif (!inp.value) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tconst iti = (inp as any).$$iti;\r\n\t\tif (!iti) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tif (iti.isValidNumber()) {\r\n\t\t\tconst n = iti.getNumber(intlTelInputUtils.numberFormat.INTERNATIONAL);\r\n\t\t\tif (update) {\r\n\t\t\t\tinp.value = n;\r\n\t\t\t}\r\n\r\n\t\t\tconst t = iti.getNumberType();\r\n\t\t\tif (t !== intlTelInputUtils.numberType.FIXED_LINE_OR_MOBILE) {\r\n\t\t\t\tif (\r\n\t\t\t\t\t(type === 'MOBILE' && t !== intlTelInputUtils.numberType.MOBILE) ||\r\n\t\t\t\t\t(type === 'FIXED_LINE' && t !== intlTelInputUtils.numberType.FIXED_LINE)\r\n\t\t\t\t) {\r\n\t\t\t\t\treturn err;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn err;\r\n\t}\r\n\r\n\tconstructor(private _el: ElementRef<HTMLInputElement>) {}\r\n\r\n\tvalidate(_: AbstractControl): { [key: string]: any } | null {\r\n\t\treturn PhoneNumberValidator.validateControl(this._el.nativeElement, this.telType, false);\r\n\t}\r\n}\r\n","import {\r\n\tDirective,\r\n\tElementRef,\r\n\tEventEmitter,\r\n\tHostListener,\r\n\tInject,\r\n\tInput,\r\n\tLOCALE_ID,\r\n\tNgZone,\r\n\tOnChanges,\r\n\tOnDestroy,\r\n\tOnInit,\r\n\tOptional,\r\n\tOutput,\r\n\tSimpleChanges\r\n} from '@angular/core';\r\nimport { UntypedFormControl, FormControlDirective, FormControlName, NgModel } from '@angular/forms';\r\nimport { MatFormField } from '@angular/material/form-field';\r\nimport intlTelInput from 'intl-tel-input';\r\nimport { of } from 'rxjs';\r\nimport { debounceTime, take } from 'rxjs/operators';\r\n\r\nimport { getCountryCodeFromLocale } from './phone-number.pipe';\r\nimport { PhoneNumberValidator, SELECTOR, TEL_TYPE } from './phone-number.validator';\r\n\r\n/**\r\n * @ignore\r\n */\r\ndeclare const intlTelInputUtils: any;\r\n\r\n/**\r\n * Add phone number validation support by specifying the `type` attribute as `tel` in an `<input>` element.\r\n *\r\n * To use this feature, please install a peer dependency `intl-tel-input` in your project and add the following\r\n * to your application polyfills:\r\n *\r\n * ```javascript\r\n * import 'intl-tel-input/build/js/utils.js';\r\n * ```\r\n *\r\n * You will also need to add the following statements to one of your global SCSS files:\r\n *\r\n * ```scss\r\n * $flagsImagePath: '~intl-tel-input/build/img/' !default;\r\n * @import '~intl-tel-input/src/css/intlTelInput';\r\n * ```\r\n */\r\n@Directive({\r\n\tselector: SELECTOR,\r\n\tstandalone: false\r\n})\r\nexport class PhoneNumberDirective implements OnInit, OnChanges, OnDestroy {\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tstatic POST_RENDER_INIT_DELAY = 20;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tstatic BYPASS_SHADOW_DETECTION = false;\r\n\r\n\t/**\r\n\t * The type of phone number to validate for\r\n\t */\r\n\t@Input()\r\n\ttelType: TEL_TYPE = 'FIXED_LINE';\r\n\r\n\t/**\r\n\t * Disable country dropdown by setting this property to `false`.\r\n\t */\r\n\t@Input()\r\n\ttelDropdown = true;\r\n\r\n\t/**\r\n\t * This event is triggered when a new country is selected from the dropdown. The event detail is the ISO country code.\r\n\t */\r\n\t@Output()\r\n\ttelCountryChange = new EventEmitter<string>();\r\n\r\n\tprivate _control: UntypedFormControl | undefined;\r\n\tprivate _reactive = false;\r\n\tprivate _countryChangeListener: () => void = () => null;\r\n\tprivate _input: HTMLInputElement | undefined;\r\n\tprivate _iti: any;\r\n\r\n\tconstructor(\r\n\t\tprivate _el: ElementRef<HTMLInputElement>,\r\n\t\t@Optional() private _ngModel: NgModel,\r\n\t\t@Optional() private _formControlName: FormControlName,\r\n\t\t@Optional() private _formControlDirective: FormControlDirective,\r\n\t\t@Inject(LOCALE_ID) private _locale: string,\r\n\t\tprivate _zone: NgZone,\r\n\t\t@Optional() private _matField: MatFormField\r\n\t) {}\r\n\r\n\t/** @internal */\r\n\t@HostListener('input')\r\n\tonInput() {\r\n\t\tconst err = PhoneNumberValidator.validateControl(this._input!, this.telType, true);\r\n\t\tthis._control!.patchValue(this._input!.value, { emitEvent: false });\r\n\r\n\t\tif (this._reactive && err) {\r\n\t\t\tthis._control!.setErrors({ ...this._control!.errors, ...err });\r\n\t\t}\r\n\t}\r\n\r\n\tngOnInit() {\r\n\t\tconst ctrDirective = this._ngModel || this._formControlName || this._formControlDirective;\r\n\t\tthis._control = ctrDirective.control as UntypedFormControl;\r\n\t\tthis._reactive = this._ngModel ? false : true;\r\n\t\tthis._input = this._el.nativeElement;\r\n\r\n\t\tthis._countryChangeListener = (() => {\r\n\t\t\tthis._zone.run(() => {\r\n\t\t\t\tthis._control!.markAsDirty();\r\n\t\t\t\tthis._control!.updateValueAndValidity({ emitEvent: true });\r\n\t\t\t\tthis.telCountryChange.emit(this._iti.getSelectedCountryData().iso2);\r\n\t\t\t});\r\n\t\t}).bind(this);\r\n\r\n\t\t(PhoneNumberDirective.BYPASS_SHADOW_DETECTION ? of(0 as any) : this._zone.onStable)\r\n\t\t\t.pipe(debounceTime(10), take(1))\r\n\t\t\t.subscribe(() => this.initElement());\r\n\t}\r\n\r\n\tngOnDestroy() {\r\n\t\tthis._input!.removeEventListener('countrychange', this._countryChangeListener);\r\n\t\tthis._iti?.destroy();\r\n\t}\r\n\r\n\tngOnChanges(changes: SimpleChanges): void {\r\n\t\tconst td = changes.telDropdown;\r\n\t\tif (td && !td.firstChange) {\r\n\t\t\tthis.ngOnDestroy();\r\n\t\t\tthis.ngOnInit();\r\n\t\t}\r\n\t\tconst type = changes.telType;\r\n\t\tif (type && !type.firstChange) {\r\n\t\t\tthis.onInput();\r\n\t\t}\r\n\t}\r\n\r\n\tprivate initElement() {\r\n\t\tconst countryCode = getCountryCodeFromLocale(this._locale).toLowerCase();\r\n\r\n\t\tconst root: ShadowRoot | Document = this._input!.getRootNode() as ShadowRoot | Document;\r\n\t\tif (!root.querySelector('#bui-tel-input-style')) {\r\n\t\t\tconst styleTag = document.createElement('style');\r\n\t\t\tstyleTag.id = 'bui-tel-input-style';\r\n\t\t\tstyleTag.innerText =\r\n\t\t\t\t'.mat-mdc-form-field .bui-tel-input-placeholder:not(.mdc-floating-label--float-above){margin-left:44px;}' +\r\n\t\t\t\t'.iti--allow-dropdown{margin-left:-8px}' +\r\n\t\t\t\t'.bui-tel-input-with-value:disabled{cursor:pointer;}';\r\n\t\t\t(root instanceof Document ? (root.querySelector('head') as any) : root).appendChild(styleTag);\r\n\t\t}\r\n\t\tthis._iti = intlTelInput(this._input!, {\r\n\t\t\tinitialCountry: countryCode,\r\n\t\t\tplaceholderNumberType: this.telType,\r\n\t\t\tpreferredCountries: [countryCode, ...['au', 'ca', 'nz', 'us', 'gb'].filter(c => c !== countryCode)],\r\n\t\t\tdropdownContainer: root instanceof ShadowRoot ? root.querySelector('overlay-root') || root : (root.body as any),\r\n\t\t\tautoPlaceholder: 'off',\r\n\t\t\tallowDropdown: this.telDropdown\r\n\t\t});\r\n\r\n\t\t(this._input as any).$$iti = this._iti;\r\n\t\tthis._input!.addEventListener('countrychange', this._countryChangeListener);\r\n\t\tconst frameTime = Date.now();\r\n\t\tconst postRenderWork = () => {\r\n\t\t\tif (frameTime + PhoneNumberDirective.POST_RENDER_INIT_DELAY > Date.now()) {\r\n\t\t\t\twindow.requestAnimationFrame(postRenderWork);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tlet label: HTMLLabelElement | undefined;\r\n\t\t\tif (this._matField?.getLabelId() && typeof root.getElementById === 'function') {\r\n\t\t\t\tlabel = root.getElementById(this._matField.getLabelId()!) as HTMLLabelElement;\r\n\t\t\t\tlabel?.classList.remove('bui-tel-input-placeholder');\r\n\t\t\t}\r\n\t\t\tif (label && this.telDropdown) {\r\n\t\t\t\tlabel.classList.add('bui-tel-input-placeholder');\r\n\t\t\t}\r\n\r\n\t\t\tif (this._input?.value) {\r\n\t\t\t\tthis._input.classList.add('bui-tel-input-with-value');\r\n\t\t\t}\r\n\t\t};\r\n\t\twindow.requestAnimationFrame(postRenderWork);\r\n\r\n\t\tthis._input!.addEventListener('click', () => {\r\n\t\t\tif (this._control?.disabled && this._control.value) {\r\n\t\t\t\twindow.location.href = 'tel://' + this._control.value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis._control?.registerOnDisabledChange(isDisabled => this._patchValueByState(isDisabled));\r\n\t\tthis._patchValueByState(this._control!.disabled);\r\n\t}\r\n\r\n\tprivate _patchValueByState(isDisabled: boolean) {\r\n\t\tsetTimeout(() => {\r\n\t\t\tif (!isDisabled) {\r\n\t\t\t\tthis.onInput();\r\n\t\t\t} else {\r\n\t\t\t\tconst v = this._iti.getNumber(intlTelInputUtils.numberFormat.NATIONAL);\r\n\t\t\t\tthis._input!.value = v;\r\n\t\t\t\tthis._control?.patchValue(this._input?.value, { emitEvent: false });\r\n\t\t\t}\r\n\t\t}, 20);\r\n\t}\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\n\r\nimport { PhoneNumberDirective } from './phone-number.directive';\r\nimport { PhoneNumberPipe } from './phone-number.pipe';\r\nimport { PhoneNumberValidator } from './phone-number.validator';\r\n\r\n/**\r\n * @internal\r\n */\r\n@NgModule({\r\n\tdeclarations: [PhoneNumberPipe, PhoneNumberDirective, PhoneNumberValidator],\r\n\timports: [CommonModule],\r\n\texports: [PhoneNumberDirective, PhoneNumberPipe, PhoneNumberValidator]\r\n})\r\nexport class PhoneModule {}\r\n\r\nexport { PhoneNumberDirective, PhoneNumberPipe, PhoneNumberValidator };\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAIA;;AAEG;MAMU,eAAe,CAAA;AAC3B,IAAA,WAAA,CAAuC,OAAe,EAAA;QAAf,IAAA,CAAA,OAAO,GAAP,OAAO;IAAW;AAEzD,IAAA,SAAS,CAAC,KAAU,EAAE,IAAa,EAAE,UAAoB,EAAA;QACxD,IAAI,CAAC,KAAK,EAAE;AACX,YAAA,OAAO,KAAK;QACb;QAEA,MAAM,WAAW,GAAG,wBAAwB,CAAC,IAAI,CAAC,OAAO,CAAC;AAE1D,QAAA,IAAI,MAAc;QAClB,QA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AAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAX,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,EAAA,YAAA,EAAA,CAJR,eAAe,EAAE,oBAAoB,EAAE,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAChE,YAAY,CAAA,EAAA,OAAA,EAAA,CACZ,oBAAoB,EAAE,eAAe,EAAE,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAEzD,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YAHb,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAGV,WAAW,EAAA,UAAA,EAAA,CAAA;kBALvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE,CAAC,eAAe,EAAE,oBAAoB,EAAE,oBAAoB,CAAC;oBAC3E,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,eAAe,EAAE,oBAAoB;AACrE,iBAAA;;;ACdD;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bravura-ui-radio-panel-testing.mjs","sources":["../../../projects/ui/radio-panel/testing/test-api.ts","../../../projects/ui/radio-panel/testing/bravura-ui-radio-panel-testing.ts"],"sourcesContent":["import { ComponentHarnessConstructor, HarnessPredicate } from '@angular/cdk/testing';\r\nimport {\r\n\tMatRadioButtonHarness,\r\n\tMatRadioGroupHarness,\r\n\tRadioButtonHarnessFilters\r\n} from '@angular/material/radio/testing';\r\n\r\nexport interface RadioPanelItemHarnessFilters extends RadioButtonHarnessFilters {\r\n\tvalue?: string | RegExp;\r\n}\r\n\r\nexport class RadioPanelItemHarness extends MatRadioButtonHarness {\r\n\tstatic hostSelector = 'bui-radio-panel-item';\r\n\tgetLabelElement = this.locatorFor('label');\r\n\r\n\tprotected _textLabel = this.locatorFor('label .bui-label-title');\r\n\tprotected _clickLabel = this.getLabelElement;\r\n\r\n\t/**\r\n\t * Gets a `HarnessPredicate` that can be used to search for a radio button with specific\r\n\t * attributes.\r\n\t * @param options Options for filtering which radio button instances are considered a match.\r\n\t * @return a `HarnessPredicate` configured with the given options.\r\n\t */\r\n\tstatic with<T extends MatRadioButtonHarness>(\r\n\t\tthis: ComponentHarnessConstructor<T>,\r\n\t\toptions: RadioPanelItemHarnessFilters = {}\r\n\t): HarnessPredicate<T> {\r\n\t\treturn MatRadioButtonHarness.with\r\n\t\t\t.bind(this)(options)\r\n\t\t\t.addOption('value', options.value, (harness, value) =>\r\n\t\t\t\tHarnessPredicate.stringMatches(harness.getValue(), value)\r\n\t\t\t) as HarnessPredicate<T>;\r\n\t}\r\n\r\n\tasync click() {\r\n\t\tconst element = await this.getLabelElement();\r\n\t\telement.click();\r\n\t}\r\n\r\n\tasync getLabelCssValue(prop: string): Promise<string> {\r\n\t\tconst element = await this.getLabelElement();\r\n\t\treturn element.getCssValue(prop);\r\n\t}\r\n\r\n\tasync getBorderColor(): Promise<string> {\r\n\t\tconst label = await this.getLabelElement();\r\n\t\treturn label.getCssValue('border-color');\r\n\t}\r\n}\r\n\r\nexport class RadioPanelHarness extends MatRadioGroupHarness {\r\n\t/** The selector for the host element of a `MatRadioGroup` instance. */\r\n\tstatic hostSelector = 'bui-radio-panel';\r\n\r\n\tgetItem = (filters: RadioPanelItemHarnessFilters) => this.locatorFor(RadioPanelItemHarness.with(filters))();\r\n\r\n\tasync getFlexDir(): Promise<string> {\r\n\t\treturn (await this.host()).getCssValue('flex-direction');\r\n\t}\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './test-api';\n"],"names":[],"mappings":";;;AAWM,MAAO,qBAAsB,SAAQ,qBAAqB,CAAA;AAAhE,IAAA,WAAA,GAAA;;AAEC,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;AAEhC,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC;AACtD,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,eAAe
|
|
1
|
+
{"version":3,"file":"bravura-ui-radio-panel-testing.mjs","sources":["../../../projects/ui/radio-panel/testing/test-api.ts","../../../projects/ui/radio-panel/testing/bravura-ui-radio-panel-testing.ts"],"sourcesContent":["import { ComponentHarnessConstructor, HarnessPredicate } from '@angular/cdk/testing';\r\nimport {\r\n\tMatRadioButtonHarness,\r\n\tMatRadioGroupHarness,\r\n\tRadioButtonHarnessFilters\r\n} from '@angular/material/radio/testing';\r\n\r\nexport interface RadioPanelItemHarnessFilters extends RadioButtonHarnessFilters {\r\n\tvalue?: string | RegExp;\r\n}\r\n\r\nexport class RadioPanelItemHarness extends MatRadioButtonHarness {\r\n\tstatic hostSelector = 'bui-radio-panel-item';\r\n\tgetLabelElement = this.locatorFor('label');\r\n\r\n\tprotected _textLabel = this.locatorFor('label .bui-label-title');\r\n\tprotected _clickLabel = this.getLabelElement;\r\n\r\n\t/**\r\n\t * Gets a `HarnessPredicate` that can be used to search for a radio button with specific\r\n\t * attributes.\r\n\t * @param options Options for filtering which radio button instances are considered a match.\r\n\t * @return a `HarnessPredicate` configured with the given options.\r\n\t */\r\n\tstatic with<T extends MatRadioButtonHarness>(\r\n\t\tthis: ComponentHarnessConstructor<T>,\r\n\t\toptions: RadioPanelItemHarnessFilters = {}\r\n\t): HarnessPredicate<T> {\r\n\t\treturn MatRadioButtonHarness.with\r\n\t\t\t.bind(this)(options)\r\n\t\t\t.addOption('value', options.value, (harness, value) =>\r\n\t\t\t\tHarnessPredicate.stringMatches(harness.getValue(), value)\r\n\t\t\t) as HarnessPredicate<T>;\r\n\t}\r\n\r\n\tasync click() {\r\n\t\tconst element = await this.getLabelElement();\r\n\t\telement.click();\r\n\t}\r\n\r\n\tasync getLabelCssValue(prop: string): Promise<string> {\r\n\t\tconst element = await this.getLabelElement();\r\n\t\treturn element.getCssValue(prop);\r\n\t}\r\n\r\n\tasync getBorderColor(): Promise<string> {\r\n\t\tconst label = await this.getLabelElement();\r\n\t\treturn label.getCssValue('border-color');\r\n\t}\r\n}\r\n\r\nexport class RadioPanelHarness extends MatRadioGroupHarness {\r\n\t/** The selector for the host element of a `MatRadioGroup` instance. */\r\n\tstatic hostSelector = 'bui-radio-panel';\r\n\r\n\tgetItem = (filters: RadioPanelItemHarnessFilters) => this.locatorFor(RadioPanelItemHarness.with(filters))();\r\n\r\n\tasync getFlexDir(): Promise<string> {\r\n\t\treturn (await this.host()).getCssValue('flex-direction');\r\n\t}\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './test-api';\n"],"names":[],"mappings":";;;AAWM,MAAO,qBAAsB,SAAQ,qBAAqB,CAAA;AAAhE,IAAA,WAAA,GAAA;;AAEC,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;AAEhC,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC;AACtD,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,eAAe;IAiC7C;aArCQ,IAAA,CAAA,YAAY,GAAG,sBAAH,CAA0B;AAM7C;;;;;AAKG;AACH,IAAA,OAAO,IAAI,CAEV,OAAA,GAAwC,EAAE,EAAA;QAE1C,OAAO,qBAAqB,CAAC;AAC3B,aAAA,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO;aAClB,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,KACjD,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,CAClC;IAC1B;AAEA,IAAA,MAAM,KAAK,GAAA;AACV,QAAA,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,eAAe,EAAE;QAC5C,OAAO,CAAC,KAAK,EAAE;IAChB;IAEA,MAAM,gBAAgB,CAAC,IAAY,EAAA;AAClC,QAAA,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,eAAe,EAAE;AAC5C,QAAA,OAAO,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC;IACjC;AAEA,IAAA,MAAM,cAAc,GAAA;AACnB,QAAA,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,eAAe,EAAE;AAC1C,QAAA,OAAO,KAAK,CAAC,WAAW,CAAC,cAAc,CAAC;IACzC;;AAGK,MAAO,iBAAkB,SAAQ,oBAAoB,CAAA;AAA3D,IAAA,WAAA,GAAA;;AAIC,QAAA,IAAA,CAAA,OAAO,GAAG,CAAC,OAAqC,KAAK,IAAI,CAAC,UAAU,CAAC,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE;IAK5G;;aAPQ,IAAA,CAAA,YAAY,GAAG,iBAAH,CAAqB;AAIxC,IAAA,MAAM,UAAU,GAAA;AACf,QAAA,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAC,gBAAgB,CAAC;IACzD;;;AC3DD;;AAEG;;;;"}
|
|
@@ -31,15 +31,15 @@ class RadioPanelItemComponent extends MatRadioButton {
|
|
|
31
31
|
*/
|
|
32
32
|
this.title = '';
|
|
33
33
|
}
|
|
34
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
35
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
34
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RadioPanelItemComponent, deps: [{ token: MAT_RADIO_GROUP, optional: true }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.FocusMonitor }, { token: i2.UniqueSelectionDispatcher }, { token: ANIMATION_MODULE_TYPE, optional: true }, { token: MAT_RADIO_DEFAULT_OPTIONS, optional: true }, { token: 'tabindex', attribute: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
35
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: RadioPanelItemComponent, isStandalone: false, selector: "bui-radio-panel-item", inputs: { disableRipple: "disableRipple", tabIndex: "tabIndex", title: "title", _tickPosition: "_tickPosition", tickPosition: "tickPosition" }, host: { listeners: { "focus": "_inputElement.nativeElement.focus()" }, properties: { "class.bui-radio-checked": "checked", "class.bui-disabled": "disabled", "class._mat-animation-noopable": "_noopAnimations", "class.mat-primary": "color === \"primary\"", "class.mat-accent": "color === \"accent\"", "class.mat-warn": "color === \"warn\"", "attr.tabindex": "null", "attr.id": "id", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null" }, classAttribute: "bui-radio-panel-item" }, queries: [{ propertyName: "contentOnSelect", first: true, predicate: ["contentOnSelect"], descendants: true }], exportAs: ["matRadioButton"], usesInheritance: true, ngImport: i0, template: "<label\n\tmatRipple\n\tmatRippleColor=\"rgba(128,128,128,.1)\"\n\t[matRippleDisabled]=\"disabled || checked\"\n\t[attr.for]=\"inputId\"\n\t#label\n\tclass=\"bui-radio-panel-item-label bui-border-{{ checked ? color : 'default' }}\"\n>\n\t<div class=\"bui-radio-panel-item-wrapper\" [class.bui-radio-tick-at-end]=\"tickPosition === 'end'\">\n\t\t<div class=\"bui-label-header\">\n\t\t\t<span class=\"bui-label-title\" [innerHTML]=\"title\"></span>\n\t\t\t<ng-content select=\"[buiRadioItemHeadingEnd]\"></ng-content>\n\t\t\t<span class=\"bui-radio-panel-item-circle\">\n\t\t\t\t@if (!disabled) {\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass=\"bui-persistent-ripple\"\n\t\t\t\t\t\tmatRipple\n\t\t\t\t\t\tmatRippleColor=\"rgba(128,128,128,.1)\"\n\t\t\t\t\t\t[matRippleCentered]=\"true\"\n\t\t\t\t\t\t[matRippleUnbounded]=\"true\"\n\t\t\t\t\t\t[matRippleTrigger]=\"label\"\n\t\t\t\t\t\t[matRippleRadius]=\"20\"\n\t\t\t\t\t></span>\n\t\t\t\t}\n\t\t\t\t@if (checked) {\n\t\t\t\t\t<mat-icon class=\"bui-radio-panel-checked-icon\">check_circle</mat-icon>\n\t\t\t\t}\n\t\t\t\t@if (!checked) {\n\t\t\t\t\t<mat-icon class=\"bui-radio-panel-item-circle-unchecked\">radio_button_unchecked</mat-icon>\n\t\t\t\t}\n\t\t\t</span>\n\t\t</div>\n\t\t<!-- The actual 'radio' part of the control. -->\n\t\t<span class=\"radio-container\">\n\t\t\t<input\n\t\t\t\t#input\n\t\t\t\tclass=\"mat-radio-input cdk-visually-hidden\"\n\t\t\t\ttype=\"radio\"\n\t\t\t\t[id]=\"inputId\"\n\t\t\t\t[checked]=\"checked\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[tabIndex]=\"tabIndex\"\n\t\t\t\t[attr.name]=\"name\"\n\t\t\t\t[attr.value]=\"value\"\n\t\t\t\t[required]=\"required\"\n\t\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\t\t[attr.aria-labelledby]=\"ariaLabelledby\"\n\t\t\t\t[attr.aria-describedby]=\"ariaDescribedby\"\n\t\t\t\t(change)=\"_onInputInteraction($event)\"\n\t\t\t\t(click)=\"_onInputInteraction($event)\"\n\t\t\t/>\n\t\t</span>\n\n\t\t<div class=\"bui-label-content-gap\"></div>\n\t\t<!-- The label content for radio control. -->\n\t\t<div class=\"bui-label-content\">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t\t@if (contentOnSelect && checked) {\n\t\t\t<div class=\"bui-label-content\" @slideInOut>\n\t\t\t\t<ng-container *ngTemplateOutlet=\"contentOnSelect\"></ng-container>\n\t\t\t</div>\n\t\t}\n\t</div>\n</label>\n", styles: [":host .bui-ripple,:host .bui-persistent-ripple{position:absolute;inset:0}:host .bui-radio-panel-item-overlay{background-color:#fff;opacity:0}:host .bui-radio-panel-item-circle{width:40px;height:40px;flex-shrink:0}:host .bui-radio-panel-item-label{display:block;border-radius:5px;border:1px solid rgba(128,128,128,.2);padding:1px;position:relative;height:100%}:host .bui-radio-panel-item-label .bui-radio-panel-item-circle-unchecked{color:#80808066}:host .bui-radio-panel-item-wrapper.bui-radio-tick-at-end .bui-label-header{padding:calc(1rem - 10px) calc(1rem - 10px) 0 1rem;justify-content:space-between}:host .bui-radio-panel-item-wrapper:not(.bui-radio-tick-at-end) .bui-label-header{padding:calc(1rem - 10px) calc(1rem - 10px) 0 calc(1rem - 10px)}:host .bui-radio-panel-item-wrapper:not(.bui-radio-tick-at-end) .bui-radio-panel-item-circle{order:-1}:host .bui-label-header,:host .bui-radio-panel-item-circle{display:flex;align-items:center}:host .bui-label-header{margin-bottom:calc(1rem - 10px)}:host .bui-label-title{font-size:larger;font-weight:700}:host .bui-radio-panel-item-circle{justify-content:center;position:relative}:host .bui-label-content:not(:empty){margin:0 1rem 1rem}:host .bui-label-content-gap{margin-top:calc(1rem - 10px)}@polyfill-unscoped-rule{content: \".bui-radio-panel-item-wrapper .bui-label-header [buiRadioItemHeadingEnd]\"; margin-left: auto;}:host(:not([hidden])){display:block}:host(:not(.bui-disabled)):not(.bui-radio-checked) .bui-radio-panel-item-label{cursor:pointer}:host(:not(.bui-disabled)) .bui-radio-panel-item-label:hover{border-width:2px;padding:0;border-color:#8080804d}:host(:not(.bui-disabled)).cdk-keyboard-focused .bui-persistent-ripple,:host(:not(.bui-disabled)).cdk-program-focused .bui-persistent-ripple{background-color:#80808033;border-radius:50%}:host-context(.radio-dir-row){flex-basis:var(--bui-panel-width, 300px);flex-grow:0}:host(.bui-disabled) .bui-radio-panel-item-wrapper>.bui-label-header,:host(.bui-disabled) .bui-radio-panel-item-wrapper>.bui-label-content{opacity:.5}\n"], dependencies: [{ kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], animations: [
|
|
36
36
|
trigger('slideInOut', [
|
|
37
37
|
state('void', style({ height: '0px', overflow: 'hidden' })),
|
|
38
38
|
transition(':enter, :leave', animate('.25s'))
|
|
39
39
|
])
|
|
40
40
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
41
41
|
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RadioPanelItemComponent, decorators: [{
|
|
43
43
|
type: Component,
|
|
44
44
|
args: [{ selector: 'bui-radio-panel-item', inputs: ['disableRipple', 'tabIndex'], exportAs: 'matRadioButton', host: {
|
|
45
45
|
class: 'bui-radio-panel-item',
|
|
@@ -64,7 +64,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
64
64
|
state('void', style({ height: '0px', overflow: 'hidden' })),
|
|
65
65
|
transition(':enter, :leave', animate('.25s'))
|
|
66
66
|
])
|
|
67
|
-
], standalone: false, template: "<label\
|
|
67
|
+
], standalone: false, template: "<label\n\tmatRipple\n\tmatRippleColor=\"rgba(128,128,128,.1)\"\n\t[matRippleDisabled]=\"disabled || checked\"\n\t[attr.for]=\"inputId\"\n\t#label\n\tclass=\"bui-radio-panel-item-label bui-border-{{ checked ? color : 'default' }}\"\n>\n\t<div class=\"bui-radio-panel-item-wrapper\" [class.bui-radio-tick-at-end]=\"tickPosition === 'end'\">\n\t\t<div class=\"bui-label-header\">\n\t\t\t<span class=\"bui-label-title\" [innerHTML]=\"title\"></span>\n\t\t\t<ng-content select=\"[buiRadioItemHeadingEnd]\"></ng-content>\n\t\t\t<span class=\"bui-radio-panel-item-circle\">\n\t\t\t\t@if (!disabled) {\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass=\"bui-persistent-ripple\"\n\t\t\t\t\t\tmatRipple\n\t\t\t\t\t\tmatRippleColor=\"rgba(128,128,128,.1)\"\n\t\t\t\t\t\t[matRippleCentered]=\"true\"\n\t\t\t\t\t\t[matRippleUnbounded]=\"true\"\n\t\t\t\t\t\t[matRippleTrigger]=\"label\"\n\t\t\t\t\t\t[matRippleRadius]=\"20\"\n\t\t\t\t\t></span>\n\t\t\t\t}\n\t\t\t\t@if (checked) {\n\t\t\t\t\t<mat-icon class=\"bui-radio-panel-checked-icon\">check_circle</mat-icon>\n\t\t\t\t}\n\t\t\t\t@if (!checked) {\n\t\t\t\t\t<mat-icon class=\"bui-radio-panel-item-circle-unchecked\">radio_button_unchecked</mat-icon>\n\t\t\t\t}\n\t\t\t</span>\n\t\t</div>\n\t\t<!-- The actual 'radio' part of the control. -->\n\t\t<span class=\"radio-container\">\n\t\t\t<input\n\t\t\t\t#input\n\t\t\t\tclass=\"mat-radio-input cdk-visually-hidden\"\n\t\t\t\ttype=\"radio\"\n\t\t\t\t[id]=\"inputId\"\n\t\t\t\t[checked]=\"checked\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[tabIndex]=\"tabIndex\"\n\t\t\t\t[attr.name]=\"name\"\n\t\t\t\t[attr.value]=\"value\"\n\t\t\t\t[required]=\"required\"\n\t\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\t\t[attr.aria-labelledby]=\"ariaLabelledby\"\n\t\t\t\t[attr.aria-describedby]=\"ariaDescribedby\"\n\t\t\t\t(change)=\"_onInputInteraction($event)\"\n\t\t\t\t(click)=\"_onInputInteraction($event)\"\n\t\t\t/>\n\t\t</span>\n\n\t\t<div class=\"bui-label-content-gap\"></div>\n\t\t<!-- The label content for radio control. -->\n\t\t<div class=\"bui-label-content\">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t\t@if (contentOnSelect && checked) {\n\t\t\t<div class=\"bui-label-content\" @slideInOut>\n\t\t\t\t<ng-container *ngTemplateOutlet=\"contentOnSelect\"></ng-container>\n\t\t\t</div>\n\t\t}\n\t</div>\n</label>\n", styles: [":host .bui-ripple,:host .bui-persistent-ripple{position:absolute;inset:0}:host .bui-radio-panel-item-overlay{background-color:#fff;opacity:0}:host .bui-radio-panel-item-circle{width:40px;height:40px;flex-shrink:0}:host .bui-radio-panel-item-label{display:block;border-radius:5px;border:1px solid rgba(128,128,128,.2);padding:1px;position:relative;height:100%}:host .bui-radio-panel-item-label .bui-radio-panel-item-circle-unchecked{color:#80808066}:host .bui-radio-panel-item-wrapper.bui-radio-tick-at-end .bui-label-header{padding:calc(1rem - 10px) calc(1rem - 10px) 0 1rem;justify-content:space-between}:host .bui-radio-panel-item-wrapper:not(.bui-radio-tick-at-end) .bui-label-header{padding:calc(1rem - 10px) calc(1rem - 10px) 0 calc(1rem - 10px)}:host .bui-radio-panel-item-wrapper:not(.bui-radio-tick-at-end) .bui-radio-panel-item-circle{order:-1}:host .bui-label-header,:host .bui-radio-panel-item-circle{display:flex;align-items:center}:host .bui-label-header{margin-bottom:calc(1rem - 10px)}:host .bui-label-title{font-size:larger;font-weight:700}:host .bui-radio-panel-item-circle{justify-content:center;position:relative}:host .bui-label-content:not(:empty){margin:0 1rem 1rem}:host .bui-label-content-gap{margin-top:calc(1rem - 10px)}@polyfill-unscoped-rule{content: \".bui-radio-panel-item-wrapper .bui-label-header [buiRadioItemHeadingEnd]\"; margin-left: auto;}:host(:not([hidden])){display:block}:host(:not(.bui-disabled)):not(.bui-radio-checked) .bui-radio-panel-item-label{cursor:pointer}:host(:not(.bui-disabled)) .bui-radio-panel-item-label:hover{border-width:2px;padding:0;border-color:#8080804d}:host(:not(.bui-disabled)).cdk-keyboard-focused .bui-persistent-ripple,:host(:not(.bui-disabled)).cdk-program-focused .bui-persistent-ripple{background-color:#80808033;border-radius:50%}:host-context(.radio-dir-row){flex-basis:var(--bui-panel-width, 300px);flex-grow:0}:host(.bui-disabled) .bui-radio-panel-item-wrapper>.bui-label-header,:host(.bui-disabled) .bui-radio-panel-item-wrapper>.bui-label-content{opacity:.5}\n"] }]
|
|
68
68
|
}], ctorParameters: () => [{ type: i6.MatRadioGroup, decorators: [{
|
|
69
69
|
type: Optional
|
|
70
70
|
}, {
|
|
@@ -89,9 +89,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
89
89
|
type: Input
|
|
90
90
|
}], tickPosition: [{
|
|
91
91
|
type: Input
|
|
92
|
-
}],
|
|
93
|
-
//@ts-ignore
|
|
94
|
-
contentOnSelect: [{
|
|
92
|
+
}], contentOnSelect: [{
|
|
95
93
|
type: ContentChild,
|
|
96
94
|
args: ['contentOnSelect']
|
|
97
95
|
}] } });
|
|
@@ -132,8 +130,8 @@ class RadioPanelComponent extends MatRadioGroup {
|
|
|
132
130
|
this.classAttr = 'bui-radio-panel bui-host radio-dir-column';
|
|
133
131
|
}
|
|
134
132
|
}
|
|
135
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
136
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
133
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RadioPanelComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
134
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: RadioPanelComponent, isStandalone: false, selector: "bui-radio-panel", inputs: { panelWidth: "panelWidth", direction: "direction", color: "color", tickPosition: "tickPosition" }, host: { attributes: { "role": "radiogroup" }, properties: { "style.--bui-panel-width": "panelWidth +'px'", "attr.class": "this.classAttr" }, classAttribute: "bui-radio-panel bui-host" }, providers: [
|
|
137
135
|
{
|
|
138
136
|
provide: NG_VALUE_ACCESSOR,
|
|
139
137
|
useExisting: forwardRef(() => RadioPanelComponent),
|
|
@@ -142,7 +140,7 @@ class RadioPanelComponent extends MatRadioGroup {
|
|
|
142
140
|
{ provide: MAT_RADIO_GROUP, useExisting: forwardRef(() => RadioPanelComponent) }
|
|
143
141
|
], queries: [{ propertyName: "_radios", predicate: RadioPanelItemComponent, descendants: true }], exportAs: ["buiRadioPanel"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, styles: [":host{gap:1rem}:host:not([hidden]){display:flex}:host.radio-dir-row{flex-direction:row;flex-wrap:wrap}:host.radio-dir-column{flex-direction:column}\n"] }); }
|
|
144
142
|
}
|
|
145
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RadioPanelComponent, decorators: [{
|
|
146
144
|
type: Component,
|
|
147
145
|
args: [{ selector: 'bui-radio-panel', exportAs: 'buiRadioPanel', providers: [
|
|
148
146
|
{
|
|
@@ -176,11 +174,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
176
174
|
* Import this NgModule for the radio panel component
|
|
177
175
|
*/
|
|
178
176
|
class RadioPanelModule {
|
|
179
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
180
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
181
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
177
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RadioPanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
178
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: RadioPanelModule, declarations: [RadioPanelItemComponent, RadioPanelComponent], imports: [CommonModule, MatRadioModule, MatRippleModule, MatIconModule], exports: [RadioPanelItemComponent, RadioPanelComponent] }); }
|
|
179
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RadioPanelModule, imports: [CommonModule, MatRadioModule, MatRippleModule, MatIconModule] }); }
|
|
182
180
|
}
|
|
183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RadioPanelModule, decorators: [{
|
|
184
182
|
type: NgModule,
|
|
185
183
|
args: [{
|
|
186
184
|
declarations: [RadioPanelItemComponent, RadioPanelComponent],
|