@seniorsistemas/angular-components 18.1.1 → 18.1.2
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/esm2022/dynamic-form/lib/dynamic-form/components/lookup/lookup.component.mjs +2 -1
- package/esm2022/numeric-mask/lib/numeric-mask/numeric-mask.directive.mjs +2 -34
- package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs +1 -0
- package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-numeric-mask.mjs +1 -33
- package/fesm2022/seniorsistemas-angular-components-numeric-mask.mjs.map +1 -1
- package/numeric-mask/lib/numeric-mask/numeric-mask.directive.d.ts +0 -15
- package/package.json +12 -12
|
@@ -322,27 +322,6 @@ class NumericMaskDirective {
|
|
|
322
322
|
const multiplier = new BigNumber(10).pow(decimalPlaces);
|
|
323
323
|
return bigNumber.multipliedBy(multiplier).integerValue(BigNumber.ROUND_DOWN).dividedBy(multiplier);
|
|
324
324
|
}
|
|
325
|
-
/**
|
|
326
|
-
* Checks if the value has excessive decimal places
|
|
327
|
-
* @private
|
|
328
|
-
*/
|
|
329
|
-
hasExcessiveDecimalPlaces(value) {
|
|
330
|
-
const parts = value.split(this.decimalSeparator);
|
|
331
|
-
if (parts.length > 1) {
|
|
332
|
-
const decimalPart = parts[1].replace(/[^0-9]/g, '');
|
|
333
|
-
return decimalPart.length > this.maxDecimalPlaces();
|
|
334
|
-
}
|
|
335
|
-
return false;
|
|
336
|
-
}
|
|
337
|
-
/**
|
|
338
|
-
* Clears the input and notifies the model
|
|
339
|
-
* @private
|
|
340
|
-
*/
|
|
341
|
-
clearInput() {
|
|
342
|
-
this.renderer.setProperty(this.elementRef.nativeElement, 'value', '');
|
|
343
|
-
this.lastModelValue = null;
|
|
344
|
-
this.onChange(null);
|
|
345
|
-
}
|
|
346
325
|
/**
|
|
347
326
|
* Parses a string value to its numeric representation, handling separators and sign
|
|
348
327
|
* Returns BigNumber to preserve full precision and optional number conversion
|
|
@@ -386,18 +365,7 @@ class NumericMaskDirective {
|
|
|
386
365
|
const effectiveDecimalPlaces = decimalPart.replace(/0+$/, '').length;
|
|
387
366
|
const decimalPlacesToShow = Math.max(this.minDecimalPlaces(), Math.min(effectiveDecimalPlaces, this.maxDecimalPlaces()));
|
|
388
367
|
decimalPart = decimalPart.substring(0, decimalPlacesToShow).padEnd(decimalPlacesToShow, '0');
|
|
389
|
-
return formattedInteger + this.decimalSeparator + decimalPart;
|
|
390
|
-
}
|
|
391
|
-
/**
|
|
392
|
-
* Formats the value according to the locale
|
|
393
|
-
* @private
|
|
394
|
-
*/
|
|
395
|
-
formatValue(value) {
|
|
396
|
-
if (!value || value.trim() === '') {
|
|
397
|
-
return '';
|
|
398
|
-
}
|
|
399
|
-
const { numeric } = this.parseStringToValue(value);
|
|
400
|
-
return this.formatNumeric(numeric);
|
|
368
|
+
return decimalPart ? formattedInteger + this.decimalSeparator + decimalPart : formattedInteger;
|
|
401
369
|
}
|
|
402
370
|
/**
|
|
403
371
|
* Converts the formatted value to the model format (international standard string)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seniorsistemas-angular-components-numeric-mask.mjs","sources":["../../projects/angular-components/numeric-mask/src/lib/numeric-mask/numeric-mask.directive.ts","../../projects/angular-components/numeric-mask/src/lib/numeric-mask/numeric-mask.module.ts","../../projects/angular-components/numeric-mask/src/seniorsistemas-angular-components-numeric-mask.ts"],"sourcesContent":["import { Directive, effect, ElementRef, forwardRef, inject, input, OnInit, Renderer2 } from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n} from '@angular/forms';\n\nimport { LocaleService } from '@seniorsistemas/angular-components/locale';\nimport BigNumber from 'bignumber.js';\n\n/**\n * Numeric mask directive with internationalization support.\n *\n * Formats numeric values according to the specified locale, applying\n * appropriate thousand and decimal separators, with support for negative values,\n * min/max decimal places control, and scientific notation.\n *\n * @example\n * ```html\n * <input\n * type=\"text\"\n * sNumericMask\n * [locale]=\"'pt-BR'\"\n * [minDecimalPlaces]=\"2\"\n * [maxDecimalPlaces]=\"2\"\n * [allowNegative]=\"true\"\n * [(ngModel)]=\"value\"\n * />\n * ```\n */\n@Directive({\n selector: '[sNumericMask]',\n standalone: true,\n host: {\n '(input)': 'onInput($event)',\n '(focus)': 'onFocus()',\n '(blur)': 'onBlur()',\n '(paste)': 'onPaste($event)',\n '(keydown)': 'onKeyDown($event)',\n '(keypress)': 'onKeyPress($event)',\n '[style.text-align]': '\"right\"',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NumericMaskDirective),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => NumericMaskDirective),\n multi: true,\n },\n ],\n})\nexport class NumericMaskDirective implements OnInit, ControlValueAccessor, Validator {\n /**\n * Locale for formatting (e.g. 'pt-BR', 'en-US', 'de-DE')\n * If not provided, uses the locale from LocaleService\n */\n public locale = input<string | undefined>(undefined);\n\n /**\n * Minimum number of decimal places to display\n * @default 0\n */\n public minDecimalPlaces = input(0);\n\n /**\n * Maximum number of decimal places allowed\n * @default 10\n */\n public maxDecimalPlaces = input(10);\n\n /**\n * Allows negative values\n * @default false\n */\n public allowNegative = input(false);\n\n /**\n * Enables scientific notation support\n * @default true\n */\n public allowScientificNotation = input(true);\n\n /**\n * Minimum value allowed\n */\n public min = input<number | undefined>(undefined);\n\n /**\n * Maximum value allowed\n */\n public max = input<number | undefined>(undefined);\n\n private readonly elementRef = inject(ElementRef<HTMLInputElement>);\n private readonly renderer = inject(Renderer2);\n private readonly localeService = inject(LocaleService, { optional: true });\n\n private onChange: (value: string | null) => void = () => {};\n private onTouched: () => void = () => {};\n private decimalSeparator = ',';\n private thousandSeparator = '.';\n private currentLocale = 'pt-BR';\n private lastModelValue: string | null = null;\n\n constructor() {\n effect(() => {\n const inputLocale = this.locale();\n\n if (inputLocale) {\n this.currentLocale = inputLocale;\n this.updateSeparators();\n }\n });\n }\n\n public ngOnInit(): void {\n if (this.minDecimalPlaces() > this.maxDecimalPlaces()) {\n throw new Error(\n `NumericMaskDirective: minDecimalPlaces (${this.minDecimalPlaces()}) cannot be greater than maxDecimalPlaces (${this.maxDecimalPlaces()})`\n );\n }\n\n if (this.locale()) {\n this.currentLocale = this.locale()!;\n this.updateSeparators();\n this.setInputMode();\n } else if (this.localeService) {\n this.localeService.get().subscribe(() => {\n this.currentLocale = this.localeService!.getLocaleOptions()?.locale || 'pt-BR';\n this.updateSeparators();\n this.setInputMode();\n });\n } else {\n this.updateSeparators();\n this.setInputMode();\n }\n }\n\n /**\n * Listener for input events (typing)\n */\n public onInput(event: Event): void {\n const input = event.target as HTMLInputElement;\n let value = input.value;\n value = this.normalizeSeparators(value);\n this.processInputValue(value);\n }\n\n /**\n * Listener for focus events (gaining focus)\n */\n public onFocus(): void {\n const input = this.elementRef.nativeElement;\n const currentValue = input.value;\n\n if (!currentValue || currentValue.trim() === '') {\n return;\n }\n\n if (this.lastModelValue) {\n const displayValue = this.lastModelValue.replace('.', this.decimalSeparator);\n this.renderer.setProperty(input, 'value', displayValue);\n input.select();\n return;\n }\n\n const modelValue = this.toModelValue(currentValue);\n\n if (!modelValue) {\n return;\n }\n\n const displayValue = modelValue.replace('.', this.decimalSeparator);\n this.renderer.setProperty(input, 'value', displayValue);\n input.select();\n }\n\n /**\n * Listener for blur events (focus loss)\n */\n public onBlur(): void {\n this.onTouched();\n\n const currentValue = this.elementRef.nativeElement.value;\n\n if (!currentValue || currentValue.trim() === '') {\n this.onChange(null);\n this.lastModelValue = null;\n return;\n }\n\n const modelValue = this.toModelValue(currentValue);\n\n if (!modelValue) {\n this.onChange(null);\n this.lastModelValue = null;\n return;\n }\n\n this.lastModelValue = modelValue;\n const displayValue = this.fromModelValue(modelValue);\n this.renderer.setProperty(this.elementRef.nativeElement, 'value', displayValue);\n this.onChange(modelValue);\n }\n\n /**\n * Listener for paste events (clipboard)\n */\n public onPaste(event: ClipboardEvent): void {\n event.preventDefault();\n\n const pastedText = event.clipboardData?.getData('text') || '';\n let value = this.parseClipboardValue(pastedText);\n\n this.processInputValue(value);\n }\n\n /**\n * Listener for special keys (+ and -)\n */\n public onKeyDown(event: KeyboardEvent): void {\n const key = event.key;\n\n if (key === '-' || key === '+') {\n const input = this.elementRef.nativeElement;\n const value = input.value;\n const cursorPosition = input.selectionStart || 0;\n\n if (key === '-' && this.allowScientificNotation()) {\n const charBeforeCursor = value[cursorPosition - 1];\n if (charBeforeCursor === 'e' || charBeforeCursor === 'E') {\n return;\n }\n }\n\n event.preventDefault();\n if (!this.allowNegative()) {\n return;\n }\n\n this.toggleSign(value, key === '-');\n }\n }\n\n /**\n * Listener for keypress to block invalid characters\n */\n public onKeyPress(event: KeyboardEvent): void {\n const key = event.key;\n const input = this.elementRef.nativeElement;\n const cursorPosition = input.selectionStart || 0;\n const value = input.value;\n\n if ((key === '-' || key === '+') && this.allowScientificNotation()) {\n const charBeforeCursor = value[cursorPosition - 1];\n if (charBeforeCursor === 'e' || charBeforeCursor === 'E') {\n return;\n }\n }\n\n if (key === '+' || key === '-') {\n event.preventDefault();\n return;\n }\n\n const isDigit = /^[0-9]$/.test(key);\n const isLocaleDecimalSeparator = key === this.decimalSeparator;\n const isOtherSeparator = (key === ',' || key === '.') && key !== this.decimalSeparator;\n const isScientificNotation = (key === 'e' || key === 'E') && this.allowScientificNotation();\n const isControlKey = event.ctrlKey || event.metaKey || event.altKey;\n const isSpecialKey = [\n 'Backspace',\n 'Tab',\n 'Enter',\n 'Escape',\n 'ArrowLeft',\n 'ArrowRight',\n 'Delete',\n 'Home',\n 'End',\n ].includes(key);\n\n if (isOtherSeparator) {\n event.preventDefault();\n return;\n }\n\n if (isScientificNotation) {\n if (value.includes('e') || value.includes('E')) {\n event.preventDefault();\n return;\n }\n\n const charBeforeCursor = value[cursorPosition - 1];\n if (!charBeforeCursor || !/^[0-9]$/.test(charBeforeCursor)) {\n event.preventDefault();\n return;\n }\n }\n\n if (!isDigit && !isLocaleDecimalSeparator && !isScientificNotation && !isControlKey && !isSpecialKey) {\n event.preventDefault();\n }\n }\n\n /**\n * Updates separators according to the locale\n * @private\n */\n private updateSeparators(): void {\n const formatted = new Intl.NumberFormat(this.currentLocale).format(1234.5);\n\n this.thousandSeparator = formatted[1];\n this.decimalSeparator = formatted[5];\n }\n\n /**\n * Processes input value and updates the input and model\n * @private\n */\n private processInputValue(value: string): void {\n if (!this.decimalSeparator || !this.thousandSeparator) {\n this.updateSeparators();\n }\n\n this.renderer.setProperty(this.elementRef.nativeElement, 'value', value);\n\n const modelValue = this.toModelValue(value);\n\n // During typing, clear the stored model value so onFocus will recalculate\n this.lastModelValue = null;\n\n this.onChange(modelValue);\n }\n\n /**\n * Sets inputmode for numeric keyboard on mobile devices\n * @private\n */\n private setInputMode(): void {\n this.renderer.setAttribute(this.elementRef.nativeElement, 'inputmode', 'decimal');\n this.renderer.setAttribute(this.elementRef.nativeElement, 'autocomplete', 'off');\n }\n\n /**\n * Removes separators from a formatted value\n * @private\n */\n private removeSeparators(value: string): string {\n const thousandRegex = new RegExp(`\\\\${this.escapeRegex(this.thousandSeparator)}`, 'g');\n return value.replace(thousandRegex, '');\n }\n\n /**\n * Strips unnecessary trailing zeros from decimal part\n * @private\n */\n private stripTrailingZeros(value: string): string {\n const parts = value.split(this.decimalSeparator);\n if (parts.length === 2) {\n const decimalPart = parts[1].replace(/0+$/, '');\n return decimalPart.length > 0 ? parts[0] + this.decimalSeparator + decimalPart : parts[0];\n }\n return value;\n }\n\n /**\n * Normalizes separators during typing\n * @private\n */\n private normalizeSeparators(value: string): string {\n value = this.removeSeparators(value);\n\n if (this.decimalSeparator === ',') {\n value = value.replace(/\\./g, ',');\n } else if (this.decimalSeparator === '.') {\n value = value.replace(/,/g, '.');\n }\n\n const parts = value.split(this.decimalSeparator);\n if (parts.length > 2) {\n value = parts[0] + this.decimalSeparator + parts.slice(1).join('');\n }\n\n return value;\n }\n\n /**\n * Escapes special characters for use in regex\n * @private\n */\n private escapeRegex(str: string): string {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n }\n\n /**\n * Truncates a number to the specified decimal places (never rounds)\n * @private\n */\n private truncateToDecimalPlaces(bigNumber: BigNumber, decimalPlaces: number): BigNumber {\n if (decimalPlaces < 0) {\n return bigNumber;\n }\n const multiplier = new BigNumber(10).pow(decimalPlaces);\n return bigNumber.multipliedBy(multiplier).integerValue(BigNumber.ROUND_DOWN).dividedBy(multiplier);\n }\n\n /**\n * Checks if the value has excessive decimal places\n * @private\n */\n private hasExcessiveDecimalPlaces(value: string): boolean {\n const parts = value.split(this.decimalSeparator);\n\n if (parts.length > 1) {\n const decimalPart = parts[1].replace(/[^0-9]/g, '');\n return decimalPart.length > this.maxDecimalPlaces();\n }\n\n return false;\n }\n\n /**\n * Clears the input and notifies the model\n * @private\n */\n private clearInput(): void {\n this.renderer.setProperty(this.elementRef.nativeElement, 'value', '');\n this.lastModelValue = null;\n this.onChange(null);\n }\n\n /**\n * Parses a string value to its numeric representation, handling separators and sign\n * Returns BigNumber to preserve full precision and optional number conversion\n * @private\n */\n private parseStringToValue(value: string): { bigNumber: BigNumber; numeric: number; isNegative: boolean } {\n const isNegative = value.startsWith('-');\n let numericStr = value\n .replace(/^-/, '')\n .replace(new RegExp(`\\\\${this.thousandSeparator}`, 'g'), '')\n .replace(new RegExp(`\\\\${this.decimalSeparator}`, 'g'), '.');\n\n if (numericStr === '.' || numericStr === '') {\n numericStr = '0';\n } else if (numericStr.startsWith('.')) {\n numericStr = '0' + numericStr;\n }\n\n let bigNumber = new BigNumber(numericStr);\n if (bigNumber.isNaN()) {\n bigNumber = new BigNumber(0);\n }\n\n if (isNegative && this.allowNegative()) {\n bigNumber = bigNumber.negated();\n }\n\n return { bigNumber, numeric: bigNumber.toNumber(), isNegative };\n }\n\n /**\n * Formats a numeric value according to the locale\n * Truncates (never rounds) to maxDecimalPlaces and pads with zeros to minDecimalPlaces\n * @private\n */\n private formatNumeric(numeric: number | BigNumber): string {\n let bigNumeric = numeric instanceof BigNumber ? numeric : new BigNumber(numeric);\n \n const truncatedValue = this.truncateToDecimalPlaces(bigNumeric, this.maxDecimalPlaces());\n \n const valueStr = truncatedValue.toFixed(Math.max(this.minDecimalPlaces(), this.maxDecimalPlaces()));\n \n let formattedValue = valueStr.replace('.', this.decimalSeparator);\n \n const parts = formattedValue.split(this.decimalSeparator);\n const integerPart = parts[0];\n let decimalPart = parts[1] || '';\n \n const formattedInteger = new Intl.NumberFormat(this.currentLocale).format(\n parseInt(integerPart, 10) || 0\n ).split(this.decimalSeparator)[0];\n \n const effectiveDecimalPlaces = decimalPart.replace(/0+$/, '').length;\n \n const decimalPlacesToShow = Math.max(\n this.minDecimalPlaces(),\n Math.min(effectiveDecimalPlaces, this.maxDecimalPlaces())\n );\n \n decimalPart = decimalPart.substring(0, decimalPlacesToShow).padEnd(decimalPlacesToShow, '0');\n \n return formattedInteger + this.decimalSeparator + decimalPart;\n }\n\n /**\n * Formats the value according to the locale\n * @private\n */\n private formatValue(value: string): string {\n if (!value || value.trim() === '') {\n return '';\n }\n const { numeric } = this.parseStringToValue(value);\n return this.formatNumeric(numeric);\n }\n\n /**\n * Converts the formatted value to the model format (international standard string)\n * Always returns decimal notation, never scientific notation\n * Stores the full precision value without truncation\n * @private\n */\n private toModelValue(formattedValue: string): string | null {\n if (!formattedValue || formattedValue.trim() === '') {\n return null;\n }\n const { bigNumber } = this.parseStringToValue(formattedValue);\n return bigNumber.toFixed();\n }\n\n /**\n * Converts the model value to display format\n * @private\n */\n private fromModelValue(modelValue: string | null): string {\n if (modelValue === null || modelValue === undefined || modelValue === '') {\n return '';\n }\n const bigNumber = new BigNumber(modelValue);\n if (bigNumber.isNaN()) {\n return '';\n }\n return this.formatNumeric(bigNumber);\n }\n\n /**\n * Processes pasted value from clipboard\n * Converts scientific notation to decimal using BigNumber\n * @private\n */\n private parseClipboardValue(text: string): string {\n if (this.allowScientificNotation() && /[eE]/.test(text)) {\n try {\n const bigNumeric = new BigNumber(text);\n if (!bigNumeric.isNaN()) {\n text = bigNumeric.toFixed();\n }\n } catch {\n void 0;\n }\n }\n return this.normalizeSeparators(text);\n }\n\n /**\n * Toggles the sign (- or +) of a value\n * @private\n */\n private toggleSign(value: string, makeNegative: boolean): void {\n const input = this.elementRef.nativeElement;\n let newValue = value;\n\n if (makeNegative && !newValue.startsWith('-')) {\n newValue = '-' + newValue;\n } else if (!makeNegative && newValue.startsWith('-')) {\n newValue = newValue.substring(1);\n } else {\n return;\n }\n\n this.renderer.setProperty(input, 'value', newValue);\n const modelValue = this.toModelValue(newValue);\n this.lastModelValue = null;\n this.onChange(modelValue);\n }\n\n public writeValue(value: string | null): void {\n if (!this.decimalSeparator || !this.thousandSeparator) {\n this.updateSeparators();\n }\n const hasFocus = document.activeElement === this.elementRef.nativeElement;\n if (hasFocus) {\n const formattedValue = this.fromModelValue(value);\n const rawValue = this.stripTrailingZeros(this.removeSeparators(formattedValue));\n this.renderer.setProperty(this.elementRef.nativeElement, 'value', rawValue);\n } else {\n const formattedValue = this.fromModelValue(value);\n this.renderer.setProperty(this.elementRef.nativeElement, 'value', formattedValue);\n }\n }\n\n public registerOnChange(fn: (value: string | null) => void): void {\n this.onChange = fn;\n }\n\n public registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n public setDisabledState(isDisabled: boolean): void {\n this.renderer.setProperty(this.elementRef.nativeElement, 'disabled', isDisabled);\n }\n\n public validate(control: AbstractControl): ValidationErrors | null {\n const value = control.value;\n\n if (!value) {\n return null;\n }\n\n const numericValue = parseFloat(value);\n\n if (isNaN(numericValue)) {\n return null;\n }\n\n if (!this.allowNegative() && numericValue < 0) {\n return { negativeNotAllowed: true };\n }\n\n const minValue = this.min();\n if (minValue !== undefined && numericValue < minValue) {\n return {\n min: {\n min: minValue,\n actual: numericValue,\n },\n };\n }\n\n const maxValue = this.max();\n if (maxValue !== undefined && numericValue > maxValue) {\n return {\n max: {\n max: maxValue,\n actual: numericValue,\n },\n };\n }\n\n const decimalPart = value.split('.')[1];\n\n if (decimalPart && decimalPart.length > this.maxDecimalPlaces()) {\n return {\n excessiveDecimalPlaces: {\n max: this.maxDecimalPlaces(),\n actual: decimalPart.length,\n },\n };\n }\n\n return null;\n }\n}\n\n","import { NgModule } from '@angular/core';\n\nimport { NumericMaskDirective } from './numeric-mask.directive';\n\n@NgModule({\n imports: [NumericMaskDirective],\n exports: [NumericMaskDirective],\n})\nexport class CurrencyMaskModule {}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAaA;;;;;;;;;;;;;;;;;;;AAmBG;MA0BU,oBAAoB,CAAA;AAC7B;;;AAGG;AACI,IAAA,MAAM,GAAG,KAAK,CAAqB,SAAS,CAAC,CAAC;AAErD;;;AAGG;AACI,IAAA,gBAAgB,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;AAEnC;;;AAGG;AACI,IAAA,gBAAgB,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC;AAEpC;;;AAGG;AACI,IAAA,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;AAEpC;;;AAGG;AACI,IAAA,uBAAuB,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;AAE7C;;AAEG;AACI,IAAA,GAAG,GAAG,KAAK,CAAqB,SAAS,CAAC,CAAC;AAElD;;AAEG;AACI,IAAA,GAAG,GAAG,KAAK,CAAqB,SAAS,CAAC,CAAC;AAEjC,IAAA,UAAU,GAAG,MAAM,EAAC,UAA4B,EAAC,CAAC;AAClD,IAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IAC7B,aAAa,GAAG,MAAM,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AAEnE,IAAA,QAAQ,GAAmC,MAAK,GAAG,CAAC;AACpD,IAAA,S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,KAAK,EAAE,IAAI;AACd,yBAAA;AACJ,qBAAA;AACJ,iBAAA,CAAA;;;MCjDY,kBAAkB,CAAA;wGAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;yGAAlB,kBAAkB,EAAA,OAAA,EAAA,CAHjB,oBAAoB,CAAA,EAAA,OAAA,EAAA,CACpB,oBAAoB,CAAA,EAAA,CAAA,CAAA;yGAErB,kBAAkB,EAAA,CAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAClC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"seniorsistemas-angular-components-numeric-mask.mjs","sources":["../../projects/angular-components/numeric-mask/src/lib/numeric-mask/numeric-mask.directive.ts","../../projects/angular-components/numeric-mask/src/lib/numeric-mask/numeric-mask.module.ts","../../projects/angular-components/numeric-mask/src/seniorsistemas-angular-components-numeric-mask.ts"],"sourcesContent":["import { Directive, effect, ElementRef, forwardRef, inject, input, OnInit, Renderer2 } from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n} from '@angular/forms';\n\nimport { LocaleService } from '@seniorsistemas/angular-components/locale';\nimport BigNumber from 'bignumber.js';\n\n/**\n * Numeric mask directive with internationalization support.\n *\n * Formats numeric values according to the specified locale, applying\n * appropriate thousand and decimal separators, with support for negative values,\n * min/max decimal places control, and scientific notation.\n *\n * @example\n * ```html\n * <input\n * type=\"text\"\n * sNumericMask\n * [locale]=\"'pt-BR'\"\n * [minDecimalPlaces]=\"2\"\n * [maxDecimalPlaces]=\"2\"\n * [allowNegative]=\"true\"\n * [(ngModel)]=\"value\"\n * />\n * ```\n */\n@Directive({\n selector: '[sNumericMask]',\n standalone: true,\n host: {\n '(input)': 'onInput($event)',\n '(focus)': 'onFocus()',\n '(blur)': 'onBlur()',\n '(paste)': 'onPaste($event)',\n '(keydown)': 'onKeyDown($event)',\n '(keypress)': 'onKeyPress($event)',\n '[style.text-align]': '\"right\"',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NumericMaskDirective),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => NumericMaskDirective),\n multi: true,\n },\n ],\n})\nexport class NumericMaskDirective implements OnInit, ControlValueAccessor, Validator {\n /**\n * Locale for formatting (e.g. 'pt-BR', 'en-US', 'de-DE')\n * If not provided, uses the locale from LocaleService\n */\n public locale = input<string | undefined>(undefined);\n\n /**\n * Minimum number of decimal places to display\n * @default 0\n */\n public minDecimalPlaces = input(0);\n\n /**\n * Maximum number of decimal places allowed\n * @default 10\n */\n public maxDecimalPlaces = input(10);\n\n /**\n * Allows negative values\n * @default false\n */\n public allowNegative = input(false);\n\n /**\n * Enables scientific notation support\n * @default true\n */\n public allowScientificNotation = input(true);\n\n /**\n * Minimum value allowed\n */\n public min = input<number | undefined>(undefined);\n\n /**\n * Maximum value allowed\n */\n public max = input<number | undefined>(undefined);\n\n private readonly elementRef = inject(ElementRef<HTMLInputElement>);\n private readonly renderer = inject(Renderer2);\n private readonly localeService = inject(LocaleService, { optional: true });\n\n private onChange: (value: string | null) => void = () => {};\n private onTouched: () => void = () => {};\n private decimalSeparator = ',';\n private thousandSeparator = '.';\n private currentLocale = 'pt-BR';\n private lastModelValue: string | null = null;\n\n constructor() {\n effect(() => {\n const inputLocale = this.locale();\n\n if (inputLocale) {\n this.currentLocale = inputLocale;\n this.updateSeparators();\n }\n });\n }\n\n public ngOnInit(): void {\n if (this.minDecimalPlaces() > this.maxDecimalPlaces()) {\n throw new Error(\n `NumericMaskDirective: minDecimalPlaces (${this.minDecimalPlaces()}) cannot be greater than maxDecimalPlaces (${this.maxDecimalPlaces()})`\n );\n }\n\n if (this.locale()) {\n this.currentLocale = this.locale()!;\n this.updateSeparators();\n this.setInputMode();\n } else if (this.localeService) {\n this.localeService.get().subscribe(() => {\n this.currentLocale = this.localeService!.getLocaleOptions()?.locale || 'pt-BR';\n this.updateSeparators();\n this.setInputMode();\n });\n } else {\n this.updateSeparators();\n this.setInputMode();\n }\n }\n\n /**\n * Listener for input events (typing)\n */\n public onInput(event: Event): void {\n const input = event.target as HTMLInputElement;\n let value = input.value;\n value = this.normalizeSeparators(value);\n this.processInputValue(value);\n }\n\n /**\n * Listener for focus events (gaining focus)\n */\n public onFocus(): void {\n const input = this.elementRef.nativeElement;\n const currentValue = input.value;\n\n if (!currentValue || currentValue.trim() === '') {\n return;\n }\n\n if (this.lastModelValue) {\n const displayValue = this.lastModelValue.replace('.', this.decimalSeparator);\n this.renderer.setProperty(input, 'value', displayValue);\n input.select();\n return;\n }\n\n const modelValue = this.toModelValue(currentValue);\n\n if (!modelValue) {\n return;\n }\n\n const displayValue = modelValue.replace('.', this.decimalSeparator);\n this.renderer.setProperty(input, 'value', displayValue);\n input.select();\n }\n\n /**\n * Listener for blur events (focus loss)\n */\n public onBlur(): void {\n this.onTouched();\n\n const currentValue = this.elementRef.nativeElement.value;\n\n if (!currentValue || currentValue.trim() === '') {\n this.onChange(null);\n this.lastModelValue = null;\n return;\n }\n\n const modelValue = this.toModelValue(currentValue);\n\n if (!modelValue) {\n this.onChange(null);\n this.lastModelValue = null;\n return;\n }\n\n this.lastModelValue = modelValue;\n const displayValue = this.fromModelValue(modelValue);\n this.renderer.setProperty(this.elementRef.nativeElement, 'value', displayValue);\n this.onChange(modelValue);\n }\n\n /**\n * Listener for paste events (clipboard)\n */\n public onPaste(event: ClipboardEvent): void {\n event.preventDefault();\n\n const pastedText = event.clipboardData?.getData('text') || '';\n let value = this.parseClipboardValue(pastedText);\n\n this.processInputValue(value);\n }\n\n /**\n * Listener for special keys (+ and -)\n */\n public onKeyDown(event: KeyboardEvent): void {\n const key = event.key;\n\n if (key === '-' || key === '+') {\n const input = this.elementRef.nativeElement;\n const value = input.value;\n const cursorPosition = input.selectionStart || 0;\n\n if (key === '-' && this.allowScientificNotation()) {\n const charBeforeCursor = value[cursorPosition - 1];\n if (charBeforeCursor === 'e' || charBeforeCursor === 'E') {\n return;\n }\n }\n\n event.preventDefault();\n if (!this.allowNegative()) {\n return;\n }\n\n this.toggleSign(value, key === '-');\n }\n }\n\n /**\n * Listener for keypress to block invalid characters\n */\n public onKeyPress(event: KeyboardEvent): void {\n const key = event.key;\n const input = this.elementRef.nativeElement;\n const cursorPosition = input.selectionStart || 0;\n const value = input.value;\n\n if ((key === '-' || key === '+') && this.allowScientificNotation()) {\n const charBeforeCursor = value[cursorPosition - 1];\n if (charBeforeCursor === 'e' || charBeforeCursor === 'E') {\n return;\n }\n }\n\n if (key === '+' || key === '-') {\n event.preventDefault();\n return;\n }\n\n const isDigit = /^[0-9]$/.test(key);\n const isLocaleDecimalSeparator = key === this.decimalSeparator;\n const isOtherSeparator = (key === ',' || key === '.') && key !== this.decimalSeparator;\n const isScientificNotation = (key === 'e' || key === 'E') && this.allowScientificNotation();\n const isControlKey = event.ctrlKey || event.metaKey || event.altKey;\n const isSpecialKey = [\n 'Backspace',\n 'Tab',\n 'Enter',\n 'Escape',\n 'ArrowLeft',\n 'ArrowRight',\n 'Delete',\n 'Home',\n 'End',\n ].includes(key);\n\n if (isOtherSeparator) {\n event.preventDefault();\n return;\n }\n\n if (isScientificNotation) {\n if (value.includes('e') || value.includes('E')) {\n event.preventDefault();\n return;\n }\n\n const charBeforeCursor = value[cursorPosition - 1];\n if (!charBeforeCursor || !/^[0-9]$/.test(charBeforeCursor)) {\n event.preventDefault();\n return;\n }\n }\n\n if (!isDigit && !isLocaleDecimalSeparator && !isScientificNotation && !isControlKey && !isSpecialKey) {\n event.preventDefault();\n }\n }\n\n /**\n * Updates separators according to the locale\n * @private\n */\n private updateSeparators(): void {\n const formatted = new Intl.NumberFormat(this.currentLocale).format(1234.5);\n\n this.thousandSeparator = formatted[1];\n this.decimalSeparator = formatted[5];\n }\n\n /**\n * Processes input value and updates the input and model\n * @private\n */\n private processInputValue(value: string): void {\n if (!this.decimalSeparator || !this.thousandSeparator) {\n this.updateSeparators();\n }\n\n this.renderer.setProperty(this.elementRef.nativeElement, 'value', value);\n\n const modelValue = this.toModelValue(value);\n\n // During typing, clear the stored model value so onFocus will recalculate\n this.lastModelValue = null;\n\n this.onChange(modelValue);\n }\n\n /**\n * Sets inputmode for numeric keyboard on mobile devices\n * @private\n */\n private setInputMode(): void {\n this.renderer.setAttribute(this.elementRef.nativeElement, 'inputmode', 'decimal');\n this.renderer.setAttribute(this.elementRef.nativeElement, 'autocomplete', 'off');\n }\n\n /**\n * Removes separators from a formatted value\n * @private\n */\n private removeSeparators(value: string): string {\n const thousandRegex = new RegExp(`\\\\${this.escapeRegex(this.thousandSeparator)}`, 'g');\n return value.replace(thousandRegex, '');\n }\n\n /**\n * Strips unnecessary trailing zeros from decimal part\n * @private\n */\n private stripTrailingZeros(value: string): string {\n const parts = value.split(this.decimalSeparator);\n if (parts.length === 2) {\n const decimalPart = parts[1].replace(/0+$/, '');\n return decimalPart.length > 0 ? parts[0] + this.decimalSeparator + decimalPart : parts[0];\n }\n return value;\n }\n\n /**\n * Normalizes separators during typing\n * @private\n */\n private normalizeSeparators(value: string): string {\n value = this.removeSeparators(value);\n\n if (this.decimalSeparator === ',') {\n value = value.replace(/\\./g, ',');\n } else if (this.decimalSeparator === '.') {\n value = value.replace(/,/g, '.');\n }\n\n const parts = value.split(this.decimalSeparator);\n if (parts.length > 2) {\n value = parts[0] + this.decimalSeparator + parts.slice(1).join('');\n }\n\n return value;\n }\n\n /**\n * Escapes special characters for use in regex\n * @private\n */\n private escapeRegex(str: string): string {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n }\n\n /**\n * Truncates a number to the specified decimal places (never rounds)\n * @private\n */\n private truncateToDecimalPlaces(bigNumber: BigNumber, decimalPlaces: number): BigNumber {\n if (decimalPlaces < 0) {\n return bigNumber;\n }\n const multiplier = new BigNumber(10).pow(decimalPlaces);\n return bigNumber.multipliedBy(multiplier).integerValue(BigNumber.ROUND_DOWN).dividedBy(multiplier);\n }\n\n /**\n * Parses a string value to its numeric representation, handling separators and sign\n * Returns BigNumber to preserve full precision and optional number conversion\n * @private\n */\n private parseStringToValue(value: string): { bigNumber: BigNumber; numeric: number; isNegative: boolean } {\n const isNegative = value.startsWith('-');\n let numericStr = value\n .replace(/^-/, '')\n .replace(new RegExp(`\\\\${this.thousandSeparator}`, 'g'), '')\n .replace(new RegExp(`\\\\${this.decimalSeparator}`, 'g'), '.');\n\n if (numericStr === '.' || numericStr === '') {\n numericStr = '0';\n } else if (numericStr.startsWith('.')) {\n numericStr = '0' + numericStr;\n }\n\n let bigNumber = new BigNumber(numericStr);\n if (bigNumber.isNaN()) {\n bigNumber = new BigNumber(0);\n }\n\n if (isNegative && this.allowNegative()) {\n bigNumber = bigNumber.negated();\n }\n\n return { bigNumber, numeric: bigNumber.toNumber(), isNegative };\n }\n\n /**\n * Formats a numeric value according to the locale\n * Truncates (never rounds) to maxDecimalPlaces and pads with zeros to minDecimalPlaces\n * @private\n */\n private formatNumeric(numeric: number | BigNumber): string {\n let bigNumeric = numeric instanceof BigNumber ? numeric : new BigNumber(numeric);\n \n const truncatedValue = this.truncateToDecimalPlaces(bigNumeric, this.maxDecimalPlaces());\n \n const valueStr = truncatedValue.toFixed(Math.max(this.minDecimalPlaces(), this.maxDecimalPlaces()));\n \n let formattedValue = valueStr.replace('.', this.decimalSeparator);\n \n const parts = formattedValue.split(this.decimalSeparator);\n const integerPart = parts[0];\n let decimalPart = parts[1] || '';\n \n const formattedInteger = new Intl.NumberFormat(this.currentLocale).format(\n parseInt(integerPart, 10) || 0\n ).split(this.decimalSeparator)[0];\n \n const effectiveDecimalPlaces = decimalPart.replace(/0+$/, '').length;\n \n const decimalPlacesToShow = Math.max(\n this.minDecimalPlaces(),\n Math.min(effectiveDecimalPlaces, this.maxDecimalPlaces())\n );\n \n decimalPart = decimalPart.substring(0, decimalPlacesToShow).padEnd(decimalPlacesToShow, '0');\n\n return decimalPart ? formattedInteger + this.decimalSeparator + decimalPart : formattedInteger;\n }\n\n /**\n * Converts the formatted value to the model format (international standard string)\n * Always returns decimal notation, never scientific notation\n * Stores the full precision value without truncation\n * @private\n */\n private toModelValue(formattedValue: string): string | null {\n if (!formattedValue || formattedValue.trim() === '') {\n return null;\n }\n const { bigNumber } = this.parseStringToValue(formattedValue);\n return bigNumber.toFixed();\n }\n\n /**\n * Converts the model value to display format\n * @private\n */\n private fromModelValue(modelValue: string | null): string {\n if (modelValue === null || modelValue === undefined || modelValue === '') {\n return '';\n }\n const bigNumber = new BigNumber(modelValue);\n if (bigNumber.isNaN()) {\n return '';\n }\n return this.formatNumeric(bigNumber);\n }\n\n /**\n * Processes pasted value from clipboard\n * Converts scientific notation to decimal using BigNumber\n * @private\n */\n private parseClipboardValue(text: string): string {\n if (this.allowScientificNotation() && /[eE]/.test(text)) {\n try {\n const bigNumeric = new BigNumber(text);\n if (!bigNumeric.isNaN()) {\n text = bigNumeric.toFixed();\n }\n } catch {\n void 0;\n }\n }\n return this.normalizeSeparators(text);\n }\n\n /**\n * Toggles the sign (- or +) of a value\n * @private\n */\n private toggleSign(value: string, makeNegative: boolean): void {\n const input = this.elementRef.nativeElement;\n let newValue = value;\n\n if (makeNegative && !newValue.startsWith('-')) {\n newValue = '-' + newValue;\n } else if (!makeNegative && newValue.startsWith('-')) {\n newValue = newValue.substring(1);\n } else {\n return;\n }\n\n this.renderer.setProperty(input, 'value', newValue);\n const modelValue = this.toModelValue(newValue);\n this.lastModelValue = null;\n this.onChange(modelValue);\n }\n\n public writeValue(value: string | null): void {\n if (!this.decimalSeparator || !this.thousandSeparator) {\n this.updateSeparators();\n }\n const hasFocus = document.activeElement === this.elementRef.nativeElement;\n if (hasFocus) {\n const formattedValue = this.fromModelValue(value);\n const rawValue = this.stripTrailingZeros(this.removeSeparators(formattedValue));\n this.renderer.setProperty(this.elementRef.nativeElement, 'value', rawValue);\n } else {\n const formattedValue = this.fromModelValue(value);\n this.renderer.setProperty(this.elementRef.nativeElement, 'value', formattedValue);\n }\n }\n\n public registerOnChange(fn: (value: string | null) => void): void {\n this.onChange = fn;\n }\n\n public registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n public setDisabledState(isDisabled: boolean): void {\n this.renderer.setProperty(this.elementRef.nativeElement, 'disabled', isDisabled);\n }\n\n public validate(control: AbstractControl): ValidationErrors | null {\n const value = control.value;\n\n if (!value) {\n return null;\n }\n\n const numericValue = parseFloat(value);\n\n if (isNaN(numericValue)) {\n return null;\n }\n\n if (!this.allowNegative() && numericValue < 0) {\n return { negativeNotAllowed: true };\n }\n\n const minValue = this.min();\n if (minValue !== undefined && numericValue < minValue) {\n return {\n min: {\n min: minValue,\n actual: numericValue,\n },\n };\n }\n\n const maxValue = this.max();\n if (maxValue !== undefined && numericValue > maxValue) {\n return {\n max: {\n max: maxValue,\n actual: numericValue,\n },\n };\n }\n\n const decimalPart = value.split('.')[1];\n\n if (decimalPart && decimalPart.length > this.maxDecimalPlaces()) {\n return {\n excessiveDecimalPlaces: {\n max: this.maxDecimalPlaces(),\n actual: decimalPart.length,\n },\n };\n }\n\n return null;\n }\n}\n\n","import { NgModule } from '@angular/core';\n\nimport { NumericMaskDirective } from './numeric-mask.directive';\n\n@NgModule({\n imports: [NumericMaskDirective],\n exports: [NumericMaskDirective],\n})\nexport class CurrencyMaskModule {}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAaA;;;;;;;;;;;;;;;;;;;AAmBG;MA0BU,oBAAoB,CAAA;AAC7B;;;AAGG;AACI,IAAA,MAAM,GAAG,KAAK,CAAqB,SAAS,CAAC,CAAC;AAErD;;;AAGG;A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,oBAAoB,CAAA,EAAA,CAAA,CAAA;yGAErB,kBAAkB,EAAA,CAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAClC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -130,16 +130,6 @@ export declare class NumericMaskDirective implements OnInit, ControlValueAccesso
|
|
|
130
130
|
* @private
|
|
131
131
|
*/
|
|
132
132
|
private truncateToDecimalPlaces;
|
|
133
|
-
/**
|
|
134
|
-
* Checks if the value has excessive decimal places
|
|
135
|
-
* @private
|
|
136
|
-
*/
|
|
137
|
-
private hasExcessiveDecimalPlaces;
|
|
138
|
-
/**
|
|
139
|
-
* Clears the input and notifies the model
|
|
140
|
-
* @private
|
|
141
|
-
*/
|
|
142
|
-
private clearInput;
|
|
143
133
|
/**
|
|
144
134
|
* Parses a string value to its numeric representation, handling separators and sign
|
|
145
135
|
* Returns BigNumber to preserve full precision and optional number conversion
|
|
@@ -152,11 +142,6 @@ export declare class NumericMaskDirective implements OnInit, ControlValueAccesso
|
|
|
152
142
|
* @private
|
|
153
143
|
*/
|
|
154
144
|
private formatNumeric;
|
|
155
|
-
/**
|
|
156
|
-
* Formats the value according to the locale
|
|
157
|
-
* @private
|
|
158
|
-
*/
|
|
159
|
-
private formatValue;
|
|
160
145
|
/**
|
|
161
146
|
* Converts the formatted value to the model format (international standard string)
|
|
162
147
|
* Always returns decimal notation, never scientific notation
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seniorsistemas/angular-components",
|
|
3
|
-
"version": "18.1.
|
|
3
|
+
"version": "18.1.2",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/cdk": "^18.2.14",
|
|
6
6
|
"@angular/common": "^18.2.0",
|
|
@@ -46,6 +46,12 @@
|
|
|
46
46
|
"esm": "./esm2022/alert/seniorsistemas-angular-components-alert.mjs",
|
|
47
47
|
"default": "./fesm2022/seniorsistemas-angular-components-alert.mjs"
|
|
48
48
|
},
|
|
49
|
+
"./autocomplete": {
|
|
50
|
+
"types": "./autocomplete/index.d.ts",
|
|
51
|
+
"esm2022": "./esm2022/autocomplete/seniorsistemas-angular-components-autocomplete.mjs",
|
|
52
|
+
"esm": "./esm2022/autocomplete/seniorsistemas-angular-components-autocomplete.mjs",
|
|
53
|
+
"default": "./fesm2022/seniorsistemas-angular-components-autocomplete.mjs"
|
|
54
|
+
},
|
|
49
55
|
"./badge": {
|
|
50
56
|
"types": "./badge/index.d.ts",
|
|
51
57
|
"esm2022": "./esm2022/badge/seniorsistemas-angular-components-badge.mjs",
|
|
@@ -58,11 +64,11 @@
|
|
|
58
64
|
"esm": "./esm2022/bignumber-input/seniorsistemas-angular-components-bignumber-input.mjs",
|
|
59
65
|
"default": "./fesm2022/seniorsistemas-angular-components-bignumber-input.mjs"
|
|
60
66
|
},
|
|
61
|
-
"./
|
|
62
|
-
"types": "./
|
|
63
|
-
"esm2022": "./esm2022/
|
|
64
|
-
"esm": "./esm2022/
|
|
65
|
-
"default": "./fesm2022/seniorsistemas-angular-components-
|
|
67
|
+
"./button": {
|
|
68
|
+
"types": "./button/index.d.ts",
|
|
69
|
+
"esm2022": "./esm2022/button/seniorsistemas-angular-components-button.mjs",
|
|
70
|
+
"esm": "./esm2022/button/seniorsistemas-angular-components-button.mjs",
|
|
71
|
+
"default": "./fesm2022/seniorsistemas-angular-components-button.mjs"
|
|
66
72
|
},
|
|
67
73
|
"./breadcrumb": {
|
|
68
74
|
"types": "./breadcrumb/index.d.ts",
|
|
@@ -70,12 +76,6 @@
|
|
|
70
76
|
"esm": "./esm2022/breadcrumb/seniorsistemas-angular-components-breadcrumb.mjs",
|
|
71
77
|
"default": "./fesm2022/seniorsistemas-angular-components-breadcrumb.mjs"
|
|
72
78
|
},
|
|
73
|
-
"./button": {
|
|
74
|
-
"types": "./button/index.d.ts",
|
|
75
|
-
"esm2022": "./esm2022/button/seniorsistemas-angular-components-button.mjs",
|
|
76
|
-
"esm": "./esm2022/button/seniorsistemas-angular-components-button.mjs",
|
|
77
|
-
"default": "./fesm2022/seniorsistemas-angular-components-button.mjs"
|
|
78
|
-
},
|
|
79
79
|
"./calendar-mask": {
|
|
80
80
|
"types": "./calendar-mask/index.d.ts",
|
|
81
81
|
"esm2022": "./esm2022/calendar-mask/seniorsistemas-angular-components-calendar-mask.mjs",
|