@elliemae/ds-form 3.0.0-next.47 → 3.0.0-next.48

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.
@@ -239,13 +239,7 @@ const NumberInputMask = (_a) => {
239
239
  ]);
240
240
  const inputRef = (0, import_react.useRef)();
241
241
  const [maskedValue, setMaskedValue] = (0, import_react.useState)(value);
242
- const conform = (0, import_react.useCallback)(({
243
- rawValue,
244
- cursorPos,
245
- lastkeycode,
246
- shouldUpdateCursorPos = true,
247
- shouldCompleteDecimals = false
248
- }) => {
242
+ const conform = (0, import_react.useCallback)(({ rawValue, cursorPos, lastkeycode, shouldUpdateCursorPos = true, shouldCompleteDecimals = false }) => {
249
243
  const { nextMaskedValue, maskedPos } = conformValue(rawValue, cursorPos, lastkeycode, {
250
244
  prefix,
251
245
  suffix,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/InputMask/mask_types/NumberInputMask.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-params */\n/* eslint-disable max-statements */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\n\nimport React, { useCallback, useLayoutEffect, useRef, useState } from 'react';\nimport { PropTypes } from 'react-desc';\nimport { DSTextBox } from '../../TextBox';\nimport { setCaretPosition } from '../utils/setCaretPosition';\n\n// http://stackoverflow.com/a/10899795/604296\nconst addThousandsSeparator = (n, thousandsSeparatorSymbol) =>\n n.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparatorSymbol);\n\nconst conformValue = (\n prevRawValue,\n prevCursorPos,\n lastkeycode,\n {\n prefix,\n suffix,\n includeThousandsSeparator,\n thousandsSeparatorSymbol,\n allowDecimal,\n decimalSymbol,\n decimalLimit,\n requireDecimal,\n allowNegative,\n allowLeadingZeroes,\n integerLimit,\n shouldCompleteDecimals,\n },\n) => {\n const prefixIndex = prevRawValue.indexOf(prefix);\n const suffixIndex = prevRawValue.lastIndexOf(suffix);\n const negativeIndex = prevRawValue.indexOf('-');\n\n const cursorPos =\n prevCursorPos - (prefixIndex === -1 ? 0 : prefixIndex + prefix.length);\n\n const rawValue = prevRawValue.substring(\n prefixIndex === -1 ? 0 : prefixIndex + prefix.length,\n suffixIndex === -1 ? prevRawValue.length : suffixIndex,\n );\n\n const filteredRawValue = rawValue\n .split('')\n .filter(\n (char) =>\n (char >= '0' && char <= '9') || char === decimalSymbol || char === '-',\n );\n\n let isNegative =\n allowNegative &&\n negativeIndex !== -1 &&\n (prefixIndex === -1 || negativeIndex < prefixIndex);\n\n let integer = '';\n let decimal = '';\n let foundDecimalSymbol = false;\n\n const integerFits = () =>\n integerLimit === null || integer.length < integerLimit;\n const decimalFits = () =>\n decimalLimit === null || decimal.length < decimalLimit;\n\n filteredRawValue.forEach((char) => {\n if (allowDecimal && !foundDecimalSymbol && char === decimalSymbol) {\n foundDecimalSymbol = true;\n } else if (\n allowNegative &&\n !integer.length &&\n !foundDecimalSymbol &&\n char === '-'\n ) {\n isNegative = true;\n } else if (char >= '0' && char <= '9') {\n if (!foundDecimalSymbol && integerFits()) {\n integer += char;\n } else if (foundDecimalSymbol && decimalFits()) {\n decimal += char;\n }\n }\n });\n\n if (requireDecimal) foundDecimalSymbol = true;\n if (!requireDecimal && !decimal?.length && lastkeycode === 8) {\n foundDecimalSymbol = false;\n }\n if (!integer && !decimal) foundDecimalSymbol = false;\n\n if (foundDecimalSymbol && !integer && decimal) {\n integer = '0';\n }\n\n if (!allowLeadingZeroes) {\n while (integer.length > 1 && integer[0] === '0')\n integer = integer.substring(1);\n }\n\n let nextMaskedValue = includeThousandsSeparator\n ? addThousandsSeparator(integer, thousandsSeparatorSymbol)\n : integer;\n nextMaskedValue += foundDecimalSymbol ? decimalSymbol : '';\n\n if (shouldCompleteDecimals)\n while (decimal.length !== decimalLimit) decimal += '0';\n\n nextMaskedValue += decimal;\n\n let maskedPos = 0;\n for (let i = 0; i < cursorPos; i += 1) {\n if (nextMaskedValue[maskedPos] === thousandsSeparatorSymbol) maskedPos += 1;\n if (nextMaskedValue[maskedPos] === rawValue[i]) maskedPos += 1;\n }\n if (nextMaskedValue.length || isNegative) {\n nextMaskedValue = prefix + nextMaskedValue;\n maskedPos += prefix.length;\n\n if (isNegative) {\n if (lastkeycode !== 8 || nextMaskedValue !== prefix)\n nextMaskedValue = `-${nextMaskedValue}`;\n maskedPos += 1;\n }\n\n nextMaskedValue += suffix;\n }\n\n if (lastkeycode !== 8 && maskedPos < nextMaskedValue.length) {\n if (\n nextMaskedValue[maskedPos] === decimalSymbol &&\n integer.length === integerLimit\n ) {\n maskedPos += 1;\n } else if (nextMaskedValue[maskedPos] === thousandsSeparatorSymbol) {\n maskedPos += 1;\n }\n }\n\n return {\n nextMaskedValue,\n maskedPos: Math.min(maskedPos, nextMaskedValue.length - suffix.length),\n };\n};\n\nconst NumberInputMask = ({\n focus,\n setFocus,\n setRawMask,\n cursorPosition,\n setCursorPosition,\n lastkey,\n setLastkey,\n setRawValue,\n allowDecimal,\n allowLeadingZeroes,\n allowNegative,\n autoFocus,\n className,\n clearable = false,\n decimalLimit,\n decimalSymbol,\n disabled,\n fluidWidth,\n hasError,\n includeThousandsSeparator,\n innerRef,\n integerLimit,\n leftComponent,\n maxLength,\n minLength,\n name,\n onBlur,\n onChange,\n onClick,\n onFocus,\n onKeyDown,\n onKeyUp,\n onPaste,\n placeholder,\n prefix,\n readOnly,\n requireDecimal,\n rightComponent,\n style,\n suffix,\n thousandsSeparatorSymbol,\n type,\n value,\n ...rest\n}) => {\n const inputRef = useRef();\n const [maskedValue, setMaskedValue] = useState(value);\n\n const conform = useCallback(\n ({\n rawValue,\n cursorPos,\n lastkeycode,\n shouldUpdateCursorPos = true,\n shouldCompleteDecimals = false,\n }) => {\n const { nextMaskedValue, maskedPos } = conformValue(\n rawValue,\n cursorPos,\n lastkeycode,\n {\n prefix,\n suffix,\n includeThousandsSeparator,\n thousandsSeparatorSymbol,\n allowDecimal,\n decimalSymbol,\n decimalLimit,\n requireDecimal,\n allowNegative,\n allowLeadingZeroes,\n integerLimit,\n shouldCompleteDecimals,\n },\n );\n const event = {\n target: {\n value: nextMaskedValue,\n originalValue: rawValue,\n },\n };\n if (onChange && nextMaskedValue !== maskedValue) onChange(event);\n\n setMaskedValue(nextMaskedValue);\n setRawValue(nextMaskedValue);\n\n if (shouldUpdateCursorPos) setCursorPosition({ current: maskedPos });\n },\n [maskedValue, onChange],\n );\n\n const handleOnChange = useCallback(\n (e) => {\n const { value: rawValue, selectionEnd } = e.target;\n setRawMask(rawValue);\n setRawValue(rawValue);\n setCursorPosition({ current: selectionEnd });\n setFocus(true);\n },\n [setRawMask, setRawValue, setCursorPosition, setFocus, lastkey.code],\n );\n\n useLayoutEffect(() => {\n if (focus) setCaretPosition(inputRef.current, cursorPosition.current);\n }, [focus, cursorPosition]);\n\n useLayoutEffect(() => {\n // if the value changes, then re-conform the mask\n conform({\n rawValue: value,\n cursorPos: cursorPosition.current,\n lastkeycode: lastkey.code,\n shouldUpdateCursorPos: focus,\n });\n }, [focus, value, cursorPosition.current]);\n\n const handleKeyDown = useCallback(\n (e) => {\n e.stopPropagation();\n setLastkey({ key: e.key, code: e.keyCode });\n onKeyDown(e);\n },\n [onKeyDown],\n );\n\n const handleBlur = useCallback(\n (e) => {\n setFocus(false);\n onBlur(e);\n if (requireDecimal && maskedValue !== '') {\n conform({\n rawValue: maskedValue,\n cursorPos: 0,\n lastkey: 0,\n shouldUpdateCursorPos: 0,\n shouldCompleteDecimals: true,\n });\n }\n },\n [maskedValue, requireDecimal, suffix, decimalLimit, onBlur],\n );\n\n return (\n <DSTextBox\n {...rest}\n className={className}\n clearable={clearable}\n disabled={disabled}\n fluidWidth={fluidWidth}\n hasError={hasError}\n innerRef={(ref) => {\n inputRef.current = ref;\n if (innerRef) innerRef(ref);\n }}\n isActive={focus}\n leftComponent={leftComponent}\n maxLength={maxLength}\n minLength={minLength}\n name={name}\n onBlur={handleBlur}\n onChange={handleOnChange}\n onClick={onClick}\n onFocus={onFocus}\n onKeyDown={handleKeyDown}\n onKeyUp={onKeyUp}\n onPaste={onPaste}\n placeholder={placeholder}\n readOnly={readOnly}\n rightComponent={rightComponent}\n style={style}\n type={type}\n value={maskedValue}\n />\n );\n};\n\nNumberInputMask.propTypes = {\n focus: PropTypes.bool,\n setFocus: PropTypes.func,\n setRawMask: PropTypes.func,\n cursorPosition: PropTypes.shape({ current: PropTypes.number }),\n setCursorPosition: PropTypes.func,\n lastkey: PropTypes.shape({ code: PropTypes.number, key: PropTypes.string }),\n setLastkey: PropTypes.func,\n setRawValue: PropTypes.func,\n allowDecimal: PropTypes.bool,\n allowLeadingZeroes: PropTypes.bool,\n allowNegative: PropTypes.bool,\n autoFocus: PropTypes.bool,\n className: PropTypes.string,\n clearable: PropTypes.bool,\n decimalLimit: PropTypes.number,\n decimalSymbol: PropTypes.string,\n disabled: PropTypes.bool,\n fluidWidth: PropTypes.bool,\n hasError: PropTypes.bool,\n includeThousandsSeparator: PropTypes.bool,\n innerRef: PropTypes.any,\n integerLimit: PropTypes.number,\n leftComponent: PropTypes.element,\n mask: PropTypes.any,\n maxLength: PropTypes.number,\n minLength: PropTypes.number,\n name: PropTypes.string,\n onBlur: PropTypes.func,\n onChange: PropTypes.func,\n onClick: PropTypes.func,\n onFocus: PropTypes.func,\n onKeyDown: PropTypes.func,\n onKeyUp: PropTypes.func,\n onPaste: PropTypes.func,\n placeholder: PropTypes.string,\n placeholderChar: PropTypes.string,\n prefix: PropTypes.string,\n readOnly: PropTypes.bool,\n requireDecimal: PropTypes.bool,\n rightComponent: PropTypes.element,\n style: PropTypes.object,\n suffix: PropTypes.string,\n thousandsSeparatorSymbol: PropTypes.string,\n type: PropTypes.string,\n value: PropTypes.string,\n};\n\nexport { NumberInputMask };\nexport default NumberInputMask;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA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,EACzB,UAAU,4BAAU;AAAA,EACpB,YAAY,4BAAU;AAAA,EACtB,UAAU,4BAAU;AAAA,EACpB,2BAA2B,4BAAU;AAAA,EACrC,UAAU,4BAAU;AAAA,EACpB,cAAc,4BAAU;AAAA,EACxB,eAAe,4BAAU;AAAA,EACzB,MAAM,4BAAU;AAAA,EAChB,WAAW,4BAAU;AAAA,EACrB,WAAW,4BAAU;AAAA,EACrB,MAAM,4BAAU;AAAA,EAChB,QAAQ,4BAAU;AAAA,EAClB,UAAU,4BAAU;AAAA,EACpB,SAAS,4BAAU;AAAA,EACnB,SAAS,4BAAU;AAAA,EACnB,WAAW,4BAAU;AAAA,EACrB,SAAS,4BAAU;AAAA,EACnB,SAAS,4BAAU;AAAA,EACnB,aAAa,4BAAU;AAAA,EACvB,iBAAiB,4BAAU;AAAA,EAC3B,QAAQ,4BAAU;AAAA,EAClB,UAAU,4BAAU;AAAA,EACpB,gBAAgB,4BAAU;AAAA,EAC1B,gBAAgB,4BAAU;AAAA,EAC1B,OAAO,4BAAU;AAAA,EACjB,QAAQ,4BAAU;AAAA,EAClB,0BAA0B,4BAAU;AAAA,EACpC,MAAM,4BAAU;AAAA,EAChB,OAAO,4BAAU;AACnB;AAGA,IAAO,0BAAQ;",
4
+ "sourcesContent": ["/* eslint-disable max-params */\n/* eslint-disable max-statements */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\n\nimport React, { useCallback, useLayoutEffect, useRef, useState } from 'react';\nimport { PropTypes } from 'react-desc';\nimport { DSTextBox } from '../../TextBox';\nimport { setCaretPosition } from '../utils/setCaretPosition';\n\n// http://stackoverflow.com/a/10899795/604296\nconst addThousandsSeparator = (n, thousandsSeparatorSymbol) =>\n n.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparatorSymbol);\n\nconst conformValue = (\n prevRawValue,\n prevCursorPos,\n lastkeycode,\n {\n prefix,\n suffix,\n includeThousandsSeparator,\n thousandsSeparatorSymbol,\n allowDecimal,\n decimalSymbol,\n decimalLimit,\n requireDecimal,\n allowNegative,\n allowLeadingZeroes,\n integerLimit,\n shouldCompleteDecimals,\n },\n) => {\n const prefixIndex = prevRawValue.indexOf(prefix);\n const suffixIndex = prevRawValue.lastIndexOf(suffix);\n const negativeIndex = prevRawValue.indexOf('-');\n\n const cursorPos = prevCursorPos - (prefixIndex === -1 ? 0 : prefixIndex + prefix.length);\n\n const rawValue = prevRawValue.substring(\n prefixIndex === -1 ? 0 : prefixIndex + prefix.length,\n suffixIndex === -1 ? prevRawValue.length : suffixIndex,\n );\n\n const filteredRawValue = rawValue\n .split('')\n .filter((char) => (char >= '0' && char <= '9') || char === decimalSymbol || char === '-');\n\n let isNegative = allowNegative && negativeIndex !== -1 && (prefixIndex === -1 || negativeIndex < prefixIndex);\n\n let integer = '';\n let decimal = '';\n let foundDecimalSymbol = false;\n\n const integerFits = () => integerLimit === null || integer.length < integerLimit;\n const decimalFits = () => decimalLimit === null || decimal.length < decimalLimit;\n\n filteredRawValue.forEach((char) => {\n if (allowDecimal && !foundDecimalSymbol && char === decimalSymbol) {\n foundDecimalSymbol = true;\n } else if (allowNegative && !integer.length && !foundDecimalSymbol && char === '-') {\n isNegative = true;\n } else if (char >= '0' && char <= '9') {\n if (!foundDecimalSymbol && integerFits()) {\n integer += char;\n } else if (foundDecimalSymbol && decimalFits()) {\n decimal += char;\n }\n }\n });\n\n if (requireDecimal) foundDecimalSymbol = true;\n if (!requireDecimal && !decimal?.length && lastkeycode === 8) {\n foundDecimalSymbol = false;\n }\n if (!integer && !decimal) foundDecimalSymbol = false;\n\n if (foundDecimalSymbol && !integer && decimal) {\n integer = '0';\n }\n\n if (!allowLeadingZeroes) {\n while (integer.length > 1 && integer[0] === '0') integer = integer.substring(1);\n }\n\n let nextMaskedValue = includeThousandsSeparator ? addThousandsSeparator(integer, thousandsSeparatorSymbol) : integer;\n nextMaskedValue += foundDecimalSymbol ? decimalSymbol : '';\n\n if (shouldCompleteDecimals) while (decimal.length !== decimalLimit) decimal += '0';\n\n nextMaskedValue += decimal;\n\n let maskedPos = 0;\n for (let i = 0; i < cursorPos; i += 1) {\n if (nextMaskedValue[maskedPos] === thousandsSeparatorSymbol) maskedPos += 1;\n if (nextMaskedValue[maskedPos] === rawValue[i]) maskedPos += 1;\n }\n if (nextMaskedValue.length || isNegative) {\n nextMaskedValue = prefix + nextMaskedValue;\n maskedPos += prefix.length;\n\n if (isNegative) {\n if (lastkeycode !== 8 || nextMaskedValue !== prefix) nextMaskedValue = `-${nextMaskedValue}`;\n maskedPos += 1;\n }\n\n nextMaskedValue += suffix;\n }\n\n if (lastkeycode !== 8 && maskedPos < nextMaskedValue.length) {\n if (nextMaskedValue[maskedPos] === decimalSymbol && integer.length === integerLimit) {\n maskedPos += 1;\n } else if (nextMaskedValue[maskedPos] === thousandsSeparatorSymbol) {\n maskedPos += 1;\n }\n }\n\n return {\n nextMaskedValue,\n maskedPos: Math.min(maskedPos, nextMaskedValue.length - suffix.length),\n };\n};\n\nconst NumberInputMask = ({\n focus,\n setFocus,\n setRawMask,\n cursorPosition,\n setCursorPosition,\n lastkey,\n setLastkey,\n setRawValue,\n allowDecimal,\n allowLeadingZeroes,\n allowNegative,\n autoFocus,\n className,\n clearable = false,\n decimalLimit,\n decimalSymbol,\n disabled,\n fluidWidth,\n hasError,\n includeThousandsSeparator,\n innerRef,\n integerLimit,\n leftComponent,\n maxLength,\n minLength,\n name,\n onBlur,\n onChange,\n onClick,\n onFocus,\n onKeyDown,\n onKeyUp,\n onPaste,\n placeholder,\n prefix,\n readOnly,\n requireDecimal,\n rightComponent,\n style,\n suffix,\n thousandsSeparatorSymbol,\n type,\n value,\n ...rest\n}) => {\n const inputRef = useRef();\n const [maskedValue, setMaskedValue] = useState(value);\n\n const conform = useCallback(\n ({ rawValue, cursorPos, lastkeycode, shouldUpdateCursorPos = true, shouldCompleteDecimals = false }) => {\n const { nextMaskedValue, maskedPos } = conformValue(rawValue, cursorPos, lastkeycode, {\n prefix,\n suffix,\n includeThousandsSeparator,\n thousandsSeparatorSymbol,\n allowDecimal,\n decimalSymbol,\n decimalLimit,\n requireDecimal,\n allowNegative,\n allowLeadingZeroes,\n integerLimit,\n shouldCompleteDecimals,\n });\n const event = {\n target: {\n value: nextMaskedValue,\n originalValue: rawValue,\n },\n };\n if (onChange && nextMaskedValue !== maskedValue) onChange(event);\n\n setMaskedValue(nextMaskedValue);\n setRawValue(nextMaskedValue);\n\n if (shouldUpdateCursorPos) setCursorPosition({ current: maskedPos });\n },\n [maskedValue, onChange],\n );\n\n const handleOnChange = useCallback(\n (e) => {\n const { value: rawValue, selectionEnd } = e.target;\n setRawMask(rawValue);\n setRawValue(rawValue);\n setCursorPosition({ current: selectionEnd });\n setFocus(true);\n },\n [setRawMask, setRawValue, setCursorPosition, setFocus, lastkey.code],\n );\n\n useLayoutEffect(() => {\n if (focus) setCaretPosition(inputRef.current, cursorPosition.current);\n }, [focus, cursorPosition]);\n\n useLayoutEffect(() => {\n // if the value changes, then re-conform the mask\n conform({\n rawValue: value,\n cursorPos: cursorPosition.current,\n lastkeycode: lastkey.code,\n shouldUpdateCursorPos: focus,\n });\n }, [focus, value, cursorPosition.current]);\n\n const handleKeyDown = useCallback(\n (e) => {\n e.stopPropagation();\n setLastkey({ key: e.key, code: e.keyCode });\n onKeyDown(e);\n },\n [onKeyDown],\n );\n\n const handleBlur = useCallback(\n (e) => {\n setFocus(false);\n onBlur(e);\n if (requireDecimal && maskedValue !== '') {\n conform({\n rawValue: maskedValue,\n cursorPos: 0,\n lastkey: 0,\n shouldUpdateCursorPos: 0,\n shouldCompleteDecimals: true,\n });\n }\n },\n [maskedValue, requireDecimal, suffix, decimalLimit, onBlur],\n );\n\n return (\n <DSTextBox\n {...rest}\n className={className}\n clearable={clearable}\n disabled={disabled}\n fluidWidth={fluidWidth}\n hasError={hasError}\n innerRef={(ref) => {\n inputRef.current = ref;\n if (innerRef) innerRef(ref);\n }}\n isActive={focus}\n leftComponent={leftComponent}\n maxLength={maxLength}\n minLength={minLength}\n name={name}\n onBlur={handleBlur}\n onChange={handleOnChange}\n onClick={onClick}\n onFocus={onFocus}\n onKeyDown={handleKeyDown}\n onKeyUp={onKeyUp}\n onPaste={onPaste}\n placeholder={placeholder}\n readOnly={readOnly}\n rightComponent={rightComponent}\n style={style}\n type={type}\n value={maskedValue}\n />\n );\n};\n\nNumberInputMask.propTypes = {\n focus: PropTypes.bool,\n setFocus: PropTypes.func,\n setRawMask: PropTypes.func,\n cursorPosition: PropTypes.shape({ current: PropTypes.number }),\n setCursorPosition: PropTypes.func,\n lastkey: PropTypes.shape({ code: PropTypes.number, key: PropTypes.string }),\n setLastkey: PropTypes.func,\n setRawValue: PropTypes.func,\n allowDecimal: PropTypes.bool,\n allowLeadingZeroes: PropTypes.bool,\n allowNegative: PropTypes.bool,\n autoFocus: PropTypes.bool,\n className: PropTypes.string,\n clearable: PropTypes.bool,\n decimalLimit: PropTypes.number,\n decimalSymbol: PropTypes.string,\n disabled: PropTypes.bool,\n fluidWidth: PropTypes.bool,\n hasError: PropTypes.bool,\n includeThousandsSeparator: PropTypes.bool,\n innerRef: PropTypes.any,\n integerLimit: PropTypes.number,\n leftComponent: PropTypes.element,\n mask: PropTypes.any,\n maxLength: PropTypes.number,\n minLength: PropTypes.number,\n name: PropTypes.string,\n onBlur: PropTypes.func,\n onChange: PropTypes.func,\n onClick: PropTypes.func,\n onFocus: PropTypes.func,\n onKeyDown: PropTypes.func,\n onKeyUp: PropTypes.func,\n onPaste: PropTypes.func,\n placeholder: PropTypes.string,\n placeholderChar: PropTypes.string,\n prefix: PropTypes.string,\n readOnly: PropTypes.bool,\n requireDecimal: PropTypes.bool,\n rightComponent: PropTypes.element,\n style: PropTypes.object,\n suffix: PropTypes.string,\n thousandsSeparatorSymbol: PropTypes.string,\n type: PropTypes.string,\n value: PropTypes.string,\n};\n\nexport { NumberInputMask };\nexport default NumberInputMask;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;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AAA,EACxB,eAAe,4BAAU;AAAA,EACzB,UAAU,4BAAU;AAAA,EACpB,YAAY,4BAAU;AAAA,EACtB,UAAU,4BAAU;AAAA,EACpB,2BAA2B,4BAAU;AAAA,EACrC,UAAU,4BAAU;AAAA,EACpB,cAAc,4BAAU;AAAA,EACxB,eAAe,4BAAU;AAAA,EACzB,MAAM,4BAAU;AAAA,EAChB,WAAW,4BAAU;AAAA,EACrB,WAAW,4BAAU;AAAA,EACrB,MAAM,4BAAU;AAAA,EAChB,QAAQ,4BAAU;AAAA,EAClB,UAAU,4BAAU;AAAA,EACpB,SAAS,4BAAU;AAAA,EACnB,SAAS,4BAAU;AAAA,EACnB,WAAW,4BAAU;AAAA,EACrB,SAAS,4BAAU;AAAA,EACnB,SAAS,4BAAU;AAAA,EACnB,aAAa,4BAAU;AAAA,EACvB,iBAAiB,4BAAU;AAAA,EAC3B,QAAQ,4BAAU;AAAA,EAClB,UAAU,4BAAU;AAAA,EACpB,gBAAgB,4BAAU;AAAA,EAC1B,gBAAgB,4BAAU;AAAA,EAC1B,OAAO,4BAAU;AAAA,EACjB,QAAQ,4BAAU;AAAA,EAClB,0BAA0B,4BAAU;AAAA,EACpC,MAAM,4BAAU;AAAA,EAChB,OAAO,4BAAU;AACnB;AAGA,IAAO,0BAAQ;",
6
6
  "names": []
7
7
  }
@@ -215,13 +215,7 @@ const NumberInputMask = (_a) => {
215
215
  ]);
216
216
  const inputRef = useRef();
217
217
  const [maskedValue, setMaskedValue] = useState(value);
218
- const conform = useCallback(({
219
- rawValue,
220
- cursorPos,
221
- lastkeycode,
222
- shouldUpdateCursorPos = true,
223
- shouldCompleteDecimals = false
224
- }) => {
218
+ const conform = useCallback(({ rawValue, cursorPos, lastkeycode, shouldUpdateCursorPos = true, shouldCompleteDecimals = false }) => {
225
219
  const { nextMaskedValue, maskedPos } = conformValue(rawValue, cursorPos, lastkeycode, {
226
220
  prefix,
227
221
  suffix,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/InputMask/mask_types/NumberInputMask.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-params */\n/* eslint-disable max-statements */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\n\nimport React, { useCallback, useLayoutEffect, useRef, useState } from 'react';\nimport { PropTypes } from 'react-desc';\nimport { DSTextBox } from '../../TextBox';\nimport { setCaretPosition } from '../utils/setCaretPosition';\n\n// http://stackoverflow.com/a/10899795/604296\nconst addThousandsSeparator = (n, thousandsSeparatorSymbol) =>\n n.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparatorSymbol);\n\nconst conformValue = (\n prevRawValue,\n prevCursorPos,\n lastkeycode,\n {\n prefix,\n suffix,\n includeThousandsSeparator,\n thousandsSeparatorSymbol,\n allowDecimal,\n decimalSymbol,\n decimalLimit,\n requireDecimal,\n allowNegative,\n allowLeadingZeroes,\n integerLimit,\n shouldCompleteDecimals,\n },\n) => {\n const prefixIndex = prevRawValue.indexOf(prefix);\n const suffixIndex = prevRawValue.lastIndexOf(suffix);\n const negativeIndex = prevRawValue.indexOf('-');\n\n const cursorPos =\n prevCursorPos - (prefixIndex === -1 ? 0 : prefixIndex + prefix.length);\n\n const rawValue = prevRawValue.substring(\n prefixIndex === -1 ? 0 : prefixIndex + prefix.length,\n suffixIndex === -1 ? prevRawValue.length : suffixIndex,\n );\n\n const filteredRawValue = rawValue\n .split('')\n .filter(\n (char) =>\n (char >= '0' && char <= '9') || char === decimalSymbol || char === '-',\n );\n\n let isNegative =\n allowNegative &&\n negativeIndex !== -1 &&\n (prefixIndex === -1 || negativeIndex < prefixIndex);\n\n let integer = '';\n let decimal = '';\n let foundDecimalSymbol = false;\n\n const integerFits = () =>\n integerLimit === null || integer.length < integerLimit;\n const decimalFits = () =>\n decimalLimit === null || decimal.length < decimalLimit;\n\n filteredRawValue.forEach((char) => {\n if (allowDecimal && !foundDecimalSymbol && char === decimalSymbol) {\n foundDecimalSymbol = true;\n } else if (\n allowNegative &&\n !integer.length &&\n !foundDecimalSymbol &&\n char === '-'\n ) {\n isNegative = true;\n } else if (char >= '0' && char <= '9') {\n if (!foundDecimalSymbol && integerFits()) {\n integer += char;\n } else if (foundDecimalSymbol && decimalFits()) {\n decimal += char;\n }\n }\n });\n\n if (requireDecimal) foundDecimalSymbol = true;\n if (!requireDecimal && !decimal?.length && lastkeycode === 8) {\n foundDecimalSymbol = false;\n }\n if (!integer && !decimal) foundDecimalSymbol = false;\n\n if (foundDecimalSymbol && !integer && decimal) {\n integer = '0';\n }\n\n if (!allowLeadingZeroes) {\n while (integer.length > 1 && integer[0] === '0')\n integer = integer.substring(1);\n }\n\n let nextMaskedValue = includeThousandsSeparator\n ? addThousandsSeparator(integer, thousandsSeparatorSymbol)\n : integer;\n nextMaskedValue += foundDecimalSymbol ? decimalSymbol : '';\n\n if (shouldCompleteDecimals)\n while (decimal.length !== decimalLimit) decimal += '0';\n\n nextMaskedValue += decimal;\n\n let maskedPos = 0;\n for (let i = 0; i < cursorPos; i += 1) {\n if (nextMaskedValue[maskedPos] === thousandsSeparatorSymbol) maskedPos += 1;\n if (nextMaskedValue[maskedPos] === rawValue[i]) maskedPos += 1;\n }\n if (nextMaskedValue.length || isNegative) {\n nextMaskedValue = prefix + nextMaskedValue;\n maskedPos += prefix.length;\n\n if (isNegative) {\n if (lastkeycode !== 8 || nextMaskedValue !== prefix)\n nextMaskedValue = `-${nextMaskedValue}`;\n maskedPos += 1;\n }\n\n nextMaskedValue += suffix;\n }\n\n if (lastkeycode !== 8 && maskedPos < nextMaskedValue.length) {\n if (\n nextMaskedValue[maskedPos] === decimalSymbol &&\n integer.length === integerLimit\n ) {\n maskedPos += 1;\n } else if (nextMaskedValue[maskedPos] === thousandsSeparatorSymbol) {\n maskedPos += 1;\n }\n }\n\n return {\n nextMaskedValue,\n maskedPos: Math.min(maskedPos, nextMaskedValue.length - suffix.length),\n };\n};\n\nconst NumberInputMask = ({\n focus,\n setFocus,\n setRawMask,\n cursorPosition,\n setCursorPosition,\n lastkey,\n setLastkey,\n setRawValue,\n allowDecimal,\n allowLeadingZeroes,\n allowNegative,\n autoFocus,\n className,\n clearable = false,\n decimalLimit,\n decimalSymbol,\n disabled,\n fluidWidth,\n hasError,\n includeThousandsSeparator,\n innerRef,\n integerLimit,\n leftComponent,\n maxLength,\n minLength,\n name,\n onBlur,\n onChange,\n onClick,\n onFocus,\n onKeyDown,\n onKeyUp,\n onPaste,\n placeholder,\n prefix,\n readOnly,\n requireDecimal,\n rightComponent,\n style,\n suffix,\n thousandsSeparatorSymbol,\n type,\n value,\n ...rest\n}) => {\n const inputRef = useRef();\n const [maskedValue, setMaskedValue] = useState(value);\n\n const conform = useCallback(\n ({\n rawValue,\n cursorPos,\n lastkeycode,\n shouldUpdateCursorPos = true,\n shouldCompleteDecimals = false,\n }) => {\n const { nextMaskedValue, maskedPos } = conformValue(\n rawValue,\n cursorPos,\n lastkeycode,\n {\n prefix,\n suffix,\n includeThousandsSeparator,\n thousandsSeparatorSymbol,\n allowDecimal,\n decimalSymbol,\n decimalLimit,\n requireDecimal,\n allowNegative,\n allowLeadingZeroes,\n integerLimit,\n shouldCompleteDecimals,\n },\n );\n const event = {\n target: {\n value: nextMaskedValue,\n originalValue: rawValue,\n },\n };\n if (onChange && nextMaskedValue !== maskedValue) onChange(event);\n\n setMaskedValue(nextMaskedValue);\n setRawValue(nextMaskedValue);\n\n if (shouldUpdateCursorPos) setCursorPosition({ current: maskedPos });\n },\n [maskedValue, onChange],\n );\n\n const handleOnChange = useCallback(\n (e) => {\n const { value: rawValue, selectionEnd } = e.target;\n setRawMask(rawValue);\n setRawValue(rawValue);\n setCursorPosition({ current: selectionEnd });\n setFocus(true);\n },\n [setRawMask, setRawValue, setCursorPosition, setFocus, lastkey.code],\n );\n\n useLayoutEffect(() => {\n if (focus) setCaretPosition(inputRef.current, cursorPosition.current);\n }, [focus, cursorPosition]);\n\n useLayoutEffect(() => {\n // if the value changes, then re-conform the mask\n conform({\n rawValue: value,\n cursorPos: cursorPosition.current,\n lastkeycode: lastkey.code,\n shouldUpdateCursorPos: focus,\n });\n }, [focus, value, cursorPosition.current]);\n\n const handleKeyDown = useCallback(\n (e) => {\n e.stopPropagation();\n setLastkey({ key: e.key, code: e.keyCode });\n onKeyDown(e);\n },\n [onKeyDown],\n );\n\n const handleBlur = useCallback(\n (e) => {\n setFocus(false);\n onBlur(e);\n if (requireDecimal && maskedValue !== '') {\n conform({\n rawValue: maskedValue,\n cursorPos: 0,\n lastkey: 0,\n shouldUpdateCursorPos: 0,\n shouldCompleteDecimals: true,\n });\n }\n },\n [maskedValue, requireDecimal, suffix, decimalLimit, onBlur],\n );\n\n return (\n <DSTextBox\n {...rest}\n className={className}\n clearable={clearable}\n disabled={disabled}\n fluidWidth={fluidWidth}\n hasError={hasError}\n innerRef={(ref) => {\n inputRef.current = ref;\n if (innerRef) innerRef(ref);\n }}\n isActive={focus}\n leftComponent={leftComponent}\n maxLength={maxLength}\n minLength={minLength}\n name={name}\n onBlur={handleBlur}\n onChange={handleOnChange}\n onClick={onClick}\n onFocus={onFocus}\n onKeyDown={handleKeyDown}\n onKeyUp={onKeyUp}\n onPaste={onPaste}\n placeholder={placeholder}\n readOnly={readOnly}\n rightComponent={rightComponent}\n style={style}\n type={type}\n value={maskedValue}\n />\n );\n};\n\nNumberInputMask.propTypes = {\n focus: PropTypes.bool,\n setFocus: PropTypes.func,\n setRawMask: PropTypes.func,\n cursorPosition: PropTypes.shape({ current: PropTypes.number }),\n setCursorPosition: PropTypes.func,\n lastkey: PropTypes.shape({ code: PropTypes.number, key: PropTypes.string }),\n setLastkey: PropTypes.func,\n setRawValue: PropTypes.func,\n allowDecimal: PropTypes.bool,\n allowLeadingZeroes: PropTypes.bool,\n allowNegative: PropTypes.bool,\n autoFocus: PropTypes.bool,\n className: PropTypes.string,\n clearable: PropTypes.bool,\n decimalLimit: PropTypes.number,\n decimalSymbol: PropTypes.string,\n disabled: PropTypes.bool,\n fluidWidth: PropTypes.bool,\n hasError: PropTypes.bool,\n includeThousandsSeparator: PropTypes.bool,\n innerRef: PropTypes.any,\n integerLimit: PropTypes.number,\n leftComponent: PropTypes.element,\n mask: PropTypes.any,\n maxLength: PropTypes.number,\n minLength: PropTypes.number,\n name: PropTypes.string,\n onBlur: PropTypes.func,\n onChange: PropTypes.func,\n onClick: PropTypes.func,\n onFocus: PropTypes.func,\n onKeyDown: PropTypes.func,\n onKeyUp: PropTypes.func,\n onPaste: PropTypes.func,\n placeholder: PropTypes.string,\n placeholderChar: PropTypes.string,\n prefix: PropTypes.string,\n readOnly: PropTypes.bool,\n requireDecimal: PropTypes.bool,\n rightComponent: PropTypes.element,\n style: PropTypes.object,\n suffix: PropTypes.string,\n thousandsSeparatorSymbol: PropTypes.string,\n type: PropTypes.string,\n value: PropTypes.string,\n};\n\nexport { NumberInputMask };\nexport default NumberInputMask;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACKA;AACA;AACA;AACA;AAGA,MAAM,wBAAwB,CAAC,GAAG,6BAChC,EAAE,QAAQ,yBAAyB,wBAAwB;AAE7D,MAAM,eAAe,CACnB,cACA,eACA,aACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MAEC;AACH,QAAM,cAAc,aAAa,QAAQ,MAAM;AAC/C,QAAM,cAAc,aAAa,YAAY,MAAM;AACnD,QAAM,gBAAgB,aAAa,QAAQ,GAAG;AAE9C,QAAM,YACJ,gBAAiB,iBAAgB,KAAK,IAAI,cAAc,OAAO;AAEjE,QAAM,WAAW,aAAa,UAC5B,gBAAgB,KAAK,IAAI,cAAc,OAAO,QAC9C,gBAAgB,KAAK,aAAa,SAAS,WAC7C;AAEA,QAAM,mBAAmB,SACtB,MAAM,EA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,UAAU;AACnB;AAGA,IAAO,0BAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-params */\n/* eslint-disable max-statements */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\n\nimport React, { useCallback, useLayoutEffect, useRef, useState } from 'react';\nimport { PropTypes } from 'react-desc';\nimport { DSTextBox } from '../../TextBox';\nimport { setCaretPosition } from '../utils/setCaretPosition';\n\n// http://stackoverflow.com/a/10899795/604296\nconst addThousandsSeparator = (n, thousandsSeparatorSymbol) =>\n n.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparatorSymbol);\n\nconst conformValue = (\n prevRawValue,\n prevCursorPos,\n lastkeycode,\n {\n prefix,\n suffix,\n includeThousandsSeparator,\n thousandsSeparatorSymbol,\n allowDecimal,\n decimalSymbol,\n decimalLimit,\n requireDecimal,\n allowNegative,\n allowLeadingZeroes,\n integerLimit,\n shouldCompleteDecimals,\n },\n) => {\n const prefixIndex = prevRawValue.indexOf(prefix);\n const suffixIndex = prevRawValue.lastIndexOf(suffix);\n const negativeIndex = prevRawValue.indexOf('-');\n\n const cursorPos = prevCursorPos - (prefixIndex === -1 ? 0 : prefixIndex + prefix.length);\n\n const rawValue = prevRawValue.substring(\n prefixIndex === -1 ? 0 : prefixIndex + prefix.length,\n suffixIndex === -1 ? prevRawValue.length : suffixIndex,\n );\n\n const filteredRawValue = rawValue\n .split('')\n .filter((char) => (char >= '0' && char <= '9') || char === decimalSymbol || char === '-');\n\n let isNegative = allowNegative && negativeIndex !== -1 && (prefixIndex === -1 || negativeIndex < prefixIndex);\n\n let integer = '';\n let decimal = '';\n let foundDecimalSymbol = false;\n\n const integerFits = () => integerLimit === null || integer.length < integerLimit;\n const decimalFits = () => decimalLimit === null || decimal.length < decimalLimit;\n\n filteredRawValue.forEach((char) => {\n if (allowDecimal && !foundDecimalSymbol && char === decimalSymbol) {\n foundDecimalSymbol = true;\n } else if (allowNegative && !integer.length && !foundDecimalSymbol && char === '-') {\n isNegative = true;\n } else if (char >= '0' && char <= '9') {\n if (!foundDecimalSymbol && integerFits()) {\n integer += char;\n } else if (foundDecimalSymbol && decimalFits()) {\n decimal += char;\n }\n }\n });\n\n if (requireDecimal) foundDecimalSymbol = true;\n if (!requireDecimal && !decimal?.length && lastkeycode === 8) {\n foundDecimalSymbol = false;\n }\n if (!integer && !decimal) foundDecimalSymbol = false;\n\n if (foundDecimalSymbol && !integer && decimal) {\n integer = '0';\n }\n\n if (!allowLeadingZeroes) {\n while (integer.length > 1 && integer[0] === '0') integer = integer.substring(1);\n }\n\n let nextMaskedValue = includeThousandsSeparator ? addThousandsSeparator(integer, thousandsSeparatorSymbol) : integer;\n nextMaskedValue += foundDecimalSymbol ? decimalSymbol : '';\n\n if (shouldCompleteDecimals) while (decimal.length !== decimalLimit) decimal += '0';\n\n nextMaskedValue += decimal;\n\n let maskedPos = 0;\n for (let i = 0; i < cursorPos; i += 1) {\n if (nextMaskedValue[maskedPos] === thousandsSeparatorSymbol) maskedPos += 1;\n if (nextMaskedValue[maskedPos] === rawValue[i]) maskedPos += 1;\n }\n if (nextMaskedValue.length || isNegative) {\n nextMaskedValue = prefix + nextMaskedValue;\n maskedPos += prefix.length;\n\n if (isNegative) {\n if (lastkeycode !== 8 || nextMaskedValue !== prefix) nextMaskedValue = `-${nextMaskedValue}`;\n maskedPos += 1;\n }\n\n nextMaskedValue += suffix;\n }\n\n if (lastkeycode !== 8 && maskedPos < nextMaskedValue.length) {\n if (nextMaskedValue[maskedPos] === decimalSymbol && integer.length === integerLimit) {\n maskedPos += 1;\n } else if (nextMaskedValue[maskedPos] === thousandsSeparatorSymbol) {\n maskedPos += 1;\n }\n }\n\n return {\n nextMaskedValue,\n maskedPos: Math.min(maskedPos, nextMaskedValue.length - suffix.length),\n };\n};\n\nconst NumberInputMask = ({\n focus,\n setFocus,\n setRawMask,\n cursorPosition,\n setCursorPosition,\n lastkey,\n setLastkey,\n setRawValue,\n allowDecimal,\n allowLeadingZeroes,\n allowNegative,\n autoFocus,\n className,\n clearable = false,\n decimalLimit,\n decimalSymbol,\n disabled,\n fluidWidth,\n hasError,\n includeThousandsSeparator,\n innerRef,\n integerLimit,\n leftComponent,\n maxLength,\n minLength,\n name,\n onBlur,\n onChange,\n onClick,\n onFocus,\n onKeyDown,\n onKeyUp,\n onPaste,\n placeholder,\n prefix,\n readOnly,\n requireDecimal,\n rightComponent,\n style,\n suffix,\n thousandsSeparatorSymbol,\n type,\n value,\n ...rest\n}) => {\n const inputRef = useRef();\n const [maskedValue, setMaskedValue] = useState(value);\n\n const conform = useCallback(\n ({ rawValue, cursorPos, lastkeycode, shouldUpdateCursorPos = true, shouldCompleteDecimals = false }) => {\n const { nextMaskedValue, maskedPos } = conformValue(rawValue, cursorPos, lastkeycode, {\n prefix,\n suffix,\n includeThousandsSeparator,\n thousandsSeparatorSymbol,\n allowDecimal,\n decimalSymbol,\n decimalLimit,\n requireDecimal,\n allowNegative,\n allowLeadingZeroes,\n integerLimit,\n shouldCompleteDecimals,\n });\n const event = {\n target: {\n value: nextMaskedValue,\n originalValue: rawValue,\n },\n };\n if (onChange && nextMaskedValue !== maskedValue) onChange(event);\n\n setMaskedValue(nextMaskedValue);\n setRawValue(nextMaskedValue);\n\n if (shouldUpdateCursorPos) setCursorPosition({ current: maskedPos });\n },\n [maskedValue, onChange],\n );\n\n const handleOnChange = useCallback(\n (e) => {\n const { value: rawValue, selectionEnd } = e.target;\n setRawMask(rawValue);\n setRawValue(rawValue);\n setCursorPosition({ current: selectionEnd });\n setFocus(true);\n },\n [setRawMask, setRawValue, setCursorPosition, setFocus, lastkey.code],\n );\n\n useLayoutEffect(() => {\n if (focus) setCaretPosition(inputRef.current, cursorPosition.current);\n }, [focus, cursorPosition]);\n\n useLayoutEffect(() => {\n // if the value changes, then re-conform the mask\n conform({\n rawValue: value,\n cursorPos: cursorPosition.current,\n lastkeycode: lastkey.code,\n shouldUpdateCursorPos: focus,\n });\n }, [focus, value, cursorPosition.current]);\n\n const handleKeyDown = useCallback(\n (e) => {\n e.stopPropagation();\n setLastkey({ key: e.key, code: e.keyCode });\n onKeyDown(e);\n },\n [onKeyDown],\n );\n\n const handleBlur = useCallback(\n (e) => {\n setFocus(false);\n onBlur(e);\n if (requireDecimal && maskedValue !== '') {\n conform({\n rawValue: maskedValue,\n cursorPos: 0,\n lastkey: 0,\n shouldUpdateCursorPos: 0,\n shouldCompleteDecimals: true,\n });\n }\n },\n [maskedValue, requireDecimal, suffix, decimalLimit, onBlur],\n );\n\n return (\n <DSTextBox\n {...rest}\n className={className}\n clearable={clearable}\n disabled={disabled}\n fluidWidth={fluidWidth}\n hasError={hasError}\n innerRef={(ref) => {\n inputRef.current = ref;\n if (innerRef) innerRef(ref);\n }}\n isActive={focus}\n leftComponent={leftComponent}\n maxLength={maxLength}\n minLength={minLength}\n name={name}\n onBlur={handleBlur}\n onChange={handleOnChange}\n onClick={onClick}\n onFocus={onFocus}\n onKeyDown={handleKeyDown}\n onKeyUp={onKeyUp}\n onPaste={onPaste}\n placeholder={placeholder}\n readOnly={readOnly}\n rightComponent={rightComponent}\n style={style}\n type={type}\n value={maskedValue}\n />\n );\n};\n\nNumberInputMask.propTypes = {\n focus: PropTypes.bool,\n setFocus: PropTypes.func,\n setRawMask: PropTypes.func,\n cursorPosition: PropTypes.shape({ current: PropTypes.number }),\n setCursorPosition: PropTypes.func,\n lastkey: PropTypes.shape({ code: PropTypes.number, key: PropTypes.string }),\n setLastkey: PropTypes.func,\n setRawValue: PropTypes.func,\n allowDecimal: PropTypes.bool,\n allowLeadingZeroes: PropTypes.bool,\n allowNegative: PropTypes.bool,\n autoFocus: PropTypes.bool,\n className: PropTypes.string,\n clearable: PropTypes.bool,\n decimalLimit: PropTypes.number,\n decimalSymbol: PropTypes.string,\n disabled: PropTypes.bool,\n fluidWidth: PropTypes.bool,\n hasError: PropTypes.bool,\n includeThousandsSeparator: PropTypes.bool,\n innerRef: PropTypes.any,\n integerLimit: PropTypes.number,\n leftComponent: PropTypes.element,\n mask: PropTypes.any,\n maxLength: PropTypes.number,\n minLength: PropTypes.number,\n name: PropTypes.string,\n onBlur: PropTypes.func,\n onChange: PropTypes.func,\n onClick: PropTypes.func,\n onFocus: PropTypes.func,\n onKeyDown: PropTypes.func,\n onKeyUp: PropTypes.func,\n onPaste: PropTypes.func,\n placeholder: PropTypes.string,\n placeholderChar: PropTypes.string,\n prefix: PropTypes.string,\n readOnly: PropTypes.bool,\n requireDecimal: PropTypes.bool,\n rightComponent: PropTypes.element,\n style: PropTypes.object,\n suffix: PropTypes.string,\n thousandsSeparatorSymbol: PropTypes.string,\n type: PropTypes.string,\n value: PropTypes.string,\n};\n\nexport { NumberInputMask };\nexport default NumberInputMask;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACKA;AACA;AACA;AACA;AAGA,MAAM,wBAAwB,CAAC,GAAG,6BAChC,EAAE,QAAQ,yBAAyB,wBAAwB;AAE7D,MAAM,eAAe,CACnB,cACA,eACA,aACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MAEC;AACH,QAAM,cAAc,aAAa,QAAQ,MAAM;AAC/C,QAAM,cAAc,aAAa,YAAY,MAAM;AACnD,QAAM,gBAAgB,aAAa,QAAQ,GAAG;AAE9C,QAAM,YAAY,gBAAiB,iBAAgB,KAAK,IAAI,cAAc,OAAO;AAEjF,QAAM,WAAW,aAAa,UAC5B,gBAAgB,KAAK,IAAI,cAAc,OAAO,QAC9C,gBAAgB,KAAK,aAAa,SAAS,WAC7C;AAEA,QAAM,mBAAmB,SACtB,MAAM,EAAE,EACR,OAAO,CAAC,SAAU,QAAQ,OAAO,QAAQ,OAAQ,SAAS,iBAAiB,SAAS,GAAG;AAE1F,MAAI,aAAa,iBAAiB,kBAAkB,MAAO,iBAAgB,MAAM,gBAA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
3
+ "version": "3.0.0-next.48",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Form",
6
6
  "files": [
@@ -475,17 +475,17 @@
475
475
  "indent": 4
476
476
  },
477
477
  "dependencies": {
478
- "@elliemae/ds-button": "3.0.0-next.47",
479
- "@elliemae/ds-classnames": "3.0.0-next.47",
480
- "@elliemae/ds-common": "3.0.0-next.47",
481
- "@elliemae/ds-grid": "3.0.0-next.47",
482
- "@elliemae/ds-icons": "3.0.0-next.47",
483
- "@elliemae/ds-shared": "3.0.0-next.47",
484
- "@elliemae/ds-system": "3.0.0-next.47",
485
- "@elliemae/ds-text-wrapper": "3.0.0-next.47",
486
- "@elliemae/ds-tooltip": "3.0.0-next.47",
487
- "@elliemae/ds-truncated-tooltip-text": "3.0.0-next.47",
488
- "@elliemae/ds-utilities": "3.0.0-next.47",
478
+ "@elliemae/ds-button": "3.0.0-next.48",
479
+ "@elliemae/ds-classnames": "3.0.0-next.48",
480
+ "@elliemae/ds-common": "3.0.0-next.48",
481
+ "@elliemae/ds-grid": "3.0.0-next.48",
482
+ "@elliemae/ds-icons": "3.0.0-next.48",
483
+ "@elliemae/ds-shared": "3.0.0-next.48",
484
+ "@elliemae/ds-system": "3.0.0-next.48",
485
+ "@elliemae/ds-text-wrapper": "3.0.0-next.48",
486
+ "@elliemae/ds-tooltip": "3.0.0-next.48",
487
+ "@elliemae/ds-truncated-tooltip-text": "3.0.0-next.48",
488
+ "@elliemae/ds-utilities": "3.0.0-next.48",
489
489
  "memoize-one": "~5.1.1",
490
490
  "moment": "~2.29.1",
491
491
  "prop-types": "~15.8.1",