@eui/components 18.2.10 → 18.2.11-snapshot-1741683119621
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/docs/components/EuiDropdownComponent.html +1 -1
- package/docs/dependencies.html +2 -2
- package/docs/js/search/search_index.js +2 -2
- package/esm2022/eui-autocomplete/eui-autocomplete.component.mjs +6 -2
- package/esm2022/eui-dropdown/eui-dropdown.component.mjs +15 -13
- package/esm2022/eui-input-number/eui-input-number.component.mjs +115 -34
- package/esm2022/eui-input-number/eui-number-control.directive.mjs +11 -3
- package/esm2022/eui-popover/eui-popover.component.mjs +6 -2
- package/esm2022/externals/eui-editor/eui-editor.component.mjs +33 -17
- package/eui-autocomplete/eui-autocomplete.component.d.ts.map +1 -1
- package/eui-dropdown/eui-dropdown.component.d.ts +3 -1
- package/eui-dropdown/eui-dropdown.component.d.ts.map +1 -1
- package/eui-input-number/eui-input-number.component.d.ts +18 -2
- package/eui-input-number/eui-input-number.component.d.ts.map +1 -1
- package/eui-input-number/eui-number-control.directive.d.ts +6 -0
- package/eui-input-number/eui-number-control.directive.d.ts.map +1 -1
- package/eui-popover/eui-popover.component.d.ts.map +1 -1
- package/externals/eui-editor/eui-editor.component.d.ts +1 -0
- package/externals/eui-editor/eui-editor.component.d.ts.map +1 -1
- package/fesm2022/eui-components-eui-autocomplete.mjs +5 -1
- package/fesm2022/eui-components-eui-autocomplete.mjs.map +1 -1
- package/fesm2022/eui-components-eui-dropdown.mjs +14 -12
- package/fesm2022/eui-components-eui-dropdown.mjs.map +1 -1
- package/fesm2022/eui-components-eui-input-number.mjs +123 -34
- package/fesm2022/eui-components-eui-input-number.mjs.map +1 -1
- package/fesm2022/eui-components-eui-popover.mjs +5 -1
- package/fesm2022/eui-components-eui-popover.mjs.map +1 -1
- package/fesm2022/eui-components-externals-eui-editor.mjs +32 -16
- package/fesm2022/eui-components-externals-eui-editor.mjs.map +1 -1
- package/package.json +4 -4
@@ -131,8 +131,8 @@ class EuiInputNumberComponent extends InputDirective {
|
|
131
131
|
if (Object.hasOwn(changes, 'roundUp')) {
|
132
132
|
if (changes['roundUp'].currentValue > 0) {
|
133
133
|
if (this.cleaveInstance) {
|
134
|
-
let number =
|
135
|
-
number = this.decimalAdjust(number, this.roundUp
|
134
|
+
let number = this.parseNumber(this.cleaveInstance.getRawValue(), false, false);
|
135
|
+
number = this.decimalAdjust(number, this.roundUp);
|
136
136
|
this.cleaveInstance.setRawValue(number.toString());
|
137
137
|
}
|
138
138
|
}
|
@@ -141,7 +141,7 @@ class EuiInputNumberComponent extends InputDirective {
|
|
141
141
|
// parse number
|
142
142
|
const number = this.parseNumber(changes['placeholder'].currentValue?.toString() || undefined);
|
143
143
|
// set placeholder in case none is provided
|
144
|
-
this.setPlaceholderAttribute(
|
144
|
+
this.setPlaceholderAttribute(!this.isItaNumber(number.toString()) ? changes['placeholder'].currentValue : number);
|
145
145
|
}
|
146
146
|
}
|
147
147
|
ngOnDestroy() {
|
@@ -160,19 +160,19 @@ class EuiInputNumberComponent extends InputDirective {
|
|
160
160
|
// create a clone of cleaveInstance
|
161
161
|
const cloneInstance = new Cleave(div, { ...this.options, numeralDecimalScale: 8 });
|
162
162
|
cloneInstance.setRawValue(value.toString());
|
163
|
-
let number =
|
164
|
-
number = this.decimalAdjust(number, this.roundUp
|
165
|
-
if (
|
166
|
-
this.cleaveInstance.setRawValue(number.toString());
|
163
|
+
let number = this.parseNumber(cloneInstance.getRawValue(), false, false);
|
164
|
+
number = this.decimalAdjust(number, this.roundUp);
|
165
|
+
if (this.isItaNumber(number.toString())) {
|
167
166
|
// TODO: investigate in the future how can this be avoided
|
168
167
|
setTimeout(() => {
|
168
|
+
this.cleaveInstance.setRawValue(number.toString());
|
169
169
|
// this.writeValue(number.toString());
|
170
170
|
}, 0);
|
171
171
|
}
|
172
172
|
}
|
173
173
|
}
|
174
174
|
onKeyDown(e) {
|
175
|
-
// check if it's a single symbol and not Special like (Ctrl, backspace etc)
|
175
|
+
// check if it's a single symbol and not Special like (Ctrl, backspace etc.)
|
176
176
|
if (e?.key?.length <= 1 && !e.ctrlKey && !e.altKey && !e.metaKey) {
|
177
177
|
// stop event propagation if key pressed is not a number or locale character or minus sign
|
178
178
|
if (Number.isNaN(Number.parseInt(e.key, 10)) &&
|
@@ -219,8 +219,8 @@ class EuiInputNumberComponent extends InputDirective {
|
|
219
219
|
}
|
220
220
|
// in case round UP is enabled
|
221
221
|
if (this.roundUp > 0) {
|
222
|
-
const number =
|
223
|
-
this.cleaveInstance.setRawValue(this.decimalAdjust(number, this.roundUp
|
222
|
+
const number = this.parseNumber(this.cleaveInstance.getRawValue(), false, false);
|
223
|
+
this.cleaveInstance.setRawValue(this.decimalAdjust(number, this.roundUp).toString());
|
224
224
|
}
|
225
225
|
// in case min is set and value is less than min reset to the min value
|
226
226
|
if (this.min !== null && this.min !== undefined && Number.parseFloat(this.cleaveInstance.getRawValue()) < this.min) {
|
@@ -289,8 +289,8 @@ class EuiInputNumberComponent extends InputDirective {
|
|
289
289
|
opts.onValueChanged = onChangeCallback || this.onValueChanged.bind(this);
|
290
290
|
// in case round UP is enabled
|
291
291
|
if (this.roundUp > 0) {
|
292
|
-
const number =
|
293
|
-
this._elementRef.nativeElement.value = this.decimalAdjust(number, this.roundUp
|
292
|
+
const number = this.parseNumber(this._elementRef.nativeElement.value);
|
293
|
+
this._elementRef.nativeElement.value = this.decimalAdjust(number, this.roundUp);
|
294
294
|
}
|
295
295
|
// create the Cleave instance with the new or updated options
|
296
296
|
this.cleaveInstance = new Cleave(this._elementRef.nativeElement, opts);
|
@@ -331,7 +331,7 @@ class EuiInputNumberComponent extends InputDirective {
|
|
331
331
|
if (this.fillFraction) {
|
332
332
|
this.applyFractionFill(target.rawValue);
|
333
333
|
}
|
334
|
-
this.onChange(
|
334
|
+
this.onChange(this.parseNumber(target.rawValue, false, false));
|
335
335
|
// fill leading zero
|
336
336
|
if (this.leadingZero) {
|
337
337
|
const size = this.leadingZero > this.digits && this.digits > 0 ? this.digits : this.leadingZero;
|
@@ -400,9 +400,10 @@ class EuiInputNumberComponent extends InputDirective {
|
|
400
400
|
*
|
401
401
|
* @param value The formatted number you want to parse e.g. 111,888.22
|
402
402
|
* @param userPrevLocaleState Use previous locale state to parse the value. By default, is false
|
403
|
+
* @param replaceSymbol Replace the decimal symbol with a dot. By default, is false
|
403
404
|
* @private
|
404
405
|
*/
|
405
|
-
parseNumber(value, userPrevLocaleState = false) {
|
406
|
+
parseNumber(value, userPrevLocaleState = false, replaceSymbol = true) {
|
406
407
|
// locale state
|
407
408
|
const locale = userPrevLocaleState ? this.localeService?.previousLocale : this.localeService?.currentLocale || this.locale_id || 'en';
|
408
409
|
// get decimal and group symbols
|
@@ -410,7 +411,7 @@ class EuiInputNumberComponent extends InputDirective {
|
|
410
411
|
const groupSymbol = getLocaleNumberSymbol(locale, NumberSymbol.Group);
|
411
412
|
// replace symbols to parse number
|
412
413
|
const parsedNumber = value?.split(groupSymbol).join('').split(decimalSymbol).join('.');
|
413
|
-
return
|
414
|
+
return this.parseBigNumber(replaceSymbol ? parsedNumber : value);
|
414
415
|
}
|
415
416
|
/**
|
416
417
|
* Pad leading zero to the number
|
@@ -481,27 +482,85 @@ class EuiInputNumberComponent extends InputDirective {
|
|
481
482
|
/**
|
482
483
|
* Decimal adjustment of a number.
|
483
484
|
*
|
484
|
-
* @param
|
485
|
+
* @param value The number or string representation of a number.
|
485
486
|
* @param exp The exponent (the 10 logarithm of the adjustment base).
|
486
487
|
* @returns The adjusted value.
|
487
488
|
*/
|
488
489
|
decimalAdjust(value, exp) {
|
489
|
-
//
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
490
|
+
// Ensure exp is a number
|
491
|
+
exp = +Number(exp);
|
492
|
+
// Convert input to string if it's a number
|
493
|
+
const valueStr = typeof value === 'number' ? value.toString() : String(value);
|
494
|
+
// Handle empty or invalid inputs
|
495
|
+
if (!valueStr || isNaN(Number(valueStr))) {
|
496
|
+
return '';
|
497
|
+
}
|
498
|
+
try {
|
499
|
+
// Check if the value is negative
|
500
|
+
const isNegative = valueStr.startsWith('-');
|
501
|
+
// Get the absolute value string
|
502
|
+
const absoluteValueStr = isNegative ? valueStr.substring(1) : valueStr;
|
503
|
+
// Split the number into integer and decimal parts
|
504
|
+
const parts = absoluteValueStr.split('.');
|
505
|
+
let integerPart = parts[0] || '0'; // Default to '0' if empty
|
506
|
+
let decimalPart = parts.length > 1 ? parts[1] : '';
|
507
|
+
// If there's no decimal part and exp > 0, we should add zeros
|
508
|
+
if (decimalPart === '' && exp > 0) {
|
509
|
+
decimalPart = '0'.repeat(exp);
|
510
|
+
}
|
511
|
+
// Pad decimal part with zeros if needed
|
512
|
+
if (decimalPart.length < exp) {
|
513
|
+
decimalPart = decimalPart.padEnd(exp, '0');
|
514
|
+
}
|
515
|
+
// Determine if we need to round up
|
516
|
+
let roundUp = false;
|
517
|
+
if (decimalPart.length > exp) {
|
518
|
+
const nextDigit = parseInt(decimalPart.charAt(exp), 10);
|
519
|
+
roundUp = nextDigit >= 5;
|
520
|
+
}
|
521
|
+
// Trim the decimal part to the required precision
|
522
|
+
decimalPart = decimalPart.substring(0, exp);
|
523
|
+
// Handle rounding
|
524
|
+
if (roundUp) {
|
525
|
+
if (exp === 0) {
|
526
|
+
// If exp is 0, we need to round the integer part
|
527
|
+
integerPart = (BigInt(integerPart) + 1n).toString();
|
528
|
+
}
|
529
|
+
else {
|
530
|
+
// Create a number from the decimal part
|
531
|
+
let decimalNum = parseInt(decimalPart, 10);
|
532
|
+
// Add 1 to the decimal part
|
533
|
+
decimalNum += 1;
|
534
|
+
// Check if we need to carry over to the integer part
|
535
|
+
if (decimalNum.toString().length > exp) {
|
536
|
+
integerPart = (BigInt(integerPart) + 1n).toString();
|
537
|
+
decimalNum = 0;
|
538
|
+
}
|
539
|
+
// Convert back to string and pad with leading zeros if needed
|
540
|
+
decimalPart = decimalNum.toString().padStart(exp, '0');
|
541
|
+
}
|
542
|
+
}
|
543
|
+
// Combine the parts
|
544
|
+
let result;
|
545
|
+
if (exp > 0) {
|
546
|
+
// Remove trailing zeros if they're not significant
|
547
|
+
let trimmedDecimalPart = decimalPart;
|
548
|
+
while (trimmedDecimalPart.length > 0 && trimmedDecimalPart.charAt(trimmedDecimalPart.length - 1) === '0') {
|
549
|
+
trimmedDecimalPart = trimmedDecimalPart.substring(0, trimmedDecimalPart.length - 1);
|
550
|
+
}
|
551
|
+
result = trimmedDecimalPart.length > 0 ? `${integerPart}.${trimmedDecimalPart}` : integerPart;
|
552
|
+
}
|
553
|
+
else {
|
554
|
+
result = integerPart;
|
555
|
+
}
|
556
|
+
// Restore the negative sign if needed
|
557
|
+
return isNegative ? '-' + result : result;
|
558
|
+
}
|
559
|
+
catch (error) {
|
560
|
+
console.error('Error in decimalAdjust:', error);
|
561
|
+
// If there's an error, return a formatted original value or '0'
|
562
|
+
return valueStr || '0';
|
563
|
+
}
|
505
564
|
}
|
506
565
|
/**
|
507
566
|
* Checks whether a value is defined or not
|
@@ -513,6 +572,28 @@ class EuiInputNumberComponent extends InputDirective {
|
|
513
572
|
isDefined(value) {
|
514
573
|
return value !== undefined && value !== null;
|
515
574
|
}
|
575
|
+
/**
|
576
|
+
* Check if the value is a valid number. Take into account the Big numbers
|
577
|
+
* more than 16 digits. Check if string contains only digits and dots.
|
578
|
+
* The number value must not be formatted.
|
579
|
+
* @param value the value to check
|
580
|
+
* @private
|
581
|
+
*/
|
582
|
+
isItaNumber(value) {
|
583
|
+
const length = value?.split('.')[0].length;
|
584
|
+
return length > 15 ? /^\d+(\.\d+)?$/.test(value) : !isNaN(Number(value));
|
585
|
+
}
|
586
|
+
/**
|
587
|
+
* Parse the value to a number. For large numbers, the value is a string.
|
588
|
+
* The number value must not be formatted.
|
589
|
+
* @param value the value to parse
|
590
|
+
* @private
|
591
|
+
*/
|
592
|
+
parseBigNumber(value) {
|
593
|
+
// for large numbers, the value is a string
|
594
|
+
const length = value?.split('.')[0].length;
|
595
|
+
return length > 15 ? value : Number.parseFloat(value);
|
596
|
+
}
|
516
597
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EuiInputNumberComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.LocaleService, optional: true }, { token: LOCALE_ID }, { token: i0.Injector }, { token: DOCUMENT }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component }); }
|
517
598
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.13", type: EuiInputNumberComponent, selector: "input[euiInputNumber]", inputs: { min: ["min", "min", numberAttribute], max: ["max", "max", numberAttribute], leadingZero: ["leadingZero", "leadingZero", numberAttribute], isInvalid: "isInvalid", fractionDigits: "fractionDigits", digits: ["digits", "digits", numberAttribute], fillFraction: ["fillFraction", "fillFraction", booleanAttribute], roundUp: ["roundUp", "roundUp", numberAttribute], noFormat: ["noFormat", "noFormat", booleanAttribute], value: "value" }, host: { listeners: { "blur": "onTouched()", "paste": "onPaste($event)", "keydown": "onKeyDown($event)", "focusout": "onFocusout()" }, properties: { "class": "this.cssClasses", "attr.type": "this.type" } }, usesInheritance: true, usesOnChanges: true, hostDirectives: [{ directive: i2.EuiClearableDirective, inputs: ["euiClearable", "euiClearable", "readonly", "readonly", "disabled", "disabled"] }, { directive: i2.EuiLoadingDirective, inputs: ["euiLoading", "euiLoading", "readonly", "readonly"] }], ngImport: i0, template: '', isInline: true, styles: [".eui-18 .eui-input-number{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--eui-f-m);appearance:none;background-color:var(--eui-c-white);border:1px solid var(--eui-c-neutral-lighter);border-radius:var(--eui-br-m);box-shadow:none;color:var(--eui-c-text);padding:calc(var(--eui-s-xs) - 1px) calc(var(--eui-s-m) - 1px);width:100%}.eui-18 .eui-input-number:focus:not([readonly]){outline:2px solid var(--eui-c-focus)!important;outline-offset:-2px!important;transition:none}.eui-18 .eui-input-number:focus-visible:not([readonly]){outline:2px solid var(--eui-c-focus-visible)!important;outline-offset:-2px!important;transition:none}.eui-18 .eui-input-number [tabindex=\"0\"]:focus:not([readonly]){outline:2px solid var(--eui-c-focus-visible)!important;outline-offset:-2px!important;transition:none}.eui-18 .eui-input-number:not([hidden]){display:block}.eui-18 .eui-input-number::placeholder{color:var(--eui-c-neutral-lighter)!important;opacity:1}.eui-18 .eui-input-number[readonly]{background-color:transparent;border-color:transparent;box-shadow:none;height:inherit;padding-left:0;padding-right:0;pointer-events:none}.eui-18 .eui-input-number[readonly]+.eui-feedback-message,.eui-18 .eui-input-number[readonly]+.eui-input-maxlength{appearance:none;display:none}.eui-18 .eui-input-number[disabled]:not([readonly]),.eui-18 .eui-input-number--disabled:not([readonly]){background-color:var(--eui-c-neutral-bg-light)!important;border:1px solid var(--eui-c-neutral-lightest)!important;color:var(--eui-c-neutral-light);pointer-events:none}.eui-18 .eui-input-number--invalid,.eui-18 .eui-input-number--danger{border:1px solid var(--eui-c-danger)}.eui-18 .eui-input-number--clearable{padding-right:var(--eui-s-2xl)}.eui-18 .eui-input-number--clearable-icon{cursor:pointer;position:absolute;right:var(--eui-s-s);-webkit-user-select:none;user-select:none;visibility:visible}.eui-18 .eui-input-number--clearable-icon:focus:not([readonly]){outline:2px solid var(--eui-c-focus)!important;outline-offset:-2px!important;transition:none}.eui-18 .eui-input-number--clearable-icon:focus-visible:not([readonly]){outline:2px solid var(--eui-c-focus-visible)!important;outline-offset:-2px!important;transition:none}.eui-18 .eui-input-number--clearable-icon [tabindex=\"0\"]:focus:not([readonly]){outline:2px solid var(--eui-c-focus-visible)!important;outline-offset:-2px!important;transition:none}.eui-18 .eui-input-number--clearable-icon>svg{fill:var(--eui-c-neutral-lighter)}.eui-18 .eui-input-number--clearable-icon>svg:hover{fill:var(--eui-c-danger)}.eui-18 .eui-input-number--loading{padding-right:var(--eui-s-2xl)}.eui-18 .eui-input-number--loading-icon{align-items:center;display:flex}.eui-18 .eui-input-number--loading-icon:after,.eui-18 .eui-input-number--loading-icon:before{content:\"\";height:var(--eui-s-l);position:absolute;right:var(--eui-s-s);width:var(--eui-s-l)}.eui-18 .eui-input-number--loading-icon:before{border:var(--eui-s-2xs) solid rgba(0,0,0,.35);border-radius:100%}.eui-18 .eui-input-number--loading-icon:after{animation:eui-loading .6s linear;animation-iteration-count:infinite;border-color:var(--eui-c-white) transparent transparent;border-radius:100%;border-style:solid;border-width:var(--eui-s-2xs);box-shadow:0 0 0 1px transparent}.eui-18 .eui-input-number--loading-icon--sm:after,.eui-18 .eui-input-number--loading-icon--sm:before{height:var(--eui-s-m);width:var(--eui-s-m)}@keyframes eui-loading{to{transform:rotate(360deg)}}.eui-18 .eui-input-number[readonly]{pointer-events:auto}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
518
599
|
}
|
@@ -640,12 +721,20 @@ class EuiInputNumberDirective {
|
|
640
721
|
onTouched() {
|
641
722
|
// this.euiNumberComponent.isInvalid = this.control.invalid;
|
642
723
|
}
|
724
|
+
/**
|
725
|
+
* Handle the value changes of the input element and update the value of the
|
726
|
+
* directive and the form control. For large numbers, the value is a string.
|
727
|
+
*
|
728
|
+
* @param event
|
729
|
+
*/
|
643
730
|
valueChanges(event) {
|
644
731
|
const { target } = event;
|
645
732
|
this.euiNumberComponent['onValueChanged'](event);
|
646
|
-
|
733
|
+
// for large numbers, the value is a string
|
734
|
+
const length = target.rawValue.split('.')[0].length;
|
735
|
+
const numberCoerce = length > 15 ? target.rawValue : Number.parseFloat(target.rawValue);
|
647
736
|
if (this.value !== numberCoerce && this.onChange) {
|
648
|
-
this.onChange(isNaN(numberCoerce) ? null : numberCoerce);
|
737
|
+
this.onChange(length > 15 ? target.rawValue : (isNaN(numberCoerce) ? null : numberCoerce));
|
649
738
|
}
|
650
739
|
}
|
651
740
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EuiInputNumberDirective, deps: [{ token: i0.ElementRef }, { token: EuiInputNumberComponent, optional: true }, { token: DOCUMENT }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Directive }); }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"eui-components-eui-input-number.mjs","sources":["../../eui-input-number/eui-input-number.component.ts","../../eui-input-number/eui-number-control.directive.ts","../../eui-input-number/eui-input-number.module.ts","../../eui-input-number/eui-components-eui-input-number.ts"],"sourcesContent":["import {\n Optional,\n LOCALE_ID,\n Inject,\n Component,\n DoCheck,\n ElementRef,\n HostBinding,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Renderer2,\n SimpleChanges,\n ViewEncapsulation,\n Injector,\n numberAttribute,\n PLATFORM_ID,\n booleanAttribute,\n} from '@angular/core';\nimport { LocaleService } from '@eui/core';\nimport { LocaleState } from '@eui/core';\nimport { coerceBooleanProperty, coerceNumberProperty, BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { type CleaveOptions } from 'cleave.js/options';\nimport Cleave from 'cleave.js';\nimport { CleaveEventOnChange } from './models/cleave-event-onchange.model';\nimport { InputDirective } from '@eui/components/shared';\nimport { DOCUMENT, getLocaleNumberSymbol, NumberSymbol, isPlatformBrowser, isPlatformServer } from '@angular/common';\nimport { EuiClearableDirective, EuiLoadingDirective } from '@eui/components/directives';\nimport { NgControl } from '@angular/forms';\n\nexport interface CleaveInstance extends Cleave {\n initSwapHiddenInput?: () => void;\n initNumeralFormatter?: () => void;\n initTimeFormatter?: () => void;\n initDateFormatter?: () => void;\n initPhoneFormatter?: () => void;\n updateCreditCardPropsByValue?: () => void;\n updateValueState?: () => void;\n callOnValueChanged?: () => void;\n onChange?: (event?: Event) => void;\n onCut?: (event?: Event) => void;\n onFocus?: (event?: Event) => void;\n onCopy?: (event?: Event) => void;\n onKeyDown?: (event?: Event) => void;\n onChangeListener?: (event?: Event) => void;\n onKeyDownListener?: (event?: Event) => void;\n onFocusListener?: (event?: Event) => void;\n onCutListener?: (event?: Event) => void;\n onCopyListener?: (event?: Event) => void;\n}\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'input[euiInputNumber]',\n styleUrls: ['./styles/_index.scss'],\n template: '',\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [\n {\n directive: EuiClearableDirective,\n inputs: ['euiClearable', 'readonly', 'disabled'],\n },\n {\n directive: EuiLoadingDirective,\n inputs: ['euiLoading', 'readonly'],\n },\n ],\n // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: {\n '(blur)': 'onTouched()',\n },\n})\nexport class EuiInputNumberComponent extends InputDirective implements OnInit, OnDestroy, DoCheck, OnChanges {\n /**\n * The minimum number can be entered. Blocks user's input if not in range.\n */\n @Input({ transform: numberAttribute }) min!: number;\n /**\n * The maximum number can be entered. Blocks user's input if not in range.\n */\n @Input({ transform: numberAttribute }) max!: number;\n /** Adds leading zero to a number. Formatting will not work.\n * e.g. with leadingZero=3 input number 5 => 005\n */\n @Input({ transform: numberAttribute }) leadingZero = 0;\n @Input()\n public get isInvalid(): boolean {\n return this._isInvalid || null;\n }\n\n public set isInvalid(state: BooleanInput) {\n this.setInvalid(state);\n }\n @HostBinding('class')\n public get cssClasses(): string {\n return [super.getCssClasses('eui-input-number'), this._isInvalid ? 'eui-input-number--invalid' : ''].join(' ').trim();\n }\n\n /** how many digits for the decimal part */\n @Input()\n get fractionDigits(): number {\n return this._fractionDigits;\n }\n set fractionDigits(value: NumberInput) {\n this._fractionDigits = coerceNumberProperty(value);\n }\n /** how many digits for the integer part */\n @Input({ transform: numberAttribute }) digits!: number;\n @Input({ transform: booleanAttribute }) fillFraction: boolean;\n /** rounds a number with more than two decimals UP */\n @Input({ transform: numberAttribute }) roundUp!: number;\n protected _isInvalid: boolean;\n /**\n * does not format the and do a thousand grouping of number\n */\n @Input({ transform: booleanAttribute }) noFormat: boolean;\n @HostBinding('attr.type') protected type = 'eui-number';\n @Input() value: string;\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public onChangeCallback: (_: any) => void;\n cleaveInstance: CleaveInstance;\n\n /** holds instance of cleave */\n /** options for the Cleave instance */\n private options: CleaveOptions;\n private _fractionDigits = 0;\n\n constructor(\n protected _elementRef: ElementRef,\n protected _renderer: Renderer2,\n @Optional() private localeService: LocaleService,\n @Inject(LOCALE_ID) private locale_id: string,\n injector: Injector,\n @Inject(DOCUMENT) private document: Document,\n @Inject(PLATFORM_ID) private platformId: unknown,\n ) {\n super(_elementRef, _renderer, injector);\n\n // set default options\n this.options = {\n numeral: true,\n delimiter: getLocaleNumberSymbol(locale_id || 'en', NumberSymbol.Group),\n numeralDecimalMark: getLocaleNumberSymbol(locale_id || 'en', NumberSymbol.Decimal),\n numeralDecimalScale: this.fractionDigits,\n numeralIntegerScale: this.digits,\n };\n }\n\n ngOnInit(): void {\n super.ngOnInit();\n\n this.control = this.injector.get(NgControl, undefined, { optional: true });\n\n // instantiate cleave\n if (!this.control) {\n this.initCleave();\n }\n\n // subscribe to localization service and listen for locale change. De-construction of locale should happen here!\n this.localeService?.getState().subscribe((state: LocaleState) => {\n this.options = this.getCleaveOptsBasedOnLocale(state?.id);\n\n // update the options on the cleave instance\n this.updateOptions(true);\n });\n\n this._renderer.setProperty(this._elementRef.nativeElement, 'rootClassName', 'eui-input-number');\n }\n\n ngDoCheck(): void {\n if (!this.control) {\n this.control = this.injector.get(NgControl, undefined, { optional: true });\n }\n this.isInvalid = this.control ? this.control.invalid && this.control.touched : this._isInvalid;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (Object.hasOwn(changes, 'value')) {\n this._elementRef.nativeElement.value = this.value;\n if (this.cleaveInstance) {\n this.cleaveInstance.setRawValue(this.value);\n }\n }\n if (Object.hasOwn(changes, 'fractionDigits')) {\n this.options = { ...this.options, numeralDecimalScale: this.fractionDigits };\n this.updateOptions();\n }\n if (Object.hasOwn(changes, 'noFormat')) {\n this.options = { ...this.options, numeralThousandsGroupStyle: this.noFormat ? 'none' : 'thousand' };\n this.updateOptions();\n }\n if (Object.hasOwn(changes, 'fillFraction') && this.cleaveInstance) {\n this.applyFractionFill(this.cleaveInstance.getRawValue());\n }\n if (Object.hasOwn(changes, 'digits')) {\n this.options = { ...this.options, numeralIntegerScale: this.digits };\n this.updateOptions();\n }\n if (Object.hasOwn(changes, 'min')) {\n this.min = changes['min'].currentValue;\n if (changes['min'].currentValue >= 0) {\n if (this.cleaveInstance) {\n // take care of the sign symbol\n this.cleaveInstance.setRawValue(Math.abs(Number(this.cleaveInstance.getRawValue())).toString());\n }\n }\n }\n if (Object.hasOwn(changes, 'max')) {\n this.max = changes['max'].currentValue;\n // check if current value is in range\n if (this.cleaveInstance) {\n const number = Number(this.cleaveInstance.getRawValue());\n if (number > this.max) {\n this.cleaveInstance.setRawValue(this.max.toString());\n }\n }\n }\n if (Object.hasOwn(changes, 'roundUp')) {\n if (changes['roundUp'].currentValue > 0) {\n if (this.cleaveInstance) {\n let number = Number.parseFloat(this.cleaveInstance.getRawValue());\n number = this.decimalAdjust(number, this.roundUp * -1);\n this.cleaveInstance.setRawValue(number.toString());\n }\n }\n }\n if(Object.hasOwn(changes, 'placeholder')) {\n // parse number\n const number = this.parseNumber(changes['placeholder'].currentValue?.toString() || undefined);\n // set placeholder in case none is provided\n this.setPlaceholderAttribute(isNaN(number) ? changes['placeholder'].currentValue : number);\n }\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n // destroy cleave instance\n if (this.cleaveInstance) {\n this.cleaveInstance.destroy();\n }\n }\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onChange: any = (_: any): void => {\n if (this.control && (_ !== null || _ !== undefined)) {\n // parse number\n // const value = Number(_);\n // run on next MicroTask to avoid NG0100 error TODO: deeper investigation\n // Promise.resolve().then(() => this.control.viewToModelUpdate(value));\n // in case control is FormControl\n // this.control?.control.setValue(isNaN(value) ? null : value, { emitEvent: false, emitModelToViewChange: false });\n }\n };\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onTouched: any = (): void => {\n this.control?.control.markAsTouched();\n };\n\n @HostListener('paste', ['$event'])\n onPaste(event: ClipboardEvent): void {\n // get the value from clipboard\n const value = (event.clipboardData || window['clipboardData']).getData('text');\n // in case round UP is enabled\n if (this.roundUp > 0) {\n const div = this.document.createElement('input');\n // create a clone of cleaveInstance\n const cloneInstance: CleaveInstance = new Cleave(div, { ...this.options, numeralDecimalScale: 8 });\n cloneInstance.setRawValue(value.toString());\n let number = Number.parseFloat(cloneInstance.getRawValue());\n number = this.decimalAdjust(number, this.roundUp * -1);\n if (!Number.isNaN(number)) {\n this.cleaveInstance.setRawValue(number.toString());\n // TODO: investigate in the future how can this be avoided\n setTimeout(() => {\n // this.writeValue(number.toString());\n }, 0);\n }\n }\n }\n\n @HostListener('keydown', ['$event'])\n protected onKeyDown(e: KeyboardEvent): void {\n // check if it's a single symbol and not Special like (Ctrl, backspace etc)\n if (e?.key?.length <= 1 && !e.ctrlKey && !e.altKey && !e.metaKey) {\n // stop event propagation if key pressed is not a number or locale character or minus sign\n if (\n Number.isNaN(Number.parseInt(e.key, 10)) &&\n this.isMinusAllowed(e.key) &&\n e.key !== getLocaleNumberSymbol(this.localeService?.currentLocale || this.locale_id, NumberSymbol.Decimal)\n ) {\n e.stopPropagation();\n e.preventDefault();\n // stop event propagation if key pressed exceeds the min/max value range\n } else if (!Number.isNaN(Number.parseInt(e.key, 10)) && this.isOutSideRange(e)) {\n e.stopPropagation();\n e.preventDefault();\n } else if (this.isOutSideRange(e)) {\n e.stopPropagation();\n e.preventDefault();\n }\n }\n\n // protect decimal symbol deletion in case fillFraction is on\n if (e.key === 'Delete' || e.key === 'Backspace') {\n const element = this._elementRef.nativeElement;\n // position of caret\n const pos = element.selectionStart;\n // get character about to be deleted\n const char = element.value.charAt(pos - 1);\n // in case the char is the decimal symbol prevent deletion and move caret in front\n if (this.fillFraction &&\n char === getLocaleNumberSymbol(this.localeService?.currentLocale || this.locale_id, NumberSymbol.Decimal)) {\n e.stopPropagation();\n e.preventDefault();\n element.setSelectionRange(pos - 1, pos - 1);\n } else if (this.isOutSideRange(e)) {\n // don't allow insertion that will put number out of range\n e.stopPropagation();\n e.preventDefault();\n }\n }\n }\n\n @HostListener('focusout')\n protected onFocusout(): void {\n // in case fillFraction feature is on and there's no integer part add leading 0\n if (this.fillFraction && this.cleaveInstance.getRawValue().match(/^\\.[0-9]+/g)) {\n this.cleaveInstance.setRawValue('0' + this.cleaveInstance.getRawValue());\n }\n\n // in case round UP is enabled\n if (this.roundUp > 0) {\n const number = Number.parseFloat(this.cleaveInstance.getRawValue());\n this.cleaveInstance.setRawValue(this.decimalAdjust(number, this.roundUp * -1).toString());\n }\n\n // in case min is set and value is less than min reset to the min value\n if (this.min !== null && this.min !== undefined && Number.parseFloat(this.cleaveInstance.getRawValue()) < this.min) {\n this.cleaveInstance.setRawValue(this.min.toString());\n }\n\n // in case max is set and value is greater than max reset to the max value\n if (this.max !== null && this.max !== undefined && Number.parseFloat(this.cleaveInstance.getRawValue()) > this.max) {\n this.cleaveInstance.setRawValue(this.max.toString());\n }\n }\n\n protected setInvalid(state?: BooleanInput): void {\n // in case it's controlled by NgControl override\n this._isInvalid = this.control ? this.control.invalid && this.control.touched : coerceBooleanProperty(state);\n\n // set BaseDirective Attribute\n this.euiDanger = this._isInvalid;\n }\n\n /**\n * @Override setPlaceholder setPlaceholderAttribute of InputDirective\n * Updates the placeholder value based on current number format and given value.\n * If value passed contains characters it doesn't format placeholder.\n * */\n protected setPlaceholderAttribute(value: string | number): void {\n // if value is a number, format the value based on current number format\n if (typeof value === 'number' && !isNaN(value) && isPlatformBrowser(this.platformId)) {\n const div = this.document.createElement('input');\n // create a clone of cleaveInstance\n const cloneInstance: CleaveInstance = new Cleave(div, this.options);\n // BEWARE: by the time your setRawValue cleave options have changed thus number formatting\n cloneInstance.setRawValue(value.toString());\n // set the value with current format as placeholder\n super.setPlaceholderAttribute(cloneInstance.getFormattedValue());\n } else if (typeof value === 'string') {\n super.setPlaceholderAttribute(value.toString());\n } else if (isNaN(value)) {\n value = this._elementRef.nativeElement.placeholder;\n super.setPlaceholderAttribute(value.toString());\n }\n }\n\n /**\n * instantiate Cleave.js\n */\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private initCleave(onChangeCallback?: (obj: any) => any): void {\n if(isPlatformServer(this.platformId)) {\n // in case it's not a browser environment\n return;\n }\n // change the cleave prototype function to intercept onCut callback\n // and allow based on the event bubbling and disabled state\n // TIP: change behavior of onCut to stop in case bubble is canceled\n // TODO: See relevant issue https://github.com/nosir/cleave.js/issues/675\n const _onCut = Cleave.prototype['onCut'];\n Cleave.prototype['onCut'] = function (e: Event): void {\n // eslint-disable-next-line no-invalid-this\n if (!e.cancelBubble && !this.element.disabled) {\n // eslint-disable-next-line no-invalid-this\n _onCut.call(this, e);\n }\n };\n\n // in case options is undefined\n const opts: CleaveOptions = { ...this.options };\n\n // set the onValue change listener to keep the value at readOnly element in sync\n opts.onValueChanged = onChangeCallback || this.onValueChanged.bind(this);\n\n // in case round UP is enabled\n if (this.roundUp > 0) {\n const number = Number.parseFloat(this._elementRef.nativeElement.value);\n this._elementRef.nativeElement.value = this.decimalAdjust(number, this.roundUp * -1);\n }\n\n // create the Cleave instance with the new or updated options\n this.cleaveInstance = new Cleave(this._elementRef.nativeElement, opts);\n }\n\n /**\n * Updates the cleave options by destroying the current instance and creating another one while keeping the previous\n * value.\n */\n private updateOptions(localeUpdated = false): void {\n if (this.cleaveInstance) {\n // the value before destroying cleave instance\n const previousValue = this.cleaveInstance.getRawValue();\n\n // update the Cleave instance with the new or updated options\n this.cleaveInstance.properties = {\n ...this.cleaveInstance.properties,\n ...this.options,\n initValue: previousValue,\n };\n\n // init number formatter with updated options\n this.cleaveInstance.initNumeralFormatter();\n\n // In case previous settings where numeralDecimalMark='.' with value 1000.99, and they changed to\n // numeralDecimalMark=','; set initValue to 1000.99 or even 1000,99 will not be reflected and cleave will\n // remove the decimal part. Set of the value after initialization causes reformat of number and works.\n this.cleaveInstance.setRawValue(previousValue);\n\n // parse number\n const number = this.parseNumber(this._elementRef.nativeElement.placeholder || undefined, localeUpdated);\n // set placeholder in case none is provided\n this.setPlaceholderAttribute(number);\n }\n }\n\n /**\n * Callback function of the Cleave instance that is invoked when value is changed.\n *\n * @param event type of CleaveEventOnChange\n */\n private onValueChanged(event: CleaveEventOnChange): void {\n const { target } = event;\n\n if (this.fillFraction) {\n this.applyFractionFill(target.rawValue);\n }\n this.onChange(Number.parseFloat(target.rawValue));\n // fill leading zero\n if (this.leadingZero) {\n const size = this.leadingZero > this.digits && this.digits > 0 ? this.digits : this.leadingZero;\n this._elementRef.nativeElement.value = this.padZero(event.target.rawValue, size);\n }\n }\n\n /**\n * responsible to extract all locale information needed to build CleaveOptions related to number format.\n *\n * @param id The id of the locale\n */\n private getCleaveOptsBasedOnLocale(id: string): CleaveOptions {\n if (!id || id === '') {\n throw new Error('Locale id cannot be empty or undefined');\n }\n const opts: CleaveOptions = {\n numeral: true,\n delimiter: getLocaleNumberSymbol(id, NumberSymbol.Group),\n numeralDecimalMark: getLocaleNumberSymbol(id, NumberSymbol.Decimal),\n numeralDecimalScale: this.fractionDigits,\n numeralIntegerScale: this.digits,\n numeralThousandsGroupStyle: this.noFormat ? 'none' : 'thousand', // TODO: implement based on locale\n };\n\n return { ...this.options, ...opts };\n }\n\n /**\n * Applies the fill of decimal part with zeros in case decimal part of given number has\n * size less than the max fraction digits.\n *\n * @param number\n * @param cleaveInstance\n * @private\n */\n private applyFractionFill(number: string, cleaveInstance: CleaveInstance = this.cleaveInstance): void {\n // if fill fraction is enabled and there's cleave instance\n if (this.fillFraction) {\n if (this.cleaveInstance) {\n number = number?.toString();\n if (number === '' || !number) {\n return;\n }\n const hasDecimal = number.split('.').length > 1;\n // in case there's already decimal point in number\n if (hasDecimal) {\n const decimalSize = number.split('.')[1].length;\n // if size of decimal part of number is less than the max fraction digits\n if (decimalSize < this._fractionDigits) {\n number = number + new Array(this._fractionDigits - decimalSize).fill(0).join('');\n const pos = this._elementRef.nativeElement.selectionStart;\n cleaveInstance.setRawValue(number);\n this._elementRef.nativeElement.setSelectionRange(pos, pos);\n }\n // in case there's not, force it by filling it as much zero as the fraction digits\n } else if (this.fractionDigits > 0) {\n number = `${number}.${new Array(this._fractionDigits).fill(0).join('')}`;\n const pos = this._elementRef.nativeElement.selectionStart;\n cleaveInstance.setRawValue(number);\n this._elementRef.nativeElement.setSelectionRange(pos, pos);\n }\n }\n }\n }\n\n /**\n * Parses a given formatted number and returns it as a number.\n *\n * @param value The formatted number you want to parse e.g. 111,888.22\n * @param userPrevLocaleState Use previous locale state to parse the value. By default, is false\n * @private\n */\n private parseNumber(value: string, userPrevLocaleState = false): number {\n // locale state\n const locale = userPrevLocaleState ? this.localeService?.previousLocale : this.localeService?.currentLocale || this.locale_id || 'en';\n // get decimal and group symbols\n const decimalSymbol = getLocaleNumberSymbol(locale, NumberSymbol.Decimal);\n const groupSymbol = getLocaleNumberSymbol(locale, NumberSymbol.Group);\n // replace symbols to parse number\n const parsedNumber = value?.split(groupSymbol).join('').split(decimalSymbol).join('.');\n return Number.parseFloat(parsedNumber);\n }\n\n /**\n * Pad leading zero to the number\n *\n * @param num The number to add leading zero to\n * @param size Number of number's leading zero\n * @private\n */\n private padZero(num, size): string {\n num = num.toString();\n // get integer and decimal part\n // eslint-disable-next-line prefer-const\n let [integer, decimal] = num.split('.');\n while (integer.length < size) {\n integer = '0' + integer;\n }\n return decimal ? `${integer}.${decimal}` : integer;\n }\n\n /**\n * checks whether the min symbol is allowed. It is allowed when minus symbol\n * provided and min input is undefined or min provided and is negative.\n *\n * @param key The key string coming from an event\n */\n private isMinusAllowed(key: string): boolean {\n return !this.min || this.min < 0 ? key !== '-' : true;\n }\n\n /**\n * check whether the key entered is inside the min and\n * max range. Returns true if it's out of range.\n *\n * @param e A keyboard event\n */\n private isOutSideRange(e: KeyboardEvent): boolean {\n if (!this.cleaveInstance) {\n return false;\n }\n // get caret position\n const pos = e.target['selectionStart'];\n // get caret position (in case there's text selected)\n const endPos = e.target['selectionEnd'];\n // get current value (formatted)\n let value = e.target['value'];\n // remove key from value\n if (e.key === 'Delete' || e.key === 'Backspace') {\n // check if there's selection of text to be removed\n if (pos !== endPos) {\n value = e.target['value'].substring(0, pos) + e.target['value'].substring(endPos, e.target['value'].length);\n } else {\n value = e.target['value'].substring(0, pos - 1) + e.target['value'].substring(endPos, e.target['value'].length);\n }\n } else {\n // add key to the value\n value = [value.slice(0, pos), e.key, value.slice(endPos)].join('');\n }\n\n // create a Cleave instance to extract the number from formatted value\n const cleave: CleaveInstance = new Cleave(this.document.createElement('input'), { ...this.options });\n cleave.setRawValue(value);\n const number = Number(cleave.getRawValue());\n // destroy cleave instance\n cleave.destroy();\n return !isNaN(number) &&\n this.min >= 0 ? (this.isDefined(this.max) && this.max < number) : (this.min > number || this.max < number) &&\n this.max <= 0 ? (this.isDefined(this.min) && this.min > number) : (this.min > number || this.max < number);\n }\n\n /**\n * Decimal adjustment of a number.\n *\n * @param value The number.\n * @param exp The exponent (the 10 logarithm of the adjustment base).\n * @returns The adjusted value.\n */\n private decimalAdjust(value: number, exp: number): number {\n // If the exp is undefined or zero...\n if (typeof exp === 'undefined' || +exp === 0) {\n return Math.round(value);\n }\n value = +value;\n exp = +exp;\n // If the value is not a number or the exp is not an integer...\n if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) {\n return NaN;\n }\n // Shift\n let cleaned = value.toString().split('e');\n value = Math.round(+(cleaned[0] + 'e' + (cleaned[1] ? +cleaned[1] - exp : -exp)));\n // Shift back\n cleaned = value.toString().split('e');\n return +(cleaned[0] + 'e' + (cleaned[1] ? +cleaned[1] + exp : exp));\n }\n\n /**\n * Checks whether a value is defined or not\n *\n * @param value\n * @private\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private isDefined(value: any): boolean {\n return value !== undefined && value !== null;\n }\n}\n","import { Directive, ElementRef, forwardRef, Inject, OnInit, Optional, PLATFORM_ID } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { CleaveInstance, EuiInputNumberComponent } from './eui-input-number.component';\nimport Cleave from 'cleave.js';\nimport { DOCUMENT, isPlatformServer } from '@angular/common';\n\n@Directive({\n selector: 'input[euiInputNumber][formControl],input[euiInputNumber][formControlName],input[euiInputNumber][ngModel]',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => EuiInputNumberDirective),\n multi: true,\n },\n ],\n})\nexport class EuiInputNumberDirective implements ControlValueAccessor, OnInit {\n /** hold a copy of the value */\n private value: number;\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private onChange: (t: any) => void;\n\n constructor(\n private elementRef: ElementRef,\n @Optional() private euiNumberComponent: EuiInputNumberComponent,\n @Inject(DOCUMENT) private document: Document,\n @Inject(PLATFORM_ID) private platformId: unknown,\n ) {}\n\n ngOnInit(): void {\n this.euiNumberComponent['initCleave'](this.valueChanges.bind(this));\n }\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n writeValue(obj: any): void {\n if (isPlatformServer(this.platformId)) {\n return;\n }\n const cleave: CleaveInstance = new Cleave(this.document.createElement('input'), { ...this.euiNumberComponent['options'] });\n cleave.setRawValue(obj);\n if (this.euiNumberComponent.fillFraction && obj !== '' && obj) {\n this.euiNumberComponent['applyFractionFill'](obj, cleave);\n }\n let valueOfElement: string;\n // fill leading zero\n if (this.euiNumberComponent.leadingZero) {\n const size =\n this.euiNumberComponent.leadingZero > this.euiNumberComponent.digits && this.euiNumberComponent.digits > 0\n ? this.euiNumberComponent.digits\n : this.euiNumberComponent.leadingZero;\n valueOfElement = this.euiNumberComponent['padZero'](cleave.getFormattedValue(), size);\n } else {\n valueOfElement = cleave.getFormattedValue();\n }\n this.elementRef.nativeElement.value = valueOfElement;\n this.value = Number.parseFloat(cleave.getRawValue());\n cleave.destroy();\n }\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n registerOnChange(fn: any): void {\n this.onChange = (t): void => {\n this.value = t;\n fn(t);\n };\n }\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.euiNumberComponent.disabled = isDisabled;\n }\n\n private onTouched(): void {\n // this.euiNumberComponent.isInvalid = this.control.invalid;\n }\n\n private valueChanges(event): void {\n const { target } = event;\n\n this.euiNumberComponent['onValueChanged'](event);\n const numberCoerce = Number.parseFloat(target.rawValue);\n if (this.value !== numberCoerce && this.onChange) {\n this.onChange(isNaN(numberCoerce) ? null : numberCoerce);\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { EuiInputNumberComponent } from './eui-input-number.component';\nimport { EuiInputNumberDirective } from './eui-number-control.directive';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [EuiInputNumberComponent, EuiInputNumberDirective],\n exports: [EuiInputNumberComponent, EuiInputNumberDirective],\n})\nexport class EuiInputNumberModule {}\n\n/**\n * @deprecated Use EuiInputNumberModule instead. This will be removed in eUI 19.\n */\n@NgModule({\n imports: [EuiInputNumberModule],\n exports: [EuiInputNumberModule],\n})\nexport class EuiInputNumberDirectiveModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.EuiInputNumberComponent"],"mappings":";;;;;;;;;;;AA0EM,MAAO,uBAAwB,SAAQ,cAAc,CAAA;AAavD,IAAA,IACW,SAAS,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,UAAU,IAAI,IAAI;;IAGlC,IAAW,SAAS,CAAC,KAAmB,EAAA;AACpC,QAAA,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;;AAE1B,IAAA,IACW,UAAU,GAAA;AACjB,QAAA,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,EAAE,IAAI,CAAC,UAAU,GAAG,2BAA2B,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;;;AAIzH,IAAA,IACI,cAAc,GAAA;QACd,OAAO,IAAI,CAAC,eAAe;;IAE/B,IAAI,cAAc,CAAC,KAAkB,EAAA;AACjC,QAAA,IAAI,CAAC,eAAe,GAAG,oBAAoB,CAAC,KAAK,CAAC;;AAwBtD,IAAA,WAAA,CACc,WAAuB,EACvB,SAAoB,EACV,aAA4B,EACrB,SAAiB,EAC5C,QAAkB,EACQ,QAAkB,EACf,UAAmB,EAAA;AAEhD,QAAA,KAAK,CAAC,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAC;QAR7B,IAAW,CAAA,WAAA,GAAX,WAAW;QACX,IAAS,CAAA,SAAA,GAAT,SAAS;QACC,IAAa,CAAA,aAAA,GAAb,aAAa;QACN,IAAS,CAAA,SAAA,GAAT,SAAS;QAEV,IAAQ,CAAA,QAAA,GAAR,QAAQ;QACL,IAAU,CAAA,UAAA,GAAV,UAAU;AAtD3C;;AAEG;QACoC,IAAW,CAAA,WAAA,GAAG,CAAC;QAgClB,IAAI,CAAA,IAAA,GAAG,YAAY;QAU/C,IAAe,CAAA,eAAA,GAAG,CAAC;;;AAuH3B,QAAA,IAAA,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AA,CAAA,CAAA;;4FASpB,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAJzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAClC,iBAAA;;;AClBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"eui-components-eui-input-number.mjs","sources":["../../eui-input-number/eui-input-number.component.ts","../../eui-input-number/eui-number-control.directive.ts","../../eui-input-number/eui-input-number.module.ts","../../eui-input-number/eui-components-eui-input-number.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n DoCheck,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Injector,\n Input,\n LOCALE_ID,\n numberAttribute,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n PLATFORM_ID,\n Renderer2,\n SimpleChanges,\n ViewEncapsulation,\n} from '@angular/core';\nimport { LocaleService, LocaleState } from '@eui/core';\nimport { BooleanInput, coerceBooleanProperty, coerceNumberProperty, NumberInput } from '@angular/cdk/coercion';\nimport { type CleaveOptions } from 'cleave.js/options';\nimport Cleave from 'cleave.js';\nimport { CleaveEventOnChange } from './models/cleave-event-onchange.model';\nimport { InputDirective } from '@eui/components/shared';\nimport { DOCUMENT, getLocaleNumberSymbol, NumberSymbol, isPlatformBrowser, isPlatformServer } from '@angular/common';\nimport { EuiClearableDirective, EuiLoadingDirective } from '@eui/components/directives';\nimport { NgControl } from '@angular/forms';\n\nexport interface CleaveInstance extends Cleave {\n initSwapHiddenInput?: () => void;\n initNumeralFormatter?: () => void;\n initTimeFormatter?: () => void;\n initDateFormatter?: () => void;\n initPhoneFormatter?: () => void;\n updateCreditCardPropsByValue?: () => void;\n updateValueState?: () => void;\n callOnValueChanged?: () => void;\n onChange?: (event?: Event) => void;\n onCut?: (event?: Event) => void;\n onFocus?: (event?: Event) => void;\n onCopy?: (event?: Event) => void;\n onKeyDown?: (event?: Event) => void;\n onChangeListener?: (event?: Event) => void;\n onKeyDownListener?: (event?: Event) => void;\n onFocusListener?: (event?: Event) => void;\n onCutListener?: (event?: Event) => void;\n onCopyListener?: (event?: Event) => void;\n}\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'input[euiInputNumber]',\n styleUrls: ['./styles/_index.scss'],\n template: '',\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [\n {\n directive: EuiClearableDirective,\n inputs: ['euiClearable', 'readonly', 'disabled'],\n },\n {\n directive: EuiLoadingDirective,\n inputs: ['euiLoading', 'readonly'],\n },\n ],\n // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: {\n '(blur)': 'onTouched()',\n },\n})\nexport class EuiInputNumberComponent extends InputDirective implements OnInit, OnDestroy, DoCheck, OnChanges {\n /**\n * The minimum number can be entered. Blocks user's input if not in range.\n */\n @Input({ transform: numberAttribute }) min!: number;\n /**\n * The maximum number can be entered. Blocks user's input if not in range.\n */\n @Input({ transform: numberAttribute }) max!: number;\n /** Adds leading zero to a number. Formatting will not work.\n * e.g. with leadingZero=3 input number 5 => 005\n */\n @Input({ transform: numberAttribute }) leadingZero = 0;\n @Input()\n public get isInvalid(): boolean {\n return this._isInvalid || null;\n }\n\n public set isInvalid(state: BooleanInput) {\n this.setInvalid(state);\n }\n @HostBinding('class')\n public get cssClasses(): string {\n return [super.getCssClasses('eui-input-number'), this._isInvalid ? 'eui-input-number--invalid' : ''].join(' ').trim();\n }\n\n /** how many digits for the decimal part */\n @Input()\n get fractionDigits(): number {\n return this._fractionDigits;\n }\n set fractionDigits(value: NumberInput) {\n this._fractionDigits = coerceNumberProperty(value);\n }\n /** how many digits for the integer part */\n @Input({ transform: numberAttribute }) digits!: number;\n @Input({ transform: booleanAttribute }) fillFraction: boolean;\n /** rounds a number with more than two decimals UP */\n @Input({ transform: numberAttribute }) roundUp!: number;\n protected _isInvalid: boolean;\n /**\n * does not format the and do a thousand grouping of number\n */\n @Input({ transform: booleanAttribute }) noFormat: boolean;\n @HostBinding('attr.type') protected type = 'eui-number';\n @Input() value: string;\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public onChangeCallback: (_: any) => void;\n cleaveInstance: CleaveInstance;\n\n /** holds instance of cleave */\n /** options for the Cleave instance */\n private options: CleaveOptions;\n private _fractionDigits = 0;\n\n constructor(\n protected _elementRef: ElementRef,\n protected _renderer: Renderer2,\n @Optional() private localeService: LocaleService,\n @Inject(LOCALE_ID) private locale_id: string,\n injector: Injector,\n @Inject(DOCUMENT) private document: Document,\n @Inject(PLATFORM_ID) private platformId: unknown,\n ) {\n super(_elementRef, _renderer, injector);\n\n // set default options\n this.options = {\n numeral: true,\n delimiter: getLocaleNumberSymbol(locale_id || 'en', NumberSymbol.Group),\n numeralDecimalMark: getLocaleNumberSymbol(locale_id || 'en', NumberSymbol.Decimal),\n numeralDecimalScale: this.fractionDigits,\n numeralIntegerScale: this.digits,\n };\n }\n\n ngOnInit(): void {\n super.ngOnInit();\n\n this.control = this.injector.get(NgControl, undefined, { optional: true });\n\n // instantiate cleave\n if (!this.control) {\n this.initCleave();\n }\n\n // subscribe to localization service and listen for locale change. De-construction of locale should happen here!\n this.localeService?.getState().subscribe((state: LocaleState) => {\n this.options = this.getCleaveOptsBasedOnLocale(state?.id);\n\n // update the options on the cleave instance\n this.updateOptions(true);\n });\n\n this._renderer.setProperty(this._elementRef.nativeElement, 'rootClassName', 'eui-input-number');\n }\n\n ngDoCheck(): void {\n if (!this.control) {\n this.control = this.injector.get(NgControl, undefined, { optional: true });\n }\n this.isInvalid = this.control ? this.control.invalid && this.control.touched : this._isInvalid;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (Object.hasOwn(changes, 'value')) {\n this._elementRef.nativeElement.value = this.value;\n if (this.cleaveInstance) {\n this.cleaveInstance.setRawValue(this.value);\n }\n }\n if (Object.hasOwn(changes, 'fractionDigits')) {\n this.options = { ...this.options, numeralDecimalScale: this.fractionDigits };\n this.updateOptions();\n }\n if (Object.hasOwn(changes, 'noFormat')) {\n this.options = { ...this.options, numeralThousandsGroupStyle: this.noFormat ? 'none' : 'thousand' };\n this.updateOptions();\n }\n if (Object.hasOwn(changes, 'fillFraction') && this.cleaveInstance) {\n this.applyFractionFill(this.cleaveInstance.getRawValue());\n }\n if (Object.hasOwn(changes, 'digits')) {\n this.options = { ...this.options, numeralIntegerScale: this.digits };\n this.updateOptions();\n }\n if (Object.hasOwn(changes, 'min')) {\n this.min = changes['min'].currentValue;\n if (changes['min'].currentValue >= 0) {\n if (this.cleaveInstance) {\n // take care of the sign symbol\n this.cleaveInstance.setRawValue(Math.abs(Number(this.cleaveInstance.getRawValue())).toString());\n }\n }\n }\n if (Object.hasOwn(changes, 'max')) {\n this.max = changes['max'].currentValue;\n // check if current value is in range\n if (this.cleaveInstance) {\n const number = Number(this.cleaveInstance.getRawValue());\n if (number > this.max) {\n this.cleaveInstance.setRawValue(this.max.toString());\n }\n }\n }\n if (Object.hasOwn(changes, 'roundUp')) {\n if (changes['roundUp'].currentValue > 0) {\n if (this.cleaveInstance) {\n let number = this.parseNumber(this.cleaveInstance.getRawValue(), false, false);\n number = this.decimalAdjust(number, this.roundUp);\n this.cleaveInstance.setRawValue(number.toString());\n }\n }\n }\n if (Object.hasOwn(changes, 'placeholder')) {\n // parse number\n const number = this.parseNumber(changes['placeholder'].currentValue?.toString() || undefined);\n // set placeholder in case none is provided\n this.setPlaceholderAttribute(!this.isItaNumber(number.toString()) ? changes['placeholder'].currentValue : number);\n }\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n // destroy cleave instance\n if (this.cleaveInstance) {\n this.cleaveInstance.destroy();\n }\n }\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onChange: any = (_: any): void => {\n if (this.control && (_ !== null || _ !== undefined)) {\n // parse number\n // const value = Number(_);\n // run on next MicroTask to avoid NG0100 error TODO: deeper investigation\n // Promise.resolve().then(() => this.control.viewToModelUpdate(value));\n // in case control is FormControl\n // this.control?.control.setValue(isNaN(value) ? null : value, { emitEvent: false, emitModelToViewChange: false });\n }\n };\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onTouched: any = (): void => {\n this.control?.control.markAsTouched();\n };\n\n @HostListener('paste', ['$event'])\n onPaste(event: ClipboardEvent): void {\n // get the value from clipboard\n const value = (event.clipboardData || window['clipboardData']).getData('text');\n // in case round UP is enabled\n if (this.roundUp > 0) {\n const div = this.document.createElement('input');\n // create a clone of cleaveInstance\n const cloneInstance: CleaveInstance = new Cleave(div, { ...this.options, numeralDecimalScale: 8 });\n cloneInstance.setRawValue(value.toString());\n let number = this.parseNumber(cloneInstance.getRawValue(), false, false);\n number = this.decimalAdjust(number, this.roundUp);\n if (this.isItaNumber(number.toString())) {\n // TODO: investigate in the future how can this be avoided\n setTimeout(() => {\n this.cleaveInstance.setRawValue(number.toString());\n // this.writeValue(number.toString());\n }, 0);\n }\n }\n }\n\n @HostListener('keydown', ['$event'])\n protected onKeyDown(e: KeyboardEvent): void {\n // check if it's a single symbol and not Special like (Ctrl, backspace etc.)\n if (e?.key?.length <= 1 && !e.ctrlKey && !e.altKey && !e.metaKey) {\n // stop event propagation if key pressed is not a number or locale character or minus sign\n if (\n Number.isNaN(Number.parseInt(e.key, 10)) &&\n this.isMinusAllowed(e.key) &&\n e.key !== getLocaleNumberSymbol(this.localeService?.currentLocale || this.locale_id, NumberSymbol.Decimal)\n ) {\n e.stopPropagation();\n e.preventDefault();\n // stop event propagation if key pressed exceeds the min/max value range\n } else if (!Number.isNaN(Number.parseInt(e.key, 10)) && this.isOutSideRange(e)) {\n e.stopPropagation();\n e.preventDefault();\n } else if (this.isOutSideRange(e)) {\n e.stopPropagation();\n e.preventDefault();\n }\n }\n\n // protect decimal symbol deletion in case fillFraction is on\n if (e.key === 'Delete' || e.key === 'Backspace') {\n const element = this._elementRef.nativeElement;\n // position of caret\n const pos = element.selectionStart;\n // get character about to be deleted\n const char = element.value.charAt(pos - 1);\n // in case the char is the decimal symbol prevent deletion and move caret in front\n if (this.fillFraction &&\n char === getLocaleNumberSymbol(this.localeService?.currentLocale || this.locale_id, NumberSymbol.Decimal)) {\n e.stopPropagation();\n e.preventDefault();\n element.setSelectionRange(pos - 1, pos - 1);\n } else if (this.isOutSideRange(e)) {\n // don't allow insertion that will put number out of range\n e.stopPropagation();\n e.preventDefault();\n }\n }\n }\n\n @HostListener('focusout')\n protected onFocusout(): void {\n // in case fillFraction feature is on and there's no integer part add leading 0\n if (this.fillFraction && this.cleaveInstance.getRawValue().match(/^\\.[0-9]+/g)) {\n this.cleaveInstance.setRawValue('0' + this.cleaveInstance.getRawValue());\n }\n\n // in case round UP is enabled\n if (this.roundUp > 0) {\n const number = this.parseNumber(this.cleaveInstance.getRawValue(), false, false);\n this.cleaveInstance.setRawValue(this.decimalAdjust(number, this.roundUp).toString());\n }\n\n // in case min is set and value is less than min reset to the min value\n if (this.min !== null && this.min !== undefined && Number.parseFloat(this.cleaveInstance.getRawValue()) < this.min) {\n this.cleaveInstance.setRawValue(this.min.toString());\n }\n\n // in case max is set and value is greater than max reset to the max value\n if (this.max !== null && this.max !== undefined && Number.parseFloat(this.cleaveInstance.getRawValue()) > this.max) {\n this.cleaveInstance.setRawValue(this.max.toString());\n }\n }\n\n protected setInvalid(state?: BooleanInput): void {\n // in case it's controlled by NgControl override\n this._isInvalid = this.control ? this.control.invalid && this.control.touched : coerceBooleanProperty(state);\n\n // set BaseDirective Attribute\n this.euiDanger = this._isInvalid;\n }\n\n /**\n * @Override setPlaceholder setPlaceholderAttribute of InputDirective\n * Updates the placeholder value based on current number format and given value.\n * If value passed contains characters it doesn't format placeholder.\n * */\n protected setPlaceholderAttribute(value: string | number): void {\n // if value is a number, format the value based on current number format\n if (typeof value === 'number' && !isNaN(value) && isPlatformBrowser(this.platformId)) {\n const div = this.document.createElement('input');\n // create a clone of cleaveInstance\n const cloneInstance: CleaveInstance = new Cleave(div, this.options);\n // BEWARE: by the time your setRawValue cleave options have changed thus number formatting\n cloneInstance.setRawValue(value.toString());\n // set the value with current format as placeholder\n super.setPlaceholderAttribute(cloneInstance.getFormattedValue());\n } else if (typeof value === 'string') {\n super.setPlaceholderAttribute(value.toString());\n } else if (isNaN(value)) {\n value = this._elementRef.nativeElement.placeholder;\n super.setPlaceholderAttribute(value.toString());\n }\n }\n\n /**\n * instantiate Cleave.js\n */\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private initCleave(onChangeCallback?: (obj: any) => any): void {\n if(isPlatformServer(this.platformId)) {\n // in case it's not a browser environment\n return;\n }\n // change the cleave prototype function to intercept onCut callback\n // and allow based on the event bubbling and disabled state\n // TIP: change behavior of onCut to stop in case bubble is canceled\n // TODO: See relevant issue https://github.com/nosir/cleave.js/issues/675\n const _onCut = Cleave.prototype['onCut'];\n Cleave.prototype['onCut'] = function (e: Event): void {\n // eslint-disable-next-line no-invalid-this\n if (!e.cancelBubble && !this.element.disabled) {\n // eslint-disable-next-line no-invalid-this\n _onCut.call(this, e);\n }\n };\n\n // in case options is undefined\n const opts: CleaveOptions = { ...this.options };\n\n // set the onValue change listener to keep the value at readOnly element in sync\n opts.onValueChanged = onChangeCallback || this.onValueChanged.bind(this);\n\n // in case round UP is enabled\n if (this.roundUp > 0) {\n const number = this.parseNumber(this._elementRef.nativeElement.value);\n this._elementRef.nativeElement.value = this.decimalAdjust(number, this.roundUp);\n }\n\n // create the Cleave instance with the new or updated options\n this.cleaveInstance = new Cleave(this._elementRef.nativeElement, opts);\n }\n\n /**\n * Updates the cleave options by destroying the current instance and creating another one while keeping the previous\n * value.\n */\n private updateOptions(localeUpdated = false): void {\n if (this.cleaveInstance) {\n // the value before destroying cleave instance\n const previousValue = this.cleaveInstance.getRawValue();\n\n // update the Cleave instance with the new or updated options\n this.cleaveInstance.properties = {\n ...this.cleaveInstance.properties,\n ...this.options,\n initValue: previousValue,\n };\n\n // init number formatter with updated options\n this.cleaveInstance.initNumeralFormatter();\n\n // In case previous settings where numeralDecimalMark='.' with value 1000.99, and they changed to\n // numeralDecimalMark=','; set initValue to 1000.99 or even 1000,99 will not be reflected and cleave will\n // remove the decimal part. Set of the value after initialization causes reformat of number and works.\n this.cleaveInstance.setRawValue(previousValue);\n\n // parse number\n const number = this.parseNumber(this._elementRef.nativeElement.placeholder || undefined, localeUpdated);\n // set placeholder in case none is provided\n this.setPlaceholderAttribute(number);\n }\n }\n\n /**\n * Callback function of the Cleave instance that is invoked when value is changed.\n *\n * @param event type of CleaveEventOnChange\n */\n private onValueChanged(event: CleaveEventOnChange): void {\n const { target } = event;\n\n if (this.fillFraction) {\n this.applyFractionFill(target.rawValue);\n }\n this.onChange(this.parseNumber(target.rawValue, false, false));\n // fill leading zero\n if (this.leadingZero) {\n const size = this.leadingZero > this.digits && this.digits > 0 ? this.digits : this.leadingZero;\n this._elementRef.nativeElement.value = this.padZero(event.target.rawValue, size);\n }\n }\n\n /**\n * responsible to extract all locale information needed to build CleaveOptions related to number format.\n *\n * @param id The id of the locale\n */\n private getCleaveOptsBasedOnLocale(id: string): CleaveOptions {\n if (!id || id === '') {\n throw new Error('Locale id cannot be empty or undefined');\n }\n const opts: CleaveOptions = {\n numeral: true,\n delimiter: getLocaleNumberSymbol(id, NumberSymbol.Group),\n numeralDecimalMark: getLocaleNumberSymbol(id, NumberSymbol.Decimal),\n numeralDecimalScale: this.fractionDigits,\n numeralIntegerScale: this.digits,\n numeralThousandsGroupStyle: this.noFormat ? 'none' : 'thousand', // TODO: implement based on locale\n };\n\n return { ...this.options, ...opts };\n }\n\n /**\n * Applies the fill of decimal part with zeros in case decimal part of given number has\n * size less than the max fraction digits.\n *\n * @param number\n * @param cleaveInstance\n * @private\n */\n private applyFractionFill(number: string, cleaveInstance: CleaveInstance = this.cleaveInstance): void {\n // if fill fraction is enabled and there's cleave instance\n if (this.fillFraction) {\n if (this.cleaveInstance) {\n number = number?.toString();\n if (number === '' || !number) {\n return;\n }\n const hasDecimal = number.split('.').length > 1;\n // in case there's already decimal point in number\n if (hasDecimal) {\n const decimalSize = number.split('.')[1].length;\n // if size of decimal part of number is less than the max fraction digits\n if (decimalSize < this._fractionDigits) {\n number = number + new Array(this._fractionDigits - decimalSize).fill(0).join('');\n const pos = this._elementRef.nativeElement.selectionStart;\n cleaveInstance.setRawValue(number);\n this._elementRef.nativeElement.setSelectionRange(pos, pos);\n }\n // in case there's not, force it by filling it as much zero as the fraction digits\n } else if (this.fractionDigits > 0) {\n number = `${number}.${new Array(this._fractionDigits).fill(0).join('')}`;\n const pos = this._elementRef.nativeElement.selectionStart;\n cleaveInstance.setRawValue(number);\n this._elementRef.nativeElement.setSelectionRange(pos, pos);\n }\n }\n }\n }\n\n /**\n * Parses a given formatted number and returns it as a number.\n *\n * @param value The formatted number you want to parse e.g. 111,888.22\n * @param userPrevLocaleState Use previous locale state to parse the value. By default, is false\n * @param replaceSymbol Replace the decimal symbol with a dot. By default, is false\n * @private\n */\n private parseNumber(value: string, userPrevLocaleState = false, replaceSymbol = true): number | string {\n // locale state\n const locale = userPrevLocaleState ? this.localeService?.previousLocale : this.localeService?.currentLocale || this.locale_id || 'en';\n // get decimal and group symbols\n const decimalSymbol = getLocaleNumberSymbol(locale, NumberSymbol.Decimal);\n const groupSymbol = getLocaleNumberSymbol(locale, NumberSymbol.Group);\n // replace symbols to parse number\n const parsedNumber = value?.split(groupSymbol).join('').split(decimalSymbol).join('.');\n return this.parseBigNumber(replaceSymbol ? parsedNumber : value);\n }\n\n /**\n * Pad leading zero to the number\n *\n * @param num The number to add leading zero to\n * @param size Number of number's leading zero\n * @private\n */\n private padZero(num, size): string {\n num = num.toString();\n // get integer and decimal part\n // eslint-disable-next-line prefer-const\n let [integer, decimal] = num.split('.');\n while (integer.length < size) {\n integer = '0' + integer;\n }\n return decimal ? `${integer}.${decimal}` : integer;\n }\n\n /**\n * checks whether the min symbol is allowed. It is allowed when minus symbol\n * provided and min input is undefined or min provided and is negative.\n *\n * @param key The key string coming from an event\n */\n private isMinusAllowed(key: string): boolean {\n return !this.min || this.min < 0 ? key !== '-' : true;\n }\n\n /**\n * check whether the key entered is inside the min and\n * max range. Returns true if it's out of range.\n *\n * @param e A keyboard event\n */\n private isOutSideRange(e: KeyboardEvent): boolean {\n if (!this.cleaveInstance) {\n return false;\n }\n // get caret position\n const pos = e.target['selectionStart'];\n // get caret position (in case there's text selected)\n const endPos = e.target['selectionEnd'];\n // get current value (formatted)\n let value = e.target['value'];\n // remove key from value\n if (e.key === 'Delete' || e.key === 'Backspace') {\n // check if there's selection of text to be removed\n if (pos !== endPos) {\n value = e.target['value'].substring(0, pos) + e.target['value'].substring(endPos, e.target['value'].length);\n } else {\n value = e.target['value'].substring(0, pos - 1) + e.target['value'].substring(endPos, e.target['value'].length);\n }\n } else {\n // add key to the value\n value = [value.slice(0, pos), e.key, value.slice(endPos)].join('');\n }\n\n // create a Cleave instance to extract the number from formatted value\n const cleave: CleaveInstance = new Cleave(this.document.createElement('input'), { ...this.options });\n cleave.setRawValue(value);\n const number = Number(cleave.getRawValue());\n // destroy cleave instance\n cleave.destroy();\n return !isNaN(number) &&\n this.min >= 0 ? (this.isDefined(this.max) && this.max < number) : (this.min > number || this.max < number) &&\n this.max <= 0 ? (this.isDefined(this.min) && this.min > number) : (this.min > number || this.max < number);\n }\n\n /**\n * Decimal adjustment of a number.\n *\n * @param value The number or string representation of a number.\n * @param exp The exponent (the 10 logarithm of the adjustment base).\n * @returns The adjusted value.\n */\n private decimalAdjust(value: number | string, exp: number): string {\n // Ensure exp is a number\n exp = +Number(exp);\n\n // Convert input to string if it's a number\n const valueStr = typeof value === 'number' ? value.toString() : String(value);\n\n // Handle empty or invalid inputs\n if (!valueStr || isNaN(Number(valueStr))) {\n return '';\n }\n\n try {\n // Check if the value is negative\n const isNegative = valueStr.startsWith('-');\n // Get the absolute value string\n const absoluteValueStr = isNegative ? valueStr.substring(1) : valueStr;\n\n // Split the number into integer and decimal parts\n const parts = absoluteValueStr.split('.');\n let integerPart = parts[0] || '0'; // Default to '0' if empty\n let decimalPart = parts.length > 1 ? parts[1] : '';\n\n // If there's no decimal part and exp > 0, we should add zeros\n if (decimalPart === '' && exp > 0) {\n decimalPart = '0'.repeat(exp);\n }\n\n // Pad decimal part with zeros if needed\n if (decimalPart.length < exp) {\n decimalPart = decimalPart.padEnd(exp, '0');\n }\n\n // Determine if we need to round up\n let roundUp = false;\n if (decimalPart.length > exp) {\n const nextDigit = parseInt(decimalPart.charAt(exp), 10);\n roundUp = nextDigit >= 5;\n }\n\n // Trim the decimal part to the required precision\n decimalPart = decimalPart.substring(0, exp);\n\n // Handle rounding\n if (roundUp) {\n if (exp === 0) {\n // If exp is 0, we need to round the integer part\n integerPart = (BigInt(integerPart) + 1n).toString();\n } else {\n // Create a number from the decimal part\n let decimalNum = parseInt(decimalPart, 10);\n\n // Add 1 to the decimal part\n decimalNum += 1;\n\n // Check if we need to carry over to the integer part\n if (decimalNum.toString().length > exp) {\n integerPart = (BigInt(integerPart) + 1n).toString();\n decimalNum = 0;\n }\n\n // Convert back to string and pad with leading zeros if needed\n decimalPart = decimalNum.toString().padStart(exp, '0');\n }\n }\n\n // Combine the parts\n let result: string;\n if (exp > 0) {\n // Remove trailing zeros if they're not significant\n let trimmedDecimalPart = decimalPart;\n while (trimmedDecimalPart.length > 0 && trimmedDecimalPart.charAt(trimmedDecimalPart.length - 1) === '0') {\n trimmedDecimalPart = trimmedDecimalPart.substring(0, trimmedDecimalPart.length - 1);\n }\n\n result = trimmedDecimalPart.length > 0 ? `${integerPart}.${trimmedDecimalPart}` : integerPart;\n } else {\n result = integerPart;\n }\n\n // Restore the negative sign if needed\n return isNegative ? '-' + result : result;\n } catch (error) {\n console.error('Error in decimalAdjust:', error);\n // If there's an error, return a formatted original value or '0'\n return valueStr || '0';\n }\n }\n\n /**\n * Checks whether a value is defined or not\n *\n * @param value\n * @private\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private isDefined(value: any): boolean {\n return value !== undefined && value !== null;\n }\n\n /**\n * Check if the value is a valid number. Take into account the Big numbers\n * more than 16 digits. Check if string contains only digits and dots.\n * The number value must not be formatted.\n * @param value the value to check\n * @private\n */\n private isItaNumber(value: string): boolean {\n const length = value?.split('.')[0].length\n return length > 15 ? /^\\d+(\\.\\d+)?$/.test(value) : !isNaN(Number(value));\n }\n\n /**\n * Parse the value to a number. For large numbers, the value is a string.\n * The number value must not be formatted.\n * @param value the value to parse\n * @private\n */\n private parseBigNumber(value: string): number | string {\n // for large numbers, the value is a string\n const length = value?.split('.')[0].length\n return length > 15 ? value : Number.parseFloat(value);\n }\n}\n","import { Directive, ElementRef, forwardRef, Inject, OnInit, Optional, PLATFORM_ID } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { CleaveInstance, EuiInputNumberComponent } from './eui-input-number.component';\nimport Cleave from 'cleave.js';\nimport { DOCUMENT, isPlatformServer } from '@angular/common';\n\n@Directive({\n selector: 'input[euiInputNumber][formControl],input[euiInputNumber][formControlName],input[euiInputNumber][ngModel]',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => EuiInputNumberDirective),\n multi: true,\n },\n ],\n})\nexport class EuiInputNumberDirective implements ControlValueAccessor, OnInit {\n /** hold a copy of the value */\n private value: number;\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private onChange: (t: any) => void;\n\n constructor(\n private elementRef: ElementRef,\n @Optional() private euiNumberComponent: EuiInputNumberComponent,\n @Inject(DOCUMENT) private document: Document,\n @Inject(PLATFORM_ID) private platformId: unknown,\n ) {}\n\n ngOnInit(): void {\n this.euiNumberComponent['initCleave'](this.valueChanges.bind(this));\n }\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n writeValue(obj: any): void {\n if (isPlatformServer(this.platformId)) {\n return;\n }\n const cleave: CleaveInstance = new Cleave(this.document.createElement('input'), { ...this.euiNumberComponent['options'] });\n cleave.setRawValue(obj);\n if (this.euiNumberComponent.fillFraction && obj !== '' && obj) {\n this.euiNumberComponent['applyFractionFill'](obj, cleave);\n }\n let valueOfElement: string;\n // fill leading zero\n if (this.euiNumberComponent.leadingZero) {\n const size =\n this.euiNumberComponent.leadingZero > this.euiNumberComponent.digits && this.euiNumberComponent.digits > 0\n ? this.euiNumberComponent.digits\n : this.euiNumberComponent.leadingZero;\n valueOfElement = this.euiNumberComponent['padZero'](cleave.getFormattedValue(), size);\n } else {\n valueOfElement = cleave.getFormattedValue();\n }\n this.elementRef.nativeElement.value = valueOfElement;\n this.value = Number.parseFloat(cleave.getRawValue());\n cleave.destroy();\n }\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n registerOnChange(fn: any): void {\n this.onChange = (t): void => {\n this.value = t;\n fn(t);\n };\n }\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.euiNumberComponent.disabled = isDisabled;\n }\n\n private onTouched(): void {\n // this.euiNumberComponent.isInvalid = this.control.invalid;\n }\n\n /**\n * Handle the value changes of the input element and update the value of the\n * directive and the form control. For large numbers, the value is a string.\n *\n * @param event\n */\n private valueChanges(event): void {\n const { target } = event;\n\n this.euiNumberComponent['onValueChanged'](event);\n // for large numbers, the value is a string\n const length = target.rawValue.split('.')[0].length\n const numberCoerce = length > 15 ? target.rawValue : Number.parseFloat(target.rawValue);\n if (this.value !== numberCoerce && this.onChange) {\n this.onChange(length > 15 ? target.rawValue : (isNaN(numberCoerce) ? null : numberCoerce));\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { EuiInputNumberComponent } from './eui-input-number.component';\nimport { EuiInputNumberDirective } from './eui-number-control.directive';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [EuiInputNumberComponent, EuiInputNumberDirective],\n exports: [EuiInputNumberComponent, EuiInputNumberDirective],\n})\nexport class EuiInputNumberModule {}\n\n/**\n * @deprecated Use EuiInputNumberModule instead. This will be removed in eUI 19.\n */\n@NgModule({\n imports: [EuiInputNumberModule],\n exports: [EuiInputNumberModule],\n})\nexport class EuiInputNumberDirectiveModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.EuiInputNumberComponent"],"mappings":";;;;;;;;;;;AAyEM,MAAO,uBAAwB,SAAQ,cAAc,CAAA;AAavD,IAAA,IACW,SAAS,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,UAAU,IAAI,IAAI;;IAGlC,IAAW,SAAS,CAAC,KAAmB,EAAA;AACpC,QAAA,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;;AAE1B,IAAA,IACW,UAAU,GAAA;AACjB,QAAA,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,EAAE,IAAI,CAAC,UAAU,GAAG,2BAA2B,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;;;AAIzH,IAAA,IACI,cAAc,GAAA;QACd,OAAO,IAAI,CAAC,eAAe;;IAE/B,IAAI,cAAc,CAAC,KAAkB,EAAA;AACjC,QAAA,IAAI,CAAC,eAAe,GAAG,oBAAoB,CAAC,KAAK,CAAC;;AAwBtD,IAAA,WAAA,CACc,WAAuB,EACvB,SAAoB,EACV,aAA4B,EACrB,SAAiB,EAC5C,QAAkB,EACQ,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AC;AACvB,oBAAA,YAAY,EAAE,CAAC,uBAAuB,EAAE,uBAAuB,CAAC;AAChE,oBAAA,OAAO,EAAE,CAAC,uBAAuB,EAAE,uBAAuB,CAAC;AAC9D,iBAAA;;AAGD;;AAEG;MAKU,6BAA6B,CAAA;+GAA7B,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAA7B,6BAA6B,EAAA,OAAA,EAAA,CAT7B,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAApB,oBAAoB,CAAA,EAAA,CAAA,CAAA;gHASpB,6BAA6B,EAAA,OAAA,EAAA,CAH5B,oBAAoB,EANrB,oBAAoB,CAAA,EAAA,CAAA,CAAA;;4FASpB,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAJzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAClC,iBAAA;;;AClBD;;AAEG;;;;"}
|
@@ -189,7 +189,11 @@ class EuiPopoverComponent {
|
|
189
189
|
panelClass: this.baseStatesDirective.getCssClasses('eui-popover').split(' '),
|
190
190
|
});
|
191
191
|
this.overlayRef.attach(this.templatePortal);
|
192
|
-
document.
|
192
|
+
document.querySelectorAll('.cdk-overlay-container')?.forEach(el => {
|
193
|
+
if (!el.classList.contains('eui-18')) {
|
194
|
+
el.classList.add('eui-18');
|
195
|
+
}
|
196
|
+
});
|
193
197
|
this.positionStrategy = positionStrategy;
|
194
198
|
this.positionStrategyUpdate$.next();
|
195
199
|
this.overlayRef
|