@elliemae/ds-form 2.4.2-rc.3 → 2.4.3-rc.0

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 (122) 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/SingleMenuItem/SingleMenuItem.js +0 -1
  50. package/cjs/MenuItem/components/SubmenuItem/index.js +4 -5
  51. package/cjs/RadioGroup/DSRadioGroup.js +3 -3
  52. package/cjs/RequiredMark/RequiredMark.js +2 -2
  53. package/cjs/SearchBox/DSSearchBox.js +1 -1
  54. package/cjs/SearchBox/NavSearchBox.js +1 -1
  55. package/cjs/SearchBox/SearchBoxToggle.js +13 -6
  56. package/cjs/SearchBox/useSearch.js +0 -1
  57. package/cjs/TextBox/DSTextBox.js +1 -1
  58. package/cjs/TimeInput/TimeInputs.js +0 -1
  59. package/cjs/Toggle/DSToggleImpl.js +1 -1
  60. package/cjs/Toggle/DSToggleRender.js +2 -2
  61. package/esm/Checkbox/DSCheckbox.js +5 -5
  62. package/esm/CheckboxGroup/DSCheckboxGroup.js +7 -7
  63. package/esm/ComboBox/v1/DSComboBox.js +8 -9
  64. package/esm/ComboBox/v1/components/MenuList.js +3 -4
  65. package/esm/ComboBox/v1/components/MultiSelectHeader.js +1 -1
  66. package/esm/ComboBox/v1/components/getoptions.js +0 -2
  67. package/esm/ComboBox/v1/withSelectStringValueConverter.js +0 -1
  68. package/esm/ComboBox/v2/Combobox.js +5 -10
  69. package/esm/ComboBox/v2/components/Content.js +1 -3
  70. package/esm/ComboBox/v2/components/CustomOption.js +4 -8
  71. package/esm/ComboBox/v2/components/CustomOptionMulti.js +4 -10
  72. package/esm/ComboBox/v2/components/DropdownIndicator.js +4 -5
  73. package/esm/ComboBox/v2/components/MenuList.js +4 -5
  74. package/esm/ComboBox/v2/components/MultiSelectHeader.js +1 -1
  75. package/esm/ComboBox/v2/components/ValueContainer.js +2 -3
  76. package/esm/ComboBox/v2/components/getoptions.js +0 -2
  77. package/esm/ComboBox/v2/components/useMenuListHeight.js +3 -8
  78. package/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js +1 -1
  79. package/esm/DateInput/DSDateInput.js +4 -5
  80. package/esm/DateInput/components/DateInputs.js +4 -5
  81. package/esm/DateInput/components/utils.js +1 -2
  82. package/esm/DateInputV2/components/DateInputs.js +8 -9
  83. package/esm/DateInputV2/components/styled.js +8 -2
  84. package/esm/DateInputV2/components/utils.js +3 -8
  85. package/esm/FormItem/DSFormItemLayout.js +2 -2
  86. package/esm/FormItem/Label/DSLabel.js +1 -1
  87. package/esm/FormItem/Suffix/Suffix.js +6 -2
  88. package/esm/FormItem/ValidationFieldWrapper.js +4 -4
  89. package/esm/Input/DSInput.js +1 -1
  90. package/esm/Input/InputAddonWrapper.js +0 -1
  91. package/esm/Input/InputImpl.js +5 -4
  92. package/esm/InputGroup/AddonWrapper.js +3 -4
  93. package/esm/InputMask/DSInputMask.js +2 -3
  94. package/esm/InputMask/DSInputMaskDeprecated.js +4 -10
  95. package/esm/InputMask/addons/AutoCorrectedDatePipe.js +0 -1
  96. package/esm/InputMask/mask_types/DateInputMask.js +0 -1
  97. package/esm/InputMask/mask_types/DateTimeInputMask.js +0 -1
  98. package/esm/InputMask/mask_types/DictionaryInputMask.js +0 -1
  99. package/esm/InputMask/mask_types/NumberInputMask.js +2 -6
  100. package/esm/InputMask/mask_types/PhoneInputMask.js +0 -1
  101. package/esm/InputMask/mask_types/PhoneInternationalInputMask.js +0 -1
  102. package/esm/InputMask/mask_types/SsnInputMask.js +0 -1
  103. package/esm/InputMask/mask_types/UsZipCodeInputMask.js +0 -1
  104. package/esm/InputMask/mask_types/ZipCodeSearchInputMask.js +0 -1
  105. package/esm/InputMask/props.js +2 -1
  106. package/esm/InputMask/utils/setCaretPosition.js +9 -9
  107. package/esm/InputProtected/DSInputProtected.js +5 -6
  108. package/esm/InputProtected/props.js +2 -1
  109. package/esm/LargeInputText/DSLargeInputText.js +2 -2
  110. package/esm/MenuItem/components/SingleMenuItem/SingleMenuItem.js +0 -1
  111. package/esm/MenuItem/components/SubmenuItem/index.js +4 -5
  112. package/esm/RadioGroup/DSRadioGroup.js +7 -7
  113. package/esm/RequiredMark/RequiredMark.js +2 -2
  114. package/esm/SearchBox/DSSearchBox.js +1 -1
  115. package/esm/SearchBox/NavSearchBox.js +1 -1
  116. package/esm/SearchBox/SearchBoxToggle.js +13 -6
  117. package/esm/SearchBox/useSearch.js +0 -1
  118. package/esm/TextBox/DSTextBox.js +1 -1
  119. package/esm/TimeInput/TimeInputs.js +4 -5
  120. package/esm/Toggle/DSToggleImpl.js +1 -1
  121. package/esm/Toggle/DSToggleRender.js +2 -2
  122. package/package.json +20 -20
@@ -62,7 +62,7 @@ function Checkbox(_ref) {
62
62
  "data-testid": rest['data-testid'] || 'ds-checkbox',
63
63
  "aria-checked": checked,
64
64
  "aria-disabled": disabled,
65
- className: "".concat(className, " ").concat(variant || '', " ").concat(disabled ? 'disabled' : ''),
65
+ className: `${className} ${variant || ''} ${disabled ? 'disabled' : ''}`,
66
66
  "data-kind": "checkmark",
67
67
  onKeyDown: e => {
68
68
  e.target = checkRef.current;
@@ -80,7 +80,7 @@ function Checkbox(_ref) {
80
80
  tabIndex: tabIndex,
81
81
  value: value,
82
82
  children: /*#__PURE__*/jsx("input", {
83
- id: "".concat(instanceUID, "-").concat(labelText),
83
+ id: `${instanceUID}-${labelText}`,
84
84
  onClick: handleClick,
85
85
  ref: checkRef,
86
86
  checked: !!checked,
@@ -129,7 +129,7 @@ const DSCheckbox = _ref2 => {
129
129
 
130
130
  const checkbox = /*#__PURE__*/jsx(Checkbox, _objectSpread(_objectSpread({}, otherProps), {}, {
131
131
  checked: checked,
132
- className: cx("".concat(classNameElement('input-button'), " checkbox-").concat(String(checked)), className),
132
+ className: cx(`${classNameElement('input-button')} checkbox-${String(checked)}`, className),
133
133
  disabled: disabled,
134
134
  innerRef: innerRef,
135
135
  name: name,
@@ -142,12 +142,12 @@ const DSCheckbox = _ref2 => {
142
142
 
143
143
  if (!labelText) return checkbox;
144
144
  return /*#__PURE__*/jsxs("div", _objectSpread(_objectSpread({
145
- className: "".concat(cssClassName, " ").concat(variant)
145
+ className: `${cssClassName} ${variant}`
146
146
  }, containerProps), {}, {
147
147
  children: [/*#__PURE__*/_jsx("label", {
148
148
  "data-testid": "ds-checkbox-label",
149
149
  className: classNameElement('label'),
150
- htmlFor: "".concat(instanceUID, "-").concat(labelText)
150
+ htmlFor: `${instanceUID}-${labelText}`
151
151
  }, void 0, checkbox, /*#__PURE__*/_jsx("span", {
152
152
  className: classNameElement('label-text')
153
153
  }, void 0, labelText)), children && /*#__PURE__*/_jsx("div", {
@@ -1,12 +1,12 @@
1
- import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
3
- import 'core-js/modules/esnext.async-iterator.map.js';
4
- import 'core-js/modules/esnext.iterator.map.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 _jsx from '@babel/runtime/helpers/esm/jsx';
7
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
8
+ import 'core-js/modules/esnext.async-iterator.map.js';
9
+ import 'core-js/modules/esnext.iterator.map.js';
10
10
  import React from 'react';
11
11
  import { describe } from 'react-desc';
12
12
  import GroupItem from '@elliemae/ds-shared/GroupContext/GroupItem';
@@ -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, "-checkbox-group");
25
+ const baseClass = `${emClassPrefix}-checkbox-group`;
26
26
 
27
27
  const CheckboxItem = props => /*#__PURE__*/_jsx(GroupItem, {
28
28
  render: context => /*#__PURE__*/jsx(DSCheckbox, _objectSpread(_objectSpread({}, props), {}, {
@@ -62,7 +62,7 @@ const DSCheckboxGroup = _ref => {
62
62
  multiple: true,
63
63
  onChange: onChange
64
64
  }, void 0, /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
65
- className: "".concat(baseClass, " ").concat(baseClass, "--").concat(orientation)
65
+ className: `${baseClass} ${baseClass}--${orientation}`
66
66
  }, labelProps && labelProps.labelText ? {} : containerProps), {}, {
67
67
  role: "group",
68
68
  children: React.Children.map(children, (child, index) => /*#__PURE__*/jsx(CheckboxItem, _objectSpread(_objectSpread({}, child.props), {}, {
@@ -75,7 +75,7 @@ const DSCheckboxGroup = _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), {}, {
@@ -1,16 +1,15 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.filter.js';
3
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
4
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
5
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
6
  import _jsx from '@babel/runtime/helpers/esm/jsx';
3
7
  import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
4
8
  import 'core-js/modules/esnext.async-iterator.map.js';
5
9
  import 'core-js/modules/esnext.iterator.map.js';
6
- import 'core-js/modules/web.dom-collections.iterator.js';
7
10
  import 'core-js/modules/esnext.async-iterator.find.js';
8
11
  import 'core-js/modules/esnext.iterator.constructor.js';
9
12
  import 'core-js/modules/esnext.iterator.find.js';
10
- import 'core-js/modules/esnext.async-iterator.filter.js';
11
- import 'core-js/modules/esnext.iterator.filter.js';
12
- import 'core-js/modules/esnext.async-iterator.for-each.js';
13
- import 'core-js/modules/esnext.iterator.for-each.js';
14
13
  import React from 'react';
15
14
  import { debounce, throttle } from 'lodash';
16
15
  import Select from 'react-select';
@@ -196,7 +195,7 @@ class DSComboBox extends React.Component {
196
195
 
197
196
  return /*#__PURE__*/_jsx(Manager, {}, void 0, /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
198
197
  ref: measureRef,
199
- className: cx("".concat(ThemeConstants.prefix, "-").concat(blockName, "-wrapper"), className, hasError && "".concat(ThemeConstants.prefix, "-").concat(blockName, "--").concat(COMBOBOX_VARIANT.ERROR), "".concat(ThemeConstants.prefix, "-").concat(blockName, "--").concat(variant), "focus-".concat(focus), isMulti && 'combo-multi', expandMenuOutsideContainer && 'expanded-outside-container')
198
+ className: cx(`${ThemeConstants.prefix}-${blockName}-wrapper`, className, hasError && `${ThemeConstants.prefix}-${blockName}--${COMBOBOX_VARIANT.ERROR}`, `${ThemeConstants.prefix}-${blockName}--${variant}`, `focus-${focus}`, isMulti && 'combo-multi', expandMenuOutsideContainer && 'expanded-outside-container')
200
199
  }, containerProps), {}, {
201
200
  onMouseEnter: () => {
202
201
  this.handleHoverRef(undefined);
@@ -206,11 +205,11 @@ class DSComboBox extends React.Component {
206
205
  this.select = ref;
207
206
  },
208
207
  autoFocus: autoFocus,
209
- classNamePrefix: "".concat(ThemeConstants.prefix, "-").concat(blockName),
208
+ classNamePrefix: `${ThemeConstants.prefix}-${blockName}`,
210
209
  components: _objectSpread({
211
210
  Control,
212
211
  Menu: !options || options.length === 0 ? SelectMenu : props => /*#__PURE__*/_jsx("div", {
213
- className: "select-menu-combo ".concat(isMulti && 'select-menu-combo-multi'),
212
+ className: `select-menu-combo ${isMulti && 'select-menu-combo-multi'}`,
214
213
  onMouseLeave: () => {
215
214
  this.isHover = undefined;
216
215
  this.handleHover(undefined);
@@ -300,7 +299,7 @@ class DSComboBox extends React.Component {
300
299
  const width = calculateWidth(options);
301
300
  if (!width) return null;
302
301
  return {
303
- width: "".concat(width, "px")
302
+ width: `${width}px`
304
303
  };
305
304
  }
306
305
 
@@ -1,11 +1,10 @@
1
- import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
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 _jsx from '@babel/runtime/helpers/esm/jsx';
7
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
9
8
  import { useRef, useState, useEffect } from 'react';
10
9
  import { components } from 'react-select';
11
10
  import { FixedSizeList } from 'react-window';
@@ -79,7 +78,7 @@ const MenuList = props => {
79
78
  }
80
79
  }, void 0, isMulti && /*#__PURE__*/jsx(MultiSelectHeader, _objectSpread({}, props)), /*#__PURE__*/jsx(FixedSizeList, {
81
80
  ref: listRef,
82
- className: "combobox-menu-list ".concat(isMulti && 'combobox-menu-list-is-multi'),
81
+ className: `combobox-menu-list ${isMulti && 'combobox-menu-list-is-multi'}`,
83
82
  height: height,
84
83
  itemCount: options.length,
85
84
  itemData: itemData,
@@ -8,7 +8,7 @@ const MultiSelectHeader = props => {
8
8
  const count = props.children.filter(child => child.props.isSelected).length;
9
9
  return /*#__PURE__*/_jsx("div", {
10
10
  className: "combobox-multi-select-header"
11
- }, void 0, "".concat(count, " selected"));
11
+ }, void 0, `${count} selected`);
12
12
  };
13
13
 
14
14
  export { MultiSelectHeader as default };
@@ -1,5 +1,3 @@
1
- import 'core-js/modules/web.dom-collections.iterator.js';
2
-
3
1
  const getOptions = _ref => {
4
2
  let {
5
3
  showAllOption,
@@ -1,7 +1,6 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
2
  import 'core-js/modules/esnext.async-iterator.map.js';
3
3
  import 'core-js/modules/esnext.iterator.map.js';
4
- import 'core-js/modules/web.dom-collections.iterator.js';
5
4
  import 'core-js/modules/esnext.async-iterator.filter.js';
6
5
  import 'core-js/modules/esnext.iterator.constructor.js';
7
6
  import 'core-js/modules/esnext.iterator.filter.js';
@@ -3,7 +3,6 @@ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
3
3
  import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
4
4
  import 'core-js/modules/esnext.async-iterator.map.js';
5
5
  import 'core-js/modules/esnext.iterator.map.js';
6
- import 'core-js/modules/web.dom-collections.iterator.js';
7
6
  import 'core-js/modules/esnext.async-iterator.find.js';
8
7
  import 'core-js/modules/esnext.iterator.constructor.js';
9
8
  import 'core-js/modules/esnext.iterator.find.js';
@@ -61,7 +60,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
61
60
 
62
61
  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; }
63
62
  const blockName = 'em-ds-combobox';
64
- const container = "".concat(blockName, "-container");
63
+ const container = `${blockName}-container`;
65
64
 
66
65
  const getValues = (options, isMulti, valueProperty) => {
67
66
  if (!options) return null;
@@ -143,10 +142,8 @@ const DSComboBox2HOCLess = _ref => {
143
142
  const optionsChanged = useShouldRecalculate(isEqual(prevOptions, options));
144
143
  const SelectComponent = useMemo(() => isFreeSolo ? Creatable : Select, [isFreeSolo]);
145
144
  useEffect(() => {
146
- var _select$current;
147
-
148
145
  setInputInFocus(isFocused);
149
- if (isFocused) (_select$current = select.current) === null || _select$current === void 0 ? void 0 : _select$current.focus();
146
+ if (isFocused) select.current?.focus();
150
147
  }, [isFocused]);
151
148
  useEffect(() => {
152
149
  if (selectedValue && !isFreeSolo && !Array.isArray(selectedValue)) {
@@ -177,9 +174,7 @@ const DSComboBox2HOCLess = _ref => {
177
174
  }
178
175
 
179
176
  if (e.key === 'Tab' && menuOpen) {
180
- var _select$current2;
181
-
182
- (_select$current2 = select.current) === null || _select$current2 === void 0 ? void 0 : _select$current2.blur(); // manually invoking blur to ensure losing focus on tab.
177
+ select.current?.blur(); // manually invoking blur to ensure losing focus on tab.
183
178
  }
184
179
 
185
180
  if (e.key === 'Escape') setMenuOpen(false);
@@ -272,7 +267,7 @@ const DSComboBox2HOCLess = _ref => {
272
267
  value: ctx
273
268
  }, void 0, /*#__PURE__*/_jsx(Manager, {}, void 0, /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
274
269
  ref: measureRef,
275
- className: cx("".concat(container), inputInFocus && 'in-focus', hasError && 'with-error', disabled && 'is-disabled', className),
270
+ className: cx(`${container}`, inputInFocus && 'in-focus', hasError && 'with-error', disabled && 'is-disabled', className),
276
271
  onBlur: handleBlur,
277
272
  "data-testid": "combobox",
278
273
  role: "combobox"
@@ -359,7 +354,7 @@ const DSComboBox2HOCLess = _ref => {
359
354
  const width = calculateWidth(options);
360
355
  if (!width) return null;
361
356
  return {
362
- width: "".concat(width, "px")
357
+ width: `${width}px`
363
358
  };
364
359
  }
365
360
 
@@ -17,8 +17,6 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
17
17
  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; }
18
18
 
19
19
  const Content = _ref => {
20
- var _rest$selectProps;
21
-
22
20
  let {
23
21
  scheduleUpdate,
24
22
  styleMenu
@@ -28,7 +26,7 @@ const Content = _ref => {
28
26
  useEffect(() => {
29
27
  // trigger popper update on input change PUI-4069
30
28
  scheduleUpdate();
31
- }, [rest === null || rest === void 0 ? void 0 : (_rest$selectProps = rest.selectProps) === null || _rest$selectProps === void 0 ? void 0 : _rest$selectProps.inputValue]);
29
+ }, [rest?.selectProps?.inputValue]);
32
30
  return /*#__PURE__*/_jsx("div", {
33
31
  style: styleMenu,
34
32
  "data-testid": "combobox-menu"
@@ -19,8 +19,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
19
19
  const isOptionAGroup = option => option && option.type && option.type.name === 'Group';
20
20
 
21
21
  const CustomOption = _ref => {
22
- var _option$props, _option$props2, _option$props2$innerP, _option$props3, _option$props3$innerP;
23
-
24
22
  let {
25
23
  index,
26
24
  data,
@@ -37,10 +35,10 @@ const CustomOption = _ref => {
37
35
  const {
38
36
  value
39
37
  } = useContext(DropDownContext);
40
- const isSelected = (value === null || value === void 0 ? void 0 : value.label) === (option === null || option === void 0 ? void 0 : (_option$props = option.props) === null || _option$props === void 0 ? void 0 : _option$props.label); // react-select performance optimization
38
+ const isSelected = value?.label === option?.props?.label; // react-select performance optimization
41
39
 
42
- option === null || option === void 0 ? true : (_option$props2 = option.props) === null || _option$props2 === void 0 ? true : (_option$props2$innerP = _option$props2.innerProps) === null || _option$props2$innerP === void 0 ? true : delete _option$props2$innerP.onMouseMove;
43
- option === null || option === void 0 ? true : (_option$props3 = option.props) === null || _option$props3 === void 0 ? true : (_option$props3$innerP = _option$props3.innerProps) === null || _option$props3$innerP === void 0 ? true : delete _option$props3$innerP.onMouseOver;
40
+ delete option?.props?.innerProps?.onMouseMove;
41
+ delete option?.props?.innerProps?.onMouseOver;
44
42
  const renderOptionStyle = isOptionAGroup(option) ? {} : style;
45
43
 
46
44
  const optionProps = _objectSpread(_objectSpread({}, option.props.innerProps), {}, {
@@ -49,10 +47,8 @@ const CustomOption = _ref => {
49
47
  role: 'option',
50
48
  'aria-selected': isSelected,
51
49
  onClick: e => {
52
- var _option$props4, _option$props4$innerP;
53
-
54
50
  e.stopPropagation();
55
- if (option !== null && option !== void 0 && (_option$props4 = option.props) !== null && _option$props4 !== void 0 && (_option$props4$innerP = _option$props4.innerProps) !== null && _option$props4$innerP !== void 0 && _option$props4$innerP.onClick) option.props.innerProps.onClick(e);
51
+ if (option?.props?.innerProps?.onClick) option.props.innerProps.onClick(e);
56
52
  }
57
53
  });
58
54
 
@@ -1,12 +1,10 @@
1
- import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
3
- import 'core-js/modules/esnext.async-iterator.find.js';
4
- import 'core-js/modules/esnext.iterator.constructor.js';
5
- import 'core-js/modules/esnext.iterator.find.js';
6
1
  import 'core-js/modules/esnext.async-iterator.filter.js';
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 _jsx from '@babel/runtime/helpers/esm/jsx';
7
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
10
8
  import React, { useContext } from 'react';
11
9
  import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
12
10
  import { DSCheckbox } from '../../../Checkbox/DSCheckbox.js';
@@ -33,11 +31,7 @@ const CustomOptionMulti = _ref => {
33
31
  const {
34
32
  value
35
33
  } = useContext(DropDownContext);
36
- const isSelected = !!(value !== null && value !== void 0 && value.find(item => {
37
- var _option$props;
38
-
39
- return item.label === (option === null || option === void 0 ? void 0 : (_option$props = option.props) === null || _option$props === void 0 ? void 0 : _option$props.label);
40
- }));
34
+ const isSelected = !!value?.find(item => item.label === option?.props?.label);
41
35
 
42
36
  const optionProps = _objectSpread(_objectSpread({}, option.props.innerProps), {}, {
43
37
  style,
@@ -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 { useContext, useState } from 'react';
11
10
  import { get } from 'lodash';
12
11
  import { ChevronSmallDown } from '@elliemae/ds-icons';
@@ -72,7 +71,7 @@ const DropdownIndicator = _ref => {
72
71
  "data-testid": "combobox-dropdown-btn",
73
72
  "aria-label": "dropdown-indicator",
74
73
  buttonType: "text",
75
- className: "dropdown-indicator ".concat(get(selectProps, 'menuIsOpen', false) && !inputInFocus ? 'active' : ''),
74
+ className: `dropdown-indicator ${get(selectProps, 'menuIsOpen', false) && !inputInFocus ? 'active' : ''}`,
76
75
  icon: _ChevronSmallDown || (_ChevronSmallDown = /*#__PURE__*/_jsx(ChevronSmallDown, {})),
77
76
  innerRef: innerRef,
78
77
  onClick: handleOnClick,
@@ -1,11 +1,10 @@
1
- import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
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 _jsx from '@babel/runtime/helpers/esm/jsx';
7
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
9
8
  import React, { useRef, useState, useEffect } from 'react';
10
9
  import { components } from 'react-select';
11
10
  import { FixedSizeList } from 'react-window';
@@ -20,7 +19,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
20
19
 
21
20
  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; }
22
21
  const createItemData = memoize((items, options) => {
23
- if (items !== null && items !== void 0 && items.findIndex) {
22
+ if (items?.findIndex) {
24
23
  const index = items.findIndex(item => item.props.isFocused);
25
24
  if (index > -1) return {
26
25
  items,
@@ -109,7 +108,7 @@ const MenuList = /*#__PURE__*/React.memo(props => {
109
108
  scrollTo(listRef);
110
109
  }
111
110
  },
112
- className: "combobox-menu-list ".concat(isMulti && 'combobox-menu-list-is-multi'),
111
+ className: `combobox-menu-list ${isMulti && 'combobox-menu-list-is-multi'}`,
113
112
  height: height,
114
113
  itemCount: options.length,
115
114
  itemData: itemData,
@@ -21,7 +21,7 @@ const MultiSelectHeader = props => {
21
21
  const isClearButtonDisabled = selectedItems === 0;
22
22
  const isAllButtonDisabled = selectedItems === totalItems;
23
23
  return /*#__PURE__*/_jsx(HeaderWrapper, {}, void 0, /*#__PURE__*/_jsx(ContentWrapper, {}, void 0, /*#__PURE__*/_jsx(HeaderTitle, {}, void 0, /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
24
- value: "".concat(selectedItems, " selected")
24
+ value: `${selectedItems} selected`
25
25
  })), !selectAllDisabled && /*#__PURE__*/_jsx(ActionButtons, {}, void 0, /*#__PURE__*/_jsx(StyledButton, {
26
26
  "data-testid": "combobox-all-btn",
27
27
  buttonType: "text",
@@ -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 { useRef, useContext, useState } from 'react';
10
9
  import { components } from 'react-select';
11
10
  import { cx } from '@elliemae/ds-utilities';
@@ -1,5 +1,3 @@
1
- import 'core-js/modules/web.dom-collections.iterator.js';
2
-
3
1
  const getOptions = _ref => {
4
2
  let {
5
3
  showAllOption,
@@ -1,7 +1,6 @@
1
1
  import 'core-js/modules/esnext.async-iterator.reduce.js';
2
2
  import 'core-js/modules/esnext.iterator.constructor.js';
3
3
  import 'core-js/modules/esnext.iterator.reduce.js';
4
- import 'core-js/modules/web.dom-collections.iterator.js';
5
4
 
6
5
  /* eslint-disable no-restricted-syntax */
7
6
 
@@ -38,9 +37,7 @@ const useMenuListHeight = (elements, maxElements, itemSize, remainingHeight) =>
38
37
  let calculatedHeight = itemSize * elementSlotsToShow;
39
38
 
40
39
  if (elementSlotsToShow === 1) {
41
- var _elements$, _elements$$props, _elements$$props$data;
42
-
43
- if ((_elements$ = elements[0]) !== null && _elements$ !== void 0 && (_elements$$props = _elements$.props) !== null && _elements$$props !== void 0 && (_elements$$props$data = _elements$$props.data) !== null && _elements$$props$data !== void 0 && _elements$$props$data.hasSeparator) calculatedHeight += 40;else calculatedHeight += 25;
40
+ if (elements[0]?.props?.data?.hasSeparator) calculatedHeight += 40;else calculatedHeight += 25;
44
41
  } // add pixels for group type (title and padding)
45
42
 
46
43
 
@@ -48,17 +45,15 @@ const useMenuListHeight = (elements, maxElements, itemSize, remainingHeight) =>
48
45
  let groupElementsShowed = 0;
49
46
 
50
47
  for (const group of elements) {
51
- var _currentOptions$props, _currentOptions$props2, _currentOptions$props3, _currentOptions$props4;
52
-
53
48
  if (groupElementsShowed >= elementSlotsToShow) {
54
49
  break;
55
50
  }
56
51
 
57
52
  const currentOptions = group;
58
- groupElementsShowed += (currentOptions === null || currentOptions === void 0 ? void 0 : (_currentOptions$props = currentOptions.props) === null || _currentOptions$props === void 0 ? void 0 : (_currentOptions$props2 = _currentOptions$props.options) === null || _currentOptions$props2 === void 0 ? void 0 : _currentOptions$props2.length) || 0;
53
+ groupElementsShowed += currentOptions?.props?.options?.length || 0;
59
54
  calculatedHeight += GROUP_PADDING + GROUP_TITLE;
60
55
 
61
- if (currentOptions !== null && currentOptions !== void 0 && (_currentOptions$props3 = currentOptions.props) !== null && _currentOptions$props3 !== void 0 && (_currentOptions$props4 = _currentOptions$props3.data) !== null && _currentOptions$props4 !== void 0 && _currentOptions$props4.hasSeparator) {
56
+ if (currentOptions?.props?.data?.hasSeparator) {
62
57
  calculatedHeight += SEPARATOR;
63
58
  }
64
59
  }
@@ -57,7 +57,7 @@ function ComboBoxFreeSolo(_ref) {
57
57
  disabled = false,
58
58
  menuIsOpen = false,
59
59
  placeholder = 'Select values',
60
- formatCreateLabel = val => "Create ".concat(val),
60
+ formatCreateLabel = val => `Create ${val}`,
61
61
  maxOptions = undefined
62
62
  } = _ref,
63
63
  rest = _objectWithoutProperties(_ref, _excluded);
@@ -1,12 +1,11 @@
1
- import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
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 _jsx from '@babel/runtime/helpers/esm/jsx';
7
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
8
+ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
10
9
  import { useState, useEffect, useCallback } from 'react';
11
10
  import { describe } from 'react-desc';
12
11
  import { runAll } from '@elliemae/ds-utilities';
@@ -61,7 +60,7 @@ const DSDateInput = _ref => {
61
60
  inputOnChange(date);
62
61
  }, []);
63
62
  return /*#__PURE__*/_jsx(DSInput, {
64
- className: "".concat(className, " input-date-input "),
63
+ className: `${className} input-date-input `,
65
64
  clearable: clearable,
66
65
  containerProps: containerProps,
67
66
  customInputType: _ref2 => {
@@ -1,13 +1,12 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.filter.js';
3
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
4
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
5
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
6
  import _jsx from '@babel/runtime/helpers/esm/jsx';
3
- import 'core-js/modules/web.dom-collections.iterator.js';
4
7
  import 'core-js/modules/esnext.async-iterator.reduce.js';
5
8
  import 'core-js/modules/esnext.iterator.constructor.js';
6
9
  import 'core-js/modules/esnext.iterator.reduce.js';
7
- import 'core-js/modules/esnext.async-iterator.filter.js';
8
- import 'core-js/modules/esnext.iterator.filter.js';
9
- import 'core-js/modules/esnext.async-iterator.for-each.js';
10
- import 'core-js/modules/esnext.iterator.for-each.js';
11
10
  import React, { useState, useEffect, useCallback, createElement } from 'react';
12
11
  import { aggregatedClasses } from '@elliemae/ds-classnames';
13
12
  import { usePrevious } from '@elliemae/ds-utilities';
@@ -1,4 +1,3 @@
1
- import 'core-js/modules/web.dom-collections.iterator.js';
2
1
  import 'core-js/modules/esnext.async-iterator.some.js';
3
2
  import 'core-js/modules/esnext.iterator.constructor.js';
4
3
  import 'core-js/modules/esnext.iterator.some.js';
@@ -172,7 +171,7 @@ const handleCompletedDate = (time, date, show, INTERNAL_V2_NO_MUTATION) => {
172
171
  showDay
173
172
  } = show;
174
173
  if (time && !year && !month && !day) return '';
175
- newDate.value = "".concat(year, "-").concat(month, "-").concat(day);
174
+ newDate.value = `${year}-${month}-${day}`;
176
175
  if (showMonth && month) newDate.month(parseInt(month - 1, 10));
177
176
  if (showDay && day) newDate.date(parseInt(day, 10));
178
177
  if (showYear && year) newDate.year(parseInt(year, 10));
@@ -1,13 +1,12 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.filter.js';
3
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
4
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
5
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
6
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
3
- import 'core-js/modules/web.dom-collections.iterator.js';
4
7
  import 'core-js/modules/esnext.async-iterator.reduce.js';
5
8
  import 'core-js/modules/esnext.iterator.constructor.js';
6
9
  import 'core-js/modules/esnext.iterator.reduce.js';
7
- import 'core-js/modules/esnext.async-iterator.filter.js';
8
- import 'core-js/modules/esnext.iterator.filter.js';
9
- import 'core-js/modules/esnext.async-iterator.for-each.js';
10
- import 'core-js/modules/esnext.iterator.for-each.js';
11
10
  import React, { useState, useEffect, createElement } from 'react';
12
11
  import moment from 'moment';
13
12
  import { getFormattedMonth, getShouldShortcircuitMonth, focusNextInput, getFormattedDay, getShouldShortcircuitDay, getFormattedYear, commonInputProps, triggerOnBlur } from './utils.js';
@@ -47,7 +46,7 @@ const DateInputs = _ref => {
47
46
  }, [dayRef.current]);
48
47
  const triggerOnDateChange = React.useCallback(() => {
49
48
  if (month && day && year && haveInputsOnChangeTriggered) {
50
- const momentValue = moment("".concat(month).concat(day).concat(year), 'MMDDYYYY', true);
49
+ const momentValue = moment(`${month}${day}${year}`, 'MMDDYYYY', true);
51
50
 
52
51
  if (momentValue.isValid()) {
53
52
  onDateChange(momentValue);
@@ -90,15 +89,15 @@ const DateInputs = _ref => {
90
89
  // When component mounts haveInputsOnChangeTriggered is set to false
91
90
  // so this is not triggered on mount but is triggered with all other changes
92
91
  if (haveInputsOnChangeTriggered) {
93
- const momentValue = moment("".concat(month).concat(day).concat(year), FORMAT, true);
94
- onChange("".concat(month).concat(day).concat(year), momentValue.isValid() ? momentValue : null);
92
+ const momentValue = moment(`${month}${day}${year}`, FORMAT, true);
93
+ onChange(`${month}${day}${year}`, momentValue.isValid() ? momentValue : null);
95
94
  }
96
95
  }, [day, month, year]);
97
96
  useEffect(() => {
98
97
  triggerOnDateChange();
99
98
  }, [onChangeDateTrigger]);
100
99
  useEffect(() => {
101
- if (time && time !== "".concat(month).concat(day).concat(year) && moment(time, 'MMDDYYYY').isValid()) {
100
+ if (time && time !== `${month}${day}${year}` && moment(time, 'MMDDYYYY').isValid()) {
102
101
  const values = String(time || '');
103
102
  if (values.slice(0, 2)) setMonth(values.slice(0, 2));
104
103
  if (values.slice(2, 4)) setDay(values.slice(2, 4));
@@ -11,7 +11,10 @@ const DateInputWrapper = /*#__PURE__*/styled(Grid).withConfig({
11
11
  disabled,
12
12
  theme
13
13
  } = _ref;
14
- return disabled ? "\n background: ".concat(theme.colors.neutral[100], ";\n color: ").concat(theme.colors.neutral[500], ";\n ") : '';
14
+ return disabled ? `
15
+ background: ${theme.colors.neutral[100]};
16
+ color: ${theme.colors.neutral[500]};
17
+ ` : '';
15
18
  });
16
19
  const DateInputInput = /*#__PURE__*/styled.input.withConfig({
17
20
  componentId: "sc-ads423-2"
@@ -20,7 +23,10 @@ const DateInputInput = /*#__PURE__*/styled.input.withConfig({
20
23
  disabled,
21
24
  theme
22
25
  } = _ref2;
23
- return disabled ? "\n background: ".concat(theme.colors.neutral[100], ";\n color: ").concat(theme.colors.neutral[500], ";\n ") : '';
26
+ return disabled ? `
27
+ background: ${theme.colors.neutral[100]};
28
+ color: ${theme.colors.neutral[500]};
29
+ ` : '';
24
30
  }, _ref3 => {
25
31
  let {
26
32
  theme