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