@bravura/ui 1.21.6 → 2.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 +15 -0
- package/README.md +1 -0
- package/alert/alert-container.component.d.ts +1 -1
- package/alert/alert-message.component.d.ts +1 -1
- package/alert/{bravura-ui-alert.d.ts → index.d.ts} +0 -0
- package/behavior/await.directive.d.ts +1 -1
- package/behavior/{bravura-ui-behavior.d.ts → index.d.ts} +0 -0
- package/behavior/sizing-monitor.directive.d.ts +1 -1
- package/behavior/sizing.directive.d.ts +1 -1
- package/common/{bravura-ui-common.d.ts → index.d.ts} +0 -0
- package/currency-input/currency-input.directive.d.ts +1 -1
- package/currency-input/{bravura-ui-currency-input.d.ts → index.d.ts} +0 -0
- package/decimal-input/decimal-input.directive.d.ts +1 -1
- package/decimal-input/{bravura-ui-decimal-input.d.ts → index.d.ts} +0 -0
- package/discrete-input/discrete-input.component.d.ts +6 -5
- package/discrete-input/{bravura-ui-discrete-input.d.ts → index.d.ts} +0 -0
- package/esm2020/alert/alert-container.component.mjs +201 -0
- package/esm2020/alert/alert-message.component.mjs +92 -0
- package/esm2020/alert/alert.module.mjs +22 -0
- package/{esm2015/alert/bravura-ui-alert.js → esm2020/alert/bravura-ui-alert.mjs} +0 -0
- package/{esm2015/alert/public-api.js → esm2020/alert/public-api.mjs} +0 -0
- package/{esm2015/behavior/await.directive.js → esm2020/behavior/await.directive.mjs} +4 -4
- package/esm2020/behavior/behavior.module.mjs +25 -0
- package/{esm2015/behavior/bravura-ui-behavior.js → esm2020/behavior/bravura-ui-behavior.mjs} +0 -0
- package/{esm2015/behavior/public-api.js → esm2020/behavior/public-api.mjs} +0 -0
- package/{esm2015/behavior/sizing-monitor.directive.js → esm2020/behavior/sizing-monitor.directive.mjs} +4 -4
- package/{esm2015/behavior/sizing.directive.js → esm2020/behavior/sizing.directive.mjs} +4 -4
- package/{esm2015/bravura-ui.js → esm2020/bravura-ui.mjs} +0 -0
- package/{esm2015/common/bravura-ui-common.js → esm2020/common/bravura-ui-common.mjs} +0 -0
- package/{esm2015/common/common-utils.js → esm2020/common/common-utils.mjs} +0 -0
- package/esm2020/common/common.module.mjs +52 -0
- package/{esm2015/common/public-api.js → esm2020/common/public-api.mjs} +0 -0
- package/{esm2015/currency-input/bravura-ui-currency-input.js → esm2020/currency-input/bravura-ui-currency-input.mjs} +0 -0
- package/esm2020/currency-input/currency-input.directive.mjs +279 -0
- package/esm2020/currency-input/currency-input.module.mjs +19 -0
- package/{esm2015/currency-input/public-api.js → esm2020/currency-input/public-api.mjs} +0 -0
- package/{esm2015/decimal-input/bravura-ui-decimal-input.js → esm2020/decimal-input/bravura-ui-decimal-input.mjs} +0 -0
- package/{esm2015/decimal-input/decimal-input.directive.js → esm2020/decimal-input/decimal-input.directive.mjs} +4 -4
- package/esm2020/decimal-input/decimal-input.module.mjs +19 -0
- package/{esm2015/decimal-input/public-api.js → esm2020/decimal-input/public-api.mjs} +0 -0
- package/{esm2015/discrete-input/bravura-ui-discrete-input.js → esm2020/discrete-input/bravura-ui-discrete-input.mjs} +0 -0
- package/esm2020/discrete-input/discrete-input.component.mjs +326 -0
- package/esm2020/discrete-input/discrete-input.module.mjs +21 -0
- package/{esm2015/discrete-input/public-api.js → esm2020/discrete-input/public-api.mjs} +0 -0
- package/{esm2015/file-upload/bravura-ui-file-upload.js → esm2020/file-upload/bravura-ui-file-upload.mjs} +0 -0
- package/esm2020/file-upload/file-upload.component.mjs +356 -0
- package/{esm2015/file-upload/file-upload.module.js → esm2020/file-upload/file-upload.module.mjs} +11 -13
- package/{esm2015/file-upload/file-upload.service.js → esm2020/file-upload/file-upload.service.mjs} +4 -4
- package/{esm2015/file-upload/public-api.js → esm2020/file-upload/public-api.mjs} +0 -0
- package/{esm2015/form-field/bravura-ui-form-field.js → esm2020/form-field/bravura-ui-form-field.mjs} +0 -0
- package/esm2020/form-field/form-field.component.mjs +96 -0
- package/esm2020/form-field/form-field.module.mjs +20 -0
- package/{esm2015/form-field/public-api.js → esm2020/form-field/public-api.mjs} +0 -0
- package/{esm2015/icon-font/bravura-ui-icon-font.js → esm2020/icon-font/bravura-ui-icon-font.mjs} +0 -0
- package/esm2020/icon-font/icon-font.module.mjs +22 -0
- package/{esm2015/icon-font/icon.directive.js → esm2020/icon-font/icon.directive.mjs} +4 -4
- package/{esm2015/icon-font/public-api.js → esm2020/icon-font/public-api.mjs} +0 -0
- package/{esm2015/icon-font/utilities.js → esm2020/icon-font/utilities.mjs} +0 -0
- package/{esm2015/phone-number/bravura-ui-phone-number.js → esm2020/phone-number/bravura-ui-phone-number.mjs} +0 -0
- package/esm2020/phone-number/phone-number.directive.mjs +187 -0
- package/esm2020/phone-number/phone-number.module.mjs +24 -0
- package/{esm2015/phone-number/phone-number.pipe.js → esm2020/phone-number/phone-number.pipe.mjs} +4 -4
- package/{esm2015/phone-number/phone-number.validator.js → esm2020/phone-number/phone-number.validator.mjs} +4 -4
- package/{esm2015/phone-number/public-api.js → esm2020/phone-number/public-api.mjs} +0 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/{esm2015/radio-panel/bravura-ui-radio-panel.js → esm2020/radio-panel/bravura-ui-radio-panel.mjs} +0 -0
- package/{esm2015/radio-panel/public-api.js → esm2020/radio-panel/public-api.mjs} +0 -0
- package/esm2020/radio-panel/radio-panel-item.component.mjs +97 -0
- package/esm2020/radio-panel/radio-panel.component.mjs +89 -0
- package/esm2020/radio-panel/radio-panel.module.mjs +25 -0
- package/{esm2015/selection-panel/bravura-ui-selection-panel.js → esm2020/selection-panel/bravura-ui-selection-panel.mjs} +0 -0
- package/{esm2015/selection-panel/public-api.js → esm2020/selection-panel/public-api.mjs} +0 -0
- package/esm2020/selection-panel/selection-panel-item.component.mjs +166 -0
- package/esm2020/selection-panel/selection-panel.directive.mjs +119 -0
- package/esm2020/selection-panel/selection-panel.module.mjs +23 -0
- package/{esm2015/skeletons/bravura-ui-skeletons.js → esm2020/skeletons/bravura-ui-skeletons.mjs} +0 -0
- package/{esm2015/skeletons/public-api.js → esm2020/skeletons/public-api.mjs} +0 -0
- package/esm2020/skeletons/skeleton-loader-presets.directive.mjs +83 -0
- package/{esm2015/skeletons/skeleton-loader.component.js → esm2020/skeletons/skeleton-loader.component.mjs} +4 -4
- package/esm2020/skeletons/skeletons.module.mjs +35 -0
- package/{esm2015/stepper/bravura-ui-stepper.js → esm2020/stepper/bravura-ui-stepper.mjs} +0 -0
- package/{esm2015/stepper/public-api.js → esm2020/stepper/public-api.mjs} +0 -0
- package/esm2020/stepper/stepper-animation.mjs +23 -0
- package/esm2020/stepper/stepper.component.mjs +166 -0
- package/{esm2015/stepper/stepper.module.js → esm2020/stepper/stepper.module.mjs} +13 -15
- package/{esm2015/tooltip/bravura-ui-tooltip.js → esm2020/tooltip/bravura-ui-tooltip.mjs} +0 -0
- package/{esm2015/tooltip/public-api.js → esm2020/tooltip/public-api.mjs} +0 -0
- package/esm2020/tooltip/tooltip.component.mjs +51 -0
- package/{esm2015/tooltip/tooltip.directive.js → esm2020/tooltip/tooltip.directive.mjs} +4 -4
- package/esm2020/tooltip/tooltip.module.mjs +25 -0
- package/fesm2015/bravura-ui-alert.mjs +324 -0
- package/fesm2015/bravura-ui-alert.mjs.map +1 -0
- package/fesm2015/bravura-ui-behavior.mjs +407 -0
- package/fesm2015/bravura-ui-behavior.mjs.map +1 -0
- package/fesm2015/bravura-ui-common.mjs +74 -0
- package/fesm2015/bravura-ui-common.mjs.map +1 -0
- package/fesm2015/bravura-ui-currency-input.mjs +303 -0
- package/fesm2015/bravura-ui-currency-input.mjs.map +1 -0
- package/fesm2015/bravura-ui-decimal-input.mjs +147 -0
- package/fesm2015/bravura-ui-decimal-input.mjs.map +1 -0
- package/fesm2015/bravura-ui-discrete-input.mjs +354 -0
- package/fesm2015/bravura-ui-discrete-input.mjs.map +1 -0
- package/fesm2015/bravura-ui-file-upload.mjs +434 -0
- package/fesm2015/bravura-ui-file-upload.mjs.map +1 -0
- package/fesm2015/{bravura-ui-form-field.js → bravura-ui-form-field.mjs} +12 -23
- package/fesm2015/bravura-ui-form-field.mjs.map +1 -0
- package/fesm2015/{bravura-ui-icon-font.js → bravura-ui-icon-font.mjs} +8 -8
- package/fesm2015/bravura-ui-icon-font.mjs.map +1 -0
- package/fesm2015/{bravura-ui-phone-number.js → bravura-ui-phone-number.mjs} +34 -30
- package/fesm2015/bravura-ui-phone-number.mjs.map +1 -0
- package/fesm2015/bravura-ui-radio-panel.mjs +212 -0
- package/fesm2015/bravura-ui-radio-panel.mjs.map +1 -0
- package/fesm2015/{bravura-ui-selection-panel.js → bravura-ui-selection-panel.mjs} +24 -28
- package/fesm2015/bravura-ui-selection-panel.mjs.map +1 -0
- package/fesm2015/bravura-ui-skeletons.mjs +195 -0
- package/fesm2015/bravura-ui-skeletons.mjs.map +1 -0
- package/fesm2015/bravura-ui-stepper.mjs +243 -0
- package/fesm2015/bravura-ui-stepper.mjs.map +1 -0
- package/fesm2015/bravura-ui-tooltip.mjs +195 -0
- package/fesm2015/bravura-ui-tooltip.mjs.map +1 -0
- package/fesm2015/{bravura-ui.js → bravura-ui.mjs} +1 -1
- package/fesm2015/bravura-ui.mjs.map +1 -0
- package/fesm2020/bravura-ui-alert.mjs +312 -0
- package/fesm2020/bravura-ui-alert.mjs.map +1 -0
- package/{fesm2015/bravura-ui-behavior.js → fesm2020/bravura-ui-behavior.mjs} +14 -14
- package/fesm2020/bravura-ui-behavior.mjs.map +1 -0
- package/{fesm2015/bravura-ui-common.js → fesm2020/bravura-ui-common.mjs} +7 -7
- package/fesm2020/bravura-ui-common.mjs.map +1 -0
- package/{fesm2015/bravura-ui-currency-input.js → fesm2020/bravura-ui-currency-input.mjs} +9 -10
- package/fesm2020/bravura-ui-currency-input.mjs.map +1 -0
- package/{fesm2015/bravura-ui-decimal-input.js → fesm2020/bravura-ui-decimal-input.mjs} +8 -8
- package/fesm2020/bravura-ui-decimal-input.mjs.map +1 -0
- package/{fesm2015/bravura-ui-discrete-input.js → fesm2020/bravura-ui-discrete-input.mjs} +18 -26
- package/fesm2020/bravura-ui-discrete-input.mjs.map +1 -0
- package/fesm2020/bravura-ui-file-upload.mjs +430 -0
- package/fesm2020/bravura-ui-file-upload.mjs.map +1 -0
- package/fesm2020/bravura-ui-form-field.mjs +119 -0
- package/fesm2020/bravura-ui-form-field.mjs.map +1 -0
- package/fesm2020/bravura-ui-icon-font.mjs +178 -0
- package/fesm2020/bravura-ui-icon-font.mjs.map +1 -0
- package/fesm2020/bravura-ui-phone-number.mjs +317 -0
- package/fesm2020/bravura-ui-phone-number.mjs.map +1 -0
- package/fesm2020/bravura-ui-radio-panel.mjs +209 -0
- package/fesm2020/bravura-ui-radio-panel.mjs.map +1 -0
- package/fesm2020/bravura-ui-selection-panel.mjs +306 -0
- package/fesm2020/bravura-ui-selection-panel.mjs.map +1 -0
- package/{fesm2015/bravura-ui-skeletons.js → fesm2020/bravura-ui-skeletons.mjs} +13 -13
- package/fesm2020/bravura-ui-skeletons.mjs.map +1 -0
- package/{fesm2015/bravura-ui-stepper.js → fesm2020/bravura-ui-stepper.mjs} +27 -44
- package/fesm2020/bravura-ui-stepper.mjs.map +1 -0
- package/{fesm2015/bravura-ui-tooltip.js → fesm2020/bravura-ui-tooltip.mjs} +13 -22
- package/fesm2020/bravura-ui-tooltip.mjs.map +1 -0
- package/fesm2020/bravura-ui.mjs +8 -0
- package/fesm2020/bravura-ui.mjs.map +1 -0
- package/file-upload/file-upload.component.d.ts +1 -1
- package/file-upload/{bravura-ui-file-upload.d.ts → index.d.ts} +0 -0
- package/form-field/form-field.component.d.ts +1 -1
- package/form-field/{bravura-ui-form-field.d.ts → index.d.ts} +0 -0
- package/icon-font/icon.directive.d.ts +1 -1
- package/icon-font/{bravura-ui-icon-font.d.ts → index.d.ts} +0 -0
- package/{bravura-ui.d.ts → index.d.ts} +0 -0
- package/package.json +149 -14
- package/phone-number/{bravura-ui-phone-number.d.ts → index.d.ts} +0 -0
- package/phone-number/phone-number.directive.d.ts +1 -1
- package/phone-number/phone-number.pipe.d.ts +1 -1
- package/phone-number/phone-number.validator.d.ts +1 -1
- package/radio-panel/{bravura-ui-radio-panel.d.ts → index.d.ts} +0 -0
- package/radio-panel/radio-panel-item.component.d.ts +1 -1
- package/radio-panel/radio-panel.component.d.ts +1 -1
- package/selection-panel/{bravura-ui-selection-panel.d.ts → index.d.ts} +0 -0
- package/selection-panel/selection-panel-item.component.d.ts +1 -1
- package/selection-panel/selection-panel.directive.d.ts +1 -1
- package/skeletons/{bravura-ui-skeletons.d.ts → index.d.ts} +0 -0
- package/skeletons/skeleton-loader-presets.directive.d.ts +1 -1
- package/skeletons/skeleton-loader.component.d.ts +1 -1
- package/stepper/{bravura-ui-stepper.d.ts → index.d.ts} +0 -0
- package/stepper/stepper.component.d.ts +1 -1
- package/theme/_ui-theme.scss +1 -1
- package/tooltip/{bravura-ui-tooltip.d.ts → index.d.ts} +0 -0
- package/tooltip/tooltip.component.d.ts +1 -1
- package/tooltip/tooltip.directive.d.ts +1 -1
- package/alert/package.json +0 -10
- package/behavior/package.json +0 -10
- package/bundles/bravura-ui-alert.umd.js +0 -745
- package/bundles/bravura-ui-alert.umd.js.map +0 -1
- package/bundles/bravura-ui-behavior.umd.js +0 -788
- package/bundles/bravura-ui-behavior.umd.js.map +0 -1
- package/bundles/bravura-ui-common.umd.js +0 -103
- package/bundles/bravura-ui-common.umd.js.map +0 -1
- package/bundles/bravura-ui-currency-input.umd.js +0 -335
- package/bundles/bravura-ui-currency-input.umd.js.map +0 -1
- package/bundles/bravura-ui-decimal-input.umd.js +0 -176
- package/bundles/bravura-ui-decimal-input.umd.js.map +0 -1
- package/bundles/bravura-ui-discrete-input.umd.js +0 -747
- package/bundles/bravura-ui-discrete-input.umd.js.map +0 -1
- package/bundles/bravura-ui-file-upload.umd.js +0 -845
- package/bundles/bravura-ui-file-upload.umd.js.map +0 -1
- package/bundles/bravura-ui-form-field.umd.js +0 -494
- package/bundles/bravura-ui-form-field.umd.js.map +0 -1
- package/bundles/bravura-ui-icon-font.umd.js +0 -539
- package/bundles/bravura-ui-icon-font.umd.js.map +0 -1
- package/bundles/bravura-ui-phone-number.umd.js +0 -690
- package/bundles/bravura-ui-phone-number.umd.js.map +0 -1
- package/bundles/bravura-ui-radio-panel.umd.js +0 -595
- package/bundles/bravura-ui-radio-panel.umd.js.map +0 -1
- package/bundles/bravura-ui-selection-panel.umd.js +0 -699
- package/bundles/bravura-ui-selection-panel.umd.js.map +0 -1
- package/bundles/bravura-ui-skeletons.umd.js +0 -525
- package/bundles/bravura-ui-skeletons.umd.js.map +0 -1
- package/bundles/bravura-ui-stepper.umd.js +0 -613
- package/bundles/bravura-ui-stepper.umd.js.map +0 -1
- package/bundles/bravura-ui-tooltip.umd.js +0 -586
- package/bundles/bravura-ui-tooltip.umd.js.map +0 -1
- package/bundles/bravura-ui.umd.js +0 -18
- package/bundles/bravura-ui.umd.js.map +0 -1
- package/common/package.json +0 -10
- package/currency-input/package.json +0 -10
- package/decimal-input/package.json +0 -10
- package/discrete-input/package.json +0 -10
- package/esm2015/alert/alert-container.component.js +0 -220
- package/esm2015/alert/alert-message.component.js +0 -98
- package/esm2015/alert/alert.module.js +0 -22
- package/esm2015/behavior/behavior.module.js +0 -25
- package/esm2015/common/common.module.js +0 -52
- package/esm2015/currency-input/currency-input.directive.js +0 -280
- package/esm2015/currency-input/currency-input.module.js +0 -19
- package/esm2015/decimal-input/decimal-input.module.js +0 -19
- package/esm2015/discrete-input/discrete-input.component.js +0 -334
- package/esm2015/discrete-input/discrete-input.module.js +0 -21
- package/esm2015/file-upload/file-upload.component.js +0 -367
- package/esm2015/form-field/form-field.component.js +0 -107
- package/esm2015/form-field/form-field.module.js +0 -20
- package/esm2015/icon-font/icon-font.module.js +0 -22
- package/esm2015/phone-number/phone-number.directive.js +0 -192
- package/esm2015/phone-number/phone-number.module.js +0 -24
- package/esm2015/radio-panel/radio-panel-item.component.js +0 -109
- package/esm2015/radio-panel/radio-panel.component.js +0 -98
- package/esm2015/radio-panel/radio-panel.module.js +0 -25
- package/esm2015/selection-panel/selection-panel-item.component.js +0 -174
- package/esm2015/selection-panel/selection-panel.directive.js +0 -120
- package/esm2015/selection-panel/selection-panel.module.js +0 -23
- package/esm2015/skeletons/skeleton-loader-presets.directive.js +0 -83
- package/esm2015/skeletons/skeletons.module.js +0 -35
- package/esm2015/stepper/stepper-animation.js +0 -23
- package/esm2015/stepper/stepper.component.js +0 -181
- package/esm2015/tooltip/tooltip.component.js +0 -59
- package/esm2015/tooltip/tooltip.module.js +0 -26
- package/fesm2015/bravura-ui-alert.js +0 -337
- package/fesm2015/bravura-ui-alert.js.map +0 -1
- package/fesm2015/bravura-ui-behavior.js.map +0 -1
- package/fesm2015/bravura-ui-common.js.map +0 -1
- package/fesm2015/bravura-ui-currency-input.js.map +0 -1
- package/fesm2015/bravura-ui-decimal-input.js.map +0 -1
- package/fesm2015/bravura-ui-discrete-input.js.map +0 -1
- package/fesm2015/bravura-ui-file-upload.js +0 -443
- package/fesm2015/bravura-ui-file-upload.js.map +0 -1
- package/fesm2015/bravura-ui-form-field.js.map +0 -1
- package/fesm2015/bravura-ui-icon-font.js.map +0 -1
- package/fesm2015/bravura-ui-phone-number.js.map +0 -1
- package/fesm2015/bravura-ui-radio-panel.js +0 -230
- package/fesm2015/bravura-ui-radio-panel.js.map +0 -1
- package/fesm2015/bravura-ui-selection-panel.js.map +0 -1
- package/fesm2015/bravura-ui-skeletons.js.map +0 -1
- package/fesm2015/bravura-ui-stepper.js.map +0 -1
- package/fesm2015/bravura-ui-tooltip.js.map +0 -1
- package/fesm2015/bravura-ui.js.map +0 -1
- package/file-upload/package.json +0 -10
- package/form-field/package.json +0 -10
- package/icon-font/package.json +0 -10
- package/phone-number/package.json +0 -10
- package/radio-panel/package.json +0 -10
- package/selection-panel/package.json +0 -10
- package/skeletons/package.json +0 -10
- package/stepper/package.json +0 -10
- package/tooltip/package.json +0 -10
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ElementRef, Component, Optional, Inject, Self, Input, ViewChildren, NgModule } from '@angular/core';
|
|
3
|
+
import * as i4 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
6
|
+
import * as i2 from '@angular/forms';
|
|
7
|
+
import { UntypedFormArray, UntypedFormGroup, UntypedFormControl, Validators, ReactiveFormsModule } from '@angular/forms';
|
|
8
|
+
import * as i3 from '@angular/material/core';
|
|
9
|
+
import { mixinErrorState } from '@angular/material/core';
|
|
10
|
+
import * as i5 from '@angular/material/form-field';
|
|
11
|
+
import { MAT_FORM_FIELD, MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';
|
|
12
|
+
import { Subject } from 'rxjs';
|
|
13
|
+
import * as i1 from '@angular/cdk/a11y';
|
|
14
|
+
import { A11yModule } from '@angular/cdk/a11y';
|
|
15
|
+
|
|
16
|
+
// Boilerplate for applying mixins to form field control for error state checking.
|
|
17
|
+
/** @ignore */
|
|
18
|
+
const _DiscreteInputBase = mixinErrorState(class {
|
|
19
|
+
constructor(
|
|
20
|
+
/** @ignore */ _defaultErrorStateMatcher,
|
|
21
|
+
/** @ignore */ _parentForm,
|
|
22
|
+
/** @ignore */ _parentFormGroup,
|
|
23
|
+
/** @ignore */ ngControl) {
|
|
24
|
+
this._defaultErrorStateMatcher = _defaultErrorStateMatcher;
|
|
25
|
+
this._parentForm = _parentForm;
|
|
26
|
+
this._parentFormGroup = _parentFormGroup;
|
|
27
|
+
this.ngControl = ngControl;
|
|
28
|
+
this.stateChanges = new Subject();
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* Custom `MatFormFieldControl` with an individual input box for each character, suitable for fixed-length fields,
|
|
33
|
+
* such as secondary PIN inputs, TFNs, or BSB code etc.
|
|
34
|
+
*
|
|
35
|
+
* Accessibility features are not yet fully implemented.
|
|
36
|
+
*
|
|
37
|
+
* Example:
|
|
38
|
+
*
|
|
39
|
+
* ```html
|
|
40
|
+
* <mat-form-field>
|
|
41
|
+
* <bui-discrete-input></bui-discrete-input>
|
|
42
|
+
* </mat-form-field>
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
46
|
+
class DiscreteInputComponent extends _DiscreteInputBase {
|
|
47
|
+
constructor(_focusMonitor, _elementRef, formField, control, _parentForm, _parentFormGroup, _defaultErrorStateMatcher) {
|
|
48
|
+
super(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, control);
|
|
49
|
+
this._focusMonitor = _focusMonitor;
|
|
50
|
+
this._elementRef = _elementRef;
|
|
51
|
+
/** The type of input boxes */
|
|
52
|
+
this.type = 'text';
|
|
53
|
+
/** Input boxes are separated in groups. This specifies the characters displayed between two groups. */
|
|
54
|
+
this.separator = ' ';
|
|
55
|
+
/** @ignore */ this.id = `bui-discrete-input-${DiscreteInputComponent.nextId++}`;
|
|
56
|
+
this._sizeSpec = [];
|
|
57
|
+
this._required = false;
|
|
58
|
+
this._disabled = false;
|
|
59
|
+
this._separatorPos = [];
|
|
60
|
+
/** @ignore */ this.onChange = (_) => { };
|
|
61
|
+
/** @ignore */ this.onTouched = () => { };
|
|
62
|
+
/** @ignore */ this.errorState = false;
|
|
63
|
+
this.parts = new UntypedFormArray([]);
|
|
64
|
+
this.group = new UntypedFormGroup({ parts: this.parts });
|
|
65
|
+
this.sizeSpec = [2, 2, 2];
|
|
66
|
+
this._formField = formField;
|
|
67
|
+
this.focused = false;
|
|
68
|
+
this.stateChanges = new Subject();
|
|
69
|
+
this.ngControl = control;
|
|
70
|
+
if (this.ngControl != null) {
|
|
71
|
+
this.ngControl.valueAccessor = this;
|
|
72
|
+
}
|
|
73
|
+
this._focusMonitor.monitor(this._elementRef, true).subscribe(origin => {
|
|
74
|
+
if (this.focused && !origin) {
|
|
75
|
+
this.onTouched();
|
|
76
|
+
}
|
|
77
|
+
this.focused = !!origin;
|
|
78
|
+
this.stateChanges.next();
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/** @ignore */
|
|
82
|
+
get shouldLabelFloat() {
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
/** @ignore */
|
|
86
|
+
get empty() {
|
|
87
|
+
return this.parts.controls.every(c => !c.value);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Defines the length and grouping of the input.
|
|
91
|
+
* @default [2, 2, 2]
|
|
92
|
+
*/
|
|
93
|
+
get sizeSpec() {
|
|
94
|
+
return this._sizeSpec;
|
|
95
|
+
}
|
|
96
|
+
set sizeSpec(spec) {
|
|
97
|
+
let size = 0;
|
|
98
|
+
this._separatorPos = [];
|
|
99
|
+
spec.forEach((n, i) => {
|
|
100
|
+
size += n;
|
|
101
|
+
if (i < spec.length - 1) {
|
|
102
|
+
this._separatorPos.push(size);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
if (size !== this.parts.length) {
|
|
106
|
+
const v = this.value;
|
|
107
|
+
this.parts.clear({ emitEvent: false });
|
|
108
|
+
for (let i = 0; i < size; i++) {
|
|
109
|
+
this.parts.setControl(i, new UntypedFormControl(null, [Validators.required, Validators.minLength(1), Validators.maxLength(1)]));
|
|
110
|
+
}
|
|
111
|
+
this.value = v;
|
|
112
|
+
this._sizeSpec = spec;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
/** The placeholder for this control. */
|
|
116
|
+
get placeholder() {
|
|
117
|
+
return this._placeholder;
|
|
118
|
+
}
|
|
119
|
+
set placeholder(value) {
|
|
120
|
+
this._placeholder = value;
|
|
121
|
+
this.stateChanges.next();
|
|
122
|
+
}
|
|
123
|
+
/** Whether the control is required. */
|
|
124
|
+
get required() {
|
|
125
|
+
return this._required;
|
|
126
|
+
}
|
|
127
|
+
set required(value) {
|
|
128
|
+
this._required = coerceBooleanProperty(value);
|
|
129
|
+
this.stateChanges.next();
|
|
130
|
+
}
|
|
131
|
+
/** Whether the control is disabled. */
|
|
132
|
+
get disabled() {
|
|
133
|
+
return this._disabled;
|
|
134
|
+
}
|
|
135
|
+
set disabled(value) {
|
|
136
|
+
this._disabled = coerceBooleanProperty(value);
|
|
137
|
+
this._disabled ? this.parts.disable() : this.parts.enable();
|
|
138
|
+
this.stateChanges.next();
|
|
139
|
+
}
|
|
140
|
+
/** The value of the control. */
|
|
141
|
+
get value() {
|
|
142
|
+
return this.parts.controls
|
|
143
|
+
.map(c => c.value)
|
|
144
|
+
.filter(c => c)
|
|
145
|
+
.join('');
|
|
146
|
+
}
|
|
147
|
+
set value(v) {
|
|
148
|
+
var _a;
|
|
149
|
+
v = v || '';
|
|
150
|
+
for (let i = 0; i < this.parts.controls.length; i++) {
|
|
151
|
+
(_a = this.parts.controls[i]) === null || _a === void 0 ? void 0 : _a.setValue(v[i]);
|
|
152
|
+
}
|
|
153
|
+
this.stateChanges.next();
|
|
154
|
+
}
|
|
155
|
+
/** @ignore */
|
|
156
|
+
get _colorSuffix() {
|
|
157
|
+
var _a;
|
|
158
|
+
return this.errorState ? 'warn' : ((_a = this._formField) === null || _a === void 0 ? void 0 : _a.color) || 'primary';
|
|
159
|
+
}
|
|
160
|
+
/** @ignore */
|
|
161
|
+
ngOnDestroy() {
|
|
162
|
+
this.stateChanges.complete();
|
|
163
|
+
this._focusMonitor.stopMonitoring(this._elementRef);
|
|
164
|
+
}
|
|
165
|
+
/** @ignore */
|
|
166
|
+
setDescribedByIds(ids) {
|
|
167
|
+
const controlElement = this._elementRef.nativeElement.querySelector('.bui-discrete-input-container');
|
|
168
|
+
controlElement.setAttribute('aria-describedby', ids.join(' '));
|
|
169
|
+
}
|
|
170
|
+
/** @ignore */
|
|
171
|
+
onContainerClick() {
|
|
172
|
+
const l = this.parts.controls.length;
|
|
173
|
+
for (let i = 0; i < l; i++) {
|
|
174
|
+
if (this.parts.controls[i].invalid || i === l - 1) {
|
|
175
|
+
this._focusMonitor.focusVia(this.inputParts.get(i), 'program');
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
/** @ignore */
|
|
181
|
+
writeValue(v) {
|
|
182
|
+
this.value = v;
|
|
183
|
+
}
|
|
184
|
+
/** @ignore */
|
|
185
|
+
registerOnChange(fn) {
|
|
186
|
+
this.onChange = fn;
|
|
187
|
+
}
|
|
188
|
+
/** @ignore */
|
|
189
|
+
registerOnTouched(fn) {
|
|
190
|
+
this.onTouched = fn;
|
|
191
|
+
}
|
|
192
|
+
/** @ignore */
|
|
193
|
+
setDisabledState(isDisabled) {
|
|
194
|
+
this.disabled = isDisabled;
|
|
195
|
+
}
|
|
196
|
+
/** @ignore */
|
|
197
|
+
_handleInput(control, index) {
|
|
198
|
+
let v = control.value && control.value[0];
|
|
199
|
+
control.setValue(v);
|
|
200
|
+
const nextElement = this.inputParts.get(index + 1);
|
|
201
|
+
if (!control.errors && nextElement) {
|
|
202
|
+
this._focusPart(nextElement);
|
|
203
|
+
}
|
|
204
|
+
this.onChange(this.value);
|
|
205
|
+
}
|
|
206
|
+
/** @ignore */
|
|
207
|
+
_handleBeforeInput(index, event) {
|
|
208
|
+
const v = event.data;
|
|
209
|
+
if (this.accept && v && !new RegExp(`[${this.accept}]`).test(v)) {
|
|
210
|
+
event.preventDefault();
|
|
211
|
+
event.stopPropagation();
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
const inp = this.inputParts.get(index).nativeElement;
|
|
215
|
+
if (v && inp.value) {
|
|
216
|
+
inp.value = '';
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
/** @ignore */
|
|
220
|
+
_focusPart(elemRef) {
|
|
221
|
+
this._focusMonitor.focusVia(elemRef, 'program');
|
|
222
|
+
}
|
|
223
|
+
/** @ignore */
|
|
224
|
+
_consumeKey(event) {
|
|
225
|
+
event.stopPropagation();
|
|
226
|
+
event.preventDefault();
|
|
227
|
+
}
|
|
228
|
+
/** @ignore */
|
|
229
|
+
_leftArrow(index, event) {
|
|
230
|
+
this._consumeKey(event);
|
|
231
|
+
const prevElement = this.inputParts.get(index - 1);
|
|
232
|
+
if (prevElement) {
|
|
233
|
+
this._focusPart(prevElement);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
/** @ignore */
|
|
237
|
+
_rightArrow(index, event) {
|
|
238
|
+
this._consumeKey(event);
|
|
239
|
+
const nextElement = this.inputParts.get(index + 1);
|
|
240
|
+
if (nextElement) {
|
|
241
|
+
this._focusPart(nextElement);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
/** @ignore */
|
|
245
|
+
_handleBackspace(control, index) {
|
|
246
|
+
const prevElement = index && this.inputParts.get(index - 1);
|
|
247
|
+
if (!control.value && prevElement) {
|
|
248
|
+
this._focusMonitor.focusVia(prevElement, 'program');
|
|
249
|
+
}
|
|
250
|
+
else if (control.value) {
|
|
251
|
+
control.setValue('');
|
|
252
|
+
this.onChange(this.value);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
/** @ignore */
|
|
256
|
+
_onPaste(event) {
|
|
257
|
+
var _a;
|
|
258
|
+
let text = (_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text');
|
|
259
|
+
if (text) {
|
|
260
|
+
if (this.accept) {
|
|
261
|
+
text = text.replace(new RegExp(`[^${this.accept}]`, 'gi'), '');
|
|
262
|
+
}
|
|
263
|
+
this.value = text;
|
|
264
|
+
this.onChange(this.value);
|
|
265
|
+
}
|
|
266
|
+
event.preventDefault();
|
|
267
|
+
this.onContainerClick();
|
|
268
|
+
}
|
|
269
|
+
/** @ignore */
|
|
270
|
+
_separatorRequired(index) {
|
|
271
|
+
return this._separatorPos.includes(index + 1);
|
|
272
|
+
}
|
|
273
|
+
/** @ignore */
|
|
274
|
+
_placeholderAt(index) {
|
|
275
|
+
return this._placeholder && this._placeholder[index];
|
|
276
|
+
}
|
|
277
|
+
/** @ignore */
|
|
278
|
+
ngDoCheck() {
|
|
279
|
+
if (this.ngControl) {
|
|
280
|
+
// We need to re-evaluate this on every change detection cycle, because there are some
|
|
281
|
+
// error triggers that we can't subscribe to (e.g. parent form submissions). This means
|
|
282
|
+
// that whatever logic is in here has to be super lean or we risk destroying the performance.
|
|
283
|
+
this.updateErrorState();
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
/** @ignore */
|
|
288
|
+
DiscreteInputComponent.nextId = 0;
|
|
289
|
+
DiscreteInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: DiscreteInputComponent, deps: [{ token: i1.FocusMonitor }, { token: i0.ElementRef }, { token: MAT_FORM_FIELD, optional: true }, { token: i2.NgControl, optional: true, self: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: i3.ErrorStateMatcher }], target: i0.ɵɵFactoryTarget.Component });
|
|
290
|
+
DiscreteInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: DiscreteInputComponent, selector: "bui-discrete-input", inputs: { type: "type", separator: "separator", accept: "accept", userAriaDescribedBy: ["aria-describedby", "userAriaDescribedBy"], sizeSpec: "sizeSpec", placeholder: "placeholder", required: "required", disabled: "disabled", value: "value" }, host: { classAttribute: "bui-discrete-input bui-host" }, providers: [{ provide: MatFormFieldControl, useExisting: DiscreteInputComponent }], viewQueries: [{ propertyName: "inputParts", predicate: ["part"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div\n\trole=\"group\"\n\tclass=\"bui-discrete-input-container\"\n\t[formGroup]=\"group\"\n\t[attr.aria-labelledby]=\"_formField?.getLabelId()\"\n>\n\t<ng-container [formArrayName]=\"'parts'\">\n\t\t<ng-template ngFor [ngForOf]=\"parts.controls\" let-p let-i=\"index\">\n\t\t\t<input\n\t\t\t\tclass=\"bui-discrete-input-element bui-outline-{{ _colorSuffix }}\"\n\t\t\t\t[formControlName]=\"i\"\n\t\t\t\tsize=\"1\"\n\t\t\t\tmaxLength=\"1\"\n\t\t\t\t[attr.aria-label]=\"'character ' + (i + 1)\"\n\t\t\t\t(input)=\"_handleInput(p, i)\"\n\t\t\t\t(beforeinput)=\"_handleBeforeInput(i, $event)\"\n\t\t\t\t(keydown.backspace)=\"_handleBackspace(p, i)\"\n\t\t\t\t(keydown.arrowup)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowdown)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowleft)=\"_leftArrow(i, $event)\"\n\t\t\t\t(keydown.arrowright)=\"_rightArrow(i, $event)\"\n\t\t\t\t[attr.placeholder]=\"_placeholderAt(i)\"\n\t\t\t\t#part\n\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t(paste)=\"_onPaste($event)\"\n\t\t\t\t[type]=\"['text', 'number', 'password'].includes(type) ? type : 'text'\"\n\t\t\t\tautocapitalize=\"none\"\n\t\t\t/>\n\t\t\t<span *ngIf=\"_separatorRequired(i)\" class=\"bui-discrete-input-spacer\">{{ separator }}</span>\n\t\t</ng-template>\n\t</ng-container>\n</div>\n", styles: [".bui-discrete-input-container{display:flex;align-items:center}.bui-discrete-input-element{border:1px solid rgba(128,128,128,.4);border-radius:3px;background:none;padding:0;text-align:center;width:1.5em;height:1.5em;font-size:inherit;color:currentColor;caret-color:auto}.bui-discrete-input-element:not(:last-child){margin-right:.25em}.bui-discrete-input-element:focus-visible{outline-style:solid;outline-width:2px;outline-offset:-1px}.bui-discrete-input-element[type=number]::-webkit-inner-spin-button,.bui-discrete-input-element[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.bui-discrete-input-element[type=number]{-moz-appearance:textfield}.bui-discrete-input-spacer{margin-right:.25em;vertical-align:middle}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }] });
|
|
291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: DiscreteInputComponent, decorators: [{
|
|
292
|
+
type: Component,
|
|
293
|
+
args: [{ selector: 'bui-discrete-input', providers: [{ provide: MatFormFieldControl, useExisting: DiscreteInputComponent }], host: {
|
|
294
|
+
class: 'bui-discrete-input bui-host'
|
|
295
|
+
}, template: "<div\n\trole=\"group\"\n\tclass=\"bui-discrete-input-container\"\n\t[formGroup]=\"group\"\n\t[attr.aria-labelledby]=\"_formField?.getLabelId()\"\n>\n\t<ng-container [formArrayName]=\"'parts'\">\n\t\t<ng-template ngFor [ngForOf]=\"parts.controls\" let-p let-i=\"index\">\n\t\t\t<input\n\t\t\t\tclass=\"bui-discrete-input-element bui-outline-{{ _colorSuffix }}\"\n\t\t\t\t[formControlName]=\"i\"\n\t\t\t\tsize=\"1\"\n\t\t\t\tmaxLength=\"1\"\n\t\t\t\t[attr.aria-label]=\"'character ' + (i + 1)\"\n\t\t\t\t(input)=\"_handleInput(p, i)\"\n\t\t\t\t(beforeinput)=\"_handleBeforeInput(i, $event)\"\n\t\t\t\t(keydown.backspace)=\"_handleBackspace(p, i)\"\n\t\t\t\t(keydown.arrowup)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowdown)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowleft)=\"_leftArrow(i, $event)\"\n\t\t\t\t(keydown.arrowright)=\"_rightArrow(i, $event)\"\n\t\t\t\t[attr.placeholder]=\"_placeholderAt(i)\"\n\t\t\t\t#part\n\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t(paste)=\"_onPaste($event)\"\n\t\t\t\t[type]=\"['text', 'number', 'password'].includes(type) ? type : 'text'\"\n\t\t\t\tautocapitalize=\"none\"\n\t\t\t/>\n\t\t\t<span *ngIf=\"_separatorRequired(i)\" class=\"bui-discrete-input-spacer\">{{ separator }}</span>\n\t\t</ng-template>\n\t</ng-container>\n</div>\n", styles: [".bui-discrete-input-container{display:flex;align-items:center}.bui-discrete-input-element{border:1px solid rgba(128,128,128,.4);border-radius:3px;background:none;padding:0;text-align:center;width:1.5em;height:1.5em;font-size:inherit;color:currentColor;caret-color:auto}.bui-discrete-input-element:not(:last-child){margin-right:.25em}.bui-discrete-input-element:focus-visible{outline-style:solid;outline-width:2px;outline-offset:-1px}.bui-discrete-input-element[type=number]::-webkit-inner-spin-button,.bui-discrete-input-element[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.bui-discrete-input-element[type=number]{-moz-appearance:textfield}.bui-discrete-input-spacer{margin-right:.25em;vertical-align:middle}\n"] }]
|
|
296
|
+
}], ctorParameters: function () {
|
|
297
|
+
return [{ type: i1.FocusMonitor }, { type: i0.ElementRef }, { type: i5.MatFormField, decorators: [{
|
|
298
|
+
type: Optional
|
|
299
|
+
}, {
|
|
300
|
+
type: Inject,
|
|
301
|
+
args: [MAT_FORM_FIELD]
|
|
302
|
+
}] }, { type: i2.NgControl, decorators: [{
|
|
303
|
+
type: Optional
|
|
304
|
+
}, {
|
|
305
|
+
type: Self
|
|
306
|
+
}] }, { type: i2.NgForm, decorators: [{
|
|
307
|
+
type: Optional
|
|
308
|
+
}] }, { type: i2.FormGroupDirective, decorators: [{
|
|
309
|
+
type: Optional
|
|
310
|
+
}] }, { type: i3.ErrorStateMatcher }];
|
|
311
|
+
}, propDecorators: { type: [{
|
|
312
|
+
type: Input
|
|
313
|
+
}], separator: [{
|
|
314
|
+
type: Input
|
|
315
|
+
}], accept: [{
|
|
316
|
+
type: Input
|
|
317
|
+
}], userAriaDescribedBy: [{
|
|
318
|
+
type: Input,
|
|
319
|
+
args: ['aria-describedby']
|
|
320
|
+
}], inputParts: [{
|
|
321
|
+
type: ViewChildren,
|
|
322
|
+
args: ['part', { read: ElementRef }]
|
|
323
|
+
}], sizeSpec: [{
|
|
324
|
+
type: Input
|
|
325
|
+
}], placeholder: [{
|
|
326
|
+
type: Input
|
|
327
|
+
}], required: [{
|
|
328
|
+
type: Input
|
|
329
|
+
}], disabled: [{
|
|
330
|
+
type: Input
|
|
331
|
+
}], value: [{
|
|
332
|
+
type: Input
|
|
333
|
+
}] } });
|
|
334
|
+
|
|
335
|
+
class DiscreteInputModule {
|
|
336
|
+
}
|
|
337
|
+
DiscreteInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: DiscreteInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
338
|
+
DiscreteInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: DiscreteInputModule, declarations: [DiscreteInputComponent], imports: [CommonModule, MatFormFieldModule, ReactiveFormsModule, A11yModule], exports: [DiscreteInputComponent] });
|
|
339
|
+
DiscreteInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: DiscreteInputModule, imports: [CommonModule, MatFormFieldModule, ReactiveFormsModule, A11yModule] });
|
|
340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: DiscreteInputModule, decorators: [{
|
|
341
|
+
type: NgModule,
|
|
342
|
+
args: [{
|
|
343
|
+
declarations: [DiscreteInputComponent],
|
|
344
|
+
imports: [CommonModule, MatFormFieldModule, ReactiveFormsModule, A11yModule],
|
|
345
|
+
exports: [DiscreteInputComponent]
|
|
346
|
+
}]
|
|
347
|
+
}] });
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Generated bundle index. Do not edit.
|
|
351
|
+
*/
|
|
352
|
+
|
|
353
|
+
export { DiscreteInputComponent, DiscreteInputModule };
|
|
354
|
+
//# sourceMappingURL=bravura-ui-discrete-input.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bravura-ui-discrete-input.mjs","sources":["../../../projects/ui/discrete-input/discrete-input.component.ts","../../../projects/ui/discrete-input/discrete-input.component.html","../../../projects/ui/discrete-input/discrete-input.module.ts","../../../projects/ui/discrete-input/bravura-ui-discrete-input.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n\tComponent,\n\tElementRef,\n\tInject,\n\tInput,\n\tOnDestroy,\n\tOptional,\n\tQueryList,\n\tSelf,\n\tViewChildren\n} from '@angular/core';\nimport {\n\tAbstractControl,\n\tControlValueAccessor,\n\tUntypedFormArray,\n\tUntypedFormControl,\n\tUntypedFormGroup,\n\tFormGroupDirective,\n\tNgControl,\n\tNgForm,\n\tValidators\n} from '@angular/forms';\nimport { ErrorStateMatcher, mixinErrorState } from '@angular/material/core';\nimport { MatFormField, MatFormFieldControl, MAT_FORM_FIELD } from '@angular/material/form-field';\nimport { Subject } from 'rxjs';\n\n// Boilerplate for applying mixins to form field control for error state checking.\n/** @ignore */\nconst _DiscreteInputBase = mixinErrorState(\n\tclass {\n\t\treadonly stateChanges = new Subject<void>();\n\t\tconstructor(\n\t\t\t/** @ignore */ public _defaultErrorStateMatcher: ErrorStateMatcher,\n\t\t\t/** @ignore */ public _parentForm: NgForm,\n\t\t\t/** @ignore */ public _parentFormGroup: FormGroupDirective,\n\t\t\t/** @ignore */ public ngControl: NgControl\n\t\t) {}\n\t}\n);\n\n/**\n * Custom `MatFormFieldControl` with an individual input box for each character, suitable for fixed-length fields,\n * such as secondary PIN inputs, TFNs, or BSB code etc.\n *\n * Accessibility features are not yet fully implemented.\n *\n * Example:\n *\n * ```html\n * <mat-form-field>\n * <bui-discrete-input></bui-discrete-input>\n * </mat-form-field>\n * ```\n *\n */\n@Component({\n\tselector: 'bui-discrete-input',\n\ttemplateUrl: 'discrete-input.component.html',\n\tstyleUrls: ['discrete-input.component.scss'],\n\tproviders: [{ provide: MatFormFieldControl, useExisting: DiscreteInputComponent }],\n\thost: {\n\t\tclass: 'bui-discrete-input bui-host'\n\t}\n})\nexport class DiscreteInputComponent\n\textends _DiscreteInputBase\n\timplements MatFormFieldControl<string>, ControlValueAccessor, OnDestroy\n{\n\t/** @ignore */\n\tstatic nextId = 0;\n\n\t/** @ignore */\n\tstatic ngAcceptInputType_disabled: boolean | string | null | undefined;\n\t/** @ignore */\n\tstatic ngAcceptInputType_required: boolean | string | null | undefined;\n\n\t/** @ignore */ parts: UntypedFormArray;\n\t/** @ignore */ group: UntypedFormGroup;\n\t/** Emits whenever the component state changes. */\n\tstateChanges: Subject<void>;\n\t/** Whether the control is focused. */\n\tfocused: boolean;\n\n\t/** The type of input boxes */\n\t@Input()\n\ttype: 'text' | 'number' | 'password' = 'text';\n\n\t/** Input boxes are separated in groups. This specifies the characters displayed between two groups. */\n\t@Input()\n\tseparator = ' ';\n\n\t/**\n\t * A list of characters accepted in the inputs, for example `0-9`, `a-zA-Z0-9`\n\t * @example '0-9'\n\t */\n\t@Input()\n\taccept?: string;\n\n\t/** @ignore */ id = `bui-discrete-input-${DiscreteInputComponent.nextId++}`;\n\n\t/** Value of aria-describedby that should be merged with the described-by ids which are set by the form-field. */\n\t@Input('aria-describedby') userAriaDescribedBy?: string;\n\n\t@ViewChildren('part', { read: ElementRef }) private inputParts!: QueryList<ElementRef<HTMLInputElement>>;\n\n\t/**@ignore */\n\t_formField: MatFormField;\n\n\t/**@ignore */\n\tngControl: NgControl;\n\n\tprivate _sizeSpec: number[] = [];\n\n\tprivate _required = false;\n\n\tprivate _placeholder?: string;\n\tprivate _disabled = false;\n\tprivate _separatorPos: number[] = [];\n\n\t/** @ignore */ onChange = (_: any) => {};\n\t/** @ignore */ onTouched = () => {};\n\n\t/** @ignore */\n\tget shouldLabelFloat() {\n\t\treturn true;\n\t}\n\n\t/** @ignore */\n\tget empty() {\n\t\treturn this.parts.controls.every(c => !c.value);\n\t}\n\n\t/**\n\t * Defines the length and grouping of the input.\n\t * @default [2, 2, 2]\n\t */\n\t@Input()\n\tget sizeSpec(): number[] {\n\t\treturn this._sizeSpec;\n\t}\n\tset sizeSpec(spec: number[]) {\n\t\tlet size = 0;\n\t\tthis._separatorPos = [];\n\t\tspec.forEach((n, i) => {\n\t\t\tsize += n;\n\t\t\tif (i < spec.length - 1) {\n\t\t\t\tthis._separatorPos.push(size);\n\t\t\t}\n\t\t});\n\t\tif (size !== this.parts.length) {\n\t\t\tconst v = this.value;\n\t\t\tthis.parts.clear({ emitEvent: false });\n\t\t\tfor (let i = 0; i < size; i++) {\n\t\t\t\tthis.parts.setControl(\n\t\t\t\t\ti,\n\t\t\t\t\tnew UntypedFormControl(null, [Validators.required, Validators.minLength(1), Validators.maxLength(1)])\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.value = v;\n\t\t\tthis._sizeSpec = spec;\n\t\t}\n\t}\n\n\t/** The placeholder for this control. */\n\t@Input()\n\tget placeholder(): string {\n\t\treturn this._placeholder!;\n\t}\n\tset placeholder(value: string) {\n\t\tthis._placeholder = value;\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** Whether the control is required. */\n\t@Input()\n\tget required(): boolean {\n\t\treturn this._required;\n\t}\n\tset required(value: boolean) {\n\t\tthis._required = coerceBooleanProperty(value);\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** Whether the control is disabled. */\n\t@Input()\n\tget disabled(): boolean {\n\t\treturn this._disabled;\n\t}\n\tset disabled(value: boolean) {\n\t\tthis._disabled = coerceBooleanProperty(value);\n\t\tthis._disabled ? this.parts.disable() : this.parts.enable();\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** The value of the control. */\n\t@Input()\n\tget value(): string {\n\t\treturn this.parts.controls\n\t\t\t.map(c => c.value)\n\t\t\t.filter(c => c)\n\t\t\t.join('');\n\t}\n\tset value(v: string) {\n\t\tv = v || '';\n\t\tfor (let i = 0; i < this.parts.controls.length; i++) {\n\t\t\tthis.parts.controls[i]?.setValue(v[i]);\n\t\t}\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** @ignore */\n\tget _colorSuffix(): string {\n\t\treturn this.errorState ? 'warn' : this._formField?.color || 'primary';\n\t}\n\n\tconstructor(\n\t\tprivate _focusMonitor: FocusMonitor,\n\t\tprivate _elementRef: ElementRef<HTMLElement>,\n\t\t@Optional() @Inject(MAT_FORM_FIELD) formField: MatFormField,\n\t\t@Optional() @Self() control: NgControl,\n\t\t@Optional() _parentForm: NgForm,\n\t\t@Optional() _parentFormGroup: FormGroupDirective,\n\t\t_defaultErrorStateMatcher: ErrorStateMatcher\n\t) {\n\t\tsuper(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, control);\n\t\tthis.parts = new UntypedFormArray([]);\n\t\tthis.group = new UntypedFormGroup({ parts: this.parts });\n\t\tthis.sizeSpec = [2, 2, 2];\n\t\tthis._formField = formField;\n\t\tthis.focused = false;\n\t\tthis.stateChanges = new Subject<void>();\n\n\t\tthis.ngControl = control;\n\t\tif (this.ngControl != null) {\n\t\t\tthis.ngControl.valueAccessor = this;\n\t\t}\n\n\t\tthis._focusMonitor.monitor(this._elementRef, true).subscribe(origin => {\n\t\t\tif (this.focused && !origin) {\n\t\t\t\tthis.onTouched();\n\t\t\t}\n\t\t\tthis.focused = !!origin;\n\t\t\tthis.stateChanges.next();\n\t\t});\n\t}\n\n\t/** @ignore */ errorState = false;\n\t/** @ignore */ controlType?: string | undefined;\n\t/** @ignore */ autofilled?: boolean | undefined;\n\n\t/** @ignore */\n\tngOnDestroy() {\n\t\tthis.stateChanges.complete();\n\t\tthis._focusMonitor.stopMonitoring(this._elementRef);\n\t}\n\n\t/** @ignore */\n\tsetDescribedByIds(ids: string[]) {\n\t\tconst controlElement = this._elementRef.nativeElement.querySelector('.bui-discrete-input-container');\n\t\tcontrolElement!.setAttribute('aria-describedby', ids.join(' '));\n\t}\n\n\t/** @ignore */\n\tonContainerClick() {\n\t\tconst l = this.parts.controls.length;\n\t\tfor (let i = 0; i < l; i++) {\n\t\t\tif (this.parts.controls[i].invalid || i === l - 1) {\n\t\t\t\tthis._focusMonitor.focusVia(this.inputParts.get(i)!, 'program');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @ignore */\n\twriteValue(v: string): void {\n\t\tthis.value = v;\n\t}\n\n\t/** @ignore */\n\tregisterOnChange(fn: any): void {\n\t\tthis.onChange = fn;\n\t}\n\n\t/** @ignore */\n\tregisterOnTouched(fn: any): void {\n\t\tthis.onTouched = fn;\n\t}\n\n\t/** @ignore */\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t/** @ignore */\n\t_handleInput(control: AbstractControl, index: number): void {\n\t\tlet v = control.value && control.value[0];\n\t\tcontrol.setValue(v);\n\t\tconst nextElement = this.inputParts.get(index + 1);\n\t\tif (!control.errors && nextElement) {\n\t\t\tthis._focusPart(nextElement);\n\t\t}\n\n\t\tthis.onChange(this.value);\n\t}\n\n\t/** @ignore */\n\t_handleBeforeInput(index: number, event: InputEvent): void {\n\t\tconst v = event.data;\n\t\tif (this.accept && v && !new RegExp(`[${this.accept}]`).test(v)) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\treturn;\n\t\t}\n\t\tconst inp = this.inputParts.get(index)!.nativeElement;\n\t\tif (v && inp.value) {\n\t\t\tinp.value = '';\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_focusPart(elemRef: ElementRef<HTMLInputElement>) {\n\t\tthis._focusMonitor.focusVia(elemRef, 'program');\n\t}\n\n\t/** @ignore */\n\t_consumeKey(event: Event) {\n\t\tevent.stopPropagation();\n\t\tevent.preventDefault();\n\t}\n\n\t/** @ignore */\n\t_leftArrow(index: number, event: Event) {\n\t\tthis._consumeKey(event);\n\t\tconst prevElement = this.inputParts.get(index - 1);\n\t\tif (prevElement) {\n\t\t\tthis._focusPart(prevElement);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_rightArrow(index: number, event: Event) {\n\t\tthis._consumeKey(event);\n\t\tconst nextElement = this.inputParts.get(index + 1);\n\t\tif (nextElement) {\n\t\t\tthis._focusPart(nextElement);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_handleBackspace(control: AbstractControl, index: number): void {\n\t\tconst prevElement = index && this.inputParts.get(index - 1);\n\t\tif (!control.value && prevElement) {\n\t\t\tthis._focusMonitor.focusVia(prevElement, 'program');\n\t\t} else if (control.value) {\n\t\t\tcontrol.setValue('');\n\t\t\tthis.onChange(this.value);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_onPaste(event: ClipboardEvent) {\n\t\tlet text = event.clipboardData?.getData('text');\n\t\tif (text) {\n\t\t\tif (this.accept) {\n\t\t\t\ttext = text.replace(new RegExp(`[^${this.accept}]`, 'gi'), '');\n\t\t\t}\n\t\t\tthis.value = text;\n\t\t\tthis.onChange(this.value);\n\t\t}\n\t\tevent.preventDefault();\n\t\tthis.onContainerClick();\n\t}\n\n\t/** @ignore */\n\t_separatorRequired(index: number) {\n\t\treturn this._separatorPos.includes(index + 1);\n\t}\n\n\t/** @ignore */\n\t_placeholderAt(index: number) {\n\t\treturn this._placeholder && this._placeholder[index];\n\t}\n\n\t/** @ignore */\n\tngDoCheck() {\n\t\tif (this.ngControl) {\n\t\t\t// We need to re-evaluate this on every change detection cycle, because there are some\n\t\t\t// error triggers that we can't subscribe to (e.g. parent form submissions). This means\n\t\t\t// that whatever logic is in here has to be super lean or we risk destroying the performance.\n\t\t\tthis.updateErrorState();\n\t\t}\n\t}\n}\n","<div\n\trole=\"group\"\n\tclass=\"bui-discrete-input-container\"\n\t[formGroup]=\"group\"\n\t[attr.aria-labelledby]=\"_formField?.getLabelId()\"\n>\n\t<ng-container [formArrayName]=\"'parts'\">\n\t\t<ng-template ngFor [ngForOf]=\"parts.controls\" let-p let-i=\"index\">\n\t\t\t<input\n\t\t\t\tclass=\"bui-discrete-input-element bui-outline-{{ _colorSuffix }}\"\n\t\t\t\t[formControlName]=\"i\"\n\t\t\t\tsize=\"1\"\n\t\t\t\tmaxLength=\"1\"\n\t\t\t\t[attr.aria-label]=\"'character ' + (i + 1)\"\n\t\t\t\t(input)=\"_handleInput(p, i)\"\n\t\t\t\t(beforeinput)=\"_handleBeforeInput(i, $event)\"\n\t\t\t\t(keydown.backspace)=\"_handleBackspace(p, i)\"\n\t\t\t\t(keydown.arrowup)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowdown)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowleft)=\"_leftArrow(i, $event)\"\n\t\t\t\t(keydown.arrowright)=\"_rightArrow(i, $event)\"\n\t\t\t\t[attr.placeholder]=\"_placeholderAt(i)\"\n\t\t\t\t#part\n\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t(paste)=\"_onPaste($event)\"\n\t\t\t\t[type]=\"['text', 'number', 'password'].includes(type) ? type : 'text'\"\n\t\t\t\tautocapitalize=\"none\"\n\t\t\t/>\n\t\t\t<span *ngIf=\"_separatorRequired(i)\" class=\"bui-discrete-input-spacer\">{{ separator }}</span>\n\t\t</ng-template>\n\t</ng-container>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DiscreteInputComponent } from './discrete-input.component';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { A11yModule } from '@angular/cdk/a11y';\n\n@NgModule({\n\tdeclarations: [DiscreteInputComponent],\n\timports: [CommonModule, MatFormFieldModule, ReactiveFormsModule, A11yModule],\n\texports: [DiscreteInputComponent]\n})\nexport class DiscreteInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AA4BA;AACA;AACA,MAAM,kBAAkB,GAAG,eAAe,CACzC,MAAA;AAEC,IAAA,WAAA;AACC,mBAAsB,yBAA4C;AAClE,mBAAsB,WAAmB;AACzC,mBAAsB,gBAAoC;AAC1D,mBAAsB,SAAoB,EAAA;AAHpB,QAAA,IAAyB,CAAA,yBAAA,GAAzB,yBAAyB,CAAmB;AAC5C,QAAA,IAAW,CAAA,WAAA,GAAX,WAAW,CAAQ;AACnB,QAAA,IAAgB,CAAA,gBAAA,GAAhB,gBAAgB,CAAoB;AACpC,QAAA,IAAS,CAAA,SAAA,GAAT,SAAS,CAAW;AALlC,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ,CAAC;KAMxC;AACJ,CAAA,CACD,CAAC;AAEF;;;;;;;;;;;;;;AAcG;AAUG,MAAO,sBACZ,SAAQ,kBAAkB,CAAA;AAsJ1B,IAAA,WAAA,CACS,aAA2B,EAC3B,WAAoC,EACR,SAAuB,EACvC,OAAkB,EAC1B,WAAmB,EACnB,gBAAoC,EAChD,yBAA4C,EAAA;QAE5C,KAAK,CAAC,yBAAyB,EAAE,WAAW,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;AARjE,QAAA,IAAa,CAAA,aAAA,GAAb,aAAa,CAAc;AAC3B,QAAA,IAAW,CAAA,WAAA,GAAX,WAAW,CAAyB;;AApI7C,QAAA,IAAI,CAAA,IAAA,GAAmC,MAAM,CAAC;;AAI9C,QAAA,IAAS,CAAA,SAAA,GAAG,GAAG,CAAC;uBASD,OAAE,GAAG,CAAsB,mBAAA,EA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