@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
|
@@ -1,747 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/cdk/coercion'), require('@angular/forms'), require('@angular/material/core'), require('@angular/material/form-field'), require('rxjs'), require('@angular/cdk/a11y')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@bravura/ui/discrete-input', ['exports', '@angular/core', '@angular/common', '@angular/cdk/coercion', '@angular/forms', '@angular/material/core', '@angular/material/form-field', 'rxjs', '@angular/cdk/a11y'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.bravura = global.bravura || {}, global.bravura.ui = global.bravura.ui || {}, global.bravura.ui["discrete-input"] = {}), global.ng.core, global.ng.common, global.ng.cdk.coercion, global.ng.forms, global.ng.material.core, global.ng.material.formField, global.rxjs, global.ng.cdk.a11y));
|
|
5
|
-
})(this, (function (exports, i0, i4, coercion, i2, i3, i5, rxjs, i1) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopNamespace(e) {
|
|
8
|
-
if (e && e.__esModule) return e;
|
|
9
|
-
var n = Object.create(null);
|
|
10
|
-
if (e) {
|
|
11
|
-
Object.keys(e).forEach(function (k) {
|
|
12
|
-
if (k !== 'default') {
|
|
13
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () { return e[k]; }
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
n["default"] = e;
|
|
22
|
-
return Object.freeze(n);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
-
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
27
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
28
|
-
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
29
|
-
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
30
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
31
|
-
|
|
32
|
-
/******************************************************************************
|
|
33
|
-
Copyright (c) Microsoft Corporation.
|
|
34
|
-
|
|
35
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
36
|
-
purpose with or without fee is hereby granted.
|
|
37
|
-
|
|
38
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
39
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
40
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
41
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
42
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
43
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
44
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
45
|
-
***************************************************************************** */
|
|
46
|
-
/* global Reflect, Promise */
|
|
47
|
-
var extendStatics = function (d, b) {
|
|
48
|
-
extendStatics = Object.setPrototypeOf ||
|
|
49
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
50
|
-
function (d, b) { for (var p in b)
|
|
51
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
52
|
-
d[p] = b[p]; };
|
|
53
|
-
return extendStatics(d, b);
|
|
54
|
-
};
|
|
55
|
-
function __extends(d, b) {
|
|
56
|
-
if (typeof b !== "function" && b !== null)
|
|
57
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
58
|
-
extendStatics(d, b);
|
|
59
|
-
function __() { this.constructor = d; }
|
|
60
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
61
|
-
}
|
|
62
|
-
var __assign = function () {
|
|
63
|
-
__assign = Object.assign || function __assign(t) {
|
|
64
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
65
|
-
s = arguments[i];
|
|
66
|
-
for (var p in s)
|
|
67
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
68
|
-
t[p] = s[p];
|
|
69
|
-
}
|
|
70
|
-
return t;
|
|
71
|
-
};
|
|
72
|
-
return __assign.apply(this, arguments);
|
|
73
|
-
};
|
|
74
|
-
function __rest(s, e) {
|
|
75
|
-
var t = {};
|
|
76
|
-
for (var p in s)
|
|
77
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
78
|
-
t[p] = s[p];
|
|
79
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
80
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
81
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
82
|
-
t[p[i]] = s[p[i]];
|
|
83
|
-
}
|
|
84
|
-
return t;
|
|
85
|
-
}
|
|
86
|
-
function __decorate(decorators, target, key, desc) {
|
|
87
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
88
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
89
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
90
|
-
else
|
|
91
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
92
|
-
if (d = decorators[i])
|
|
93
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
94
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
95
|
-
}
|
|
96
|
-
function __param(paramIndex, decorator) {
|
|
97
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
98
|
-
}
|
|
99
|
-
function __metadata(metadataKey, metadataValue) {
|
|
100
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
101
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
102
|
-
}
|
|
103
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
104
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
105
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
106
|
-
function fulfilled(value) { try {
|
|
107
|
-
step(generator.next(value));
|
|
108
|
-
}
|
|
109
|
-
catch (e) {
|
|
110
|
-
reject(e);
|
|
111
|
-
} }
|
|
112
|
-
function rejected(value) { try {
|
|
113
|
-
step(generator["throw"](value));
|
|
114
|
-
}
|
|
115
|
-
catch (e) {
|
|
116
|
-
reject(e);
|
|
117
|
-
} }
|
|
118
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
119
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
function __generator(thisArg, body) {
|
|
123
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
124
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
125
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
126
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
127
|
-
function step(op) {
|
|
128
|
-
if (f)
|
|
129
|
-
throw new TypeError("Generator is already executing.");
|
|
130
|
-
while (_)
|
|
131
|
-
try {
|
|
132
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
133
|
-
return t;
|
|
134
|
-
if (y = 0, t)
|
|
135
|
-
op = [op[0] & 2, t.value];
|
|
136
|
-
switch (op[0]) {
|
|
137
|
-
case 0:
|
|
138
|
-
case 1:
|
|
139
|
-
t = op;
|
|
140
|
-
break;
|
|
141
|
-
case 4:
|
|
142
|
-
_.label++;
|
|
143
|
-
return { value: op[1], done: false };
|
|
144
|
-
case 5:
|
|
145
|
-
_.label++;
|
|
146
|
-
y = op[1];
|
|
147
|
-
op = [0];
|
|
148
|
-
continue;
|
|
149
|
-
case 7:
|
|
150
|
-
op = _.ops.pop();
|
|
151
|
-
_.trys.pop();
|
|
152
|
-
continue;
|
|
153
|
-
default:
|
|
154
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
155
|
-
_ = 0;
|
|
156
|
-
continue;
|
|
157
|
-
}
|
|
158
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
159
|
-
_.label = op[1];
|
|
160
|
-
break;
|
|
161
|
-
}
|
|
162
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
163
|
-
_.label = t[1];
|
|
164
|
-
t = op;
|
|
165
|
-
break;
|
|
166
|
-
}
|
|
167
|
-
if (t && _.label < t[2]) {
|
|
168
|
-
_.label = t[2];
|
|
169
|
-
_.ops.push(op);
|
|
170
|
-
break;
|
|
171
|
-
}
|
|
172
|
-
if (t[2])
|
|
173
|
-
_.ops.pop();
|
|
174
|
-
_.trys.pop();
|
|
175
|
-
continue;
|
|
176
|
-
}
|
|
177
|
-
op = body.call(thisArg, _);
|
|
178
|
-
}
|
|
179
|
-
catch (e) {
|
|
180
|
-
op = [6, e];
|
|
181
|
-
y = 0;
|
|
182
|
-
}
|
|
183
|
-
finally {
|
|
184
|
-
f = t = 0;
|
|
185
|
-
}
|
|
186
|
-
if (op[0] & 5)
|
|
187
|
-
throw op[1];
|
|
188
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
192
|
-
if (k2 === undefined)
|
|
193
|
-
k2 = k;
|
|
194
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
195
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
196
|
-
desc = { enumerable: true, get: function () { return m[k]; } };
|
|
197
|
-
}
|
|
198
|
-
Object.defineProperty(o, k2, desc);
|
|
199
|
-
}) : (function (o, m, k, k2) {
|
|
200
|
-
if (k2 === undefined)
|
|
201
|
-
k2 = k;
|
|
202
|
-
o[k2] = m[k];
|
|
203
|
-
});
|
|
204
|
-
function __exportStar(m, o) {
|
|
205
|
-
for (var p in m)
|
|
206
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
207
|
-
__createBinding(o, m, p);
|
|
208
|
-
}
|
|
209
|
-
function __values(o) {
|
|
210
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
211
|
-
if (m)
|
|
212
|
-
return m.call(o);
|
|
213
|
-
if (o && typeof o.length === "number")
|
|
214
|
-
return {
|
|
215
|
-
next: function () {
|
|
216
|
-
if (o && i >= o.length)
|
|
217
|
-
o = void 0;
|
|
218
|
-
return { value: o && o[i++], done: !o };
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
222
|
-
}
|
|
223
|
-
function __read(o, n) {
|
|
224
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
225
|
-
if (!m)
|
|
226
|
-
return o;
|
|
227
|
-
var i = m.call(o), r, ar = [], e;
|
|
228
|
-
try {
|
|
229
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
230
|
-
ar.push(r.value);
|
|
231
|
-
}
|
|
232
|
-
catch (error) {
|
|
233
|
-
e = { error: error };
|
|
234
|
-
}
|
|
235
|
-
finally {
|
|
236
|
-
try {
|
|
237
|
-
if (r && !r.done && (m = i["return"]))
|
|
238
|
-
m.call(i);
|
|
239
|
-
}
|
|
240
|
-
finally {
|
|
241
|
-
if (e)
|
|
242
|
-
throw e.error;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
return ar;
|
|
246
|
-
}
|
|
247
|
-
/** @deprecated */
|
|
248
|
-
function __spread() {
|
|
249
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
250
|
-
ar = ar.concat(__read(arguments[i]));
|
|
251
|
-
return ar;
|
|
252
|
-
}
|
|
253
|
-
/** @deprecated */
|
|
254
|
-
function __spreadArrays() {
|
|
255
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
256
|
-
s += arguments[i].length;
|
|
257
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
258
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
259
|
-
r[k] = a[j];
|
|
260
|
-
return r;
|
|
261
|
-
}
|
|
262
|
-
function __spreadArray(to, from, pack) {
|
|
263
|
-
if (pack || arguments.length === 2)
|
|
264
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
265
|
-
if (ar || !(i in from)) {
|
|
266
|
-
if (!ar)
|
|
267
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
268
|
-
ar[i] = from[i];
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
272
|
-
}
|
|
273
|
-
function __await(v) {
|
|
274
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
275
|
-
}
|
|
276
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
277
|
-
if (!Symbol.asyncIterator)
|
|
278
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
279
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
280
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
281
|
-
function verb(n) { if (g[n])
|
|
282
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
283
|
-
function resume(n, v) { try {
|
|
284
|
-
step(g[n](v));
|
|
285
|
-
}
|
|
286
|
-
catch (e) {
|
|
287
|
-
settle(q[0][3], e);
|
|
288
|
-
} }
|
|
289
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
290
|
-
function fulfill(value) { resume("next", value); }
|
|
291
|
-
function reject(value) { resume("throw", value); }
|
|
292
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
293
|
-
resume(q[0][0], q[0][1]); }
|
|
294
|
-
}
|
|
295
|
-
function __asyncDelegator(o) {
|
|
296
|
-
var i, p;
|
|
297
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
298
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
299
|
-
}
|
|
300
|
-
function __asyncValues(o) {
|
|
301
|
-
if (!Symbol.asyncIterator)
|
|
302
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
303
|
-
var m = o[Symbol.asyncIterator], i;
|
|
304
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
305
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
306
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
307
|
-
}
|
|
308
|
-
function __makeTemplateObject(cooked, raw) {
|
|
309
|
-
if (Object.defineProperty) {
|
|
310
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
311
|
-
}
|
|
312
|
-
else {
|
|
313
|
-
cooked.raw = raw;
|
|
314
|
-
}
|
|
315
|
-
return cooked;
|
|
316
|
-
}
|
|
317
|
-
;
|
|
318
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
319
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
320
|
-
}) : function (o, v) {
|
|
321
|
-
o["default"] = v;
|
|
322
|
-
};
|
|
323
|
-
function __importStar(mod) {
|
|
324
|
-
if (mod && mod.__esModule)
|
|
325
|
-
return mod;
|
|
326
|
-
var result = {};
|
|
327
|
-
if (mod != null)
|
|
328
|
-
for (var k in mod)
|
|
329
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
330
|
-
__createBinding(result, mod, k);
|
|
331
|
-
__setModuleDefault(result, mod);
|
|
332
|
-
return result;
|
|
333
|
-
}
|
|
334
|
-
function __importDefault(mod) {
|
|
335
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
336
|
-
}
|
|
337
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
338
|
-
if (kind === "a" && !f)
|
|
339
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
340
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
341
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
342
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
343
|
-
}
|
|
344
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
345
|
-
if (kind === "m")
|
|
346
|
-
throw new TypeError("Private method is not writable");
|
|
347
|
-
if (kind === "a" && !f)
|
|
348
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
349
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
350
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
351
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
352
|
-
}
|
|
353
|
-
function __classPrivateFieldIn(state, receiver) {
|
|
354
|
-
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
|
|
355
|
-
throw new TypeError("Cannot use 'in' operator on non-object");
|
|
356
|
-
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
// Boilerplate for applying mixins to form field control for error state checking.
|
|
360
|
-
/** @ignore */
|
|
361
|
-
var _DiscreteInputBase = i3.mixinErrorState(/** @class */ (function () {
|
|
362
|
-
function class_1(
|
|
363
|
-
/** @ignore */ _defaultErrorStateMatcher,
|
|
364
|
-
/** @ignore */ _parentForm,
|
|
365
|
-
/** @ignore */ _parentFormGroup,
|
|
366
|
-
/** @ignore */ ngControl) {
|
|
367
|
-
this._defaultErrorStateMatcher = _defaultErrorStateMatcher;
|
|
368
|
-
this._parentForm = _parentForm;
|
|
369
|
-
this._parentFormGroup = _parentFormGroup;
|
|
370
|
-
this.ngControl = ngControl;
|
|
371
|
-
}
|
|
372
|
-
return class_1;
|
|
373
|
-
}()));
|
|
374
|
-
/**
|
|
375
|
-
* Custom `MatFormFieldControl` with an individual input box for each character, suitable for fixed-length fields,
|
|
376
|
-
* such as secondary PIN inputs, TFNs, or BSB code etc.
|
|
377
|
-
*
|
|
378
|
-
* Accessibility features are not yet fully implemented.
|
|
379
|
-
*
|
|
380
|
-
* Example:
|
|
381
|
-
*
|
|
382
|
-
* ```html
|
|
383
|
-
* <mat-form-field>
|
|
384
|
-
* <bui-discrete-input></bui-discrete-input>
|
|
385
|
-
* </mat-form-field>
|
|
386
|
-
* ```
|
|
387
|
-
*
|
|
388
|
-
*/
|
|
389
|
-
var DiscreteInputComponent = /** @class */ (function (_super) {
|
|
390
|
-
__extends(DiscreteInputComponent, _super);
|
|
391
|
-
function DiscreteInputComponent(_focusMonitor, _elementRef, formField, control, _parentForm, _parentFormGroup, _defaultErrorStateMatcher) {
|
|
392
|
-
var _this = _super.call(this, _defaultErrorStateMatcher, _parentForm, _parentFormGroup, control) || this;
|
|
393
|
-
_this._focusMonitor = _focusMonitor;
|
|
394
|
-
_this._elementRef = _elementRef;
|
|
395
|
-
/** The type of input boxes */
|
|
396
|
-
_this.type = 'text';
|
|
397
|
-
/** Input boxes are separated in groups. This specifies the characters displayed between two groups. */
|
|
398
|
-
_this.separator = ' ';
|
|
399
|
-
/** @ignore */ _this.id = "bui-discrete-input-" + DiscreteInputComponent.nextId++;
|
|
400
|
-
_this._sizeSpec = [];
|
|
401
|
-
_this._required = false;
|
|
402
|
-
_this._disabled = false;
|
|
403
|
-
_this._separatorPos = [];
|
|
404
|
-
/** @ignore */ _this.onChange = function (_) { };
|
|
405
|
-
/** @ignore */ _this.onTouched = function () { };
|
|
406
|
-
/** @ignore */ _this.errorState = false;
|
|
407
|
-
_this.parts = new i2.FormArray([]);
|
|
408
|
-
_this.group = new i2.FormGroup({ parts: _this.parts });
|
|
409
|
-
_this.sizeSpec = [2, 2, 2];
|
|
410
|
-
_this._formField = formField;
|
|
411
|
-
_this.focused = false;
|
|
412
|
-
_this.stateChanges = new rxjs.Subject();
|
|
413
|
-
_this.ngControl = control;
|
|
414
|
-
if (_this.ngControl != null) {
|
|
415
|
-
_this.ngControl.valueAccessor = _this;
|
|
416
|
-
}
|
|
417
|
-
_this._focusMonitor.monitor(_this._elementRef, true).subscribe(function (origin) {
|
|
418
|
-
if (_this.focused && !origin) {
|
|
419
|
-
_this.onTouched();
|
|
420
|
-
}
|
|
421
|
-
_this.focused = !!origin;
|
|
422
|
-
_this.stateChanges.next();
|
|
423
|
-
});
|
|
424
|
-
return _this;
|
|
425
|
-
}
|
|
426
|
-
Object.defineProperty(DiscreteInputComponent.prototype, "shouldLabelFloat", {
|
|
427
|
-
/** @ignore */
|
|
428
|
-
get: function () {
|
|
429
|
-
return true;
|
|
430
|
-
},
|
|
431
|
-
enumerable: false,
|
|
432
|
-
configurable: true
|
|
433
|
-
});
|
|
434
|
-
Object.defineProperty(DiscreteInputComponent.prototype, "empty", {
|
|
435
|
-
/** @ignore */
|
|
436
|
-
get: function () {
|
|
437
|
-
return this.parts.controls.every(function (c) { return !c.value; });
|
|
438
|
-
},
|
|
439
|
-
enumerable: false,
|
|
440
|
-
configurable: true
|
|
441
|
-
});
|
|
442
|
-
Object.defineProperty(DiscreteInputComponent.prototype, "sizeSpec", {
|
|
443
|
-
/**
|
|
444
|
-
* Defines the length and grouping of the input.
|
|
445
|
-
* @default [2, 2, 2]
|
|
446
|
-
*/
|
|
447
|
-
get: function () {
|
|
448
|
-
return this._sizeSpec;
|
|
449
|
-
},
|
|
450
|
-
set: function (spec) {
|
|
451
|
-
var _this = this;
|
|
452
|
-
var size = 0;
|
|
453
|
-
this._separatorPos = [];
|
|
454
|
-
spec.forEach(function (n, i) {
|
|
455
|
-
size += n;
|
|
456
|
-
if (i < spec.length - 1) {
|
|
457
|
-
_this._separatorPos.push(size);
|
|
458
|
-
}
|
|
459
|
-
});
|
|
460
|
-
if (size !== this.parts.length) {
|
|
461
|
-
var v = this.value;
|
|
462
|
-
this.parts.clear({ emitEvent: false });
|
|
463
|
-
for (var i = 0; i < size; i++) {
|
|
464
|
-
this.parts.setControl(i, new i2.FormControl(null, [i2.Validators.required, i2.Validators.minLength(1), i2.Validators.maxLength(1)]));
|
|
465
|
-
}
|
|
466
|
-
this.value = v;
|
|
467
|
-
this._sizeSpec = spec;
|
|
468
|
-
}
|
|
469
|
-
},
|
|
470
|
-
enumerable: false,
|
|
471
|
-
configurable: true
|
|
472
|
-
});
|
|
473
|
-
Object.defineProperty(DiscreteInputComponent.prototype, "placeholder", {
|
|
474
|
-
/** The placeholder for this control. */
|
|
475
|
-
get: function () {
|
|
476
|
-
return this._placeholder;
|
|
477
|
-
},
|
|
478
|
-
set: function (value) {
|
|
479
|
-
this._placeholder = value;
|
|
480
|
-
this.stateChanges.next();
|
|
481
|
-
},
|
|
482
|
-
enumerable: false,
|
|
483
|
-
configurable: true
|
|
484
|
-
});
|
|
485
|
-
Object.defineProperty(DiscreteInputComponent.prototype, "required", {
|
|
486
|
-
/** Whether the control is required. */
|
|
487
|
-
get: function () {
|
|
488
|
-
return this._required;
|
|
489
|
-
},
|
|
490
|
-
set: function (value) {
|
|
491
|
-
this._required = coercion.coerceBooleanProperty(value);
|
|
492
|
-
this.stateChanges.next();
|
|
493
|
-
},
|
|
494
|
-
enumerable: false,
|
|
495
|
-
configurable: true
|
|
496
|
-
});
|
|
497
|
-
Object.defineProperty(DiscreteInputComponent.prototype, "disabled", {
|
|
498
|
-
/** Whether the control is disabled. */
|
|
499
|
-
get: function () {
|
|
500
|
-
return this._disabled;
|
|
501
|
-
},
|
|
502
|
-
set: function (value) {
|
|
503
|
-
this._disabled = coercion.coerceBooleanProperty(value);
|
|
504
|
-
this._disabled ? this.parts.disable() : this.parts.enable();
|
|
505
|
-
this.stateChanges.next();
|
|
506
|
-
},
|
|
507
|
-
enumerable: false,
|
|
508
|
-
configurable: true
|
|
509
|
-
});
|
|
510
|
-
Object.defineProperty(DiscreteInputComponent.prototype, "value", {
|
|
511
|
-
/** The value of the control. */
|
|
512
|
-
get: function () {
|
|
513
|
-
return this.parts.controls
|
|
514
|
-
.map(function (c) { return c.value; })
|
|
515
|
-
.filter(function (c) { return c; })
|
|
516
|
-
.join('');
|
|
517
|
-
},
|
|
518
|
-
set: function (v) {
|
|
519
|
-
var _a;
|
|
520
|
-
v = v || '';
|
|
521
|
-
for (var i = 0; i < this.parts.controls.length; i++) {
|
|
522
|
-
(_a = this.parts.controls[i]) === null || _a === void 0 ? void 0 : _a.setValue(v[i]);
|
|
523
|
-
}
|
|
524
|
-
this.stateChanges.next();
|
|
525
|
-
},
|
|
526
|
-
enumerable: false,
|
|
527
|
-
configurable: true
|
|
528
|
-
});
|
|
529
|
-
Object.defineProperty(DiscreteInputComponent.prototype, "_colorSuffix", {
|
|
530
|
-
/** @ignore */
|
|
531
|
-
get: function () {
|
|
532
|
-
var _a;
|
|
533
|
-
return this.errorState ? 'warn' : ((_a = this._formField) === null || _a === void 0 ? void 0 : _a.color) || 'primary';
|
|
534
|
-
},
|
|
535
|
-
enumerable: false,
|
|
536
|
-
configurable: true
|
|
537
|
-
});
|
|
538
|
-
/** @ignore */
|
|
539
|
-
DiscreteInputComponent.prototype.ngOnDestroy = function () {
|
|
540
|
-
this.stateChanges.complete();
|
|
541
|
-
this._focusMonitor.stopMonitoring(this._elementRef);
|
|
542
|
-
};
|
|
543
|
-
/** @ignore */
|
|
544
|
-
DiscreteInputComponent.prototype.setDescribedByIds = function (ids) {
|
|
545
|
-
var controlElement = this._elementRef.nativeElement.querySelector('.bui-discrete-input-container');
|
|
546
|
-
controlElement.setAttribute('aria-describedby', ids.join(' '));
|
|
547
|
-
};
|
|
548
|
-
/** @ignore */
|
|
549
|
-
DiscreteInputComponent.prototype.onContainerClick = function () {
|
|
550
|
-
var l = this.parts.controls.length;
|
|
551
|
-
for (var i = 0; i < l; i++) {
|
|
552
|
-
if (this.parts.controls[i].invalid || i === l - 1) {
|
|
553
|
-
this._focusMonitor.focusVia(this.inputParts.get(i), 'program');
|
|
554
|
-
break;
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
};
|
|
558
|
-
/** @ignore */
|
|
559
|
-
DiscreteInputComponent.prototype.writeValue = function (v) {
|
|
560
|
-
this.value = v;
|
|
561
|
-
};
|
|
562
|
-
/** @ignore */
|
|
563
|
-
DiscreteInputComponent.prototype.registerOnChange = function (fn) {
|
|
564
|
-
this.onChange = fn;
|
|
565
|
-
};
|
|
566
|
-
/** @ignore */
|
|
567
|
-
DiscreteInputComponent.prototype.registerOnTouched = function (fn) {
|
|
568
|
-
this.onTouched = fn;
|
|
569
|
-
};
|
|
570
|
-
/** @ignore */
|
|
571
|
-
DiscreteInputComponent.prototype.setDisabledState = function (isDisabled) {
|
|
572
|
-
this.disabled = isDisabled;
|
|
573
|
-
};
|
|
574
|
-
/** @ignore */
|
|
575
|
-
DiscreteInputComponent.prototype._handleInput = function (control, index) {
|
|
576
|
-
var v = control.value && control.value[0];
|
|
577
|
-
control.setValue(v);
|
|
578
|
-
var nextElement = this.inputParts.get(index + 1);
|
|
579
|
-
if (!control.errors && nextElement) {
|
|
580
|
-
this._focusPart(nextElement);
|
|
581
|
-
}
|
|
582
|
-
this.onChange(this.value);
|
|
583
|
-
};
|
|
584
|
-
/** @ignore */
|
|
585
|
-
DiscreteInputComponent.prototype._handleBeforeInput = function (index, event) {
|
|
586
|
-
var v = event.data;
|
|
587
|
-
if (this.accept && v && !new RegExp("[" + this.accept + "]").test(v)) {
|
|
588
|
-
event.preventDefault();
|
|
589
|
-
event.stopPropagation();
|
|
590
|
-
return;
|
|
591
|
-
}
|
|
592
|
-
var inp = this.inputParts.get(index).nativeElement;
|
|
593
|
-
if (v && inp.value) {
|
|
594
|
-
inp.value = '';
|
|
595
|
-
}
|
|
596
|
-
};
|
|
597
|
-
/** @ignore */
|
|
598
|
-
DiscreteInputComponent.prototype._focusPart = function (elemRef) {
|
|
599
|
-
this._focusMonitor.focusVia(elemRef, 'program');
|
|
600
|
-
};
|
|
601
|
-
/** @ignore */
|
|
602
|
-
DiscreteInputComponent.prototype._consumeKey = function (event) {
|
|
603
|
-
event.stopPropagation();
|
|
604
|
-
event.preventDefault();
|
|
605
|
-
};
|
|
606
|
-
/** @ignore */
|
|
607
|
-
DiscreteInputComponent.prototype._leftArrow = function (index, event) {
|
|
608
|
-
this._consumeKey(event);
|
|
609
|
-
var prevElement = this.inputParts.get(index - 1);
|
|
610
|
-
if (prevElement) {
|
|
611
|
-
this._focusPart(prevElement);
|
|
612
|
-
}
|
|
613
|
-
};
|
|
614
|
-
/** @ignore */
|
|
615
|
-
DiscreteInputComponent.prototype._rightArrow = function (index, event) {
|
|
616
|
-
this._consumeKey(event);
|
|
617
|
-
var nextElement = this.inputParts.get(index + 1);
|
|
618
|
-
if (nextElement) {
|
|
619
|
-
this._focusPart(nextElement);
|
|
620
|
-
}
|
|
621
|
-
};
|
|
622
|
-
/** @ignore */
|
|
623
|
-
DiscreteInputComponent.prototype._handleBackspace = function (control, index) {
|
|
624
|
-
var prevElement = index && this.inputParts.get(index - 1);
|
|
625
|
-
if (!control.value && prevElement) {
|
|
626
|
-
this._focusMonitor.focusVia(prevElement, 'program');
|
|
627
|
-
}
|
|
628
|
-
else if (control.value) {
|
|
629
|
-
control.setValue('');
|
|
630
|
-
this.onChange(this.value);
|
|
631
|
-
}
|
|
632
|
-
};
|
|
633
|
-
/** @ignore */
|
|
634
|
-
DiscreteInputComponent.prototype._onPaste = function (event) {
|
|
635
|
-
var _a;
|
|
636
|
-
var text = (_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text');
|
|
637
|
-
if (text) {
|
|
638
|
-
if (this.accept) {
|
|
639
|
-
text = text.replace(new RegExp("[^" + this.accept + "]", 'gi'), '');
|
|
640
|
-
}
|
|
641
|
-
this.value = text;
|
|
642
|
-
this.onChange(this.value);
|
|
643
|
-
}
|
|
644
|
-
event.preventDefault();
|
|
645
|
-
this.onContainerClick();
|
|
646
|
-
};
|
|
647
|
-
/** @ignore */
|
|
648
|
-
DiscreteInputComponent.prototype._separatorRequired = function (index) {
|
|
649
|
-
return this._separatorPos.includes(index + 1);
|
|
650
|
-
};
|
|
651
|
-
/** @ignore */
|
|
652
|
-
DiscreteInputComponent.prototype._placeholderAt = function (index) {
|
|
653
|
-
return this._placeholder && this._placeholder[index];
|
|
654
|
-
};
|
|
655
|
-
/** @ignore */
|
|
656
|
-
DiscreteInputComponent.prototype.ngDoCheck = function () {
|
|
657
|
-
if (this.ngControl) {
|
|
658
|
-
// We need to re-evaluate this on every change detection cycle, because there are some
|
|
659
|
-
// error triggers that we can't subscribe to (e.g. parent form submissions). This means
|
|
660
|
-
// that whatever logic is in here has to be super lean or we risk destroying the performance.
|
|
661
|
-
this.updateErrorState();
|
|
662
|
-
}
|
|
663
|
-
};
|
|
664
|
-
return DiscreteInputComponent;
|
|
665
|
-
}(_DiscreteInputBase));
|
|
666
|
-
/** @ignore */
|
|
667
|
-
DiscreteInputComponent.nextId = 0;
|
|
668
|
-
DiscreteInputComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DiscreteInputComponent, deps: [{ token: i1__namespace.FocusMonitor }, { token: i0__namespace.ElementRef }, { token: i5.MAT_FORM_FIELD, optional: true }, { token: i2__namespace.NgControl, optional: true, self: true }, { token: i2__namespace.NgForm, optional: true }, { token: i2__namespace.FormGroupDirective, optional: true }, { token: i3__namespace.ErrorStateMatcher }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
669
|
-
DiscreteInputComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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: i5.MatFormFieldControl, useExisting: DiscreteInputComponent }], viewQueries: [{ propertyName: "inputParts", predicate: ["part"], descendants: true, read: i0.ElementRef }], usesInheritance: true, ngImport: i0__namespace, 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"], directives: [{ type: i2__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
670
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DiscreteInputComponent, decorators: [{
|
|
671
|
-
type: i0.Component,
|
|
672
|
-
args: [{
|
|
673
|
-
selector: 'bui-discrete-input',
|
|
674
|
-
templateUrl: 'discrete-input.component.html',
|
|
675
|
-
styleUrls: ['discrete-input.component.scss'],
|
|
676
|
-
providers: [{ provide: i5.MatFormFieldControl, useExisting: DiscreteInputComponent }],
|
|
677
|
-
host: {
|
|
678
|
-
class: 'bui-discrete-input bui-host'
|
|
679
|
-
}
|
|
680
|
-
}]
|
|
681
|
-
}], ctorParameters: function () {
|
|
682
|
-
return [{ type: i1__namespace.FocusMonitor }, { type: i0__namespace.ElementRef }, { type: i5__namespace.MatFormField, decorators: [{
|
|
683
|
-
type: i0.Optional
|
|
684
|
-
}, {
|
|
685
|
-
type: i0.Inject,
|
|
686
|
-
args: [i5.MAT_FORM_FIELD]
|
|
687
|
-
}] }, { type: i2__namespace.NgControl, decorators: [{
|
|
688
|
-
type: i0.Optional
|
|
689
|
-
}, {
|
|
690
|
-
type: i0.Self
|
|
691
|
-
}] }, { type: i2__namespace.NgForm, decorators: [{
|
|
692
|
-
type: i0.Optional
|
|
693
|
-
}] }, { type: i2__namespace.FormGroupDirective, decorators: [{
|
|
694
|
-
type: i0.Optional
|
|
695
|
-
}] }, { type: i3__namespace.ErrorStateMatcher }];
|
|
696
|
-
}, propDecorators: { type: [{
|
|
697
|
-
type: i0.Input
|
|
698
|
-
}], separator: [{
|
|
699
|
-
type: i0.Input
|
|
700
|
-
}], accept: [{
|
|
701
|
-
type: i0.Input
|
|
702
|
-
}], userAriaDescribedBy: [{
|
|
703
|
-
type: i0.Input,
|
|
704
|
-
args: ['aria-describedby']
|
|
705
|
-
}], inputParts: [{
|
|
706
|
-
type: i0.ViewChildren,
|
|
707
|
-
args: ['part', { read: i0.ElementRef }]
|
|
708
|
-
}], sizeSpec: [{
|
|
709
|
-
type: i0.Input
|
|
710
|
-
}], placeholder: [{
|
|
711
|
-
type: i0.Input
|
|
712
|
-
}], required: [{
|
|
713
|
-
type: i0.Input
|
|
714
|
-
}], disabled: [{
|
|
715
|
-
type: i0.Input
|
|
716
|
-
}], value: [{
|
|
717
|
-
type: i0.Input
|
|
718
|
-
}] } });
|
|
719
|
-
|
|
720
|
-
var DiscreteInputModule = /** @class */ (function () {
|
|
721
|
-
function DiscreteInputModule() {
|
|
722
|
-
}
|
|
723
|
-
return DiscreteInputModule;
|
|
724
|
-
}());
|
|
725
|
-
DiscreteInputModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DiscreteInputModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
726
|
-
DiscreteInputModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DiscreteInputModule, declarations: [DiscreteInputComponent], imports: [i4.CommonModule, i5.MatFormFieldModule, i2.ReactiveFormsModule, i1.A11yModule], exports: [DiscreteInputComponent] });
|
|
727
|
-
DiscreteInputModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DiscreteInputModule, imports: [[i4.CommonModule, i5.MatFormFieldModule, i2.ReactiveFormsModule, i1.A11yModule]] });
|
|
728
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DiscreteInputModule, decorators: [{
|
|
729
|
-
type: i0.NgModule,
|
|
730
|
-
args: [{
|
|
731
|
-
declarations: [DiscreteInputComponent],
|
|
732
|
-
imports: [i4.CommonModule, i5.MatFormFieldModule, i2.ReactiveFormsModule, i1.A11yModule],
|
|
733
|
-
exports: [DiscreteInputComponent]
|
|
734
|
-
}]
|
|
735
|
-
}] });
|
|
736
|
-
|
|
737
|
-
/**
|
|
738
|
-
* Generated bundle index. Do not edit.
|
|
739
|
-
*/
|
|
740
|
-
|
|
741
|
-
exports.DiscreteInputComponent = DiscreteInputComponent;
|
|
742
|
-
exports.DiscreteInputModule = DiscreteInputModule;
|
|
743
|
-
|
|
744
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
745
|
-
|
|
746
|
-
}));
|
|
747
|
-
//# sourceMappingURL=bravura-ui-discrete-input.umd.js.map
|