@bravura/ui 3.8.0 → 4.0.0
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 +579 -557
- package/LICENSE +6 -6
- package/README.md +56 -54
- package/alert/alert-container.component.d.ts +1 -1
- package/alert/alert-message.component.d.ts +1 -1
- package/behavior/await.directive.d.ts +1 -1
- package/behavior/observe-content-class.directive.d.ts +1 -1
- package/behavior/sizing.directive.d.ts +1 -1
- package/clip-note/clip-note.directive.d.ts +1 -1
- package/currency-input/currency-input.directive.d.ts +1 -1
- package/decimal-input/decimal-input.directive.d.ts +1 -1
- package/discrete-input/discrete-input.component.d.ts +1 -1
- package/esm2022/alert/alert-container.component.mjs +207 -0
- package/esm2022/alert/alert-message.component.mjs +101 -0
- package/esm2022/alert/alert.module.mjs +22 -0
- package/{esm2020 → esm2022}/alert/public-api.mjs +1 -1
- package/esm2022/alert/testing/test-api.mjs +44 -0
- package/{esm2020 → esm2022}/behavior/await.directive.mjs +6 -6
- package/esm2022/behavior/behavior.module.mjs +37 -0
- package/{esm2020 → esm2022}/behavior/observe-content-class.directive.mjs +5 -5
- package/{esm2020 → esm2022}/behavior/public-api.mjs +1 -1
- package/esm2022/behavior/sizing-monitor.directive.mjs +31 -0
- package/esm2022/behavior/sizing.directive.mjs +256 -0
- package/esm2022/clip-note/clip-note.component.mjs +216 -0
- package/esm2022/clip-note/clip-note.directive.mjs +141 -0
- package/esm2022/clip-note/clip-note.module.mjs +32 -0
- package/{esm2020 → esm2022}/clip-note/public-api.mjs +1 -1
- package/{esm2020 → esm2022}/common/common-utils.mjs +1 -1
- package/{esm2020 → esm2022}/common/common.module.mjs +7 -7
- package/{esm2020 → esm2022}/common/public-api.mjs +1 -1
- package/{esm2020 → esm2022}/currency-input/currency-input.directive.mjs +6 -6
- package/esm2022/currency-input/currency-input.module.mjs +19 -0
- package/{esm2020 → esm2022}/currency-input/public-api.mjs +1 -1
- package/{esm2020 → esm2022}/decimal-input/decimal-input.directive.mjs +9 -9
- package/{esm2020 → esm2022}/decimal-input/decimal-input.module.mjs +5 -5
- package/esm2022/discrete-input/discrete-input.component.mjs +337 -0
- package/esm2022/discrete-input/discrete-input.module.mjs +21 -0
- package/{esm2020 → esm2022}/discrete-input/public-api.mjs +1 -1
- package/esm2022/file-upload/file-upload.component.mjs +400 -0
- package/esm2022/file-upload/file-upload.module.mjs +44 -0
- package/esm2022/file-upload/file-upload.service.mjs +29 -0
- package/{esm2020 → esm2022}/file-upload/public-api.mjs +1 -1
- package/esm2022/form-field/form-field.component.mjs +82 -0
- package/esm2022/form-field/form-field.module.mjs +33 -0
- package/{esm2020 → esm2022}/form-field/public-api.mjs +1 -1
- package/esm2022/icon-font/icon-font.module.mjs +22 -0
- package/{esm2020 → esm2022}/icon-font/icon.directive.mjs +5 -5
- package/{esm2020 → esm2022}/icon-font/public-api.mjs +1 -1
- package/{esm2020 → esm2022}/icon-font/utilities.mjs +1 -1
- package/esm2022/panel/panel-section.component.mjs +41 -0
- package/esm2022/panel/panel.component.mjs +87 -0
- package/esm2022/panel/panel.module.mjs +23 -0
- package/{esm2020 → esm2022}/panel/public-api.mjs +1 -1
- package/esm2022/panel/tinted.directive.mjs +60 -0
- package/esm2022/phone-number/phone-number.directive.mjs +188 -0
- package/{esm2020 → esm2022}/phone-number/phone-number.module.mjs +5 -5
- package/{esm2020 → esm2022}/phone-number/phone-number.pipe.mjs +6 -6
- package/esm2022/phone-number/phone-number.validator.mjs +64 -0
- package/{esm2020 → esm2022}/phone-number/public-api.mjs +1 -1
- package/{esm2020 → esm2022}/public-api.mjs +1 -1
- package/esm2022/radio-panel/radio-panel-item.component.mjs +93 -0
- package/esm2022/radio-panel/radio-panel.component.mjs +81 -0
- package/{esm2020 → esm2022}/radio-panel/radio-panel.module.mjs +5 -5
- package/esm2022/radio-panel/testing/test-api.mjs +46 -0
- package/{esm2020 → esm2022}/selection-panel/public-api.mjs +1 -1
- package/esm2022/selection-panel/selection-panel-item.component.mjs +166 -0
- package/esm2022/selection-panel/selection-panel.directive.mjs +119 -0
- package/esm2022/selection-panel/selection-panel.module.mjs +23 -0
- package/{esm2020 → esm2022}/skeletons/public-api.mjs +1 -1
- package/esm2022/skeletons/skeleton-loader-presets.directive.mjs +83 -0
- package/{esm2020 → esm2022}/skeletons/skeleton-loader.component.mjs +5 -5
- package/esm2022/skeletons/skeletons.module.mjs +35 -0
- package/{esm2020 → esm2022}/stepper/public-api.mjs +1 -1
- package/{esm2020 → esm2022}/stepper/stepper-animation.mjs +1 -1
- package/esm2022/stepper/stepper.component.mjs +176 -0
- package/esm2022/stepper/stepper.module.mjs +52 -0
- package/{esm2020 → esm2022}/tooltip/public-api.mjs +1 -1
- package/esm2022/tooltip/tooltip.component.mjs +63 -0
- package/esm2022/tooltip/tooltip.directive.mjs +148 -0
- package/esm2022/tooltip/tooltip.module.mjs +25 -0
- package/{fesm2020 → fesm2022}/bravura-ui-alert-testing.mjs +2 -2
- package/fesm2022/bravura-ui-alert-testing.mjs.map +1 -0
- package/fesm2022/bravura-ui-alert.mjs +327 -0
- package/fesm2022/bravura-ui-alert.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-behavior.mjs +45 -45
- package/fesm2022/bravura-ui-behavior.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-clip-note.mjs +70 -70
- package/fesm2022/bravura-ui-clip-note.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-common.mjs +6 -6
- package/fesm2022/bravura-ui-common.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-currency-input.mjs +11 -11
- package/fesm2022/bravura-ui-currency-input.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-decimal-input.mjs +12 -12
- package/fesm2022/bravura-ui-decimal-input.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-discrete-input.mjs +48 -48
- package/fesm2022/bravura-ui-discrete-input.mjs.map +1 -0
- package/fesm2022/bravura-ui-file-upload.mjs +474 -0
- package/fesm2022/bravura-ui-file-upload.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-form-field.mjs +19 -19
- package/fesm2022/bravura-ui-form-field.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-icon-font.mjs +8 -8
- package/fesm2022/bravura-ui-icon-font.mjs.map +1 -0
- package/fesm2022/bravura-ui-panel.mjs +206 -0
- package/fesm2022/bravura-ui-panel.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-phone-number.mjs +30 -30
- package/fesm2022/bravura-ui-phone-number.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-radio-panel-testing.mjs +5 -6
- package/fesm2022/bravura-ui-radio-panel-testing.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-radio-panel.mjs +31 -31
- package/fesm2022/bravura-ui-radio-panel.mjs.map +1 -0
- package/fesm2022/bravura-ui-selection-panel.mjs +306 -0
- package/fesm2022/bravura-ui-selection-panel.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-skeletons.mjs +43 -43
- package/fesm2022/bravura-ui-skeletons.mjs.map +1 -0
- package/fesm2022/bravura-ui-stepper.mjs +251 -0
- package/fesm2022/bravura-ui-stepper.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/bravura-ui-tooltip.mjs +32 -24
- package/fesm2022/bravura-ui-tooltip.mjs.map +1 -0
- package/fesm2022/bravura-ui.mjs.map +1 -0
- package/file-upload/file-upload.component.d.ts +1 -1
- package/form-field/form-field.component.d.ts +1 -1
- package/icon-font/icon.directive.d.ts +1 -1
- package/package.json +76 -120
- package/panel/panel.component.d.ts +1 -1
- package/panel/tinted.directive.d.ts +1 -1
- package/phone-number/phone-number.directive.d.ts +1 -1
- package/phone-number/phone-number.validator.d.ts +2 -2
- package/radio-panel/radio-panel-item.component.d.ts +1 -1
- package/radio-panel/radio-panel.component.d.ts +1 -1
- package/radio-panel/testing/test-api.d.ts +2 -3
- package/selection-panel/selection-panel-item.component.d.ts +1 -1
- package/selection-panel/selection-panel.directive.d.ts +1 -1
- package/skeletons/skeleton-loader-presets.directive.d.ts +3 -3
- package/stepper/stepper.component.d.ts +1 -1
- package/theme/_bui-card.scss +56 -56
- package/theme/_ui-theme.scss +112 -112
- package/theme/global-style-by-bootstrap.scss +3 -3
- package/theme/global-style-by-tailwind.scss +3 -3
- package/theme/scrollbar.scss +40 -40
- package/tooltip/tooltip.component.d.ts +2 -0
- package/tooltip/tooltip.directive.d.ts +3 -5
- package/esm2020/alert/alert-container.component.mjs +0 -207
- package/esm2020/alert/alert-message.component.mjs +0 -102
- package/esm2020/alert/alert.module.mjs +0 -22
- package/esm2020/alert/testing/test-api.mjs +0 -44
- package/esm2020/behavior/behavior.module.mjs +0 -37
- package/esm2020/behavior/sizing-monitor.directive.mjs +0 -31
- package/esm2020/behavior/sizing.directive.mjs +0 -256
- package/esm2020/clip-note/clip-note.component.mjs +0 -216
- package/esm2020/clip-note/clip-note.directive.mjs +0 -141
- package/esm2020/clip-note/clip-note.module.mjs +0 -32
- package/esm2020/currency-input/currency-input.module.mjs +0 -19
- package/esm2020/discrete-input/discrete-input.component.mjs +0 -337
- package/esm2020/discrete-input/discrete-input.module.mjs +0 -21
- package/esm2020/file-upload/file-upload.component.mjs +0 -400
- package/esm2020/file-upload/file-upload.module.mjs +0 -44
- package/esm2020/file-upload/file-upload.service.mjs +0 -29
- package/esm2020/form-field/form-field.component.mjs +0 -82
- package/esm2020/form-field/form-field.module.mjs +0 -33
- package/esm2020/icon-font/icon-font.module.mjs +0 -22
- package/esm2020/panel/panel-section.component.mjs +0 -41
- package/esm2020/panel/panel.component.mjs +0 -87
- package/esm2020/panel/panel.module.mjs +0 -23
- package/esm2020/panel/tinted.directive.mjs +0 -60
- package/esm2020/phone-number/phone-number.directive.mjs +0 -188
- package/esm2020/phone-number/phone-number.validator.mjs +0 -64
- package/esm2020/radio-panel/radio-panel-item.component.mjs +0 -93
- package/esm2020/radio-panel/radio-panel.component.mjs +0 -81
- package/esm2020/radio-panel/testing/test-api.mjs +0 -47
- package/esm2020/selection-panel/selection-panel-item.component.mjs +0 -166
- package/esm2020/selection-panel/selection-panel.directive.mjs +0 -119
- package/esm2020/selection-panel/selection-panel.module.mjs +0 -23
- package/esm2020/skeletons/skeleton-loader-presets.directive.mjs +0 -83
- package/esm2020/skeletons/skeletons.module.mjs +0 -35
- package/esm2020/stepper/stepper.component.mjs +0 -176
- package/esm2020/stepper/stepper.module.mjs +0 -52
- package/esm2020/tooltip/tooltip.component.mjs +0 -54
- package/esm2020/tooltip/tooltip.directive.mjs +0 -149
- package/esm2020/tooltip/tooltip.module.mjs +0 -25
- package/fesm2015/bravura-ui-alert-testing.mjs +0 -64
- package/fesm2015/bravura-ui-alert-testing.mjs.map +0 -1
- package/fesm2015/bravura-ui-alert.mjs +0 -340
- package/fesm2015/bravura-ui-alert.mjs.map +0 -1
- package/fesm2015/bravura-ui-behavior.mjs +0 -515
- package/fesm2015/bravura-ui-behavior.mjs.map +0 -1
- package/fesm2015/bravura-ui-clip-note.mjs +0 -393
- package/fesm2015/bravura-ui-clip-note.mjs.map +0 -1
- package/fesm2015/bravura-ui-common.mjs +0 -96
- package/fesm2015/bravura-ui-common.mjs.map +0 -1
- package/fesm2015/bravura-ui-currency-input.mjs +0 -300
- package/fesm2015/bravura-ui-currency-input.mjs.map +0 -1
- package/fesm2015/bravura-ui-decimal-input.mjs +0 -145
- package/fesm2015/bravura-ui-decimal-input.mjs.map +0 -1
- package/fesm2015/bravura-ui-discrete-input.mjs +0 -365
- package/fesm2015/bravura-ui-discrete-input.mjs.map +0 -1
- package/fesm2015/bravura-ui-file-upload.mjs +0 -478
- package/fesm2015/bravura-ui-file-upload.mjs.map +0 -1
- package/fesm2015/bravura-ui-form-field.mjs +0 -120
- package/fesm2015/bravura-ui-form-field.mjs.map +0 -1
- package/fesm2015/bravura-ui-icon-font.mjs +0 -178
- package/fesm2015/bravura-ui-icon-font.mjs.map +0 -1
- package/fesm2015/bravura-ui-panel.mjs +0 -210
- package/fesm2015/bravura-ui-panel.mjs.map +0 -1
- package/fesm2015/bravura-ui-phone-number.mjs +0 -327
- package/fesm2015/bravura-ui-phone-number.mjs.map +0 -1
- package/fesm2015/bravura-ui-radio-panel-testing.mjs +0 -63
- package/fesm2015/bravura-ui-radio-panel-testing.mjs.map +0 -1
- package/fesm2015/bravura-ui-radio-panel.mjs +0 -200
- package/fesm2015/bravura-ui-radio-panel.mjs.map +0 -1
- package/fesm2015/bravura-ui-selection-panel.mjs +0 -311
- package/fesm2015/bravura-ui-selection-panel.mjs.map +0 -1
- package/fesm2015/bravura-ui-skeletons.mjs +0 -195
- package/fesm2015/bravura-ui-skeletons.mjs.map +0 -1
- package/fesm2015/bravura-ui-stepper.mjs +0 -253
- package/fesm2015/bravura-ui-stepper.mjs.map +0 -1
- package/fesm2015/bravura-ui-tooltip.mjs +0 -229
- package/fesm2015/bravura-ui-tooltip.mjs.map +0 -1
- package/fesm2015/bravura-ui.mjs.map +0 -1
- package/fesm2020/bravura-ui-alert-testing.mjs.map +0 -1
- package/fesm2020/bravura-ui-alert.mjs +0 -328
- package/fesm2020/bravura-ui-alert.mjs.map +0 -1
- package/fesm2020/bravura-ui-behavior.mjs.map +0 -1
- package/fesm2020/bravura-ui-clip-note.mjs.map +0 -1
- package/fesm2020/bravura-ui-common.mjs.map +0 -1
- package/fesm2020/bravura-ui-currency-input.mjs.map +0 -1
- package/fesm2020/bravura-ui-decimal-input.mjs.map +0 -1
- package/fesm2020/bravura-ui-discrete-input.mjs.map +0 -1
- package/fesm2020/bravura-ui-file-upload.mjs +0 -474
- package/fesm2020/bravura-ui-file-upload.mjs.map +0 -1
- package/fesm2020/bravura-ui-form-field.mjs.map +0 -1
- package/fesm2020/bravura-ui-icon-font.mjs.map +0 -1
- package/fesm2020/bravura-ui-panel.mjs +0 -206
- package/fesm2020/bravura-ui-panel.mjs.map +0 -1
- package/fesm2020/bravura-ui-phone-number.mjs.map +0 -1
- package/fesm2020/bravura-ui-radio-panel-testing.mjs.map +0 -1
- package/fesm2020/bravura-ui-radio-panel.mjs.map +0 -1
- package/fesm2020/bravura-ui-selection-panel.mjs +0 -306
- package/fesm2020/bravura-ui-selection-panel.mjs.map +0 -1
- package/fesm2020/bravura-ui-skeletons.mjs.map +0 -1
- package/fesm2020/bravura-ui-stepper.mjs +0 -251
- package/fesm2020/bravura-ui-stepper.mjs.map +0 -1
- package/fesm2020/bravura-ui-tooltip.mjs.map +0 -1
- package/fesm2020/bravura-ui.mjs +0 -8
- package/fesm2020/bravura-ui.mjs.map +0 -1
- /package/{esm2020 → esm2022}/alert/bravura-ui-alert.mjs +0 -0
- /package/{esm2020 → esm2022}/alert/testing/bravura-ui-alert-testing.mjs +0 -0
- /package/{esm2020 → esm2022}/behavior/bravura-ui-behavior.mjs +0 -0
- /package/{esm2020 → esm2022}/bravura-ui.mjs +0 -0
- /package/{esm2020 → esm2022}/clip-note/bravura-ui-clip-note.mjs +0 -0
- /package/{esm2020 → esm2022}/common/bravura-ui-common.mjs +0 -0
- /package/{esm2020 → esm2022}/currency-input/bravura-ui-currency-input.mjs +0 -0
- /package/{esm2020 → esm2022}/decimal-input/bravura-ui-decimal-input.mjs +0 -0
- /package/{esm2020 → esm2022}/decimal-input/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/discrete-input/bravura-ui-discrete-input.mjs +0 -0
- /package/{esm2020 → esm2022}/file-upload/bravura-ui-file-upload.mjs +0 -0
- /package/{esm2020 → esm2022}/form-field/bravura-ui-form-field.mjs +0 -0
- /package/{esm2020 → esm2022}/icon-font/bravura-ui-icon-font.mjs +0 -0
- /package/{esm2020 → esm2022}/panel/bravura-ui-panel.mjs +0 -0
- /package/{esm2020 → esm2022}/phone-number/bravura-ui-phone-number.mjs +0 -0
- /package/{esm2020 → esm2022}/radio-panel/bravura-ui-radio-panel.mjs +0 -0
- /package/{esm2020 → esm2022}/radio-panel/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/radio-panel/testing/bravura-ui-radio-panel-testing.mjs +0 -0
- /package/{esm2020 → esm2022}/selection-panel/bravura-ui-selection-panel.mjs +0 -0
- /package/{esm2020 → esm2022}/skeletons/bravura-ui-skeletons.mjs +0 -0
- /package/{esm2020 → esm2022}/stepper/bravura-ui-stepper.mjs +0 -0
- /package/{esm2020 → esm2022}/tooltip/bravura-ui-tooltip.mjs +0 -0
- /package/{fesm2015 → fesm2022}/bravura-ui.mjs +0 -0
|
@@ -23,23 +23,17 @@ const BUI_FORM_FIELD_CONFIG = new InjectionToken('@bravura/ui/buiFormFieldConfig
|
|
|
23
23
|
* component.
|
|
24
24
|
*/
|
|
25
25
|
class FormFieldComponent extends MatFormField {
|
|
26
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FormFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
27
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: FormFieldComponent, selector: "bui-dummy-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, styles: [".bui-form-field-bound,.bui-form-field-detach{padding-top:24px;--mat-mdc-form-field-floating-label-scale: 1 !important;--mat-mdc-form-field-floating-label-translate-y: -3.3rem}.bui-form-field-bound .mdc-floating-label,.bui-form-field-detach .mdc-floating-label{--mat-mdc-form-field-label-transform: translateY(var(--mat-mdc-form-field-floating-label-translate-y)) translateX(-4px) scale(var(--mat-mdc-form-field-floating-label-scale, .75)) !important;transition:none!important}[dir=rtl] .bui-form-field-bound .mdc-floating-label,[dir=rtl] .bui-form-field-detach .mdc-floating-label{--mat-mdc-form-field-label-transform: translateY(var(--mat-mdc-form-field-floating-label-translate-y)) translateX(4px) scale(var(--mat-mdc-form-field-floating-label-scale, .75)) !important}.bui-form-field-bound .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix,.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{display:flex;flex-direction:column;justify-content:center;align-self:stretch}.bui-form-field-bound.mat-focused{--mat-mdc-form-field-floating-label-translate-y: calc(-3.3rem - 1px) }.bui-form-field-bound .mat-mdc-form-field-hint-wrapper,.bui-form-field-bound .mat-mdc-form-field-error-wrapper{padding-left:initial;padding-inline-start:4px}.bui-form-field-bound .mat-mdc-form-field-infix{min-height:48px}.bui-form-field-bound .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}.bui-form-field-bound .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:4px}.bui-form-field-bound .mdc-notched-outline--notched .mdc-notched-outline__notch{border-top-width:1px;border-top-style:solid}.bui-form-field-bound .mdc-text-field--focused .mdc-notched-outline--notched .mdc-notched-outline__notch{border-top-width:2px}.bui-form-field-bound .mdc-text-field--disabled .mdc-notched-outline__notch{border-color:var(--bui-color-inactive)}.bui-form-field-bound .mat-mdc-form-field-icon-prefix>.mat-icon{padding:0 6px 0 12px}.bui-form-field-bound .mat-mdc-form-field-icon-prefix>span,.bui-form-field-bound .mat-mdc-form-field-icon-prefix>div{padding-inline-start:6px}.bui-form-field-bound .mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px 0 6px}.bui-form-field-bound .mat-mdc-form-field-icon-suffix>span,.bui-form-field-bound .mat-mdc-form-field-icon-suffix>div{padding-inline-end:6px}.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:0;padding-bottom:0}.bui-form-field-detach .mat-mdc-form-field-hint-wrapper,.bui-form-field-detach .mat-mdc-form-field-error-wrapper{padding-inline-start:0}.bui-form-field-detach .mat-mdc-form-field-infix{min-height:40px}.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{border:none!important}.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:0}.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-inline-start:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
26
28
|
}
|
|
27
|
-
|
|
28
|
-
FormFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: FormFieldComponent, selector: "bui-dummy-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, styles: [".bui-form-field-bound,.bui-form-field-detach{padding-top:24px;--mat-mdc-form-field-floating-label-scale: 1 !important;--mat-mdc-form-field-floating-label-translate-y: -3.3rem}.bui-form-field-bound .mdc-floating-label,.bui-form-field-detach .mdc-floating-label{--mat-mdc-form-field-label-transform: translateY(var(--mat-mdc-form-field-floating-label-translate-y)) translateX(-4px) scale(var(--mat-mdc-form-field-floating-label-scale, .75)) !important;transition:none!important}[dir=rtl] .bui-form-field-bound .mdc-floating-label,[dir=rtl] .bui-form-field-detach .mdc-floating-label{--mat-mdc-form-field-label-transform: translateY(var(--mat-mdc-form-field-floating-label-translate-y)) translateX(4px) scale(var(--mat-mdc-form-field-floating-label-scale, .75)) !important}.bui-form-field-bound .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix,.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{display:flex;flex-direction:column;justify-content:center;align-self:stretch}.bui-form-field-bound.mat-focused{--mat-mdc-form-field-floating-label-translate-y:calc(-3.3rem - 1px)}.bui-form-field-bound .mat-mdc-form-field-hint-wrapper,.bui-form-field-bound .mat-mdc-form-field-error-wrapper{padding-left:initial;padding-inline-start:4px}.bui-form-field-bound .mat-mdc-form-field-infix{min-height:48px}.bui-form-field-bound .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}.bui-form-field-bound .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:4px}.bui-form-field-bound .mdc-notched-outline--notched .mdc-notched-outline__notch{border-top-width:1px;border-top-style:solid}.bui-form-field-bound .mdc-text-field--focused .mdc-notched-outline--notched .mdc-notched-outline__notch{border-top-width:2px}.bui-form-field-bound .mdc-text-field--disabled .mdc-notched-outline__notch{border-color:var(--bui-color-inactive)}.bui-form-field-bound .mat-mdc-form-field-icon-prefix>.mat-icon{padding:0 6px 0 12px}.bui-form-field-bound .mat-mdc-form-field-icon-prefix>span,.bui-form-field-bound .mat-mdc-form-field-icon-prefix>div{padding-inline-start:6px}.bui-form-field-bound .mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px 0 6px}.bui-form-field-bound .mat-mdc-form-field-icon-suffix>span,.bui-form-field-bound .mat-mdc-form-field-icon-suffix>div{padding-inline-end:6px}.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:0;padding-bottom:0}.bui-form-field-detach .mat-mdc-form-field-hint-wrapper,.bui-form-field-detach .mat-mdc-form-field-error-wrapper{padding-inline-start:0}.bui-form-field-detach .mat-mdc-form-field-infix{min-height:40px}.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{border:none!important}.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:0}.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-inline-start:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
30
30
|
type: Component,
|
|
31
|
-
args: [{ selector: 'bui-dummy-component', template: ``, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".bui-form-field-bound,.bui-form-field-detach{padding-top:24px;--mat-mdc-form-field-floating-label-scale: 1 !important;--mat-mdc-form-field-floating-label-translate-y: -3.3rem}.bui-form-field-bound .mdc-floating-label,.bui-form-field-detach .mdc-floating-label{--mat-mdc-form-field-label-transform: translateY(var(--mat-mdc-form-field-floating-label-translate-y)) translateX(-4px) scale(var(--mat-mdc-form-field-floating-label-scale, .75)) !important;transition:none!important}[dir=rtl] .bui-form-field-bound .mdc-floating-label,[dir=rtl] .bui-form-field-detach .mdc-floating-label{--mat-mdc-form-field-label-transform: translateY(var(--mat-mdc-form-field-floating-label-translate-y)) translateX(4px) scale(var(--mat-mdc-form-field-floating-label-scale, .75)) !important}.bui-form-field-bound .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix,.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{display:flex;flex-direction:column;justify-content:center;align-self:stretch}.bui-form-field-bound.mat-focused{--mat-mdc-form-field-floating-label-translate-y:calc(-3.3rem - 1px)}.bui-form-field-bound .mat-mdc-form-field-hint-wrapper,.bui-form-field-bound .mat-mdc-form-field-error-wrapper{padding-left:initial;padding-inline-start:4px}.bui-form-field-bound .mat-mdc-form-field-infix{min-height:48px}.bui-form-field-bound .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}.bui-form-field-bound .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:4px}.bui-form-field-bound .mdc-notched-outline--notched .mdc-notched-outline__notch{border-top-width:1px;border-top-style:solid}.bui-form-field-bound .mdc-text-field--focused .mdc-notched-outline--notched .mdc-notched-outline__notch{border-top-width:2px}.bui-form-field-bound .mdc-text-field--disabled .mdc-notched-outline__notch{border-color:var(--bui-color-inactive)}.bui-form-field-bound .mat-mdc-form-field-icon-prefix>.mat-icon{padding:0 6px 0 12px}.bui-form-field-bound .mat-mdc-form-field-icon-prefix>span,.bui-form-field-bound .mat-mdc-form-field-icon-prefix>div{padding-inline-start:6px}.bui-form-field-bound .mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px 0 6px}.bui-form-field-bound .mat-mdc-form-field-icon-suffix>span,.bui-form-field-bound .mat-mdc-form-field-icon-suffix>div{padding-inline-end:6px}.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:0;padding-bottom:0}.bui-form-field-detach .mat-mdc-form-field-hint-wrapper,.bui-form-field-detach .mat-mdc-form-field-error-wrapper{padding-inline-start:0}.bui-form-field-detach .mat-mdc-form-field-infix{min-height:40px}.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{border:none!important}.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:0}.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-inline-start:0}\n"] }]
|
|
31
|
+
args: [{ selector: 'bui-dummy-component', template: ``, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".bui-form-field-bound,.bui-form-field-detach{padding-top:24px;--mat-mdc-form-field-floating-label-scale: 1 !important;--mat-mdc-form-field-floating-label-translate-y: -3.3rem}.bui-form-field-bound .mdc-floating-label,.bui-form-field-detach .mdc-floating-label{--mat-mdc-form-field-label-transform: translateY(var(--mat-mdc-form-field-floating-label-translate-y)) translateX(-4px) scale(var(--mat-mdc-form-field-floating-label-scale, .75)) !important;transition:none!important}[dir=rtl] .bui-form-field-bound .mdc-floating-label,[dir=rtl] .bui-form-field-detach .mdc-floating-label{--mat-mdc-form-field-label-transform: translateY(var(--mat-mdc-form-field-floating-label-translate-y)) translateX(4px) scale(var(--mat-mdc-form-field-floating-label-scale, .75)) !important}.bui-form-field-bound .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix,.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{display:flex;flex-direction:column;justify-content:center;align-self:stretch}.bui-form-field-bound.mat-focused{--mat-mdc-form-field-floating-label-translate-y: calc(-3.3rem - 1px) }.bui-form-field-bound .mat-mdc-form-field-hint-wrapper,.bui-form-field-bound .mat-mdc-form-field-error-wrapper{padding-left:initial;padding-inline-start:4px}.bui-form-field-bound .mat-mdc-form-field-infix{min-height:48px}.bui-form-field-bound .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}.bui-form-field-bound .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:4px}.bui-form-field-bound .mdc-notched-outline--notched .mdc-notched-outline__notch{border-top-width:1px;border-top-style:solid}.bui-form-field-bound .mdc-text-field--focused .mdc-notched-outline--notched .mdc-notched-outline__notch{border-top-width:2px}.bui-form-field-bound .mdc-text-field--disabled .mdc-notched-outline__notch{border-color:var(--bui-color-inactive)}.bui-form-field-bound .mat-mdc-form-field-icon-prefix>.mat-icon{padding:0 6px 0 12px}.bui-form-field-bound .mat-mdc-form-field-icon-prefix>span,.bui-form-field-bound .mat-mdc-form-field-icon-prefix>div{padding-inline-start:6px}.bui-form-field-bound .mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px 0 6px}.bui-form-field-bound .mat-mdc-form-field-icon-suffix>span,.bui-form-field-bound .mat-mdc-form-field-icon-suffix>div{padding-inline-end:6px}.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:0;padding-bottom:0}.bui-form-field-detach .mat-mdc-form-field-hint-wrapper,.bui-form-field-detach .mat-mdc-form-field-error-wrapper{padding-inline-start:0}.bui-form-field-detach .mat-mdc-form-field-infix{min-height:40px}.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{border:none!important}.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:0}.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-inline-start:0}\n"] }]
|
|
32
32
|
}] });
|
|
33
33
|
/**
|
|
34
34
|
* @ignore
|
|
35
35
|
*/
|
|
36
36
|
class FormFieldStyleDirective {
|
|
37
|
-
constructor(matFormField, elemRef, config) {
|
|
38
|
-
this.matFormField = matFormField;
|
|
39
|
-
this.elemRef = elemRef;
|
|
40
|
-
this._flowDetection = matFormField._shouldAlwaysFloat;
|
|
41
|
-
this.appearance = config.appearance;
|
|
42
|
-
}
|
|
43
37
|
/** The form field appearance style. */
|
|
44
38
|
get appearance() {
|
|
45
39
|
return this._appearance;
|
|
@@ -57,10 +51,16 @@ class FormFieldStyleDirective {
|
|
|
57
51
|
this.matFormField._shouldAlwaysFloat = this._flowDetection;
|
|
58
52
|
}
|
|
59
53
|
}
|
|
54
|
+
constructor(matFormField, elemRef, config) {
|
|
55
|
+
this.matFormField = matFormField;
|
|
56
|
+
this.elemRef = elemRef;
|
|
57
|
+
this._flowDetection = matFormField._shouldAlwaysFloat;
|
|
58
|
+
this.appearance = config.appearance;
|
|
59
|
+
}
|
|
60
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FormFieldStyleDirective, deps: [{ token: i1.MatFormField, host: true }, { token: i0.ElementRef }, { token: BUI_FORM_FIELD_CONFIG }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
61
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: FormFieldStyleDirective, selector: "bui-form-field, mat-form-field", inputs: { appearance: "appearance" }, host: { classAttribute: "bui-host" }, ngImport: i0 }); }
|
|
60
62
|
}
|
|
61
|
-
|
|
62
|
-
FormFieldStyleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.6", type: FormFieldStyleDirective, selector: "bui-form-field, mat-form-field", inputs: { appearance: "appearance" }, host: { classAttribute: "bui-host" }, ngImport: i0 });
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: FormFieldStyleDirective, decorators: [{
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FormFieldStyleDirective, decorators: [{
|
|
64
64
|
type: Directive,
|
|
65
65
|
args: [{
|
|
66
66
|
selector: 'bui-form-field, mat-form-field',
|
|
@@ -68,12 +68,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImpor
|
|
|
68
68
|
class: 'bui-host'
|
|
69
69
|
}
|
|
70
70
|
}]
|
|
71
|
-
}], ctorParameters:
|
|
71
|
+
}], ctorParameters: () => [{ type: i1.MatFormField, decorators: [{
|
|
72
72
|
type: Host
|
|
73
73
|
}] }, { type: i0.ElementRef }, { type: undefined, decorators: [{
|
|
74
74
|
type: Inject,
|
|
75
75
|
args: [BUI_FORM_FIELD_CONFIG]
|
|
76
|
-
}] }]
|
|
76
|
+
}] }], propDecorators: { appearance: [{
|
|
77
77
|
type: Input
|
|
78
78
|
}] } });
|
|
79
79
|
const matFormFieldRef = MatFormField.ɵcmp;
|
|
@@ -97,11 +97,11 @@ class FormFieldModule {
|
|
|
97
97
|
]
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
101
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: FormFieldModule, declarations: [FormFieldComponent, FormFieldStyleDirective], imports: [CommonModule, MatFormFieldModule, ObserversModule], exports: [FormFieldComponent, FormFieldStyleDirective, MatFormFieldModule] }); }
|
|
102
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FormFieldModule, imports: [CommonModule, MatFormFieldModule, ObserversModule, MatFormFieldModule] }); }
|
|
100
103
|
}
|
|
101
|
-
|
|
102
|
-
FormFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.6", ngImport: i0, type: FormFieldModule, declarations: [FormFieldComponent, FormFieldStyleDirective], imports: [CommonModule, MatFormFieldModule, ObserversModule], exports: [FormFieldComponent, FormFieldStyleDirective, MatFormFieldModule] });
|
|
103
|
-
FormFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: FormFieldModule, imports: [CommonModule, MatFormFieldModule, ObserversModule, MatFormFieldModule] });
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: FormFieldModule, decorators: [{
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FormFieldModule, decorators: [{
|
|
105
105
|
type: NgModule,
|
|
106
106
|
args: [{
|
|
107
107
|
declarations: [FormFieldComponent, FormFieldStyleDirective],
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bravura-ui-form-field.mjs","sources":["../../../projects/ui/form-field/form-field.component.ts","../../../projects/ui/form-field/form-field.module.ts","../../../projects/ui/form-field/bravura-ui-form-field.ts"],"sourcesContent":["import {\r\n\tChangeDetectionStrategy,\r\n\tComponent,\r\n\tDirective,\r\n\tElementRef,\r\n\tHost,\r\n\tInject,\r\n\tInjectionToken,\r\n\tInput,\r\n\tViewEncapsulation\r\n} from '@angular/core';\r\nimport { MatFormField } from '@angular/material/form-field';\r\n\r\nexport interface BuiFormFieldConfig {\r\n\tappearance?: 'fill' | 'outline' | 'bound';\r\n}\r\n\r\nexport const BUI_FORM_FIELD_CONFIG = new InjectionToken<BuiFormFieldConfig>('@bravura/ui/buiFormFieldConfig', {\r\n\tfactory: () => ({ appearance: 'fill' }),\r\n\tprovidedIn: 'root'\r\n});\r\n/**\r\n * Container for form controls that applies Material Design styling and behavior.\r\n *\r\n * This component extends Angular Material's [mat-form-field](https://material.angular.io/components/form-field) and provides two additional appearances\r\n * `bound` and `detach`. `bound` renders the label outside the outlined area of the field, while `detach` remove the borders all together. `detach`\r\n * is generally used with form controls that render their own borders.\r\n *\r\n * ** IMPORTANT NOTICE **\r\n *\r\n * From version 3.0 onward, the selector `bui-form-field` is deprecated and will be removed in later releases. You no longer need to use this tag name\r\n * for the new appearances. As long as you import the `NgModule` from this package, the new appearances will be supported by Material's `mat-form-field`\r\n * component.\r\n */\r\n@Component({\r\n\tselector: 'bui-dummy-component',\r\n\ttemplate: ``,\r\n\tstyleUrls: ['./form-field.component.scss'],\r\n\tencapsulation: ViewEncapsulation.None,\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormFieldComponent extends MatFormField {}\r\n\r\n/**\r\n * @ignore\r\n */\r\n@Directive({\r\n\tselector: 'bui-form-field, mat-form-field',\r\n\thost: {\r\n\t\tclass: 'bui-host'\r\n\t}\r\n})\r\nexport class FormFieldStyleDirective {\r\n\tprivate _appearance: any;\r\n\tprivate _flowDetection: any;\r\n\r\n\t/** The form field appearance style. */\r\n\t@Input()\r\n\tget appearance(): any {\r\n\t\treturn this._appearance;\r\n\t}\r\n\tset appearance(value: any) {\r\n\t\tthis._appearance = value;\r\n\t\tthis.elemRef.nativeElement.classList.remove('bui-form-field-bound', 'bui-form-field-detach');\r\n\t\tif (['bound', 'detach'].includes(this._appearance)) {\r\n\t\t\tthis.matFormField.appearance = 'outline';\r\n\t\t\tthis.elemRef.nativeElement.classList.add(`bui-form-field-${value}`);\r\n\t\t\tthis.matFormField._shouldAlwaysFloat = () => true;\r\n\t\t} else {\r\n\t\t\tthis.matFormField.appearance = ['outline', 'fill'].includes(this._appearance) ? this._appearance : undefined;\r\n\t\t\tthis.matFormField._shouldAlwaysFloat = this._flowDetection;\r\n\t\t}\r\n\t}\r\n\r\n\tconstructor(\r\n\t\t@Host() private matFormField: MatFormField,\r\n\t\tprivate elemRef: ElementRef<HTMLElement>,\r\n\t\t@Inject(BUI_FORM_FIELD_CONFIG) config: BuiFormFieldConfig\r\n\t) {\r\n\t\tthis._flowDetection = matFormField._shouldAlwaysFloat;\r\n\t\tthis.appearance = config.appearance;\r\n\t}\r\n}\r\n\r\nconst matFormFieldRef: any = MatFormField.ɵcmp;\r\nconst formFieldRef: any = FormFieldComponent.ɵcmp;\r\n\r\nmatFormFieldRef.styles.push(...formFieldRef.styles);\r\nmatFormFieldRef.selectors.push(['bui-form-field']);\r\ndelete matFormFieldRef.inputs.appearance;\r\ndelete matFormFieldRef.declaredInputs.appearance;\r\n","import { ObserversModule } from '@angular/cdk/observers';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport {\r\n\tBuiFormFieldConfig,\r\n\tBUI_FORM_FIELD_CONFIG,\r\n\tFormFieldComponent,\r\n\tFormFieldStyleDirective\r\n} from './form-field.component';\r\n\r\n@NgModule({\r\n\tdeclarations: [FormFieldComponent, FormFieldStyleDirective],\r\n\timports: [CommonModule, MatFormFieldModule, ObserversModule],\r\n\texports: [FormFieldComponent, FormFieldStyleDirective, MatFormFieldModule]\r\n})\r\nexport class FormFieldModule {\r\n\tstatic forConfig(config: BuiFormFieldConfig): ModuleWithProviders<FormFieldModule> {\r\n\t\tconst cfg = { ...config };\r\n\t\tcfg.appearance = cfg.appearance || 'fill';\r\n\t\treturn {\r\n\t\t\tngModule: FormFieldModule,\r\n\t\t\tproviders: [\r\n\t\t\t\t{\r\n\t\t\t\t\tprovide: BUI_FORM_FIELD_CONFIG,\r\n\t\t\t\t\tuseValue: cfg\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t};\r\n\t}\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAiBO,MAAM,qBAAqB,GAAG,IAAI,cAAc,CAAqB,gCAAgC,EAAE;IAC7G,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;AACvC,IAAA,UAAU,EAAE,MAAM;AAClB,CAAA,CAAC,CAAC;AACH;;;;;;;;;;;;AAYG;AAQG,MAAO,kBAAmB,SAAQ,YAAY,CAAA;+GAAvC,kBAAkB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,kBAAkB,kFALpB,CAAE,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,uuGAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;4FAKA,kBAAkB,EAAA,UAAA,EAAA,CAAA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AC;AAC3D,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,eAAe,CAAC;AAC5D,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,uBAAuB,EAAE,kBAAkB,CAAC;AAC1E,iBAAA,CAAA;;;ACfD;;AAEG;;;;"}
|
|
@@ -137,15 +137,15 @@ 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: "17.3.12", ngImport: i0, type: IconDirective, deps: [{ token: i1.MatIcon }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
141
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: IconDirective, selector: "[buiIcon]", inputs: { buiIcon: "buiIcon", size: "size", variant: "variant" }, usesOnChanges: true, ngImport: i0 }); }
|
|
140
142
|
}
|
|
141
|
-
|
|
142
|
-
IconDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.6", type: IconDirective, selector: "[buiIcon]", inputs: { buiIcon: "buiIcon", size: "size", variant: "variant" }, usesOnChanges: true, ngImport: i0 });
|
|
143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: IconDirective, decorators: [{
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: IconDirective, decorators: [{
|
|
144
144
|
type: Directive,
|
|
145
145
|
args: [{
|
|
146
146
|
selector: '[buiIcon]'
|
|
147
147
|
}]
|
|
148
|
-
}], ctorParameters:
|
|
148
|
+
}], ctorParameters: () => [{ type: i1.MatIcon }], propDecorators: { buiIcon: [{
|
|
149
149
|
type: Input
|
|
150
150
|
}], size: [{
|
|
151
151
|
type: Input
|
|
@@ -157,11 +157,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImpor
|
|
|
157
157
|
* Module for utility functions and directives based on `mat-icon` and icon fonts.
|
|
158
158
|
*/
|
|
159
159
|
class IconFontModule {
|
|
160
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: IconFontModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
161
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: IconFontModule, declarations: [IconDirective], imports: [CommonModule, MatIconModule], exports: [MatIconModule, IconDirective] }); }
|
|
162
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: IconFontModule, imports: [CommonModule, MatIconModule, MatIconModule] }); }
|
|
160
163
|
}
|
|
161
|
-
|
|
162
|
-
IconFontModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.6", ngImport: i0, type: IconFontModule, declarations: [IconDirective], imports: [CommonModule, MatIconModule], exports: [MatIconModule, IconDirective] });
|
|
163
|
-
IconFontModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: IconFontModule, imports: [CommonModule, MatIconModule, MatIconModule] });
|
|
164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: IconFontModule, decorators: [{
|
|
164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: IconFontModule, decorators: [{
|
|
165
165
|
type: NgModule,
|
|
166
166
|
args: [{
|
|
167
167
|
declarations: [IconDirective],
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bravura-ui-icon-font.mjs","sources":["../../../projects/ui/icon-font/utilities.ts","../../../projects/ui/icon-font/icon.directive.ts","../../../projects/ui/icon-font/icon-font.module.ts","../../../projects/ui/icon-font/bravura-ui-icon-font.ts"],"sourcesContent":["/**\r\n * @ignore\r\n */\r\nconst faReplacementMap: { [key: string]: string } = {\r\n\t'fa-shield': 'fa-shield-alt',\r\n\t'fa-line-chart': 'fa-chart-line'\r\n};\r\n\r\n/**\r\n * Decode the FontAwesome icon font set name from the icon name\r\n *\r\n * `'far fa-alarm' => 'far'`\r\n *\r\n * `'home' => ''`\r\n *\r\n * `'fa-user' => 'fas'`\r\n */\r\nexport function decodeFAIconFontSet(iconName: string): string {\r\n\tlet fontSet = '';\r\n\tlet isFA = false;\r\n\tif (iconName) {\r\n\t\ticonName.split(/\\s/).forEach(s => {\r\n\t\t\tif (s.startsWith('fa-')) {\r\n\t\t\t\tisFA = true;\r\n\t\t\t} else {\r\n\t\t\t\tfontSet = s;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\tif (isFA) {\r\n\t\treturn fontSet || 'fas';\r\n\t}\r\n\r\n\treturn '';\r\n}\r\n\r\n/**\r\n * Decode the FontAwesome icon font name from the icon name\r\n *\r\n * `'far fa-alarm' => 'fa-alarm'`\r\n *\r\n * `'home' => ''`\r\n *\r\n * `'fa-user' => 'fa-user'`\r\n */\r\nexport function decodeFAIconFontName(iconName: string): string {\r\n\tif (iconName) {\r\n\t\tconst name = iconName.split(/\\s/).find(s => s && s.startsWith('fa-')) || '';\r\n\t\treturn faReplacementMap[name] || name;\r\n\t}\r\n\r\n\treturn '';\r\n}\r\n","import { Directive, Input, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { MatIcon } from '@angular/material/icon';\r\n\r\nimport { decodeFAIconFontName, decodeFAIconFontSet } from './utilities';\r\n\r\n/**\r\n * @ignore\r\n */\r\nconst BUI_ICON_CLASS = 'bui-font-awesome-icon';\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const BUI_ICON_MAT_VARIANTS = ['filled', 'outlined', 'round', 'two-tone', 'sharp'];\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction variantToClass(variant: string) {\r\n\treturn `material-icons-${variant}`.replace(/-filled$/, '');\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nconst ALL_MAT_CLASSES = BUI_ICON_MAT_VARIANTS.map(variantToClass);\r\n\r\n/**\r\n * Use this directive, together with `<mat-icon>`, to display an icon font character/symbol\r\n * from Material or FontAwesome icons.\r\n *\r\n * To use the icon fonts, add the following statements to one of your global SCSS files:\r\n *\r\n * ```css\r\n * @import url(https://fonts.googleapis.com/css2?family=Material+Icons);\r\n * @import url(https://use.fontawesome.com/releases/v5.15.0/css/all.css);\r\n * ```\r\n *\r\n * @example <mat-icon buiIcon=\"far fa-circle\"></mat-icon> <!-- FontAwesome -->\r\n * @example <mat-icon buiIcon=\"home\" [size]=\"42\"></mat-icon> <!-- Material -->\r\n */\r\n@Directive({\r\n\tselector: '[buiIcon]'\r\n})\r\nexport class IconDirective implements OnChanges {\r\n\t/**\r\n\t * The icon name\r\n\t *\r\n\t * @example 'far fa-circle'\r\n\t * @example 'home'\r\n\t */\r\n\t@Input()\r\n\tbuiIcon = '';\r\n\r\n\t/**\r\n\t * Override the default icon size\r\n\t *\r\n\t * @default 24\r\n\t */\r\n\t@Input()\r\n\tsize = 24;\r\n\r\n\t/**\r\n\t * The style variant of Material Icons. It is not applicable for Font Awesome Icons or any other custom font icon sets.\r\n\t * @default `filled`\r\n\t */\r\n\t@Input()\r\n\tvariant: 'filled' | 'outlined' | 'round' | 'two-tone' | 'sharp' = 'filled';\r\n\r\n\tconstructor(private _icon: MatIcon) {\r\n\t\tif (!this._icon) {\r\n\t\t\tthrow new Error('Directive [buiIcon] must be used on a mat-icon!');\r\n\t\t}\r\n\t}\r\n\r\n\tngOnChanges(_: SimpleChanges) {\r\n\t\tconst iconFontSet = this.buiIcon && decodeFAIconFontSet(this.buiIcon);\r\n\t\tconst iconFontName = this.buiIcon && decodeFAIconFontName(this.buiIcon);\r\n\r\n\t\tconst element: HTMLElement = this._icon._elementRef.nativeElement;\r\n\t\tif (iconFontSet) {\r\n\t\t\tthis._icon.fontSet = iconFontSet;\r\n\t\t\tthis._icon.fontIcon = iconFontName;\r\n\t\t\telement.textContent = '';\r\n\t\t\telement.classList.add(BUI_ICON_CLASS);\r\n\t\t\telement.style.fontSize = `${(this.size * 20) / 24}px`;\r\n\t\t\tthis._icon['_updateFontIconClasses']();\r\n\t\t} else {\r\n\t\t\telement.textContent = this.buiIcon;\r\n\t\t\tthis._icon.fontSet = '';\r\n\t\t\tthis._icon.fontIcon = '';\r\n\t\t\telement.classList.remove(BUI_ICON_CLASS);\r\n\t\t\telement.style.fontSize = `${this.size}px`;\r\n\t\t\tthis._icon['_updateFontIconClasses']();\r\n\t\t\telement.classList.remove(...ALL_MAT_CLASSES);\r\n\t\t\telement.classList.add(variantToClass(this.variant));\r\n\t\t}\r\n\t\telement.style.width = `${this.size}px`;\r\n\t\telement.style.height = `${this.size}px`;\r\n\t}\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { IconDirective } from './icon.directive';\r\nimport { MatIconModule } from '@angular/material/icon';\r\n\r\n/**\r\n * Module for utility functions and directives based on `mat-icon` and icon fonts.\r\n */\r\n@NgModule({\r\n\tdeclarations: [IconDirective],\r\n\timports: [CommonModule, MatIconModule],\r\n\texports: [MatIconModule, IconDirective]\r\n})\r\nexport class IconFontModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;;AAEG;AACH,MAAM,gBAAgB,GAA8B;AACnD,IAAA,WAAW,EAAE,eAAe;AAC5B,IAAA,eAAe,EAAE,eAAe;CAChC,CAAC;AAEF;;;;;;;;AAQG;AACG,SAAU,mBAAmB,CAAC,QAAgB,EAAA;IACnD,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,IAAI,IAAI,GAAG,KAAK,CAAC;AACjB,IAAA,IAAI,QAAQ,EAAE;QACb,QAAQ,CAAC,KAAK,CAAC,IAA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;MAMU,cAAc,CAAA;+GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;gHAAd,cAAc,EAAA,YAAA,EAAA,CAJX,aAAa,CAClB,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,CAAA,EAAA,OAAA,EAAA,CAC3B,aAAa,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;AAE1B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAHhB,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,EAC3B,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAEX,cAAc,EAAA,UAAA,EAAA,CAAA;kBAL1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,YAAY,EAAE,CAAC,aAAa,CAAC;AAC7B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;AACtC,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,aAAa,CAAC;AACvC,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Directive, Inject, Input, Component, ChangeDetectionStrategy, Host, NgModule } from '@angular/core';
|
|
3
|
+
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
4
|
+
import { generateID } from '@bravura/ui/common';
|
|
5
|
+
import * as i2 from '@angular/material/card';
|
|
6
|
+
import { MatCardModule } from '@angular/material/card';
|
|
7
|
+
import * as i3 from '@bravura/ui/behavior';
|
|
8
|
+
import { BehaviorModule } from '@bravura/ui/behavior';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A "tinted" element has a shaded background specified by the `ThemePalette`, which
|
|
12
|
+
* is compatible with both light and dark themes.
|
|
13
|
+
*/
|
|
14
|
+
class TintedDirective {
|
|
15
|
+
/**
|
|
16
|
+
* The base color of the shaded background
|
|
17
|
+
* @default 'primary'
|
|
18
|
+
*/
|
|
19
|
+
get color() {
|
|
20
|
+
return this._color;
|
|
21
|
+
}
|
|
22
|
+
set color(c) {
|
|
23
|
+
this._color = c;
|
|
24
|
+
this.generateStyle();
|
|
25
|
+
}
|
|
26
|
+
constructor(_doc, elemRef) {
|
|
27
|
+
this._doc = _doc;
|
|
28
|
+
this._color = 'default';
|
|
29
|
+
this._addedStyle = this._doc.createElement('style');
|
|
30
|
+
this._attr = 'bui-tinted-' + generateID();
|
|
31
|
+
this._element = elemRef.nativeElement;
|
|
32
|
+
elemRef.nativeElement.setAttribute(this._attr, '');
|
|
33
|
+
}
|
|
34
|
+
ngOnInit() {
|
|
35
|
+
this._element.style.position = 'relative';
|
|
36
|
+
this.generateStyle();
|
|
37
|
+
this._element.appendChild(this._addedStyle);
|
|
38
|
+
}
|
|
39
|
+
ngOnDestroy() {
|
|
40
|
+
this._element.removeChild(this._addedStyle);
|
|
41
|
+
}
|
|
42
|
+
generateStyle() {
|
|
43
|
+
this._addedStyle.innerText =
|
|
44
|
+
`[${this._attr}]::after { position: absolute; opacity: 0.1; border-radius: inherit; display: block; content: ''; ` +
|
|
45
|
+
` background-color: var(--bui-color-${this.color}); top: 0; left: 0; ` +
|
|
46
|
+
` bottom: 0; right: 0; pointer-events: none; }`;
|
|
47
|
+
}
|
|
48
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", 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: "17.3.12", type: TintedDirective, selector: "[buiTinted], bui-panel", inputs: { color: ["buiTinted", "color"] }, host: { classAttribute: "bui-host" }, exportAs: ["buiTinted"], ngImport: i0 }); }
|
|
50
|
+
}
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TintedDirective, decorators: [{
|
|
52
|
+
type: Directive,
|
|
53
|
+
args: [{
|
|
54
|
+
selector: '[buiTinted], bui-panel',
|
|
55
|
+
host: { class: 'bui-host' },
|
|
56
|
+
exportAs: 'buiTinted'
|
|
57
|
+
}]
|
|
58
|
+
}], ctorParameters: () => [{ type: Document, decorators: [{
|
|
59
|
+
type: Inject,
|
|
60
|
+
args: [DOCUMENT]
|
|
61
|
+
}] }, { type: i0.ElementRef }], propDecorators: { color: [{
|
|
62
|
+
type: Input,
|
|
63
|
+
args: ['buiTinted']
|
|
64
|
+
}] } });
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* A `bui-panel` consists of a `mat-card` and a tinted backdrop.
|
|
68
|
+
*
|
|
69
|
+
* Unlike `mat-card`, `bui-panel` has a flat appearance by default and a transparent background.
|
|
70
|
+
* The backdrop is nearly transparent, blending the theme palette `color`
|
|
71
|
+
* and the effective background color of the DOM ancestors.
|
|
72
|
+
*
|
|
73
|
+
* `bui-panel` supports all the content child directives of `mat-card` as well as `bui-panel-section`.
|
|
74
|
+
*
|
|
75
|
+
* `bui-panel-section`s are subdivisions of `bui-panel` that rearrange their orientation based on the width of the container element.
|
|
76
|
+
*
|
|
77
|
+
*/
|
|
78
|
+
class PanelComponent {
|
|
79
|
+
/**
|
|
80
|
+
* This property defines the background (shaded) and border colors of the panel
|
|
81
|
+
*/
|
|
82
|
+
get color() {
|
|
83
|
+
return this._color;
|
|
84
|
+
}
|
|
85
|
+
set color(value) {
|
|
86
|
+
this._color = value;
|
|
87
|
+
this._tinted.color = value;
|
|
88
|
+
this._cd.markForCheck();
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* In contrast to using a `mat-card` alone, a `bui-panel` does not have a elevated appearance by default.
|
|
92
|
+
*
|
|
93
|
+
* This property can change the default appearance to
|
|
94
|
+
*
|
|
95
|
+
* * `raised` - the original `mat-card` default
|
|
96
|
+
* * `outline` - a `mat-card` with borders
|
|
97
|
+
* * `flat` - no border or elevation
|
|
98
|
+
*/
|
|
99
|
+
get appearance() {
|
|
100
|
+
return this._appearance;
|
|
101
|
+
}
|
|
102
|
+
set appearance(value) {
|
|
103
|
+
this._appearance = value;
|
|
104
|
+
this._cd.markForCheck();
|
|
105
|
+
}
|
|
106
|
+
constructor(_cd, _tinted) {
|
|
107
|
+
this._cd = _cd;
|
|
108
|
+
this._tinted = _tinted;
|
|
109
|
+
/**
|
|
110
|
+
* The width of the host element, at which the panel section container will change its orientation.
|
|
111
|
+
*/
|
|
112
|
+
this.breakpoint = 600;
|
|
113
|
+
/** @ignore */
|
|
114
|
+
this._width = 600;
|
|
115
|
+
this._color = 'primary';
|
|
116
|
+
this._appearance = 'flat';
|
|
117
|
+
}
|
|
118
|
+
ngOnInit() { }
|
|
119
|
+
/** @ignore */
|
|
120
|
+
_resized(width) {
|
|
121
|
+
this._width = width;
|
|
122
|
+
this._cd.markForCheck();
|
|
123
|
+
}
|
|
124
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PanelComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: TintedDirective, host: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
125
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: PanelComponent, selector: "bui-panel", inputs: { backdropClass: "backdropClass", cardClass: "cardClass", color: "color", appearance: "appearance", breakpoint: "breakpoint" }, host: { properties: { "class.bui-panel-vertical": "_width < breakpoint", "class.bui-panel-horizontal": "_width >= breakpoint" }, classAttribute: "bui-panel bui-host" }, ngImport: i0, template: "<mat-card\r\n\t[buiSizingBy]=\"'parent'\"\r\n\t(buiResized)=\"_resized($event.width)\"\r\n\t[appearance]=\"appearance === 'flat' ? 'raised' : appearance\"\r\n\tclass=\"bui-border-{{ color || 'none' }} {{ cardClass }} {{\r\n\t\tappearance === 'flat' ? 'mat-elevation-z' : appearance === 'outlined' ? 'mat-elevation-z bui-panel-border' : ''\r\n\t}}\"\r\n>\r\n\t<ng-content></ng-content>\r\n</mat-card>\r\n", styles: [":host{border-radius:var(--mdc-elevated-card-container-shape, var(--mdc-shape-medium, 4px));position:relative}:host .bui-panel-border{border-width:1px;border-style:solid}:host ::ng-deep .bui-panel-section-container{display:flex;box-sizing:border-box!important}:host(:not([hidden])){display:block}:host(:not([hidden])) .mat-mdc-card{background-color:transparent;padding:16px}:host(:not([hidden])) .mat-mdc-card ::ng-deep .mat-mdc-card-header,:host(:not([hidden])) .mat-mdc-card ::ng-deep .mat-mdc-card-content,:host(:not([hidden])) .mat-mdc-card ::ng-deep .mat-mdc-card-actions{padding:0}:host(:not([hidden])) .mat-mdc-card ::ng-deep .mat-mdc-card-actions{margin-inline-start:-10px}:host(:not([hidden])) .mat-mdc-card ::ng-deep .mat-mdc-card-footer{margin:0 -16px -16px}:host(:not([hidden])) .mat-mdc-card.mat-elevation-z{box-shadow:none!important}:host(.bui-panel-horizontal) ::ng-deep .bui-panel-section-container{flex-direction:row}:host(.bui-panel-vertical) ::ng-deep .bui-panel-section-container{flex-direction:column}\n"], dependencies: [{ kind: "component", type: i2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3.SizingDirective, selector: "[buiSizing],[buiResized],[buiSizingBy],[buiFixedHeight]", inputs: ["buiSizing", "sizingBy", "buiSizingBy", "buiFixedHeight"], outputs: ["buiResized"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
126
|
+
}
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PanelComponent, decorators: [{
|
|
128
|
+
type: Component,
|
|
129
|
+
args: [{ selector: 'bui-panel', host: {
|
|
130
|
+
class: 'bui-panel bui-host',
|
|
131
|
+
'[class.bui-panel-vertical]': `_width < breakpoint`,
|
|
132
|
+
'[class.bui-panel-horizontal]': `_width >= breakpoint`
|
|
133
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-card\r\n\t[buiSizingBy]=\"'parent'\"\r\n\t(buiResized)=\"_resized($event.width)\"\r\n\t[appearance]=\"appearance === 'flat' ? 'raised' : appearance\"\r\n\tclass=\"bui-border-{{ color || 'none' }} {{ cardClass }} {{\r\n\t\tappearance === 'flat' ? 'mat-elevation-z' : appearance === 'outlined' ? 'mat-elevation-z bui-panel-border' : ''\r\n\t}}\"\r\n>\r\n\t<ng-content></ng-content>\r\n</mat-card>\r\n", styles: [":host{border-radius:var(--mdc-elevated-card-container-shape, var(--mdc-shape-medium, 4px));position:relative}:host .bui-panel-border{border-width:1px;border-style:solid}:host ::ng-deep .bui-panel-section-container{display:flex;box-sizing:border-box!important}:host(:not([hidden])){display:block}:host(:not([hidden])) .mat-mdc-card{background-color:transparent;padding:16px}:host(:not([hidden])) .mat-mdc-card ::ng-deep .mat-mdc-card-header,:host(:not([hidden])) .mat-mdc-card ::ng-deep .mat-mdc-card-content,:host(:not([hidden])) .mat-mdc-card ::ng-deep .mat-mdc-card-actions{padding:0}:host(:not([hidden])) .mat-mdc-card ::ng-deep .mat-mdc-card-actions{margin-inline-start:-10px}:host(:not([hidden])) .mat-mdc-card ::ng-deep .mat-mdc-card-footer{margin:0 -16px -16px}:host(:not([hidden])) .mat-mdc-card.mat-elevation-z{box-shadow:none!important}:host(.bui-panel-horizontal) ::ng-deep .bui-panel-section-container{flex-direction:row}:host(.bui-panel-vertical) ::ng-deep .bui-panel-section-container{flex-direction:column}\n"] }]
|
|
134
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: TintedDirective, decorators: [{
|
|
135
|
+
type: Host
|
|
136
|
+
}] }], propDecorators: { backdropClass: [{
|
|
137
|
+
type: Input
|
|
138
|
+
}], cardClass: [{
|
|
139
|
+
type: Input
|
|
140
|
+
}], color: [{
|
|
141
|
+
type: Input
|
|
142
|
+
}], appearance: [{
|
|
143
|
+
type: Input
|
|
144
|
+
}], breakpoint: [{
|
|
145
|
+
type: Input
|
|
146
|
+
}] } });
|
|
147
|
+
|
|
148
|
+
const CONTAINER_PREFIX = 'bui-panel-section-container';
|
|
149
|
+
const COUNT_ATTR = 'bui-section-count';
|
|
150
|
+
/**
|
|
151
|
+
* `bui-panel-section`s are subdivisions of `bui-panel` that rearrange their orientation based on the width of the container element.
|
|
152
|
+
*/
|
|
153
|
+
class PanelSectionComponent {
|
|
154
|
+
constructor(_elementRef) {
|
|
155
|
+
this._elementRef = _elementRef;
|
|
156
|
+
}
|
|
157
|
+
ngOnInit() {
|
|
158
|
+
this._parentElement = this._elementRef.nativeElement.parentElement;
|
|
159
|
+
this._parentElement.classList.add(CONTAINER_PREFIX);
|
|
160
|
+
this._calcCount(1);
|
|
161
|
+
}
|
|
162
|
+
ngOnDestroy() {
|
|
163
|
+
this._calcCount(-1);
|
|
164
|
+
}
|
|
165
|
+
_calcCount(delta) {
|
|
166
|
+
let count = this._parentElement.getAttribute(COUNT_ATTR);
|
|
167
|
+
if (count) {
|
|
168
|
+
this._parentElement.classList.remove(`${CONTAINER_PREFIX}-${count}`);
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
count = '0';
|
|
172
|
+
}
|
|
173
|
+
count = `${Math.max(Number(count) + delta, 0)}`;
|
|
174
|
+
this._parentElement.setAttribute(COUNT_ATTR, count);
|
|
175
|
+
this._parentElement.classList.add(`${CONTAINER_PREFIX}-${count}`);
|
|
176
|
+
}
|
|
177
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PanelSectionComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
178
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: PanelSectionComponent, selector: "bui-panel-section", host: { classAttribute: "bui-panel-section" }, ngImport: i0, template: "<ng-content></ng-content>\r\n", styles: [":host{flex-grow:1}:host-context(.bui-panel-horizontal) :host:not(:first-child){border-inline-start:1px solid rgba(128,128,128,.2);padding-inline-start:16px}:host-context(.bui-panel-horizontal) :host:not(:last-child){padding-inline-end:16px}:host-context(.bui-panel-vertical) :host:not(:first-child){border-top:1px solid rgba(128,128,128,.2);padding-top:16px}:host-context(.bui-panel-vertical) :host:not(:last-child){padding-bottom:16px}:host-context(.bui-panel-horizontal .bui-panel-section-container-2){flex-basis:50%}:host-context(.bui-panel-horizontal .bui-panel-section-container-3){flex-basis:33.3333333333%}:host-context(.bui-panel-horizontal .bui-panel-section-container-4){flex-basis:25%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
179
|
+
}
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PanelSectionComponent, decorators: [{
|
|
181
|
+
type: Component,
|
|
182
|
+
args: [{ selector: 'bui-panel-section', host: {
|
|
183
|
+
class: 'bui-panel-section'
|
|
184
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
185
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
186
|
+
|
|
187
|
+
class PanelModule {
|
|
188
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
189
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: PanelModule, declarations: [PanelComponent, PanelSectionComponent, TintedDirective], imports: [CommonModule, MatCardModule, BehaviorModule], exports: [MatCardModule, PanelComponent, PanelSectionComponent, TintedDirective] }); }
|
|
190
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PanelModule, imports: [CommonModule, MatCardModule, BehaviorModule, MatCardModule] }); }
|
|
191
|
+
}
|
|
192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PanelModule, decorators: [{
|
|
193
|
+
type: NgModule,
|
|
194
|
+
args: [{
|
|
195
|
+
declarations: [PanelComponent, PanelSectionComponent, TintedDirective],
|
|
196
|
+
imports: [CommonModule, MatCardModule, BehaviorModule],
|
|
197
|
+
exports: [MatCardModule, PanelComponent, PanelSectionComponent, TintedDirective]
|
|
198
|
+
}]
|
|
199
|
+
}] });
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Generated bundle index. Do not edit.
|
|
203
|
+
*/
|
|
204
|
+
|
|
205
|
+
export { PanelComponent, PanelModule, PanelSectionComponent, TintedDirective };
|
|
206
|
+
//# sourceMappingURL=bravura-ui-panel.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bravura-ui-panel.mjs","sources":["../../../projects/ui/panel/tinted.directive.ts","../../../projects/ui/panel/panel.component.ts","../../../projects/ui/panel/panel.component.html","../../../projects/ui/panel/panel-section.component.ts","../../../projects/ui/panel/panel-section.component.html","../../../projects/ui/panel/panel.module.ts","../../../projects/ui/panel/bravura-ui-panel.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\r\nimport { Directive, ElementRef, Inject, Input, OnDestroy, OnInit } from '@angular/core';\r\nimport { ThemePalette } from '@angular/material/core';\r\nimport { generateID } from '@bravura/ui/common';\r\n\r\n/**\r\n * A \"tinted\" element has a shaded background specified by the `ThemePalette`, which\r\n * is compatible with both light and dark themes.\r\n */\r\n@Directive({\r\n\tselector: '[buiTinted], bui-panel',\r\n\thost: { class: 'bui-host' },\r\n\texportAs: 'buiTinted'\r\n})\r\nexport class TintedDirective implements OnInit, OnDestroy {\r\n\t/**\r\n\t * The base color of the shaded background\r\n\t * @default 'primary'\r\n\t */\r\n\t@Input('buiTinted')\r\n\tget color(): ThemePalette {\r\n\t\treturn this._color;\r\n\t}\r\n\tset color(c: ThemePalette) {\r\n\t\tthis._color = c;\r\n\t\tthis.generateStyle();\r\n\t}\r\n\r\n\tprivate _color: any = 'default';\r\n\r\n\tprivate readonly _addedStyle: HTMLStyleElement;\r\n\tprivate readonly _attr: string;\r\n\tprivate _element: HTMLElement;\r\n\r\n\tconstructor(@Inject(DOCUMENT) private _doc: Document, elemRef: ElementRef<HTMLElement>) {\r\n\t\tthis._addedStyle = this._doc.createElement('style');\r\n\t\tthis._attr = 'bui-tinted-' + generateID();\r\n\t\tthis._element = elemRef.nativeElement;\r\n\t\telemRef.nativeElement.setAttribute(this._attr, '');\r\n\t}\r\n\r\n\tngOnInit(): void {\r\n\t\tthis._element.style.position = 'relative';\r\n\t\tthis.generateStyle();\r\n\t\tthis._element.appendChild(this._addedStyle);\r\n\t}\r\n\r\n\tngOnDestroy(): void {\r\n\t\tthis._element.removeChild(this._addedStyle);\r\n\t}\r\n\r\n\tprivate generateStyle(): void {\r\n\t\tthis._addedStyle.innerText =\r\n\t\t\t`[${this._attr}]::after { position: absolute; opacity: 0.1; border-radius: inherit; display: block; content: ''; ` +\r\n\t\t\t` background-color: var(--bui-color-${this.color}); top: 0; left: 0; ` +\r\n\t\t\t` bottom: 0; right: 0; pointer-events: none; }`;\r\n\t}\r\n}\r\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Host, Input, OnInit } from '@angular/core';\r\nimport { ThemePalette } from '@angular/material/core';\r\nimport { TintedDirective } from './tinted.directive';\r\n\r\n/**\r\n * A `bui-panel` consists of a `mat-card` and a tinted backdrop.\r\n *\r\n * Unlike `mat-card`, `bui-panel` has a flat appearance by default and a transparent background.\r\n * The backdrop is nearly transparent, blending the theme palette `color`\r\n * and the effective background color of the DOM ancestors.\r\n *\r\n * `bui-panel` supports all the content child directives of `mat-card` as well as `bui-panel-section`.\r\n *\r\n * `bui-panel-section`s are subdivisions of `bui-panel` that rearrange their orientation based on the width of the container element.\r\n *\r\n */\r\n@Component({\r\n\tselector: 'bui-panel',\r\n\ttemplateUrl: './panel.component.html',\r\n\tstyleUrls: ['./panel.component.scss'],\r\n\thost: {\r\n\t\tclass: 'bui-panel bui-host',\r\n\t\t'[class.bui-panel-vertical]': `_width < breakpoint`,\r\n\t\t'[class.bui-panel-horizontal]': `_width >= breakpoint`\r\n\t},\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class PanelComponent implements OnInit {\r\n\t/**\r\n\t * Additional style classes on the tinted backdrop element.\r\n\t * @deprecated\r\n\t * @ignore\r\n\t */\r\n\t@Input()\r\n\tbackdropClass?: string;\r\n\r\n\t/**\r\n\t * Additional style classes on the `<mat-card>` element.\r\n\t */\r\n\t@Input()\r\n\tcardClass?: string;\r\n\r\n\t/**\r\n\t * This property defines the background (shaded) and border colors of the panel\r\n\t */\r\n\t@Input()\r\n\tget color(): ThemePalette {\r\n\t\treturn this._color;\r\n\t}\r\n\tset color(value: ThemePalette) {\r\n\t\tthis._color = value;\r\n\t\tthis._tinted.color = value;\r\n\t\tthis._cd.markForCheck();\r\n\t}\r\n\r\n\t/**\r\n\t * In contrast to using a `mat-card` alone, a `bui-panel` does not have a elevated appearance by default.\r\n\t *\r\n\t * This property can change the default appearance to\r\n\t *\r\n\t * * `raised` - the original `mat-card` default\r\n\t * * `outline` - a `mat-card` with borders\r\n\t * * `flat` - no border or elevation\r\n\t */\r\n\t@Input()\r\n\tget appearance(): 'outlined' | 'raised' | 'flat' {\r\n\t\treturn this._appearance;\r\n\t}\r\n\tset appearance(value: 'outlined' | 'raised' | 'flat') {\r\n\t\tthis._appearance = value;\r\n\t\tthis._cd.markForCheck();\r\n\t}\r\n\r\n\t/**\r\n\t * The width of the host element, at which the panel section container will change its orientation.\r\n\t */\r\n\t@Input()\r\n\tbreakpoint = 600;\r\n\r\n\t/** @ignore */\r\n\t_width = 600;\r\n\r\n\tprivate _color: ThemePalette = 'primary';\r\n\r\n\tprivate _appearance: 'outlined' | 'raised' | 'flat' = 'flat';\r\n\r\n\tconstructor(private _cd: ChangeDetectorRef, @Host() private _tinted: TintedDirective) {}\r\n\r\n\tngOnInit(): void {}\r\n\r\n\t/** @ignore */\r\n\t_resized(width: number): void {\r\n\t\tthis._width = width;\r\n\t\tthis._cd.markForCheck();\r\n\t}\r\n}\r\n","<mat-card\r\n\t[buiSizingBy]=\"'parent'\"\r\n\t(buiResized)=\"_resized($event.width)\"\r\n\t[appearance]=\"appearance === 'flat' ? 'raised' : appearance\"\r\n\tclass=\"bui-border-{{ color || 'none' }} {{ cardClass }} {{\r\n\t\tappearance === 'flat' ? 'mat-elevation-z' : appearance === 'outlined' ? 'mat-elevation-z bui-panel-border' : ''\r\n\t}}\"\r\n>\r\n\t<ng-content></ng-content>\r\n</mat-card>\r\n","import { ChangeDetectionStrategy, Component, ElementRef, OnDestroy, OnInit } from '@angular/core';\r\n\r\nconst CONTAINER_PREFIX = 'bui-panel-section-container';\r\n\r\nconst COUNT_ATTR = 'bui-section-count';\r\n/**\r\n * `bui-panel-section`s are subdivisions of `bui-panel` that rearrange their orientation based on the width of the container element.\r\n */\r\n@Component({\r\n\tselector: 'bui-panel-section',\r\n\ttemplateUrl: './panel-section.component.html',\r\n\tstyleUrls: ['./panel-section.component.scss'],\r\n\thost: {\r\n\t\tclass: 'bui-panel-section'\r\n\t},\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class PanelSectionComponent implements OnInit, OnDestroy {\r\n\tprivate _parentElement!: HTMLElement;\r\n\r\n\tconstructor(private _elementRef: ElementRef<HTMLElement>) {}\r\n\r\n\tngOnInit(): void {\r\n\t\tthis._parentElement = this._elementRef.nativeElement.parentElement!;\r\n\t\tthis._parentElement.classList.add(CONTAINER_PREFIX);\r\n\t\tthis._calcCount(1);\r\n\t}\r\n\r\n\tngOnDestroy(): void {\r\n\t\tthis._calcCount(-1);\r\n\t}\r\n\r\n\tprivate _calcCount(delta: number) {\r\n\t\tlet count = this._parentElement.getAttribute(COUNT_ATTR);\r\n\t\tif (count) {\r\n\t\t\tthis._parentElement.classList.remove(`${CONTAINER_PREFIX}-${count}`);\r\n\t\t} else {\r\n\t\t\tcount = '0';\r\n\t\t}\r\n\t\tcount = `${Math.max(Number(count) + delta, 0)}`;\r\n\t\tthis._parentElement.setAttribute(COUNT_ATTR, count);\r\n\t\tthis._parentElement.classList.add(`${CONTAINER_PREFIX}-${count}`);\r\n\t}\r\n}\r\n","<ng-content></ng-content>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { PanelComponent } from './panel.component';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { BehaviorModule } from '@bravura/ui/behavior';\r\nimport { PanelSectionComponent } from './panel-section.component';\r\nimport { TintedDirective } from './tinted.directive';\r\n\r\n@NgModule({\r\n\tdeclarations: [PanelComponent, PanelSectionComponent, TintedDirective],\r\n\timports: [CommonModule, MatCardModule, BehaviorModule],\r\n\texports: [MatCardModule, PanelComponent, PanelSectionComponent, TintedDirective]\r\n})\r\nexport class PanelModule {}\r\n\r\nexport { PanelComponent, PanelSectionComponent, TintedDirective };\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["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,EAAE,eAAe,CAAC;AACtE,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,cAAc,CAAC;oBACtD,OAAO,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,qBAAqB,EAAE,eAAe,CAAC;AAChF,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
|
|
@@ -36,19 +36,19 @@ class PhoneNumberPipe {
|
|
|
36
36
|
return result;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PhoneNumberPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
40
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: PhoneNumberPipe, name: "buiPhone" }); }
|
|
39
41
|
}
|
|
40
|
-
|
|
41
|
-
PhoneNumberPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.6", ngImport: i0, type: PhoneNumberPipe, name: "buiPhone" });
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: PhoneNumberPipe, decorators: [{
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PhoneNumberPipe, decorators: [{
|
|
43
43
|
type: Pipe,
|
|
44
44
|
args: [{
|
|
45
45
|
name: 'buiPhone',
|
|
46
46
|
pure: true
|
|
47
47
|
}]
|
|
48
|
-
}], ctorParameters:
|
|
48
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
49
49
|
type: Inject,
|
|
50
50
|
args: [LOCALE_ID]
|
|
51
|
-
}] }]
|
|
51
|
+
}] }] });
|
|
52
52
|
function getCountryCodeFromLocale(locale) {
|
|
53
53
|
return locale.replace(/.+[-_]([a-z][a-z])$/i, '$1');
|
|
54
54
|
}
|
|
@@ -69,10 +69,6 @@ const PHONE_VALIDATOR = {
|
|
|
69
69
|
* @internal
|
|
70
70
|
*/
|
|
71
71
|
class PhoneNumberValidator {
|
|
72
|
-
constructor(_el) {
|
|
73
|
-
this._el = _el;
|
|
74
|
-
this.telType = 'FIXED_LINE';
|
|
75
|
-
}
|
|
76
72
|
static validateControl(inp, type, update) {
|
|
77
73
|
const err = { tel: true };
|
|
78
74
|
if (!inp.value) {
|
|
@@ -98,19 +94,23 @@ class PhoneNumberValidator {
|
|
|
98
94
|
}
|
|
99
95
|
return err;
|
|
100
96
|
}
|
|
97
|
+
constructor(_el) {
|
|
98
|
+
this._el = _el;
|
|
99
|
+
this.telType = 'FIXED_LINE';
|
|
100
|
+
}
|
|
101
101
|
validate(_) {
|
|
102
102
|
return PhoneNumberValidator.validateControl(this._el.nativeElement, this.telType, false);
|
|
103
103
|
}
|
|
104
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PhoneNumberValidator, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
105
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: PhoneNumberValidator, selector: "[buiTelInput], input([type=tel])[ngModel], input([type=tel])[formControlName], input([type=tel])[formControl]", inputs: { telType: "telType" }, providers: [PHONE_VALIDATOR], ngImport: i0 }); }
|
|
104
106
|
}
|
|
105
|
-
|
|
106
|
-
PhoneNumberValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.6", type: PhoneNumberValidator, selector: "[buiTelInput], input([type=tel])[ngModel], input([type=tel])[formControlName], input([type=tel])[formControl]", inputs: { telType: "telType" }, providers: [PHONE_VALIDATOR], ngImport: i0 });
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: PhoneNumberValidator, decorators: [{
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PhoneNumberValidator, decorators: [{
|
|
108
108
|
type: Directive,
|
|
109
109
|
args: [{
|
|
110
110
|
selector: SELECTOR,
|
|
111
111
|
providers: [PHONE_VALIDATOR]
|
|
112
112
|
}]
|
|
113
|
-
}], ctorParameters:
|
|
113
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { telType: [{
|
|
114
114
|
type: Input
|
|
115
115
|
}] } });
|
|
116
116
|
|
|
@@ -132,6 +132,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImpor
|
|
|
132
132
|
* ```
|
|
133
133
|
*/
|
|
134
134
|
class PhoneNumberDirective {
|
|
135
|
+
/**
|
|
136
|
+
* @ignore
|
|
137
|
+
*/
|
|
138
|
+
static { this.POST_RENDER_INIT_DELAY = 20; }
|
|
139
|
+
/**
|
|
140
|
+
* @ignore
|
|
141
|
+
*/
|
|
142
|
+
static { this.BYPASS_SHADOW_DETECTION = false; }
|
|
135
143
|
constructor(_el, _ngModel, _formControlName, _formControlDirective, _locale, _zone, _matField) {
|
|
136
144
|
this._el = _el;
|
|
137
145
|
this._ngModel = _ngModel;
|
|
@@ -255,23 +263,15 @@ class PhoneNumberDirective {
|
|
|
255
263
|
}
|
|
256
264
|
}, 20);
|
|
257
265
|
}
|
|
266
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PhoneNumberDirective, deps: [{ token: i0.ElementRef }, { token: i1.NgModel, optional: true }, { token: i1.FormControlName, optional: true }, { token: i1.FormControlDirective, optional: true }, { token: LOCALE_ID }, { token: i0.NgZone }, { token: i2.MatFormField, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
267
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: PhoneNumberDirective, selector: "[buiTelInput], input([type=tel])[ngModel], input([type=tel])[formControlName], input([type=tel])[formControl]", inputs: { telType: "telType", telDropdown: "telDropdown" }, outputs: { telCountryChange: "telCountryChange" }, host: { listeners: { "input": "onInput()" } }, usesOnChanges: true, ngImport: i0 }); }
|
|
258
268
|
}
|
|
259
|
-
|
|
260
|
-
* @ignore
|
|
261
|
-
*/
|
|
262
|
-
PhoneNumberDirective.POST_RENDER_INIT_DELAY = 20;
|
|
263
|
-
/**
|
|
264
|
-
* @ignore
|
|
265
|
-
*/
|
|
266
|
-
PhoneNumberDirective.BYPASS_SHADOW_DETECTION = false;
|
|
267
|
-
PhoneNumberDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.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 });
|
|
268
|
-
PhoneNumberDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.6", type: PhoneNumberDirective, selector: "[buiTelInput], input([type=tel])[ngModel], input([type=tel])[formControlName], input([type=tel])[formControl]", inputs: { telType: "telType", telDropdown: "telDropdown" }, outputs: { telCountryChange: "telCountryChange" }, host: { listeners: { "input": "onInput()" } }, usesOnChanges: true, ngImport: i0 });
|
|
269
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: PhoneNumberDirective, decorators: [{
|
|
269
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PhoneNumberDirective, decorators: [{
|
|
270
270
|
type: Directive,
|
|
271
271
|
args: [{
|
|
272
272
|
selector: SELECTOR
|
|
273
273
|
}]
|
|
274
|
-
}], ctorParameters:
|
|
274
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.NgModel, decorators: [{
|
|
275
275
|
type: Optional
|
|
276
276
|
}] }, { type: i1.FormControlName, decorators: [{
|
|
277
277
|
type: Optional
|
|
@@ -282,7 +282,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImpor
|
|
|
282
282
|
args: [LOCALE_ID]
|
|
283
283
|
}] }, { type: i0.NgZone }, { type: i2.MatFormField, decorators: [{
|
|
284
284
|
type: Optional
|
|
285
|
-
}] }]
|
|
285
|
+
}] }], propDecorators: { telType: [{
|
|
286
286
|
type: Input
|
|
287
287
|
}], telDropdown: [{
|
|
288
288
|
type: Input
|
|
@@ -297,11 +297,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImpor
|
|
|
297
297
|
* @internal
|
|
298
298
|
*/
|
|
299
299
|
class PhoneModule {
|
|
300
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PhoneModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
301
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: PhoneModule, declarations: [PhoneNumberPipe, PhoneNumberDirective, PhoneNumberValidator], imports: [CommonModule], exports: [PhoneNumberDirective, PhoneNumberPipe, PhoneNumberValidator] }); }
|
|
302
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PhoneModule, imports: [CommonModule] }); }
|
|
300
303
|
}
|
|
301
|
-
|
|
302
|
-
PhoneModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.6", ngImport: i0, type: PhoneModule, declarations: [PhoneNumberPipe, PhoneNumberDirective, PhoneNumberValidator], imports: [CommonModule], exports: [PhoneNumberDirective, PhoneNumberPipe, PhoneNumberValidator] });
|
|
303
|
-
PhoneModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: PhoneModule, imports: [CommonModule] });
|
|
304
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: PhoneModule, decorators: [{
|
|
304
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PhoneModule, decorators: [{
|
|
305
305
|
type: NgModule,
|
|
306
306
|
args: [{
|
|
307
307
|
declarations: [PhoneNumberPipe, PhoneNumberDirective, PhoneNumberValidator],
|