@bravura/ui 1.21.4 → 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 +24 -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/esm2020/tooltip/tooltip.directive.mjs +118 -0
- 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} +28 -45
- package/fesm2020/bravura-ui-stepper.mjs.map +1 -0
- package/{fesm2015/bravura-ui-tooltip.js → fesm2020/bravura-ui-tooltip.mjs} +22 -23
- 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 +3 -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 -578
- 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.directive.js +0 -110
- 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,176 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('rxjs')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@bravura/ui/decimal-input', ['exports', '@angular/common', '@angular/core', '@angular/forms', 'rxjs'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.bravura = global.bravura || {}, global.bravura.ui = global.bravura.ui || {}, global.bravura.ui["decimal-input"] = {}), global.ng.common, global.ng.core, global.ng.forms, global.rxjs));
|
|
5
|
-
})(this, (function (exports, common, i0, forms, rxjs) { '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
|
-
|
|
27
|
-
/* tslint:disable:no-empty */
|
|
28
|
-
var noop_consumer = function (_) { };
|
|
29
|
-
/**
|
|
30
|
-
* This directive will enhance an input element to format the numbers entered to a decimal amount.
|
|
31
|
-
*/
|
|
32
|
-
var DecimalInputDirective = /** @class */ (function () {
|
|
33
|
-
function DecimalInputDirective(_el, _renderer) {
|
|
34
|
-
this._el = _el;
|
|
35
|
-
this._renderer = _renderer;
|
|
36
|
-
/**
|
|
37
|
-
* number of decimal places allowed
|
|
38
|
-
*/
|
|
39
|
-
this.buiDecimalInput = 2;
|
|
40
|
-
this.placeholder = '';
|
|
41
|
-
this.autocomplete = 'off';
|
|
42
|
-
this.type = 'number';
|
|
43
|
-
this.inputMode = 'decimal';
|
|
44
|
-
this.change = noop_consumer;
|
|
45
|
-
this.onTouch = rxjs.noop;
|
|
46
|
-
}
|
|
47
|
-
DecimalInputDirective.prototype.ngOnChanges = function () {
|
|
48
|
-
this.buiDecimalInput = this.buiDecimalInput || 2;
|
|
49
|
-
this.onInput();
|
|
50
|
-
};
|
|
51
|
-
DecimalInputDirective.prototype.onInput = function () {
|
|
52
|
-
var value = this._el.nativeElement.value;
|
|
53
|
-
var decimalPart = value.split('.')[1];
|
|
54
|
-
if (decimalPart && decimalPart.length > this.buiDecimalInput) {
|
|
55
|
-
var indexOfPeriod = value.indexOf('.');
|
|
56
|
-
var newValue = value.substring(0, indexOfPeriod + this.buiDecimalInput + 1);
|
|
57
|
-
this._renderer.setProperty(this._el.nativeElement, 'value', newValue);
|
|
58
|
-
}
|
|
59
|
-
this.change(Number(this._el.nativeElement.value));
|
|
60
|
-
};
|
|
61
|
-
DecimalInputDirective.prototype.onKeypress = function (evt) {
|
|
62
|
-
var target = evt.target;
|
|
63
|
-
var value = target.value;
|
|
64
|
-
var isSpace = evt.key === ' ';
|
|
65
|
-
if (isSpace ||
|
|
66
|
-
(!['.', '-'].includes(evt.key) && isNaN(Number(evt.key))) ||
|
|
67
|
-
(evt.key === '.' && value.indexOf('.') > 0)) {
|
|
68
|
-
evt.preventDefault();
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
DecimalInputDirective.prototype.onFocus = function () { };
|
|
72
|
-
DecimalInputDirective.prototype.onblur = function () {
|
|
73
|
-
this.onTouch();
|
|
74
|
-
this._resetDecimalPlaces();
|
|
75
|
-
};
|
|
76
|
-
DecimalInputDirective.prototype.writeValue = function (value) {
|
|
77
|
-
this._renderer.setProperty(this._el.nativeElement, 'value', value);
|
|
78
|
-
};
|
|
79
|
-
DecimalInputDirective.prototype.registerOnChange = function (fn) {
|
|
80
|
-
this.change = fn;
|
|
81
|
-
};
|
|
82
|
-
DecimalInputDirective.prototype.registerOnTouched = function (fn) {
|
|
83
|
-
this.onTouch = fn;
|
|
84
|
-
};
|
|
85
|
-
DecimalInputDirective.prototype._resetDecimalPlaces = function () {
|
|
86
|
-
var value = this._el.nativeElement.value;
|
|
87
|
-
if (value === '' || value === null || value === undefined) {
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
var splitValues = value.split('.');
|
|
91
|
-
var newValue = '';
|
|
92
|
-
if (splitValues[1] && splitValues[1].length > this.buiDecimalInput) {
|
|
93
|
-
newValue = value.substring(0, splitValues[0].length + 1 + this.buiDecimalInput);
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
this.buiDecimalInput = this.buiDecimalInput < 0 ? 0 : this.buiDecimalInput;
|
|
97
|
-
newValue = Number(value).toFixed(this.buiDecimalInput);
|
|
98
|
-
}
|
|
99
|
-
this._renderer.setProperty(this._el.nativeElement, 'value', newValue);
|
|
100
|
-
};
|
|
101
|
-
return DecimalInputDirective;
|
|
102
|
-
}());
|
|
103
|
-
DecimalInputDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DecimalInputDirective, deps: [{ token: i0__namespace.ElementRef, self: true }, { token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
104
|
-
DecimalInputDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: DecimalInputDirective, selector: "input[buiDecimalInput]", inputs: { buiDecimalInput: "buiDecimalInput" }, host: { listeners: { "input": "onInput()", "keypress": "onKeypress($event)", "focus": "onFocus()", "blur": "onblur()" }, properties: { "placeholder": "this.placeholder", "autocomplete": "this.autocomplete", "type": "this.type", "attr.inputmode": "this.inputMode" } }, providers: [
|
|
105
|
-
common.DecimalPipe,
|
|
106
|
-
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: i0.forwardRef(function () { return DecimalInputDirective; }), multi: true }
|
|
107
|
-
], usesOnChanges: true, ngImport: i0__namespace });
|
|
108
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DecimalInputDirective, decorators: [{
|
|
109
|
-
type: i0.Directive,
|
|
110
|
-
args: [{
|
|
111
|
-
selector: 'input[buiDecimalInput]',
|
|
112
|
-
providers: [
|
|
113
|
-
common.DecimalPipe,
|
|
114
|
-
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: i0.forwardRef(function () { return DecimalInputDirective; }), multi: true }
|
|
115
|
-
]
|
|
116
|
-
}]
|
|
117
|
-
}], ctorParameters: function () {
|
|
118
|
-
return [{ type: i0__namespace.ElementRef, decorators: [{
|
|
119
|
-
type: i0.Self
|
|
120
|
-
}] }, { type: i0__namespace.Renderer2 }];
|
|
121
|
-
}, propDecorators: { buiDecimalInput: [{
|
|
122
|
-
type: i0.Input
|
|
123
|
-
}], placeholder: [{
|
|
124
|
-
type: i0.HostBinding,
|
|
125
|
-
args: ['placeholder']
|
|
126
|
-
}], autocomplete: [{
|
|
127
|
-
type: i0.HostBinding,
|
|
128
|
-
args: ['autocomplete']
|
|
129
|
-
}], type: [{
|
|
130
|
-
type: i0.HostBinding,
|
|
131
|
-
args: ['type']
|
|
132
|
-
}], inputMode: [{
|
|
133
|
-
type: i0.HostBinding,
|
|
134
|
-
args: ['attr.inputmode']
|
|
135
|
-
}], onInput: [{
|
|
136
|
-
type: i0.HostListener,
|
|
137
|
-
args: ['input']
|
|
138
|
-
}], onKeypress: [{
|
|
139
|
-
type: i0.HostListener,
|
|
140
|
-
args: ['keypress', ['$event']]
|
|
141
|
-
}], onFocus: [{
|
|
142
|
-
type: i0.HostListener,
|
|
143
|
-
args: ['focus']
|
|
144
|
-
}], onblur: [{
|
|
145
|
-
type: i0.HostListener,
|
|
146
|
-
args: ['blur']
|
|
147
|
-
}] } });
|
|
148
|
-
|
|
149
|
-
var DecimalInputModule = /** @class */ (function () {
|
|
150
|
-
function DecimalInputModule() {
|
|
151
|
-
}
|
|
152
|
-
return DecimalInputModule;
|
|
153
|
-
}());
|
|
154
|
-
DecimalInputModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DecimalInputModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
155
|
-
DecimalInputModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DecimalInputModule, declarations: [DecimalInputDirective], imports: [common.CommonModule], exports: [DecimalInputDirective] });
|
|
156
|
-
DecimalInputModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DecimalInputModule, imports: [[common.CommonModule]] });
|
|
157
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DecimalInputModule, decorators: [{
|
|
158
|
-
type: i0.NgModule,
|
|
159
|
-
args: [{
|
|
160
|
-
declarations: [DecimalInputDirective],
|
|
161
|
-
imports: [common.CommonModule],
|
|
162
|
-
exports: [DecimalInputDirective]
|
|
163
|
-
}]
|
|
164
|
-
}] });
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Generated bundle index. Do not edit.
|
|
168
|
-
*/
|
|
169
|
-
|
|
170
|
-
exports.DecimalInputDirective = DecimalInputDirective;
|
|
171
|
-
exports.DecimalInputModule = DecimalInputModule;
|
|
172
|
-
|
|
173
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
174
|
-
|
|
175
|
-
}));
|
|
176
|
-
//# sourceMappingURL=bravura-ui-decimal-input.umd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bravura-ui-decimal-input.umd.js","sources":["../../../projects/ui/decimal-input/decimal-input.directive.ts","../../../projects/ui/decimal-input/decimal-input.module.ts","../../../projects/ui/decimal-input/bravura-ui-decimal-input.ts"],"sourcesContent":["import { DecimalPipe } from '@angular/common';\nimport {\n\tDirective,\n\tElementRef,\n\tforwardRef,\n\tHostBinding,\n\tHostListener,\n\tInput,\n\tOnChanges,\n\tRenderer2,\n\tSelf\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { noop } from 'rxjs';\n\n/* tslint:disable:no-empty */\nexport const noop_consumer = (_: any) => {};\n\n/**\n * This directive will enhance an input element to format the numbers entered to a decimal amount.\n */\n@Directive({\n\tselector: 'input[buiDecimalInput]',\n\tproviders: [\n\t\tDecimalPipe,\n\t\t{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DecimalInputDirective), multi: true }\n\t]\n})\nexport class DecimalInputDirective implements OnChanges, ControlValueAccessor {\n\t/**\n\t * number of decimal places allowed\n\t */\n\t@Input()\n\tbuiDecimalInput: number = 2;\n\n\t@HostBinding('placeholder')\n\tprivate placeholder: string = '';\n\n\t@HostBinding('autocomplete')\n\tprivate autocomplete = 'off';\n\n\t@HostBinding('type')\n\tprivate type = 'number';\n\n\t@HostBinding('attr.inputmode')\n\tprivate inputMode = 'decimal';\n\n\tprivate change = noop_consumer;\n\tprivate onTouch = noop;\n\n\tconstructor(@Self() private _el: ElementRef<HTMLInputElement>, private _renderer: Renderer2) {}\n\n\tngOnChanges(): void {\n\t\tthis.buiDecimalInput = this.buiDecimalInput || 2;\n\t\tthis.onInput();\n\t}\n\n\t@HostListener('input')\n\tonInput() {\n\t\tconst value = this._el.nativeElement.value;\n\t\tconst decimalPart = value.split('.')[1];\n\n\t\tif (decimalPart && decimalPart.length > this.buiDecimalInput) {\n\t\t\tconst indexOfPeriod = value.indexOf('.');\n\t\t\tconst newValue = value.substring(0, indexOfPeriod + this.buiDecimalInput + 1);\n\t\t\tthis._renderer.setProperty(this._el.nativeElement, 'value', newValue);\n\t\t}\n\t\tthis.change(Number(this._el.nativeElement.value));\n\t}\n\n\t@HostListener('keypress', ['$event'])\n\tonKeypress(evt: KeyboardEvent) {\n\t\tconst target = evt.target as HTMLInputElement;\n\t\tconst value = target.value;\n\t\tconst isSpace = evt.key === ' ';\n\n\t\tif (\n\t\t\tisSpace ||\n\t\t\t(!['.', '-'].includes(evt.key) && isNaN(Number(evt.key))) ||\n\t\t\t(evt.key === '.' && value.indexOf('.') > 0)\n\t\t) {\n\t\t\tevt.preventDefault();\n\t\t}\n\t}\n\n\t@HostListener('focus')\n\tonFocus() {}\n\n\t@HostListener('blur')\n\tonblur() {\n\t\tthis.onTouch();\n\t\tthis._resetDecimalPlaces();\n\t}\n\n\twriteValue(value: any) {\n\t\tthis._renderer.setProperty(this._el.nativeElement, 'value', value);\n\t}\n\n\tregisterOnChange(fn: any) {\n\t\tthis.change = fn;\n\t}\n\n\tregisterOnTouched(fn: any) {\n\t\tthis.onTouch = fn;\n\t}\n\n\tprivate _resetDecimalPlaces() {\n\t\tconst value = this._el.nativeElement.value;\n\t\tif (value === '' || value === null || value === undefined) {\n\t\t\treturn;\n\t\t}\n\t\tconst splitValues = value.split('.');\n\t\tlet newValue = '';\n\t\tif (splitValues[1] && splitValues[1].length > this.buiDecimalInput) {\n\t\t\tnewValue = value.substring(0, splitValues[0].length + 1 + this.buiDecimalInput);\n\t\t} else {\n\t\t\tthis.buiDecimalInput = this.buiDecimalInput < 0 ? 0 : this.buiDecimalInput;\n\t\t\tnewValue = Number(value).toFixed(this.buiDecimalInput);\n\t\t}\n\t\tthis._renderer.setProperty(this._el.nativeElement, 'value', newValue);\n\t}\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { DecimalInputDirective } from './decimal-input.directive';\n\n@NgModule({\n\tdeclarations: [DecimalInputDirective],\n\timports: [CommonModule],\n\texports: [DecimalInputDirective]\n})\nexport class DecimalInputModule {}\nexport { DecimalInputDirective };\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["noop","DecimalPipe","NG_VALUE_ACCESSOR","forwardRef","Directive","Self","Input","HostBinding","HostListener","CommonModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;IAeA;IACO,IAAM,aAAa,GAAG,UAAC,CAAM,KAAO,CAAC;IAE5C;;;;QAgCC,+BAA4B,GAAiC,EAAU,SAAoB;YAA/D,QAAG,GAAH,GAAG,CAA8B;YAAU,cAAS,GAAT,SAAS,CAAW;;;;YAjB3F,oBAAe,GAAW,CAAC,CAAC;YAGpB,gBAAW,GAAW,EAAE,CAAC;YAGzB,iBAAY,GAAG,KAAK,CAAC;YAGrB,SAAI,GAAG,QAAQ,CAAC;YAGhB,cAAS,GAAG,SAAS,CAAC;YAEtB,WAAM,GAAG,aAAa,CAAC;YACvB,YAAO,GAAGA,SAAI,CAAC;SAEwE;QAE/F,2CAAW,GAAX;YACC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,IAAI,CAAC,CAAC;YACjD,IAAI,CAAC,OAAO,EAAE,CAAC;SACf;QAGD,uCAAO,GAAP;YACC,IAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC;YAC3C,IAAM,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAExC,IAAI,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,eAAe,EAAE;gBAC7D,IAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;gBACzC,IAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC;gBAC9E,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,EAAE,QAAQ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