@bravura/ui 9.0.3 → 9.0.4
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
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
# Change history
|
|
2
2
|
|
|
3
|
+
## <small>9.0.4 (2026-07-15)</small>
|
|
4
|
+
|
|
5
|
+
* fix(decimal-input): allow decimal input used as attribute ([0fc85fe](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/0fc85fe))
|
|
6
|
+
|
|
3
7
|
## <small>9.0.3 (2026-07-14)</small>
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
- fix: update storybook ([98ce0d5](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/98ce0d5))
|
|
6
10
|
|
|
7
11
|
## <small>9.0.2 (2026-07-13)</small>
|
|
8
12
|
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import { DecimalPipe, CommonModule } from '@angular/common';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { forwardRef, HostListener, HostBinding,
|
|
2
|
+
import { input, forwardRef, HostListener, HostBinding, Self, Directive, NgModule } from '@angular/core';
|
|
3
|
+
import { DecimalPipe } from '@angular/common';
|
|
4
4
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
5
|
import { noop } from 'rxjs';
|
|
6
6
|
|
|
7
7
|
/* tslint:disable:no-empty */
|
|
8
8
|
const noop_consumer = (_) => { };
|
|
9
|
+
const optionalValue = (defaultValue) => (v) => {
|
|
10
|
+
if (v === '' || v === null || v === undefined || !Number.isFinite(v) || Number(v) < 0) {
|
|
11
|
+
return defaultValue;
|
|
12
|
+
}
|
|
13
|
+
return Number(v);
|
|
14
|
+
};
|
|
9
15
|
/**
|
|
10
16
|
* This directive will enhance an input element to format the numbers entered to a decimal amount.
|
|
11
17
|
*/
|
|
@@ -16,7 +22,7 @@ class DecimalInputDirective {
|
|
|
16
22
|
/**
|
|
17
23
|
* number of decimal places allowed
|
|
18
24
|
*/
|
|
19
|
-
this.buiDecimalInput = 2;
|
|
25
|
+
this.buiDecimalInput = input(2, { ...(ngDevMode ? { debugName: "buiDecimalInput" } : /* istanbul ignore next */ {}), transform: optionalValue(2) });
|
|
20
26
|
this.placeholder = '';
|
|
21
27
|
this.autocomplete = 'off';
|
|
22
28
|
this.type = 'number';
|
|
@@ -25,15 +31,14 @@ class DecimalInputDirective {
|
|
|
25
31
|
this.onTouch = noop;
|
|
26
32
|
}
|
|
27
33
|
ngOnChanges() {
|
|
28
|
-
this.buiDecimalInput = this.buiDecimalInput || 2;
|
|
29
34
|
this.onInput();
|
|
30
35
|
}
|
|
31
36
|
onInput() {
|
|
32
37
|
const value = this._el.nativeElement.value;
|
|
33
38
|
const decimalPart = value.split('.')[1];
|
|
34
|
-
if (decimalPart && decimalPart.length > this.buiDecimalInput) {
|
|
39
|
+
if (decimalPart && decimalPart.length > this.buiDecimalInput()) {
|
|
35
40
|
const indexOfPeriod = value.indexOf('.');
|
|
36
|
-
const newValue = value.substring(0, indexOfPeriod + this.buiDecimalInput + 1);
|
|
41
|
+
const newValue = value.substring(0, indexOfPeriod + this.buiDecimalInput() + 1);
|
|
37
42
|
this._renderer.setProperty(this._el.nativeElement, 'value', newValue);
|
|
38
43
|
}
|
|
39
44
|
const resolvedValue = this._el.nativeElement.value;
|
|
@@ -70,17 +75,16 @@ class DecimalInputDirective {
|
|
|
70
75
|
}
|
|
71
76
|
const splitValues = value.split('.');
|
|
72
77
|
let newValue = '';
|
|
73
|
-
if (splitValues[1] && splitValues[1].length > this.buiDecimalInput) {
|
|
74
|
-
newValue = value.substring(0, splitValues[0].length + 1 + this.buiDecimalInput);
|
|
78
|
+
if (splitValues[1] && splitValues[1].length > this.buiDecimalInput()) {
|
|
79
|
+
newValue = value.substring(0, splitValues[0].length + 1 + this.buiDecimalInput());
|
|
75
80
|
}
|
|
76
81
|
else {
|
|
77
|
-
|
|
78
|
-
newValue = Number(value).toFixed(this.buiDecimalInput);
|
|
82
|
+
newValue = Number(value).toFixed(this.buiDecimalInput());
|
|
79
83
|
}
|
|
80
84
|
this._renderer.setProperty(this._el.nativeElement, 'value', newValue);
|
|
81
85
|
}
|
|
82
86
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DecimalInputDirective, deps: [{ token: i0.ElementRef, self: true }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
83
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
87
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: DecimalInputDirective, isStandalone: true, selector: "input[buiDecimalInput]", inputs: { buiDecimalInput: { classPropertyName: "buiDecimalInput", publicName: "buiDecimalInput", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "input": "onInput()", "keypress": "onKeypress($event)", "blur": "onblur()" }, properties: { "placeholder": "this.placeholder", "autocomplete": "this.autocomplete", "type": "this.type", "attr.inputmode": "this.inputMode" } }, providers: [
|
|
84
88
|
DecimalPipe,
|
|
85
89
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DecimalInputDirective), multi: true }
|
|
86
90
|
], usesOnChanges: true, ngImport: i0 }); }
|
|
@@ -92,14 +96,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
92
96
|
providers: [
|
|
93
97
|
DecimalPipe,
|
|
94
98
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DecimalInputDirective), multi: true }
|
|
95
|
-
]
|
|
96
|
-
standalone: false
|
|
99
|
+
]
|
|
97
100
|
}]
|
|
98
101
|
}], ctorParameters: () => [{ type: i0.ElementRef, decorators: [{
|
|
99
102
|
type: Self
|
|
100
|
-
}] }, { type: i0.Renderer2 }], propDecorators: { buiDecimalInput: [{
|
|
101
|
-
type: Input
|
|
102
|
-
}], placeholder: [{
|
|
103
|
+
}] }, { type: i0.Renderer2 }], propDecorators: { buiDecimalInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "buiDecimalInput", required: false }] }], placeholder: [{
|
|
103
104
|
type: HostBinding,
|
|
104
105
|
args: ['placeholder']
|
|
105
106
|
}], autocomplete: [{
|
|
@@ -124,14 +125,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
124
125
|
|
|
125
126
|
class DecimalInputModule {
|
|
126
127
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DecimalInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
127
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.6", ngImport: i0, type: DecimalInputModule,
|
|
128
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DecimalInputModule
|
|
128
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.6", ngImport: i0, type: DecimalInputModule, imports: [DecimalInputDirective], exports: [DecimalInputDirective] }); }
|
|
129
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DecimalInputModule }); }
|
|
129
130
|
}
|
|
130
131
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DecimalInputModule, decorators: [{
|
|
131
132
|
type: NgModule,
|
|
132
133
|
args: [{
|
|
133
|
-
|
|
134
|
-
imports: [CommonModule],
|
|
134
|
+
imports: [DecimalInputDirective],
|
|
135
135
|
exports: [DecimalInputDirective]
|
|
136
136
|
}]
|
|
137
137
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bravura-ui-decimal-input.mjs","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';\
|
|
1
|
+
{"version":3,"file":"bravura-ui-decimal-input.mjs","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\nconst optionalValue = (defaultValue: number) => (v: unknown) => {\n\tif (v === '' || v === null || v === undefined || !Number.isFinite(v) || Number(v) < 0) {\n\t\treturn defaultValue;\n\t}\n\treturn Number(v);\n};\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\n\tbuiDecimalInput = input(2, {\n\t\ttransform: optionalValue(2)\n\t});\n\n\t@HostBinding('placeholder')\n\tplaceholder: string = '';\n\n\t@HostBinding('autocomplete')\n\tautocomplete = 'off';\n\n\t@HostBinding('type')\n\ttype = 'number';\n\n\t@HostBinding('attr.inputmode')\n\tinputMode = 'decimal';\n\n\tprivate change = noop_consumer;\n\tprivate onTouch = noop;\n\n\tconstructor(\n\t\t@Self() private _el: ElementRef<HTMLInputElement>,\n\t\tprivate _renderer: Renderer2\n\t) {}\n\n\tngOnChanges(): void {\n\t\tthis.onInput();\n\t}\n\n\t@HostListener('input')\n\tonInput() {\n\t\tconst value = this._el.nativeElement.value;\n\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\tconst resolvedValue = this._el.nativeElement.value;\n\t\tthis.change(\n\t\t\tresolvedValue === '' || resolvedValue === null || resolvedValue === undefined ? null : Number(resolvedValue)\n\t\t);\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('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\tthis._resetDecimalPlaces();\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\tnewValue = Number(value).toFixed(this.buiDecimalInput());\n\t\t}\n\t\tthis._renderer.setProperty(this._el.nativeElement, 'value', newValue);\n\t}\n}\n","import { NgModule } from '@angular/core';\nimport { DecimalInputDirective } from './decimal-input.directive';\n\n@NgModule({\n\timports: [DecimalInputDirective],\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":[],"mappings":";;;;;;AAeA;AACO,MAAM,aAAa,GAAG,CAAC,CAAM,KAAI,EAAE,CAAC;AAE3C,MAAM,aAAa,GAAG,CAAC,YAAoB,KAAK,CAAC,CAAU,KAAI;IAC9D,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;AACtF,QAAA,OAAO,YAAY;IACpB;AACA,IAAA,OAAO,MAAM,CAAC,CAAC,CAAC;AACjB,CAAC;AAED;;AAEG;MAQU,qBAAqB,CAAA;IAwBjC,WAAA,CACiB,GAAiC,EACzC,SAAoB,EAAA;QADZ,IAAA,CAAA,GAAG,GAAH,GAAG;QACX,IAAA,CAAA,SAAS,GAAT,SAAS;AAzBlB;;AAEG;AAEH,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAC,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,iBAAA,EAAA,8BAAA,EAAA,CAAA,EACxB,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,EAAA,CAC1B;QAGF,IAAA,CAAA,WAAW,GAAW,EAAE;QAGxB,IAAA,CAAA,YAAY,GAAG,KAAK;QAGpB,IAAA,CAAA,IAAI,GAAG,QAAQ;QAGf,IAAA,CAAA,SAAS,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FAEW,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,wBAAwB;AAClC,oBAAA,SAAS,EAAE;wBACV,WAAW;AACX,wBAAA,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,2BAA2B,CAAC,EAAE,KAAK,EAAE,IAAI;AAC/F;AACD,iBAAA;;0BA0BE;;sBAhBD,WAAW;uBAAC,aAAa;;sBAGzB,WAAW;uBAAC,cAAc;;sBAG1B,WAAW;uBAAC,MAAM;;sBAGlB,WAAW;uBAAC,gBAAgB;;sBAe5B,YAAY;uBAAC,OAAO;;sBAiBpB,YAAY;uBAAC,UAAU,EAAE,CAAC,QAAQ,CAAC;;sBAenC,YAAY;uBAAC,MAAM;;;MC7FR,kBAAkB,CAAA;8GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAlB,kBAAkB,EAAA,OAAA,EAAA,CAHpB,qBAAqB,CAAA,EAAA,OAAA,EAAA,CACrB,qBAAqB,CAAA,EAAA,CAAA,CAAA;+GAEnB,kBAAkB,EAAA,CAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,OAAO,EAAE,CAAC,qBAAqB,CAAC;oBAChC,OAAO,EAAE,CAAC,qBAAqB;AAC/B,iBAAA;;;ACND;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { OnChanges, ElementRef, Renderer2 } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor } from '@angular/forms';
|
|
4
|
-
import * as i2 from '@angular/common';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* This directive will enhance an input element to format the numbers entered to a decimal amount.
|
|
@@ -12,7 +11,7 @@ declare class DecimalInputDirective implements OnChanges, ControlValueAccessor {
|
|
|
12
11
|
/**
|
|
13
12
|
* number of decimal places allowed
|
|
14
13
|
*/
|
|
15
|
-
buiDecimalInput: number
|
|
14
|
+
buiDecimalInput: i0.InputSignalWithTransform<number, unknown>;
|
|
16
15
|
placeholder: string;
|
|
17
16
|
autocomplete: string;
|
|
18
17
|
type: string;
|
|
@@ -29,12 +28,12 @@ declare class DecimalInputDirective implements OnChanges, ControlValueAccessor {
|
|
|
29
28
|
registerOnTouched(fn: any): void;
|
|
30
29
|
private _resetDecimalPlaces;
|
|
31
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<DecimalInputDirective, [{ self: true; }, null]>;
|
|
32
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DecimalInputDirective, "input[buiDecimalInput]", never, { "buiDecimalInput": { "alias": "buiDecimalInput"; "required": false; }; }, {}, never, never,
|
|
31
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DecimalInputDirective, "input[buiDecimalInput]", never, { "buiDecimalInput": { "alias": "buiDecimalInput"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
declare class DecimalInputModule {
|
|
36
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<DecimalInputModule, never>;
|
|
37
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DecimalInputModule,
|
|
36
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DecimalInputModule, never, [typeof DecimalInputDirective], [typeof DecimalInputDirective]>;
|
|
38
37
|
static ɵinj: i0.ɵɵInjectorDeclaration<DecimalInputModule>;
|
|
39
38
|
}
|
|
40
39
|
|