@elliemae/ds-form 3.12.0-next.0 → 3.12.0-next.1
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/CheckboxGroup/DSCheckboxGroup.js.map +2 -2
- package/dist/cjs/ComboBox/index.js.map +1 -1
- package/dist/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js +28 -30
- package/dist/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js.map +2 -2
- package/dist/cjs/ComboBoxFreeSolo/components/MultiValueLabel.js.map +2 -2
- package/dist/cjs/ComboBoxFreeSolo/components/SingleValue.js.map +2 -2
- package/dist/cjs/DateInput/props.js +12 -33
- package/dist/cjs/DateInput/props.js.map +2 -2
- package/dist/cjs/DateInputV2/components/helpers.js.map +2 -2
- package/dist/cjs/DateInputV2/components/props.js +8 -25
- package/dist/cjs/DateInputV2/components/props.js.map +2 -2
- package/dist/cjs/DateInputV2/components/propsTypes.js +1 -4
- package/dist/cjs/DateInputV2/components/propsTypes.js.map +2 -2
- package/dist/cjs/DateInputV2/components/styled.js.map +2 -2
- package/dist/cjs/DateInputV2/components/utils.js +1 -4
- package/dist/cjs/DateInputV2/components/utils.js.map +2 -2
- package/dist/cjs/FloatingLabelInput/getSvgPath.js.map +2 -2
- package/dist/cjs/FormItem/Label/DSLabel.js +1 -9
- package/dist/cjs/FormItem/Label/DSLabel.js.map +2 -2
- package/dist/cjs/FormItem/Suffix/Suffix.js.map +2 -2
- package/dist/cjs/FormItem/ValidationFieldWrapper.js.map +2 -2
- package/dist/cjs/Input/index.js.map +1 -1
- package/dist/cjs/InputGroup/AddonWrapper.js +1 -7
- package/dist/cjs/InputGroup/AddonWrapper.js.map +2 -2
- package/dist/cjs/InputGroup/props.js +5 -12
- package/dist/cjs/InputGroup/props.js.map +2 -2
- package/dist/cjs/InputMask/DSInputMask.js +2 -6
- package/dist/cjs/InputMask/DSInputMask.js.map +2 -2
- package/dist/cjs/InputMask/InputMaskContext.js.map +1 -1
- package/dist/cjs/InputMask/addons/AutoCorrectedDatePipe.js +3 -12
- package/dist/cjs/InputMask/addons/AutoCorrectedDatePipe.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/DateInputMask.js +1 -5
- package/dist/cjs/InputMask/mask_types/DateInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/DateTimeInputMask.js +1 -5
- package/dist/cjs/InputMask/mask_types/DateTimeInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/DictionaryInputMask.js +1 -7
- package/dist/cjs/InputMask/mask_types/DictionaryInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/PhoneInputMask.js +1 -5
- package/dist/cjs/InputMask/mask_types/PhoneInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/PhoneInternationalInputMask.js +1 -5
- package/dist/cjs/InputMask/mask_types/PhoneInternationalInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/SsnInputMask.js +1 -5
- package/dist/cjs/InputMask/mask_types/SsnInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js +1 -5
- package/dist/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js.map +2 -2
- package/dist/cjs/InputMask/mask_types/index.js.map +2 -2
- package/dist/cjs/InputMask/props.js +19 -59
- package/dist/cjs/InputMask/props.js.map +2 -2
- package/dist/cjs/InputProtected/props.js +8 -21
- package/dist/cjs/InputProtected/props.js.map +2 -2
- package/dist/cjs/LargeInputText/DSLargeInputText.js +13 -19
- package/dist/cjs/LargeInputText/DSLargeInputText.js.map +2 -2
- package/dist/cjs/LargeInputText/props.js +13 -39
- package/dist/cjs/LargeInputText/props.js.map +2 -2
- package/dist/cjs/Radio/Circle.js.map +2 -2
- package/dist/cjs/RadioGroup/DSRadioGroup.js.map +2 -2
- package/dist/cjs/TimeInput/DSTimeInput.js +8 -19
- package/dist/cjs/TimeInput/DSTimeInput.js.map +2 -2
- package/dist/cjs/TimeInput/TimeInputImpl.js +1 -3
- package/dist/cjs/TimeInput/TimeInputImpl.js.map +2 -2
- package/dist/cjs/TimeInput/utils.js +4 -5
- package/dist/cjs/TimeInput/utils.js.map +3 -3
- package/dist/cjs/Toggle/DSToggleImpl.js.map +2 -2
- package/dist/cjs/Toggle/DSToggleRender.js +13 -15
- package/dist/cjs/Toggle/DSToggleRender.js.map +2 -2
- package/dist/cjs/Toggle/toggleHelper.js +1 -7
- package/dist/cjs/Toggle/toggleHelper.js.map +2 -2
- package/dist/esm/CheckboxGroup/DSCheckboxGroup.js.map +2 -2
- package/dist/esm/ComboBox/index.js.map +1 -1
- package/dist/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js +28 -30
- package/dist/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js.map +2 -2
- package/dist/esm/ComboBoxFreeSolo/components/MultiValueLabel.js.map +2 -2
- package/dist/esm/ComboBoxFreeSolo/components/SingleValue.js.map +2 -2
- package/dist/esm/DateInput/props.js +12 -33
- package/dist/esm/DateInput/props.js.map +2 -2
- package/dist/esm/DateInputV2/components/helpers.js.map +2 -2
- package/dist/esm/DateInputV2/components/props.js +8 -25
- package/dist/esm/DateInputV2/components/props.js.map +2 -2
- package/dist/esm/DateInputV2/components/propsTypes.js +1 -4
- package/dist/esm/DateInputV2/components/propsTypes.js.map +2 -2
- package/dist/esm/DateInputV2/components/styled.js.map +2 -2
- package/dist/esm/DateInputV2/components/utils.js +1 -4
- package/dist/esm/DateInputV2/components/utils.js.map +2 -2
- package/dist/esm/FloatingLabelInput/getSvgPath.js.map +2 -2
- package/dist/esm/FormItem/Label/DSLabel.js +1 -9
- package/dist/esm/FormItem/Label/DSLabel.js.map +2 -2
- package/dist/esm/FormItem/Suffix/Suffix.js.map +2 -2
- package/dist/esm/FormItem/ValidationFieldWrapper.js.map +2 -2
- package/dist/esm/Input/index.js.map +1 -1
- package/dist/esm/InputGroup/AddonWrapper.js +1 -7
- package/dist/esm/InputGroup/AddonWrapper.js.map +2 -2
- package/dist/esm/InputGroup/props.js +5 -12
- package/dist/esm/InputGroup/props.js.map +2 -2
- package/dist/esm/InputMask/DSInputMask.js +2 -6
- package/dist/esm/InputMask/DSInputMask.js.map +2 -2
- package/dist/esm/InputMask/InputMaskContext.js.map +1 -1
- package/dist/esm/InputMask/addons/AutoCorrectedDatePipe.js +3 -12
- package/dist/esm/InputMask/addons/AutoCorrectedDatePipe.js.map +2 -2
- package/dist/esm/InputMask/mask_types/DateInputMask.js +1 -5
- package/dist/esm/InputMask/mask_types/DateInputMask.js.map +2 -2
- package/dist/esm/InputMask/mask_types/DateTimeInputMask.js +1 -5
- package/dist/esm/InputMask/mask_types/DateTimeInputMask.js.map +2 -2
- package/dist/esm/InputMask/mask_types/DictionaryInputMask.js +1 -7
- package/dist/esm/InputMask/mask_types/DictionaryInputMask.js.map +2 -2
- package/dist/esm/InputMask/mask_types/PhoneInputMask.js +1 -5
- package/dist/esm/InputMask/mask_types/PhoneInputMask.js.map +2 -2
- package/dist/esm/InputMask/mask_types/PhoneInternationalInputMask.js +1 -5
- package/dist/esm/InputMask/mask_types/PhoneInternationalInputMask.js.map +2 -2
- package/dist/esm/InputMask/mask_types/SsnInputMask.js +1 -5
- package/dist/esm/InputMask/mask_types/SsnInputMask.js.map +2 -2
- package/dist/esm/InputMask/mask_types/ZipCodeSearchInputMask.js +1 -5
- package/dist/esm/InputMask/mask_types/ZipCodeSearchInputMask.js.map +2 -2
- package/dist/esm/InputMask/mask_types/index.js.map +2 -2
- package/dist/esm/InputMask/props.js +19 -59
- package/dist/esm/InputMask/props.js.map +2 -2
- package/dist/esm/InputProtected/props.js +8 -21
- package/dist/esm/InputProtected/props.js.map +2 -2
- package/dist/esm/LargeInputText/DSLargeInputText.js +14 -23
- package/dist/esm/LargeInputText/DSLargeInputText.js.map +2 -2
- package/dist/esm/LargeInputText/props.js +13 -39
- package/dist/esm/LargeInputText/props.js.map +2 -2
- package/dist/esm/Radio/Circle.js.map +2 -2
- package/dist/esm/RadioGroup/DSRadioGroup.js.map +2 -2
- package/dist/esm/TimeInput/DSTimeInput.js +8 -19
- package/dist/esm/TimeInput/DSTimeInput.js.map +2 -2
- package/dist/esm/TimeInput/TimeInputImpl.js +1 -3
- package/dist/esm/TimeInput/TimeInputImpl.js.map +2 -2
- package/dist/esm/TimeInput/utils.js +1 -2
- package/dist/esm/TimeInput/utils.js.map +2 -2
- package/dist/esm/Toggle/DSToggleImpl.js.map +2 -2
- package/dist/esm/Toggle/DSToggleRender.js +13 -15
- package/dist/esm/Toggle/DSToggleRender.js.map +2 -2
- package/dist/esm/Toggle/toggleHelper.js +1 -7
- package/dist/esm/Toggle/toggleHelper.js.map +2 -2
- package/package.json +12 -12
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/CheckboxGroup/DSCheckboxGroup.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { describe } from '@elliemae/ds-utilities';\nimport { GroupItem, Group } from '@elliemae/ds-shared';\nimport { DSFormItemLayout } from '../FormItem';\nimport { DSCheckbox } from '../Checkbox';\nimport { props as cprops } from './props';\nimport { defaultProps } from './defaultProps';\n\n// todo: replace that for aggregatedClasses\nconst emClassPrefix = 'em-ds';\nconst baseClass = `${emClassPrefix}-checkbox-group`;\n\nconst CheckboxItem = (props) => (\n <GroupItem\n render={(context) => (\n <DSCheckbox\n {...props}\n checked={
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgBjB;AAhBN,mBAAkB;AAClB,wBAAsB;AACtB,0BAAyB;AACzB,uBAAiC;AACjC,sBAAiC;AACjC,sBAA2B;AAC3B,mBAAgC;AAChC,0BAA6B;AAG7B,MAAM,gBAAgB;AACtB,MAAM,YAAY,GAAG;AAErB,MAAM,eAAe,CAAC,UACpB,4CAAC;AAAA,EACC,QAAQ,CAAC,YACP,4CAAC;AAAA,IACE,GAAG;AAAA,IACJ,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { describe } from '@elliemae/ds-utilities';\nimport { GroupItem, Group } from '@elliemae/ds-shared';\nimport { DSFormItemLayout } from '../FormItem';\nimport { DSCheckbox } from '../Checkbox';\nimport { props as cprops } from './props';\nimport { defaultProps } from './defaultProps';\n\n// todo: replace that for aggregatedClasses\nconst emClassPrefix = 'em-ds';\nconst baseClass = `${emClassPrefix}-checkbox-group`;\n\nconst CheckboxItem = (props) => (\n <GroupItem\n render={(context) => (\n <DSCheckbox\n {...props}\n checked={context.activeValue && context.activeValue.indexOf(props.value) !== -1}\n disabled={context.disabled || props.disabled}\n onChange={context.onChange}\n />\n )}\n />\n);\n\nconst DSCheckboxGroup = ({\n onChange,\n activeValue,\n children,\n disabled,\n orientation,\n truncateText,\n labelProps,\n containerProps,\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} multiple onChange={onChange}>\n <div\n className={`${baseClass} ${baseClass}--${orientation}`}\n {...(labelProps && labelProps.labelText ? {} : containerProps)}\n role=\"group\"\n >\n {React.Children.map(\n children,\n (child, index) => (\n <CheckboxItem\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\nconst noop = () => null;\n\nDSCheckboxGroup.propTypes = cprops;\nDSCheckboxGroup.defaultProps = defaultProps;\nDSCheckboxGroup.displayName = 'DSCheckboxGroup';\nconst DSCheckboxGroupWithSchema = describe(DSCheckboxGroup);\nDSCheckboxGroupWithSchema.propTypes = cprops;\n\nCheckboxItem.propTypes = {\n checked: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func,\n};\n\nCheckboxItem.defaultProps = {\n checked: false,\n disabled: false,\n onChange: noop,\n};\n\nexport { DSCheckboxGroup, DSCheckboxGroupWithSchema };\n// export default DSCheckboxGroup;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgBjB;AAhBN,mBAAkB;AAClB,wBAAsB;AACtB,0BAAyB;AACzB,uBAAiC;AACjC,sBAAiC;AACjC,sBAA2B;AAC3B,mBAAgC;AAChC,0BAA6B;AAG7B,MAAM,gBAAgB;AACtB,MAAM,YAAY,GAAG;AAErB,MAAM,eAAe,CAAC,UACpB,4CAAC;AAAA,EACC,QAAQ,CAAC,YACP,4CAAC;AAAA,IACE,GAAG;AAAA,IACJ,SAAS,QAAQ,eAAe,QAAQ,YAAY,QAAQ,MAAM,KAAK,MAAM;AAAA,IAC7E,UAAU,QAAQ,YAAY,MAAM;AAAA,IACpC,UAAU,QAAQ;AAAA,GACpB;AAAA,CAEJ;AAGF,MAAM,kBAAkB,CAAC;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,YAAY,CAAC;AACnB,QAAM,QAAQ,aAAAA,QAAM,SAAS,MAAM,QAAQ;AAC3C,QAAM,YAAY,CAAC,GAAG,UAAU;AAC9B,QAA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AAC,QAAU;AAAA,EACnB,UAAU,kBAAAA,QAAU;AAAA,EACpB,UAAU,kBAAAA,QAAU;AACtB;AAEA,aAAa,eAAe;AAAA,EAC1B,SAAS;AAAA,EACT,UAAU;AAAA,EACV,UAAU;AACZ;",
|
|
6
6
|
"names": ["React", "cprops", "PropTypes"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/ComboBox/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export * from '@elliemae/ds-common/ComboBox'
|
|
4
|
+
"sourcesContent": ["export * from '@elliemae/ds-common/ComboBox';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,6BAAc,yCAAd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -56,7 +56,7 @@ const customStyles = {
|
|
|
56
56
|
"::-webkit-scrollbar": { display: "none" }
|
|
57
57
|
})
|
|
58
58
|
};
|
|
59
|
-
|
|
59
|
+
const ComboBoxFreeSolo = ({
|
|
60
60
|
isMulti = false,
|
|
61
61
|
options = {},
|
|
62
62
|
value = [],
|
|
@@ -72,35 +72,33 @@ function ComboBoxFreeSolo({
|
|
|
72
72
|
formatCreateLabel = (val) => `Create ${val}`,
|
|
73
73
|
maxOptions = void 0,
|
|
74
74
|
...rest
|
|
75
|
-
}) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
});
|
|
103
|
-
}
|
|
75
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ComboBox.DSComboBox2, {
|
|
76
|
+
...rest,
|
|
77
|
+
isFreeSolo: true,
|
|
78
|
+
clearable: true,
|
|
79
|
+
isMulti,
|
|
80
|
+
value,
|
|
81
|
+
options,
|
|
82
|
+
keepTypedValue: false,
|
|
83
|
+
placeholder,
|
|
84
|
+
disabled,
|
|
85
|
+
menuIsOpen,
|
|
86
|
+
formatCreateLabel,
|
|
87
|
+
createOptionPosition: "first",
|
|
88
|
+
onChange,
|
|
89
|
+
onChangeV2,
|
|
90
|
+
onInputChange,
|
|
91
|
+
onFocus,
|
|
92
|
+
onBlur,
|
|
93
|
+
containerProps,
|
|
94
|
+
maxOptions,
|
|
95
|
+
components: {
|
|
96
|
+
MultiValueLabel: import_MultiValueLabel.MultiValueLabel,
|
|
97
|
+
MultiValueRemove: import_MultiValueRemove.MultiValueRemove,
|
|
98
|
+
SingleValue: import_SingleValue.SingleValue
|
|
99
|
+
},
|
|
100
|
+
componentsStyle: customStyles
|
|
101
|
+
});
|
|
104
102
|
ComboBoxFreeSolo.propTypes = {
|
|
105
103
|
containerProps: import_prop_types.default.object,
|
|
106
104
|
onFocus: import_prop_types.default.func,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/ComboBoxFreeSolo/ComboBoxFreeSolo.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { noop } from 'lodash';\nimport { DSComboBox2 } from '../ComboBox';\nimport { MultiValueLabel } from './components/MultiValueLabel';\nimport { MultiValueRemove } from './components/MultiValueRemove';\nimport { SingleValue } from './components/SingleValue';\nimport { SingleValueRemove } from './components/SingleValueRemove';\n\nconst customStyles = {\n multiValueRemove: MultiValueRemove.style,\n clearIndicator: SingleValueRemove.style,\n multiValue: (base) => ({\n ...base,\n borderRadius: '10px',\n backgroundColor: '#ebf6ff',\n }),\n valueContainer: (base) => ({\n ...base,\n display: '-webkit-box',\n flexWrap: 'nowrap',\n overflowX: 'scroll',\n overflowY: 'hidden',\n '-ms-overflow-style': 'none', // IE and Edge\n 'scrollbar-width': 'none', // Firefox\n '::-webkit-scrollbar': { display: 'none' }, // Chrome\n }),\n};\n\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { noop } from 'lodash';\nimport { DSComboBox2 } from '../ComboBox';\nimport { MultiValueLabel } from './components/MultiValueLabel';\nimport { MultiValueRemove } from './components/MultiValueRemove';\nimport { SingleValue } from './components/SingleValue';\nimport { SingleValueRemove } from './components/SingleValueRemove';\n\nconst customStyles = {\n multiValueRemove: MultiValueRemove.style,\n clearIndicator: SingleValueRemove.style,\n multiValue: (base) => ({\n ...base,\n borderRadius: '10px',\n backgroundColor: '#ebf6ff',\n }),\n valueContainer: (base) => ({\n ...base,\n display: '-webkit-box',\n flexWrap: 'nowrap',\n overflowX: 'scroll',\n overflowY: 'hidden',\n '-ms-overflow-style': 'none', // IE and Edge\n 'scrollbar-width': 'none', // Firefox\n '::-webkit-scrollbar': { display: 'none' }, // Chrome\n }),\n};\n\nconst ComboBoxFreeSolo = ({\n isMulti = false,\n options = {},\n value = [],\n onChange = noop,\n onChangeV2 = noop,\n onInputChange = noop,\n onFocus = noop,\n onBlur = noop,\n containerProps = {},\n disabled = false,\n menuIsOpen = false,\n placeholder = 'Select values',\n formatCreateLabel = (val) => `Create ${val}`,\n maxOptions = undefined,\n ...rest\n}) => (\n <DSComboBox2\n {...rest}\n isFreeSolo\n clearable\n isMulti={isMulti}\n value={value}\n options={options}\n keepTypedValue={false}\n placeholder={placeholder}\n disabled={disabled}\n menuIsOpen={menuIsOpen}\n formatCreateLabel={formatCreateLabel}\n createOptionPosition=\"first\"\n onChange={onChange}\n onChangeV2={onChangeV2}\n onInputChange={onInputChange}\n onFocus={onFocus}\n onBlur={onBlur}\n containerProps={containerProps}\n maxOptions={maxOptions}\n components={{\n MultiValueLabel,\n MultiValueRemove,\n SingleValue,\n }}\n componentsStyle={customStyles}\n />\n);\n\nComboBoxFreeSolo.propTypes = {\n containerProps: PropTypes.object,\n /**\n * Allows a function that is triggered once the combo box is focused\n */\n onFocus: PropTypes.func,\n /**\n * Allows a function that is triggered once the combo box loses focus\n */\n onBlur: PropTypes.func,\n /**\n * Allows a function that is triggered when a new value is selected from the dropdown menu\n */\n onChange: PropTypes.func.isRequired,\n /**\n * Allows a function that is triggered when a new value is selected from the dropdown menu\n * It will return the current options selected\n */\n onChangeV2: PropTypes.func,\n /**\n * Allows a function that is triggered once the input value changes (on every keystroke)\n */\n onInputChange: PropTypes.func,\n value: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),\n /**\n * Value that the combo box has as default\n */\n options: PropTypes.arrayOf(PropTypes.object),\n /**\n * Whether the combo box is disabled or not\n */\n disabled: PropTypes.bool,\n /**\n * Whether the combo box free solo is multi selectable or not\n */\n isMulti: PropTypes.bool,\n /**\n * Placeholder for the combo box\n */\n placeholder: PropTypes.string,\n /**\n * Whether the combo box menu is open or not\n */\n menuIsOpen: PropTypes.bool,\n /**\n * Whether to show the combo box menu inline or not\n */\n /**\n * function that reciveves the new value and returns the formatted value\n */\n formatCreateLabel: PropTypes.func,\n /**\n * Max options to be displayed on the menu list\n */\n maxOptions: PropTypes.number,\n};\n\nexport { ComboBoxFreeSolo };\nexport default ComboBoxFreeSolo;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8CrB;AA7CF,wBAAsB;AACtB,o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;AAAA,EAInB,QAAQ,kBAAAA,QAAU;AAAA,EAIlB,UAAU,kBAAAA,QAAU,KAAK;AAAA,EAKzB,YAAY,kBAAAA,QAAU;AAAA,EAItB,eAAe,kBAAAA,QAAU;AAAA,EACzB,OAAO,kBAAAA,QAAU,UAAU,CAAC,kBAAAA,QAAU,OAAO,kBAAAA,QAAU,MAAM,CAAC;AAAA,EAI9D,SAAS,kBAAAA,QAAU,QAAQ,kBAAAA,QAAU,MAAM;AAAA,EAI3C,UAAU,kBAAAA,QAAU;AAAA,EAIpB,SAAS,kBAAAA,QAAU;AAAA,EAInB,aAAa,kBAAAA,QAAU;AAAA,EAIvB,YAAY,kBAAAA,QAAU;AAAA,EAOtB,mBAAmB,kBAAAA,QAAU;AAAA,EAI7B,YAAY,kBAAAA,QAAU;AACxB;AAGA,IAAO,2BAAQ;",
|
|
6
6
|
"names": ["PropTypes"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/ComboBoxFreeSolo/components/MultiValueLabel.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\n\nconst RemovablePillWrapper = styled.div`\n display: flex;\n align-items: center;\n outline: none;\n height: ${(props) => props.theme.space.xs};\n max-width: 90%;\n margin: 0;\n padding: 0 4px;\n background-color: ${(props) => props.theme.colors.brand[200]};\n border-top-left-radius: ${(props) => props.theme.fontSizes.value[600]};\n border-bottom-left-radius: ${(props) => props.theme.fontSizes.value[600]};\n & + div {\n border-top-right-radius: ${(props) => props.theme.fontSizes.value[600]};\n border-bottom-right-radius: ${(props) => props.theme.fontSizes.value[600]};\n }\n`;\n\nconst PillLabel = styled.span`\n margin: 0 4px;\n color: ${(props) => props.theme.colors.neutral[800]};\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n`;\n\nconst RemovablePill = ({ label, clear }) => (\n <>\n <RemovablePillWrapper data-testid=\"pill-wrapper\">\n <PillLabel>{label}</PillLabel>\n </RemovablePillWrapper>\n {clear}\n </>\n);\n\nconst MultiValueLabel = ({ children, clear }) =>
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8BrB;AA5BF,uBAAuB;AAEvB,MAAM,uBAAuB,wBAAO;AAAA;AAAA;AAAA;AAAA,YAIxB,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA,sBAInB,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA,4BAC9B,CAAC,UAAU,MAAM,MAAM,UAAU,MAAM;AAAA,+BACpC,CAAC,UAAU,MAAM,MAAM,UAAU,MAAM;AAAA;AAAA,+BAEvC,CAAC,UAAU,MAAM,MAAM,UAAU,MAAM;AAAA,kCACpC,CAAC,UAAU,MAAM,MAAM,UAAU,MAAM;AAAA;AAAA;AAIzE,MAAM,YAAY,wBAAO;AAAA;AAAA,WAEd,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAMjD,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAAM,MACpC;AAAA,EACE;AAAA,gDAAC;AAAA,MAAqB,eAAY;AAAA,MAChC,sDAAC;AAAA,QAAW;AAAA,OAAM;AAAA,KACpB;AAAA,IACC;AAAA;AAAA,CACH;AAGF,MAAM,kBAAkB,CAAC,EAAE,UAAU,MAAM,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\n\nconst RemovablePillWrapper = styled.div`\n display: flex;\n align-items: center;\n outline: none;\n height: ${(props) => props.theme.space.xs};\n max-width: 90%;\n margin: 0;\n padding: 0 4px;\n background-color: ${(props) => props.theme.colors.brand[200]};\n border-top-left-radius: ${(props) => props.theme.fontSizes.value[600]};\n border-bottom-left-radius: ${(props) => props.theme.fontSizes.value[600]};\n & + div {\n border-top-right-radius: ${(props) => props.theme.fontSizes.value[600]};\n border-bottom-right-radius: ${(props) => props.theme.fontSizes.value[600]};\n }\n`;\n\nconst PillLabel = styled.span`\n margin: 0 4px;\n color: ${(props) => props.theme.colors.neutral[800]};\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n`;\n\nconst RemovablePill = ({ label, clear }) => (\n <>\n <RemovablePillWrapper data-testid=\"pill-wrapper\">\n <PillLabel>{label}</PillLabel>\n </RemovablePillWrapper>\n {clear}\n </>\n);\n\nconst MultiValueLabel = ({ children, clear }) => <RemovablePill label={children} clear={clear} />;\n\nexport { MultiValueLabel };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8BrB;AA5BF,uBAAuB;AAEvB,MAAM,uBAAuB,wBAAO;AAAA;AAAA;AAAA;AAAA,YAIxB,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA,sBAInB,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA,4BAC9B,CAAC,UAAU,MAAM,MAAM,UAAU,MAAM;AAAA,+BACpC,CAAC,UAAU,MAAM,MAAM,UAAU,MAAM;AAAA;AAAA,+BAEvC,CAAC,UAAU,MAAM,MAAM,UAAU,MAAM;AAAA,kCACpC,CAAC,UAAU,MAAM,MAAM,UAAU,MAAM;AAAA;AAAA;AAIzE,MAAM,YAAY,wBAAO;AAAA;AAAA,WAEd,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAMjD,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAAM,MACpC;AAAA,EACE;AAAA,gDAAC;AAAA,MAAqB,eAAY;AAAA,MAChC,sDAAC;AAAA,QAAW;AAAA,OAAM;AAAA,KACpB;AAAA,IACC;AAAA;AAAA,CACH;AAGF,MAAM,kBAAkB,CAAC,EAAE,UAAU,MAAM,MAAM,4CAAC;AAAA,EAAc,OAAO;AAAA,EAAU;AAAA,CAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/ComboBoxFreeSolo/components/SingleValue.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { SingleValueRemove } from './SingleValueRemove';\nimport { MultiValueLabel } from './MultiValueLabel';\n\nconst SingleValue = (props) => {\n // eslint-disable-next-line react/prop-types\n const { children } = props;\n return
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { SingleValueRemove } from './SingleValueRemove';\nimport { MultiValueLabel } from './MultiValueLabel';\n\nconst SingleValue = (props) => {\n // eslint-disable-next-line react/prop-types\n const { children } = props;\n return <MultiValueLabel clear={<SingleValueRemove {...props} />}>{children}</MultiValueLabel>;\n};\n\nexport { SingleValue };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADOU;AANjC,+BAAkC;AAClC,6BAAgC;AAEhC,MAAM,cAAc,CAAC,UAAU;AAE7B,QAAM,EAAE,SAAS,IAAI;AACrB,SAAO,4CAAC;AAAA,IAAgB,OAAO,4CAAC;AAAA,MAAmB,GAAG;AAAA,KAAO;AAAA,IAAK;AAAA,GAAS;AAC7E;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -30,44 +30,23 @@ module.exports = __toCommonJS(props_exports);
|
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
31
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
32
32
|
const props = {
|
|
33
|
-
containerProps: import_ds_utilities.PropTypes.object.description(
|
|
34
|
-
|
|
33
|
+
containerProps: import_ds_utilities.PropTypes.object.description("props injected to date input wrapper node"),
|
|
34
|
+
innerRef: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.func, import_ds_utilities.PropTypes.shape({ current: import_ds_utilities.PropTypes.any })]).description(
|
|
35
|
+
"inner ref for input wrapper"
|
|
35
36
|
),
|
|
36
|
-
innerRef: import_ds_utilities.PropTypes.oneOfType([
|
|
37
|
-
import_ds_utilities.PropTypes.func,
|
|
38
|
-
import_ds_utilities.PropTypes.shape({ current: import_ds_utilities.PropTypes.any })
|
|
39
|
-
]).description("inner ref for input wrapper"),
|
|
40
37
|
className: import_ds_utilities.PropTypes.string.description("class for input"),
|
|
41
38
|
style: import_ds_utilities.PropTypes.object.description("Set style for the date input"),
|
|
42
|
-
onBlur: import_ds_utilities.PropTypes.func.description(
|
|
43
|
-
|
|
44
|
-
),
|
|
45
|
-
onFocus: import_ds_utilities.PropTypes.func.description(
|
|
46
|
-
"Triggers the onFocus when the component gets the focus"
|
|
47
|
-
),
|
|
39
|
+
onBlur: import_ds_utilities.PropTypes.func.description("Triggers the onBlur when focus moves out of date input"),
|
|
40
|
+
onFocus: import_ds_utilities.PropTypes.func.description("Triggers the onFocus when the component gets the focus"),
|
|
48
41
|
onClear: import_ds_utilities.PropTypes.func.description("Triggers the onClear"),
|
|
49
42
|
onKeyDown: import_ds_utilities.PropTypes.func.description("Triggers the onKeyDown"),
|
|
50
|
-
onChange: import_ds_utilities.PropTypes.func.description(
|
|
51
|
-
|
|
52
|
-
),
|
|
53
|
-
onError: import_ds_utilities.PropTypes.func.description(
|
|
54
|
-
"Triggers the onError once one input date is wrong"
|
|
55
|
-
),
|
|
43
|
+
onChange: import_ds_utilities.PropTypes.func.description("Allows a function that is triggered once the date input changes"),
|
|
44
|
+
onError: import_ds_utilities.PropTypes.func.description("Triggers the onError once one input date is wrong"),
|
|
56
45
|
format: import_ds_utilities.PropTypes.string.description("Format type for date input"),
|
|
57
|
-
value: import_ds_utilities.PropTypes.string.description(
|
|
58
|
-
|
|
59
|
-
),
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
),
|
|
63
|
-
disabled: import_ds_utilities.PropTypes.bool.description(
|
|
64
|
-
"Whether the date input is disabled or not"
|
|
65
|
-
),
|
|
66
|
-
yearMaxRange: import_ds_utilities.PropTypes.number.description(
|
|
67
|
-
"Max year that can be accepted by the date input"
|
|
68
|
-
),
|
|
69
|
-
yearMinRange: import_ds_utilities.PropTypes.number.description(
|
|
70
|
-
"Min year that can be accepted by the date input"
|
|
71
|
-
)
|
|
46
|
+
value: import_ds_utilities.PropTypes.string.description("Default value once the component is initialized"),
|
|
47
|
+
clearable: import_ds_utilities.PropTypes.bool.description("Whether the date input is clearable or not"),
|
|
48
|
+
disabled: import_ds_utilities.PropTypes.bool.description("Whether the date input is disabled or not"),
|
|
49
|
+
yearMaxRange: import_ds_utilities.PropTypes.number.description("Max year that can be accepted by the date input"),
|
|
50
|
+
yearMinRange: import_ds_utilities.PropTypes.number.description("Min year that can be accepted by the date input")
|
|
72
51
|
};
|
|
73
52
|
//# sourceMappingURL=props.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/DateInput/props.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-utilities';\n\nexport const props = {\n /** props injected to date input wrapper node */\n containerProps: PropTypes.object.description(
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA0B;AAEnB,MAAM,QAAQ;AAAA,EAEnB,gBAAgB,8BAAU,OAAO
|
|
4
|
+
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-utilities';\n\nexport const props = {\n /** props injected to date input wrapper node */\n containerProps: PropTypes.object.description('props injected to date input wrapper node'),\n /** inner ref for input wrapper */\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'inner ref for input wrapper',\n ),\n /** class for input */\n className: PropTypes.string.description('class for input'),\n /**\n * Set style for the date input\n */\n style: PropTypes.object.description('Set style for the date input'),\n /**\n * Triggers the onBlur when focus moves out of date input\n */\n onBlur: PropTypes.func.description('Triggers the onBlur when focus moves out of date input'),\n /**\n * Triggers the onFocus when the component gets the focus\n */\n onFocus: PropTypes.func.description('Triggers the onFocus when the component gets the focus'),\n /**\n * Triggers the onClear\n */\n onClear: PropTypes.func.description('Triggers the onClear'),\n /**\n * Triggers the onKeyDown\n */\n onKeyDown: PropTypes.func.description('Triggers the onKeyDown'),\n /**\n * Allows a function that is triggered once the date input changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the date input changes'),\n /**\n * Triggers the onError once one input date is wrong\n */\n onError: PropTypes.func.description('Triggers the onError once one input date is wrong'),\n /**\n * Format type for date input\n */\n format: PropTypes.string.description('Format type for date input'),\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 date input is clearable or not\n */\n clearable: PropTypes.bool.description('Whether the date input is clearable or not'),\n /**\n * Whether the date input is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the date input is disabled or not'),\n /**\n * Max year that can be accepted by the date input\n */\n yearMaxRange: PropTypes.number.description('Max year that can be accepted by the date input'),\n /**\n * Min year that can be accepted by the date input\n */\n yearMinRange: PropTypes.number.description('Min year that can be accepted by the date input'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA0B;AAEnB,MAAM,QAAQ;AAAA,EAEnB,gBAAgB,8BAAU,OAAO,YAAY,2CAA2C;AAAA,EAExF,UAAU,8BAAU,UAAU,CAAC,8BAAU,MAAM,8BAAU,MAAM,EAAE,SAAS,8BAAU,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IAC3F;AAAA,EACF;AAAA,EAEA,WAAW,8BAAU,OAAO,YAAY,iBAAiB;AAAA,EAIzD,OAAO,8BAAU,OAAO,YAAY,8BAA8B;AAAA,EAIlE,QAAQ,8BAAU,KAAK,YAAY,wDAAwD;AAAA,EAI3F,SAAS,8BAAU,KAAK,YAAY,wDAAwD;AAAA,EAI5F,SAAS,8BAAU,KAAK,YAAY,sBAAsB;AAAA,EAI1D,WAAW,8BAAU,KAAK,YAAY,wBAAwB;AAAA,EAI9D,UAAU,8BAAU,KAAK,YAAY,iEAAiE;AAAA,EAItG,SAAS,8BAAU,KAAK,YAAY,mDAAmD;AAAA,EAIvF,QAAQ,8BAAU,OAAO,YAAY,4BAA4B;AAAA,EAIjE,OAAO,8BAAU,OAAO,YAAY,iDAAiD;AAAA,EAIrF,WAAW,8BAAU,KAAK,YAAY,4CAA4C;AAAA,EAIlF,UAAU,8BAAU,KAAK,YAAY,2CAA2C;AAAA,EAIhF,cAAc,8BAAU,OAAO,YAAY,iDAAiD;AAAA,EAI5F,cAAc,8BAAU,OAAO,YAAY,iDAAiD;AAC9F;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/DateInputV2/components/helpers.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { cloneDeep } from 'lodash';\nimport { focusNextInput, focusPreviousInput } from './utils';\n\nconst callChange = (event, handlers, isArrowChange) => {\n if (event.target.name === 'day') handlers.onDayChange(event, isArrowChange);\n if (event.target.name === 'month')
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAA0B;AAC1B,mBAAmD;AAEnD,MAAM,aAAa,CAAC,OAAO,UAAU,kBAAkB;AACrD,MAAI,MAAM,OAAO,SAAS;AAAO,aAAS,YAAY,OAAO,aAAa;AAC1E,MAAI,MAAM,OAAO,SAAS;
|
|
4
|
+
"sourcesContent": ["import { cloneDeep } from 'lodash';\nimport { focusNextInput, focusPreviousInput } from './utils';\n\nconst callChange = (event, handlers, isArrowChange) => {\n if (event.target.name === 'day') handlers.onDayChange(event, isArrowChange);\n if (event.target.name === 'month') handlers.onMonthChange(event, isArrowChange);\n if (event.target.name === 'year') handlers.onYearChange(event, isArrowChange);\n};\n\nconst setTarget = (event, v) => {\n const n = cloneDeep(event);\n let newValue = parseInt(n.target.value || 0, 10) + v;\n if (newValue < 1) newValue = '01';\n if (event.target.name === 'day' && newValue > 31) newValue = 31;\n if (event.target.name === 'month' && newValue > 12) newValue = 12;\n n.target.value = newValue;\n return n;\n};\n\n// eslint-disable-next-line max-statements, complexity\nexport const onKeyDownHelper = (event, handlers) => {\n switch (event.key) {\n case 'ArrowLeft': {\n event.preventDefault();\n focusPreviousInput(event.target);\n break;\n }\n case 'ArrowUp': {\n event.preventDefault();\n const n = setTarget(event, 1);\n callChange(n, handlers, true);\n break;\n }\n case 'ArrowDown': {\n event.preventDefault();\n const n = setTarget(event, -1);\n callChange(n, handlers, true);\n break;\n }\n case 'ArrowRight': {\n event.preventDefault();\n focusNextInput(event.target);\n break;\n }\n case 'Tab': {\n if (event.shiftKey) break;\n if (event.target.value.length > 0 && event.target.name !== 'year') event.preventDefault();\n callChange(event, handlers);\n break;\n }\n case 'Backspace': {\n // HTML Date input behavior, clear everything when deleting\n event.preventDefault();\n const n = cloneDeep(event);\n n.target.value = '';\n callChange(n, handlers, true);\n break;\n }\n case 'Enter': {\n break;\n }\n default:\n break;\n }\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;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,eAAe;AACxF,iBAAW,OAAO,QAAQ;AAC1B;AAAA,IACF;AAAA,IACA,KAAK,aAAa;AAEhB,YAAM,eAAe;AACrB,YAAM,QAAI,yBAAU,KAAK;AACzB,QAAE,OAAO,QAAQ;AACjB,iBAAW,GAAG,UAAU,IAAI;AAC5B;AAAA,IACF;AAAA,IACA,KAAK,SAAS;AACZ;AAAA,IACF;AAAA,IACA;AACE;AAAA,EACJ;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -32,35 +32,18 @@ var React = __toESM(require("react"));
|
|
|
32
32
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
33
33
|
var import_lodash = require("lodash");
|
|
34
34
|
const props = {
|
|
35
|
-
containerProps: import_ds_utilities.PropTypes.object.description(
|
|
36
|
-
|
|
37
|
-
),
|
|
38
|
-
onBlur: import_ds_utilities.PropTypes.func.description(
|
|
39
|
-
"Triggers the onBlur when focus moves out of date input"
|
|
40
|
-
),
|
|
41
|
-
onFocus: import_ds_utilities.PropTypes.func.description(
|
|
42
|
-
"Triggers the onFocus when the component gets the focus"
|
|
43
|
-
),
|
|
35
|
+
containerProps: import_ds_utilities.PropTypes.object.description("Props to inject to date input wrapper"),
|
|
36
|
+
onBlur: import_ds_utilities.PropTypes.func.description("Triggers the onBlur when focus moves out of date input"),
|
|
37
|
+
onFocus: import_ds_utilities.PropTypes.func.description("Triggers the onFocus when the component gets the focus"),
|
|
44
38
|
onKeyDown: import_ds_utilities.PropTypes.func.description("Triggers the onKeyDown"),
|
|
45
|
-
onChange: import_ds_utilities.PropTypes.func.description(
|
|
46
|
-
"Allows a function that is triggered once the date input changes"
|
|
47
|
-
),
|
|
39
|
+
onChange: import_ds_utilities.PropTypes.func.description("Allows a function that is triggered once the date input changes"),
|
|
48
40
|
onDateChange: import_ds_utilities.PropTypes.func.description(
|
|
49
41
|
" Triggers when the date is completely set and only once you have blurred the corresponding input. For example if you are editing the day and the year and month are already set, once you completely set the day it will trigger."
|
|
50
42
|
),
|
|
51
|
-
onError: import_ds_utilities.PropTypes.func.description(
|
|
52
|
-
|
|
53
|
-
),
|
|
54
|
-
|
|
55
|
-
"Default value once the component is initialized MMDDYYYY"
|
|
56
|
-
),
|
|
57
|
-
disabled: import_ds_utilities.PropTypes.bool.description(
|
|
58
|
-
"Whether the date input is disabled or not"
|
|
59
|
-
),
|
|
60
|
-
tabIndex: import_ds_utilities.PropTypes.oneOfType([
|
|
61
|
-
import_ds_utilities.PropTypes.number,
|
|
62
|
-
import_ds_utilities.PropTypes.string
|
|
63
|
-
]).description("tab index")
|
|
43
|
+
onError: import_ds_utilities.PropTypes.func.description("Triggers the onError once one input date is wrong"),
|
|
44
|
+
value: import_ds_utilities.PropTypes.string.description("Default value once the component is initialized MMDDYYYY"),
|
|
45
|
+
disabled: import_ds_utilities.PropTypes.bool.description("Whether the date input is disabled or not"),
|
|
46
|
+
tabIndex: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.number, import_ds_utilities.PropTypes.string]).description("tab index")
|
|
64
47
|
};
|
|
65
48
|
const defaultProps = {
|
|
66
49
|
onFocus: import_lodash.noop,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/DateInputV2/components/props.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-utilities';\nimport { noop } from 'lodash';\n\nexport const props = {\n /** Props to inject to date input wrapper */\n containerProps: PropTypes.object.description(
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA0B;AAC1B,oBAAqB;AAEd,MAAM,QAAQ;AAAA,EAEnB,gBAAgB,8BAAU,OAAO
|
|
4
|
+
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-utilities';\nimport { noop } from 'lodash';\n\nexport const props = {\n /** Props to inject to date input wrapper */\n containerProps: PropTypes.object.description('Props to inject to date input wrapper'),\n /**\n * Triggers the onBlur when focus moves out of date input\n */\n onBlur: PropTypes.func.description('Triggers the onBlur when focus moves out of date input'),\n /**\n * Triggers the onFocus when the component gets the focus\n */\n onFocus: PropTypes.func.description('Triggers the onFocus when the component gets the focus'),\n /**\n * Triggers the onKeyDown\n */\n onKeyDown: PropTypes.func.description('Triggers the onKeyDown'),\n /**\n * Allows a function that is triggered once the date input changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the date input changes'),\n /**\n * Triggers when the date is completely set and only once you have blurred the\n * corresponding input. For example if you are editing the day and the year and month\n * are already set, once you completely set the day it will trigger.\n */\n onDateChange: PropTypes.func.description(\n ' Triggers when the date is completely set and only once you have blurred the corresponding input. For example if you are editing the day and the year and month are already set, once you completely set the day it will trigger.',\n ),\n /**\n * Triggers the onError once one input date is wrong\n */\n onError: PropTypes.func.description('Triggers the onError once one input date is wrong'),\n /**\n * Default value once the component is initialized MMDDYYYY\n */\n value: PropTypes.string.description('Default value once the component is initialized MMDDYYYY'),\n /**\n * Whether the date input is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the date input is disabled or not'),\n /**\n * tab index\n */\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('tab index'),\n};\n\nexport const defaultProps = {\n onFocus: noop,\n onBlur: noop,\n onChange: noop,\n onDateChange: noop,\n onKeyDown: noop,\n onError: noop,\n value: '',\n disabled: false,\n containerProps: {},\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA0B;AAC1B,oBAAqB;AAEd,MAAM,QAAQ;AAAA,EAEnB,gBAAgB,8BAAU,OAAO,YAAY,uCAAuC;AAAA,EAIpF,QAAQ,8BAAU,KAAK,YAAY,wDAAwD;AAAA,EAI3F,SAAS,8BAAU,KAAK,YAAY,wDAAwD;AAAA,EAI5F,WAAW,8BAAU,KAAK,YAAY,wBAAwB;AAAA,EAI9D,UAAU,8BAAU,KAAK,YAAY,iEAAiE;AAAA,EAMtG,cAAc,8BAAU,KAAK;AAAA,IAC3B;AAAA,EACF;AAAA,EAIA,SAAS,8BAAU,KAAK,YAAY,mDAAmD;AAAA,EAIvF,OAAO,8BAAU,OAAO,YAAY,0DAA0D;AAAA,EAI9F,UAAU,8BAAU,KAAK,YAAY,2CAA2C;AAAA,EAIhF,UAAU,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,EAAE,YAAY,WAAW;AAC7F;AAEO,MAAM,eAAe;AAAA,EAC1B,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,cAAc;AAAA,EACd,WAAW;AAAA,EACX,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AAAA,EACV,gBAAgB,CAAC;AACnB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -30,10 +30,7 @@ module.exports = __toCommonJS(propsTypes_exports);
|
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
31
|
var import_prop_types = __toESM(require("prop-types"));
|
|
32
32
|
const DateInputsPropTypes = {
|
|
33
|
-
innerRef: import_prop_types.default.oneOfType([
|
|
34
|
-
import_prop_types.default.func,
|
|
35
|
-
import_prop_types.default.shape({ current: import_prop_types.default.any })
|
|
36
|
-
]),
|
|
33
|
+
innerRef: import_prop_types.default.oneOfType([import_prop_types.default.func, import_prop_types.default.shape({ current: import_prop_types.default.any })]),
|
|
37
34
|
onBlur: import_prop_types.default.func,
|
|
38
35
|
onChange: import_prop_types.default.func,
|
|
39
36
|
onDateChange: import_prop_types.default.func,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/DateInputV2/components/propsTypes.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import PropTypes from 'prop-types';\n\nexport const DateInputsPropTypes = {\n innerRef: PropTypes.oneOfType([
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAsB;AAEf,MAAM,sBAAsB;AAAA,EACjC,UAAU,kBAAAA,QAAU,UAAU
|
|
4
|
+
"sourcesContent": ["import PropTypes from 'prop-types';\n\nexport const DateInputsPropTypes = {\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]),\n onBlur: PropTypes.func,\n onChange: PropTypes.func,\n onDateChange: PropTypes.func,\n onCustomKeyDown: PropTypes.func,\n onError: PropTypes.func,\n format: PropTypes.string,\n showMonth: PropTypes.bool,\n showDay: PropTypes.bool,\n showYear: PropTypes.bool,\n step: PropTypes.number,\n yearMaxRange: PropTypes.number,\n disabled: PropTypes.bool,\n yearMinRange: PropTypes.number,\n time: PropTypes.string,\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAsB;AAEf,MAAM,sBAAsB;AAAA,EACjC,UAAU,kBAAAA,QAAU,UAAU,CAAC,kBAAAA,QAAU,MAAM,kBAAAA,QAAU,MAAM,EAAE,SAAS,kBAAAA,QAAU,IAAI,CAAC,CAAC,CAAC;AAAA,EAC3F,QAAQ,kBAAAA,QAAU;AAAA,EAClB,UAAU,kBAAAA,QAAU;AAAA,EACpB,cAAc,kBAAAA,QAAU;AAAA,EACxB,iBAAiB,kBAAAA,QAAU;AAAA,EAC3B,SAAS,kBAAAA,QAAU;AAAA,EACnB,QAAQ,kBAAAA,QAAU;AAAA,EAClB,WAAW,kBAAAA,QAAU;AAAA,EACrB,SAAS,kBAAAA,QAAU;AAAA,EACnB,UAAU,kBAAAA,QAAU;AAAA,EACpB,MAAM,kBAAAA,QAAU;AAAA,EAChB,cAAc,kBAAAA,QAAU;AAAA,EACxB,UAAU,kBAAAA,QAAU;AAAA,EACpB,cAAc,kBAAAA,QAAU;AAAA,EACxB,MAAM,kBAAAA,QAAU;AAAA,EAChB,UAAU,kBAAAA,QAAU,UAAU,CAAC,kBAAAA,QAAU,QAAQ,kBAAAA,QAAU,MAAM,CAAC;AACpE;",
|
|
6
6
|
"names": ["PropTypes"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/DateInputV2/components/styled.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\n\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,qBAAqB;
|
|
4
|
+
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\n\nexport const DateInputFluidContainer = styled(Grid)`\n width: 100%;\n height: 100%;\n align-items: center;\n`;\n\nexport const DateInputWrapper = styled(Grid)`\n align-items: center;\n align-content: center;\n ${({ disabled, theme }) =>\n disabled\n ? `\n background: ${theme.colors.neutral[100]};\n color: ${theme.colors.neutral[500]};\n `\n : ''}\n width: 102px;\n\n &:focus {\n outline-style: none;\n box-shadow: none;\n border-color: transparent;\n }\n`;\n\nexport const DateInputInput = styled.input`\n outline: none;\n border: none;\n border-radius: 0;\n width: ${(props) => (props.size === 'l' ? '38px' : '25px')};\n height: ${(props) => props.theme.space.xs};\n ${({ disabled, theme }) =>\n disabled\n ? `\n background: ${theme.colors.neutral[100]};\n color: ${theme.colors.neutral[500]};\n `\n : ''}\n padding-left: 4px;\n padding-right: 0px;\n &::placeholder {\n font-size: 95%;\n font-style: italic;\n }\n :-moz-placeholder {\n font-size: 95%;\n font-style: italic;\n }\n\n ::-moz-placeholder {\n font-size: 95%;\n font-style: italic;\n }\n &:focus {\n background: ${({ theme }) => theme.colors.brand['300']};\n background-clip: content-box;\n }\n ::-moz-selection {\n background: transparent;\n }\n ::selection {\n background: transparent;\n }\n`;\n\nexport const DateInputDivider = styled.div`\n padding: 1px;\n text-align: center;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,qBAAqB;AAEd,MAAM,8BAA0B,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAAA;AAM3C,MAAM,uBAAmB,yBAAO,mBAAI;AAAA;AAAA;AAAA,IAGvC,CAAC,EAAE,UAAU,MAAM,MACnB,WACI;AAAA,kBACU,MAAM,OAAO,QAAQ;AAAA,aAC1B,MAAM,OAAO,QAAQ;AAAA,QAE1B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUD,MAAM,iBAAiB,wBAAO;AAAA;AAAA;AAAA;AAAA,WAI1B,CAAC,UAAW,MAAM,SAAS,MAAM,SAAS;AAAA,YACzC,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,IACrC,CAAC,EAAE,UAAU,MAAM,MACnB,WACI;AAAA,gBACQ,MAAM,OAAO,QAAQ;AAAA,WAC1B,MAAM,OAAO,QAAQ;AAAA,MAExB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAiBU,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAW7C,MAAM,mBAAmB,wBAAO;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -80,10 +80,7 @@ const setNativeValue = (element, value) => {
|
|
|
80
80
|
return;
|
|
81
81
|
const valueSetter = Object.getOwnPropertyDescriptor(element, "value").set;
|
|
82
82
|
const prototype = Object.getPrototypeOf(element);
|
|
83
|
-
const prototypeValueSetter = Object.getOwnPropertyDescriptor(
|
|
84
|
-
prototype,
|
|
85
|
-
"value"
|
|
86
|
-
).set;
|
|
83
|
+
const prototypeValueSetter = Object.getOwnPropertyDescriptor(prototype, "value").set;
|
|
87
84
|
if (valueSetter && valueSetter !== prototypeValueSetter) {
|
|
88
85
|
prototypeValueSetter.call(element, value);
|
|
89
86
|
} else {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/DateInputV2/components/utils.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-params */\n/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport { addLeadingZeros } from '@elliemae/ds-utilities';\nimport { parseInt, isNaN } from '@elliemae/ds-utilities';\nimport moment from 'moment';\n\nconst currentYear = new Date().getFullYear();\n\nconst getNextSibling = (elem, selector) => {\n // Get the next sibling element\n let sibling = elem.nextElementSibling;\n // If there's no selector, return the first sibling\n if (!selector) return sibling;\n\n // If the sibling matches our selector, use it\n // If not, jump to the next sibling and continue the loop\n while (sibling) {\n if (sibling.matches(selector)) return sibling;\n sibling = sibling.nextElementSibling;\n }\n return sibling;\n};\n\nconst getPreviousSibling = (elem, selector) => {\n let sibling = elem.previousElementSibling;\n if (!selector) return sibling;\n while (sibling) {\n if (sibling.matches(selector)) return sibling;\n sibling = sibling.previousElementSibling;\n }\n return sibling;\n};\n\nexport const isArrowIncrementDecrement = (key)
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,0BAAgC;AAChC,IAAAA,uBAAgC;AAChC,oBAAmB;AAEnB,MAAM,cAAc,IAAI,KAAK,EAAE,YAAY;AAE3C,MAAM,iBAAiB,CAAC,MAAM,aAAa;AAEzC,MAAI,UAAU,KAAK;AAEnB,MAAI,CAAC;AAAU,WAAO;AAItB,SAAO,SAAS;AACd,QAAI,QAAQ,QAAQ,QAAQ;AAAG,aAAO;AACtC,cAAU,QAAQ;AAAA,EACpB;AACA,SAAO;AACT;AAEA,MAAM,qBAAqB,CAAC,MAAM,aAAa;AAC7C,MAAI,UAAU,KAAK;AACnB,MAAI,CAAC;AAAU,WAAO;AACtB,SAAO,SAAS;AACd,QAAI,QAAQ,QAAQ,QAAQ;AAAG,aAAO;AACtC,cAAU,QAAQ;AAAA,EACpB;AACA,SAAO;AACT;AAEO,MAAM,4BAA4B,CAAC,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-params */\n/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport { addLeadingZeros } from '@elliemae/ds-utilities';\nimport { parseInt, isNaN } from '@elliemae/ds-utilities';\nimport moment from 'moment';\n\nconst currentYear = new Date().getFullYear();\n\nconst getNextSibling = (elem, selector) => {\n // Get the next sibling element\n let sibling = elem.nextElementSibling;\n // If there's no selector, return the first sibling\n if (!selector) return sibling;\n\n // If the sibling matches our selector, use it\n // If not, jump to the next sibling and continue the loop\n while (sibling) {\n if (sibling.matches(selector)) return sibling;\n sibling = sibling.nextElementSibling;\n }\n return sibling;\n};\n\nconst getPreviousSibling = (elem, selector) => {\n let sibling = elem.previousElementSibling;\n if (!selector) return sibling;\n while (sibling) {\n if (sibling.matches(selector)) return sibling;\n sibling = sibling.previousElementSibling;\n }\n return sibling;\n};\n\nexport const isArrowIncrementDecrement = (key) => key === 'ArrowDown' || key === 'ArrowUp';\n\n// TODO remove and keep `true` behavior ( PUI-4141 )\nexport const setNativeValue = (element, value) => {\n if (!Object.getOwnPropertyDescriptor(element, 'value')) return;\n const valueSetter = Object.getOwnPropertyDescriptor(element, 'value').set;\n const prototype = Object.getPrototypeOf(element);\n const prototypeValueSetter = Object.getOwnPropertyDescriptor(prototype, 'value').set;\n\n if (valueSetter && valueSetter !== prototypeValueSetter) {\n prototypeValueSetter.call(element, value);\n } else {\n valueSetter.call(element, value);\n }\n element.dispatchEvent(new Event('input', { bubbles: true }));\n};\n\nconst formatTimeNumber = (value, shouldAddLeadingZeros, leadingZeros) => {\n if (value === null || value === undefined) return '';\n return shouldAddLeadingZeros ? addLeadingZeros(leadingZeros)(value) : String(value);\n};\n\nexport const getFormattedDay = (value) => {\n const v = value.length > 2 ? value.slice(-2) : value;\n const parsedValue = parseInt(v, 10);\n\n if (parsedValue > 31) return '31';\n return formatTimeNumber(parseTimeNumberFromText(v), true, 2);\n};\n\nexport const getShouldShortcircuitDay = (value) => {\n const v = value.length > 2 ? value.slice(-2) : value;\n const parsedValue = parseInt(v, 10);\n if (parsedValue > 31) return true;\n // if the first input is in range 4-9 then there is no other option\n // so we auto advance\n if (parsedValue > 3 && parsedValue < 10) return true;\n return false;\n};\n\nexport const getFormattedYear = (value) => {\n const v = value.length > 4 ? value.slice(-4) : value;\n if (parseInt(v) > 9999) return '9999';\n return formatTimeNumber(parseTimeNumberFromText(v), true, 4);\n};\n\nexport const getFormattedMonth = (value) => {\n const v = value.length > 2 ? value.slice(-2) : value;\n const parsedValue = parseInt(v, 10);\n if (parsedValue > 12) return '12';\n return formatTimeNumber(parseTimeNumberFromText(v), true, 2);\n};\n\nexport const getShouldShortcircuitMonth = (value) => {\n const v = value.length > 2 ? value.slice(-2) : value;\n const parsedValue = parseInt(v, 10);\n if (parsedValue > 12) return true;\n // if the first input is in range 2-9 then there is no other option\n // so we auto advance\n if (parsedValue > 1 && parsedValue < 10) return true;\n return false;\n};\n\nexport const parseTimeNumberFromText = (stringValue) => {\n const parsedInt = parseInt(stringValue);\n\n if (isNaN(parsedInt)) return null;\n\n return parsedInt;\n};\n\n// trigger onBlur for entire DateInput control if focus is not in day, month, year\nexport const triggerOnBlur = (blurEvent, onBlur = () => {}) => {\n const { target: currentEl = {}, relatedTarget } = blurEvent || {};\n const nextElement = currentEl.nextElementSibling;\n const { nextElementSibling } = nextElement || {};\n // relatedTarget points to the element that is currently having focus\n if (!nextElementSibling || nextElementSibling !== relatedTarget) {\n onBlur(blurEvent);\n }\n};\n\nexport const focusNextInput = (currentEl) => {\n getNextSibling(currentEl, 'input')?.focus();\n};\n\nexport const focusPreviousInput = (currentEl) => {\n getPreviousSibling(currentEl, 'input')?.focus();\n};\n\nexport const getValidTimeNumber = ({ min, max }, number, valueString = '', onError = () => null) => {\n if (valueString === '0' || number === 0) return null;\n if (number === undefined || number === null) return null;\n if (number > max) {\n onError();\n return max;\n }\n if (number < min) {\n onError();\n return min;\n }\n return number;\n};\n\nexport const shouldFocusNextInput = (max, number = 0, stringValue) => {\n if (stringValue.length > 1) return true;\n return number * 10 > max;\n};\n\nexport const getDateValuesFromTime = (time, format) => {\n if (!time || !time.format) return {};\n const month = time.format('MM');\n const day = time.format('DD');\n const year = time.format('YYYY');\n return {\n month: getFormattedMonth(format, month),\n day: getFormattedDay(format, day),\n year: getFormattedYear(format, year),\n };\n};\n\nexport const resetTimeValues = () => ({\n month: '',\n day: '',\n year: '',\n});\n\nexport const onInputFocus = (e) => {\n e.preventDefault();\n e.stopPropagation();\n // we select the whole value to be able to override the value on first key\n // we don't use selection color to be consistent with the highlight of the input\n e.target.select();\n};\n\nexport const getNextTimeValue = (value, target, yearMinRange, yearMaxRange, step = 1, incrementing = true) => {\n const parsedValue = parseTimeNumberFromText(value);\n let result = incrementing ? parsedValue + step : parsedValue - step;\n if (target === 'year') {\n if (result < yearMinRange) result = currentYear;\n if (result > yearMaxRange) result = currentYear;\n }\n return result;\n};\n\nexport const focusNextInputIfNeeded = (currentEl, max, number, stringValue, currentKey) => {\n if (shouldFocusNextInput(max, number, stringValue) && !isArrowIncrementDecrement(currentKey)) {\n focusNextInput(currentEl);\n }\n};\n\nexport const commonInputProps = (digits = 2, onKeyDown, placeholder) => {\n const props = {\n pattern: '[0-9]*',\n placeholder,\n type: 'text',\n onKeyDown,\n onFocus: onInputFocus,\n };\n if (digits === 4) props.placeholder = 'YYYY';\n return props;\n};\n\nexport const handleCompletedDate = (time, date, show, INTERNAL_V2_NO_MUTATION) => {\n // clone time to avoid mutation when INTERNAL_V2_NO_MUTATION is true\n const newDate = INTERNAL_V2_NO_MUTATION ? (time && moment(time)) || moment() : time || moment();\n\n const { year, month, day } = date;\n const { showYear, showMonth, showDay } = show;\n\n if (time && !year && !month && !day) return '';\n\n newDate.value = `${year}-${month}-${day}`;\n\n if (showMonth && month) newDate.month(parseInt(month - 1, 10));\n if (showDay && day) newDate.date(parseInt(day, 10));\n if (showYear && year) newDate.year(parseInt(year, 10));\n\n return newDate;\n};\n\nexport const isTimeCompletelySet = (date, show, range) => {\n let neededValues = [];\n const { year, month, day } = date;\n const { showYear, showMonth, showDay } = show;\n const { yearMinRange, yearMaxRange } = range;\n\n if (showMonth) neededValues = [...neededValues, month || null];\n if (showDay) neededValues = [...neededValues, day || null];\n if (showYear) neededValues = [...neededValues, year || null];\n\n const isValidYear = year < yearMaxRange && year > yearMinRange;\n\n return !neededValues.some((value) => !value) && isValidYear;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,0BAAgC;AAChC,IAAAA,uBAAgC;AAChC,oBAAmB;A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BAAsB,CAAC,MAAM,MAAM,UAAU;AACxD,MAAI,eAAe,CAAC;AACpB,QAAM,EAAE,MAAM,OAAO,IAAI,IAAI;AAC7B,QAAM,EAAE,UAAU,WAAW,QAAQ,IAAI;AACzC,QAAM,EAAE,cAAc,aAAa,IAAI;AAEvC,MAAI;AAAW,mBAAe,CAAC,GAAG,cAAc,SAAS,IAAI;AAC7D,MAAI;AAAS,mBAAe,CAAC,GAAG,cAAc,OAAO,IAAI;AACzD,MAAI;AAAU,mBAAe,CAAC,GAAG,cAAc,QAAQ,IAAI;AAE3D,QAAM,cAAc,OAAO,gBAAgB,OAAO;AAElD,SAAO,CAAC,aAAa,KAAK,CAAC,UAAU,CAAC,KAAK,KAAK;AAClD;",
|
|
6
6
|
"names": ["import_ds_utilities", "moment"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/FloatingLabelInput/getSvgPath.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable prefer-template,max-statements,no-nested-ternary */\nfunction getSvgPath({\n labelWidth = 50,\n width = 200,\n height = 35,\n radiusStyle,\n hasRightRadius = true,\n hasLeftRadius = true,\n}) {\n const notchWidth = labelWidth;\n const isRtl = false;\n\n const radius = parseFloat(radiusStyle);\n const cornerWidth = radius + 1.3;\n const leadingStrokeLength = 4;\n const paddedNotchWidth = notchWidth + 8;\n\n let extraSizeForH = 0;\n let extraSizeForLeftV = 0;\n let extraSizeForRightV = 0;\n let extraSizeForTopH = radius;\n\n if (!hasRightRadius) {\n extraSizeForH += radius;\n extraSizeForRightV = radius * 2;\n }\n if (!hasLeftRadius) {\n extraSizeForH += radius;\n extraSizeForLeftV = radius * 2;\n }\n\n if ((!hasLeftRadius && hasRightRadius) || (hasRightRadius && hasLeftRadius)) {\n extraSizeForTopH = 0;\n }\n\n const pathMiddle =\n '' +\n (hasRightRadius
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,SAAS,WAAW;AAAA,EAClB,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,SAAS;AAAA,EACT;AAAA,EACA,iBAAiB;AAAA,EACjB,gBAAgB;AAClB,GAAG;AACD,QAAM,aAAa;AACnB,QAAM,QAAQ;AAEd,QAAM,SAAS,WAAW,WAAW;AACrC,QAAM,cAAc,SAAS;AAC7B,QAAM,sBAAsB;AAC5B,QAAM,mBAAmB,aAAa;AAEtC,MAAI,gBAAgB;AACpB,MAAI,oBAAoB;AACxB,MAAI,qBAAqB;AACzB,MAAI,mBAAmB;AAEvB,MAAI,CAAC,gBAAgB;AACnB,qBAAiB;AACjB,yBAAqB,SAAS;AAAA,EAChC;AACA,MAAI,CAAC,eAAe;AAClB,qBAAiB;AACjB,wBAAoB,SAAS;AAAA,EAC/B;AAEA,MAAK,CAAC,iBAAiB,kBAAoB,kBAAkB,eAAgB;AAC3E,uBAAmB;AAAA,EACrB;AAEA,QAAM,cAEH,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable prefer-template,max-statements,no-nested-ternary */\nfunction getSvgPath({\n labelWidth = 50,\n width = 200,\n height = 35,\n radiusStyle,\n hasRightRadius = true,\n hasLeftRadius = true,\n}) {\n const notchWidth = labelWidth;\n const isRtl = false;\n\n const radius = parseFloat(radiusStyle);\n const cornerWidth = radius + 1.3;\n const leadingStrokeLength = 4;\n const paddedNotchWidth = notchWidth + 8;\n\n let extraSizeForH = 0;\n let extraSizeForLeftV = 0;\n let extraSizeForRightV = 0;\n let extraSizeForTopH = radius;\n\n if (!hasRightRadius) {\n extraSizeForH += radius;\n extraSizeForRightV = radius * 2;\n }\n if (!hasLeftRadius) {\n extraSizeForH += radius;\n extraSizeForLeftV = radius * 2;\n }\n\n if ((!hasLeftRadius && hasRightRadius) || (hasRightRadius && hasLeftRadius)) {\n extraSizeForTopH = 0;\n }\n\n const pathMiddle =\n '' +\n (hasRightRadius ? 'a' + radius + ',' + radius + ' 0 0 1 ' + radius + ',' + radius : '') +\n 'v' +\n (height - (2 * cornerWidth - (extraSizeForRightV + 1.5))) + // right vertical line\n (hasRightRadius ? 'a' + radius + ',' + radius + ' 0 0 1 ' + -radius + ',' + radius : '') +\n 'h' +\n (-width + 2 * cornerWidth - extraSizeForH) +\n (hasLeftRadius ? 'a' + radius + ',' + radius + ' 0 0 1 ' + -radius + ',' + -radius : '') +\n 'v' +\n (-height + (2 * cornerWidth - (extraSizeForLeftV + 1.5))) + // left vertical line\n (hasLeftRadius ? 'a' + radius + ',' + radius + ' 0 0 1 ' + radius + ',' + -radius : '');\n\n let path;\n if (!isRtl) {\n path =\n '' +\n 'M' +\n (cornerWidth + leadingStrokeLength + paddedNotchWidth) +\n ',' +\n 0.5 +\n 'h' +\n (width - 2 * cornerWidth - paddedNotchWidth - leadingStrokeLength + extraSizeForTopH) +\n pathMiddle +\n 'h' +\n leadingStrokeLength;\n } else {\n path =\n '' +\n 'M' +\n (width - cornerWidth - leadingStrokeLength) +\n ',' +\n 0.5 +\n 'h' +\n leadingStrokeLength +\n pathMiddle +\n 'h' +\n (width - 2 * cornerWidth - paddedNotchWidth - leadingStrokeLength);\n }\n return path;\n}\n\nexport { getSvgPath };\nexport default getSvgPath;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,SAAS,WAAW;AAAA,EAClB,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,SAAS;AAAA,EACT;AAAA,EACA,iBAAiB;AAAA,EACjB,gBAAgB;AAClB,GAAG;AACD,QAAM,aAAa;AACnB,QAAM,QAAQ;AAEd,QAAM,SAAS,WAAW,WAAW;AACrC,QAAM,cAAc,SAAS;AAC7B,QAAM,sBAAsB;AAC5B,QAAM,mBAAmB,aAAa;AAEtC,MAAI,gBAAgB;AACpB,MAAI,oBAAoB;AACxB,MAAI,qBAAqB;AACzB,MAAI,mBAAmB;AAEvB,MAAI,CAAC,gBAAgB;AACnB,qBAAiB;AACjB,yBAAqB,SAAS;AAAA,EAChC;AACA,MAAI,CAAC,eAAe;AAClB,qBAAiB;AACjB,wBAAoB,SAAS;AAAA,EAC/B;AAEA,MAAK,CAAC,iBAAiB,kBAAoB,kBAAkB,eAAgB;AAC3E,uBAAmB;AAAA,EACrB;AAEA,QAAM,cAEH,iBAAiB,MAAM,SAAS,MAAM,SAAS,YAAY,SAAS,MAAM,SAAS,MACpF,OACC,UAAU,IAAI,eAAe,qBAAqB,UAClD,iBAAiB,MAAM,SAAS,MAAM,SAAS,YAAY,CAAC,SAAS,MAAM,SAAS,MACrF,OACC,CAAC,QAAQ,IAAI,cAAc,kBAC3B,gBAAgB,MAAM,SAAS,MAAM,SAAS,YAAY,CAAC,SAAS,MAAM,CAAC,SAAS,MACrF,OACC,CAAC,UAAU,IAAI,eAAe,oBAAoB,UAClD,gBAAgB,MAAM,SAAS,MAAM,SAAS,YAAY,SAAS,MAAM,CAAC,SAAS;AAEtF,MAAI;AACJ,MAAI,CAAC,OAAO;AACV,WACE,OAEC,cAAc,sBAAsB,oBACrC,MACA,MACA,OACC,QAAQ,IAAI,cAAc,mBAAmB,sBAAsB,oBACpE,aACA,MACA;AAAA,EACJ,OAAO;AACL,WACE,OAEC,QAAQ,cAAc,uBACvB,MACA,MACA,MACA,sBACA,aACA,OACC,QAAQ,IAAI,cAAc,mBAAmB;AAAA,EAClD;AACA,SAAO;AACT;AAGA,IAAO,qBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -36,15 +36,7 @@ var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-t
|
|
|
36
36
|
var import_RequiredMark = require("../../RequiredMark");
|
|
37
37
|
const blockName = "em-ds-label";
|
|
38
38
|
const Text = (0, import_ds_classnames.aggregatedClasses)("span")(blockName, "text");
|
|
39
|
-
const DSLabel = ({
|
|
40
|
-
children,
|
|
41
|
-
label,
|
|
42
|
-
htmlFor,
|
|
43
|
-
required,
|
|
44
|
-
optional,
|
|
45
|
-
truncateText = true,
|
|
46
|
-
isGroup = false
|
|
47
|
-
}) => {
|
|
39
|
+
const DSLabel = ({ children, label, htmlFor, required, optional, truncateText = true, isGroup = false }) => {
|
|
48
40
|
const Tag = isGroup ? "legend" : "label";
|
|
49
41
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Tag, {
|
|
50
42
|
className: `${blockName}${isGroup ? ` ${blockName}--group` : ""}`,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/FormItem/Label/DSLabel.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable jsx-a11y/label-has-associated-control */\n/* eslint-disable react/no-unknown-property, jsx-a11y/label-has-for */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { RequiredMark } from '../../RequiredMark';\n\nconst blockName = 'em-ds-label';\n\nconst Text = aggregatedClasses('span')(blockName, 'text');\n\nconst DSLabel = ({
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable jsx-a11y/label-has-associated-control */\n/* eslint-disable react/no-unknown-property, jsx-a11y/label-has-for */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { RequiredMark } from '../../RequiredMark';\n\nconst blockName = 'em-ds-label';\n\nconst Text = aggregatedClasses('span')(blockName, 'text');\n\nconst DSLabel = ({ children, label, htmlFor, required, optional, truncateText = true, isGroup = false }) => {\n const Tag = isGroup ? 'legend' : 'label';\n\n return (\n <Tag className={`${blockName}${isGroup ? ` ${blockName}--group` : ''}`} htmlFor={htmlFor}>\n {truncateText ? <DSTruncatedTooltipText value={children || label} /> : <Text>{label}</Text>}\n <RequiredMark optional={optional} required={required} />\n </Tag>\n );\n};\n\nDSLabel.propTypes = {\n children: PropTypes.string,\n label: PropTypes.string,\n htmlFor: PropTypes.string,\n required: PropTypes.bool,\n optional: PropTypes.bool,\n truncateText: PropTypes.bool,\n isGroup: PropTypes.bool,\n};\n\nexport { DSLabel };\nexport default DSLabel;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgBnB;AAbJ,wBAAsB;AACtB,2BAAkC;AAClC,uCAAuC;AACvC,0BAA6B;AAE7B,MAAM,YAAY;AAElB,MAAM,WAAO,wCAAkB,MAAM,EAAE,WAAW,MAAM;AAExD,MAAM,UAAU,CAAC,EAAE,UAAU,OAAO,SAAS,UAAU,UAAU,eAAe,MAAM,UAAU,MAAM,MAAM;AAC1G,QAAM,MAAM,UAAU,WAAW;AAEjC,SACE,6CAAC;AAAA,IAAI,WAAW,GAAG,YAAY,UAAU,IAAI,qBAAqB;AAAA,IAAM;AAAA,IACrE;AAAA,qBAAe,4CAAC;AAAA,QAAuB,OAAO,YAAY;AAAA,OAAO,IAAK,4CAAC;AAAA,QAAM;AAAA,OAAM;AAAA,MACpF,4CAAC;AAAA,QAAa;AAAA,QAAoB;AAAA,OAAoB;AAAA;AAAA,GACxD;AAEJ;AAEA,QAAQ,YAAY;AAAA,EAClB,UAAU,kBAAAA,QAAU;AAAA,EACpB,OAAO,kBAAAA,QAAU;AAAA,EACjB,SAAS,kBAAAA,QAAU;AAAA,EACnB,UAAU,kBAAAA,QAAU;AAAA,EACpB,UAAU,kBAAAA,QAAU;AAAA,EACpB,cAAc,kBAAAA,QAAU;AAAA,EACxB,SAAS,kBAAAA,QAAU;AACrB;AAGA,IAAO,kBAAQ;",
|
|
6
6
|
"names": ["PropTypes"]
|
|
7
7
|
}
|