intelicoreact 1.4.81 → 1.4.83

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 (258) hide show
  1. package/dist/Atomic/FormElements/ActionAlert/ActionAlert.js +13 -13
  2. package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +12 -13
  3. package/dist/Atomic/FormElements/Calendar/Calendar.js +103 -68
  4. package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +26 -26
  5. package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +27 -23
  6. package/dist/Atomic/FormElements/Datepicker/Datepicker.js +201 -114
  7. package/dist/Atomic/FormElements/Datepicker/components/Calendar.js +69 -46
  8. package/dist/Atomic/FormElements/Dropdown/Dropdown.js +301 -230
  9. package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +2 -4
  10. package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +201 -145
  11. package/dist/Atomic/FormElements/FileLoader/FileLoader.js +54 -41
  12. package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +112 -45
  13. package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +63 -34
  14. package/dist/Atomic/FormElements/FileLoaderDescription/FileLoaderDescription.js +153 -81
  15. package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +59 -57
  16. package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +98 -66
  17. package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +48 -27
  18. package/dist/Atomic/FormElements/Input/Input.js +209 -148
  19. package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +77 -50
  20. package/dist/Atomic/FormElements/InputColor/InputColor.js +28 -23
  21. package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +53 -38
  22. package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +139 -106
  23. package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +38 -31
  24. package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +230 -135
  25. package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +122 -85
  26. package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +8 -10
  27. package/dist/Atomic/FormElements/InputDateRange/dependencies.js +159 -72
  28. package/dist/Atomic/FormElements/InputLink/InputLink.js +39 -30
  29. package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +8 -8
  30. package/dist/Atomic/FormElements/InputMask/InputMask.js +800 -521
  31. package/dist/Atomic/FormElements/InputMask/config.js +1 -1
  32. package/dist/Atomic/FormElements/InputMask/functions.js +15 -15
  33. package/dist/Atomic/FormElements/InputMask2/InputMask2.js +294 -234
  34. package/dist/Atomic/FormElements/InputMask2/config.js +1 -1
  35. package/dist/Atomic/FormElements/InputMask2/functions.js +15 -15
  36. package/dist/Atomic/FormElements/InputMask3/InputMask3.js +332 -265
  37. package/dist/Atomic/FormElements/InputMask3/config.js +1 -1
  38. package/dist/Atomic/FormElements/InputMask3/functions.js +15 -15
  39. package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +101 -53
  40. package/dist/Atomic/FormElements/InputsRow/InputsRow.js +99 -64
  41. package/dist/Atomic/FormElements/Label/Label.js +15 -13
  42. package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +284 -190
  43. package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +34 -24
  44. package/dist/Atomic/FormElements/NumericInput/NumericInput.js +170 -117
  45. package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +50 -28
  46. package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +29 -18
  47. package/dist/Atomic/FormElements/RadioInput/RadioInput.js +24 -22
  48. package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +31 -19
  49. package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +83 -56
  50. package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +75 -49
  51. package/dist/Atomic/FormElements/RangeList/RangeList.js +129 -87
  52. package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +18 -22
  53. package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +250 -143
  54. package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +477 -367
  55. package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +15 -14
  56. package/dist/Atomic/FormElements/Switcher/Switcher.js +20 -24
  57. package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +30 -24
  58. package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +23 -20
  59. package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +40 -32
  60. package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +31 -25
  61. package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +22 -22
  62. package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +98 -52
  63. package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +34 -22
  64. package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.js +81 -47
  65. package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +525 -415
  66. package/dist/Atomic/FormElements/Text/Text.js +39 -39
  67. package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +23 -21
  68. package/dist/Atomic/FormElements/Textarea/Textarea.js +33 -28
  69. package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +98 -67
  70. package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +24 -22
  71. package/dist/Atomic/FormElements/TimeRange/TimeRange.js +57 -34
  72. package/dist/Atomic/FormElements/UserContacts/UserContacts.js +94 -56
  73. package/dist/Atomic/FormElements/UserContacts/partial/defaultIcons.js +102 -74
  74. package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +69 -50
  75. package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +33 -30
  76. package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +50 -38
  77. package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +1 -1
  78. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +59 -47
  79. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +1 -1
  80. package/dist/Atomic/Layout/Header/Header.js +37 -22
  81. package/dist/Atomic/Layout/MainMenu/MainMenu.js +59 -34
  82. package/dist/Atomic/Layout/Spinner/Spinner.js +6 -7
  83. package/dist/Atomic/UI/Accordion/Accordion.js +31 -17
  84. package/dist/Atomic/UI/Accordion/AccordionItem.js +41 -30
  85. package/dist/Atomic/UI/AccordionTable/AccordionTable.js +81 -50
  86. package/dist/Atomic/UI/AccordionText/AccordionText.js +39 -20
  87. package/dist/Atomic/UI/AdvancedTag/AdvTag.js +74 -46
  88. package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +37 -21
  89. package/dist/Atomic/UI/Alert/Alert.js +36 -23
  90. package/dist/Atomic/UI/Arrow/Arrow.js +21 -14
  91. package/dist/Atomic/UI/Box/Box.js +12 -11
  92. package/dist/Atomic/UI/Button/Button.js +26 -26
  93. package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +21 -21
  94. package/dist/Atomic/UI/Chart/Chart.js +60 -44
  95. package/dist/Atomic/UI/Chart/partial/Chart.constants.js +13 -11
  96. package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +10 -12
  97. package/dist/Atomic/UI/Chart/partial/datasetSetters.js +82 -60
  98. package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +124 -116
  99. package/dist/Atomic/UI/Chart/partial/optionsSetters.js +30 -18
  100. package/dist/Atomic/UI/Chart/partial/utils.js +30 -16
  101. package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +31 -21
  102. package/dist/Atomic/UI/DateTime/DateTime.js +29 -25
  103. package/dist/Atomic/UI/DebugContainer/DebugContainer.js +23 -11
  104. package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +12 -4
  105. package/dist/Atomic/UI/DoubleString/DoubleString.js +53 -36
  106. package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +55 -14
  107. package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +114 -54
  108. package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +88 -53
  109. package/dist/Atomic/UI/Hint/Hint.js +87 -58
  110. package/dist/Atomic/UI/Hint/partials/_utils.js +10 -10
  111. package/dist/Atomic/UI/Modal/Modal.js +159 -144
  112. package/dist/Atomic/UI/Modal/ModalHOC.js +17 -14
  113. package/dist/Atomic/UI/Modal/partials/ModalFooter.js +5 -6
  114. package/dist/Atomic/UI/Modal/partials/ModalTitle.js +13 -16
  115. package/dist/Atomic/UI/Modal/partials/useMobileModal.js +118 -73
  116. package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +48 -33
  117. package/dist/Atomic/UI/NavLine/NavLine.js +166 -104
  118. package/dist/Atomic/UI/PageTitle/PageTitle.js +8 -12
  119. package/dist/Atomic/UI/PieChart/PieChart.js +11 -10
  120. package/dist/Atomic/UI/Price/Price.js +5 -7
  121. package/dist/Atomic/UI/PriceRange/PriceRange.js +4 -6
  122. package/dist/Atomic/UI/ProgressLine/ProgressLine.js +42 -27
  123. package/dist/Atomic/UI/Status/Status.js +22 -18
  124. package/dist/Atomic/UI/Table/Partials/TdCell.js +47 -28
  125. package/dist/Atomic/UI/Table/Partials/TdHeader.js +5 -6
  126. package/dist/Atomic/UI/Table/Partials/TdRow.js +53 -29
  127. package/dist/Atomic/UI/Table/Partials/TdTitle.js +28 -15
  128. package/dist/Atomic/UI/Table/Table.js +36 -27
  129. package/dist/Atomic/UI/Table/TdTypes/TdActions.js +32 -18
  130. package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +10 -8
  131. package/dist/Atomic/UI/Table/TdTypes/TdRange.js +2 -4
  132. package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +26 -21
  133. package/dist/Atomic/UI/Tag/Tag.js +72 -52
  134. package/dist/Atomic/UI/TagList/TagList.js +102 -65
  135. package/dist/Atomic/UI/UserBox/UserBox.js +13 -13
  136. package/dist/Atomic/UI/WizardStepper/constructor.js +6 -6
  137. package/dist/Atomic/UI/WizardStepper/ui/StateIcon/StateIcon.js +16 -20
  138. package/dist/Atomic/UI/WizardStepper/ui/StepRow/StepRow.js +25 -27
  139. package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/StepWrapper.js +27 -22
  140. package/dist/Atomic/UI/WizardStepper/ui/icons.js +41 -39
  141. package/dist/Classes/AbortableFetch.js +393 -311
  142. package/dist/Classes/AnimatedHandler.js +53 -45
  143. package/dist/Classes/RESTAPI/index.js +431 -152
  144. package/dist/Classes/RESTAPI/partials/AbortableFetch.js +400 -320
  145. package/dist/Classes/RESTAPI/partials/ApiBase.js +59 -24
  146. package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +338 -76
  147. package/dist/Classes/RESTAPI/partials/ApiUtils.js +378 -143
  148. package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +375 -159
  149. package/dist/Classes/RESTAPI/partials/Utils.js +128 -87
  150. package/dist/Classes/RESTAPI/partials/_utils.js +388 -116
  151. package/dist/Constants/index.constants.js +7 -7
  152. package/dist/Functions/Portal.js +19 -11
  153. package/dist/Functions/customEventListener.js +7 -5
  154. package/dist/Functions/fieldValueFormatters.js +131 -109
  155. package/dist/Functions/hooks/useFormFieldsChangesManager.js +128 -69
  156. package/dist/Functions/locale/createTranslator.js +21 -11
  157. package/dist/Functions/operations.js +27 -23
  158. package/dist/Functions/presets/inputMaskPreset.js +176 -0
  159. package/dist/Functions/presets/inputMaskPresets.js +17 -17
  160. package/dist/Functions/presets/inputPresets.js +15 -15
  161. package/dist/Functions/presets/mobileKeyboardTypesPresets.js +3 -3
  162. package/dist/Functions/schemas.js +7 -5
  163. package/dist/Functions/useBodyScrollLock.js +3 -3
  164. package/dist/Functions/useClickOutside.js +3 -3
  165. package/dist/Functions/useDebounce.js +20 -11
  166. package/dist/Functions/useFieldFocus.js +51 -38
  167. package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +46 -36
  168. package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +78 -68
  169. package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +81 -54
  170. package/dist/Functions/useFormTools/functions/General.js +80 -71
  171. package/dist/Functions/useFormTools/functions/RenderFields.js +63 -45
  172. package/dist/Functions/useFormTools/functions/usePrevious.js +2 -2
  173. package/dist/Functions/useFormTools/index.js +467 -314
  174. package/dist/Functions/useInputHighlightError.js +42 -26
  175. package/dist/Functions/useIsMobile.js +29 -11
  176. package/dist/Functions/useKeyPress/useHandleKeyPress.js +8 -9
  177. package/dist/Functions/useKeyPress/useKeyPress.js +26 -17
  178. package/dist/Functions/useLocalStorage.js +13 -6
  179. package/dist/Functions/useLocationParams.js +24 -14
  180. package/dist/Functions/useMediaQuery.js +18 -7
  181. package/dist/Functions/useMetaInfo.js +40 -16
  182. package/dist/Functions/useMouseUpOutside.js +2 -2
  183. package/dist/Functions/useOnlineStatus.js +17 -6
  184. package/dist/Functions/usePasswordChecker.js +61 -42
  185. package/dist/Functions/usePrevious.js +2 -2
  186. package/dist/Functions/useResize.js +24 -12
  187. package/dist/Functions/useScrollTo.js +13 -4
  188. package/dist/Functions/useToggle.js +25 -9
  189. package/dist/Functions/utils.js +272 -147
  190. package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +27 -23
  191. package/dist/Molecular/CustomIcons/components/AlertCircle.js +27 -23
  192. package/dist/Molecular/CustomIcons/components/AppStore.js +31 -27
  193. package/dist/Molecular/CustomIcons/components/Arrow.js +37 -33
  194. package/dist/Molecular/CustomIcons/components/ArrowDown.js +19 -15
  195. package/dist/Molecular/CustomIcons/components/ArrowLeft.js +22 -18
  196. package/dist/Molecular/CustomIcons/components/ArrowRight.js +22 -18
  197. package/dist/Molecular/CustomIcons/components/ArrowUp.js +19 -15
  198. package/dist/Molecular/CustomIcons/components/Bell.js +17 -13
  199. package/dist/Molecular/CustomIcons/components/Button.js +17 -13
  200. package/dist/Molecular/CustomIcons/components/Campaigns.js +18 -14
  201. package/dist/Molecular/CustomIcons/components/Check.js +18 -14
  202. package/dist/Molecular/CustomIcons/components/Check2.js +17 -13
  203. package/dist/Molecular/CustomIcons/components/ChevronDown.js +17 -13
  204. package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +17 -13
  205. package/dist/Molecular/CustomIcons/components/ChevronLeft.js +17 -13
  206. package/dist/Molecular/CustomIcons/components/ChevronRight.js +17 -13
  207. package/dist/Molecular/CustomIcons/components/ChevronUp.js +17 -13
  208. package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +32 -28
  209. package/dist/Molecular/CustomIcons/components/Close.js +19 -15
  210. package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +44 -40
  211. package/dist/Molecular/CustomIcons/components/Delete.js +18 -14
  212. package/dist/Molecular/CustomIcons/components/Edit.js +17 -13
  213. package/dist/Molecular/CustomIcons/components/Email.js +35 -31
  214. package/dist/Molecular/CustomIcons/components/FinturfLogo.js +25 -21
  215. package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +33 -29
  216. package/dist/Molecular/CustomIcons/components/Flows.js +17 -13
  217. package/dist/Molecular/CustomIcons/components/Gift.js +22 -18
  218. package/dist/Molecular/CustomIcons/components/GoogleAuth.js +31 -27
  219. package/dist/Molecular/CustomIcons/components/GooglePlay.js +31 -27
  220. package/dist/Molecular/CustomIcons/components/HelpCircle.js +20 -16
  221. package/dist/Molecular/CustomIcons/components/HelpCircle2.js +21 -17
  222. package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +20 -16
  223. package/dist/Molecular/CustomIcons/components/Home.js +20 -16
  224. package/dist/Molecular/CustomIcons/components/Home2.js +23 -19
  225. package/dist/Molecular/CustomIcons/components/Key.js +25 -21
  226. package/dist/Molecular/CustomIcons/components/Landers.js +21 -17
  227. package/dist/Molecular/CustomIcons/components/Lock.js +17 -13
  228. package/dist/Molecular/CustomIcons/components/Mail.js +25 -21
  229. package/dist/Molecular/CustomIcons/components/Mastercard.js +65 -61
  230. package/dist/Molecular/CustomIcons/components/Minus.js +30 -26
  231. package/dist/Molecular/CustomIcons/components/Offers.js +18 -14
  232. package/dist/Molecular/CustomIcons/components/Pause.js +30 -26
  233. package/dist/Molecular/CustomIcons/components/PayPal.js +44 -40
  234. package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +31 -27
  235. package/dist/Molecular/CustomIcons/components/Phone.js +32 -28
  236. package/dist/Molecular/CustomIcons/components/Play.js +30 -26
  237. package/dist/Molecular/CustomIcons/components/Plus.js +30 -26
  238. package/dist/Molecular/CustomIcons/components/Profile.js +22 -18
  239. package/dist/Molecular/CustomIcons/components/QRCode.js +32 -28
  240. package/dist/Molecular/CustomIcons/components/Rectangle.js +17 -13
  241. package/dist/Molecular/CustomIcons/components/Revert.js +20 -16
  242. package/dist/Molecular/CustomIcons/components/Star.js +14 -10
  243. package/dist/Molecular/CustomIcons/components/Star2.js +18 -14
  244. package/dist/Molecular/CustomIcons/components/TrafficSources.js +20 -16
  245. package/dist/Molecular/CustomIcons/components/Trash.js +17 -13
  246. package/dist/Molecular/CustomIcons/components/TrashRed.js +17 -13
  247. package/dist/Molecular/CustomIcons/components/Triggers.js +17 -13
  248. package/dist/Molecular/CustomIcons/components/User.js +22 -18
  249. package/dist/Molecular/CustomIcons/components/Visa.js +33 -29
  250. package/dist/Molecular/CustomIcons/components/X.js +17 -13
  251. package/dist/Molecular/CustomIcons/index.js +61 -61
  252. package/dist/Molecular/FormElement/FormElement.js +17 -19
  253. package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +93 -73
  254. package/dist/Molecular/FormWithDependOn/partials/_utils.js +27 -28
  255. package/dist/Molecular/InputAddress/InputAddress.js +213 -126
  256. package/dist/Molecular/InputPassword/InputPassword.js +23 -13
  257. package/dist/index.js +1 -1
  258. package/package.json +1 -1
@@ -2,13 +2,23 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
+ var _typeof3 = require("@babel/runtime/helpers/typeof");
6
+
5
7
  Object.defineProperty(exports, "__esModule", {
6
8
  value: true
7
9
  });
8
10
  exports.default = void 0;
9
11
 
12
+ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
13
+
10
14
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
15
 
16
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
+
18
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
19
+
20
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
21
+
12
22
  var _react = _interopRequireWildcard(require("react"));
13
23
 
14
24
  var _classnames = _interopRequireDefault(require("classnames"));
@@ -23,7 +33,7 @@ var _RadioInput = _interopRequireDefault(require("../../../Atomic/FormElements/R
23
33
 
24
34
  var _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
25
35
 
26
- var _useIsMobile = _interopRequireDefault(require("../../../Functions/useIsMobile"));
36
+ var _useIsMobile2 = _interopRequireDefault(require("../../../Functions/useIsMobile"));
27
37
 
28
38
  var _utils = require("../../../Functions/utils");
29
39
 
@@ -31,68 +41,119 @@ var _DropdownLoader = _interopRequireDefault(require("./components/DropdownLoade
31
41
 
32
42
  require("./Dropdown.scss");
33
43
 
34
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
35
-
36
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
37
-
38
- const RC = "dropdown";
39
- const MIN_ITEMS_FOR_SHOW_MOBILE_SEARCH = 10;
40
-
41
- const Dropdown = _ref => {
42
- var _options$find, _dropdownListWrapperR4, _dropdownListWrapperR5, _dropdownListRef$curr5, _dropdownListRef$curr6, _filteredOptions$find, _tabIndex$toString;
43
-
44
- let {
45
- label,
46
- options = [],
47
- value,
48
- error,
49
- disabled,
50
- onChange,
51
- placeholder,
52
- className,
53
- isSearchable,
54
- entity,
55
- scrollReactionObj,
56
- isListTop,
57
- isNotValidateASCII = false,
58
- testId,
59
- sortAlphabetical = true,
60
- fieldKey,
61
- id,
62
- noOptionsText = "No options available",
63
- attributesOfNativeInput = {},
64
- isDoNotPullOutListOfMainContainer,
65
- withMobileLogic,
66
- withActions,
67
- minItemsForShowMobileSearch = MIN_ITEMS_FOR_SHOW_MOBILE_SEARCH,
68
- customTrigger,
69
- tabIndex,
70
- onActionConfirmClick,
71
- onActionCancelClick,
72
- isDefaultOpened
73
- } = _ref;
74
- const {
75
- isMobile: isMobileProp
76
- } = (0, _useIsMobile.default)();
77
- const isMobile = isMobileProp && withMobileLogic && window.screen.width <= 768;
78
- const [dropdownId, setDropdownId] = (0, _react.useState)(id || fieldKey || Math.random().toString(16).slice(2));
79
- const [isOpen, setIsOpen] = (0, _react.useState)(false);
80
- const [searchValue, setSearchValue] = (0, _react.useState)();
81
- const dropdownRef = (0, _react.useRef)(null);
82
- const dropdownListRef = (0, _react.useRef)(null);
83
- const dropdownListWrapperRef = (0, _react.useRef)(null);
84
- const searchInputRef = (0, _react.useRef)(null);
85
- const wrapperRef = (0, _react.useRef)(null);
86
- const [initListHeight, setInitListHeight] = (0, _react.useState)(null);
87
- const [isSearchChanged, setIsSearchChanged] = (0, _react.useState)(false);
88
- const [isSearchInputFocused, setIsSearchInputFocused] = (0, _react.useState)(false);
89
- const [isScrollableList, setIsScrollableList] = (0, _react.useState)(null);
90
- const [isFixedMaxHeight, setIsFixedMaxHeight] = (0, _react.useState)(false);
91
- const [scrollTop, setScrollTop] = (0, _react.useState)(0);
92
- const [scrollHeight, setScrollHeight] = (0, _react.useState)(1);
44
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
45
+
46
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
47
+
48
+ 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; }
49
+
50
+ 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) { (0, _defineProperty2.default)(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; }
51
+
52
+ var RC = "dropdown";
53
+ var MIN_ITEMS_FOR_SHOW_MOBILE_SEARCH = 10;
54
+
55
+ var Dropdown = function Dropdown(_ref) {
56
+ var _options$find, _dropdownListWrapperR4, _dropdownListWrapperR5, _dropdownListRef$curr5, _dropdownListRef$curr6, _filteredOptions$find, _cn6, _cn7, _tabIndex$toString;
57
+
58
+ var label = _ref.label,
59
+ _ref$options = _ref.options,
60
+ options = _ref$options === void 0 ? [] : _ref$options,
61
+ value = _ref.value,
62
+ error = _ref.error,
63
+ disabled = _ref.disabled,
64
+ onChange = _ref.onChange,
65
+ placeholder = _ref.placeholder,
66
+ className = _ref.className,
67
+ isSearchable = _ref.isSearchable,
68
+ entity = _ref.entity,
69
+ scrollReactionObj = _ref.scrollReactionObj,
70
+ isListTop = _ref.isListTop,
71
+ _ref$isNotValidateASC = _ref.isNotValidateASCII,
72
+ isNotValidateASCII = _ref$isNotValidateASC === void 0 ? false : _ref$isNotValidateASC,
73
+ testId = _ref.testId,
74
+ _ref$sortAlphabetical = _ref.sortAlphabetical,
75
+ sortAlphabetical = _ref$sortAlphabetical === void 0 ? true : _ref$sortAlphabetical,
76
+ fieldKey = _ref.fieldKey,
77
+ id = _ref.id,
78
+ _ref$noOptionsText = _ref.noOptionsText,
79
+ noOptionsText = _ref$noOptionsText === void 0 ? "No options available" : _ref$noOptionsText,
80
+ _ref$attributesOfNati = _ref.attributesOfNativeInput,
81
+ attributesOfNativeInput = _ref$attributesOfNati === void 0 ? {} : _ref$attributesOfNati,
82
+ isDoNotPullOutListOfMainContainer = _ref.isDoNotPullOutListOfMainContainer,
83
+ withMobileLogic = _ref.withMobileLogic,
84
+ withActions = _ref.withActions,
85
+ _ref$minItemsForShowM = _ref.minItemsForShowMobileSearch,
86
+ minItemsForShowMobileSearch = _ref$minItemsForShowM === void 0 ? MIN_ITEMS_FOR_SHOW_MOBILE_SEARCH : _ref$minItemsForShowM,
87
+ customTrigger = _ref.customTrigger,
88
+ tabIndex = _ref.tabIndex,
89
+ onActionConfirmClick = _ref.onActionConfirmClick,
90
+ onActionCancelClick = _ref.onActionCancelClick,
91
+ isDefaultOpened = _ref.isDefaultOpened;
92
+
93
+ var _useIsMobile = (0, _useIsMobile2.default)(),
94
+ isMobileProp = _useIsMobile.isMobile;
95
+
96
+ var isMobile = isMobileProp && withMobileLogic && window.screen.width <= 768;
97
+
98
+ var _useState = (0, _react.useState)(id || fieldKey || Math.random().toString(16).slice(2)),
99
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
100
+ dropdownId = _useState2[0],
101
+ setDropdownId = _useState2[1];
102
+
103
+ var _useState3 = (0, _react.useState)(false),
104
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
105
+ isOpen = _useState4[0],
106
+ setIsOpen = _useState4[1];
107
+
108
+ var _useState5 = (0, _react.useState)(),
109
+ _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
110
+ searchValue = _useState6[0],
111
+ setSearchValue = _useState6[1];
112
+
113
+ var dropdownRef = (0, _react.useRef)(null);
114
+ var dropdownListRef = (0, _react.useRef)(null);
115
+ var dropdownListWrapperRef = (0, _react.useRef)(null);
116
+ var searchInputRef = (0, _react.useRef)(null);
117
+ var wrapperRef = (0, _react.useRef)(null);
118
+
119
+ var _useState7 = (0, _react.useState)(null),
120
+ _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
121
+ initListHeight = _useState8[0],
122
+ setInitListHeight = _useState8[1];
123
+
124
+ var _useState9 = (0, _react.useState)(false),
125
+ _useState10 = (0, _slicedToArray2.default)(_useState9, 2),
126
+ isSearchChanged = _useState10[0],
127
+ setIsSearchChanged = _useState10[1];
128
+
129
+ var _useState11 = (0, _react.useState)(false),
130
+ _useState12 = (0, _slicedToArray2.default)(_useState11, 2),
131
+ isSearchInputFocused = _useState12[0],
132
+ setIsSearchInputFocused = _useState12[1];
133
+
134
+ var _useState13 = (0, _react.useState)(null),
135
+ _useState14 = (0, _slicedToArray2.default)(_useState13, 2),
136
+ isScrollableList = _useState14[0],
137
+ setIsScrollableList = _useState14[1];
138
+
139
+ var _useState15 = (0, _react.useState)(false),
140
+ _useState16 = (0, _slicedToArray2.default)(_useState15, 2),
141
+ isFixedMaxHeight = _useState16[0],
142
+ setIsFixedMaxHeight = _useState16[1];
143
+
144
+ var _useState17 = (0, _react.useState)(0),
145
+ _useState18 = (0, _slicedToArray2.default)(_useState17, 2),
146
+ scrollTop = _useState18[0],
147
+ setScrollTop = _useState18[1];
148
+
149
+ var _useState19 = (0, _react.useState)(1),
150
+ _useState20 = (0, _slicedToArray2.default)(_useState19, 2),
151
+ scrollHeight = _useState20[0],
152
+ setScrollHeight = _useState20[1];
153
+
93
154
  if (!options) return null;
94
- const getTotalOptions = (0, _react.useCallback)(() => {
95
- return options === null || options === void 0 ? void 0 : options.reduce((result, item) => {
155
+ var getTotalOptions = (0, _react.useCallback)(function () {
156
+ return options === null || options === void 0 ? void 0 : options.reduce(function (result, item) {
96
157
  if (item !== null && item !== void 0 && item.list || item !== null && item !== void 0 && item.items) {
97
158
  var _item$list, _item$items;
98
159
 
@@ -109,69 +170,71 @@ const Dropdown = _ref => {
109
170
  isSearchable = getTotalOptions() > (minItemsForShowMobileSearch || MIN_ITEMS_FOR_SHOW_MOBILE_SEARCH);
110
171
  }
111
172
 
112
- const moveOtherToEnd = options => {
113
- const otherIndex = options === null || options === void 0 ? void 0 : options.findIndex(option => (option === null || option === void 0 ? void 0 : option.value) === "other");
173
+ var moveOtherToEnd = function moveOtherToEnd(options) {
174
+ var otherIndex = options === null || options === void 0 ? void 0 : options.findIndex(function (option) {
175
+ return (option === null || option === void 0 ? void 0 : option.value) === "other";
176
+ });
114
177
 
115
178
  if (otherIndex > -1) {
116
- const other = options === null || options === void 0 ? void 0 : options.splice(otherIndex, 1);
117
- options.push(...other);
179
+ var other = options === null || options === void 0 ? void 0 : options.splice(otherIndex, 1);
180
+ options.push.apply(options, (0, _toConsumableArray2.default)(other));
118
181
  }
119
182
 
120
183
  return options;
121
184
  };
122
185
 
123
- const optionsWithOtherAtTheEnd = moveOtherToEnd(options);
124
- options.map(option => {
186
+ var optionsWithOtherAtTheEnd = moveOtherToEnd(options);
187
+ options.map(function (option) {
125
188
  if (option.items) {
126
189
  return option.items = moveOtherToEnd(option.items);
127
190
  } else return option;
128
191
  });
129
- const filteredGroups = optionsWithOtherAtTheEnd.map(item => {
192
+ var filteredGroups = optionsWithOtherAtTheEnd.map(function (item) {
130
193
  var _item$items2;
131
194
 
132
- return { ...item,
133
- items: !isSearchable || !isSearchChanged ? item === null || item === void 0 ? void 0 : item.items : (_item$items2 = item.items) === null || _item$items2 === void 0 ? void 0 : _item$items2.slice().filter(el => {
195
+ return _objectSpread(_objectSpread({}, item), {}, {
196
+ items: !isSearchable || !isSearchChanged ? item === null || item === void 0 ? void 0 : item.items : (_item$items2 = item.items) === null || _item$items2 === void 0 ? void 0 : _item$items2.slice().filter(function (el) {
134
197
  var _el$label;
135
198
 
136
199
  return (el === null || el === void 0 ? void 0 : (_el$label = el.label) === null || _el$label === void 0 ? void 0 : _el$label.toLowerCase().includes((searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase()) || "")) || !(el !== null && el !== void 0 && el.value) || (el === null || el === void 0 ? void 0 : el.value) === "";
137
200
  })
138
- };
139
- }).filter(item => {
201
+ });
202
+ }).filter(function (item) {
140
203
  var _item$items3;
141
204
 
142
205
  return ((_item$items3 = item.items) === null || _item$items3 === void 0 ? void 0 : _item$items3.length) > 0;
143
206
  });
144
- const filteredItems = optionsWithOtherAtTheEnd.filter(item => {
207
+ var filteredItems = optionsWithOtherAtTheEnd.filter(function (item) {
145
208
  var _item$items4;
146
209
 
147
210
  return !((_item$items4 = item.items) !== null && _item$items4 !== void 0 && _item$items4.length);
148
- }).filter(item => {
211
+ }).filter(function (item) {
149
212
  var _item$label;
150
213
 
151
214
  if (!isSearchable || !isSearchChanged) return true;
152
215
  return (item === null || item === void 0 ? void 0 : (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.toLowerCase().includes((searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase()) || "")) || !(item !== null && item !== void 0 && item.value) || (item === null || item === void 0 ? void 0 : item.value) === "";
153
216
  });
154
- const filteredOptions = [...filteredItems, ...filteredGroups];
155
- const modalBtnTrigger = entity && entity !== "" && typeof entity === "string";
217
+ var filteredOptions = [].concat((0, _toConsumableArray2.default)(filteredItems), (0, _toConsumableArray2.default)(filteredGroups));
218
+ var modalBtnTrigger = entity && entity !== "" && typeof entity === "string";
156
219
 
157
- const onChangeHandler = item => {
220
+ var onChangeHandler = function onChangeHandler(item) {
158
221
  setIsOpen(false);
159
222
  onChange(item.value);
160
223
  };
161
224
 
162
- const onKeyDown = e => {
225
+ var onKeyDown = function onKeyDown(e) {
163
226
  if (![9, 13].includes(e.keyCode)) return false;
164
227
  setIsOpen(false);
165
228
  };
166
229
 
167
- const onKeyUp = e => {
230
+ var onKeyUp = function onKeyUp(e) {
168
231
  if (![9, 13].includes(e.keyCode)) return false;
169
232
  setIsOpen(true);
170
233
  }; // decorator
171
234
 
172
235
 
173
- const getDepends = getDependsTrigger => {
174
- const newOnChange = e => {
236
+ var getDepends = function getDepends(getDependsTrigger) {
237
+ var newOnChange = function newOnChange(e) {
175
238
  if (e.value === "open_modal") {
176
239
  onChange("open_modal");
177
240
  } else {
@@ -180,20 +243,20 @@ const Dropdown = _ref => {
180
243
  }; // add pseudo option
181
244
 
182
245
 
183
- const newOptions = [{
246
+ var newOptions = [{
184
247
  label: "New ".concat(entity),
185
248
  value: "open_modal",
186
249
  className: "dropdown__list-item--modal"
187
- }, ...filteredOptions];
250
+ }].concat((0, _toConsumableArray2.default)(filteredOptions));
188
251
  return {
189
- onChange: changeItem => {
252
+ onChange: function onChange(changeItem) {
190
253
  return getDependsTrigger ? newOnChange(changeItem) : onChangeHandler(changeItem);
191
254
  },
192
255
  options: getDependsTrigger ? newOptions : options
193
256
  };
194
257
  };
195
258
 
196
- const handleClickOutside = event => {
259
+ var handleClickOutside = function handleClickOutside(event) {
197
260
  var _getListContainer;
198
261
 
199
262
  if (!((_getListContainer = getListContainer()) !== null && _getListContainer !== void 0 && _getListContainer.contains(event === null || event === void 0 ? void 0 : event.target)) && !(dropdownRef !== null && dropdownRef !== void 0 && dropdownRef.current.contains(event === null || event === void 0 ? void 0 : event.target))) {
@@ -201,14 +264,14 @@ const Dropdown = _ref => {
201
264
  }
202
265
  };
203
266
 
204
- const onSearchHandler = name => {
205
- let inputValue = name;
267
+ var onSearchHandler = function onSearchHandler(name) {
268
+ var inputValue = name;
206
269
  if (!isNotValidateASCII) inputValue = (0, _fieldValueFormatters.formatToOnlyASCIICodeText)(inputValue);
207
270
  setIsSearchChanged(true);
208
271
  setSearchValue(inputValue);
209
272
  };
210
273
 
211
- const onWrapperClick = e => {
274
+ var onWrapperClick = function onWrapperClick(e) {
212
275
  if (e.target === (wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current)) {
213
276
  e.stopPropagation();
214
277
  e.preventDefault();
@@ -216,12 +279,14 @@ const Dropdown = _ref => {
216
279
  }
217
280
  };
218
281
 
219
- const hightlightedText = (text, postfix, description) => {
282
+ var hightlightedText = function hightlightedText(text, postfix, description) {
220
283
  var _text;
221
284
 
222
- const prepare = text => text === null || text === void 0 ? void 0 : text.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
285
+ var prepare = function prepare(text) {
286
+ return text === null || text === void 0 ? void 0 : text.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
287
+ };
223
288
 
224
- text = text.replace(/["&<>]/g, a => {
289
+ text = text.replace(/["&<>]/g, function (a) {
225
290
  return {
226
291
  '"': "&quot;",
227
292
  "&": "&amp;",
@@ -229,29 +294,28 @@ const Dropdown = _ref => {
229
294
  ">": "&gt;"
230
295
  }[a];
231
296
  });
232
- const main = isSearchable && searchValue ? (_text = text) === null || _text === void 0 ? void 0 : _text.replace(new RegExp(prepare(searchValue), "i"), match => "<span class=\"bg--yellow\">".concat(match, "</span>")) : text;
233
- const postfixPart = postfix ? "<span class=\"dropdown__list-item-postfix\">".concat(postfix, "</span>") : "";
234
- const descriptionPart = description ? "<span class=\"dropdown__list-item-description\">".concat(description, "</span>") : "";
297
+ var main = isSearchable && searchValue ? (_text = text) === null || _text === void 0 ? void 0 : _text.replace(new RegExp(prepare(searchValue), "i"), function (match) {
298
+ return "<span class=\"bg--yellow\">".concat(match, "</span>");
299
+ }) : text;
300
+ var postfixPart = postfix ? "<span class=\"dropdown__list-item-postfix\">".concat(postfix, "</span>") : "";
301
+ var descriptionPart = description ? "<span class=\"dropdown__list-item-description\">".concat(description, "</span>") : "";
235
302
  return main + postfixPart + descriptionPart;
236
303
  };
237
304
 
238
- const depend = getDepends(modalBtnTrigger);
305
+ var depend = getDepends(modalBtnTrigger);
239
306
 
240
- const getMarkupForElement = (item, index, optTestId) => {
241
- var _item$value, _item$value$toString, _item$value2, _item$value2$toString, _item$customMobileIco;
307
+ var getMarkupForElement = function getMarkupForElement(item, index, optTestId) {
308
+ var _item$value, _item$value$toString, _item$value2, _item$value2$toString, _cn, _item$customMobileIco;
242
309
 
243
310
  return /*#__PURE__*/_react.default.createElement("button", {
244
311
  "data-testid": "dropdown--button--key-".concat(optTestId || (item === null || item === void 0 ? void 0 : (_item$value = item.value) === null || _item$value === void 0 ? void 0 : (_item$value$toString = _item$value.toString()) === null || _item$value$toString === void 0 ? void 0 : _item$value$toString.replace(/\s/, "-")) || (item === null || item === void 0 ? void 0 : item.key) || "item", "--option"),
245
312
  key: (_item$value2 = item.value) === null || _item$value2 === void 0 ? void 0 : (_item$value2$toString = _item$value2.toString()) === null || _item$value2$toString === void 0 ? void 0 : _item$value2$toString.replace(/ /g, "_"),
246
- onMouseDown: () => depend.onChange(item),
247
- className: (0, _classnames.default)("".concat(RC, "__list-item"), {
248
- ["".concat(RC, "__list-item_active")]: item.value === value,
249
- ["".concat(RC, "__list-item_disabled")]: item.disabled
250
- }, item.className)
313
+ onMouseDown: function onMouseDown() {
314
+ return depend.onChange(item);
315
+ },
316
+ className: (0, _classnames.default)("".concat(RC, "__list-item"), (_cn = {}, (0, _defineProperty2.default)(_cn, "".concat(RC, "__list-item_active"), item.value === value), (0, _defineProperty2.default)(_cn, "".concat(RC, "__list-item_disabled"), item.disabled), _cn), item.className)
251
317
  }, !isMobile && /*#__PURE__*/_react.default.createElement("span", {
252
- className: (0, _classnames.default)("".concat(RC, "__active-icon"), {
253
- ["".concat(RC, "__active-icon_active")]: item.value === value
254
- })
318
+ className: (0, _classnames.default)("".concat(RC, "__active-icon"), (0, _defineProperty2.default)({}, "".concat(RC, "__active-icon_active"), item.value === value))
255
319
  }, /*#__PURE__*/_react.default.createElement(_reactFeather.Check, null)), /*#__PURE__*/_react.default.createElement("div", {
256
320
  className: (0, _classnames.default)("".concat(RC, "__list-item-label"), item.labelClassName || ""),
257
321
  dangerouslySetInnerHTML: {
@@ -263,7 +327,7 @@ const Dropdown = _ref => {
263
327
  }) : "");
264
328
  };
265
329
 
266
- const filteredOptionList = filteredOption => {
330
+ var filteredOptionList = function filteredOptionList(filteredOption) {
267
331
  var _filteredOption$items, _filteredOption$label, _filteredOption$label2;
268
332
 
269
333
  return ((_filteredOption$items = filteredOption.items) === null || _filteredOption$items === void 0 ? void 0 : _filteredOption$items.length) > 0 ? /*#__PURE__*/_react.default.createElement("div", {
@@ -271,20 +335,26 @@ const Dropdown = _ref => {
271
335
  className: (0, _classnames.default)("".concat(RC, "-group"), filteredOption.className)
272
336
  }, /*#__PURE__*/_react.default.createElement("div", {
273
337
  className: "".concat(RC, "-group__name")
274
- }, filteredOption.label), filteredOption.items.map((el, index) => getMarkupForElement(el, index, el === null || el === void 0 ? void 0 : el.testId))) : null;
338
+ }, filteredOption.label), filteredOption.items.map(function (el, index) {
339
+ return getMarkupForElement(el, index, el === null || el === void 0 ? void 0 : el.testId);
340
+ })) : null;
275
341
  };
276
342
 
277
- const selectedLabel = ((_options$find = options.find(el => el.value === value)) === null || _options$find === void 0 ? void 0 : _options$find.label) || options.reduce((acc, item) => {
343
+ var selectedLabel = ((_options$find = options.find(function (el) {
344
+ return el.value === value;
345
+ })) === null || _options$find === void 0 ? void 0 : _options$find.label) || options.reduce(function (acc, item) {
278
346
  var _item$items5, _item$items5$find;
279
347
 
280
- return acc || ((_item$items5 = item.items) === null || _item$items5 === void 0 ? void 0 : (_item$items5$find = _item$items5.find(el => el.value === value)) === null || _item$items5$find === void 0 ? void 0 : _item$items5$find.label);
348
+ return acc || ((_item$items5 = item.items) === null || _item$items5 === void 0 ? void 0 : (_item$items5$find = _item$items5.find(function (el) {
349
+ return el.value === value;
350
+ })) === null || _item$items5$find === void 0 ? void 0 : _item$items5$find.label);
281
351
  }, null);
282
- const doScrollCallback = (0, _react.useCallback)(e => {
283
- const {
284
- callback,
285
- isWithAnyScrolling,
286
- scrollingInaccuracy = 0
287
- } = scrollReactionObj || {};
352
+ var doScrollCallback = (0, _react.useCallback)(function (e) {
353
+ var _ref2 = scrollReactionObj || {},
354
+ callback = _ref2.callback,
355
+ isWithAnyScrolling = _ref2.isWithAnyScrolling,
356
+ _ref2$scrollingInaccu = _ref2.scrollingInaccuracy,
357
+ scrollingInaccuracy = _ref2$scrollingInaccu === void 0 ? 0 : _ref2$scrollingInaccu;
288
358
 
289
359
  if (callback && typeof callback === "function") {
290
360
  if (isWithAnyScrolling) callback(e);else if (Math.round(e.target.clientHeight + e.target.scrollTop + scrollingInaccuracy) >= e.target.scrollHeight) {
@@ -293,20 +363,20 @@ const Dropdown = _ref => {
293
363
  }
294
364
  }, [filteredOptions]);
295
365
 
296
- const getParentNode = () => {
297
- var _ref2, _document$querySelect;
366
+ var getParentNode = function getParentNode() {
367
+ var _ref3, _document$querySelect;
298
368
 
299
369
  if (isDoNotPullOutListOfMainContainer) return dropdownRef.current;
300
- return (_ref2 = (_document$querySelect = document.querySelector("div#root")) !== null && _document$querySelect !== void 0 ? _document$querySelect : document.querySelector("div#app")) !== null && _ref2 !== void 0 ? _ref2 : document.querySelector("div#storybook-root");
370
+ return (_ref3 = (_document$querySelect = document.querySelector("div#root")) !== null && _document$querySelect !== void 0 ? _document$querySelect : document.querySelector("div#app")) !== null && _ref3 !== void 0 ? _ref3 : document.querySelector("div#storybook-root");
301
371
  };
302
372
 
303
- const initListContainer = () => {
304
- const dropdownList = document.createElement("div");
373
+ var initListContainer = function initListContainer() {
374
+ var dropdownList = document.createElement("div");
305
375
  dropdownList.setAttribute("id", dropdownId);
306
376
  dropdownList.classList.add("dropdown__container");
307
377
 
308
378
  if (isMobile) {
309
- dropdownList.addEventListener("click", e => {
379
+ dropdownList.addEventListener("click", function (e) {
310
380
  if (e.target.id === dropdownId) setIsOpen(false);
311
381
  });
312
382
  }
@@ -325,7 +395,7 @@ const Dropdown = _ref => {
325
395
  (_document$getElementB = document.getElementById("mlw-".concat(dropdownId))) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.remove();
326
396
  } catch (e) {}
327
397
 
328
- const dropdownMobileListWrapper = document.createElement("div");
398
+ var dropdownMobileListWrapper = document.createElement("div");
329
399
  dropdownMobileListWrapper.classList.add("dropdown-mobile");
330
400
  dropdownMobileListWrapper.setAttribute("id", "mlw-".concat(dropdownId));
331
401
  dropdownMobileListWrapper === null || dropdownMobileListWrapper === void 0 ? void 0 : dropdownMobileListWrapper.append(dropdownList);
@@ -338,73 +408,68 @@ const Dropdown = _ref => {
338
408
  }
339
409
  };
340
410
 
341
- const getListContainer = () => {
411
+ var getListContainer = function getListContainer() {
342
412
  return document.getElementById(dropdownId);
343
413
  };
344
414
 
345
- const getListContainerWrapper = () => {
415
+ var getListContainerWrapper = function getListContainerWrapper() {
346
416
  return document.getElementById("mlw-".concat(dropdownId));
347
417
  };
348
418
 
349
- const setListContainerStyles = () => {
419
+ var setListContainerStyles = function setListContainerStyles() {
350
420
  var _dropdownRef$current$, _dropdownListWrapperR, _getComputedStyle$mar, _getComputedStyle, _getComputedStyle$mar2, _getComputedStyle$max, _getComputedStyle2, _getComputedStyle2$ma, _sw$getBoundingClient, _dropdownListWrapperR2, _dropdownListWrapperR3, _lh$getBoundingClient, _getComputedStyle$hei, _getComputedStyle3, _getComputedStyle3$he;
351
421
 
352
- const lc = getListContainer();
422
+ var lc = getListContainer();
353
423
  if (!lc || !isOpen) return false;
354
- const windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
355
- const {
356
- width,
357
- height,
358
- left,
359
- top
360
- } = (_dropdownRef$current$ = dropdownRef === null || dropdownRef === void 0 ? void 0 : dropdownRef.current.getBoundingClientRect()) !== null && _dropdownRef$current$ !== void 0 ? _dropdownRef$current$ : {};
361
- const sw = lc.getElementsByClassName("dropdown__list")[0];
362
- const lh = dropdownListWrapperRef === null || dropdownListWrapperRef === void 0 ? void 0 : (_dropdownListWrapperR = dropdownListWrapperRef.current) === null || _dropdownListWrapperR === void 0 ? void 0 : _dropdownListWrapperR.getElementsByClassName("dropdown__list-header")[0];
363
- const margin = parseInt((_getComputedStyle$mar = (_getComputedStyle = getComputedStyle(dropdownListWrapperRef === null || dropdownListWrapperRef === void 0 ? void 0 : dropdownListWrapperRef.current)) === null || _getComputedStyle === void 0 ? void 0 : (_getComputedStyle$mar2 = _getComputedStyle.marginTop) === null || _getComputedStyle$mar2 === void 0 ? void 0 : _getComputedStyle$mar2.replace("px", "")) !== null && _getComputedStyle$mar !== void 0 ? _getComputedStyle$mar : 0, 10);
364
- const maxHeight = initListHeight !== null && initListHeight !== void 0 ? initListHeight : parseInt((_getComputedStyle$max = (_getComputedStyle2 = getComputedStyle(sw)) === null || _getComputedStyle2 === void 0 ? void 0 : (_getComputedStyle2$ma = _getComputedStyle2.maxHeight) === null || _getComputedStyle2$ma === void 0 ? void 0 : _getComputedStyle2$ma.replace("px", "")) !== null && _getComputedStyle$max !== void 0 ? _getComputedStyle$max : 0, 10);
424
+ var windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
425
+
426
+ var _ref4 = (_dropdownRef$current$ = dropdownRef === null || dropdownRef === void 0 ? void 0 : dropdownRef.current.getBoundingClientRect()) !== null && _dropdownRef$current$ !== void 0 ? _dropdownRef$current$ : {},
427
+ width = _ref4.width,
428
+ height = _ref4.height,
429
+ left = _ref4.left,
430
+ top = _ref4.top;
431
+
432
+ var sw = lc.getElementsByClassName("dropdown__list")[0];
433
+ var lh = dropdownListWrapperRef === null || dropdownListWrapperRef === void 0 ? void 0 : (_dropdownListWrapperR = dropdownListWrapperRef.current) === null || _dropdownListWrapperR === void 0 ? void 0 : _dropdownListWrapperR.getElementsByClassName("dropdown__list-header")[0];
434
+ var margin = parseInt((_getComputedStyle$mar = (_getComputedStyle = getComputedStyle(dropdownListWrapperRef === null || dropdownListWrapperRef === void 0 ? void 0 : dropdownListWrapperRef.current)) === null || _getComputedStyle === void 0 ? void 0 : (_getComputedStyle$mar2 = _getComputedStyle.marginTop) === null || _getComputedStyle$mar2 === void 0 ? void 0 : _getComputedStyle$mar2.replace("px", "")) !== null && _getComputedStyle$mar !== void 0 ? _getComputedStyle$mar : 0, 10);
435
+ var maxHeight = initListHeight !== null && initListHeight !== void 0 ? initListHeight : parseInt((_getComputedStyle$max = (_getComputedStyle2 = getComputedStyle(sw)) === null || _getComputedStyle2 === void 0 ? void 0 : (_getComputedStyle2$ma = _getComputedStyle2.maxHeight) === null || _getComputedStyle2$ma === void 0 ? void 0 : _getComputedStyle2$ma.replace("px", "")) !== null && _getComputedStyle$max !== void 0 ? _getComputedStyle$max : 0, 10);
365
436
  if (initListHeight === null) setInitListHeight(maxHeight);
366
- const toTop = top - margin;
367
- const toBottom = windowHeight - top - height - margin * 2;
368
- const swHeight = sw === null || sw === void 0 ? void 0 : (_sw$getBoundingClient = sw.getBoundingClientRect()) === null || _sw$getBoundingClient === void 0 ? void 0 : _sw$getBoundingClient.height;
369
- const maxSwHeight = isMobile ? (dropdownListWrapperRef === null || dropdownListWrapperRef === void 0 ? void 0 : (_dropdownListWrapperR2 = dropdownListWrapperRef.current) === null || _dropdownListWrapperR2 === void 0 ? void 0 : (_dropdownListWrapperR3 = _dropdownListWrapperR2.getBoundingClientRect()) === null || _dropdownListWrapperR3 === void 0 ? void 0 : _dropdownListWrapperR3.height) - (lh === null || lh === void 0 ? void 0 : (_lh$getBoundingClient = lh.getBoundingClientRect()) === null || _lh$getBoundingClient === void 0 ? void 0 : _lh$getBoundingClient.height) : toTop >= maxHeight || toBottom >= maxHeight ? maxHeight - 3 * margin : toTop > toBottom ? toTop - 3 * margin : toBottom - 4 * margin;
370
- const listPos = toTop < toBottom || toBottom >= swHeight ? "bottom" : "top";
437
+ var toTop = top - margin;
438
+ var toBottom = windowHeight - top - height - margin * 2;
439
+ var swHeight = sw === null || sw === void 0 ? void 0 : (_sw$getBoundingClient = sw.getBoundingClientRect()) === null || _sw$getBoundingClient === void 0 ? void 0 : _sw$getBoundingClient.height;
440
+ var maxSwHeight = isMobile ? (dropdownListWrapperRef === null || dropdownListWrapperRef === void 0 ? void 0 : (_dropdownListWrapperR2 = dropdownListWrapperRef.current) === null || _dropdownListWrapperR2 === void 0 ? void 0 : (_dropdownListWrapperR3 = _dropdownListWrapperR2.getBoundingClientRect()) === null || _dropdownListWrapperR3 === void 0 ? void 0 : _dropdownListWrapperR3.height) - (lh === null || lh === void 0 ? void 0 : (_lh$getBoundingClient = lh.getBoundingClientRect()) === null || _lh$getBoundingClient === void 0 ? void 0 : _lh$getBoundingClient.height) : toTop >= maxHeight || toBottom >= maxHeight ? maxHeight - 3 * margin : toTop > toBottom ? toTop - 3 * margin : toBottom - 4 * margin;
441
+ var listPos = toTop < toBottom || toBottom >= swHeight ? "bottom" : "top";
371
442
  lc.style.minWidth = "".concat(width, "px");
372
443
  lc.style.left = "".concat(left, "px");
373
444
  lc.style.top = "".concat(listPos === "bottom" ? top + height : top - margin * 3 - parseInt((_getComputedStyle$hei = (_getComputedStyle3 = getComputedStyle(dropdownListWrapperRef === null || dropdownListWrapperRef === void 0 ? void 0 : dropdownListWrapperRef.current)) === null || _getComputedStyle3 === void 0 ? void 0 : (_getComputedStyle3$he = _getComputedStyle3.height) === null || _getComputedStyle3$he === void 0 ? void 0 : _getComputedStyle3$he.replace("px", "")) !== null && _getComputedStyle$hei !== void 0 ? _getComputedStyle$hei : 0, 10), "px");
374
445
  sw.style.maxHeight = "".concat(maxSwHeight, "px");
375
446
  };
376
447
 
377
- const renderListContainer = () => {
378
- const lc = getListContainer();
448
+ var renderListContainer = function renderListContainer() {
449
+ var lc = getListContainer();
379
450
  if (!lc) return null;
380
451
  return /*#__PURE__*/(0, _reactDom.createPortal)(getListMarkUp(), lc);
381
452
  };
382
453
 
383
- const getSortedOptions = data => {
384
- let newData = [...data];
454
+ var getSortedOptions = function getSortedOptions(data) {
455
+ var newData = (0, _toConsumableArray2.default)(data);
385
456
 
386
457
  if (sortAlphabetical) {
387
- const openModalOption = newData.filter(_ref3 => {
388
- let {
389
- value
390
- } = _ref3;
458
+ var openModalOption = newData.filter(function (_ref5) {
459
+ var value = _ref5.value;
391
460
  return value === "open_modal";
392
461
  });
393
- const emptyOption = newData.filter(_ref4 => {
394
- let {
395
- value
396
- } = _ref4;
462
+ var emptyOption = newData.filter(function (_ref6) {
463
+ var value = _ref6.value;
397
464
  return value === "";
398
465
  });
399
- const restOfOptions = newData.filter(_ref5 => {
400
- let {
401
- value
402
- } = _ref5;
466
+ var restOfOptions = newData.filter(function (_ref7) {
467
+ var value = _ref7.value;
403
468
  return value !== "open_modal" && value !== "";
404
469
  }).sort(_utils.compareAlphabetical);
405
- newData = [...openModalOption, ...emptyOption, ...restOfOptions].map(item => {
470
+ newData = [].concat((0, _toConsumableArray2.default)(openModalOption), (0, _toConsumableArray2.default)(emptyOption), (0, _toConsumableArray2.default)(restOfOptions)).map(function (item) {
406
471
  if (item !== null && item !== void 0 && item.items) {
407
- item.items = [...item.items].sort(_utils.compareAlphabetical);
472
+ item.items = (0, _toConsumableArray2.default)(item.items).sort(_utils.compareAlphabetical);
408
473
  }
409
474
 
410
475
  return item;
@@ -414,56 +479,57 @@ const Dropdown = _ref => {
414
479
  return newData;
415
480
  };
416
481
 
417
- const getListMarkUp = () => {
418
- var _getSortedOptions;
482
+ var getListMarkUp = function getListMarkUp() {
483
+ var _cn3, _cn4, _getSortedOptions;
419
484
 
420
485
  return /*#__PURE__*/_react.default.createElement("div", {
421
486
  className: (0, _classnames.default)("".concat(RC, "__container-wrapper")),
422
487
  ref: wrapperRef,
423
- onClick: isMobile ? onWrapperClick : () => {}
488
+ onClick: isMobile ? onWrapperClick : function () {}
424
489
  }, /*#__PURE__*/_react.default.createElement("div", {
425
- className: (0, _classnames.default)("".concat(RC, "__list-wrapper"), {
426
- ["".concat(RC, "__list-wrapper--fixed-height")]: isFixedMaxHeight,
427
- ["".concat(RC, "__list-wrapper--with-bottom-shadow")]: isScrollableList && isMobile,
428
- ["".concat(RC, "__list-wrapper--with-bottom-shadow-hidden")]: scrollTop === scrollHeight
429
- }),
490
+ className: (0, _classnames.default)("".concat(RC, "__list-wrapper"), (_cn3 = {}, (0, _defineProperty2.default)(_cn3, "".concat(RC, "__list-wrapper--fixed-height"), isFixedMaxHeight), (0, _defineProperty2.default)(_cn3, "".concat(RC, "__list-wrapper--with-bottom-shadow"), isScrollableList && isMobile), (0, _defineProperty2.default)(_cn3, "".concat(RC, "__list-wrapper--with-bottom-shadow-hidden"), scrollTop === scrollHeight), _cn3)),
430
491
  ref: dropdownListWrapperRef
431
492
  }, isMobile && /*#__PURE__*/_react.default.createElement("div", {
432
- className: (0, _classnames.default)("".concat(RC, "__list-header"), {
433
- ["".concat(RC, "__list-header-with-shadow")]: isScrollableList && isMobile,
434
- ["".concat(RC, "__list-header-with-shadow-hidden")]: scrollTop === 0
435
- })
493
+ className: (0, _classnames.default)("".concat(RC, "__list-header"), (_cn4 = {}, (0, _defineProperty2.default)(_cn4, "".concat(RC, "__list-header-with-shadow"), isScrollableList && isMobile), (0, _defineProperty2.default)(_cn4, "".concat(RC, "__list-header-with-shadow-hidden"), scrollTop === 0), _cn4))
436
494
  }, /*#__PURE__*/_react.default.createElement("div", {
437
495
  className: (0, _classnames.default)("".concat(RC, "__list-header-row"))
438
496
  }, /*#__PURE__*/_react.default.createElement("div", {
439
497
  className: (0, _classnames.default)("".concat(RC, "__list-label"))
440
498
  }, label), /*#__PURE__*/_react.default.createElement("div", {
441
499
  className: (0, _classnames.default)("".concat(RC, "__list-close-icon")),
442
- onClick: () => setIsOpen(false)
500
+ onClick: function onClick() {
501
+ return setIsOpen(false);
502
+ }
443
503
  }, /*#__PURE__*/_react.default.createElement(_reactFeather.X, {
444
- onClick: () => setIsOpen(false)
504
+ onClick: function onClick() {
505
+ return setIsOpen(false);
506
+ }
445
507
  }))), isSearchable && /*#__PURE__*/_react.default.createElement("div", {
446
508
  className: (0, _classnames.default)("".concat(RC, "__list-header-row"))
447
509
  }, /*#__PURE__*/_react.default.createElement(_Input.default, (0, _extends2.default)({
448
510
  ref: searchInputRef,
449
511
  className: "".concat(RC, "__input"),
450
512
  value: searchValue !== null && searchValue !== void 0 ? searchValue : selectedLabel,
451
- onChange: v => onSearchHandler(v),
513
+ onChange: function onChange(v) {
514
+ return onSearchHandler(v);
515
+ },
452
516
  placeholder: placeholder || "Search",
453
517
  withDelete: true,
454
- onFocus: () => setIsSearchInputFocused(true),
455
- onBlur: () => setIsSearchInputFocused(false),
456
- onMouseDown: () => {
518
+ onFocus: function onFocus() {
519
+ return setIsSearchInputFocused(true);
520
+ },
521
+ onBlur: function onBlur() {
522
+ return setIsSearchInputFocused(false);
523
+ },
524
+ onMouseDown: function onMouseDown() {
457
525
  if (!isOpen) {
458
526
  setIsSearchInputFocused(true);
459
527
  }
460
528
  }
461
529
  }, attributesOfNativeInput)))), /*#__PURE__*/_react.default.createElement("div", {
462
- className: (0, _classnames.default)("".concat(RC, "__list"), {
463
- ["".concat(RC, "__list-top")]: isListTop
464
- }),
530
+ className: (0, _classnames.default)("".concat(RC, "__list"), (0, _defineProperty2.default)({}, "".concat(RC, "__list-top"), isListTop)),
465
531
  ref: dropdownListRef
466
- }, (_getSortedOptions = getSortedOptions(depend.options)) === null || _getSortedOptions === void 0 ? void 0 : _getSortedOptions.map(option => {
532
+ }, (_getSortedOptions = getSortedOptions(depend.options)) === null || _getSortedOptions === void 0 ? void 0 : _getSortedOptions.map(function (option) {
467
533
  var _option$items, _option$label;
468
534
 
469
535
  if (option !== null && option !== void 0 && (_option$items = option.items) !== null && _option$items !== void 0 && _option$items.length) {
@@ -472,14 +538,14 @@ const Dropdown = _ref => {
472
538
  } else {
473
539
  var _option$items2;
474
540
 
475
- const items = (_option$items2 = option.items) === null || _option$items2 === void 0 ? void 0 : _option$items2.slice().filter(el => {
541
+ var items = (_option$items2 = option.items) === null || _option$items2 === void 0 ? void 0 : _option$items2.slice().filter(function (el) {
476
542
  var _el$label2;
477
543
 
478
544
  return (el === null || el === void 0 ? void 0 : (_el$label2 = el.label) === null || _el$label2 === void 0 ? void 0 : _el$label2.toLowerCase().includes((searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase()) || "")) || !(el !== null && el !== void 0 && el.value) || (el === null || el === void 0 ? void 0 : el.value) === "";
479
545
  });
480
- if (items !== null && items !== void 0 && items.length) return filteredOptionList({ ...option,
481
- items
482
- });
546
+ if (items !== null && items !== void 0 && items.length) return filteredOptionList(_objectSpread(_objectSpread({}, option), {}, {
547
+ items: items
548
+ }));
483
549
  return null;
484
550
  }
485
551
  } else if (!isSearchable || !isSearchChanged || option !== null && option !== void 0 && (_option$label = option.label) !== null && _option$label !== void 0 && _option$label.toLowerCase().includes((searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase()) || "") || !(option !== null && option !== void 0 && option.value) || (option === null || option === void 0 ? void 0 : option.value) === "") {
@@ -490,21 +556,21 @@ const Dropdown = _ref => {
490
556
  }, noOptionsText), disabled && isOpen && /*#__PURE__*/_react.default.createElement(_DropdownLoader.default, null))));
491
557
  };
492
558
 
493
- const toggleList = e => {
559
+ var toggleList = function toggleList(e) {
494
560
  e === null || e === void 0 ? void 0 : e.stopPropagation();
495
- setIsOpen(isOpen => {
561
+ setIsOpen(function (isOpen) {
496
562
  return !isOpen;
497
563
  });
498
564
  };
499
565
 
500
- const closeList = isOpen ? handleClickOutside : () => {};
501
- (0, _react.useEffect)(() => {
566
+ var closeList = isOpen ? handleClickOutside : function () {};
567
+ (0, _react.useEffect)(function () {
502
568
  if (!isDoNotPullOutListOfMainContainer || dropdownRef.current) {
503
569
  initListContainer();
504
570
  if (isDefaultOpened && !isMobileProp) setIsOpen(true);
505
571
  }
506
572
  }, [isDoNotPullOutListOfMainContainer, dropdownRef.current]);
507
- (0, _react.useLayoutEffect)(() => {
573
+ (0, _react.useLayoutEffect)(function () {
508
574
  var _getListContainer3;
509
575
 
510
576
  if (!isMobile) {
@@ -520,7 +586,7 @@ const Dropdown = _ref => {
520
586
  }
521
587
 
522
588
  (_getListContainer3 = getListContainer()) === null || _getListContainer3 === void 0 ? void 0 : _getListContainer3.addEventListener("click", closeList);
523
- return () => {
589
+ return function () {
524
590
  var _getListContainer4;
525
591
 
526
592
  window.removeEventListener("resize", setListContainerStyles);
@@ -530,37 +596,41 @@ const Dropdown = _ref => {
530
596
  (_getListContainer4 = getListContainer()) === null || _getListContainer4 === void 0 ? void 0 : _getListContainer4.removeEventListener("click", closeList);
531
597
  };
532
598
  }, [getListContainer]);
533
- (0, _react.useLayoutEffect)(() => {
599
+ (0, _react.useLayoutEffect)(function () {
534
600
  setListContainerStyles();
535
601
  }, [isOpen, searchValue, isMobile, options, dropdownListWrapperRef === null || dropdownListWrapperRef === void 0 ? void 0 : (_dropdownListWrapperR4 = dropdownListWrapperRef.current) === null || _dropdownListWrapperR4 === void 0 ? void 0 : (_dropdownListWrapperR5 = _dropdownListWrapperR4.getBoundingClientRect()) === null || _dropdownListWrapperR5 === void 0 ? void 0 : _dropdownListWrapperR5.height]);
536
- (0, _react.useEffect)(() => {
602
+ (0, _react.useEffect)(function () {
537
603
  document.addEventListener("click", handleClickOutside, true);
538
- return () => document.removeEventListener("click", handleClickOutside, true);
604
+ return function () {
605
+ return document.removeEventListener("click", handleClickOutside, true);
606
+ };
539
607
  }, []);
540
- (0, _react.useEffect)(() => {
608
+ (0, _react.useEffect)(function () {
541
609
  if (!isOpen) {
542
610
  setIsSearchChanged(false);
543
611
  }
544
612
 
545
- if (scrollReactionObj && typeof scrollReactionObj === "object" && isOpen && dropdownListRef && dropdownListRef.current) {
613
+ if (scrollReactionObj && (0, _typeof2.default)(scrollReactionObj) === "object" && isOpen && dropdownListRef && dropdownListRef.current) {
546
614
  dropdownListRef.current.addEventListener("scroll", doScrollCallback);
547
615
  }
548
616
 
549
- return () => {
550
- if (scrollReactionObj && typeof scrollReactionObj === "object") removeEventListener("scroll", doScrollCallback);
617
+ return function () {
618
+ if (scrollReactionObj && (0, _typeof2.default)(scrollReactionObj) === "object") removeEventListener("scroll", doScrollCallback);
551
619
  };
552
620
  }, [isOpen, dropdownListRef]);
553
- (0, _react.useEffect)(() => {
621
+ (0, _react.useEffect)(function () {
554
622
  if (!searchValue && isSearchInputFocused) {
555
623
  setSearchValue(selectedLabel);
556
- setTimeout(() => searchInputRef.current.select(), 1);
624
+ setTimeout(function () {
625
+ return searchInputRef.current.select();
626
+ }, 1);
557
627
  }
558
628
 
559
629
  if (!isSearchInputFocused && !isOpen) {
560
630
  setSearchValue(null);
561
631
  }
562
632
  }, [isSearchInputFocused]);
563
- (0, _react.useEffect)(() => {
633
+ (0, _react.useEffect)(function () {
564
634
  var _searchInputRef$curre;
565
635
 
566
636
  if (isOpen && !isSearchInputFocused && searchInputRef !== null && searchInputRef !== void 0 && searchInputRef.current && !isMobile) searchInputRef === null || searchInputRef === void 0 ? void 0 : (_searchInputRef$curre = searchInputRef.current) === null || _searchInputRef$curre === void 0 ? void 0 : _searchInputRef$curre.focus();
@@ -580,7 +650,7 @@ const Dropdown = _ref => {
580
650
  setSearchValue(null);
581
651
  }
582
652
  }, [isOpen]);
583
- (0, _react.useEffect)(() => {
653
+ (0, _react.useEffect)(function () {
584
654
  if (isOpen && isMobile && dropdownListRef !== null && dropdownListRef !== void 0 && dropdownListRef.current && !searchValue) {
585
655
  var _dropdownListRef$curr, _dropdownListRef$curr2, _dropdownListRef$curr3, _dropdownListRef$curr4;
586
656
 
@@ -588,8 +658,8 @@ const Dropdown = _ref => {
588
658
  setIsFixedMaxHeight(isScrollableList || (dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr3 = dropdownListRef.current) === null || _dropdownListRef$curr3 === void 0 ? void 0 : _dropdownListRef$curr3.scrollHeight) > (dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr4 = dropdownListRef.current) === null || _dropdownListRef$curr4 === void 0 ? void 0 : _dropdownListRef$curr4.clientHeight));
589
659
  }
590
660
  }, [isOpen, isMobile, isScrollableList, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : dropdownListRef.current, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr5 = dropdownListRef.current) === null || _dropdownListRef$curr5 === void 0 ? void 0 : _dropdownListRef$curr5.scrollHeight, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr6 = dropdownListRef.current) === null || _dropdownListRef$curr6 === void 0 ? void 0 : _dropdownListRef$curr6.clientHeight]);
591
- (0, _react.useEffect)(() => {
592
- const setScrollTopValue = e => {
661
+ (0, _react.useEffect)(function () {
662
+ var setScrollTopValue = function setScrollTopValue(e) {
593
663
  setScrollTop(parseInt(e.target.scrollTop, 10));
594
664
  };
595
665
 
@@ -599,46 +669,43 @@ const Dropdown = _ref => {
599
669
  dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr7 = dropdownListRef.current) === null || _dropdownListRef$curr7 === void 0 ? void 0 : _dropdownListRef$curr7.addEventListener("scroll", setScrollTopValue);
600
670
  }
601
671
 
602
- return () => {
672
+ return function () {
603
673
  var _dropdownListRef$curr8;
604
674
 
605
675
  dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr8 = dropdownListRef.current) === null || _dropdownListRef$curr8 === void 0 ? void 0 : _dropdownListRef$curr8.removeEventListener("scroll", setScrollTopValue);
606
676
  };
607
677
  }, [isOpen, isMobile, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : dropdownListRef.current]);
608
- (0, _react.useEffect)(() => {
678
+ (0, _react.useEffect)(function () {
609
679
  if (dropdownListRef !== null && dropdownListRef !== void 0 && dropdownListRef.current) {
610
680
  var _dropdownListRef$curr9, _dropdownListRef$curr10;
611
681
 
612
682
  setScrollHeight(parseInt((dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr9 = dropdownListRef.current) === null || _dropdownListRef$curr9 === void 0 ? void 0 : _dropdownListRef$curr9.scrollHeight) - (dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr10 = dropdownListRef.current) === null || _dropdownListRef$curr10 === void 0 ? void 0 : _dropdownListRef$curr10.clientHeight), 10));
613
683
  }
614
684
  }, [scrollTop, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : dropdownListRef.current]);
615
- (0, _react.useEffect)(() => {
616
- return () => {
685
+ (0, _react.useEffect)(function () {
686
+ return function () {
617
687
  var _getListContainer7, _getListContainerWrap;
618
688
 
619
689
  (_getListContainer7 = getListContainer()) === null || _getListContainer7 === void 0 ? void 0 : _getListContainer7.remove();
620
690
  (_getListContainerWrap = getListContainerWrapper()) === null || _getListContainerWrap === void 0 ? void 0 : _getListContainerWrap.remove();
621
691
  };
622
692
  }, []);
623
- const postfixText = selectedLabel && ((_filteredOptions$find = filteredOptions.find(option => option.value === value)) === null || _filteredOptions$find === void 0 ? void 0 : _filteredOptions$find.postfix) || null;
693
+ var postfixText = selectedLabel && ((_filteredOptions$find = filteredOptions.find(function (option) {
694
+ return option.value === value;
695
+ })) === null || _filteredOptions$find === void 0 ? void 0 : _filteredOptions$find.postfix) || null;
624
696
  return /*#__PURE__*/_react.default.createElement("div", {
625
- className: (0, _classnames.default)(RC, className, {
626
- disabled,
627
- ["".concat(RC, "-mobile")]: isMobile,
628
- ["".concat(RC, "--focused")]: isOpen && !isMobile,
629
- ["".concat(RC, "--with-custom-trigger")]: Boolean(customTrigger)
630
- }),
697
+ className: (0, _classnames.default)(RC, className, (_cn6 = {
698
+ disabled: disabled
699
+ }, (0, _defineProperty2.default)(_cn6, "".concat(RC, "-mobile"), isMobile), (0, _defineProperty2.default)(_cn6, "".concat(RC, "--focused"), isOpen && !isMobile), (0, _defineProperty2.default)(_cn6, "".concat(RC, "--with-custom-trigger"), Boolean(customTrigger)), _cn6)),
631
700
  ref: dropdownRef,
632
701
  onKeyDown: onKeyDown,
633
702
  onKeyUp: onKeyUp
634
703
  }, /*#__PURE__*/_react.default.createElement("button", {
635
704
  "data-testid": "dropdown--".concat(testId || "", "--container"),
636
- className: (0, _classnames.default)("".concat(RC, "__trigger"), "input__wrap", {
637
- ["".concat(RC, "__trigger--with-actions")]: withActions,
638
- placeholder: !value,
639
- error: error
640
- }),
641
- onClick: () => setIsOpen(true),
705
+ className: (0, _classnames.default)("".concat(RC, "__trigger"), "input__wrap", (_cn7 = {}, (0, _defineProperty2.default)(_cn7, "".concat(RC, "__trigger--with-actions"), withActions), (0, _defineProperty2.default)(_cn7, "placeholder", !value), (0, _defineProperty2.default)(_cn7, "error", error), _cn7)),
706
+ onClick: function onClick() {
707
+ return setIsOpen(true);
708
+ },
642
709
  onKeyDown: onKeyDown,
643
710
  onKeyUp: onKeyUp,
644
711
  tabIndex: tabIndex === null || tabIndex === void 0 ? void 0 : (_tabIndex$toString = tabIndex.toString) === null || _tabIndex$toString === void 0 ? void 0 : _tabIndex$toString.call(tabIndex)
@@ -646,11 +713,17 @@ const Dropdown = _ref => {
646
713
  ref: searchInputRef,
647
714
  className: "".concat(RC, "__input"),
648
715
  value: isOpen ? searchValue !== null && searchValue !== void 0 ? searchValue : "" : selectedLabel || "",
649
- onChange: e => onSearchHandler(e.target.value),
716
+ onChange: function onChange(e) {
717
+ return onSearchHandler(e.target.value);
718
+ },
650
719
  placeholder: placeholder,
651
- onFocus: () => setIsSearchInputFocused(true),
652
- onBlur: () => setIsSearchInputFocused(false),
653
- onMouseDown: () => {
720
+ onFocus: function onFocus() {
721
+ return setIsSearchInputFocused(true);
722
+ },
723
+ onBlur: function onBlur() {
724
+ return setIsSearchInputFocused(false);
725
+ },
726
+ onMouseDown: function onMouseDown() {
654
727
  if (!isOpen) {
655
728
  setIsSearchInputFocused(true);
656
729
  }
@@ -662,9 +735,7 @@ const Dropdown = _ref => {
662
735
  }, selectedLabel || placeholder), postfixText && /*#__PURE__*/_react.default.createElement("span", {
663
736
  className: "dropdown__list-item-postfix"
664
737
  }, postfixText)), /*#__PURE__*/_react.default.createElement("span", {
665
- className: (0, _classnames.default)("".concat(RC, "__arrow"), {
666
- ["".concat(RC, "__arrow_active")]: isOpen
667
- }),
738
+ className: (0, _classnames.default)("".concat(RC, "__arrow"), (0, _defineProperty2.default)({}, "".concat(RC, "__arrow_active"), isOpen)),
668
739
  onClick: toggleList
669
740
  }, isMobile ? /*#__PURE__*/_react.default.createElement(_reactFeather.Code, {
670
741
  className: "mobile-icon"