@elliemae/ds-form 3.22.0-next.3 → 3.22.0-next.30
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/dist/cjs/Checkbox/index.js.map +1 -1
- package/dist/cjs/CheckboxGroup/DSCheckboxGroup.js.map +1 -1
- package/dist/cjs/CheckboxGroup/defaultProps.js.map +1 -1
- package/dist/cjs/CheckboxGroup/index.js.map +1 -1
- package/dist/cjs/CheckboxGroup/props.js.map +1 -1
- package/dist/cjs/ComboBox/index.js.map +1 -1
- package/dist/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js.map +1 -1
- package/dist/cjs/ComboBoxFreeSolo/components/MultiValueLabel.js.map +1 -1
- package/dist/cjs/ComboBoxFreeSolo/components/MultiValueRemove.js.map +1 -1
- package/dist/cjs/ComboBoxFreeSolo/components/SingleValue.js.map +1 -1
- package/dist/cjs/ComboBoxFreeSolo/components/SingleValueRemove.js.map +1 -1
- package/dist/cjs/ComboBoxFreeSolo/index.js.map +1 -1
- package/dist/cjs/DateInput/DSDateInput.js.map +1 -1
- package/dist/cjs/DateInput/components/DateInputImpl.js.map +1 -1
- package/dist/cjs/DateInput/components/DateInputs.js.map +1 -1
- package/dist/cjs/DateInput/components/utils.js.map +1 -1
- package/dist/cjs/DateInput/defaultProps.js.map +1 -1
- package/dist/cjs/DateInput/index.js.map +1 -1
- package/dist/cjs/DateInput/props.js.map +1 -1
- package/dist/cjs/DateInputV2/components/DSDateInput.js.map +1 -1
- package/dist/cjs/DateInputV2/components/DateInputs.js.map +1 -1
- package/dist/cjs/DateInputV2/components/helpers.js.map +1 -1
- package/dist/cjs/DateInputV2/components/props.js.map +1 -1
- package/dist/cjs/DateInputV2/components/propsTypes.js.map +1 -1
- package/dist/cjs/DateInputV2/components/styled.js.map +1 -1
- package/dist/cjs/DateInputV2/components/utils.js.map +1 -1
- package/dist/cjs/DateInputV2/index.js.map +1 -1
- package/dist/cjs/ExpandableInput/DSExpandableInput.js.map +1 -1
- package/dist/cjs/ExpandableInput/ExpandableInputImpl.js.map +1 -1
- package/dist/cjs/ExpandableInput/index.js.map +1 -1
- package/dist/cjs/FloatingLabelInput/DSFloatingLabelInput.js.map +1 -1
- package/dist/cjs/FloatingLabelInput/FloatingLabelInputImpl.js.map +1 -1
- package/dist/cjs/FloatingLabelInput/getSvgPath.js.map +1 -1
- package/dist/cjs/FloatingLabelInput/index.js.map +1 -1
- package/dist/cjs/FormItem/DSFormItemLayout.js.map +1 -1
- package/dist/cjs/FormItem/Error/DSError.js.map +1 -1
- package/dist/cjs/FormItem/Feedback.js.map +1 -1
- package/dist/cjs/FormItem/Label/DSLabel.js.map +1 -1
- package/dist/cjs/FormItem/Suffix/Suffix.js.map +1 -1
- package/dist/cjs/FormItem/ValidationFieldWrapper.js.map +1 -1
- package/dist/cjs/FormItem/defaultProps.js.map +1 -1
- package/dist/cjs/FormItem/index.js.map +1 -1
- package/dist/cjs/FormItem/props.js.map +1 -1
- package/dist/cjs/FormItem/variants.js.map +1 -1
- package/dist/cjs/Input/DSInput.js.map +1 -1
- package/dist/cjs/Input/InputAddonWrapper.js.map +1 -1
- package/dist/cjs/Input/InputImpl.js.map +1 -1
- package/dist/cjs/Input/index.js.map +1 -1
- package/dist/cjs/InputGroup/AddonWrapper.js.map +1 -1
- package/dist/cjs/InputGroup/DSInputGroup.js.map +1 -1
- package/dist/cjs/InputGroup/defaultProps.js.map +1 -1
- package/dist/cjs/InputGroup/index.js.map +1 -1
- package/dist/cjs/InputGroup/props.js.map +1 -1
- package/dist/cjs/InputMask/DSInputMask.js.map +1 -1
- package/dist/cjs/InputMask/DSInputMaskDeprecated.js.map +1 -1
- package/dist/cjs/InputMask/InputMaskContext.js.map +1 -1
- package/dist/cjs/InputMask/MaskPipes.js.map +1 -1
- package/dist/cjs/InputMask/MaskTypes.js.map +1 -1
- package/dist/cjs/InputMask/addons/AutoCorrectedDatePipe.js.map +1 -1
- package/dist/cjs/InputMask/defaultProps.js.map +1 -1
- package/dist/cjs/InputMask/index.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/DateInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/DateTimeInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/DictionaryInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/NumberInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/PhoneInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/PhoneInternationalInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/SsnInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/UsZipCodeInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/index.js.map +1 -1
- package/dist/cjs/InputMask/props.js.map +1 -1
- package/dist/cjs/InputMask/types/index.js.map +1 -1
- package/dist/cjs/InputMask/utils/setCaretPosition.js.map +1 -1
- package/dist/cjs/InputProtected/DSInputProtected.js.map +1 -1
- package/dist/cjs/InputProtected/defaultProps.js.map +1 -1
- package/dist/cjs/InputProtected/index.js.map +1 -1
- package/dist/cjs/InputProtected/options.js.map +1 -1
- package/dist/cjs/InputProtected/props.js.map +1 -1
- package/dist/cjs/LargeInputText/DSLargeInputText.js.map +1 -1
- package/dist/cjs/LargeInputText/defaultProps.js.map +1 -1
- package/dist/cjs/LargeInputText/index.js.map +1 -1
- package/dist/cjs/LargeInputText/props.js.map +1 -1
- package/dist/cjs/MenuItem/components/MenuItem/index.js.map +1 -1
- package/dist/cjs/MenuItem/components/MenuItem/styled.js.map +1 -1
- package/dist/cjs/MenuItem/components/MultiMenuItem/MultiMenuItem.js.map +1 -1
- package/dist/cjs/MenuItem/components/MultiMenuItem/styled.js.map +1 -1
- package/dist/cjs/MenuItem/components/Section/index.js.map +1 -1
- package/dist/cjs/MenuItem/components/Section/props.js.map +1 -1
- package/dist/cjs/MenuItem/components/Section/styled.js.map +1 -1
- package/dist/cjs/MenuItem/components/Separator/index.js.map +1 -1
- package/dist/cjs/MenuItem/components/Separator/styled.js.map +1 -1
- package/dist/cjs/MenuItem/components/SingleMenuItem/SingleMenuItem.js.map +1 -1
- package/dist/cjs/MenuItem/components/SubmenuItem/index.js.map +1 -1
- package/dist/cjs/MenuItem/components/SubmenuItem/styled.js.map +1 -1
- package/dist/cjs/MenuItem/components/index.js.map +1 -1
- package/dist/cjs/MenuItem/components/styled.js.map +1 -1
- package/dist/cjs/MenuItem/index.js.map +1 -1
- package/dist/cjs/MenuItem/props.js.map +1 -1
- package/dist/cjs/Radio/Circle.js.map +1 -1
- package/dist/cjs/Radio/DSRadio.js.map +1 -1
- package/dist/cjs/Radio/index.js.map +1 -1
- package/dist/cjs/RadioGroup/DSRadioGroup.js.map +1 -1
- package/dist/cjs/RadioGroup/defaultProps.js.map +1 -1
- package/dist/cjs/RadioGroup/index.js.map +1 -1
- package/dist/cjs/RadioGroup/props.js.map +1 -1
- package/dist/cjs/RequiredMark/RequiredMark.js.map +1 -1
- package/dist/cjs/RequiredMark/index.js.map +1 -1
- package/dist/cjs/SearchBox/index.js +1 -1
- package/dist/cjs/SearchBox/index.js.map +3 -3
- package/dist/cjs/TextBox/index.js.map +1 -1
- package/dist/cjs/TimeInput/DSTimeInput.js.map +1 -1
- package/dist/cjs/TimeInput/TimeInputImpl.js.map +1 -1
- package/dist/cjs/TimeInput/TimeInputs.js.map +1 -1
- package/dist/cjs/TimeInput/index.js.map +1 -1
- package/dist/cjs/TimeInput/utils.js.map +1 -1
- package/dist/cjs/Toggle/DSToggle.js.map +1 -1
- package/dist/cjs/Toggle/DSToggleImpl.js.map +1 -1
- package/dist/cjs/Toggle/DSToggleRender.js.map +1 -1
- package/dist/cjs/Toggle/index.js.map +1 -1
- package/dist/cjs/Toggle/props.js.map +1 -1
- package/dist/cjs/Toggle/toggleHelper.js.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/Checkbox/index.js.map +1 -1
- package/dist/esm/CheckboxGroup/DSCheckboxGroup.js.map +1 -1
- package/dist/esm/CheckboxGroup/defaultProps.js.map +1 -1
- package/dist/esm/CheckboxGroup/index.js.map +1 -1
- package/dist/esm/CheckboxGroup/props.js.map +1 -1
- package/dist/esm/ComboBox/index.js.map +1 -1
- package/dist/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js.map +1 -1
- package/dist/esm/ComboBoxFreeSolo/components/MultiValueLabel.js.map +1 -1
- package/dist/esm/ComboBoxFreeSolo/components/MultiValueRemove.js.map +1 -1
- package/dist/esm/ComboBoxFreeSolo/components/SingleValue.js.map +1 -1
- package/dist/esm/ComboBoxFreeSolo/components/SingleValueRemove.js.map +1 -1
- package/dist/esm/ComboBoxFreeSolo/index.js.map +1 -1
- package/dist/esm/DateInput/DSDateInput.js.map +1 -1
- package/dist/esm/DateInput/components/DateInputImpl.js.map +1 -1
- package/dist/esm/DateInput/components/DateInputs.js.map +1 -1
- package/dist/esm/DateInput/components/utils.js.map +1 -1
- package/dist/esm/DateInput/defaultProps.js.map +1 -1
- package/dist/esm/DateInput/index.js.map +1 -1
- package/dist/esm/DateInput/props.js.map +1 -1
- package/dist/esm/DateInputV2/components/DSDateInput.js.map +1 -1
- package/dist/esm/DateInputV2/components/DateInputs.js.map +1 -1
- package/dist/esm/DateInputV2/components/helpers.js.map +1 -1
- package/dist/esm/DateInputV2/components/props.js.map +1 -1
- package/dist/esm/DateInputV2/components/propsTypes.js.map +1 -1
- package/dist/esm/DateInputV2/components/styled.js.map +1 -1
- package/dist/esm/DateInputV2/components/utils.js.map +1 -1
- package/dist/esm/DateInputV2/index.js.map +1 -1
- package/dist/esm/ExpandableInput/DSExpandableInput.js.map +1 -1
- package/dist/esm/ExpandableInput/ExpandableInputImpl.js.map +1 -1
- package/dist/esm/ExpandableInput/index.js.map +1 -1
- package/dist/esm/FloatingLabelInput/DSFloatingLabelInput.js.map +1 -1
- package/dist/esm/FloatingLabelInput/FloatingLabelInputImpl.js.map +1 -1
- package/dist/esm/FloatingLabelInput/getSvgPath.js.map +1 -1
- package/dist/esm/FloatingLabelInput/index.js.map +1 -1
- package/dist/esm/FormItem/DSFormItemLayout.js.map +1 -1
- package/dist/esm/FormItem/Error/DSError.js.map +1 -1
- package/dist/esm/FormItem/Feedback.js.map +1 -1
- package/dist/esm/FormItem/Label/DSLabel.js.map +1 -1
- package/dist/esm/FormItem/Suffix/Suffix.js.map +1 -1
- package/dist/esm/FormItem/ValidationFieldWrapper.js.map +1 -1
- package/dist/esm/FormItem/defaultProps.js.map +1 -1
- package/dist/esm/FormItem/index.js.map +1 -1
- package/dist/esm/FormItem/props.js.map +1 -1
- package/dist/esm/FormItem/variants.js.map +1 -1
- package/dist/esm/Input/DSInput.js.map +1 -1
- package/dist/esm/Input/InputAddonWrapper.js.map +1 -1
- package/dist/esm/Input/InputImpl.js.map +1 -1
- package/dist/esm/Input/index.js.map +1 -1
- package/dist/esm/InputGroup/AddonWrapper.js.map +1 -1
- package/dist/esm/InputGroup/DSInputGroup.js.map +1 -1
- package/dist/esm/InputGroup/defaultProps.js.map +1 -1
- package/dist/esm/InputGroup/index.js.map +1 -1
- package/dist/esm/InputGroup/props.js.map +1 -1
- package/dist/esm/InputMask/DSInputMask.js.map +1 -1
- package/dist/esm/InputMask/DSInputMaskDeprecated.js.map +1 -1
- package/dist/esm/InputMask/InputMaskContext.js.map +1 -1
- package/dist/esm/InputMask/MaskPipes.js.map +1 -1
- package/dist/esm/InputMask/MaskTypes.js.map +1 -1
- package/dist/esm/InputMask/addons/AutoCorrectedDatePipe.js.map +1 -1
- package/dist/esm/InputMask/defaultProps.js.map +1 -1
- package/dist/esm/InputMask/index.js.map +1 -1
- package/dist/esm/InputMask/mask_types/DateInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/DateTimeInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/DictionaryInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/NumberInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/PhoneInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/PhoneInternationalInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/SsnInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/UsZipCodeInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/ZipCodeSearchInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/index.js.map +1 -1
- package/dist/esm/InputMask/props.js.map +1 -1
- package/dist/esm/InputMask/types/index.js.map +1 -1
- package/dist/esm/InputMask/utils/setCaretPosition.js.map +1 -1
- package/dist/esm/InputProtected/DSInputProtected.js.map +1 -1
- package/dist/esm/InputProtected/defaultProps.js.map +1 -1
- package/dist/esm/InputProtected/index.js.map +1 -1
- package/dist/esm/InputProtected/options.js.map +1 -1
- package/dist/esm/InputProtected/props.js.map +1 -1
- package/dist/esm/LargeInputText/DSLargeInputText.js.map +1 -1
- package/dist/esm/LargeInputText/defaultProps.js.map +1 -1
- package/dist/esm/LargeInputText/index.js.map +1 -1
- package/dist/esm/LargeInputText/props.js.map +1 -1
- package/dist/esm/MenuItem/components/MenuItem/index.js.map +1 -1
- package/dist/esm/MenuItem/components/MenuItem/styled.js.map +1 -1
- package/dist/esm/MenuItem/components/MultiMenuItem/MultiMenuItem.js.map +1 -1
- package/dist/esm/MenuItem/components/MultiMenuItem/styled.js.map +1 -1
- package/dist/esm/MenuItem/components/Section/index.js.map +1 -1
- package/dist/esm/MenuItem/components/Section/props.js.map +1 -1
- package/dist/esm/MenuItem/components/Section/styled.js.map +1 -1
- package/dist/esm/MenuItem/components/Separator/index.js.map +1 -1
- package/dist/esm/MenuItem/components/Separator/styled.js.map +1 -1
- package/dist/esm/MenuItem/components/SingleMenuItem/SingleMenuItem.js.map +1 -1
- package/dist/esm/MenuItem/components/SubmenuItem/index.js.map +1 -1
- package/dist/esm/MenuItem/components/SubmenuItem/styled.js.map +1 -1
- package/dist/esm/MenuItem/components/index.js.map +1 -1
- package/dist/esm/MenuItem/components/styled.js.map +1 -1
- package/dist/esm/MenuItem/index.js.map +1 -1
- package/dist/esm/MenuItem/props.js.map +1 -1
- package/dist/esm/Radio/Circle.js.map +1 -1
- package/dist/esm/Radio/DSRadio.js.map +1 -1
- package/dist/esm/Radio/index.js.map +1 -1
- package/dist/esm/RadioGroup/DSRadioGroup.js.map +1 -1
- package/dist/esm/RadioGroup/defaultProps.js.map +1 -1
- package/dist/esm/RadioGroup/index.js.map +1 -1
- package/dist/esm/RadioGroup/props.js.map +1 -1
- package/dist/esm/RequiredMark/RequiredMark.js.map +1 -1
- package/dist/esm/RequiredMark/index.js.map +1 -1
- package/dist/esm/SearchBox/index.js +1 -1
- package/dist/esm/SearchBox/index.js.map +2 -2
- package/dist/esm/TextBox/index.js.map +1 -1
- package/dist/esm/TimeInput/DSTimeInput.js.map +1 -1
- package/dist/esm/TimeInput/TimeInputImpl.js.map +1 -1
- package/dist/esm/TimeInput/TimeInputs.js.map +1 -1
- package/dist/esm/TimeInput/index.js.map +1 -1
- package/dist/esm/TimeInput/utils.js.map +1 -1
- package/dist/esm/Toggle/DSToggle.js.map +1 -1
- package/dist/esm/Toggle/DSToggleImpl.js.map +1 -1
- package/dist/esm/Toggle/DSToggleRender.js.map +1 -1
- package/dist/esm/Toggle/index.js.map +1 -1
- package/dist/esm/Toggle/props.js.map +1 -1
- package/dist/esm/Toggle/toggleHelper.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/types/Radio/Circle.d.ts +8 -0
- package/dist/types/SearchBox/index.d.ts +1 -1
- package/package.json +19 -19
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/InputMask/mask_types/PhoneInternationalInputMask.tsx", "
|
|
3
|
+
"sources": ["../../../../src/InputMask/mask_types/PhoneInternationalInputMask.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback, useLayoutEffect, useRef, useState } from 'react';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { DSTextBox } from '../../TextBox/index.js';\nimport type { TCharsToAdd } from '../types/index.js';\nimport { setCaretPosition } from '../utils/setCaretPosition.js';\n\nconst conformValue = (rawValue, cursorPos, lastkeycode) => {\n let nextMaskedValue = rawValue\n .split('+1')\n .slice(-1)[0]\n .split('')\n .filter((char) => char >= '0' && char <= '9');\n\n while (nextMaskedValue.length && nextMaskedValue[0] === '0') nextMaskedValue.splice(0, 1);\n\n nextMaskedValue = nextMaskedValue.slice(0, 10);\n\n let maskedPos = 0;\n for (let i = 0; i < cursorPos; i += 1) {\n if (nextMaskedValue[maskedPos] === rawValue[i]) maskedPos += 1;\n }\n\n // list of [string to add, position to add]\n const charactersToAdd: TCharsToAdd = [\n ['+1 (', 0],\n [') ', 7],\n ['-', 12],\n ];\n\n charactersToAdd.forEach(([chars, pos]) => {\n if (nextMaskedValue.length > pos) {\n nextMaskedValue.splice(pos, 0, ...chars);\n if (maskedPos >= pos) maskedPos += chars.length;\n }\n });\n\n if (lastkeycode !== 8 && maskedPos < nextMaskedValue.length) {\n charactersToAdd.forEach(([chars, pos]) => {\n if (maskedPos === pos) maskedPos += chars.length;\n });\n } else if (lastkeycode === 8 && maskedPos) {\n charactersToAdd.forEach(([chars, pos]) => {\n if (maskedPos === pos + 1) maskedPos -= chars.length;\n });\n }\n return { nextMaskedValue: nextMaskedValue.join(''), maskedPos };\n};\n\nconst PhoneInternationalInputMask = ({\n focus,\n setFocus,\n setRawMask,\n cursorPosition,\n setCursorPosition,\n lastkey,\n setLastkey,\n setRawValue,\n style,\n disabled,\n className,\n name,\n maxLength,\n minLength,\n fluidWidth,\n placeholder,\n onKeyDown,\n onClick,\n onChange,\n onFocus,\n onBlur,\n onPaste,\n onKeyUp,\n hasError,\n readOnly,\n type,\n innerRef,\n clearable = false,\n leftComponent,\n rightComponent,\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 }) => {\n const { nextMaskedValue, maskedPos } = conformValue(rawValue, cursorPos, lastkeycode);\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 },\n [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\nexport { PhoneInternationalInputMask };\nexport default PhoneInternationalInputMask;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqJnB;AAnJJ,mBAAsE;AAEtE,qBAA0B;AAE1B,8BAAiC;AAEjC,MAAM,eAAe,CAAC,UAAU,WAAW,gBAAgB;AACzD,MAAI,kBAAkB,SACnB,MAAM,IAAI,EACV,MAAM,EAAE,EAAE,CAAC,EACX,MAAM,EAAE,EACR,OAAO,CAAC,SAAS,QAAQ,OAAO,QAAQ,GAAG;AAE9C,SAAO,gBAAgB,UAAU,gBAAgB,CAAC,MAAM;AAAK,oBAAgB,OAAO,GAAG,CAAC;AAExF,oBAAkB,gBAAgB,MAAM,GAAG,EAAE;AAE7C,MAAI,YAAY;AAChB,WAAS,IAAI,GAAG,IAAI,WAAW,KAAK,GAAG;AACrC,QAAI,gBAAgB,SAAS,MAAM,SAAS,CAAC;AAAG,mBAAa;AAAA,EAC/D;AAGA,QAAM,kBAA+B;AAAA,IACnC,CAAC,QAAQ,CAAC;AAAA,IACV,CAAC,MAAM,CAAC;AAAA,IACR,CAAC,KAAK,EAAE;AAAA,EACV;AAEA,kBAAgB,QAAQ,CAAC,CAAC,OAAO,GAAG,MAAM;AACxC,QAAI,gBAAgB,SAAS,KAAK;AAChC,sBAAgB,OAAO,KAAK,GAAG,GAAG,KAAK;AACvC,UAAI,aAAa;AAAK,qBAAa,MAAM;AAAA,IAC3C;AAAA,EACF,CAAC;AAED,MAAI,gBAAgB,KAAK,YAAY,gBAAgB,QAAQ;AAC3D,oBAAgB,QAAQ,CAAC,CAAC,OAAO,GAAG,MAAM;AACxC,UAAI,cAAc;AAAK,qBAAa,MAAM;AAAA,IAC5C,CAAC;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;AAGA,IAAO,sCAAQ;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/InputMask/mask_types/SsnInputMask.tsx", "
|
|
3
|
+
"sources": ["../../../../src/InputMask/mask_types/SsnInputMask.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback, useLayoutEffect, useRef, useState } from 'react';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { DSTextBox } from '../../TextBox/index.js';\nimport type { TCharsToAdd } from '../types/index.js';\nimport { setCaretPosition } from '../utils/setCaretPosition.js';\n\nconst conformValue = (rawValue, cursorPos, lastkeycode) => {\n const nextMaskedValue = rawValue\n .split('')\n .filter((char) => char >= '0' && char <= '9')\n .slice(0, 9);\n\n let maskedPos = 0;\n for (let i = 0; i < cursorPos; i += 1) {\n if (nextMaskedValue[maskedPos] === rawValue[i]) maskedPos += 1;\n }\n\n // list of [string to add, position to add]\n const charactersToAdd: TCharsToAdd = [\n ['-', 3],\n ['-', 6],\n ];\n\n charactersToAdd.forEach(([chars, pos]) => {\n if (nextMaskedValue.length > pos) {\n nextMaskedValue.splice(pos, 0, ...chars);\n if (maskedPos >= pos) maskedPos += chars.length;\n }\n });\n\n if (lastkeycode !== 8 && maskedPos < nextMaskedValue.length) {\n charactersToAdd.forEach(([chars, pos]) => {\n if (maskedPos === pos) maskedPos += chars.length;\n });\n } else if (lastkeycode === 8 && maskedPos) {\n charactersToAdd.forEach(([chars, pos]) => {\n if (maskedPos === pos + 1) maskedPos -= chars.length;\n });\n }\n return { nextMaskedValue: nextMaskedValue.join(''), maskedPos };\n};\n\nconst SsnInputMask = ({\n focus,\n setFocus,\n setRawMask,\n cursorPosition,\n setCursorPosition,\n lastkey,\n setLastkey,\n setRawValue,\n style,\n disabled,\n className,\n name,\n maxLength,\n minLength,\n fluidWidth,\n placeholder,\n onKeyDown,\n onClick,\n onChange,\n onFocus,\n onBlur,\n onPaste,\n onKeyUp,\n hasError,\n readOnly,\n type,\n innerRef,\n clearable = false,\n leftComponent,\n rightComponent,\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 }) => {\n const { nextMaskedValue, maskedPos } = conformValue(rawValue, cursorPos, lastkeycode);\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 },\n [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\nexport { SsnInputMask };\nexport default SsnInputMask;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+InB;AA7IJ,mBAAsE;AAEtE,qBAA0B;AAE1B,8BAAiC;AAEjC,MAAM,eAAe,CAAC,UAAU,WAAW,gBAAgB;AACzD,QAAM,kBAAkB,SACrB,MAAM,EAAE,EACR,OAAO,CAAC,SAAS,QAAQ,OAAO,QAAQ,GAAG,EAC3C,MAAM,GAAG,CAAC;AAEb,MAAI,YAAY;AAChB,WAAS,IAAI,GAAG,IAAI,WAAW,KAAK,GAAG;AACrC,QAAI,gBAAgB,SAAS,MAAM,SAAS,CAAC;AAAG,mBAAa;AAAA,EAC/D;AAGA,QAAM,kBAA+B;AAAA,IACnC,CAAC,KAAK,CAAC;AAAA,IACP,CAAC,KAAK,CAAC;AAAA,EACT;AAEA,kBAAgB,QAAQ,CAAC,CAAC,OAAO,GAAG,MAAM;AACxC,QAAI,gBAAgB,SAAS,KAAK;AAChC,sBAAgB,OAAO,KAAK,GAAG,GAAG,KAAK;AACvC,UAAI,aAAa;AAAK,qBAAa,MAAM;AAAA,IAC3C;AAAA,EACF,CAAC;AAED,MAAI,gBAAgB,KAAK,YAAY,gBAAgB,QAAQ;AAC3D,oBAAgB,QAAQ,CAAC,CAAC,OAAO,GAAG,MAAM;AACxC,UAAI,cAAc;AAAK,qBAAa,MAAM;AAAA,IAC5C,CAAC;AAAA,EACH,WAAW,g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;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/InputMask/mask_types/UsZipCodeInputMask.tsx", "
|
|
3
|
+
"sources": ["../../../../src/InputMask/mask_types/UsZipCodeInputMask.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback, useLayoutEffect, useRef, useState } from 'react';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { DSTextBox } from '../../TextBox/index.js';\nimport { setCaretPosition } from '../utils/setCaretPosition.js';\n\nconst conformValue = (rawValue: string, cursorPos: number) => {\n const nextMaskedValue = rawValue\n .split('')\n .filter((char) => char >= '0' && char <= '9')\n .slice(0, 5);\n\n let maskedPos = 0;\n for (let i = 0; i < cursorPos; i += 1) {\n if (nextMaskedValue[maskedPos] === rawValue[i]) maskedPos += 1;\n }\n return { nextMaskedValue: nextMaskedValue.join(''), maskedPos };\n};\n\nconst UsZipCodeInputMask = ({\n focus,\n setFocus,\n setRawMask,\n cursorPosition,\n setCursorPosition,\n lastkey,\n setLastkey,\n setRawValue,\n style,\n disabled,\n className,\n name,\n maxLength,\n minLength,\n fluidWidth,\n placeholder,\n onKeyDown,\n onClick,\n onChange,\n onFocus,\n onBlur,\n onPaste,\n onKeyUp,\n hasError,\n readOnly,\n type,\n innerRef,\n clearable = false,\n leftComponent,\n rightComponent,\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 }) => {\n const { nextMaskedValue, maskedPos } = conformValue(rawValue, cursorPos);\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 },\n [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\nexport { UsZipCodeInputMask };\nexport default UsZipCodeInputMask;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuHnB;AArHJ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AA,MACR,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAO;AAAA;AAAA,EACT;AAEJ;AAGA,IAAO,6BAAQ;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/InputMask/mask_types/ZipCodeSearchInputMask.tsx", "
|
|
3
|
+
"sources": ["../../../../src/InputMask/mask_types/ZipCodeSearchInputMask.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback, useLayoutEffect, useRef, useState } from 'react';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { DSTextBox } from '../../TextBox/index.js';\nimport type { TCharsToAdd } from '../types/index.js';\nimport { setCaretPosition } from '../utils/setCaretPosition.js';\n\nconst conformValue = (rawValue, cursorPos, lastkeycode) => {\n const nextMaskedValue = rawValue\n .split('')\n .filter((char) => char >= '0' && char <= '9')\n .slice(0, 9);\n\n let maskedPos = 0;\n for (let i = 0; i < cursorPos; i += 1) {\n if (nextMaskedValue[maskedPos] === rawValue[i]) maskedPos += 1;\n }\n\n // list of [string to add, position to add]\n const charactersToAdd: TCharsToAdd = [['-', 5]];\n\n charactersToAdd.forEach(([chars, pos]) => {\n if (nextMaskedValue.length > pos) {\n nextMaskedValue.splice(pos, 0, chars);\n if (maskedPos >= pos) maskedPos += chars.length;\n }\n });\n\n if (lastkeycode !== 8 && maskedPos < nextMaskedValue.length) {\n charactersToAdd.forEach(([chars, pos]) => {\n if (maskedPos === pos) maskedPos += chars.length;\n });\n } else if (lastkeycode === 8 && maskedPos) {\n charactersToAdd.forEach(([chars, pos]) => {\n if (maskedPos === pos + 1) maskedPos -= chars.length;\n });\n }\n return { nextMaskedValue: nextMaskedValue.join(''), maskedPos };\n};\n\nconst ZipCodeSearchInputMask = ({\n focus,\n setFocus,\n setRawMask,\n cursorPosition,\n setCursorPosition,\n lastkey,\n setLastkey,\n setRawValue,\n style,\n disabled,\n className,\n name,\n maxLength,\n minLength,\n fluidWidth,\n placeholder,\n onKeyDown,\n onClick,\n onChange,\n onFocus,\n onBlur,\n onPaste,\n onKeyUp,\n hasError,\n readOnly,\n type,\n innerRef,\n clearable = false,\n leftComponent,\n rightComponent,\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 }) => {\n const { nextMaskedValue, maskedPos } = conformValue(rawValue, cursorPos, lastkeycode);\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 },\n [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 && typeof innerRef === 'function') 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\nexport { ZipCodeSearchInputMask };\nexport default ZipCodeSearchInputMask;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD4InB;AA1IJ,mBAAsE;AAEtE,qBAA0B;AAE1B,8BAAiC;AAEjC,MAAM,eAAe,CAAC,UAAU,WAAW,gBAAgB;AACzD,QAAM,kBAAkB,SACrB,MAAM,EAAE,EACR,OAAO,CAAC,SAAS,QAAQ,OAAO,QAAQ,GAAG,EAC3C,MAAM,GAAG,CAAC;AAEb,MAAI,YAAY;AAChB,WAAS,IAAI,GAAG,IAAI,WAAW,KAAK,GAAG;AACrC,QAAI,gBAAgB,SAAS,MAAM,SAAS,CAAC;AAAG,mBAAa;AAAA,EAC/D;AAGA,QAAM,kBAA+B,CAAC,CAAC,KAAK,CAAC,CAAC;AAE9C,kBAAgB,QAAQ,CAAC,CAAC,OAAO,GAAG,MAAM;AACxC,QAAI,gBAAgB,SAAS,KAAK;AAChC,sBAAgB,OAAO,KAAK,GAAG,KAAK;AACpC,UAAI,aAAa;AAAK,qBAAa,MAAM;AAAA,IAC3C;AAAA,EACF,CAAC;AAED,MAAI,gBAAgB,KA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;AAAA,MACV;AAAA,MACA;AAAA,MACA,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAO;AAAA;AAAA,EACT;AAEJ;AAGA,IAAO,iCAAQ;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/InputMask/mask_types/index.tsx", "
|
|
3
|
+
"sources": ["../../../../src/InputMask/mask_types/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { DateInputMask } from './DateInputMask.js';\nimport { DateTimeInputMask } from './DateTimeInputMask.js';\nimport { DictionaryInputMask } from './DictionaryInputMask.js';\nimport { NumberInputMask } from './NumberInputMask.js';\nimport { PhoneInputMask } from './PhoneInputMask.js';\nimport { PhoneInternationalInputMask } from './PhoneInternationalInputMask.js';\nimport { SsnInputMask } from './SsnInputMask.js';\nimport { UsZipCodeInputMask } from './UsZipCodeInputMask.js';\nimport { ZipCodeSearchInputMask } from './ZipCodeSearchInputMask.js';\n\nconst dollarSign = '$';\nconst percentSign = '%';\nconst emptyString = '';\nconst comma = ',';\nconst period = '.';\n\nexport const OutOfTheBoxMaskTypes = {\n 'ds-mask-date': (props) => <DateInputMask {...props} />,\n 'ds-mask-date-time': (props) => <DateTimeInputMask {...props} />,\n 'ds-mask-dictionary': ({ ignoreCase = true, ...rest }) => <DictionaryInputMask ignoreCase={ignoreCase} {...rest} />,\n 'ds-mask-number': ({\n prefix = dollarSign,\n suffix = emptyString,\n includeThousandsSeparator = true,\n thousandsSeparatorSymbol = comma,\n allowDecimal = false,\n decimalSymbol = period,\n decimalLimit = 2,\n requireDecimal = false,\n allowNegative = false,\n allowLeadingZeroes = false,\n integerLimit = null,\n ...rest\n }) => (\n <NumberInputMask\n prefix={prefix}\n suffix={suffix}\n includeThousandsSeparator={includeThousandsSeparator}\n thousandsSeparatorSymbol={thousandsSeparatorSymbol}\n allowDecimal={allowDecimal}\n decimalSymbol={decimalSymbol}\n decimalLimit={decimalLimit}\n requireDecimal={requireDecimal}\n allowNegative={allowNegative}\n allowLeadingZeroes={allowLeadingZeroes}\n integerLimit={integerLimit}\n {...rest}\n />\n ),\n 'ds-mask-percent': ({\n prefix = emptyString,\n suffix = percentSign,\n includeThousandsSeparator = true,\n thousandsSeparatorSymbol = comma,\n allowDecimal = false,\n decimalSymbol = period,\n decimalLimit = 2,\n requireDecimal = false,\n allowNegative = false,\n allowLeadingZeroes = false,\n integerLimit = null,\n ...rest\n }) => (\n <NumberInputMask\n prefix={prefix}\n suffix={suffix}\n includeThousandsSeparator={includeThousandsSeparator}\n thousandsSeparatorSymbol={thousandsSeparatorSymbol}\n allowDecimal={allowDecimal}\n decimalSymbol={decimalSymbol}\n decimalLimit={decimalLimit}\n requireDecimal={requireDecimal}\n allowNegative={allowNegative}\n allowLeadingZeroes={allowLeadingZeroes}\n integerLimit={integerLimit}\n {...rest}\n />\n ),\n 'ds-mask-phone': (props) => <PhoneInputMask {...props} />,\n 'ds-mask-phone-international': (props) => <PhoneInternationalInputMask {...props} />,\n 'ds-mask-ssn': (props) => <SsnInputMask {...props} />,\n 'ds-mask-us-zip-code': (props) => <UsZipCodeInputMask {...props} />,\n 'ds-mask-zip-code-search': (props) => <ZipCodeSearchInputMask {...props} />,\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBM;AAjB7B,2BAA8B;AAC9B,+BAAkC;AAClC,iCAAoC;AACpC,6BAAgC;AAChC,4BAA+B;AAC/B,yCAA4C;AAC5C,0BAA6B;AAC7B,gCAAmC;AACnC,oCAAuC;AAEvC,MAAM,aAAa;AACnB,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,MAAM,QAA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CAAC,kEAA6B,GAAG,OAAO;AAAA,EAClF,eAAe,CAAC,UAAU,4CAAC,oCAAc,GAAG,OAAO;AAAA,EACnD,uBAAuB,CAAC,UAAU,4CAAC,gDAAoB,GAAG,OAAO;AAAA,EACjE,2BAA2B,CAAC,UAAU,4CAAC,wDAAwB,GAAG,OAAO;AAC3E;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/InputMask/props.tsx", "
|
|
3
|
+
"sources": ["../../../src/InputMask/props.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-props-helpers';\n\nexport const inputProps = {\n /** Should component focus automatically */\n autoFocus: PropTypes.bool.description('Should component focus automatically'),\n /**\n * Set style for the input mask\n */\n style: PropTypes.object.description('Set style for the input mask'),\n /**\n * Whether the input mask is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the input mask is disabled or not'),\n /** disableTooltip */\n disableTooltip: PropTypes.bool\n .description('Whether to show a tooltip or not when text does not fit')\n .defaultValue(true),\n /** css class */\n className: PropTypes.string.description('css class'),\n /** html name prop for form */\n name: PropTypes.string.description('html name prop for form'),\n /**\n * Max length for the input mask\n */\n maxLength: PropTypes.number.description('Max length for the input mask'),\n /**\n * Min length for the input mask\n */\n minLength: PropTypes.number.description('Min length for the input mask'),\n /**\n * Whether to make the content of the input mask fit the container or not\n */\n fluidWidth: PropTypes.bool.description('Whether to make the content of the input mask fit the container or not'),\n /** isShowElipsisActive */\n isShowElipsisActive: PropTypes.bool\n .description('Wheter to enable the ellipsis and tooltip functionality or not')\n .defaultValue(true),\n /**\n * Component that works as placeholder\n */\n placeholder: PropTypes.node.description('Component that works as placeholder'),\n /**\n * Allows a function that is triggered once a key is being pressed\n */\n onKeyDown: PropTypes.func.description('Allows a function that is triggered once a key is being pressed'),\n /**\n * Allows a function that is triggered once the input mask is clicked\n */\n onClick: PropTypes.func.description('Allows a function that is triggered once the input mask is clicked'),\n /**\n * Allows a function that is triggered once the input mask changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the input mask changes'),\n /**\n * Allows a function that is triggered once the input mask is focused\n */\n onFocus: PropTypes.func.description('Allows a function that is triggered once the input mask is focused'),\n /**\n * Allows a function that is triggered once the input mask loses focus\n */\n onBlur: PropTypes.func.description('Allows a function that is triggered once the input mask loses focus'),\n /**\n * Allows a function that is triggered once the input mask is pasted\n */\n onPaste: PropTypes.func.description('Allows a function that is triggered once the input mask is pasted'),\n /**\n * Allows a function that is triggered once in the input mask a keyboard key is released\n */\n onKeyUp: PropTypes.func.description(\n 'Allows a function that is triggered once in the input mask a keyboard key is released',\n ),\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string.description('Default value once the component is initialized'),\n /**\n * Whether the input mask has error or not\n */\n hasError: PropTypes.bool.description('Whether the input mask has error or not'),\n /**\n * Whether the input mask is read only or not\n */\n readOnly: PropTypes.bool.description('Whether the input mask is read only or not'),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'Whether the input mask is read only or not',\n ),\n /**\n * Type of input. Ex: 'text'\n */\n type: PropTypes.string.description(\"Type of input. Ex: 'text'\"),\n /**\n * Whether the input mask is clearable or not\n */\n clearable: PropTypes.bool.description('Whether the input mask is clearable or not'),\n /**\n * Component to be added at the right side of the input\n */\n leftComponent: PropTypes.node.description('Component to be added at the right side of the input'),\n /**\n * Component to be added at the right side of the input\n */\n rightComponent: PropTypes.node.description('Component to be added at the right side of the input'),\n /**\n * Mask that has to match with the input information entered\n * ['DATE', 'PHONE', 'PHONE_INTENATIONAL', 'SSN', 'US_ZIP_CODE', 'NUMBER', 'PERCENT']\n */\n mask: PropTypes.oneOfType([PropTypes.array, PropTypes.string, PropTypes.func, PropTypes.object]).description(\n \"Mask that has to match with the input information entered. ['DATE', 'PHONE', 'PHONE_INTENATIONAL', 'SSN', 'US_ZIP_CODE', 'NUMBER', 'PERCENT', 'ZIP_CODE_SEARCH']\",\n ),\n /**\n Expects pipe functions. i.e. autoCorrectedDatePipe\n link a docu de text-mask\n */\n pipe: PropTypes.func.description('Expects pipe functions. i.e. autoCorrectedDatePipe'),\n /**\n * Put a sufix after the input mask\n */\n useSubfix: PropTypes.string.description('Put a sufix after the input mask'),\n /**\n * The placeholder character represents the fillable spot in the mask.\n * The default placeholder character is underscore, _\n */\n placeholderChar: PropTypes.string\n .description(\n `The placeholder character represents the fillable spot in the mask.\n The default placeholder character is underscore, _.`,\n )\n .defaultValue('_'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;AAEnB,MAAM,aAAa;AAAA;AAAA,EAExB,WAAW,kCAAU,KAAK,YAAY,sCAAsC;AAAA;AAAA;AAAA;AAAA,EAI5E,OAAO,kCAAU,OAAO,YAAY,8BAA8B;AAAA;AAAA;AAAA;AAAA,EAIlE,UAAU,kCAAU,KAAK,YAAY,2CAA2C;AAAA;AAAA,EAEhF,gBAAgB,kCAAU,KACvB,YAAY,yDAAyD,EACrE,aAAa,IAAI;AAAA;AAAA,EAEpB,WAAW,kCAAU,OAAO,YAAY,WAAW;AAAA;AAAA,EAEnD,MAAM,kCAAU,OAAO,YAAY,yBAAyB;AAAA;AAAA;AAAA;AAAA,EAI5D,WAAW,kCAAU,OAAO,YAAY,+BAA+B;AAAA;AAAA;AAAA;AAAA,EAIvE,WAAW,kCAAU,OAAO,YAAY,+BAA+B;AAAA;AAAA;AAAA;AAAA,EAIvE,YAAY,kCAAU,KAAK,YAAY,wEAAwE;AAAA;AAAA,EAE/G,qBAAqB,kCAAU,KAC5B,YAAY,gEAAgE,EAC5E,aAAa,IAAI;AAAA;AAAA;AAAA;AAAA,EAIpB,aAAa,kCAAU,KAAK,YAAY,qCAAq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A;AAAA,EAKA,MAAM,kCAAU,KAAK,YAAY,oDAAoD;AAAA;AAAA;AAAA;AAAA,EAIrF,WAAW,kCAAU,OAAO,YAAY,kCAAkC;AAAA;AAAA;AAAA;AAAA;AAAA,EAK1E,iBAAiB,kCAAU,OACxB;AAAA,IACC;AAAA;AAAA,EAEF,EACC,aAAa,GAAG;AACrB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/InputMask/types/index.ts", "
|
|
3
|
+
"sources": ["../../../../src/InputMask/types/index.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export type TCharsToAdd = [string, number][];\n\nexport type TLastkey = { code: number; key: string };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/InputMask/utils/setCaretPosition.tsx", "
|
|
3
|
+
"sources": ["../../../../src/InputMask/utils/setCaretPosition.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["const setCaretPosition = (ctrl, pos) => {\n // Modern browsers\n if (ctrl?.setSelectionRange) {\n ctrl?.focus();\n ctrl?.setSelectionRange(pos, pos);\n\n // IE8 and below\n } else if (ctrl?.createTextRange) {\n const range = ctrl?.createTextRange();\n range?.collapse(true);\n range?.moveEnd('character', pos);\n range?.moveStart('character', pos);\n range?.select();\n }\n};\n\nexport { setCaretPosition };\nexport default setCaretPosition;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,MAAM,mBAAmB,CAAC,MAAM,QAAQ;AAEtC,MAAI,MAAM,mBAAmB;AAC3B,UAAM,MAAM;AACZ,UAAM,kBAAkB,KAAK,GAAG;AAAA,EAGlC,WAAW,MAAM,iBAAiB;AAChC,UAAM,QAAQ,MAAM,gBAAgB;AACpC,WAAO,SAAS,IAAI;AACpB,WAAO,QAAQ,aAAa,GAAG;AAC/B,WAAO,UAAU,aAAa,GAAG;AACjC,WAAO,OAAO;AAAA,EAChB;AACF;AAGA,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/InputProtected/DSInputProtected.tsx", "
|
|
3
|
+
"sources": ["../../../src/InputProtected/DSInputProtected.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable import/no-unresolved */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useState, useCallback, useEffect } from 'react';\nimport { useDeprecateComponent } from '@elliemae/ds-utilities';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { LockUnlocked, LockLocked, VisibleView, InvisibleHide } from '@elliemae/ds-icons';\nimport { DSButton } from '@elliemae/ds-button';\nimport { DSInputGroup } from '../InputGroup/index.js';\nimport { DSInputMask } from '../InputMask/index.js';\nimport { inputProtectedProps } from './props.js';\nimport { defaultProps } from './defaultProps.js';\nimport { LEFT_ADDON_OPTIONS, RIGHT_ADDON_OPTIONS } from './options.js';\n\nconst ADDON_ICON_OPTIONS = {\n LockUnlocked: <LockUnlocked />,\n LockLocked: <LockLocked />,\n VisibleView: <VisibleView />,\n InvisibleHide: <InvisibleHide />,\n};\n\nconst DSInputProtected = ({\n leftAddon,\n rightAddon,\n onChange,\n value,\n readOnly,\n mask,\n type,\n placeholderChar = undefined,\n ...rest\n}) => {\n useDeprecateComponent({ componentName: 'ds-form/InputProtected', version: 'TBD Date: 2023 Q3' });\n\n const left = leftAddon && ADDON_ICON_OPTIONS[leftAddon];\n const right = rightAddon && ADDON_ICON_OPTIONS[rightAddon];\n const [inputLocked, setLocked] = useState(leftAddon === LEFT_ADDON_OPTIONS.LockLocked);\n const [inputHidden, setHidden] = useState(rightAddon === RIGHT_ADDON_OPTIONS.InvisibleHide);\n\n useEffect(() => {\n setLocked(leftAddon === LEFT_ADDON_OPTIONS.LockLocked);\n setHidden(rightAddon === RIGHT_ADDON_OPTIONS.InvisibleHide);\n }, [leftAddon, rightAddon]);\n\n const handleLeft = useCallback(() => {\n setLocked(!inputLocked);\n }, [inputLocked]);\n const handleRight = useCallback(() => {\n setHidden(!inputHidden);\n }, [inputHidden]);\n\n return (\n <div>\n <DSInputGroup\n leftAddon={\n left ? (\n <DSButton\n aria-label={`${inputLocked ? 'Allow' : 'Disallow'} Edition`}\n buttonType=\"secondary\"\n icon={ADDON_ICON_OPTIONS[inputLocked ? LEFT_ADDON_OPTIONS.LockLocked : LEFT_ADDON_OPTIONS.LockUnlocked]}\n onClick={handleLeft}\n />\n ) : undefined\n }\n rightAddon={\n right ? (\n <DSButton\n aria-label={`${inputHidden ? 'Show' : 'Hide'} Characters`}\n buttonType=\"secondary\"\n icon={\n ADDON_ICON_OPTIONS[inputHidden ? RIGHT_ADDON_OPTIONS.InvisibleHide : RIGHT_ADDON_OPTIONS.VisibleView]\n }\n onClick={handleRight}\n containerProps={{\n 'data-testid': 'inputprotected-show-hide-button',\n }}\n />\n ) : undefined\n }\n >\n <DSInputMask\n {...rest}\n mask={mask}\n placeholderChar={placeholderChar}\n onChange={onChange}\n disabled={left ? inputLocked : readOnly}\n type={right && inputHidden ? 'password' : type}\n value={value}\n />\n </DSInputGroup>\n </div>\n );\n};\n\nDSInputProtected.propTypes = inputProtectedProps;\nDSInputProtected.defaultProps = defaultProps;\nDSInputProtected.displayName = 'DSInputProtected';\nconst DSInputProtectedWithSchema = describe(DSInputProtected);\nDSInputProtectedWithSchema.propTypes = inputProtectedProps;\n\nexport { DSInputProtectedWithSchema, DSInputProtected };\nexport default DSInputProtected;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADeP;AAZhB,mBAAwD;AACxD,0BAAsC;AACtC,8BAAyB;AACzB,sBAAqE;AACrE,uBAAyB;AACzB,wBAA6B;AAC7B,uBAA4B;AAC5B,mBAAoC;AACpC,0BAA6B;AAC7B,qBAAwD;AAExD,MAAM,qBAAqB;AAAA,EACzB,cAAc,4CAAC,gCAAa;AAAA,EAC5B,YAAY,4CAAC,8BAAW;AAAA,EACxB,aAAa,4CAAC,+BAAY;AAAA,EAC1B,eAAe,4CAAC,iCAAc;AAChC;AAEA,MAAM,mBAAmB,CAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,kBAAkB;AAAA,EAClB,GAAG;AACL,MAAM;AACJ,iDAAsB,EAAE,eAAe,0BAA0B,SAAS,oBAAoB,CAAC;AAE/F,QAAM,OAAO,aAAa,mBAAmB,SAAS;AACtD,QAAM,QAAQ,cAAc,mBAAmB,UAAU;AACzD,QAAM,CAAC,aAAa,SAAS,QAAI,uBAAS,cAAc,kCAAmB,UAAU;AACrF,QAAM,CAAC,aAAa,SAAS,QAAI,uBAAS,eAAe,mCAAoB,aAAa;AAE1F,8BAAU,MAAM;AACd,cAAU,cAAc,kCAAmB,UAAU;AACrD,cAAU,eAAe,mCAAoB,aAAa;AAAA,EAC5D,GAAG,CAAC,WAAW,UAAU,CAAC;AAE1B,QAAM,iBAAa,0BAAY,MAAM;AACnC,cAAU,CAAC,WAAW;AAAA,EACxB,GAAG,CAAC,WAAW,CAAC;AAChB,QAAM,kBAAc,0BAAY,MAAM;AACpC,cAAU,CAAC,WAAW;AAAA,EACxB,GAAG,CAAC,WAAW,CAAC;AAEhB,SACE,4CAAC,SACC;AAAA,IAAC;AAAA;AAAA,MACC,WACE,OACE;AAAA,QAAC;AAAA;AAAA,UACC,cAAY,GAAG,cAAc,UAAU;AAAA,UACvC,YAAW;AAAA,UACX,MAAM,mBAAmB,cAAc,kCAAmB,aAAa,kCAAmB,YAAY;AAAA,UACtG,SAAS;AAAA;AAAA,MACX,IACE;AAAA,MAEN,YACE,QACE;AAAA,QAAC;AAAA;AAAA,UACC,cAAY,GAAG,cAAc,SAAS;AAAA,UACtC,YAAW;AAAA,UACX,MACE,mBAAmB,cAAc,mCAAoB,gBAAgB,mCAAoB,WAAW;AAAA,UAEtG,SAAS;AAAA,UACT,gBAAgB;AAAA,YACd,eAAe;AAAA,UACjB;AAAA;AAAA,MACF,IACE;AAAA,MAGN;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,UACJ;AAAA,UACA;AAAA,UACA;AAAA,UACA,UAAU,OAAO,cAAc;AAAA,UAC/B,MAAM,SAAS,cAAc,aAAa;AAAA,UAC1C;AAAA;AAAA,MACF;AAAA;AAAA,EACF,GACF;AAEJ;AAEA,iBAAiB,YAAY;AAC7B,iBAAiB,eAAe;AAChC,iBAAiB,cAAc;AAC/B,MAAM,iCAA6B,kCAAS,gBAAgB;AAC5D,2BAA2B,YAAY;AAGvC,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/InputProtected/defaultProps.tsx", "
|
|
3
|
+
"sources": ["../../../src/InputProtected/defaultProps.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { RIGHT_ADDON_OPTIONS } from './options.js';\n\nexport const defaultProps = {\n rightAddon: RIGHT_ADDON_OPTIONS.InvisibleHide,\n mask: (data) => new Array(data.length).fill(/./),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,qBAAoC;AAE7B,MAAM,eAAe;AAAA,EAC1B,YAAY,mCAAoB;AAAA,EAChC,MAAM,CAAC,SAAS,IAAI,MAAM,KAAK,MAAM,EAAE,KAAK,GAAG;AACjD;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/InputProtected/index.tsx", "
|
|
3
|
+
"sources": ["../../../src/InputProtected/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from './DSInputProtected.js';\nexport * from './options.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,mCAAc,kCAAd;AACA,mCAAc,yBADd;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/InputProtected/options.tsx", "
|
|
3
|
+
"sources": ["../../../src/InputProtected/options.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export const LEFT_ADDON_OPTIONS = {\n LockUnlocked: 'LockUnlocked',\n LockLocked: 'LockLocked',\n};\n\nexport const RIGHT_ADDON_OPTIONS = {\n VisibleView: 'VisibleView',\n InvisibleHide: 'InvisibleHide',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,qBAAqB;AAAA,EAChC,cAAc;AAAA,EACd,YAAY;AACd;AAEO,MAAM,sBAAsB;AAAA,EACjC,aAAa;AAAA,EACb,eAAe;AACjB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/InputProtected/props.tsx", "
|
|
3
|
+
"sources": ["../../../src/InputProtected/props.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-props-helpers';\nimport { LEFT_ADDON_OPTIONS, RIGHT_ADDON_OPTIONS } from './options.js';\n\nexport const inputProtectedProps = {\n leftAddon: PropTypes.oneOf([LEFT_ADDON_OPTIONS.LockLocked, LEFT_ADDON_OPTIONS.LockUnlocked]).description(\n 'left addon component to display',\n ),\n rightAddon: PropTypes.oneOf([RIGHT_ADDON_OPTIONS.VisibleView, RIGHT_ADDON_OPTIONS.InvisibleHide])\n .description('right addon component to display')\n .defaultValue(RIGHT_ADDON_OPTIONS.InvisibleHide),\n onChange: PropTypes.func.description('Function executed when input s value changes'),\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('input s value'),\n readOnly: PropTypes.bool.description('Whether the input is read-only or not').defaultValue(false),\n mask: PropTypes.oneOfType([PropTypes.array, PropTypes.func, PropTypes.object, PropTypes.string]).description(\n 'mask to apply',\n ),\n type: PropTypes.oneOf(['password', 'number', 'text']).description('type of input'),\n /**\n * PlaceholderChar: The placeholder character represents the fillable spot in the mask.\n * The default placeholder character is underscore, _.\n */\n placeholderChar: PropTypes.string.description(\n `The placeholder character represents the fillable spot in the mask.\n * The default placeholder character is underscore, _.`,\n ),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;AAC1B,qBAAwD;AAEjD,MAAM,sBAAsB;AAAA,EACjC,WAAW,kCAAU,MAAM,CAAC,kCAAmB,YAAY,kCAAmB,YAAY,CAAC,EAAE;AAAA,IAC3F;AAAA,EACF;AAAA,EACA,YAAY,kCAAU,MAAM,CAAC,mCAAoB,aAAa,mCAAoB,aAAa,CAAC,EAC7F,YAAY,kCAAkC,EAC9C,aAAa,mCAAoB,aAAa;AAAA,EACjD,UAAU,kCAAU,KAAK,YAAY,8CAA8C;AAAA,EACnF,OAAO,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EAAE,YAAY,eAAe;AAAA,EAC5F,UAAU,kCAAU,KAAK,YAAY,uCAAuC,EAAE,aAAa,KAAK;AAAA,EAChG,MAAM,kCAAU,UAAU,CAAC,kCAAU,OAAO,kCAAU,MAAM,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EAAE;AAAA,IAC/F;AAAA,EACF;AAAA,EACA,MAAM,kCAAU,MAAM,CAAC,YAAY,UAAU,MAAM,CAAC,EAAE,YAAY,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA,EAKjF,iBAAiB,kCAAU,OAAO;AAAA,IAChC;AAAA;AAAA,EAEF;AACF;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/LargeInputText/DSLargeInputText.tsx", "
|
|
3
|
+
"sources": ["../../../src/LargeInputText/DSLargeInputText.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable jsx-a11y/no-autofocus, react/prop-types */\nimport React, { useMemo } from 'react';\nimport { useDeprecateComponent } from '@elliemae/ds-utilities';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { convertPropToCssClassName, aggregatedClasses } from '@elliemae/ds-classnames';\nimport { props } from './props.js';\nimport { defaultProps } from './defaultProps.js';\n\nconst CounterArea = aggregatedClasses('div')('counter', 'textarea', ({ limitError }) => ({\n 'limit-error': limitError,\n}));\n\nconst DSLargeInputText = ({\n containerProps,\n autoFocus,\n className,\n disabled,\n name,\n id,\n maxLength,\n minLength,\n placeholder,\n onClick,\n onChange,\n onFocus,\n onBlur,\n onKeyUp,\n onKeyDown,\n onPaste,\n value,\n hasError,\n required,\n readOnly,\n resize,\n innerRef,\n ariaLabel,\n ariaAutocomplete,\n role,\n characterLimitCounter,\n rows,\n errorLimit,\n tabIndex,\n}) => {\n useDeprecateComponent({ componentName: 'ds-form/LargeInputText', version: 'TBD Date: 2023 Q3' });\n\n const limitError = useMemo(\n () => characterLimitCounter < String(value).length && characterLimitCounter > 0,\n [characterLimitCounter, value],\n );\n const { cssClassName, classNameElement, classNameBlock } = convertPropToCssClassName(\n 'form-element-textarea',\n 'text',\n {\n hasError: limitError || hasError,\n readOnly,\n disabled,\n },\n );\n // auto size when user types\n const handleKeyUp = (e) => {\n // const { target } = e\n onKeyUp(e);\n // if (e.key !== 'Enter') return\n // target.style.cssText = 'height:auto; padding:0'\n // target.style.cssText = `height: ${target.scrollHeight}px`\n };\n return (\n <>\n <div {...containerProps} className={`${cssClassName} ${className}`}>\n <div className={classNameBlock('wrapper')}>\n <textarea\n ref={innerRef}\n aria-autocomplete={ariaAutocomplete}\n aria-label={ariaLabel}\n aria-multiline\n aria-placeholder={placeholder}\n aria-required={required}\n autoFocus={autoFocus}\n className={classNameElement('textarea')}\n data-testid=\"ds-large-input_main-component\"\n disabled={disabled}\n id={id}\n maxLength={maxLength}\n minLength={minLength}\n name={name}\n onBlur={onBlur}\n onChange={onChange}\n onClick={onClick}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n onKeyUp={handleKeyUp}\n onPaste={onPaste}\n placeholder={placeholder}\n role={role}\n rows={String(rows)}\n style={{\n resize,\n }}\n value={value}\n tabIndex={tabIndex}\n />\n </div>\n </div>\n {characterLimitCounter > 0 && (\n <CounterArea classProps={{ limitError }} data-testid=\"counter-area\">\n {`${limitError ? `${errorLimit} ${characterLimitCounter} characters. ` : ''}${\n String(value).length\n } / ${characterLimitCounter}`}\n </CounterArea>\n )}\n </>\n );\n};\n\nDSLargeInputText.propTypes = props;\nDSLargeInputText.defaultProps = defaultProps;\nDSLargeInputText.displayName = 'DSLargeInputText';\nconst DSLargeInputTextWithSchema = describe(DSLargeInputText).description('A large input');\nDSLargeInputTextWithSchema.propTypes = props;\n\nexport { DSLargeInputTextWithSchema, DSLargeInputText };\n\nexport default DSLargeInputText;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoEnB;AAlEJ,mBAA+B;AAC/B,0BAAsC;AACtC,8BAAyB;AACzB,2BAA6D;AAC7D,mBAAsB;AACtB,0BAA6B;AAE7B,MAAM,kBAAc,wCAAkB,KAAK,EAAE,WAAW,YAAY,CAAC,EAAE,WAAW,OAAO;AAAA,EACvF,eAAe;AACjB,EAAE;AAEF,MAAM,mBAAmB,CAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,iDAAsB,EAAE,eAAe,0BAA0B,SAAS,oBAAoB,CAAC;AAE/F,QAAM,iBAAa;AAAA,IACjB,MAAM,wBAAwB,OAAO,KAAK,EAAE,UAAU,wBAAwB;AAAA,IAC9E,CAAC,uBAAuB,KAAK;AAAA,EAC/B;AACA,QAAM,EAAE,cAAc,kBAAkB,eAAe,QAAI;AAAA,IACzD;AAAA,IACA;AAAA,IACA;AAAA,MACE,UAAU,cAAc;AAAA,MACxB;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,QAAM,cAAc,CAAC,MAAM;AAEzB,YAAQ,CAAC;AAAA,EAIX;AACA,SACE,4EACE;AAAA,gDAAC,SAAK,GAAG,gBAAgB,WAAW,GAAG,gBAAgB,aACrD,sDAAC,SAAI,WAAW,eAAe,SAAS,GACtC;AAAA,MAAC;AAAA;AAAA,QACC,KAAK;AAAA,QACL,qBAAmB;AAAA,QACnB,cAAY;AAAA,QACZ,kBAAc;AAAA,QACd,oBAAkB;AAAA,QAClB,iBAAe;AAAA,QACf;AAAA,QACA,WAAW,iBAAiB,UAAU;AAAA,QACtC,eAAY;AAAA,QACZ;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,SAAS;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA,MAAM,OAAO,IAAI;AAAA,QACjB,OAAO;AAAA,UACL;AAAA,QACF;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF,GACF,GACF;AAAA,IACC,wBAAwB,KACvB,4CAAC,eAAY,YAAY,EAAE,WAAW,GAAG,eAAY,gBAClD,aAAG,aAAa,GAAG,cAAc,yCAAyC,KACzE,OAAO,KAAK,EAAE,YACV,yBACR;AAAA,KAEJ;AAEJ;AAEA,iBAAiB,YAAY;AAC7B,iBAAiB,eAAe;AAChC,iBAAiB,cAAc;AAC/B,MAAM,iCAA6B,kCAAS,gBAAgB,EAAE,YAAY,eAAe;AACzF,2BAA2B,YAAY;AAIvC,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/LargeInputText/defaultProps.tsx", "
|
|
3
|
+
"sources": ["../../../src/LargeInputText/defaultProps.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export const defaultProps = {\n containerProps: {},\n autoFocus: false,\n className: '',\n disabled: false,\n name: '',\n id: null,\n maxLength: null,\n minLength: 0,\n placeholder: '',\n onClick: () => null,\n onChange: () => null,\n onFocus: () => null,\n onBlur: () => null,\n onKeyUp: () => null,\n onKeyDown: () => null,\n onPaste: () => null,\n value: '',\n hasError: false,\n required: false,\n readOnly: false,\n resize: 'vertical',\n innerRef: null,\n ariaLabel: 'Enter text',\n ariaAutocomplete: 'none',\n role: 'textbox',\n characterLimitCounter: 0,\n rows: 3,\n errorLimit: 'Please limit your entry to',\n tabIndex: '',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,eAAe;AAAA,EAC1B,gBAAgB,CAAC;AAAA,EACjB,WAAW;AAAA,EACX,WAAW;AAAA,EACX,UAAU;AAAA,EACV,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,WAAW;AAAA,EACX,aAAa;AAAA,EACb,SAAS,MAAM;AAAA,EACf,UAAU,MAAM;AAAA,EAChB,SAAS,MAAM;AAAA,EACf,QAAQ,MAAM;AAAA,EACd,SAAS,MAAM;AAAA,EACf,WAAW,MAAM;AAAA,EACjB,SAAS,MAAM;AAAA,EACf,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,WAAW;AAAA,EACX,kBAAkB;AAAA,EAClB,MAAM;AAAA,EACN,uBAAuB;AAAA,EACvB,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,UAAU;AACZ;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/LargeInputText/index.tsx", "
|
|
3
|
+
"sources": ["../../../src/LargeInputText/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export { default, DSLargeInputTextWithSchema, DSLargeInputText } from './DSLargeInputText.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAsE;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/LargeInputText/props.tsx", "
|
|
3
|
+
"sources": ["../../../src/LargeInputText/props.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-props-helpers';\n\nexport const props = {\n /** Injected props to wrapper element of component */\n containerProps: PropTypes.object.description('Injected props to wrapper element of component'),\n /**\n * Whether uses auto focus or not\n */\n autoFocus: PropTypes.bool.description('Whether uses auto focus or not'),\n /** CSS class */\n className: PropTypes.string.description('CSS class'),\n /**\n * Whether is disabled or not\n */\n disabled: PropTypes.bool.description('Whether is disabled or not'),\n /** HTML form name property */\n name: PropTypes.string.description('HTML form name property'),\n /** HTML id */\n id: PropTypes.number.description('HTML id'),\n /**\n * Max length for text to be entered\n */\n maxLength: PropTypes.number.description('Max length for text to be entered'),\n /**\n * Min length for text to be entered\n */\n minLength: PropTypes.number.description('Min length for text to be entered'),\n /**\n * Placeholder for the text\n */\n placeholder: PropTypes.string.description('Placeholder for the text'),\n /**\n * Allows a function that is triggered once the input text is clicked\n */\n onClick: PropTypes.func.description('Allows a function that is triggered once the input text is clicked'),\n /**\n * Allows a function that is triggered once the input text changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the input text changes'),\n /**\n * Allows a function that is triggered once the input text is focused\n */\n onFocus: PropTypes.func.description('Allows a function that is triggered once the input text is focused'),\n /**\n * Allows a function that is triggered once the input text loses focus\n */\n onBlur: PropTypes.func.description('Allows a function that is triggered once the input text loses focus'),\n /**\n * Allows a function that is triggered once in the input a keyboard key is released\n */\n onKeyUp: PropTypes.func.description(\n 'Allows a function that is triggered once in the input a keyboard key is released',\n ),\n /**\n * Allows a function that is triggered once a key is being pressed\n */\n onKeyDown: PropTypes.func.description('Allows a function that is triggered once a key is being pressed'),\n /**\n * Allows a function that is triggered once the input text is pasted\n */\n onPaste: PropTypes.func.description('Allows a function that is triggered once the input text is pasted'),\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string.description('Default value once the component is initialized'),\n /**\n * Whether the input text has error or not\n */\n hasError: PropTypes.bool.description('Whether the input text has error or not'),\n /**\n * Whether the input text is required or not\n */\n required: PropTypes.bool.description('Whether the input text is required or not'),\n /**\n * Whether the input text is read only or not\n */\n readOnly: PropTypes.bool.description('Whether the input text is read only or not'),\n /**\n * Whether the input text style is vertical or not\n */\n resize: PropTypes.string\n .description(\n 'The resizable handle feature is being deprocated due to the inability to fully comply with accessibility standards and would be less than optimal for the best user experience. The auto-resize functionality will repalce it and complies with accessibility standards and guidelines.',\n )\n .deprecated({ version: '4.x' }),\n /** ref forwarded to component */\n innerRef: PropTypes.func.description('ref forwarded to component'),\n /** a11y aria label */\n ariaLabel: PropTypes.string.description('a11y aria label'),\n ariaAutocomplete: PropTypes.string.description(''),\n /**\n * Type of input. Ex: textbox\n */\n role: PropTypes.string.description('Type of input. Ex: textbox'),\n /**\n * it will show a counter/limit if the value is greater than 0\n */\n characterLimitCounter: PropTypes.number.description('it will show a counter/limit if the value is greater than 0'),\n /**\n * Tab index html property.\n */\n tabIndex: PropTypes.string.description('Tab index html property.'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;AAEnB,MAAM,QAAQ;AAAA;AAAA,EAEnB,gBAAgB,kCAAU,OAAO,YAAY,gDAAgD;AAAA;AAAA;AAAA;AAAA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,IACC;AAAA,EACF,EACC,WAAW,EAAE,SAAS,MAAM,CAAC;AAAA;AAAA,EAEhC,UAAU,kCAAU,KAAK,YAAY,4BAA4B;AAAA;AAAA,EAEjE,WAAW,kCAAU,OAAO,YAAY,iBAAiB;AAAA,EACzD,kBAAkB,kCAAU,OAAO,YAAY,EAAE;AAAA;AAAA;AAAA;AAAA,EAIjD,MAAM,kCAAU,OAAO,YAAY,4BAA4B;AAAA;AAAA;AAAA;AAAA,EAI/D,uBAAuB,kCAAU,OAAO,YAAY,6DAA6D;AAAA;AAAA;AAAA;AAAA,EAIjH,UAAU,kCAAU,OAAO,YAAY,0BAA0B;AACnE;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/Radio/Circle.tsx", "
|
|
3
|
+
"sources": ["../../../src/Radio/Circle.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { withTheme } from '@elliemae/ds-system';\n\nconst Circle = ({ checked, theme }) => {\n const r = theme.breakpoints.medium.split('px')[0] - window.innerWidth >= 0 ? 6 : 4;\n return (\n <svg width=\"100%\" height=\"100%\">\n <circle className={checked ? 'checked' : 'unchecked'} r={r} cx=\"50%\" cy=\"50%\" />\n </svg>\n );\n};\n\nconst ThemedCircle = withTheme(Circle);\nexport { ThemedCircle as Circle };\nexport default ThemedCircle;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADOjB;AANN,uBAA0B;AAE1B,MAAM,SAAS,CAAC,EAAE,SAAS,MAAM,MAAM;AACrC,QAAM,IAAI,MAAM,YAAY,OAAO,MAAM,IAAI,EAAE,CAAC,IAAI,OAAO,cAAc,IAAI,IAAI;AACjF,SACE,4CAAC,SAAI,OAAM,QAAO,QAAO,QACvB,sDAAC,YAAO,WAAW,UAAU,YAAY,aAAa,GAAM,IAAG,OAAM,IAAG,OAAM,GAChF;AAEJ;AAEA,MAAM,mBAAe,4BAAU,MAAM;AAErC,IAAO,iBAAQ;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/Radio/DSRadio.tsx", "
|
|
3
|
+
"sources": ["../../../src/Radio/DSRadio.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable react/no-unknown-property */\nimport React, { useRef } from 'react';\nimport { useDeprecateComponent } from '@elliemae/ds-utilities';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { Circle } from './Circle.js';\n\ninterface DSRadioT {\n [x: string]: unknown;\n innerRef?: React.MutableRefObject<HTMLInputElement>;\n containerProps?: { [x: string]: unknown };\n className?: string;\n style?: React.CSSProperties;\n labelText?: string;\n htmlFor?: string;\n hasError?: boolean;\n readOnly?: boolean;\n disabled?: boolean;\n checked?: boolean;\n value?: string;\n name?: string;\n onKeyDown?: React.KeyboardEventHandler<HTMLSpanElement>;\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n children?: React.ReactNode | React.ReactNode[];\n tabIndex?: number;\n}\n\nconst DSRadio = ({\n containerProps,\n className,\n style,\n labelText,\n htmlFor,\n hasError,\n readOnly,\n disabled,\n checked,\n value,\n name,\n onChange,\n children,\n tabIndex,\n innerRef,\n ...otherProps\n}: DSRadioT) => {\n useDeprecateComponent({ componentName: 'ds-form/DSRadio', version: '3.x Date: 2023 Q1' });\n\n // this will be solved when we move to styled components...\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const { cssClassName, classNameElement } = convertPropToCssClassName('form-element-radio', className, {\n hasError,\n readOnly,\n disabled,\n });\n const checkRef = useRef<HTMLInputElement | null>(null);\n return (\n <div {...containerProps} className={cssClassName}>\n <label className={classNameElement('label')} htmlFor={htmlFor}>\n <input\n {...otherProps}\n ref={checkRef}\n aria-disabled={disabled}\n checked={disabled ? false : checked}\n className={classNameElement('input')}\n disabled={disabled}\n name={name}\n onChange={(e) => {\n if (!readOnly && !disabled) {\n onChange(e);\n }\n }}\n readOnly={readOnly}\n tabIndex={-1}\n type=\"radio\"\n value={value}\n />\n <span\n ref={innerRef}\n aria-checked={checked}\n aria-disabled={disabled}\n className={classNameElement('input-button')}\n onKeyDown={(e) => {\n // really really bad pattern...\n // overwriting the target to point to the hidden input because the focus is on the span and not on the input...\n // we will solve this with a v2 of this when we move to controlled + styled components...\n e.target = checkRef.current;\n if (disabled) return;\n if (e.key === 'Enter' || e.keyCode === 32) {\n onChange(e);\n } else if (otherProps.onKeyDown) {\n otherProps.onKeyDown(e);\n }\n }}\n role=\"radio\"\n style={style}\n tabIndex={disabled ? -1 : tabIndex}\n // value={value} // should be unused?\n >\n <Circle checked={checked} />\n </span>\n <span className={classNameElement('label-text')}>{labelText}</span>\n </label>\n {children && <div className={classNameElement('radio-children')}>{children}</div>}\n </div>\n );\n};\n\nDSRadio.defaultProps = {\n containerProps: {},\n className: '',\n hasError: false,\n readOnly: false,\n disabled: false,\n checked: false,\n name: '',\n onChange: () => null,\n children: null,\n tabIndex: 0,\n};\n\nconst radioProps = {\n /** Injected props to wrapper element of component */\n containerProps: PropTypes.object.description('Injected props to wrapper element of component'),\n /** css class prop */\n className: PropTypes.string.description('css class prop'),\n /** name property to manage form */\n name: PropTypes.string.description('name property to manage form'),\n /**\n * Displayable label for the radio\n */\n labelText: PropTypes.string.description('Displayable label for the radio'),\n /** HTMLFOR property to manage form */\n htmlFor: PropTypes.element.description('HTMLFOR property to manage form'),\n /**\n * Whether the radio has error or not\n */\n hasError: PropTypes.bool.description('Whether the radio has error or not'),\n /**\n * Whether the radio is read only or not\n */\n readOnly: PropTypes.bool.description('Whether the radio is read only or not'),\n /**\n * Whether the radio is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the radio is disabled or not'),\n /**\n * Whether the radio is checked or not\n */\n checked: PropTypes.bool.description('Whether the radio is checked or not'),\n /**\n * Value that takes the checkbox if it is checked\n */\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]).description(\n 'Value that takes the checkbox if it is checked',\n ).isRequired,\n /**\n * Allows a function that is triggered once the radio changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the radio changes'),\n /**\n * Optional, if you want a checkbox customized\n */\n children: PropTypes.node.description('Optional, if you want a checkbox customized'),\n /** HTML tabindex to manage focus */\n tabIndex: PropTypes.number.description('HTML tabindex to manage focus'),\n /** style override object */\n style: PropTypes.object.description('style override object'),\n};\n\nDSRadio.propTypes = radioProps;\nDSRadio.displayName = 'DSRadio';\nconst DSRadioWithSchema = describe(DSRadio);\nDSRadioWithSchema.propTypes = radioProps;\n\nexport { DSRadio, DSRadioWithSchema };\n\nexport default DSRadio;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;A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AM,CAAC,EAAE;AAAA,IACjF;AAAA,EACF,EAAE;AAAA;AAAA;AAAA;AAAA,EAIF,UAAU,kCAAU,KAAK,YAAY,4DAA4D;AAAA;AAAA;AAAA;AAAA,EAIjG,UAAU,kCAAU,KAAK,YAAY,6CAA6C;AAAA;AAAA,EAElF,UAAU,kCAAU,OAAO,YAAY,+BAA+B;AAAA;AAAA,EAEtE,OAAO,kCAAU,OAAO,YAAY,uBAAuB;AAC7D;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,wBAAoB,kCAAS,OAAO;AAC1C,kBAAkB,YAAY;AAI9B,IAAO,kBAAQ;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/Radio/index.tsx", "
|
|
3
|
+
"sources": ["../../../src/Radio/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from './DSRadio.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAc,yBAAd;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/RadioGroup/DSRadioGroup.tsx", "
|
|
3
|
+
"sources": ["../../../src/RadioGroup/DSRadioGroup.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { GroupItem, Group } from '@elliemae/ds-shared';\nimport { DSFormItemLayout } from '../FormItem/index.js';\nimport { DSRadio } from '../Radio/index.js';\nimport { props as rprops } from './props.js';\nimport { defaultProps } from './defaultProps.js';\n\nconst emClassPrefix = 'em-ds';\nconst baseClass = `${emClassPrefix}-radio-group`;\n\nconst RadioItem = (props) => (\n <GroupItem\n render={(context) => (\n <DSRadio\n {...props}\n checked={context.activeValue === props.value}\n disabled={context.disabled || props.disabled}\n onChange={context.onChange}\n />\n )}\n />\n);\n\nconst DSRadioGroup = ({\n containerProps,\n onChange,\n activeValue,\n children,\n orientation,\n disabled,\n truncateText,\n labelProps,\n}) => {\n const checkRefs = [];\n const count = React.Children.count(children);\n const onKeyDown = (e, index) => {\n if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {\n if (index === 0) checkRefs[count - 1].focus();\n else checkRefs[index - 1].focus();\n }\n if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {\n if (index === count - 1) checkRefs[0].focus();\n else checkRefs[index + 1].focus();\n }\n };\n const group = (\n <Group activeValue={activeValue} disabled={disabled} onChange={onChange}>\n <div\n data-testid=\"ds-radiogroup\"\n {...(labelProps && labelProps.labelText ? {} : containerProps)}\n className={`${baseClass} ${baseClass}--${orientation}`}\n role=\"group\"\n >\n {React.Children.map(\n children,\n (child, index) => (\n <RadioItem\n {...child.props}\n innerRef={(t) => {\n checkRefs.push(t);\n }}\n onKeyDown={(e) => onKeyDown(e, index)}\n />\n ),\n null,\n )}\n </div>\n </Group>\n );\n\n if (labelProps && labelProps.labelText) {\n return (\n <div className={`${baseClass}-form-item-layout-wrapper`} {...containerProps} role=\"group\">\n <DSFormItemLayout {...labelProps} inputComponent={group} onChange={onChange} truncateText={truncateText} />\n </div>\n );\n }\n return group;\n};\n\nDSRadioGroup.propTypes = rprops;\nDSRadioGroup.defaultProps = defaultProps;\nDSRadioGroup.displayName = 'DSRadioGroup';\nconst DSRadioGroupWithSchema = describe(DSRadioGroup);\nDSRadioGroupWithSchema.propTypes = rprops;\n\nexport { DSRadioGroup, DSRadioGroupWithSchema };\n\nexport default DSRadioGroup;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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QACA,CAAC,OAAO,UACN;AAAA,UAAC;AAAA;AAAA,YACE,GAAG,MAAM;AAAA,YACV,UAAU,CAAC,MAAM;AACf,wBAAU,KAAK,CAAC;AAAA,YAClB;AAAA,YACA,WAAW,CAAC,MAAM,UAAU,GAAG,KAAK;AAAA;AAAA,QACtC;AAAA,QAEF;AAAA,MACF;AAAA;AAAA,EACF,GACF;AAGF,MAAI,cAAc,WAAW,WAAW;AACtC,WACE,4CAAC,SAAI,WAAW,GAAG,sCAAuC,GAAG,gBAAgB,MAAK,SAChF,sDAAC,oCAAkB,GAAG,YAAY,gBAAgB,OAAO,UAAoB,cAA4B,GAC3G;AAAA,EAEJ;AACA,SAAO;AACT;AAEA,aAAa,YAAY,aAAAC;AACzB,aAAa,eAAe;AAC5B,aAAa,cAAc;AAC3B,MAAM,6BAAyB,kCAAS,YAAY;AACpD,uBAAuB,YAAY,aAAAA;AAInC,IAAO,uBAAQ;",
|
|
6
6
|
"names": ["React", "rprops"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/RadioGroup/defaultProps.tsx", "
|
|
3
|
+
"sources": ["../../../src/RadioGroup/defaultProps.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export const defaultProps = {\n containerProps: {},\n onChange: () => null,\n orientation: 'vertical',\n disabled: false,\n truncateText: false,\n labelProps: {\n feedbackMessage: '',\n labelText: '',\n required: false,\n },\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,eAAe;AAAA,EAC1B,gBAAgB,CAAC;AAAA,EACjB,UAAU,MAAM;AAAA,EAChB,aAAa;AAAA,EACb,UAAU;AAAA,EACV,cAAc;AAAA,EACd,YAAY;AAAA,IACV,iBAAiB;AAAA,IACjB,WAAW;AAAA,IACX,UAAU;AAAA,EACZ;AACF;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/RadioGroup/index.tsx", "
|
|
3
|
+
"sources": ["../../../src/RadioGroup/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from './DSRadioGroup.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAc,8BAAd;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/RadioGroup/props.tsx", "
|
|
3
|
+
"sources": ["../../../src/RadioGroup/props.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-props-helpers';\nimport { orientation as radioGroupOrientation } from '@elliemae/ds-shared';\n\nexport const props = {\n /** Inject props to component wrapper */\n containerProps: PropTypes.object.description('Inject props to component wrapper'),\n /**\n * Allows a function that is triggered once the radio group changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the radio group changes'),\n /**\n * Selected default active value\n */\n activeValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Selected default active value'),\n /**\n * Radio group items to show of type DSRadio\n */\n children: PropTypes.arrayOf(PropTypes.element).isRequired.description('Radio group items to show of type DSRadio'),\n /**\n * ['horizontal', 'vertical']\n */\n orientation: PropTypes.oneOf(radioGroupOrientation).description(\"['horizontal', 'vertical']\"),\n /**\n * Whether the radio group is disabled or not\n */\n disabled: PropTypes.bool.description(''),\n labelProps: PropTypes.shape({\n feedbackMessage: PropTypes.string,\n labelText: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n required: PropTypes.bool,\n }).description('Whether the radio group is disabled or not'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;AAC1B,uBAAqD;AAE9C,MAAM,QAAQ;AAAA;AAAA,EAEnB,gBAAgB,kCAAU,OAAO,YAAY,mCAAmC;AAAA;AAAA;AAAA;AAAA,EAIhF,UAAU,kCAAU,KAAK,YAAY,kEAAkE;AAAA;AAAA;AAAA;AAAA,EAIvG,aAAa,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EAAE,YAAY,+BAA+B;AAAA;AAAA;AAAA;AAAA,EAIlH,UAAU,kCAAU,QAAQ,kCAAU,OAAO,EAAE,WAAW,YAAY,2CAA2C;AAAA;AAAA;AAAA;AAAA,EAIjH,aAAa,kCAAU,MAAM,iBAAAA,WAAqB,EAAE,YAAY,4BAA4B;AAAA;AAAA;AAAA;AAAA,EAI5F,UAAU,kCAAU,KAAK,YAAY,EAAE;AAAA,EACvC,YAAY,kCAAU,MAAM;AAAA,IAC1B,iBAAiB,kCAAU;AAAA,IAC3B,WAAW,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,OAAO,CAAC;AAAA,IACpE,UAAU,kCAAU;AAAA,EACtB,CAAC,EAAE,YAAY,4CAA4C;AAC7D;",
|
|
6
6
|
"names": ["radioGroupOrientation"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/RequiredMark/RequiredMark.tsx", "
|
|
3
|
+
"sources": ["../../../src/RequiredMark/RequiredMark.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\n\nconst { cssClassName } = convertPropToCssClassName('form-required-mark');\nconst RequiredMark = ({ required = false, optional = false }) => {\n if (!required && !optional) return null;\n if (required) {\n return <span className={`${cssClassName}`}>●</span>;\n }\n return <span className={`${cssClassName} optional-mark`}>⚬</span>;\n};\n\nexport { RequiredMark, RequiredMark as DSRequiredMark };\nexport default RequiredMark;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADOZ;AANX,2BAA0C;AAE1C,MAAM,EAAE,aAAa,QAAI,gDAA0B,oBAAoB;AACvE,MAAM,eAAe,CAAC,EAAE,WAAW,OAAO,WAAW,MAAM,MAAM;AAC/D,MAAI,CAAC,YAAY,CAAC;AAAU,WAAO;AACnC,MAAI,UAAU;AACZ,WAAO,4CAAC,UAAK,WAAW,GAAG,gBAAgB,oBAAO;AAAA,EACpD;AACA,SAAO,4CAAC,UAAK,WAAW,GAAG,8BAA8B,oBAAO;AAClE;AAGA,IAAO,uBAAQ;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/RequiredMark/index.tsx", "
|
|
3
|
+
"sources": ["../../../src/RequiredMark/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from './RequiredMark.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,iCAAc,8BAAd;",
|
|
6
6
|
"names": []
|