@elliemae/ds-form 2.4.2-rc.12 → 2.4.2-rc.15

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.
Files changed (119) hide show
  1. package/cjs/Checkbox/DSCheckbox.js +5 -5
  2. package/cjs/CheckboxGroup/DSCheckboxGroup.js +3 -3
  3. package/cjs/ComboBox/v1/DSComboBox.js +4 -5
  4. package/cjs/ComboBox/v1/components/MenuList.js +3 -4
  5. package/cjs/ComboBox/v1/components/MultiSelectHeader.js +1 -1
  6. package/cjs/ComboBox/v1/components/getoptions.js +0 -2
  7. package/cjs/ComboBox/v1/withSelectStringValueConverter.js +0 -1
  8. package/cjs/ComboBox/v2/Combobox.js +5 -10
  9. package/cjs/ComboBox/v2/components/Content.js +1 -3
  10. package/cjs/ComboBox/v2/components/CustomOption.js +4 -8
  11. package/cjs/ComboBox/v2/components/CustomOptionMulti.js +4 -10
  12. package/cjs/ComboBox/v2/components/DropdownIndicator.js +4 -5
  13. package/cjs/ComboBox/v2/components/MenuList.js +4 -5
  14. package/cjs/ComboBox/v2/components/MultiSelectHeader.js +1 -1
  15. package/cjs/ComboBox/v2/components/ValueContainer.js +2 -3
  16. package/cjs/ComboBox/v2/components/getoptions.js +0 -2
  17. package/cjs/ComboBox/v2/components/useMenuListHeight.js +3 -8
  18. package/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js +1 -1
  19. package/cjs/DateInput/DSDateInput.js +4 -5
  20. package/cjs/DateInput/components/DateInputs.js +0 -1
  21. package/cjs/DateInput/components/utils.js +1 -2
  22. package/cjs/DateInputV2/components/DateInputs.js +4 -5
  23. package/cjs/DateInputV2/components/styled.js +8 -2
  24. package/cjs/DateInputV2/components/utils.js +3 -8
  25. package/cjs/FormItem/DSFormItemLayout.js +2 -2
  26. package/cjs/FormItem/Label/DSLabel.js +1 -1
  27. package/cjs/FormItem/Suffix/Suffix.js +6 -2
  28. package/cjs/Input/DSInput.js +1 -1
  29. package/cjs/Input/InputAddonWrapper.js +0 -1
  30. package/cjs/Input/InputImpl.js +3 -2
  31. package/cjs/InputGroup/AddonWrapper.js +3 -4
  32. package/cjs/InputMask/DSInputMask.js +2 -3
  33. package/cjs/InputMask/DSInputMaskDeprecated.js +4 -10
  34. package/cjs/InputMask/addons/AutoCorrectedDatePipe.js +0 -1
  35. package/cjs/InputMask/mask_types/DateInputMask.js +0 -1
  36. package/cjs/InputMask/mask_types/DateTimeInputMask.js +0 -1
  37. package/cjs/InputMask/mask_types/DictionaryInputMask.js +0 -1
  38. package/cjs/InputMask/mask_types/NumberInputMask.js +2 -6
  39. package/cjs/InputMask/mask_types/PhoneInputMask.js +0 -1
  40. package/cjs/InputMask/mask_types/PhoneInternationalInputMask.js +0 -1
  41. package/cjs/InputMask/mask_types/SsnInputMask.js +0 -1
  42. package/cjs/InputMask/mask_types/UsZipCodeInputMask.js +0 -1
  43. package/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js +0 -1
  44. package/cjs/InputMask/props.js +2 -1
  45. package/cjs/InputMask/utils/setCaretPosition.js +9 -9
  46. package/cjs/InputProtected/DSInputProtected.js +5 -6
  47. package/cjs/InputProtected/props.js +2 -1
  48. package/cjs/LargeInputText/DSLargeInputText.js +2 -2
  49. package/cjs/MenuItem/components/SubmenuItem/index.js +4 -5
  50. package/cjs/RadioGroup/DSRadioGroup.js +3 -3
  51. package/cjs/RequiredMark/RequiredMark.js +2 -2
  52. package/cjs/SearchBox/DSSearchBox.js +1 -1
  53. package/cjs/SearchBox/NavSearchBox.js +1 -1
  54. package/cjs/SearchBox/SearchBoxToggle.js +13 -6
  55. package/cjs/SearchBox/useSearch.js +0 -1
  56. package/cjs/TextBox/DSTextBox.js +1 -1
  57. package/cjs/TimeInput/TimeInputs.js +0 -1
  58. package/cjs/Toggle/DSToggleImpl.js +1 -1
  59. package/cjs/Toggle/DSToggleRender.js +2 -2
  60. package/esm/Checkbox/DSCheckbox.js +5 -5
  61. package/esm/CheckboxGroup/DSCheckboxGroup.js +3 -3
  62. package/esm/ComboBox/v1/DSComboBox.js +4 -5
  63. package/esm/ComboBox/v1/components/MenuList.js +1 -2
  64. package/esm/ComboBox/v1/components/MultiSelectHeader.js +1 -1
  65. package/esm/ComboBox/v1/components/getoptions.js +0 -2
  66. package/esm/ComboBox/v1/withSelectStringValueConverter.js +0 -1
  67. package/esm/ComboBox/v2/Combobox.js +5 -10
  68. package/esm/ComboBox/v2/components/Content.js +1 -3
  69. package/esm/ComboBox/v2/components/CustomOption.js +4 -8
  70. package/esm/ComboBox/v2/components/CustomOptionMulti.js +4 -10
  71. package/esm/ComboBox/v2/components/DropdownIndicator.js +4 -5
  72. package/esm/ComboBox/v2/components/MenuList.js +2 -3
  73. package/esm/ComboBox/v2/components/MultiSelectHeader.js +1 -1
  74. package/esm/ComboBox/v2/components/ValueContainer.js +2 -3
  75. package/esm/ComboBox/v2/components/getoptions.js +0 -2
  76. package/esm/ComboBox/v2/components/useMenuListHeight.js +3 -8
  77. package/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js +1 -1
  78. package/esm/DateInput/DSDateInput.js +1 -2
  79. package/esm/DateInput/components/DateInputs.js +0 -1
  80. package/esm/DateInput/components/utils.js +1 -2
  81. package/esm/DateInputV2/components/DateInputs.js +4 -5
  82. package/esm/DateInputV2/components/styled.js +8 -2
  83. package/esm/DateInputV2/components/utils.js +3 -8
  84. package/esm/FormItem/DSFormItemLayout.js +2 -2
  85. package/esm/FormItem/Label/DSLabel.js +1 -1
  86. package/esm/FormItem/Suffix/Suffix.js +6 -2
  87. package/esm/Input/DSInput.js +1 -1
  88. package/esm/Input/InputAddonWrapper.js +2 -3
  89. package/esm/Input/InputImpl.js +5 -4
  90. package/esm/InputGroup/AddonWrapper.js +1 -2
  91. package/esm/InputMask/DSInputMask.js +2 -3
  92. package/esm/InputMask/DSInputMaskDeprecated.js +4 -10
  93. package/esm/InputMask/addons/AutoCorrectedDatePipe.js +0 -1
  94. package/esm/InputMask/mask_types/DateInputMask.js +0 -1
  95. package/esm/InputMask/mask_types/DateTimeInputMask.js +0 -1
  96. package/esm/InputMask/mask_types/DictionaryInputMask.js +0 -1
  97. package/esm/InputMask/mask_types/NumberInputMask.js +2 -6
  98. package/esm/InputMask/mask_types/PhoneInputMask.js +0 -1
  99. package/esm/InputMask/mask_types/PhoneInternationalInputMask.js +0 -1
  100. package/esm/InputMask/mask_types/SsnInputMask.js +0 -1
  101. package/esm/InputMask/mask_types/UsZipCodeInputMask.js +0 -1
  102. package/esm/InputMask/mask_types/ZipCodeSearchInputMask.js +0 -1
  103. package/esm/InputMask/props.js +2 -1
  104. package/esm/InputMask/utils/setCaretPosition.js +9 -9
  105. package/esm/InputProtected/DSInputProtected.js +5 -6
  106. package/esm/InputProtected/props.js +2 -1
  107. package/esm/LargeInputText/DSLargeInputText.js +2 -2
  108. package/esm/MenuItem/components/SubmenuItem/index.js +2 -3
  109. package/esm/RadioGroup/DSRadioGroup.js +3 -3
  110. package/esm/RequiredMark/RequiredMark.js +2 -2
  111. package/esm/SearchBox/DSSearchBox.js +1 -1
  112. package/esm/SearchBox/NavSearchBox.js +1 -1
  113. package/esm/SearchBox/SearchBoxToggle.js +13 -6
  114. package/esm/SearchBox/useSearch.js +0 -1
  115. package/esm/TextBox/DSTextBox.js +1 -1
  116. package/esm/TimeInput/TimeInputs.js +0 -1
  117. package/esm/Toggle/DSToggleImpl.js +1 -1
  118. package/esm/Toggle/DSToggleRender.js +2 -2
  119. package/package.json +20 -20
@@ -1,12 +1,11 @@
1
- import 'core-js/modules/esnext.async-iterator.for-each.js';
2
- import 'core-js/modules/esnext.iterator.for-each.js';
3
1
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
4
2
  import 'core-js/modules/esnext.async-iterator.filter.js';
5
3
  import 'core-js/modules/esnext.iterator.constructor.js';
6
4
  import 'core-js/modules/esnext.iterator.filter.js';
7
5
  import 'core-js/modules/esnext.async-iterator.map.js';
8
6
  import 'core-js/modules/esnext.iterator.map.js';
9
- import 'core-js/modules/web.dom-collections.iterator.js';
7
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
8
+ import 'core-js/modules/esnext.iterator.for-each.js';
10
9
  import React, { Component } from 'react';
11
10
  import { aggregatedClasses } from '@elliemae/ds-classnames';
12
11
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -1,11 +1,12 @@
1
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
2
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
3
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
4
  import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
3
5
  import _jsx from '@babel/runtime/helpers/esm/jsx';
4
6
  import 'core-js/modules/esnext.async-iterator.filter.js';
5
7
  import 'core-js/modules/esnext.iterator.constructor.js';
6
8
  import 'core-js/modules/esnext.iterator.filter.js';
7
- import 'core-js/modules/esnext.async-iterator.for-each.js';
8
- import 'core-js/modules/esnext.iterator.for-each.js';
9
+ import 'core-js/modules/es.error.cause.js';
9
10
  import React, { Component } from 'react';
10
11
  import PropTypes from 'prop-types';
11
12
  import { omit } from 'lodash';
@@ -295,7 +296,7 @@ class InputImpl extends Component {
295
296
  },
296
297
  children: !customInputType ? /*#__PURE__*/jsx(Input, _objectSpread(_objectSpread({}, omit(inputProps, ['disableTooltip'])), {}, {
297
298
  autoComplete: "off",
298
- clearable: "".concat(clearable),
299
+ clearable: `${clearable}`,
299
300
  onChange: this.handleOnChange,
300
301
  onBlur: this.handleBlur,
301
302
  onFocus: this.handleFocus // using mouseOver instead of mouseEnter (doesn't trigger on disabled inputs)
@@ -398,7 +399,7 @@ InputImpl.defaultProps = {
398
399
  value(props, propName, componentName) {
399
400
  // eslint-disable-line consistent-return
400
401
  if (!!props.isShowElipsisActive && typeof props[propName] !== 'string') {
401
- return new Error("Invalid prop `".concat(propName, "` of type `").concat(typeof props[propName], "` supplied to") + " `".concat(componentName, "`. Prop `value` should be of type `string` if prop `isShowElipsisActive` is set to `true`.") + ' Either set `isShowElipsisActive` to `false`, or properly format your `value` prop to `string`.');
402
+ return new Error(`Invalid prop \`${propName}\` of type \`${typeof props[propName]}\` supplied to` + ` \`${componentName}\`. Prop \`value\` should be of type \`string\` if prop \`isShowElipsisActive\` is set to \`true\`.` + ' Either set `isShowElipsisActive` to `false`, or properly format your `value` prop to `string`.');
402
403
  }
403
404
  }
404
405
 
@@ -5,7 +5,6 @@ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
5
  import 'core-js/modules/esnext.iterator.for-each.js';
6
6
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
7
  import _jsx from '@babel/runtime/helpers/esm/jsx';
8
- import 'core-js/modules/web.dom-collections.iterator.js';
9
8
  import { Component } from 'react';
10
9
  import { aggregatedClasses } from '@elliemae/ds-classnames';
11
10
  import { jsxs } from 'react/jsx-runtime';
@@ -32,7 +31,7 @@ class AddonWrapper extends Component {
32
31
  } = this.props;
33
32
  const childType = inputComponent && inputComponent.type && inputComponent.type.name ? inputComponent.type.name.toLowerCase() : 'default';
34
33
  return /*#__PURE__*/jsxs(Container, _objectSpread(_objectSpread({
35
- className: "".concat(className, " ").concat(blockName, "--").concat(childType)
34
+ className: `${className} ${blockName}--${childType}`
36
35
  }, containerProps), {}, {
37
36
  children: [leftAddon && /*#__PURE__*/_jsx(InputAddon, {}, void 0, leftAddon), inputComponent, rightAddon && /*#__PURE__*/_jsx(InputAddon, {}, void 0, rightAddon)]
38
37
  }));
@@ -1,11 +1,10 @@
1
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
- import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
3
- import 'core-js/modules/web.dom-collections.iterator.js';
4
1
  import 'core-js/modules/esnext.async-iterator.filter.js';
5
2
  import 'core-js/modules/esnext.iterator.constructor.js';
6
3
  import 'core-js/modules/esnext.iterator.filter.js';
7
4
  import 'core-js/modules/esnext.async-iterator.for-each.js';
8
5
  import 'core-js/modules/esnext.iterator.for-each.js';
6
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
+ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
9
8
  import { useState, useEffect, useCallback } from 'react';
10
9
  import { describe } from 'react-desc';
11
10
  import { MASK_TYPES } from './MaskTypes.js';
@@ -42,13 +42,11 @@ const getRawMask = function (mask) {
42
42
 
43
43
 
44
44
  const UNSAFEGetRawValue = (value, mask) => {
45
- var _safeValue$split, _safeValue$split$filt;
46
-
47
45
  const safeValue = getValueFromEventOrString(value);
48
46
  if (!safeValue) return '';
49
47
  const rawMask = getRawMask(mask, value);
50
48
  const characterToStrip = rawMask.filter(char => typeof char === 'string');
51
- return safeValue === null || safeValue === void 0 ? void 0 : (_safeValue$split = safeValue.split('')) === null || _safeValue$split === void 0 ? void 0 : (_safeValue$split$filt = _safeValue$split.filter(char => {
49
+ return safeValue?.split('')?.filter(char => {
52
50
  const indexCharToStrip = characterToStrip.findIndex(strip => strip === char);
53
51
 
54
52
  if (indexCharToStrip >= 0) {
@@ -57,20 +55,18 @@ const UNSAFEGetRawValue = (value, mask) => {
57
55
  }
58
56
 
59
57
  return true;
60
- })) === null || _safeValue$split$filt === void 0 ? void 0 : _safeValue$split$filt.join('');
58
+ })?.join('');
61
59
  }; // this is not safe because we don't take in consideration a lot of cases
62
60
  // just a monkeypatch untill we get the v2 going,
63
61
  // this work with "internal" masks...
64
62
 
65
63
 
66
64
  const UNSAFEIsRawValue = (value, mask) => {
67
- var _safeValue$split2;
68
-
69
65
  const safeValue = getValueFromEventOrString(value);
70
66
  if (!safeValue) return false;
71
67
  const rawMask = getRawMask(mask, safeValue);
72
68
  const characterToStrip = rawMask.filter(char => typeof char === 'string');
73
- if (safeValue) safeValue === null || safeValue === void 0 ? void 0 : (_safeValue$split2 = safeValue.split('')) === null || _safeValue$split2 === void 0 ? void 0 : _safeValue$split2.forEach(char => {
69
+ if (safeValue) safeValue?.split('')?.forEach(char => {
74
70
  const indexCharToStrip = characterToStrip.findIndex(strip => strip === char);
75
71
 
76
72
  if (indexCharToStrip >= 0) {
@@ -206,9 +202,7 @@ class DSInputMaskDeprecated extends Component {
206
202
  };
207
203
 
208
204
  this.handleOnChange = e => {
209
- var _e$target;
210
-
211
- const rawValue = (e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value) || '';
205
+ const rawValue = e?.target?.value || '';
212
206
  const {
213
207
  selectionEnd
214
208
  } = e.target;
@@ -3,7 +3,6 @@ import 'core-js/modules/esnext.iterator.constructor.js';
3
3
  import 'core-js/modules/esnext.iterator.for-each.js';
4
4
  import 'core-js/modules/esnext.async-iterator.some.js';
5
5
  import 'core-js/modules/esnext.iterator.some.js';
6
- import 'core-js/modules/es.string.replace.js';
7
6
 
8
7
  const maxValueMonth = [31, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
9
8
  const formatOrder = ['yyyy', 'yy', 'mm', 'dd', 'HH', 'MM', 'SS'];
@@ -3,7 +3,6 @@ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutPr
3
3
  import 'core-js/modules/esnext.async-iterator.filter.js';
4
4
  import 'core-js/modules/esnext.iterator.constructor.js';
5
5
  import 'core-js/modules/esnext.iterator.filter.js';
6
- import 'core-js/modules/web.dom-collections.iterator.js';
7
6
  import 'core-js/modules/esnext.async-iterator.for-each.js';
8
7
  import 'core-js/modules/esnext.iterator.for-each.js';
9
8
  import { useRef, useState, useCallback, useLayoutEffect } from 'react';
@@ -3,7 +3,6 @@ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutPr
3
3
  import 'core-js/modules/esnext.async-iterator.filter.js';
4
4
  import 'core-js/modules/esnext.iterator.constructor.js';
5
5
  import 'core-js/modules/esnext.iterator.filter.js';
6
- import 'core-js/modules/web.dom-collections.iterator.js';
7
6
  import 'core-js/modules/esnext.async-iterator.for-each.js';
8
7
  import 'core-js/modules/esnext.iterator.for-each.js';
9
8
  import { useRef, useState, useCallback, useLayoutEffect } from 'react';
@@ -3,7 +3,6 @@ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutPr
3
3
  import 'core-js/modules/esnext.async-iterator.filter.js';
4
4
  import 'core-js/modules/esnext.iterator.constructor.js';
5
5
  import 'core-js/modules/esnext.iterator.filter.js';
6
- import 'core-js/modules/web.dom-collections.iterator.js';
7
6
  import 'core-js/modules/esnext.async-iterator.for-each.js';
8
7
  import 'core-js/modules/esnext.iterator.for-each.js';
9
8
  import { useRef, useState, useCallback, useLayoutEffect } from 'react';
@@ -1,12 +1,10 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
3
- import 'core-js/modules/es.string.replace.js';
4
3
  import 'core-js/modules/esnext.async-iterator.filter.js';
5
4
  import 'core-js/modules/esnext.iterator.constructor.js';
6
5
  import 'core-js/modules/esnext.iterator.filter.js';
7
6
  import 'core-js/modules/esnext.async-iterator.for-each.js';
8
7
  import 'core-js/modules/esnext.iterator.for-each.js';
9
- import 'core-js/modules/web.dom-collections.iterator.js';
10
8
  import { useRef, useState, useCallback, useLayoutEffect } from 'react';
11
9
  import DSTextBox from '../../TextBox/DSTextBox.js';
12
10
  import setCaretPosition from '../utils/setCaretPosition.js';
@@ -21,8 +19,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
21
19
  const addThousandsSeparator = (n, thousandsSeparatorSymbol) => n.replace(/\B(?=(\d{3})+(?!\d))/g, thousandsSeparatorSymbol);
22
20
 
23
21
  const conformValue = (prevRawValue, prevCursorPos, lastkeycode, _ref) => {
24
- var _decimal;
25
-
26
22
  let {
27
23
  prefix,
28
24
  suffix,
@@ -67,7 +63,7 @@ const conformValue = (prevRawValue, prevCursorPos, lastkeycode, _ref) => {
67
63
  });
68
64
  if (requireDecimal) foundDecimalSymbol = true;
69
65
 
70
- if (!requireDecimal && !((_decimal = decimal) !== null && _decimal !== void 0 && _decimal.length) && lastkeycode === 8) {
66
+ if (!requireDecimal && !decimal?.length && lastkeycode === 8) {
71
67
  foundDecimalSymbol = false;
72
68
  }
73
69
 
@@ -97,7 +93,7 @@ const conformValue = (prevRawValue, prevCursorPos, lastkeycode, _ref) => {
97
93
  maskedPos += prefix.length;
98
94
 
99
95
  if (isNegative) {
100
- if (lastkeycode !== 8 || nextMaskedValue !== prefix) nextMaskedValue = "-".concat(nextMaskedValue);
96
+ if (lastkeycode !== 8 || nextMaskedValue !== prefix) nextMaskedValue = `-${nextMaskedValue}`;
101
97
  maskedPos += 1;
102
98
  }
103
99
 
@@ -3,7 +3,6 @@ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutPr
3
3
  import 'core-js/modules/esnext.async-iterator.filter.js';
4
4
  import 'core-js/modules/esnext.iterator.constructor.js';
5
5
  import 'core-js/modules/esnext.iterator.filter.js';
6
- import 'core-js/modules/web.dom-collections.iterator.js';
7
6
  import 'core-js/modules/esnext.async-iterator.for-each.js';
8
7
  import 'core-js/modules/esnext.iterator.for-each.js';
9
8
  import { useRef, useState, useCallback, useLayoutEffect } from 'react';
@@ -3,7 +3,6 @@ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutPr
3
3
  import 'core-js/modules/esnext.async-iterator.filter.js';
4
4
  import 'core-js/modules/esnext.iterator.constructor.js';
5
5
  import 'core-js/modules/esnext.iterator.filter.js';
6
- import 'core-js/modules/web.dom-collections.iterator.js';
7
6
  import 'core-js/modules/esnext.async-iterator.for-each.js';
8
7
  import 'core-js/modules/esnext.iterator.for-each.js';
9
8
  import { useRef, useState, useCallback, useLayoutEffect } from 'react';
@@ -3,7 +3,6 @@ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutPr
3
3
  import 'core-js/modules/esnext.async-iterator.filter.js';
4
4
  import 'core-js/modules/esnext.iterator.constructor.js';
5
5
  import 'core-js/modules/esnext.iterator.filter.js';
6
- import 'core-js/modules/web.dom-collections.iterator.js';
7
6
  import 'core-js/modules/esnext.async-iterator.for-each.js';
8
7
  import 'core-js/modules/esnext.iterator.for-each.js';
9
8
  import { useRef, useState, useCallback, useLayoutEffect } from 'react';
@@ -3,7 +3,6 @@ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutPr
3
3
  import 'core-js/modules/esnext.async-iterator.filter.js';
4
4
  import 'core-js/modules/esnext.iterator.constructor.js';
5
5
  import 'core-js/modules/esnext.iterator.filter.js';
6
- import 'core-js/modules/web.dom-collections.iterator.js';
7
6
  import 'core-js/modules/esnext.async-iterator.for-each.js';
8
7
  import 'core-js/modules/esnext.iterator.for-each.js';
9
8
  import { useRef, useState, useCallback, useLayoutEffect } from 'react';
@@ -3,7 +3,6 @@ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutPr
3
3
  import 'core-js/modules/esnext.async-iterator.filter.js';
4
4
  import 'core-js/modules/esnext.iterator.constructor.js';
5
5
  import 'core-js/modules/esnext.iterator.filter.js';
6
- import 'core-js/modules/web.dom-collections.iterator.js';
7
6
  import 'core-js/modules/esnext.async-iterator.for-each.js';
8
7
  import 'core-js/modules/esnext.iterator.for-each.js';
9
8
  import { useRef, useState, useCallback, useLayoutEffect } from 'react';
@@ -140,7 +140,8 @@ const inputProps = {
140
140
  * The placeholder character represents the fillable spot in the mask.
141
141
  * The default placeholder character is underscore, _
142
142
  */
143
- placeholderChar: PropTypes.string.description("The placeholder character represents the fillable spot in the mask.\n The default placeholder character is underscore, _.").defaultValue('_')
143
+ placeholderChar: PropTypes.string.description(`The placeholder character represents the fillable spot in the mask.
144
+ The default placeholder character is underscore, _.`).defaultValue('_')
144
145
  };
145
146
 
146
147
  export { inputProps };
@@ -1,14 +1,14 @@
1
1
  const setCaretPosition = (ctrl, pos) => {
2
2
  // Modern browsers
3
- if (ctrl !== null && ctrl !== void 0 && ctrl.setSelectionRange) {
4
- ctrl === null || ctrl === void 0 ? void 0 : ctrl.focus();
5
- ctrl === null || ctrl === void 0 ? void 0 : ctrl.setSelectionRange(pos, pos); // IE8 and below
6
- } else if (ctrl !== null && ctrl !== void 0 && ctrl.createTextRange) {
7
- const range = ctrl === null || ctrl === void 0 ? void 0 : ctrl.createTextRange();
8
- range === null || range === void 0 ? void 0 : range.collapse(true);
9
- range === null || range === void 0 ? void 0 : range.moveEnd('character', pos);
10
- range === null || range === void 0 ? void 0 : range.moveStart('character', pos);
11
- range === null || range === void 0 ? void 0 : range.select();
3
+ if (ctrl?.setSelectionRange) {
4
+ ctrl?.focus();
5
+ ctrl?.setSelectionRange(pos, pos); // IE8 and below
6
+ } else if (ctrl?.createTextRange) {
7
+ const range = ctrl?.createTextRange();
8
+ range?.collapse(true);
9
+ range?.moveEnd('character', pos);
10
+ range?.moveStart('character', pos);
11
+ range?.select();
12
12
  }
13
13
  };
14
14
 
@@ -1,12 +1,11 @@
1
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
- import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
3
- import _jsx from '@babel/runtime/helpers/esm/jsx';
4
- import 'core-js/modules/web.dom-collections.iterator.js';
5
1
  import 'core-js/modules/esnext.async-iterator.filter.js';
6
2
  import 'core-js/modules/esnext.iterator.constructor.js';
7
3
  import 'core-js/modules/esnext.iterator.filter.js';
8
4
  import 'core-js/modules/esnext.async-iterator.for-each.js';
9
5
  import 'core-js/modules/esnext.iterator.for-each.js';
6
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
+ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
8
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
10
9
  import { useState, useEffect, useCallback } from 'react';
11
10
  import { describe } from 'react-desc';
12
11
  import { LockUnlocked, LockLocked, VisibleView, InvisibleHide } from '@elliemae/ds-icons';
@@ -59,13 +58,13 @@ const DSInputProtected = _ref => {
59
58
  }, [inputHidden]);
60
59
  return /*#__PURE__*/_jsx("div", {}, void 0, /*#__PURE__*/_jsx(DSInputGroup, {
61
60
  leftAddon: left ? /*#__PURE__*/_jsx(DSButton, {
62
- "aria-label": "".concat(inputLocked ? 'Allow' : 'Disallow', " Edition"),
61
+ "aria-label": `${inputLocked ? 'Allow' : 'Disallow'} Edition`,
63
62
  buttonType: "secondary",
64
63
  icon: ADDON_ICON_OPTIONS[inputLocked ? LEFT_ADDON_OPTIONS.LockLocked : LEFT_ADDON_OPTIONS.LockUnlocked],
65
64
  onClick: handleLeft
66
65
  }) : undefined,
67
66
  rightAddon: right ? /*#__PURE__*/_jsx(DSButton, {
68
- "aria-label": "".concat(inputHidden ? 'Show' : 'Hide', " Characters"),
67
+ "aria-label": `${inputHidden ? 'Show' : 'Hide'} Characters`,
69
68
  buttonType: "secondary",
70
69
  icon: ADDON_ICON_OPTIONS[inputHidden ? RIGHT_ADDON_OPTIONS.InvisibleHide : RIGHT_ADDON_OPTIONS.VisibleView],
71
70
  onClick: handleRight,
@@ -14,7 +14,8 @@ const inputProtectedProps = {
14
14
  * PlaceholderChar: The placeholder character represents the fillable spot in the mask.
15
15
  * The default placeholder character is underscore, _.
16
16
  */
17
- placeholderChar: PropTypes.string.description("The placeholder character represents the fillable spot in the mask.\n * The default placeholder character is underscore, _.")
17
+ placeholderChar: PropTypes.string.description(`The placeholder character represents the fillable spot in the mask.
18
+ * The default placeholder character is underscore, _.`)
18
19
  };
19
20
 
20
21
  export { inputProtectedProps };
@@ -76,7 +76,7 @@ const DSLargeInputText = _ref2 => {
76
76
 
77
77
  return /*#__PURE__*/jsxs(Fragment, {
78
78
  children: [/*#__PURE__*/jsx("div", _objectSpread(_objectSpread({}, containerProps), {}, {
79
- className: "".concat(cssClassName, " ").concat(className),
79
+ className: `${cssClassName} ${className}`,
80
80
  children: /*#__PURE__*/_jsx("div", {
81
81
  className: classNameBlock('wrapper')
82
82
  }, void 0, /*#__PURE__*/jsx("textarea", {
@@ -115,7 +115,7 @@ const DSLargeInputText = _ref2 => {
115
115
  limitError
116
116
  },
117
117
  "data-testid": "counter-area"
118
- }, void 0, "".concat(limitError ? "".concat(errorLimit, " ").concat(characterLimitCounter, " characters. ") : '').concat(String(value).length, " / ").concat(characterLimitCounter))]
118
+ }, void 0, `${limitError ? `${errorLimit} ${characterLimitCounter} characters. ` : ''}${String(value).length} / ${characterLimitCounter}`)]
119
119
  });
120
120
  };
121
121
 
@@ -5,7 +5,6 @@ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
5
  import 'core-js/modules/esnext.iterator.for-each.js';
6
6
  import _jsx from '@babel/runtime/helpers/esm/jsx';
7
7
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
8
- import 'core-js/modules/web.dom-collections.iterator.js';
9
8
  import { useState, useEffect, useRef, useCallback } from 'react';
10
9
  import { describe } from 'react-desc';
11
10
  import Grid from '@elliemae/ds-grid';
@@ -105,7 +104,7 @@ const SubmenuItem = props => {
105
104
  ref: innerRef,
106
105
  onMouseEnter: onMouseEnterHandler,
107
106
  onMouseLeave: onMouseLeaveHandler,
108
- "aria-describedby": "dropdownmenu-submenu-".concat(dsId),
107
+ "aria-describedby": `dropdownmenu-submenu-${dsId}`,
109
108
  children: [render ? render(props) : /*#__PURE__*/_jsx(Grid, {
110
109
  cols: ['auto', 'min-content']
111
110
  }, void 0, /*#__PURE__*/_jsx(StyledItemLabel, {}, void 0, label), /*#__PURE__*/_jsx(DSButtonV2, {
@@ -115,7 +114,7 @@ const SubmenuItem = props => {
115
114
  onClick(e);
116
115
  }
117
116
  }, void 0, rightAddon === 'ellipsis' ? _Ellipsis || (_Ellipsis = /*#__PURE__*/_jsx(Ellipsis, {})) : _ChevronRight || (_ChevronRight = /*#__PURE__*/_jsx(ChevronRight, {})))), /*#__PURE__*/_jsx("span", {
118
- id: "dropdownmenu-submenu-".concat(dsId),
117
+ id: `dropdownmenu-submenu-${dsId}`,
119
118
  style: {
120
119
  display: 'none'
121
120
  }
@@ -22,7 +22,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
22
22
 
23
23
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
24
24
  const emClassPrefix = 'em-ds';
25
- const baseClass = "".concat(emClassPrefix, "-radio-group");
25
+ const baseClass = `${emClassPrefix}-radio-group`;
26
26
 
27
27
  const RadioItem = props => /*#__PURE__*/_jsx(GroupItem, {
28
28
  render: context => /*#__PURE__*/jsx(DSRadio, _objectSpread(_objectSpread({}, props), {}, {
@@ -63,7 +63,7 @@ const DSRadioGroup = _ref => {
63
63
  }, void 0, /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
64
64
  "data-testid": "ds-radiogroup"
65
65
  }, labelProps && labelProps.labelText ? {} : containerProps), {}, {
66
- className: "".concat(baseClass, " ").concat(baseClass, "--").concat(orientation),
66
+ className: `${baseClass} ${baseClass}--${orientation}`,
67
67
  role: "group",
68
68
  children: React.Children.map(children, (child, index) => /*#__PURE__*/jsx(RadioItem, _objectSpread(_objectSpread({}, child.props), {}, {
69
69
  innerRef: t => {
@@ -75,7 +75,7 @@ const DSRadioGroup = _ref => {
75
75
 
76
76
  if (labelProps && labelProps.labelText) {
77
77
  return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
78
- className: "".concat(baseClass, "-form-item-layout-wrapper")
78
+ className: `${baseClass}-form-item-layout-wrapper`
79
79
  }, containerProps), {}, {
80
80
  role: "group",
81
81
  children: /*#__PURE__*/jsx(DSFormItemLayout, _objectSpread(_objectSpread({}, labelProps), {}, {
@@ -15,12 +15,12 @@ const RequiredMark = _ref => {
15
15
 
16
16
  if (required) {
17
17
  return /*#__PURE__*/_jsx("span", {
18
- className: "".concat(cssClassName)
18
+ className: `${cssClassName}`
19
19
  }, void 0, "\u25CF");
20
20
  }
21
21
 
22
22
  return /*#__PURE__*/_jsx("span", {
23
- className: "".concat(cssClassName, " optional-mark")
23
+ className: `${cssClassName} optional-mark`
24
24
  }, void 0, "\u26AC");
25
25
  };
26
26
 
@@ -49,7 +49,7 @@ const DSSearchBox = _ref => {
49
49
  value,
50
50
  onClearButtonClick
51
51
  });
52
- const shouldShowClearIcon = clearable && (searchValue === null || searchValue === void 0 ? void 0 : searchValue.length) > 0;
52
+ const shouldShowClearIcon = clearable && searchValue?.length > 0;
53
53
  const shouldShowSearchIcon = !shouldShowClearIcon && showIcon;
54
54
  const shouldShowAnyIcon = shouldShowClearIcon || shouldShowSearchIcon;
55
55
  const PureSearchboxIcon = React.useMemo(() => {
@@ -87,7 +87,7 @@ const ResultTracker = props => {
87
87
  } = props;
88
88
  if (currentResultIndex === -1 && !totalResults) return null;
89
89
  if (currentResultIndex === -1 && totalResults) return /*#__PURE__*/_jsx(StyledResultTracker, {}, void 0, totalResults);
90
- return /*#__PURE__*/_jsx(StyledResultTracker, {}, void 0, "".concat(currentResultIndex + 1, " / ").concat(totalResults));
90
+ return /*#__PURE__*/_jsx(StyledResultTracker, {}, void 0, `${currentResultIndex + 1} / ${totalResults}`);
91
91
  };
92
92
 
93
93
  const VerticalSeparator = () => _StyledVerticalSepara || (_StyledVerticalSepara = /*#__PURE__*/_jsx(StyledVerticalSeparator, {}));
@@ -1,12 +1,11 @@
1
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
- import _jsx from '@babel/runtime/helpers/esm/jsx';
3
- import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
4
- import 'core-js/modules/web.dom-collections.iterator.js';
5
1
  import 'core-js/modules/esnext.async-iterator.filter.js';
6
2
  import 'core-js/modules/esnext.iterator.constructor.js';
7
3
  import 'core-js/modules/esnext.iterator.filter.js';
8
4
  import 'core-js/modules/esnext.async-iterator.for-each.js';
9
5
  import 'core-js/modules/esnext.iterator.for-each.js';
6
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
8
+ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
10
9
  import { useState } from 'react';
11
10
  import styled from 'styled-components';
12
11
  import { Search } from '@elliemae/ds-icons';
@@ -24,7 +23,15 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
24
23
  const SEARCH_BUTTON_WIDTH = 26;
25
24
  const SearchWrap = /*#__PURE__*/styled.div.withConfig({
26
25
  componentId: "sc-xt33wm-0"
27
- })(["transition:width 200ms ease;width:", "px;height:0;", " ", ""], SEARCH_BUTTON_WIDTH, props => !props.show ? "\n opacity:0;\n\n & * {\n width: ".concat(SEARCH_BUTTON_WIDTH, "px;\n height: 0;\n border: 0;\n }\n ") : '', props => props.isOpen ? "width: ".concat(props.width, ";opacity: 1;height: auto;") : ''); // eslint-disable-next-line react/prop-types
26
+ })(["transition:width 200ms ease;width:", "px;height:0;", " ", ""], SEARCH_BUTTON_WIDTH, props => !props.show ? `
27
+ opacity:0;
28
+
29
+ & * {
30
+ width: ${SEARCH_BUTTON_WIDTH}px;
31
+ height: 0;
32
+ border: 0;
33
+ }
34
+ ` : '', props => props.isOpen ? `width: ${props.width};opacity: 1;height: auto;` : ''); // eslint-disable-next-line react/prop-types
28
35
 
29
36
  const SearchBoxToggle = _ref => {
30
37
  let {
@@ -35,7 +42,7 @@ const SearchBoxToggle = _ref => {
35
42
 
36
43
  const [isOpen, setOpen] = useState(false);
37
44
  const [show, setShow] = useState(true);
38
- const computedWidth = typeof width === 'number' ? "".concat(width, "px") : width;
45
+ const computedWidth = typeof width === 'number' ? `${width}px` : width;
39
46
 
40
47
  const button = /*#__PURE__*/_jsx(DSButton, {
41
48
  onClick: () => {
@@ -1,4 +1,3 @@
1
- import 'core-js/modules/web.dom-collections.iterator.js';
2
1
  import { useState, useCallback, useEffect } from 'react';
3
2
  import { debounce } from '@elliemae/ds-utilities';
4
3
 
@@ -44,7 +44,7 @@ const DSTextBox = _ref => {
44
44
 
45
45
  return /*#__PURE__*/jsx(DSInput, _objectSpread(_objectSpread({}, otherProps), {}, {
46
46
  "aria-label": !id ? otherProps['aria-label'] || 'Text Box' : undefined,
47
- "aria-describedby": otherProps['aria-describedby'] || "".concat(id, "_feedback_message"),
47
+ "aria-describedby": otherProps['aria-describedby'] || `${id}_feedback_message`,
48
48
  autoFocus: autoFocus,
49
49
  clearable: clearable,
50
50
  containerProps: containerProps,
@@ -4,7 +4,6 @@ import 'core-js/modules/esnext.async-iterator.for-each.js';
4
4
  import 'core-js/modules/esnext.iterator.for-each.js';
5
5
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
6
6
  import _jsx from '@babel/runtime/helpers/esm/jsx';
7
- import 'core-js/modules/web.dom-collections.iterator.js';
8
7
  import 'core-js/modules/esnext.async-iterator.some.js';
9
8
  import 'core-js/modules/esnext.iterator.constructor.js';
10
9
  import 'core-js/modules/esnext.iterator.some.js';
@@ -261,7 +261,7 @@ class DSToggleImpl extends Component {
261
261
  hide
262
262
  } = this.state;
263
263
  const dragStyle = drag !== null || checked || this.props.checked ? {
264
- left: "".concat(drag, "px")
264
+ left: `${drag}px`
265
265
  } : null;
266
266
  return /*#__PURE__*/jsx(DSToggleRender, _objectSpread(_objectSpread({}, this.props), {}, {
267
267
  defaultState: this.props.checked,
@@ -81,7 +81,7 @@ const DSToggleRender = _ref => {
81
81
  defaultValue: value
82
82
  }, onClickHandlerForNonInteractiveElements(allowChange ? null : onChange)), {}, {
83
83
  ref: containerRef,
84
- className: "".concat(cssClassName, " ").concat(defaultState ? 'default-state-checked' : '').concat(hide ? ' ds-form-element-toggle-hide' : ''),
84
+ className: `${cssClassName} ${defaultState ? 'default-state-checked' : ''}${hide ? ' ds-form-element-toggle-hide' : ''}`,
85
85
  onBlur: onBlur,
86
86
  onFocus: onFocus // eslint-disable-next-line jsx-a11y/role-has-required-aria-props
87
87
  ,
@@ -94,7 +94,7 @@ const DSToggleRender = _ref => {
94
94
  ref: handRef,
95
95
  "aria-checked": checked,
96
96
  "aria-disabled": disabled,
97
- className: "".concat(classNameElement('input'), " ").concat(defaultState ? 'default-state-checked' : ''),
97
+ className: `${classNameElement('input')} ${defaultState ? 'default-state-checked' : ''}`,
98
98
  onMouseDown: allowChange ? null : onMouseDown,
99
99
  onMouseEnter: allowChange ? null : onMouseEnter,
100
100
  onMouseLeave: allowChange ? null : onMouseLeave,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-form",
3
- "version": "2.4.2-rc.12",
3
+ "version": "2.4.2-rc.15",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Form",
6
6
  "module": "./esm/index.js",
@@ -748,25 +748,25 @@
748
748
  "build": "node ../../scripts/build/build.js"
749
749
  },
750
750
  "dependencies": {
751
- "@elliemae/ds-button": "2.4.2-rc.12",
752
- "@elliemae/ds-circular-progress-indicator": "2.4.2-rc.12",
753
- "@elliemae/ds-classnames": "2.4.2-rc.12",
754
- "@elliemae/ds-controlled-form": "2.4.2-rc.12",
755
- "@elliemae/ds-dropdownmenu": "2.4.2-rc.12",
756
- "@elliemae/ds-grid": "2.4.2-rc.12",
757
- "@elliemae/ds-icon": "2.4.2-rc.12",
758
- "@elliemae/ds-icons": "2.4.2-rc.12",
759
- "@elliemae/ds-menu": "2.4.2-rc.12",
760
- "@elliemae/ds-overlay": "2.4.2-rc.12",
761
- "@elliemae/ds-popper": "2.4.2-rc.12",
762
- "@elliemae/ds-props-helpers": "2.4.2-rc.12",
763
- "@elliemae/ds-separator": "2.4.2-rc.12",
764
- "@elliemae/ds-shared": "2.4.2-rc.12",
765
- "@elliemae/ds-system": "2.4.2-rc.12",
766
- "@elliemae/ds-text-wrapper": "2.4.2-rc.12",
767
- "@elliemae/ds-tooltip": "2.4.2-rc.12",
768
- "@elliemae/ds-truncated-tooltip-text": "2.4.2-rc.12",
769
- "@elliemae/ds-utilities": "2.4.2-rc.12",
751
+ "@elliemae/ds-button": "2.4.2-rc.15",
752
+ "@elliemae/ds-circular-progress-indicator": "2.4.2-rc.15",
753
+ "@elliemae/ds-classnames": "2.4.2-rc.15",
754
+ "@elliemae/ds-controlled-form": "2.4.2-rc.15",
755
+ "@elliemae/ds-dropdownmenu": "2.4.2-rc.15",
756
+ "@elliemae/ds-grid": "2.4.2-rc.15",
757
+ "@elliemae/ds-icon": "2.4.2-rc.15",
758
+ "@elliemae/ds-icons": "2.4.2-rc.15",
759
+ "@elliemae/ds-menu": "2.4.2-rc.15",
760
+ "@elliemae/ds-overlay": "2.4.2-rc.15",
761
+ "@elliemae/ds-popper": "2.4.2-rc.15",
762
+ "@elliemae/ds-props-helpers": "2.4.2-rc.15",
763
+ "@elliemae/ds-separator": "2.4.2-rc.15",
764
+ "@elliemae/ds-shared": "2.4.2-rc.15",
765
+ "@elliemae/ds-system": "2.4.2-rc.15",
766
+ "@elliemae/ds-text-wrapper": "2.4.2-rc.15",
767
+ "@elliemae/ds-tooltip": "2.4.2-rc.15",
768
+ "@elliemae/ds-truncated-tooltip-text": "2.4.2-rc.15",
769
+ "@elliemae/ds-utilities": "2.4.2-rc.15",
770
770
  "@elliemae/react-popper": "1.0.2",
771
771
  "@xstyled/styled-components": "~3.1.1",
772
772
  "csstype": "~3.0.9",