@bravura/ui 4.0.0 → 5.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 +587 -578
- package/README.md +56 -56
- package/esm2022/alert/alert-container.component.mjs +4 -4
- package/esm2022/alert/alert-message.component.mjs +4 -4
- package/esm2022/alert/alert.module.mjs +5 -5
- package/esm2022/behavior/await.directive.mjs +4 -4
- package/esm2022/behavior/behavior.module.mjs +5 -5
- package/esm2022/behavior/observe-content-class.directive.mjs +4 -4
- package/esm2022/behavior/sizing-monitor.directive.mjs +4 -4
- package/esm2022/behavior/sizing.directive.mjs +4 -4
- package/esm2022/clip-note/clip-note.component.mjs +4 -4
- package/esm2022/clip-note/clip-note.directive.mjs +4 -4
- package/esm2022/clip-note/clip-note.module.mjs +5 -5
- package/esm2022/common/common.module.mjs +5 -5
- package/esm2022/currency-input/currency-input.directive.mjs +4 -4
- package/esm2022/currency-input/currency-input.module.mjs +5 -5
- package/esm2022/decimal-input/decimal-input.directive.mjs +4 -4
- package/esm2022/decimal-input/decimal-input.module.mjs +5 -5
- package/esm2022/discrete-input/discrete-input.component.mjs +4 -4
- package/esm2022/discrete-input/discrete-input.module.mjs +5 -5
- package/esm2022/file-upload/file-upload.component.mjs +4 -4
- package/esm2022/file-upload/file-upload.module.mjs +5 -5
- package/esm2022/file-upload/file-upload.service.mjs +4 -4
- package/esm2022/form-field/form-field.component.mjs +7 -7
- package/esm2022/form-field/form-field.module.mjs +5 -5
- package/esm2022/icon-font/icon-font.module.mjs +5 -5
- package/esm2022/icon-font/icon.directive.mjs +4 -4
- package/esm2022/icon-font/utilities.mjs +1 -1
- package/esm2022/panel/panel-section.component.mjs +4 -4
- package/esm2022/panel/panel.component.mjs +4 -4
- package/esm2022/panel/panel.module.mjs +5 -5
- package/esm2022/panel/tinted.directive.mjs +4 -4
- package/esm2022/phone-number/phone-number.directive.mjs +4 -4
- package/esm2022/phone-number/phone-number.module.mjs +5 -5
- package/esm2022/phone-number/phone-number.pipe.mjs +4 -4
- package/esm2022/phone-number/phone-number.validator.mjs +4 -4
- package/esm2022/radio-panel/radio-panel-item.component.mjs +5 -5
- package/esm2022/radio-panel/radio-panel.component.mjs +4 -4
- package/esm2022/radio-panel/radio-panel.module.mjs +5 -5
- package/esm2022/selection-panel/selection-panel-item.component.mjs +4 -4
- package/esm2022/selection-panel/selection-panel.directive.mjs +4 -4
- package/esm2022/selection-panel/selection-panel.module.mjs +5 -5
- package/esm2022/skeletons/skeleton-loader-presets.directive.mjs +4 -4
- package/esm2022/skeletons/skeleton-loader.component.mjs +4 -4
- package/esm2022/skeletons/skeletons.module.mjs +5 -5
- package/esm2022/stepper/stepper.component.mjs +4 -4
- package/esm2022/stepper/stepper.module.mjs +5 -5
- package/esm2022/tooltip/tooltip.component.mjs +5 -5
- package/esm2022/tooltip/tooltip.directive.mjs +4 -4
- package/esm2022/tooltip/tooltip.module.mjs +5 -5
- package/fesm2022/bravura-ui-alert.mjs +10 -10
- package/fesm2022/bravura-ui-alert.mjs.map +1 -1
- package/fesm2022/bravura-ui-behavior.mjs +16 -16
- 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 +4 -4
- 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 +7 -7
- package/fesm2022/bravura-ui-discrete-input.mjs.map +1 -1
- package/fesm2022/bravura-ui-file-upload.mjs +10 -10
- 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 +13 -13
- 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.mjs +11 -11
- package/fesm2022/bravura-ui-radio-panel.mjs.map +1 -1
- package/fesm2022/bravura-ui-selection-panel.mjs +10 -10
- 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 +7 -7
- package/fesm2022/bravura-ui-stepper.mjs.map +1 -1
- package/fesm2022/bravura-ui-tooltip.mjs +11 -11
- package/fesm2022/bravura-ui-tooltip.mjs.map +1 -1
- package/package.json +22 -19
- package/theme/_ui-theme.scss +112 -112
|
@@ -23,10 +23,10 @@ const BUI_FORM_FIELD_CONFIG = new InjectionToken('@bravura/ui/buiFormFieldConfig
|
|
|
23
23
|
* component.
|
|
24
24
|
*/
|
|
25
25
|
class FormFieldComponent extends MatFormField {
|
|
26
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
27
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
26
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: FormFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
27
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.2", type: FormFieldComponent, selector: "bui-dummy-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, styles: [".bui-form-field-bound,.bui-form-field-detach{padding-top:24px;--mat-mdc-form-field-floating-label-scale: 1 !important;--mat-mdc-form-field-floating-label-translate-y: -3.3rem}.bui-form-field-bound .mdc-floating-label,.bui-form-field-detach .mdc-floating-label{--mat-mdc-form-field-label-transform: translateY(var(--mat-mdc-form-field-floating-label-translate-y)) translateX(-4px) scale(var(--mat-mdc-form-field-floating-label-scale, .75)) !important;transition:none!important}[dir=rtl] .bui-form-field-bound .mdc-floating-label,[dir=rtl] .bui-form-field-detach .mdc-floating-label{--mat-mdc-form-field-label-transform: translateY(var(--mat-mdc-form-field-floating-label-translate-y)) translateX(4px) scale(var(--mat-mdc-form-field-floating-label-scale, .75)) !important}.bui-form-field-bound .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix,.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{display:flex;flex-direction:column;justify-content:center;align-self:stretch}.bui-form-field-bound.mat-focused{--mat-mdc-form-field-floating-label-translate-y: calc(-3.3rem - 1px) }.bui-form-field-bound .mat-mdc-form-field-hint-wrapper,.bui-form-field-bound .mat-mdc-form-field-error-wrapper{padding-left:initial;padding-inline-start:4px}.bui-form-field-bound .mat-mdc-form-field-infix{min-height:48px}.bui-form-field-bound .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}.bui-form-field-bound .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:4px}.bui-form-field-bound .mdc-notched-outline--notched .mdc-notched-outline__notch{border-top-width:1px;border-top-style:solid}.bui-form-field-bound .mdc-text-field--focused .mdc-notched-outline--notched .mdc-notched-outline__notch{border-top-width:2px}.bui-form-field-bound .mdc-text-field--disabled .mdc-notched-outline__notch{border-color:var(--bui-color-inactive)}.bui-form-field-bound .mat-mdc-form-field-icon-prefix>.mat-icon{padding:0 6px 0 12px}.bui-form-field-bound .mat-mdc-form-field-icon-prefix>span,.bui-form-field-bound .mat-mdc-form-field-icon-prefix>div{padding-inline-start:6px}.bui-form-field-bound .mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px 0 6px}.bui-form-field-bound .mat-mdc-form-field-icon-suffix>span,.bui-form-field-bound .mat-mdc-form-field-icon-suffix>div{padding-inline-end:6px}.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:0;padding-bottom:0}.bui-form-field-detach .mat-mdc-form-field-hint-wrapper,.bui-form-field-detach .mat-mdc-form-field-error-wrapper{padding-inline-start:0}.bui-form-field-detach .mat-mdc-form-field-infix{min-height:40px}.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{border:none!important}.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:0}.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-inline-start:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
28
28
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
30
30
|
type: Component,
|
|
31
31
|
args: [{ selector: 'bui-dummy-component', template: ``, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".bui-form-field-bound,.bui-form-field-detach{padding-top:24px;--mat-mdc-form-field-floating-label-scale: 1 !important;--mat-mdc-form-field-floating-label-translate-y: -3.3rem}.bui-form-field-bound .mdc-floating-label,.bui-form-field-detach .mdc-floating-label{--mat-mdc-form-field-label-transform: translateY(var(--mat-mdc-form-field-floating-label-translate-y)) translateX(-4px) scale(var(--mat-mdc-form-field-floating-label-scale, .75)) !important;transition:none!important}[dir=rtl] .bui-form-field-bound .mdc-floating-label,[dir=rtl] .bui-form-field-detach .mdc-floating-label{--mat-mdc-form-field-label-transform: translateY(var(--mat-mdc-form-field-floating-label-translate-y)) translateX(4px) scale(var(--mat-mdc-form-field-floating-label-scale, .75)) !important}.bui-form-field-bound .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix,.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{display:flex;flex-direction:column;justify-content:center;align-self:stretch}.bui-form-field-bound.mat-focused{--mat-mdc-form-field-floating-label-translate-y: calc(-3.3rem - 1px) }.bui-form-field-bound .mat-mdc-form-field-hint-wrapper,.bui-form-field-bound .mat-mdc-form-field-error-wrapper{padding-left:initial;padding-inline-start:4px}.bui-form-field-bound .mat-mdc-form-field-infix{min-height:48px}.bui-form-field-bound .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}.bui-form-field-bound .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:4px}.bui-form-field-bound .mdc-notched-outline--notched .mdc-notched-outline__notch{border-top-width:1px;border-top-style:solid}.bui-form-field-bound .mdc-text-field--focused .mdc-notched-outline--notched .mdc-notched-outline__notch{border-top-width:2px}.bui-form-field-bound .mdc-text-field--disabled .mdc-notched-outline__notch{border-color:var(--bui-color-inactive)}.bui-form-field-bound .mat-mdc-form-field-icon-prefix>.mat-icon{padding:0 6px 0 12px}.bui-form-field-bound .mat-mdc-form-field-icon-prefix>span,.bui-form-field-bound .mat-mdc-form-field-icon-prefix>div{padding-inline-start:6px}.bui-form-field-bound .mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px 0 6px}.bui-form-field-bound .mat-mdc-form-field-icon-suffix>span,.bui-form-field-bound .mat-mdc-form-field-icon-suffix>div{padding-inline-end:6px}.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:0;padding-bottom:0}.bui-form-field-detach .mat-mdc-form-field-hint-wrapper,.bui-form-field-detach .mat-mdc-form-field-error-wrapper{padding-inline-start:0}.bui-form-field-detach .mat-mdc-form-field-infix{min-height:40px}.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{border:none!important}.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:0}.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-inline-start:0}\n"] }]
|
|
32
32
|
}] });
|
|
@@ -57,10 +57,10 @@ class FormFieldStyleDirective {
|
|
|
57
57
|
this._flowDetection = matFormField._shouldAlwaysFloat;
|
|
58
58
|
this.appearance = config.appearance;
|
|
59
59
|
}
|
|
60
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
61
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
60
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: FormFieldStyleDirective, deps: [{ token: i1.MatFormField, host: true }, { token: i0.ElementRef }, { token: BUI_FORM_FIELD_CONFIG }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
61
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.2", type: FormFieldStyleDirective, selector: "bui-form-field, mat-form-field", inputs: { appearance: "appearance" }, host: { classAttribute: "bui-host" }, ngImport: i0 }); }
|
|
62
62
|
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: FormFieldStyleDirective, decorators: [{
|
|
64
64
|
type: Directive,
|
|
65
65
|
args: [{
|
|
66
66
|
selector: 'bui-form-field, mat-form-field',
|
|
@@ -97,11 +97,11 @@ class FormFieldModule {
|
|
|
97
97
|
]
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
101
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
102
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
100
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: FormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
101
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.2", ngImport: i0, type: FormFieldModule, declarations: [FormFieldComponent, FormFieldStyleDirective], imports: [CommonModule, MatFormFieldModule, ObserversModule], exports: [FormFieldComponent, FormFieldStyleDirective, MatFormFieldModule] }); }
|
|
102
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: FormFieldModule, imports: [CommonModule, MatFormFieldModule, ObserversModule, MatFormFieldModule] }); }
|
|
103
103
|
}
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: FormFieldModule, decorators: [{
|
|
105
105
|
type: NgModule,
|
|
106
106
|
args: [{
|
|
107
107
|
declarations: [FormFieldComponent, FormFieldStyleDirective],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bravura-ui-form-field.mjs","sources":["../../../projects/ui/form-field/form-field.component.ts","../../../projects/ui/form-field/form-field.module.ts","../../../projects/ui/form-field/bravura-ui-form-field.ts"],"sourcesContent":["import {\r\n\tChangeDetectionStrategy,\r\n\tComponent,\r\n\tDirective,\r\n\tElementRef,\r\n\tHost,\r\n\tInject,\r\n\tInjectionToken,\r\n\tInput,\r\n\tViewEncapsulation\r\n} from '@angular/core';\r\nimport { MatFormField } from '@angular/material/form-field';\r\n\r\nexport interface BuiFormFieldConfig {\r\n\tappearance?: 'fill' | 'outline' | 'bound';\r\n}\r\n\r\nexport const BUI_FORM_FIELD_CONFIG = new InjectionToken<BuiFormFieldConfig>('@bravura/ui/buiFormFieldConfig', {\r\n\tfactory: () => ({ appearance: 'fill' }),\r\n\tprovidedIn: 'root'\r\n});\r\n/**\r\n * Container for form controls that applies Material Design styling and behavior.\r\n *\r\n * This component extends Angular Material's [mat-form-field](https://material.angular.io/components/form-field) and provides two additional appearances\r\n * `bound` and `detach`. `bound` renders the label outside the outlined area of the field, while `detach` remove the borders all together. `detach`\r\n * is generally used with form controls that render their own borders.\r\n *\r\n * ** IMPORTANT NOTICE **\r\n *\r\n * From version 3.0 onward, the selector `bui-form-field` is deprecated and will be removed in later releases. You no longer need to use this tag name\r\n * for the new appearances. As long as you import the `NgModule` from this package, the new appearances will be supported by Material's `mat-form-field`\r\n * component.\r\n */\r\n@Component({\r\n\tselector: 'bui-dummy-component',\r\n\ttemplate: ``,\r\n\tstyleUrls: ['./form-field.component.scss'],\r\n\tencapsulation: ViewEncapsulation.None,\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormFieldComponent extends MatFormField {}\r\n\r\n/**\r\n * @ignore\r\n */\r\n@Directive({\r\n\tselector: 'bui-form-field, mat-form-field',\r\n\thost: {\r\n\t\tclass: 'bui-host'\r\n\t}\r\n})\r\nexport class FormFieldStyleDirective {\r\n\tprivate _appearance: any;\r\n\tprivate _flowDetection: any;\r\n\r\n\t/** The form field appearance style. */\r\n\t@Input()\r\n\tget appearance(): any {\r\n\t\treturn this._appearance;\r\n\t}\r\n\tset appearance(value: any) {\r\n\t\tthis._appearance = value;\r\n\t\tthis.elemRef.nativeElement.classList.remove('bui-form-field-bound', 'bui-form-field-detach');\r\n\t\tif (['bound', 'detach'].includes(this._appearance)) {\r\n\t\t\tthis.matFormField.appearance = 'outline';\r\n\t\t\tthis.elemRef.nativeElement.classList.add(`bui-form-field-${value}`);\r\n\t\t\tthis.matFormField._shouldAlwaysFloat = () => true;\r\n\t\t} else {\r\n\t\t\tthis.matFormField.appearance = ['outline', 'fill'].includes(this._appearance) ? this._appearance : undefined;\r\n\t\t\tthis.matFormField._shouldAlwaysFloat = this._flowDetection;\r\n\t\t}\r\n\t}\r\n\r\n\tconstructor(\r\n\t\t@Host() private matFormField: MatFormField,\r\n\t\tprivate elemRef: ElementRef<HTMLElement>,\r\n\t\t@Inject(BUI_FORM_FIELD_CONFIG) config: BuiFormFieldConfig\r\n\t) {\r\n\t\tthis._flowDetection = matFormField._shouldAlwaysFloat;\r\n\t\tthis.appearance = config.appearance;\r\n\t}\r\n}\r\n\r\nconst matFormFieldRef: any = MatFormField.ɵcmp;\r\nconst formFieldRef: any = FormFieldComponent.ɵcmp;\r\n\r\nmatFormFieldRef.styles.push(...formFieldRef.styles);\r\nmatFormFieldRef.selectors.push(['bui-form-field']);\r\ndelete matFormFieldRef.inputs.appearance;\r\ndelete matFormFieldRef.declaredInputs.appearance;\r\n","import { ObserversModule } from '@angular/cdk/observers';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport {\r\n\tBuiFormFieldConfig,\r\n\tBUI_FORM_FIELD_CONFIG,\r\n\tFormFieldComponent,\r\n\tFormFieldStyleDirective\r\n} from './form-field.component';\r\n\r\n@NgModule({\r\n\tdeclarations: [FormFieldComponent, FormFieldStyleDirective],\r\n\timports: [CommonModule, MatFormFieldModule, ObserversModule],\r\n\texports: [FormFieldComponent, FormFieldStyleDirective, MatFormFieldModule]\r\n})\r\nexport class FormFieldModule {\r\n\tstatic forConfig(config: BuiFormFieldConfig): ModuleWithProviders<FormFieldModule> {\r\n\t\tconst cfg = { ...config };\r\n\t\tcfg.appearance = cfg.appearance || 'fill';\r\n\t\treturn {\r\n\t\t\tngModule: FormFieldModule,\r\n\t\t\tproviders: [\r\n\t\t\t\t{\r\n\t\t\t\t\tprovide: BUI_FORM_FIELD_CONFIG,\r\n\t\t\t\t\tuseValue: cfg\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t};\r\n\t}\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAiBO,MAAM,qBAAqB,GAAG,IAAI,cAAc,CAAqB,gCAAgC,EAAE;IAC7G,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;AACvC,IAAA,UAAU,EAAE,MAAM;AAClB,CAAA,CAAC,CAAC;AACH;;;;;;;;;;;;AAYG;AAQG,MAAO,kBAAmB,SAAQ,YAAY,CAAA
|
|
1
|
+
{"version":3,"file":"bravura-ui-form-field.mjs","sources":["../../../projects/ui/form-field/form-field.component.ts","../../../projects/ui/form-field/form-field.module.ts","../../../projects/ui/form-field/bravura-ui-form-field.ts"],"sourcesContent":["import {\r\n\tChangeDetectionStrategy,\r\n\tComponent,\r\n\tDirective,\r\n\tElementRef,\r\n\tHost,\r\n\tInject,\r\n\tInjectionToken,\r\n\tInput,\r\n\tViewEncapsulation\r\n} from '@angular/core';\r\nimport { MatFormField } from '@angular/material/form-field';\r\n\r\nexport interface BuiFormFieldConfig {\r\n\tappearance?: 'fill' | 'outline' | 'bound';\r\n}\r\n\r\nexport const BUI_FORM_FIELD_CONFIG = new InjectionToken<BuiFormFieldConfig>('@bravura/ui/buiFormFieldConfig', {\r\n\tfactory: () => ({ appearance: 'fill' }),\r\n\tprovidedIn: 'root'\r\n});\r\n/**\r\n * Container for form controls that applies Material Design styling and behavior.\r\n *\r\n * This component extends Angular Material's [mat-form-field](https://material.angular.io/components/form-field) and provides two additional appearances\r\n * `bound` and `detach`. `bound` renders the label outside the outlined area of the field, while `detach` remove the borders all together. `detach`\r\n * is generally used with form controls that render their own borders.\r\n *\r\n * ** IMPORTANT NOTICE **\r\n *\r\n * From version 3.0 onward, the selector `bui-form-field` is deprecated and will be removed in later releases. You no longer need to use this tag name\r\n * for the new appearances. As long as you import the `NgModule` from this package, the new appearances will be supported by Material's `mat-form-field`\r\n * component.\r\n */\r\n@Component({\r\n\tselector: 'bui-dummy-component',\r\n\ttemplate: ``,\r\n\tstyleUrls: ['./form-field.component.scss'],\r\n\tencapsulation: ViewEncapsulation.None,\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormFieldComponent extends MatFormField {}\r\n\r\n/**\r\n * @ignore\r\n */\r\n@Directive({\r\n\tselector: 'bui-form-field, mat-form-field',\r\n\thost: {\r\n\t\tclass: 'bui-host'\r\n\t}\r\n})\r\nexport class FormFieldStyleDirective {\r\n\tprivate _appearance: any;\r\n\tprivate _flowDetection: any;\r\n\r\n\t/** The form field appearance style. */\r\n\t@Input()\r\n\tget appearance(): any {\r\n\t\treturn this._appearance;\r\n\t}\r\n\tset appearance(value: any) {\r\n\t\tthis._appearance = value;\r\n\t\tthis.elemRef.nativeElement.classList.remove('bui-form-field-bound', 'bui-form-field-detach');\r\n\t\tif (['bound', 'detach'].includes(this._appearance)) {\r\n\t\t\tthis.matFormField.appearance = 'outline';\r\n\t\t\tthis.elemRef.nativeElement.classList.add(`bui-form-field-${value}`);\r\n\t\t\tthis.matFormField._shouldAlwaysFloat = () => true;\r\n\t\t} else {\r\n\t\t\tthis.matFormField.appearance = ['outline', 'fill'].includes(this._appearance) ? this._appearance : undefined;\r\n\t\t\tthis.matFormField._shouldAlwaysFloat = this._flowDetection;\r\n\t\t}\r\n\t}\r\n\r\n\tconstructor(\r\n\t\t@Host() private matFormField: MatFormField,\r\n\t\tprivate elemRef: ElementRef<HTMLElement>,\r\n\t\t@Inject(BUI_FORM_FIELD_CONFIG) config: BuiFormFieldConfig\r\n\t) {\r\n\t\tthis._flowDetection = matFormField._shouldAlwaysFloat;\r\n\t\tthis.appearance = config.appearance;\r\n\t}\r\n}\r\n\r\nconst matFormFieldRef: any = MatFormField.ɵcmp;\r\nconst formFieldRef: any = FormFieldComponent.ɵcmp;\r\n\r\nmatFormFieldRef.styles.push(...formFieldRef.styles);\r\nmatFormFieldRef.selectors.push(['bui-form-field']);\r\ndelete matFormFieldRef.inputs.appearance;\r\ndelete matFormFieldRef.declaredInputs.appearance;\r\n","import { ObserversModule } from '@angular/cdk/observers';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport {\r\n\tBuiFormFieldConfig,\r\n\tBUI_FORM_FIELD_CONFIG,\r\n\tFormFieldComponent,\r\n\tFormFieldStyleDirective\r\n} from './form-field.component';\r\n\r\n@NgModule({\r\n\tdeclarations: [FormFieldComponent, FormFieldStyleDirective],\r\n\timports: [CommonModule, MatFormFieldModule, ObserversModule],\r\n\texports: [FormFieldComponent, FormFieldStyleDirective, MatFormFieldModule]\r\n})\r\nexport class FormFieldModule {\r\n\tstatic forConfig(config: BuiFormFieldConfig): ModuleWithProviders<FormFieldModule> {\r\n\t\tconst cfg = { ...config };\r\n\t\tcfg.appearance = cfg.appearance || 'fill';\r\n\t\treturn {\r\n\t\t\tngModule: FormFieldModule,\r\n\t\t\tproviders: [\r\n\t\t\t\t{\r\n\t\t\t\t\tprovide: BUI_FORM_FIELD_CONFIG,\r\n\t\t\t\t\tuseValue: cfg\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t};\r\n\t}\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAiBO,MAAM,qBAAqB,GAAG,IAAI,cAAc,CAAqB,gC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AA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAJZ,YAAA,EAAA,CAAA,kBAAkB,EAAE,uBAAuB,aAChD,YAAY,EAAE,kBAAkB,EAAE,eAAe,CACjD,EAAA,OAAA,EAAA,CAAA,kBAAkB,EAAE,uBAAuB,EAAE,kBAAkB,CAAA,EAAA,CAAA,CAAA,EAAA;AAE7D,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAHjB,YAAY,EAAE,kBAAkB,EAAE,eAAe,EACJ,kBAAkB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAE7D,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,uBAAuB,CAAC;AAC3D,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,eAAe,CAAC;AAC5D,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,uBAAuB,EAAE,kBAAkB,CAAC;AAC1E,iBAAA,CAAA;;;ACfD;;AAEG;;;;"}
|
|
@@ -137,10 +137,10 @@ class IconDirective {
|
|
|
137
137
|
element.style.width = `${this.size}px`;
|
|
138
138
|
element.style.height = `${this.size}px`;
|
|
139
139
|
}
|
|
140
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
141
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
140
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: IconDirective, deps: [{ token: i1.MatIcon }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
141
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.2", type: IconDirective, selector: "[buiIcon]", inputs: { buiIcon: "buiIcon", size: "size", variant: "variant" }, usesOnChanges: true, ngImport: i0 }); }
|
|
142
142
|
}
|
|
143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: IconDirective, decorators: [{
|
|
144
144
|
type: Directive,
|
|
145
145
|
args: [{
|
|
146
146
|
selector: '[buiIcon]'
|
|
@@ -157,11 +157,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
157
157
|
* Module for utility functions and directives based on `mat-icon` and icon fonts.
|
|
158
158
|
*/
|
|
159
159
|
class IconFontModule {
|
|
160
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
161
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
162
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
160
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: IconFontModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
161
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.2", ngImport: i0, type: IconFontModule, declarations: [IconDirective], imports: [CommonModule, MatIconModule], exports: [MatIconModule, IconDirective] }); }
|
|
162
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: IconFontModule, imports: [CommonModule, MatIconModule, MatIconModule] }); }
|
|
163
163
|
}
|
|
164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: IconFontModule, decorators: [{
|
|
165
165
|
type: NgModule,
|
|
166
166
|
args: [{
|
|
167
167
|
declarations: [IconDirective],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bravura-ui-icon-font.mjs","sources":["../../../projects/ui/icon-font/utilities.ts","../../../projects/ui/icon-font/icon.directive.ts","../../../projects/ui/icon-font/icon-font.module.ts","../../../projects/ui/icon-font/bravura-ui-icon-font.ts"],"sourcesContent":["/**\r\n * @ignore\r\n */\r\nconst faReplacementMap: { [key: string]: string } = {\r\n\t'fa-shield': 'fa-shield-alt',\r\n\t'fa-line-chart': 'fa-chart-line'\r\n};\r\n\r\n/**\r\n * Decode the FontAwesome icon font set name from the icon name\r\n *\r\n * `'far fa-alarm' => 'far'`\r\n *\r\n * `'home' => ''`\r\n *\r\n * `'fa-user' => 'fas'`\r\n */\r\nexport function decodeFAIconFontSet(iconName: string): string {\r\n\tlet fontSet = '';\r\n\tlet isFA = false;\r\n\tif (iconName) {\r\n\t\ticonName.split(/\\s/).forEach(s => {\r\n\t\t\tif (s.startsWith('fa-')) {\r\n\t\t\t\tisFA = true;\r\n\t\t\t} else {\r\n\t\t\t\tfontSet = s;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\tif (isFA) {\r\n\t\treturn fontSet || 'fas';\r\n\t}\r\n\r\n\treturn '';\r\n}\r\n\r\n/**\r\n * Decode the FontAwesome icon font name from the icon name\r\n *\r\n * `'far fa-alarm' => 'fa-alarm'`\r\n *\r\n * `'home' => ''`\r\n *\r\n * `'fa-user' => 'fa-user'`\r\n */\r\nexport function decodeFAIconFontName(iconName: string): string {\r\n\tif (iconName) {\r\n\t\tconst name = iconName.split(/\\s/).find(s => s && s.startsWith('fa-')) || '';\r\n\t\treturn faReplacementMap[name] || name;\r\n\t}\r\n\r\n\treturn '';\r\n}\r\n","import { Directive, Input, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { MatIcon } from '@angular/material/icon';\r\n\r\nimport { decodeFAIconFontName, decodeFAIconFontSet } from './utilities';\r\n\r\n/**\r\n * @ignore\r\n */\r\nconst BUI_ICON_CLASS = 'bui-font-awesome-icon';\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const BUI_ICON_MAT_VARIANTS = ['filled', 'outlined', 'round', 'two-tone', 'sharp'];\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction variantToClass(variant: string) {\r\n\treturn `material-icons-${variant}`.replace(/-filled$/, '');\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nconst ALL_MAT_CLASSES = BUI_ICON_MAT_VARIANTS.map(variantToClass);\r\n\r\n/**\r\n * Use this directive, together with `<mat-icon>`, to display an icon font character/symbol\r\n * from Material or FontAwesome icons.\r\n *\r\n * To use the icon fonts, add the following statements to one of your global SCSS files:\r\n *\r\n * ```css\r\n * @import url(https://fonts.googleapis.com/css2?family=Material+Icons);\r\n * @import url(https://use.fontawesome.com/releases/v5.15.0/css/all.css);\r\n * ```\r\n *\r\n * @example <mat-icon buiIcon=\"far fa-circle\"></mat-icon> <!-- FontAwesome -->\r\n * @example <mat-icon buiIcon=\"home\" [size]=\"42\"></mat-icon> <!-- Material -->\r\n */\r\n@Directive({\r\n\tselector: '[buiIcon]'\r\n})\r\nexport class IconDirective implements OnChanges {\r\n\t/**\r\n\t * The icon name\r\n\t *\r\n\t * @example 'far fa-circle'\r\n\t * @example 'home'\r\n\t */\r\n\t@Input()\r\n\tbuiIcon = '';\r\n\r\n\t/**\r\n\t * Override the default icon size\r\n\t *\r\n\t * @default 24\r\n\t */\r\n\t@Input()\r\n\tsize = 24;\r\n\r\n\t/**\r\n\t * The style variant of Material Icons. It is not applicable for Font Awesome Icons or any other custom font icon sets.\r\n\t * @default `filled`\r\n\t */\r\n\t@Input()\r\n\tvariant: 'filled' | 'outlined' | 'round' | 'two-tone' | 'sharp' = 'filled';\r\n\r\n\tconstructor(private _icon: MatIcon) {\r\n\t\tif (!this._icon) {\r\n\t\t\tthrow new Error('Directive [buiIcon] must be used on a mat-icon!');\r\n\t\t}\r\n\t}\r\n\r\n\tngOnChanges(_: SimpleChanges) {\r\n\t\tconst iconFontSet = this.buiIcon && decodeFAIconFontSet(this.buiIcon);\r\n\t\tconst iconFontName = this.buiIcon && decodeFAIconFontName(this.buiIcon);\r\n\r\n\t\tconst element: HTMLElement = this._icon._elementRef.nativeElement;\r\n\t\tif (iconFontSet) {\r\n\t\t\tthis._icon.fontSet = iconFontSet;\r\n\t\t\tthis._icon.fontIcon = iconFontName;\r\n\t\t\telement.textContent = '';\r\n\t\t\telement.classList.add(BUI_ICON_CLASS);\r\n\t\t\telement.style.fontSize = `${(this.size * 20) / 24}px`;\r\n\t\t\tthis._icon['_updateFontIconClasses']();\r\n\t\t} else {\r\n\t\t\telement.textContent = this.buiIcon;\r\n\t\t\tthis._icon.fontSet = '';\r\n\t\t\tthis._icon.fontIcon = '';\r\n\t\t\telement.classList.remove(BUI_ICON_CLASS);\r\n\t\t\telement.style.fontSize = `${this.size}px`;\r\n\t\t\tthis._icon['_updateFontIconClasses']();\r\n\t\t\telement.classList.remove(...ALL_MAT_CLASSES);\r\n\t\t\telement.classList.add(variantToClass(this.variant));\r\n\t\t}\r\n\t\telement.style.width = `${this.size}px`;\r\n\t\telement.style.height = `${this.size}px`;\r\n\t}\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { IconDirective } from './icon.directive';\r\nimport { MatIconModule } from '@angular/material/icon';\r\n\r\n/**\r\n * Module for utility functions and directives based on `mat-icon` and icon fonts.\r\n */\r\n@NgModule({\r\n\tdeclarations: [IconDirective],\r\n\timports: [CommonModule, MatIconModule],\r\n\texports: [MatIconModule, IconDirective]\r\n})\r\nexport class IconFontModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;;AAEG;AACH,MAAM,gBAAgB,GAA8B;AACnD,IAAA,WAAW,EAAE,eAAe;AAC5B,IAAA,eAAe,EAAE,eAAe;CAChC,CAAC;AAEF;;;;;;;;AAQG;AACG,SAAU,mBAAmB,CAAC,QAAgB,EAAA;IACnD,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,IAAI,IAAI,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"bravura-ui-icon-font.mjs","sources":["../../../projects/ui/icon-font/utilities.ts","../../../projects/ui/icon-font/icon.directive.ts","../../../projects/ui/icon-font/icon-font.module.ts","../../../projects/ui/icon-font/bravura-ui-icon-font.ts"],"sourcesContent":["/**\r\n * @ignore\r\n */\r\nconst faReplacementMap: { [key: string]: string } = {\r\n\t'fa-shield': 'fa-shield-alt',\r\n\t'fa-line-chart': 'fa-chart-line'\r\n};\r\n\r\n/**\r\n * Decode the FontAwesome icon font set name from the icon name\r\n *\r\n * `'far fa-alarm' => 'far'`\r\n *\r\n * `'home' => ''`\r\n *\r\n * `'fa-user' => 'fas'`\r\n */\r\nexport function decodeFAIconFontSet(iconName: string): string {\r\n\tlet fontSet = '';\r\n\tlet isFA = false;\r\n\tif (iconName) {\r\n\t\ticonName.split(/\\s/).forEach(s => {\r\n\t\t\tif (s.startsWith('fa-')) {\r\n\t\t\t\tisFA = true;\r\n\t\t\t} else {\r\n\t\t\t\tfontSet = s;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\tif (isFA) {\r\n\t\treturn fontSet || 'fas';\r\n\t}\r\n\r\n\treturn '';\r\n}\r\n\r\n/**\r\n * Decode the FontAwesome icon font name from the icon name\r\n *\r\n * `'far fa-alarm' => 'fa-alarm'`\r\n *\r\n * `'home' => ''`\r\n *\r\n * `'fa-user' => 'fa-user'`\r\n */\r\nexport function decodeFAIconFontName(iconName: string): string {\r\n\tif (iconName) {\r\n\t\tconst name = iconName.split(/\\s/).find(s => s && s.startsWith('fa-')) || '';\r\n\t\treturn faReplacementMap[name] || name;\r\n\t}\r\n\r\n\treturn '';\r\n}\r\n","import { Directive, Input, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { MatIcon } from '@angular/material/icon';\r\n\r\nimport { decodeFAIconFontName, decodeFAIconFontSet } from './utilities';\r\n\r\n/**\r\n * @ignore\r\n */\r\nconst BUI_ICON_CLASS = 'bui-font-awesome-icon';\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const BUI_ICON_MAT_VARIANTS = ['filled', 'outlined', 'round', 'two-tone', 'sharp'];\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction variantToClass(variant: string) {\r\n\treturn `material-icons-${variant}`.replace(/-filled$/, '');\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nconst ALL_MAT_CLASSES = BUI_ICON_MAT_VARIANTS.map(variantToClass);\r\n\r\n/**\r\n * Use this directive, together with `<mat-icon>`, to display an icon font character/symbol\r\n * from Material or FontAwesome icons.\r\n *\r\n * To use the icon fonts, add the following statements to one of your global SCSS files:\r\n *\r\n * ```css\r\n * @import url(https://fonts.googleapis.com/css2?family=Material+Icons);\r\n * @import url(https://use.fontawesome.com/releases/v5.15.0/css/all.css);\r\n * ```\r\n *\r\n * @example <mat-icon buiIcon=\"far fa-circle\"></mat-icon> <!-- FontAwesome -->\r\n * @example <mat-icon buiIcon=\"home\" [size]=\"42\"></mat-icon> <!-- Material -->\r\n */\r\n@Directive({\r\n\tselector: '[buiIcon]'\r\n})\r\nexport class IconDirective implements OnChanges {\r\n\t/**\r\n\t * The icon name\r\n\t *\r\n\t * @example 'far fa-circle'\r\n\t * @example 'home'\r\n\t */\r\n\t@Input()\r\n\tbuiIcon = '';\r\n\r\n\t/**\r\n\t * Override the default icon size\r\n\t *\r\n\t * @default 24\r\n\t */\r\n\t@Input()\r\n\tsize = 24;\r\n\r\n\t/**\r\n\t * The style variant of Material Icons. It is not applicable for Font Awesome Icons or any other custom font icon sets.\r\n\t * @default `filled`\r\n\t */\r\n\t@Input()\r\n\tvariant: 'filled' | 'outlined' | 'round' | 'two-tone' | 'sharp' = 'filled';\r\n\r\n\tconstructor(private _icon: MatIcon) {\r\n\t\tif (!this._icon) {\r\n\t\t\tthrow new Error('Directive [buiIcon] must be used on a mat-icon!');\r\n\t\t}\r\n\t}\r\n\r\n\tngOnChanges(_: SimpleChanges) {\r\n\t\tconst iconFontSet = this.buiIcon && decodeFAIconFontSet(this.buiIcon);\r\n\t\tconst iconFontName = this.buiIcon && decodeFAIconFontName(this.buiIcon);\r\n\r\n\t\tconst element: HTMLElement = this._icon._elementRef.nativeElement;\r\n\t\tif (iconFontSet) {\r\n\t\t\tthis._icon.fontSet = iconFontSet;\r\n\t\t\tthis._icon.fontIcon = iconFontName;\r\n\t\t\telement.textContent = '';\r\n\t\t\telement.classList.add(BUI_ICON_CLASS);\r\n\t\t\telement.style.fontSize = `${(this.size * 20) / 24}px`;\r\n\t\t\tthis._icon['_updateFontIconClasses']();\r\n\t\t} else {\r\n\t\t\telement.textContent = this.buiIcon;\r\n\t\t\tthis._icon.fontSet = '';\r\n\t\t\tthis._icon.fontIcon = '';\r\n\t\t\telement.classList.remove(BUI_ICON_CLASS);\r\n\t\t\telement.style.fontSize = `${this.size}px`;\r\n\t\t\tthis._icon['_updateFontIconClasses']();\r\n\t\t\telement.classList.remove(...ALL_MAT_CLASSES);\r\n\t\t\telement.classList.add(variantToClass(this.variant));\r\n\t\t}\r\n\t\telement.style.width = `${this.size}px`;\r\n\t\telement.style.height = `${this.size}px`;\r\n\t}\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { IconDirective } from './icon.directive';\r\nimport { MatIconModule } from '@angular/material/icon';\r\n\r\n/**\r\n * Module for utility functions and directives based on `mat-icon` and icon fonts.\r\n */\r\n@NgModule({\r\n\tdeclarations: [IconDirective],\r\n\timports: [CommonModule, MatIconModule],\r\n\texports: [MatIconModule, IconDirective]\r\n})\r\nexport class IconFontModule {}\r\n","/**\n * Generated bundle index. Do not edit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
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: "18.2.2", 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: "18.2.2", type: TintedDirective, 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: "18.2.2", ngImport: i0, type: TintedDirective, decorators: [{
|
|
52
52
|
type: Directive,
|
|
53
53
|
args: [{
|
|
54
54
|
selector: '[buiTinted], bui-panel',
|
|
@@ -121,10 +121,10 @@ class PanelComponent {
|
|
|
121
121
|
this._width = width;
|
|
122
122
|
this._cd.markForCheck();
|
|
123
123
|
}
|
|
124
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
125
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
124
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: PanelComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: TintedDirective, host: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
125
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.2", type: PanelComponent, 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(--mdc-elevated-card-container-shape, var(--mdc-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 }); }
|
|
126
126
|
}
|
|
127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: PanelComponent, decorators: [{
|
|
128
128
|
type: Component,
|
|
129
129
|
args: [{ selector: 'bui-panel', host: {
|
|
130
130
|
class: 'bui-panel bui-host',
|
|
@@ -174,10 +174,10 @@ class PanelSectionComponent {
|
|
|
174
174
|
this._parentElement.setAttribute(COUNT_ATTR, count);
|
|
175
175
|
this._parentElement.classList.add(`${CONTAINER_PREFIX}-${count}`);
|
|
176
176
|
}
|
|
177
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
178
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
177
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: PanelSectionComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
178
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.2", type: PanelSectionComponent, 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 }); }
|
|
179
179
|
}
|
|
180
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: PanelSectionComponent, decorators: [{
|
|
181
181
|
type: Component,
|
|
182
182
|
args: [{ selector: 'bui-panel-section', host: {
|
|
183
183
|
class: 'bui-panel-section'
|
|
@@ -185,11 +185,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
185
185
|
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
186
186
|
|
|
187
187
|
class PanelModule {
|
|
188
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
189
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
190
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
188
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: PanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
189
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.2", ngImport: i0, type: PanelModule, declarations: [PanelComponent, PanelSectionComponent, TintedDirective], imports: [CommonModule, MatCardModule, BehaviorModule], exports: [MatCardModule, PanelComponent, PanelSectionComponent, TintedDirective] }); }
|
|
190
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: PanelModule, imports: [CommonModule, MatCardModule, BehaviorModule, MatCardModule] }); }
|
|
191
191
|
}
|
|
192
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: PanelModule, decorators: [{
|
|
193
193
|
type: NgModule,
|
|
194
194
|
args: [{
|
|
195
195
|
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})\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(@Inject(DOCUMENT) private _doc: Document, elemRef: ElementRef<HTMLElement>) {\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})\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(private _cd: ChangeDetectorRef, @Host() private _tinted: TintedDirective) {}\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})\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;MAMU,eAAe,CAAA;AAC3B;;;AAGG;AACH,IAAA,IACI,KAAK,GAAA;QACR,OAAO,IAAI,CAAC,MAAM,CAAC;KACnB;IACD,IAAI,KAAK,CAAC,CAAe,EAAA;AACxB,QAAA,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,aAAa,EAAE,CAAC;KACrB;IAQD,WAAsC,CAAA,IAAc,EAAE,OAAgC,EAAA;QAAhD,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAU;QAN5C,IAAM,CAAA,MAAA,GAAQ,SAAS,CAAC;QAO/B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AACpD,QAAA,IAAI,CAAC,KAAK,GAAG,aAAa,GAAG,UAAU,EAAE,CAAC;AAC1C,QAAA,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC;QACtC,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;KACnD;IAED,QAAQ,GAAA;QACP,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC;QAC1C,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,IAAI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CAAA,EAAA;AAEnE,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,EAAE,aAAa,EAAE,cAAc,EAC3C,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAEX,WAAW,EAAA,UAAA,EAAA,CAAA;kBALvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE,CAAC,cAAc,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,CAAC;AAChF,iBAAA,CAAA;;;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 { 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})\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(@Inject(DOCUMENT) private _doc: Document, elemRef: ElementRef<HTMLElement>) {\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})\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(private _cd: ChangeDetectorRef, @Host() private _tinted: TintedDirective) {}\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})\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;MAMU,eAAe,CAAA;AAC3B;;;AAGG;AACH,IAAA,IACI,KAAK,GAAA;QACR,OAAO,IAAI,CAAC,MAAM,CAAC;KACnB;IACD,IAAI,KAAK,CAAC,CAAe,EAAA;AACxB,QAAA,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,aAAa,EAAE,CAAC;KACrB;IAQD,WAAsC,CAAA,IAAc,EAAE,OAAgC,EAAA;QAAhD,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAU;QAN5C,IAAM,CAAA,MAAA,GAAQ,SAAS,CAAC;QAO/B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,C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AAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAX,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,iBAJR,cAAc,EAAE,qBAAqB,EAAE,eAAe,aAC3D,YAAY,EAAE,aAAa,EAAE,cAAc,aAC3C,aAAa,EAAE,cAAc,EAAE,qBAAqB,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;AAEnE,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YAHb,YAAY,EAAE,aAAa,EAAE,cAAc,EAC3C,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAEX,WAAW,EAAA,UAAA,EAAA,CAAA;kBALvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE,CAAC,cAAc,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,CAAC;AAChF,iBAAA,CAAA;;;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: "18.2.2", ngImport: i0, type: PhoneNumberPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
40
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.2", ngImport: i0, type: PhoneNumberPipe, name: "buiPhone" }); }
|
|
41
41
|
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: PhoneNumberPipe, decorators: [{
|
|
43
43
|
type: Pipe,
|
|
44
44
|
args: [{
|
|
45
45
|
name: 'buiPhone',
|
|
@@ -101,10 +101,10 @@ class PhoneNumberValidator {
|
|
|
101
101
|
validate(_) {
|
|
102
102
|
return PhoneNumberValidator.validateControl(this._el.nativeElement, this.telType, false);
|
|
103
103
|
}
|
|
104
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
105
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
104
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: PhoneNumberValidator, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
105
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.2", type: PhoneNumberValidator, selector: "[buiTelInput], input([type=tel])[ngModel], input([type=tel])[formControlName], input([type=tel])[formControl]", inputs: { telType: "telType" }, providers: [PHONE_VALIDATOR], ngImport: i0 }); }
|
|
106
106
|
}
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: PhoneNumberValidator, decorators: [{
|
|
108
108
|
type: Directive,
|
|
109
109
|
args: [{
|
|
110
110
|
selector: SELECTOR,
|
|
@@ -263,10 +263,10 @@ class PhoneNumberDirective {
|
|
|
263
263
|
}
|
|
264
264
|
}, 20);
|
|
265
265
|
}
|
|
266
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
267
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
266
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", 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 }); }
|
|
267
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.2", type: PhoneNumberDirective, 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 }); }
|
|
268
268
|
}
|
|
269
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
269
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: PhoneNumberDirective, decorators: [{
|
|
270
270
|
type: Directive,
|
|
271
271
|
args: [{
|
|
272
272
|
selector: SELECTOR
|
|
@@ -297,11 +297,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
297
297
|
* @internal
|
|
298
298
|
*/
|
|
299
299
|
class PhoneModule {
|
|
300
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
301
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
302
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
300
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: PhoneModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
301
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.2", ngImport: i0, type: PhoneModule, declarations: [PhoneNumberPipe, PhoneNumberDirective, PhoneNumberValidator], imports: [CommonModule], exports: [PhoneNumberDirective, PhoneNumberPipe, PhoneNumberValidator] }); }
|
|
302
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: PhoneModule, imports: [CommonModule] }); }
|
|
303
303
|
}
|
|
304
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
304
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: PhoneModule, decorators: [{
|
|
305
305
|
type: NgModule,
|
|
306
306
|
args: [{
|
|
307
307
|
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})\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})\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})\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.\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,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,EAJR,YAAA,EAAA,CAAA,eAAe,EAAE,oBAAoB,EAAE,oBAAoB,CAChE,EAAA,OAAA,EAAA,CAAA,YAAY,CACZ,EAAA,OAAA,EAAA,CAAA,oBAAoB,EAAE,eAAe,EAAE,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA;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,EAAA;;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,CAAC;AACtE,iBAAA,CAAA;;;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})\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})\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})\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.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