@elliemae/ds-controlled-form 2.4.2-rc.12 → 2.4.2-rc.13

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 (194) hide show
  1. package/cjs/autocomplete/config/useAutocomplete.js +0 -1
  2. package/cjs/autocomplete/parts/A11yFocusedOption.js +9 -6
  3. package/cjs/autocomplete/parts/container/Container.js +1 -1
  4. package/cjs/autocomplete/parts/container/useKeyboardNavigation.js +2 -2
  5. package/cjs/autocomplete/parts/menu-list/MenuList.js +3 -5
  6. package/cjs/autocomplete/parts/menu-list/styled.js +2 -2
  7. package/cjs/autocomplete/parts/menu-list/useItemRenderer.js +1 -1
  8. package/cjs/checkbox/config/useValidateProps.js +6 -3
  9. package/cjs/checkbox/styles.js +72 -28
  10. package/cjs/checkbox/utils/styleHelpers.js +20 -2
  11. package/cjs/combobox/config/useComboBox.js +1 -2
  12. package/cjs/combobox/config/useCorrectOptions.js +1 -2
  13. package/cjs/combobox/parts/A11yFocusedOption.js +4 -4
  14. package/cjs/combobox/parts/A11ySelectedValues.js +2 -2
  15. package/cjs/combobox/parts/DropdownIndicator.js +13 -5
  16. package/cjs/combobox/parts/container/Container.js +1 -1
  17. package/cjs/combobox/parts/container/styled.js +11 -10
  18. package/cjs/combobox/parts/controls/Controls.js +3 -9
  19. package/cjs/combobox/parts/controls/styled.js +54 -22
  20. package/cjs/combobox/parts/controls/useOnPillsNavigation.js +4 -12
  21. package/cjs/combobox/parts/controls-input/styled.js +41 -11
  22. package/cjs/combobox/parts/controls-input/useControlsInput.js +1 -5
  23. package/cjs/combobox/parts/controls-input/useKeyboardNavigation.js +4 -6
  24. package/cjs/combobox/parts/controls-input/useMaskedOnChange.js +1 -1
  25. package/cjs/combobox/parts/header-list/HeaderList.js +1 -1
  26. package/cjs/combobox/parts/header-list/styled.js +39 -10
  27. package/cjs/combobox/parts/header-list/useHeaderListHandlers.js +4 -11
  28. package/cjs/combobox/parts/menu-list/MenuList.js +2 -2
  29. package/cjs/combobox/parts/menu-list/styled.js +37 -21
  30. package/cjs/combobox/parts/menu-list/useItemRenderer.js +3 -3
  31. package/cjs/combobox/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +1 -1
  32. package/cjs/combobox/parts/multi-selected-values-container/RemovableSelectedValuePill.js +1 -3
  33. package/cjs/combobox/parts/multi-selected-values-container/useGroupPills.js +1 -2
  34. package/cjs/combobox/parts/styled.js +6 -7
  35. package/cjs/combobox/sharedTypes.js +2 -2
  36. package/cjs/combobox/utils/listHelper.js +4 -9
  37. package/cjs/date-range-picker/config/useRangePickerLogic.js +4 -8
  38. package/cjs/date-range-picker/parts/ControlledDateRangeCalendar.js +0 -2
  39. package/cjs/date-range-picker/parts/ControlledDateRangeFromDate.js +0 -2
  40. package/cjs/date-range-picker/parts/ControlledDateRangeToDate.js +0 -2
  41. package/cjs/date-time-picker/config/useChangeHandlers.js +3 -3
  42. package/cjs/date-time-picker/config/useControlledDateTimePicker.js +1 -1
  43. package/cjs/date-time-picker/config/useFocusTracker.js +1 -1
  44. package/cjs/date-time-picker/config/useGetDestructuredValues.js +6 -6
  45. package/cjs/date-time-picker/config/useGetPropsBasedOnType.js +1 -1
  46. package/cjs/date-time-picker/config/useGetReferences.js +1 -1
  47. package/cjs/date-time-picker/config/useRelevantValueFromProps.js +1 -1
  48. package/cjs/date-time-picker/config/useValidateProps.js +42 -11
  49. package/cjs/date-time-picker/parts/ClearButton/ClearButton.js +1 -3
  50. package/cjs/date-time-picker/parts/DateInputs/DDInput.js +3 -7
  51. package/cjs/date-time-picker/parts/DateInputs/MMInput.js +3 -7
  52. package/cjs/date-time-picker/parts/DateInputs/YYYYInput.js +3 -7
  53. package/cjs/date-time-picker/parts/DateInputs/useDateInputs.js +13 -23
  54. package/cjs/date-time-picker/parts/Pickers/Calendar/CalendarDaysList.js +4 -4
  55. package/cjs/date-time-picker/parts/Pickers/Calendar/CalendarHead.js +6 -14
  56. package/cjs/date-time-picker/parts/Pickers/Calendar/CalendarIconTrigger.js +1 -1
  57. package/cjs/date-time-picker/parts/Pickers/Calendar/Day.js +8 -10
  58. package/cjs/date-time-picker/parts/Pickers/Calendar/Styleds.js +44 -15
  59. package/cjs/date-time-picker/parts/Pickers/Calendar/useConfigCalendarCTX.js +1 -2
  60. package/cjs/date-time-picker/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js +2 -1
  61. package/cjs/date-time-picker/parts/Pickers/Calendar/useFocusLogic.js +0 -1
  62. package/cjs/date-time-picker/parts/Pickers/Calendar/usePopperTriggerLogic.js +3 -5
  63. package/cjs/date-time-picker/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +1 -1
  64. package/cjs/date-time-picker/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js +3 -5
  65. package/cjs/date-time-picker/parts/Pickers/TimeWheel/HoursList.js +5 -7
  66. package/cjs/date-time-picker/parts/Pickers/TimeWheel/MeridiemList.js +6 -8
  67. package/cjs/date-time-picker/parts/Pickers/TimeWheel/MinutesList.js +5 -7
  68. package/cjs/date-time-picker/parts/Pickers/TimeWheel/SecondsList.js +2 -2
  69. package/cjs/date-time-picker/parts/Pickers/TimeWheel/Styleds.js +47 -15
  70. package/cjs/date-time-picker/parts/Pickers/TimeWheel/TimeWheelContent.js +1 -1
  71. package/cjs/date-time-picker/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js +1 -1
  72. package/cjs/date-time-picker/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js +3 -3
  73. package/cjs/date-time-picker/parts/Pickers/TimeWheel/usePopperTriggerLogic.js +2 -5
  74. package/cjs/date-time-picker/parts/Styleds.js +12 -6
  75. package/cjs/date-time-picker/parts/TimeInputs/HHInput.js +2 -4
  76. package/cjs/date-time-picker/parts/TimeInputs/MeridiemInput.js +3 -8
  77. package/cjs/date-time-picker/parts/TimeInputs/MinutesInput.js +3 -7
  78. package/cjs/date-time-picker/parts/TimeInputs/useTimeInputs.js +14 -26
  79. package/cjs/date-time-picker/utils/dateHelpers.js +17 -34
  80. package/cjs/date-time-picker/utils/hooks/useOnClickOutside.js +1 -3
  81. package/cjs/date-time-picker/utils/stringHelpers.js +5 -11
  82. package/cjs/input-group/styled.js +79 -13
  83. package/cjs/large-text-input/DSControlledLargeTextInput.js +1 -1
  84. package/cjs/large-text-input/styles.js +27 -13
  85. package/cjs/mask-hook/hooks/useNumberMask.js +1 -5
  86. package/cjs/mask-hook/hooks/usePhoneMask.js +1 -4
  87. package/cjs/mask-hook/hooks/useRegExpMask.js +4 -7
  88. package/cjs/mask-hook/hooks/useSSNMask.js +1 -4
  89. package/cjs/mask-hook/hooks/useZipCodeMask.js +1 -4
  90. package/cjs/mask-hook/utils/addSpecialCharacters.js +0 -1
  91. package/cjs/mask-hook/utils/flatStringArray.js +0 -1
  92. package/cjs/text-input/config/useInputText.js +0 -1
  93. package/cjs/text-input/styled/borders.js +18 -11
  94. package/cjs/text-input/styled/components.js +49 -10
  95. package/cjs/toggle/ControlledToggle.js +2 -3
  96. package/cjs/toggle/styles.js +7 -5
  97. package/esm/autocomplete/config/useAutocomplete.js +0 -1
  98. package/esm/autocomplete/parts/A11yFocusedOption.js +9 -5
  99. package/esm/autocomplete/parts/container/Container.js +1 -1
  100. package/esm/autocomplete/parts/container/useKeyboardNavigation.js +2 -2
  101. package/esm/autocomplete/parts/menu-list/MenuList.js +3 -5
  102. package/esm/autocomplete/parts/menu-list/styled.js +2 -2
  103. package/esm/autocomplete/parts/menu-list/useItemRenderer.js +1 -1
  104. package/esm/checkbox/config/useValidateProps.js +6 -3
  105. package/esm/checkbox/styles.js +72 -24
  106. package/esm/checkbox/utils/styleHelpers.js +20 -2
  107. package/esm/combobox/config/useComboBox.js +0 -1
  108. package/esm/combobox/config/useCorrectOptions.js +1 -2
  109. package/esm/combobox/parts/A11yFocusedOption.js +4 -4
  110. package/esm/combobox/parts/A11ySelectedValues.js +2 -2
  111. package/esm/combobox/parts/DropdownIndicator.js +13 -4
  112. package/esm/combobox/parts/container/Container.js +1 -1
  113. package/esm/combobox/parts/container/styled.js +11 -6
  114. package/esm/combobox/parts/controls/Controls.js +3 -9
  115. package/esm/combobox/parts/controls/styled.js +54 -18
  116. package/esm/combobox/parts/controls/useOnPillsNavigation.js +4 -12
  117. package/esm/combobox/parts/controls-input/styled.js +41 -7
  118. package/esm/combobox/parts/controls-input/useControlsInput.js +1 -5
  119. package/esm/combobox/parts/controls-input/useKeyboardNavigation.js +4 -6
  120. package/esm/combobox/parts/controls-input/useMaskedOnChange.js +1 -1
  121. package/esm/combobox/parts/header-list/HeaderList.js +1 -1
  122. package/esm/combobox/parts/header-list/styled.js +40 -7
  123. package/esm/combobox/parts/header-list/useHeaderListHandlers.js +4 -11
  124. package/esm/combobox/parts/menu-list/MenuList.js +2 -2
  125. package/esm/combobox/parts/menu-list/styled.js +37 -17
  126. package/esm/combobox/parts/menu-list/useItemRenderer.js +3 -3
  127. package/esm/combobox/parts/multi-selected-values-container/MultiSelectedValuesContainer.js +1 -1
  128. package/esm/combobox/parts/multi-selected-values-container/RemovableSelectedValuePill.js +1 -3
  129. package/esm/combobox/parts/multi-selected-values-container/useGroupPills.js +1 -2
  130. package/esm/combobox/parts/styled.js +6 -3
  131. package/esm/combobox/sharedTypes.js +2 -2
  132. package/esm/combobox/utils/listHelper.js +4 -9
  133. package/esm/date-range-picker/config/useRangePickerLogic.js +3 -7
  134. package/esm/date-range-picker/parts/ControlledDateRangeCalendar.js +0 -2
  135. package/esm/date-range-picker/parts/ControlledDateRangeFromDate.js +0 -2
  136. package/esm/date-range-picker/parts/ControlledDateRangeToDate.js +0 -2
  137. package/esm/date-time-picker/config/useChangeHandlers.js +3 -3
  138. package/esm/date-time-picker/config/useControlledDateTimePicker.js +1 -1
  139. package/esm/date-time-picker/config/useFocusTracker.js +1 -1
  140. package/esm/date-time-picker/config/useGetDestructuredValues.js +6 -6
  141. package/esm/date-time-picker/config/useGetPropsBasedOnType.js +1 -1
  142. package/esm/date-time-picker/config/useGetReferences.js +1 -1
  143. package/esm/date-time-picker/config/useRelevantValueFromProps.js +1 -1
  144. package/esm/date-time-picker/config/useValidateProps.js +42 -11
  145. package/esm/date-time-picker/parts/ClearButton/ClearButton.js +1 -3
  146. package/esm/date-time-picker/parts/DateInputs/DDInput.js +3 -7
  147. package/esm/date-time-picker/parts/DateInputs/MMInput.js +3 -7
  148. package/esm/date-time-picker/parts/DateInputs/YYYYInput.js +3 -7
  149. package/esm/date-time-picker/parts/DateInputs/useDateInputs.js +13 -23
  150. package/esm/date-time-picker/parts/Pickers/Calendar/CalendarDaysList.js +4 -4
  151. package/esm/date-time-picker/parts/Pickers/Calendar/CalendarHead.js +6 -14
  152. package/esm/date-time-picker/parts/Pickers/Calendar/CalendarIconTrigger.js +1 -1
  153. package/esm/date-time-picker/parts/Pickers/Calendar/Day.js +8 -10
  154. package/esm/date-time-picker/parts/Pickers/Calendar/Styleds.js +44 -14
  155. package/esm/date-time-picker/parts/Pickers/Calendar/useConfigCalendarCTX.js +0 -1
  156. package/esm/date-time-picker/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js +2 -1
  157. package/esm/date-time-picker/parts/Pickers/Calendar/useFocusLogic.js +0 -1
  158. package/esm/date-time-picker/parts/Pickers/Calendar/usePopperTriggerLogic.js +3 -5
  159. package/esm/date-time-picker/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +1 -1
  160. package/esm/date-time-picker/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js +3 -5
  161. package/esm/date-time-picker/parts/Pickers/TimeWheel/HoursList.js +5 -7
  162. package/esm/date-time-picker/parts/Pickers/TimeWheel/MeridiemList.js +6 -8
  163. package/esm/date-time-picker/parts/Pickers/TimeWheel/MinutesList.js +5 -7
  164. package/esm/date-time-picker/parts/Pickers/TimeWheel/SecondsList.js +2 -2
  165. package/esm/date-time-picker/parts/Pickers/TimeWheel/Styleds.js +47 -14
  166. package/esm/date-time-picker/parts/Pickers/TimeWheel/TimeWheelContent.js +1 -1
  167. package/esm/date-time-picker/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js +1 -1
  168. package/esm/date-time-picker/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js +3 -3
  169. package/esm/date-time-picker/parts/Pickers/TimeWheel/usePopperTriggerLogic.js +2 -5
  170. package/esm/date-time-picker/parts/Styleds.js +12 -6
  171. package/esm/date-time-picker/parts/TimeInputs/HHInput.js +2 -4
  172. package/esm/date-time-picker/parts/TimeInputs/MeridiemInput.js +3 -8
  173. package/esm/date-time-picker/parts/TimeInputs/MinutesInput.js +3 -7
  174. package/esm/date-time-picker/parts/TimeInputs/useTimeInputs.js +14 -26
  175. package/esm/date-time-picker/utils/dateHelpers.js +17 -34
  176. package/esm/date-time-picker/utils/hooks/useOnClickOutside.js +1 -3
  177. package/esm/date-time-picker/utils/stringHelpers.js +5 -11
  178. package/esm/input-group/styled.js +79 -9
  179. package/esm/large-text-input/DSControlledLargeTextInput.js +1 -1
  180. package/esm/large-text-input/styles.js +27 -9
  181. package/esm/mask-hook/hooks/useNumberMask.js +1 -5
  182. package/esm/mask-hook/hooks/usePhoneMask.js +1 -4
  183. package/esm/mask-hook/hooks/useRegExpMask.js +4 -7
  184. package/esm/mask-hook/hooks/useSSNMask.js +1 -4
  185. package/esm/mask-hook/hooks/useZipCodeMask.js +1 -4
  186. package/esm/mask-hook/utils/addSpecialCharacters.js +0 -1
  187. package/esm/mask-hook/utils/flatStringArray.js +0 -1
  188. package/esm/text-input/config/useInputText.js +0 -1
  189. package/esm/text-input/styled/borders.js +18 -7
  190. package/esm/text-input/styled/components.js +49 -6
  191. package/esm/toggle/ControlledToggle.js +0 -1
  192. package/esm/toggle/styles.js +7 -5
  193. package/package.json +15 -15
  194. package/types/text-input/config/useInputText.d.ts +3 -3
@@ -33,7 +33,7 @@ const useMaskedOnChange = () => {
33
33
  valueSetter: setInputValue,
34
34
  onChange: handleOnChangeMask
35
35
  });
36
- return (onChangeMask === null || onChangeMask === void 0 ? void 0 : onChangeMask.onChange) || handleOnChange;
36
+ return onChangeMask?.onChange || handleOnChange;
37
37
  };
38
38
 
39
39
  export { useMaskedOnChange };
@@ -51,7 +51,7 @@ const HeaderList = () => {
51
51
  size: BUTTON_SIZES.S,
52
52
  "data-testid": ComboboxDataTestid.MULTISELECT.SHOW_SELECTED_OPTIONS_TOGGLE,
53
53
  innerRef: toggleSelectionButtonRef
54
- }, void 0, !showSelectedOptions ? "SHOW SELECTED [".concat(multiSelectedValues.length, "]") : 'SHOW ALL') : _StyledNoOptionsSelec || (_StyledNoOptionsSelec = /*#__PURE__*/_jsx(StyledNoOptionsSelected, {}, void 0, "0 SELECTED"))));
54
+ }, void 0, !showSelectedOptions ? `SHOW SELECTED [${multiSelectedValues.length}]` : 'SHOW ALL') : _StyledNoOptionsSelec || (_StyledNoOptionsSelec = /*#__PURE__*/_jsx(StyledNoOptionsSelected, {}, void 0, "0 SELECTED"))));
55
55
  };
56
56
 
57
57
  export { HeaderList };
@@ -1,12 +1,45 @@
1
- import _taggedTemplateLiteral from '@babel/runtime/helpers/esm/taggedTemplateLiteral';
2
1
  import { styled } from '@elliemae/ds-system';
3
2
  import { DSButtonV2 } from '@elliemae/ds-button';
4
3
 
5
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
6
- const StyledHeaderListWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n position: fixed;\n top: 0;\n z-index: 10;\n justify-content: space-between;\n padding: 0px 12px 0px 16px;\n width: 100%;\n height: 28px;\n background-color: #fff;\n box-shadow: 0 4px 2px -4px ", ";\n overflow-x: hidden;\n\n & button {\n font-size: 13px;\n }\n"])), props => props.theme.colors.neutral[700]);
7
- const StyledButtonSelection = styled(DSButtonV2)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border-radius: 0px;\n padding: 0 ", ";\n margin: 0;\n align-items: center;\n transition: unset;\n &:hover:not([disabled]) {\n background-color: transparent;\n color: ", ";\n }\n"])), props => props.theme.space.xxs, props => props.theme.colors.brand['700']);
8
- const StyledSelectedItems = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
9
- const StyledNoOptionsSelected = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: 0 ", ";\n"])), props => props.theme.space.xxs);
10
- const StyledSelectAllCheckbox = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
4
+ /* eslint-disable max-len */
5
+ const StyledHeaderListWrapper = styled.div`
6
+ display: flex;
7
+ position: fixed;
8
+ top: 0;
9
+ z-index: 10;
10
+ justify-content: space-between;
11
+ padding: 0px 12px 0px 16px;
12
+ width: 100%;
13
+ height: 28px;
14
+ background-color: #fff;
15
+ box-shadow: 0 4px 2px -4px ${props => props.theme.colors.neutral[700]};
16
+ overflow-x: hidden;
17
+
18
+ & button {
19
+ font-size: 13px;
20
+ }
21
+ `;
22
+ const StyledButtonSelection = styled(DSButtonV2)`
23
+ border-radius: 0px;
24
+ padding: 0 ${props => props.theme.space.xxs};
25
+ margin: 0;
26
+ align-items: center;
27
+ transition: unset;
28
+ &:hover:not([disabled]) {
29
+ background-color: transparent;
30
+ color: ${props => props.theme.colors.brand['700']};
31
+ }
32
+ `;
33
+ const StyledSelectedItems = styled.div`
34
+ display: flex;
35
+ align-items: center;
36
+ `;
37
+ const StyledNoOptionsSelected = styled.div`
38
+ padding: 0 ${props => props.theme.space.xxs};
39
+ `;
40
+ const StyledSelectAllCheckbox = styled.div`
41
+ display: flex;
42
+ align-items: center;
43
+ `;
11
44
 
12
45
  export { StyledButtonSelection, StyledHeaderListWrapper, StyledNoOptionsSelected, StyledSelectAllCheckbox, StyledSelectedItems };
@@ -1,4 +1,3 @@
1
- import 'core-js/modules/web.dom-collections.iterator.js';
2
1
  import 'core-js/modules/esnext.async-iterator.filter.js';
3
2
  import 'core-js/modules/esnext.iterator.constructor.js';
4
3
  import 'core-js/modules/esnext.iterator.filter.js';
@@ -25,7 +24,7 @@ const useHeaderListHandlers = () => {
25
24
  return true;
26
25
  }
27
26
 
28
- if ((multiSelectedValues === null || multiSelectedValues === void 0 ? void 0 : multiSelectedValues.length) === 0) {
27
+ if (multiSelectedValues?.length === 0) {
29
28
  return false;
30
29
  }
31
30
 
@@ -55,27 +54,21 @@ const useHeaderListHandlers = () => {
55
54
 
56
55
  const handleKeyDown = useCallback(e => {
57
56
  if (e.key === 'Escape') {
58
- var _innerRef$current;
59
-
60
57
  setMenuState(false, 'close', e);
61
- (_innerRef$current = innerRef.current) === null || _innerRef$current === void 0 ? void 0 : _innerRef$current.focus();
58
+ innerRef.current?.focus();
62
59
  }
63
60
  }, [setMenuState, innerRef]); // when hitting tab on selected values button filter we target the input again
64
61
 
65
62
  const handleFilterSelectionBtnOnTab = useCallback(e => {
66
63
  if (e.key === 'Tab' && !e.shiftKey) {
67
- var _innerRef$current2;
68
-
69
64
  e.preventDefault();
70
- (_innerRef$current2 = innerRef.current) === null || _innerRef$current2 === void 0 ? void 0 : _innerRef$current2.focus();
65
+ innerRef.current?.focus();
71
66
  }
72
67
  }, [innerRef]);
73
68
  const handleCheckAllOnTab = useCallback(e => {
74
69
  if (e.key === 'Tab' && !e.shiftKey && multiSelectedValues.length === 0) {
75
- var _innerRef$current3;
76
-
77
70
  e.preventDefault();
78
- (_innerRef$current3 = innerRef.current) === null || _innerRef$current3 === void 0 ? void 0 : _innerRef$current3.focus();
71
+ innerRef.current?.focus();
79
72
  }
80
73
  }, [innerRef, multiSelectedValues]);
81
74
  useEffect(() => {
@@ -56,14 +56,14 @@ const MenuList = () => {
56
56
  role: "listbox",
57
57
  "data-testid": ComboboxDataTestid.LIST,
58
58
  style: {
59
- height: virtualListHelpers === null || virtualListHelpers === void 0 ? void 0 : virtualListHelpers.totalSize,
59
+ height: virtualListHelpers?.totalSize,
60
60
  margin: inline ? '0px' : '8px 0px'
61
61
  }
62
62
  }, void 0, ItemRenderer)
63
63
  }) : _StyledNoResultsWrapp || (_StyledNoResultsWrapp = /*#__PURE__*/_jsx(StyledNoResultsWrapper, {
64
64
  role: "alert"
65
65
  }, void 0, noOptionsMessage))]
66
- }, width), [wrapperListRef, inline, preventLoseInputFocus, width, menuMinWidth, withHeader, filteredOptions.length, onCreate, menuMaxHeight, listRef, virtualListHelpers === null || virtualListHelpers === void 0 ? void 0 : virtualListHelpers.totalSize, ItemRenderer, noOptionsMessage]);
66
+ }, width), [wrapperListRef, inline, preventLoseInputFocus, width, menuMinWidth, withHeader, filteredOptions.length, onCreate, menuMaxHeight, listRef, virtualListHelpers?.totalSize, ItemRenderer, noOptionsMessage]);
67
67
  };
68
68
 
69
69
  export { MenuList };
@@ -1,38 +1,58 @@
1
- import _taggedTemplateLiteral from '@babel/runtime/helpers/esm/taggedTemplateLiteral';
2
1
  import { styled } from '@elliemae/ds-system';
3
2
 
4
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
5
- const StyledListWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n min-width: ", ";\n width: ", ";\n background-color: #ffffff;\n max-height: ", ";\n z-index: 100;\n"])), _ref => {
3
+ const StyledListWrapper = styled.div`
4
+ min-width: ${_ref => {
6
5
  let {
7
6
  inline,
8
7
  minWidth
9
8
  } = _ref;
10
- return inline ? '100%' : "".concat(minWidth, "px");
11
- }, _ref2 => {
9
+ return inline ? '100%' : `${minWidth}px`;
10
+ }};
11
+ width: ${_ref2 => {
12
12
  let {
13
13
  width
14
14
  } = _ref2;
15
- return "".concat(width, "px");
16
- }, _ref3 => {
15
+ return `${width}px`;
16
+ }};
17
+ background-color: #ffffff;
18
+ max-height: ${_ref3 => {
17
19
  let {
18
20
  maxHeight
19
21
  } = _ref3;
20
- return "".concat(maxHeight, "px");
21
- });
22
- const StyledList = styled.ul(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n padding: 0;\n background-color: #ffffff;\n overflow-x: hidden;\n"])));
23
- const StyledVirtualListWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n overflow-y: auto;\n margin-top: ", ";\n max-height: ", ";\n"])), _ref4 => {
22
+ return `${maxHeight}px`;
23
+ }};
24
+ z-index: 100;
25
+ `;
26
+ const StyledList = styled.ul`
27
+ position: relative;
28
+ padding: 0;
29
+ background-color: #ffffff;
30
+ overflow-x: hidden;
31
+ `;
32
+ const StyledVirtualListWrapper = styled.div`
33
+ overflow-y: auto;
34
+ margin-top: ${_ref4 => {
24
35
  let {
25
36
  withHeader
26
37
  } = _ref4;
27
38
  return withHeader ? '28px' : '';
28
- }, _ref5 => {
39
+ }};
40
+ max-height: ${_ref5 => {
29
41
  let {
30
42
  maxHeight
31
43
  } = _ref5;
32
- return maxHeight ? "".concat(maxHeight, "px") : '300px';
33
- });
34
- const StyledCreatableLabel = styled.span(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-weight: bold;\n font-style: italic;\n"])));
35
- const StyledCreatableValue = styled.span(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n word-break: break-all;\n"])));
36
- const StyledNoResultsWrapper = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding: 16px;\n"])));
44
+ return maxHeight ? `${maxHeight}px` : '300px';
45
+ }};
46
+ `;
47
+ const StyledCreatableLabel = styled.span`
48
+ font-weight: bold;
49
+ font-style: italic;
50
+ `;
51
+ const StyledCreatableValue = styled.span`
52
+ word-break: break-all;
53
+ `;
54
+ const StyledNoResultsWrapper = styled.div`
55
+ padding: 16px;
56
+ `;
37
57
 
38
58
  export { StyledCreatableLabel, StyledCreatableValue, StyledList, StyledListWrapper, StyledNoResultsWrapper, StyledVirtualListWrapper };
@@ -82,9 +82,9 @@ const useItemRenderer = () => {
82
82
  top: 0,
83
83
  left: 0,
84
84
  width: '100%',
85
- transform: "translateY(".concat(vItem.start, "px)")
85
+ transform: `translateY(${vItem.start}px)`
86
86
  },
87
- key: "".concat(option.dsId),
87
+ key: `${option.dsId}`,
88
88
  innerRef: vItem.measureRef
89
89
  };
90
90
 
@@ -126,7 +126,7 @@ const useItemRenderer = () => {
126
126
  cols: ['min-content', 'auto'],
127
127
  gutter: "xxs",
128
128
  alignItems: "center"
129
- }, void 0, _StyledCreatableLabel || (_StyledCreatableLabel = /*#__PURE__*/_jsx(StyledCreatableLabel, {}, void 0, "Add:")), /*#__PURE__*/_jsx(StyledCreatableValue, {}, void 0, "\"".concat(label, "\"")));
129
+ }, void 0, _StyledCreatableLabel || (_StyledCreatableLabel = /*#__PURE__*/_jsx(StyledCreatableLabel, {}, void 0, "Add:")), /*#__PURE__*/_jsx(StyledCreatableValue, {}, void 0, `"${label}"`));
130
130
  },
131
131
  label: option.label,
132
132
  onClick: handleOnCreateClick
@@ -31,7 +31,7 @@ const MultiSelectedValuesContainer = () => {
31
31
  }, pill.dsId)), multiSelectedValue.length > 0 && correctPillsToShow !== multiSelectedValue.length && /*#__PURE__*/_jsx(DSPillV2, {
32
32
  size: "s",
33
33
  labelTruncated: false,
34
- label: "+".concat(multiSelectedValue.length - correctPillsToShow),
34
+ label: `+${multiSelectedValue.length - correctPillsToShow}`,
35
35
  type: "value",
36
36
  disabled: disabled
37
37
  }, "grouped"))), [pillGroupRef, multiSelectedValue, correctPillsToShow, disabled]);
@@ -23,12 +23,10 @@ const RemovableSelectedValuePill = props => {
23
23
  type: disabled ? 'value' : 'removable',
24
24
  tabIndex: -1,
25
25
  onRemove: e => {
26
- var _innerRef$current;
27
-
28
26
  // preventing the menu to be opened
29
27
  e.stopPropagation();
30
28
  onChange(getSuggestedValueOnChange(pill, selectedValues), pill, e);
31
- (_innerRef$current = innerRef.current) === null || _innerRef$current === void 0 ? void 0 : _innerRef$current.focus();
29
+ innerRef.current?.focus();
32
30
  }
33
31
  }, pill.value);
34
32
  };
@@ -1,4 +1,3 @@
1
- import 'core-js/modules/web.dom-collections.iterator.js';
2
1
  import 'core-js/modules/esnext.async-iterator.map.js';
3
2
  import 'core-js/modules/esnext.iterator.map.js';
4
3
  import 'core-js/modules/esnext.async-iterator.for-each.js';
@@ -49,7 +48,7 @@ const useGroupPills = () => {
49
48
  let currentWidth = 0;
50
49
  const referenceWidth = selectedOptionsRef.current.offsetWidth;
51
50
  const pills = [...pillGroupRef.current.querySelectorAll(disabled ? '.ds-pill-wrapper-value' : '.ds-pill-wrapper-removable')];
52
- const pillsWidth = pills.map(pill => pill === null || pill === void 0 ? void 0 : pill.offsetWidth);
51
+ const pillsWidth = pills.map(pill => pill?.offsetWidth);
53
52
  pillsWidth.forEach((pillWidth, idx) => {
54
53
  currentWidth += pillWidth;
55
54
 
@@ -1,7 +1,10 @@
1
- import _taggedTemplateLiteral from '@babel/runtime/helpers/esm/taggedTemplateLiteral';
2
1
  import { styled } from '@elliemae/ds-system';
3
2
 
4
- var _templateObject;
5
- const StyledA11ySelectedValues = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 1px;\n height: 1px;\n position: absolute;\n clip: rect(1px, 1px, 1px, 1px);\n"])));
3
+ const StyledA11ySelectedValues = styled.span`
4
+ width: 1px;
5
+ height: 1px;
6
+ position: absolute;
7
+ clip: rect(1px, 1px, 1px, 1px);
8
+ `;
6
9
 
7
10
  export { StyledA11ySelectedValues };
@@ -1,6 +1,6 @@
1
1
  import { MENU_OPTION_TYPES } from './constants.js';
2
2
 
3
- const isSeparator = el => (el === null || el === void 0 ? void 0 : el.type) === MENU_OPTION_TYPES.SEPARATOR;
4
- const isOption = el => (el === null || el === void 0 ? void 0 : el.type) === MENU_OPTION_TYPES.OPTION;
3
+ const isSeparator = el => el?.type === MENU_OPTION_TYPES.SEPARATOR;
4
+ const isOption = el => el?.type === MENU_OPTION_TYPES.OPTION;
5
5
 
6
6
  export { isOption, isSeparator };
@@ -5,7 +5,6 @@ import 'core-js/modules/esnext.async-iterator.some.js';
5
5
  import 'core-js/modules/esnext.iterator.some.js';
6
6
  import 'core-js/modules/esnext.async-iterator.find.js';
7
7
  import 'core-js/modules/esnext.iterator.find.js';
8
- import 'core-js/modules/web.dom-collections.iterator.js';
9
8
  import 'core-js/modules/esnext.async-iterator.for-each.js';
10
9
  import 'core-js/modules/esnext.iterator.for-each.js';
11
10
  import { MENU_OPTION_TYPES } from '../constants.js';
@@ -17,11 +16,11 @@ const isSelectedValueMultiple = value => Array.isArray(value);
17
16
  const isSelected = (value, activeOption) => {
18
17
  if (isSelectedValueMultiple(value)) {
19
18
  const multiValue = value;
20
- return multiValue.some(item => (item === null || item === void 0 ? void 0 : item.value) === (activeOption === null || activeOption === void 0 ? void 0 : activeOption.value));
19
+ return multiValue.some(item => item?.value === activeOption?.value);
21
20
  }
22
21
 
23
22
  const singleValue = value;
24
- return (singleValue === null || singleValue === void 0 ? void 0 : singleValue.value) === activeOption.value;
23
+ return singleValue?.value === activeOption.value;
25
24
  };
26
25
  const findInCircularList = function (list, from, criteria) {
27
26
  let step = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
@@ -71,8 +70,6 @@ const getSuggestedValueOnChange = (selectedOption, selectedValues) => {
71
70
  };
72
71
  const filterOptions = (inputValue, options) => options.filter(option => option.type === MENU_OPTION_TYPES.OPTION && option.label.toLowerCase().includes(inputValue.toLowerCase()));
73
72
  const selectedValuesWithSections = (optionsToParse, multiSelectedValue) => {
74
- var _items2;
75
-
76
73
  const items = [];
77
74
  if (optionsToParse) optionsToParse.forEach(option => {
78
75
  // const isSelectedValue = multiSelectedValue.find((item) => item?.dsId === option.dsId);
@@ -81,9 +78,7 @@ const selectedValuesWithSections = (optionsToParse, multiSelectedValue) => {
81
78
  }
82
79
 
83
80
  if (option.type === MENU_OPTION_TYPES.SECTION) {
84
- var _items;
85
-
86
- if (((_items = items[items.length - 1]) === null || _items === void 0 ? void 0 : _items.type) === MENU_OPTION_TYPES.SECTION) {
81
+ if (items[items.length - 1]?.type === MENU_OPTION_TYPES.SECTION) {
87
82
  items[items.length - 1] = option;
88
83
  } else {
89
84
  items.push(option);
@@ -91,7 +86,7 @@ const selectedValuesWithSections = (optionsToParse, multiSelectedValue) => {
91
86
  }
92
87
  });
93
88
 
94
- if (((_items2 = items[items.length - 1]) === null || _items2 === void 0 ? void 0 : _items2.type) === MENU_OPTION_TYPES.SECTION) {
89
+ if (items[items.length - 1]?.type === MENU_OPTION_TYPES.SECTION) {
95
90
  items.pop();
96
91
  }
97
92
 
@@ -4,12 +4,10 @@ import 'core-js/modules/esnext.iterator.filter.js';
4
4
  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
- import 'core-js/modules/web.dom-collections.iterator.js';
8
7
  import { useState, useEffect, useCallback, useMemo } from 'react';
9
8
  import '../../date-time-picker/ControlledDateTimePicker.js';
10
9
  import 'core-js/modules/esnext.async-iterator.map.js';
11
10
  import 'core-js/modules/esnext.iterator.map.js';
12
- import 'core-js/modules/es.string.replace.js';
13
11
  import { getDayFromDateString } from '../../date-time-picker/utils/dateHelpers.js';
14
12
 
15
13
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -46,7 +44,7 @@ const useRangePickerLogic = _ref => {
46
44
  const dateToString = calendarChangeIsFrom ? toDate : changedDay;
47
45
  const dateTo = getDayFromDateString(dateToString); // we force the "from" to ALWAYS be before the "to" date
48
46
 
49
- const isToBeforeFrom = (dateTo === null || dateTo === void 0 ? void 0 : dateTo.getTime()) < (dateFrom === null || dateFrom === void 0 ? void 0 : dateFrom.getTime());
47
+ const isToBeforeFrom = dateTo?.getTime() < dateFrom?.getTime();
50
48
  const newDateFromString = isToBeforeFrom ? dateToString : dateFromString;
51
49
  const forcingFromDatePick = isToBeforeFrom ? !calendarChangeIsFrom : false;
52
50
  const newDateToString = isToBeforeFrom ? dateFromString : dateToString;
@@ -121,19 +119,17 @@ const useRangePickerLogic = _ref => {
121
119
  }, [getChangedDayStringValues, onFromDateChange, onToDateChange]);
122
120
  const getIsStartRangeDay = useCallback(dayString => dayString === fromDate, [fromDate]);
123
121
  const getIsDayInRange = useCallback(dayString => {
124
- var _getDayFromDateString;
125
-
126
122
  const dayFrom = getDayFromDateString(fromDate);
127
123
  const dayTo = getDayFromDateString(toDate);
128
124
  if (!dayFrom || !dayTo || !dayString) return false;
129
- const newDayTime = (_getDayFromDateString = getDayFromDateString(dayString)) === null || _getDayFromDateString === void 0 ? void 0 : _getDayFromDateString.getTime();
125
+ const newDayTime = getDayFromDateString(dayString)?.getTime();
130
126
  return newDayTime <= dayTo.getTime() && newDayTime >= dayFrom.getTime();
131
127
  }, [fromDate, toDate]);
132
128
  const getIsEndRangeDay = useCallback(dayString => dayString === toDate, [toDate]);
133
129
  const getIsToBeforeFrom = useCallback((fromString, toString) => {
134
130
  const dateFrom = getDayFromDateString(fromString);
135
131
  const dateTo = getDayFromDateString(toString);
136
- return (dateTo === null || dateTo === void 0 ? void 0 : dateTo.getTime()) < (dateFrom === null || dateFrom === void 0 ? void 0 : dateFrom.getTime());
132
+ return dateTo?.getTime() < dateFrom?.getTime();
137
133
  }, []);
138
134
  const handleFromDateChange = useCallback((newVal, metaInfo) => {
139
135
  const isIncorrectOrder = getIsToBeforeFrom(newVal, toDate);
@@ -4,8 +4,6 @@ import { DSControlledDateTimePicker } from '../../date-time-picker/ControlledDat
4
4
  import { CONTROLLED_DATE_TIME_PICKER_TYPES } from '../../date-time-picker/ControlledDateTimePickerTypes.js';
5
5
  import 'core-js/modules/esnext.async-iterator.map.js';
6
6
  import 'core-js/modules/esnext.iterator.map.js';
7
- import 'core-js/modules/web.dom-collections.iterator.js';
8
- import 'core-js/modules/es.string.replace.js';
9
7
  import 'core-js/modules/esnext.async-iterator.filter.js';
10
8
  import 'core-js/modules/esnext.iterator.constructor.js';
11
9
  import 'core-js/modules/esnext.iterator.filter.js';
@@ -5,8 +5,6 @@ import { DSControlledDateTimePicker } from '../../date-time-picker/ControlledDat
5
5
  import { CONTROLLED_DATE_TIME_PICKER_TYPES } from '../../date-time-picker/ControlledDateTimePickerTypes.js';
6
6
  import 'core-js/modules/esnext.async-iterator.map.js';
7
7
  import 'core-js/modules/esnext.iterator.map.js';
8
- import 'core-js/modules/web.dom-collections.iterator.js';
9
- import 'core-js/modules/es.string.replace.js';
10
8
  import 'core-js/modules/esnext.async-iterator.filter.js';
11
9
  import 'core-js/modules/esnext.iterator.constructor.js';
12
10
  import 'core-js/modules/esnext.iterator.filter.js';
@@ -5,8 +5,6 @@ import { DSControlledDateTimePicker } from '../../date-time-picker/ControlledDat
5
5
  import { CONTROLLED_DATE_TIME_PICKER_TYPES } from '../../date-time-picker/ControlledDateTimePickerTypes.js';
6
6
  import 'core-js/modules/esnext.async-iterator.map.js';
7
7
  import 'core-js/modules/esnext.iterator.map.js';
8
- import 'core-js/modules/web.dom-collections.iterator.js';
9
- import 'core-js/modules/es.string.replace.js';
10
8
  import 'core-js/modules/esnext.async-iterator.filter.js';
11
9
  import 'core-js/modules/esnext.iterator.constructor.js';
12
10
  import 'core-js/modules/esnext.iterator.filter.js';
@@ -81,7 +81,7 @@ const useChangeHandlers = _ref => {
81
81
  appOnTimeChange(appTimeString, metaInfo); // don't do this on useEffect to avoid complete chaos
82
82
 
83
83
  setTimeString(newTimeString);
84
- const newDateTimeString = "".concat(newDateString, " ").concat(newTimeString);
84
+ const newDateTimeString = `${newDateString} ${newTimeString}`;
85
85
 
86
86
  const newMetaInfo = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, metaInfo), getTimeMetaInfo(newTimeString, metaInfo)), getDateMetaInfo(newDateString, metaInfo)), {}, {
87
87
  newDateString,
@@ -98,7 +98,7 @@ const useChangeHandlers = _ref => {
98
98
  appOnDateChange(appDateString, metaInfo); // don't do this on useEffect to avoid complete chaos
99
99
 
100
100
  setTempDateString(newDateString);
101
- const newDateTimeString = "".concat(newDateString, " ").concat(tempTimeString);
101
+ const newDateTimeString = `${newDateString} ${tempTimeString}`;
102
102
 
103
103
  const newMetaInfo = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, metaInfo), getTimeMetaInfo(tempTimeString, metaInfo)), getDateMetaInfo(newDateString, metaInfo)), {}, {
104
104
  newDateString,
@@ -114,7 +114,7 @@ const useChangeHandlers = _ref => {
114
114
  appOnTimeChange(appTimeString, metaInfo); // don't do this on useEffect to avoid complete chaos
115
115
 
116
116
  setTimeString(newTimeString);
117
- const newDateTimeString = "".concat(tempDateString, " ").concat(newTimeString);
117
+ const newDateTimeString = `${tempDateString} ${newTimeString}`;
118
118
 
119
119
  const newMetaInfo = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, metaInfo), getTimeMetaInfo(newTimeString, metaInfo)), getDateMetaInfo(tempDateString, metaInfo)), {}, {
120
120
  newDateTimeString,
@@ -59,7 +59,7 @@ const useControlledDateTimePicker = props => {
59
59
  isDateTimeSelector,
60
60
  isWithTimeInputs
61
61
  } = flags;
62
- const ariaCurrentValueForInputs = "current values: ".concat(isWithDateInputs ? "".concat(announcedDateValues) : '').concat(isDateTimeSelector ? ', ' : '').concat(isWithTimeInputs ? "".concat(announcedTimeValues) : '');
62
+ const ariaCurrentValueForInputs = `current values: ${isWithDateInputs ? `${announcedDateValues}` : ''}${isDateTimeSelector ? ', ' : ''}${isWithTimeInputs ? `${announcedTimeValues}` : ''}`;
63
63
  const ctx = React.useMemo(() => _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
64
64
  props: propsWithDefaults,
65
65
  ariaCurrentValueForInputs,
@@ -1,6 +1,6 @@
1
- import 'core-js/modules/web.dom-collections.iterator.js';
2
1
  import { useState, useCallback, useMemo } from 'react';
3
2
 
3
+ /* eslint-disable max-lines */
4
4
  const useFocusTracker = _ref => {
5
5
  let {
6
6
  DOMRefs,
@@ -34,8 +34,8 @@ const useGetDestructuredDateValues = _ref => {
34
34
  const yearNum = convertToPositiveNumberIfPossible(year);
35
35
  const announcedMonth = monthNum !== -1 ? monthNames[monthNum - 1] : 'empty month';
36
36
  const announcedDay = dayNum !== -1 ? announcableCardinalDays[dayNum] : 'empty day';
37
- const announcedYear = yearNum !== -1 ? fillStringWithPlaceHolders("".concat(yearNum), 4, '0') : 'empty year';
38
- const announcedDateValues = "".concat(announcedMonth, ", ").concat(announcedDay, ", ").concat(announcedYear);
37
+ const announcedYear = yearNum !== -1 ? fillStringWithPlaceHolders(`${yearNum}`, 4, '0') : 'empty year';
38
+ const announcedDateValues = `${announcedMonth}, ${announcedDay}, ${announcedYear}`;
39
39
  return useMemo(() => ({
40
40
  month,
41
41
  day,
@@ -69,12 +69,12 @@ const useGetDestructuredTimeValues = _ref2 => {
69
69
  const hoursNum = convertToPositiveNumberIfPossible(hours);
70
70
  const minutesNum = convertToPositiveNumberIfPossible(minutes); // 01 -> 1 ~ 09 -> 9 || 1_ -> 1 ~ 9_ -> 9 || empty...
71
71
 
72
- const announcedHours = hoursNum !== -1 ? "".concat(hoursNum) : 'empty hours'; // 01 -> 1 ~ 09 -> 9 || 1_ -> 1 ~ 9_ -> 9 || empty...
72
+ const announcedHours = hoursNum !== -1 ? `${hoursNum}` : 'empty hours'; // 01 -> 1 ~ 09 -> 9 || 1_ -> 1 ~ 9_ -> 9 || empty...
73
73
 
74
- const announcedMinutes = minutesNum !== -1 ? "".concat(minutesNum) : 'empty minutes';
74
+ const announcedMinutes = minutesNum !== -1 ? `${minutesNum}` : 'empty minutes';
75
75
  const announcedMeridiem = // eslint-disable-next-line no-nested-ternary
76
- meridiem === 'PM' ? "post meridiem" : meridiem === 'AM' ? 'ante meridiem' : 'empty meriediem';
77
- const announcedTimeValues = "".concat(announcedHours, ", ").concat(announcedMinutes, ", ").concat(announcedMeridiem);
76
+ meridiem === 'PM' ? `post meridiem` : meridiem === 'AM' ? 'ante meridiem' : 'empty meriediem';
77
+ const announcedTimeValues = `${announcedHours}, ${announcedMinutes}, ${announcedMeridiem}`;
78
78
  return useMemo(() => ({
79
79
  hours,
80
80
  minutes,
@@ -23,7 +23,7 @@ const useGetPropsBasedOnType = propsWithDefaults => {
23
23
  const appOnMonthChange = (isDateTime || isDate) && propsWithDefaults.onMonthChange ? propsWithDefaults.onMonthChange : noop;
24
24
  const appOnDayChange = (isDateTime || isDate) && propsWithDefaults.onDayChange ? propsWithDefaults.onDayChange : noop;
25
25
  const appOnYearChange = (isDateTime || isDate) && propsWithDefaults.onYearChange ? propsWithDefaults.onYearChange : noop;
26
- const emptyPickerStartingMonthDefault = "".concat(new Date().getMonth() + 1, "/__/").concat(new Date().getFullYear());
26
+ const emptyPickerStartingMonthDefault = `${new Date().getMonth() + 1}/__/${new Date().getFullYear()}`;
27
27
  const emptyPickerStartingMonth = (isDateTime || isDate) && propsWithDefaults.emptyPickerStartingMonth ? propsWithDefaults.emptyPickerStartingMonth : emptyPickerStartingMonthDefault;
28
28
  const onCalendarOpenFocusedDay = (isDateTime || isDate) && propsWithDefaults.onCalendarOpenFocusedDay ? propsWithDefaults.onCalendarOpenFocusedDay : undefined;
29
29
  /* -------------------------- -------------- --------------------------*/
@@ -1,6 +1,6 @@
1
- import 'core-js/modules/web.dom-collections.iterator.js';
2
1
  import { useState, useRef, useMemo } from 'react';
3
2
 
3
+ /* eslint-disable complexity */
4
4
  const useGetReferences = _ref => {
5
5
  let {
6
6
  isWithDateInputs,
@@ -1,8 +1,8 @@
1
- import 'core-js/modules/web.dom-collections.iterator.js';
2
1
  import { useMemo, useState } from 'react';
3
2
  import { getIsDateTime, getIsDate, getIsTime } from '../utils/typeGuards.js';
4
3
  import { dateTimeToDate, dateTimeToTime } from '../utils/stringHelpers.js';
5
4
 
5
+ /* eslint-disable complexity */
6
6
  const useRelevantValueFromProps = props => {
7
7
  const dateStringFromProps = useMemo(() => {
8
8
  if (getIsDateTime(props)) return props.dateTime !== '' ? dateTimeToDate(props.dateTime) : '__/__/____';
@@ -1,43 +1,74 @@
1
+ import 'core-js/modules/es.error.cause.js';
1
2
  import { deconstructValuesFromDateString, isValidDateString, dateTimeToDate, isValidTimeString, dateTimeToTime } from '../utils/stringHelpers.js';
2
3
  import { convertToPositiveNumberIfPossible } from '../utils/numberHelpers.js';
3
4
  import { getIsDateTime, getIsDate, getIsTime } from '../utils/typeGuards.js';
4
5
 
5
- /* eslint-disable max-statements */
6
- const PREPEND = "ControlledDateTimePicker:\n Invalid configuration detected::\n \n ";
6
+ const PREPEND = `ControlledDateTimePicker:
7
+ Invalid configuration detected::
8
+
9
+ `;
7
10
  const NOT_A_DEFECT = ''; // '\n\n\t\tThis is not a defect, please check\n\n\t\thttps://qa.dimsum.rd.elliemae.io/?path=/story/components-desktop-components-d-controlledform-date-time-picker--basic\n\n\t\tfor instructions on how to use the component correctly\n\n';
8
11
 
9
- const INLINE_RECEIVED_PREPEND = "\n\n Received:";
12
+ const INLINE_RECEIVED_PREPEND = `
13
+
14
+ Received:`;
10
15
 
11
16
  const throwInvalidDateTimeError = invalidValue => {
12
- throw new Error("".concat(PREPEND, "the \"dateTime\" you are providing is not respecting the format it must respect.").concat(INLINE_RECEIVED_PREPEND).concat(invalidValue, "(").concat(typeof invalidValue, ")").concat(NOT_A_DEFECT));
17
+ throw new Error(`${PREPEND}the "dateTime" you are providing is not respecting the format it must respect.${INLINE_RECEIVED_PREPEND}${invalidValue}(${typeof invalidValue})${NOT_A_DEFECT}`);
13
18
  };
14
19
 
15
20
  const throwInvalidDaterror = invalidValue => {
16
- throw new Error("".concat(PREPEND, "the \"date\" you are providing is not respecting the format it must respect.").concat(INLINE_RECEIVED_PREPEND).concat(invalidValue, "(").concat(typeof invalidValue, ")").concat(NOT_A_DEFECT));
21
+ throw new Error(`${PREPEND}the "date" you are providing is not respecting the format it must respect.${INLINE_RECEIVED_PREPEND}${invalidValue}(${typeof invalidValue})${NOT_A_DEFECT}`);
17
22
  };
18
23
 
19
24
  const throwInvalidTimerror = invalidValue => {
20
- throw new Error("".concat(PREPEND, "the \"time\" you are providing is not respecting the format it must respect.").concat(INLINE_RECEIVED_PREPEND).concat(invalidValue, "(").concat(typeof invalidValue, ")").concat(NOT_A_DEFECT));
25
+ throw new Error(`${PREPEND}the "time" you are providing is not respecting the format it must respect.${INLINE_RECEIVED_PREPEND}${invalidValue}(${typeof invalidValue})${NOT_A_DEFECT}`);
21
26
  };
22
27
 
23
28
  const throwUncontrolledDateError = (date, onDateChange) => {
24
- throw new Error("".concat(PREPEND, "you are trying to use a date selector while providing a non-string \"date\" or providing a non-function to \"onDateChange\"\n the full-controlled pattern must be used\n\tcheck https://reactjs.org/docs/forms.html#controlled-components for more informations\n\n Received:\n date: ").concat(date, "(").concat(typeof date, ")\n onDateChange: (").concat(typeof onDateChange, ")\n ").concat(NOT_A_DEFECT));
29
+ throw new Error(`${PREPEND}you are trying to use a date selector while providing a non-string "date" or providing a non-function to "onDateChange"
30
+ the full-controlled pattern must be used\n\tcheck https://reactjs.org/docs/forms.html#controlled-components for more informations
31
+
32
+ Received:
33
+ date: ${date}(${typeof date})
34
+ onDateChange: (${typeof onDateChange})
35
+ ${NOT_A_DEFECT}`);
25
36
  };
26
37
 
27
38
  const throwUncontrolledTimeError = (time, onTimeChange) => {
28
- throw new Error("".concat(PREPEND, "you are trying to use a time selector while providing a non-string \"time\" or providing a non-function to \"onTimeChange\"\n the full-controlled pattern must be used\n\tcheck https://reactjs.org/docs/forms.html#controlled-components for more informations\n\n Received:\n time: ").concat(time, "(").concat(typeof time, ")\n onTimeChange: (").concat(typeof onTimeChange, ")\n ").concat(NOT_A_DEFECT));
39
+ throw new Error(`${PREPEND}you are trying to use a time selector while providing a non-string "time" or providing a non-function to "onTimeChange"
40
+ the full-controlled pattern must be used\n\tcheck https://reactjs.org/docs/forms.html#controlled-components for more informations
41
+
42
+ Received:
43
+ time: ${time}(${typeof time})
44
+ onTimeChange: (${typeof onTimeChange})
45
+ ${NOT_A_DEFECT}`);
29
46
  };
30
47
 
31
48
  const throwUncontrolledDateTimeError = (dateTime, onDateTimeChange) => {
32
- throw new Error("".concat(PREPEND, "you are trying to use a date-time selector while providing a non-string \"dateTime\" or providing a non-function to \"onDateTimeChange\"\n the full-controlled pattern must be used\n\tcheck https://reactjs.org/docs/forms.html#controlled-components for more informations\n\n Received:\n dateTime: ").concat(dateTime, "(").concat(typeof dateTime, ")\n onDateTimeChange: (").concat(typeof onDateTimeChange, ")\n ").concat(NOT_A_DEFECT));
49
+ throw new Error(`${PREPEND}you are trying to use a date-time selector while providing a non-string "dateTime" or providing a non-function to "onDateTimeChange"
50
+ the full-controlled pattern must be used\n\tcheck https://reactjs.org/docs/forms.html#controlled-components for more informations
51
+
52
+ Received:
53
+ dateTime: ${dateTime}(${typeof dateTime})
54
+ onDateTimeChange: (${typeof onDateTimeChange})
55
+ ${NOT_A_DEFECT}`);
33
56
  };
34
57
 
35
58
  const throwInvalidEmptyPickerStartingMonthError = emptyPickerStartingMonth => {
36
- throw new Error("".concat(PREPEND, "the provided emptyPickerStartingMonth props is invalid. please provide a string with the format mm/__/yyyy, (mm 01~12, yyyy 0001~9999) \n\n Received:\n ").concat(emptyPickerStartingMonth, "(").concat(typeof emptyPickerStartingMonth, ")\n ").concat(NOT_A_DEFECT));
59
+ throw new Error(`${PREPEND}the provided emptyPickerStartingMonth props is invalid. please provide a string with the format mm/__/yyyy, (mm 01~12, yyyy 0001~9999)
60
+
61
+ Received:
62
+ ${emptyPickerStartingMonth}(${typeof emptyPickerStartingMonth})
63
+ ${NOT_A_DEFECT}`);
37
64
  };
38
65
 
39
66
  const throwInvalidOnCalendarOpenFocusedDayError = onCalendarOpenFocusedDay => {
40
- throw new Error("".concat(PREPEND, "the provided onCalendarOpenFocusedDay props is invalid. please provide a string with the format mm/dd/yyyy, (mm 01~12, dd 01~31, yyyy 0001~9999) \n\n Received:\n ").concat(onCalendarOpenFocusedDay, "(").concat(typeof onCalendarOpenFocusedDay, ")\n ").concat(NOT_A_DEFECT));
67
+ throw new Error(`${PREPEND}the provided onCalendarOpenFocusedDay props is invalid. please provide a string with the format mm/dd/yyyy, (mm 01~12, dd 01~31, yyyy 0001~9999)
68
+
69
+ Received:
70
+ ${onCalendarOpenFocusedDay}(${typeof onCalendarOpenFocusedDay})
71
+ ${NOT_A_DEFECT}`);
41
72
  };
42
73
 
43
74
  const useValidateProps = props => {