intelicoreact 1.3.29 → 1.3.30

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 (253) hide show
  1. package/dist/Atomic/FormElements/ActionAlert/ActionAlert.js +1 -9
  2. package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +1 -10
  3. package/dist/Atomic/FormElements/Calendar/Calendar.js +4 -24
  4. package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +1 -10
  5. package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +2 -14
  6. package/dist/Atomic/FormElements/Datepicker/Datepicker.js +5 -54
  7. package/dist/Atomic/FormElements/Datepicker/components/Calendar.js +3 -21
  8. package/dist/Atomic/FormElements/Dropdown/Dropdown.js +50 -143
  9. package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +1 -7
  10. package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +9 -47
  11. package/dist/Atomic/FormElements/FileLoader/FileLoader.js +3 -15
  12. package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +15 -29
  13. package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +5 -15
  14. package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +6 -26
  15. package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.scss +0 -2
  16. package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +19 -35
  17. package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +9 -38
  18. package/dist/Atomic/FormElements/Input/Input.js +24 -57
  19. package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +4 -31
  20. package/dist/Atomic/FormElements/InputColor/InputColor.js +4 -14
  21. package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +6 -27
  22. package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +7 -42
  23. package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +3 -21
  24. package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +58 -81
  25. package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +6 -41
  26. package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +1 -8
  27. package/dist/Atomic/FormElements/InputDateRange/dependencies.js +14 -44
  28. package/dist/Atomic/FormElements/InputLink/InputLink.js +6 -23
  29. package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +0 -4
  30. package/dist/Atomic/FormElements/InputMask/InputMask.js +77 -208
  31. package/dist/Atomic/FormElements/InputMask/functions.js +2 -28
  32. package/dist/Atomic/FormElements/InputMask2/InputMask2.js +43 -119
  33. package/dist/Atomic/FormElements/InputMask2/functions.js +2 -28
  34. package/dist/Atomic/FormElements/InputMask3/InputMask3.js +44 -137
  35. package/dist/Atomic/FormElements/InputMask3/functions.js +2 -28
  36. package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +3 -17
  37. package/dist/Atomic/FormElements/InputsRow/InputsRow.js +5 -24
  38. package/dist/Atomic/FormElements/Label/Label.js +1 -9
  39. package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +35 -73
  40. package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +3 -15
  41. package/dist/Atomic/FormElements/NumericInput/NumericInput.js +23 -44
  42. package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +7 -17
  43. package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +3 -14
  44. package/dist/Atomic/FormElements/RadioInput/RadioInput.js +1 -10
  45. package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +3 -14
  46. package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +3 -23
  47. package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +17 -34
  48. package/dist/Atomic/FormElements/RangeList/RangeList.js +6 -25
  49. package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +1 -11
  50. package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +14 -72
  51. package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +40 -124
  52. package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +1 -10
  53. package/dist/Atomic/FormElements/Switcher/Switcher.js +1 -10
  54. package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +1 -13
  55. package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +1 -10
  56. package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +2 -17
  57. package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +3 -17
  58. package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +1 -11
  59. package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +6 -29
  60. package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +2 -3
  61. package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +1 -12
  62. package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +45 -133
  63. package/dist/Atomic/FormElements/Text/Text.js +10 -16
  64. package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +1 -9
  65. package/dist/Atomic/FormElements/Textarea/Textarea.js +1 -10
  66. package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +6 -35
  67. package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +4 -13
  68. package/dist/Atomic/FormElements/TimeRange/TimeRange.js +7 -21
  69. package/dist/Atomic/FormElements/UserContacts/UserContacts.js +8 -35
  70. package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +5 -18
  71. package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +3 -10
  72. package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +3 -11
  73. package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +1 -2
  74. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +5 -12
  75. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +3 -3
  76. package/dist/Atomic/Layout/Header/Header.js +3 -15
  77. package/dist/Atomic/Layout/MainMenu/MainMenu.js +3 -20
  78. package/dist/Atomic/Layout/Spinner/Spinner.js +1 -8
  79. package/dist/Atomic/UI/Accordion/Accordion.js +3 -19
  80. package/dist/Atomic/UI/Accordion/AccordionItem.js +9 -23
  81. package/dist/Atomic/UI/AccordionTable/AccordionTable.js +7 -32
  82. package/dist/Atomic/UI/AccordionText/AccordionText.js +3 -15
  83. package/dist/Atomic/UI/AdvancedTag/AdvTag.js +4 -21
  84. package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +3 -15
  85. package/dist/Atomic/UI/Alert/Alert.js +3 -16
  86. package/dist/Atomic/UI/Arrow/Arrow.js +3 -16
  87. package/dist/Atomic/UI/Box/Box.js +3 -9
  88. package/dist/Atomic/UI/Button/Button.js +2 -11
  89. package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +1 -10
  90. package/dist/Atomic/UI/Chart/Chart.js +4 -29
  91. package/dist/Atomic/UI/Chart/partial/Chart.constants.js +11 -19
  92. package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +1 -12
  93. package/dist/Atomic/UI/Chart/partial/datasetSetters.js +11 -34
  94. package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +82 -56
  95. package/dist/Atomic/UI/Chart/partial/optionsSetters.js +15 -19
  96. package/dist/Atomic/UI/Chart/partial/utils.js +6 -20
  97. package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +3 -13
  98. package/dist/Atomic/UI/DateTime/DateTime.js +3 -14
  99. package/dist/Atomic/UI/DebugContainer/DebugContainer.js +4 -16
  100. package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +3 -11
  101. package/dist/Atomic/UI/DoubleString/DoubleString.js +5 -17
  102. package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +3 -10
  103. package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +17 -52
  104. package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +1 -29
  105. package/dist/Atomic/UI/Hint/Hint.js +5 -30
  106. package/dist/Atomic/UI/Modal/Modal.js +6 -29
  107. package/dist/Atomic/UI/Modal/ModalHOC.js +1 -9
  108. package/dist/Atomic/UI/Modal/partials/ModalFooter.js +1 -7
  109. package/dist/Atomic/UI/Modal/partials/ModalTitle.js +1 -8
  110. package/dist/Atomic/UI/Modal/partials/useMobileModal.js +32 -49
  111. package/dist/Atomic/UI/ModalBackup/Modal.js +65 -90
  112. package/dist/Atomic/UI/ModalBackup/ModalHOC.js +12 -21
  113. package/dist/Atomic/UI/ModalBackup/partials/ModalFooter.js +6 -11
  114. package/dist/Atomic/UI/ModalBackup/partials/ModalTitle.js +15 -19
  115. package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +6 -21
  116. package/dist/Atomic/UI/NavLine/NavLine.js +26 -55
  117. package/dist/Atomic/UI/NavLine/Tabs.js +2 -3
  118. package/dist/Atomic/UI/PageTitle/PageTitle.js +2 -10
  119. package/dist/Atomic/UI/PieChart/PieChart.js +1 -10
  120. package/dist/Atomic/UI/Price/Price.js +3 -8
  121. package/dist/Atomic/UI/PriceRange/PriceRange.js +1 -7
  122. package/dist/Atomic/UI/ProgressLine/ProgressLine.js +1 -16
  123. package/dist/Atomic/UI/Status/Status.js +1 -8
  124. package/dist/Atomic/UI/Table/Partials/TdCell.js +5 -29
  125. package/dist/Atomic/UI/Table/Partials/TdHeader.js +1 -11
  126. package/dist/Atomic/UI/Table/Partials/TdRow.js +5 -17
  127. package/dist/Atomic/UI/Table/Partials/TdTitle.js +3 -14
  128. package/dist/Atomic/UI/Table/Table.js +1 -12
  129. package/dist/Atomic/UI/Table/TdTypes/TdActions.js +2 -18
  130. package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +1 -9
  131. package/dist/Atomic/UI/Table/TdTypes/TdRange.js +1 -4
  132. package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +1 -13
  133. package/dist/Atomic/UI/Tag/Tag.js +3 -14
  134. package/dist/Atomic/UI/TagList/TagList.js +19 -35
  135. package/dist/Atomic/UI/UserBox/UserBox.js +1 -13
  136. package/dist/Classes/AbortableFetch.js +36 -93
  137. package/dist/Classes/AnimatedHandler.js +3 -7
  138. package/dist/Classes/RESTAPI/index.js +39 -43
  139. package/dist/Classes/RESTAPI/partials/AbortableFetch.js +35 -93
  140. package/dist/Classes/RESTAPI/partials/ApiBase.js +1 -9
  141. package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +7 -19
  142. package/dist/Classes/RESTAPI/partials/ApiUtils.js +28 -35
  143. package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +21 -44
  144. package/dist/Classes/RESTAPI/partials/Utils.js +6 -19
  145. package/dist/Classes/RESTAPI/partials/_outerDependencies.js +2 -6
  146. package/dist/Classes/RESTAPI/partials/_utils.js +13 -36
  147. package/dist/Constants/index.constants.js +8 -15
  148. package/dist/Functions/Portal.js +5 -16
  149. package/dist/Functions/customEventListener.js +4 -17
  150. package/dist/Functions/fieldValueFormatters.js +43 -83
  151. package/dist/Functions/hooks/useFormFieldsChangesManager.js +23 -26
  152. package/dist/Functions/locale/createTranslator.js +4 -9
  153. package/dist/Functions/operations.js +12 -22
  154. package/dist/Functions/presets/inputMaskPresets.js +9 -11
  155. package/dist/Functions/presets/inputPresets.js +8 -11
  156. package/dist/Functions/presets/mobileKeyboardTypesPresets.js +7 -9
  157. package/dist/Functions/schemas.js +6 -13
  158. package/dist/Functions/useBodyScrollLock.js +1 -6
  159. package/dist/Functions/useClickOutside.js +0 -4
  160. package/dist/Functions/useDebounce.js +2 -7
  161. package/dist/Functions/useFieldFocus.js +6 -18
  162. package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +0 -9
  163. package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +12 -23
  164. package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +6 -15
  165. package/dist/Functions/useFormTools/functions/General.js +18 -28
  166. package/dist/Functions/useFormTools/functions/RenderFields.js +2 -11
  167. package/dist/Functions/useFormTools/functions/usePrevious.js +1 -5
  168. package/dist/Functions/useFormTools/index.js +85 -144
  169. package/dist/Functions/useInputHighlightError.js +3 -12
  170. package/dist/Functions/useIsMobile.js +7 -12
  171. package/dist/Functions/useKeyPress/useHandleKeyPress.js +1 -7
  172. package/dist/Functions/useKeyPress/useKeyPress.js +1 -9
  173. package/dist/Functions/useLocalStorage.js +1 -9
  174. package/dist/Functions/useLocationParams.js +4 -5
  175. package/dist/Functions/useMetaInfo.js +3 -10
  176. package/dist/Functions/useMouseUpOutside.js +0 -3
  177. package/dist/Functions/useOnlineStatus.js +1 -9
  178. package/dist/Functions/usePasswordChecker.js +4 -20
  179. package/dist/Functions/usePrevious.js +1 -5
  180. package/dist/Functions/useResize.js +2 -10
  181. package/dist/Functions/useScrollTo.js +2 -7
  182. package/dist/Functions/useToggle.js +1 -5
  183. package/dist/Functions/utils.js +49 -127
  184. package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +2 -9
  185. package/dist/Molecular/CustomIcons/components/AlertCircle.js +2 -9
  186. package/dist/Molecular/CustomIcons/components/AppStore.js +2 -9
  187. package/dist/Molecular/CustomIcons/components/Arrow.js +2 -9
  188. package/dist/Molecular/CustomIcons/components/ArrowDown.js +2 -9
  189. package/dist/Molecular/CustomIcons/components/ArrowLeft.js +2 -9
  190. package/dist/Molecular/CustomIcons/components/ArrowRight.js +2 -9
  191. package/dist/Molecular/CustomIcons/components/ArrowUp.js +2 -9
  192. package/dist/Molecular/CustomIcons/components/Bell.js +2 -9
  193. package/dist/Molecular/CustomIcons/components/Button.js +2 -9
  194. package/dist/Molecular/CustomIcons/components/Campaigns.js +2 -9
  195. package/dist/Molecular/CustomIcons/components/Check.js +2 -9
  196. package/dist/Molecular/CustomIcons/components/Check2.js +2 -9
  197. package/dist/Molecular/CustomIcons/components/ChevronDown.js +2 -9
  198. package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +2 -9
  199. package/dist/Molecular/CustomIcons/components/ChevronLeft.js +2 -9
  200. package/dist/Molecular/CustomIcons/components/ChevronRight.js +2 -9
  201. package/dist/Molecular/CustomIcons/components/ChevronUp.js +2 -9
  202. package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +2 -9
  203. package/dist/Molecular/CustomIcons/components/Close.js +2 -9
  204. package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +2 -9
  205. package/dist/Molecular/CustomIcons/components/Delete.js +2 -9
  206. package/dist/Molecular/CustomIcons/components/Edit.js +2 -9
  207. package/dist/Molecular/CustomIcons/components/Email.js +2 -9
  208. package/dist/Molecular/CustomIcons/components/FinturfLogo.js +2 -9
  209. package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +2 -9
  210. package/dist/Molecular/CustomIcons/components/Flows.js +2 -9
  211. package/dist/Molecular/CustomIcons/components/Gift.js +2 -9
  212. package/dist/Molecular/CustomIcons/components/GoogleAuth.js +2 -9
  213. package/dist/Molecular/CustomIcons/components/GooglePlay.js +2 -9
  214. package/dist/Molecular/CustomIcons/components/HelpCircle.js +2 -9
  215. package/dist/Molecular/CustomIcons/components/HelpCircle2.js +2 -9
  216. package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +2 -9
  217. package/dist/Molecular/CustomIcons/components/Home.js +2 -9
  218. package/dist/Molecular/CustomIcons/components/Home2.js +2 -9
  219. package/dist/Molecular/CustomIcons/components/Key.js +2 -9
  220. package/dist/Molecular/CustomIcons/components/Landers.js +2 -9
  221. package/dist/Molecular/CustomIcons/components/Lock.js +2 -9
  222. package/dist/Molecular/CustomIcons/components/Mail.js +2 -9
  223. package/dist/Molecular/CustomIcons/components/Mastercard.js +2 -9
  224. package/dist/Molecular/CustomIcons/components/Minus.js +2 -9
  225. package/dist/Molecular/CustomIcons/components/Offers.js +2 -9
  226. package/dist/Molecular/CustomIcons/components/Pause.js +2 -9
  227. package/dist/Molecular/CustomIcons/components/PayPal.js +2 -9
  228. package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +2 -9
  229. package/dist/Molecular/CustomIcons/components/Phone.js +2 -9
  230. package/dist/Molecular/CustomIcons/components/Play.js +2 -9
  231. package/dist/Molecular/CustomIcons/components/Plus.js +2 -9
  232. package/dist/Molecular/CustomIcons/components/Profile.js +2 -9
  233. package/dist/Molecular/CustomIcons/components/QRCode.js +2 -9
  234. package/dist/Molecular/CustomIcons/components/Rectangle.js +2 -9
  235. package/dist/Molecular/CustomIcons/components/Revert.js +2 -9
  236. package/dist/Molecular/CustomIcons/components/Star.js +2 -9
  237. package/dist/Molecular/CustomIcons/components/Star2.js +2 -9
  238. package/dist/Molecular/CustomIcons/components/TrafficSources.js +2 -9
  239. package/dist/Molecular/CustomIcons/components/Trash.js +2 -9
  240. package/dist/Molecular/CustomIcons/components/TrashRed.js +2 -9
  241. package/dist/Molecular/CustomIcons/components/Triggers.js +2 -9
  242. package/dist/Molecular/CustomIcons/components/User.js +2 -9
  243. package/dist/Molecular/CustomIcons/components/Visa.js +2 -9
  244. package/dist/Molecular/CustomIcons/components/X.js +2 -9
  245. package/dist/Molecular/CustomIcons/index.js +0 -122
  246. package/dist/Molecular/FormElement/FormElement.js +1 -12
  247. package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +30 -31
  248. package/dist/Molecular/FormWithDependOn/partials/_utils.js +9 -12
  249. package/dist/Molecular/InputAddress/InputAddress.js +65 -114
  250. package/dist/Molecular/InputPassword/InputPassword.js +3 -13
  251. package/dist/index.js +0 -2
  252. package/package.json +1 -1
  253. package/dist/Atomic/FormElements/UserContacts/partial/defaultIcons.js +0 -91
@@ -1,46 +1,28 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
-
12
9
  var _react = _interopRequireWildcard(require("react"));
13
-
14
10
  var _classnames = _interopRequireDefault(require("classnames"));
15
-
16
11
  var _reactDom = require("react-dom");
17
-
18
12
  var _reactFeather = require("react-feather");
19
-
20
13
  var _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
21
-
22
14
  var _useIsMobile = _interopRequireDefault(require("../../../Functions/useIsMobile"));
23
-
24
15
  var _CheckboxInput = _interopRequireDefault(require("../../FormElements/CheckboxInput/CheckboxInput"));
25
-
26
16
  var _Input = _interopRequireDefault(require("../../FormElements/Input/Input"));
27
-
28
17
  var _Tag = _interopRequireDefault(require("../../UI/Tag/Tag"));
29
-
30
18
  var _TagList = _interopRequireDefault(require("../../UI/TagList/TagList"));
31
-
32
19
  require("./TagsDropdown.scss");
33
-
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
-
20
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
21
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
38
22
  const RC = "tags-dropdown";
39
23
  const MIN_ITEMS_FOR_SHOW_MOBILE_SEARCH = 10;
40
-
41
24
  const TagsDropdown = _ref => {
42
- var _dropdownListWrapperR, _dropdownListWrapperR2, _dropdownListRef$curr5, _dropdownListRef$curr6;
43
-
25
+ var _dropdownListWrapperR, _dropdownListRef$curr5, _dropdownListRef$curr6;
44
26
  let {
45
27
  options,
46
28
  chosenOptions = [],
@@ -97,51 +79,38 @@ const TagsDropdown = _ref => {
97
79
  const [scrollTop, setScrollTop] = (0, _react.useState)(0);
98
80
  const [scrollHeight, setScrollHeight] = (0, _react.useState)(1);
99
81
  const singleLevelOptions = options === null || options === void 0 ? void 0 : options.reduce((acc, item) => [...acc, ...(item.groupName ? item.list : [item])], []);
100
-
101
82
  const handleClickOutside = _ref2 => {
102
83
  var _getListContainer;
103
-
104
84
  let {
105
85
  target
106
86
  } = _ref2;
107
-
108
- if (!((_getListContainer = getListContainer()) !== null && _getListContainer !== void 0 && _getListContainer.contains(target))
109
- /* && !isTargetInParent(target) */
110
- ) {
87
+ if (!((_getListContainer = getListContainer()) !== null && _getListContainer !== void 0 && _getListContainer.contains(target)) /* && !isTargetInParent(target) */) {
111
88
  setIsOpen(false);
112
89
  setSearchValue("");
113
90
  }
114
91
  };
115
-
116
92
  const deleteChosen = value => {
117
93
  if (isMobile ? closeOnRemoveMobile : closeOnRemove) setIsOpen(false);
118
94
  onChange(chosenOptions.filter(item => item !== value), "chosenOptions");
119
95
  };
120
-
121
96
  const onChangeHandler = item => {
122
97
  if (item !== null && item !== void 0 && item.isFreezed) return false;
123
-
124
98
  if ((item === null || item === void 0 ? void 0 : item.closeOnOptionSelect) !== undefined) {
125
99
  if (item.closeOnOptionSelect) setIsOpen(false);
126
100
  } else if (isMobile ? closeOnSelectMobile : closeOnSelect) setIsOpen(false);
127
-
128
101
  setSearchValue("");
129
-
130
102
  if (chosenOptions.some(el => el === item.value)) {
131
103
  deleteChosen(item.value);
132
104
  return null;
133
105
  }
134
-
135
106
  onChange([...chosenOptions, item.value], "chosenOptions");
136
107
  return null;
137
108
  };
138
-
139
109
  const onSearchHandler = name => {
140
110
  let inputValue = name;
141
111
  if (!isNotValidateASCII) inputValue = (0, _fieldValueFormatters.formatToOnlyASCIICodeText)(inputValue);
142
112
  setSearchValue(inputValue);
143
113
  };
144
-
145
114
  const onWrapperClick = e => {
146
115
  if (e.target === (wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current)) {
147
116
  e.stopPropagation();
@@ -149,27 +118,22 @@ const TagsDropdown = _ref => {
149
118
  setIsOpen(false);
150
119
  }
151
120
  };
152
-
153
121
  const getMarkupForElement = item => {
154
122
  var _title$toString, _item$customMobileIco;
155
-
156
123
  const {
157
124
  description
158
125
  } = item;
159
126
  const title = item.title || item.label;
160
-
161
127
  const hightlightSearchValue = title => {
162
128
  var _title$toLowerCase;
163
-
164
129
  const index = (_title$toLowerCase = title.toLowerCase()) === null || _title$toLowerCase === void 0 ? void 0 : _title$toLowerCase.indexOf(searchValue.toLowerCase());
165
130
  if (index === -1) return title;
166
131
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, title.substring(0, index), /*#__PURE__*/_react.default.createElement("span", {
167
132
  className: "search-match"
168
133
  }, title.substring(index, index + (searchValue === null || searchValue === void 0 ? void 0 : searchValue.length))), title.substring(index + (searchValue === null || searchValue === void 0 ? void 0 : searchValue.length)));
169
134
  };
170
-
171
135
  return /*#__PURE__*/_react.default.createElement("button", {
172
- key: title === null || title === void 0 ? void 0 : (_title$toString = title.toString()) === null || _title$toString === void 0 ? void 0 : _title$toString.replace(/ /g, "_"),
136
+ key: title === null || title === void 0 || (_title$toString = title.toString()) === null || _title$toString === void 0 ? void 0 : _title$toString.replace(/ /g, "_"),
173
137
  onClick: e => {
174
138
  e.preventDefault();
175
139
  e.stopPropagation();
@@ -203,21 +167,18 @@ const TagsDropdown = _ref => {
203
167
  }
204
168
  }) : "");
205
169
  };
206
-
207
170
  const prepareOptions = options => {
208
171
  return options === null || options === void 0 ? void 0 : options.map(option => option !== null && option !== void 0 && option.groupName ? option === null || option === void 0 ? void 0 : option.list : option).flat();
209
172
  };
210
-
211
173
  const selectAllItems = e => {
212
- var _prepareOptions, _prepareOptions$filte;
213
-
214
- onChange([...chosenOptions, ...(((_prepareOptions = prepareOptions(options)) === null || _prepareOptions === void 0 ? void 0 : (_prepareOptions$filte = _prepareOptions.filter(_ref3 => {
174
+ var _prepareOptions;
175
+ onChange([...chosenOptions, ...(((_prepareOptions = prepareOptions(options)) === null || _prepareOptions === void 0 || (_prepareOptions = _prepareOptions.filter(_ref3 => {
215
176
  let {
216
177
  isFreezed,
217
178
  value
218
179
  } = _ref3;
219
180
  return !isFreezed && !(chosenOptions !== null && chosenOptions !== void 0 && chosenOptions.includes(value)) && value !== "open_modal";
220
- })) === null || _prepareOptions$filte === void 0 ? void 0 : _prepareOptions$filte.map(_ref4 => {
181
+ })) === null || _prepareOptions === void 0 ? void 0 : _prepareOptions.map(_ref4 => {
221
182
  let {
222
183
  value
223
184
  } = _ref4;
@@ -225,70 +186,55 @@ const TagsDropdown = _ref => {
225
186
  })) || [])], "chosenOptions");
226
187
  if (isMobile ? closeOnSelectAllMobile : closeOnSelectAll) setIsOpen(false);
227
188
  };
228
-
229
189
  const unselectAllItems = e => {
230
190
  onChange(chosenOptions === null || chosenOptions === void 0 ? void 0 : chosenOptions.filter(item => {
231
- var _prepareOptions2, _prepareOptions2$find;
232
-
233
- return (_prepareOptions2 = prepareOptions(options)) === null || _prepareOptions2 === void 0 ? void 0 : (_prepareOptions2$find = _prepareOptions2.find(_ref5 => {
191
+ var _prepareOptions2;
192
+ return (_prepareOptions2 = prepareOptions(options)) === null || _prepareOptions2 === void 0 || (_prepareOptions2 = _prepareOptions2.find(_ref5 => {
234
193
  let {
235
194
  value
236
195
  } = _ref5;
237
196
  return value === item;
238
- })) === null || _prepareOptions2$find === void 0 ? void 0 : _prepareOptions2$find.isFreezed;
197
+ })) === null || _prepareOptions2 === void 0 ? void 0 : _prepareOptions2.isFreezed;
239
198
  }), "chosenOptions");
240
199
  if (isMobile ? closeOnRemoveAllMobile : closeOnRemoveAll) setIsOpen(false);
241
200
  };
242
-
243
201
  const getParentNode = () => {
244
202
  var _ref6, _document$querySelect;
245
-
246
203
  return (_ref6 = (_document$querySelect = document.querySelector("div#root")) !== null && _document$querySelect !== void 0 ? _document$querySelect : document.querySelector("div#app")) !== null && _ref6 !== void 0 ? _ref6 : document.querySelector("div#storybook-root");
247
204
  };
248
-
249
205
  const initListContainer = () => {
250
206
  const dropdownList = document.createElement("div");
251
207
  dropdownList.setAttribute("id", dropdownId);
252
208
  dropdownList.classList.add("tags-dropdown__container");
253
-
254
209
  if (isMobile) {
255
210
  dropdownList.addEventListener("click", e => {
256
211
  if (e.target.id === dropdownId) setIsOpen(false);
257
212
  });
258
213
  }
259
-
260
214
  if (isMobile) {
261
215
  var _getParentNode;
262
-
263
216
  try {
264
217
  var _document$getElementB;
265
-
266
- (_document$getElementB = document.getElementById("mlw-".concat(dropdownId))) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.remove();
218
+ (_document$getElementB = document.getElementById("mlw-".concat(dropdownId))) === null || _document$getElementB === void 0 || _document$getElementB.remove();
267
219
  } catch (e) {}
268
-
269
220
  const dropdownMobileListWrapper = document.createElement("div");
270
221
  dropdownMobileListWrapper.classList.add("tags-dropdown-mobile");
271
222
  dropdownMobileListWrapper.setAttribute("id", "mlw-".concat(dropdownId));
272
- dropdownMobileListWrapper === null || dropdownMobileListWrapper === void 0 ? void 0 : dropdownMobileListWrapper.append(dropdownList);
273
- (_getParentNode = getParentNode()) === null || _getParentNode === void 0 ? void 0 : _getParentNode.append(dropdownMobileListWrapper);
223
+ dropdownMobileListWrapper === null || dropdownMobileListWrapper === void 0 || dropdownMobileListWrapper.append(dropdownList);
224
+ (_getParentNode = getParentNode()) === null || _getParentNode === void 0 || _getParentNode.append(dropdownMobileListWrapper);
274
225
  } else {
275
226
  var _getParentNode2;
276
-
277
- (_getParentNode2 = getParentNode()) === null || _getParentNode2 === void 0 ? void 0 : _getParentNode2.append(dropdownList);
227
+ (_getParentNode2 = getParentNode()) === null || _getParentNode2 === void 0 || _getParentNode2.append(dropdownList);
278
228
  }
279
229
  };
280
-
281
230
  const getListContainer = () => {
282
231
  return document.getElementById(dropdownId);
283
232
  };
284
-
285
233
  const getListContainerWrapper = () => {
286
234
  return document.getElementById("mlw-".concat(dropdownId));
287
235
  };
288
-
289
236
  const setListContainerStyles = () => {
290
- var _dropdownRef$current$, _dropdownRef$current, _getComputedStyle$mar, _getComputedStyle, _getComputedStyle$mar2, _getComputedStyle$max, _getComputedStyle2, _getComputedStyle2$ma, _dl$getBoundingClient, _sw$getBoundingClient, _sw$getBoundingClient2, _lh$getBoundingClient, _lf$getBoundingClient;
291
-
237
+ var _dropdownRef$current$, _dropdownRef$current, _getComputedStyle$mar, _getComputedStyle, _getComputedStyle$max, _getComputedStyle2, _dl$getBoundingClient, _sw$getBoundingClient, _sw$getBoundingClient2, _lh$getBoundingClient, _lf$getBoundingClient;
292
238
  const lc = getListContainer();
293
239
  if (!lc || !isOpen) return false;
294
240
  const windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
@@ -297,21 +243,21 @@ const TagsDropdown = _ref => {
297
243
  height,
298
244
  left,
299
245
  top
300
- } = (_dropdownRef$current$ = dropdownRef === null || dropdownRef === void 0 ? void 0 : (_dropdownRef$current = dropdownRef.current) === null || _dropdownRef$current === void 0 ? void 0 : _dropdownRef$current.getBoundingClientRect()) !== null && _dropdownRef$current$ !== void 0 ? _dropdownRef$current$ : {};
246
+ } = (_dropdownRef$current$ = dropdownRef === null || dropdownRef === void 0 || (_dropdownRef$current = dropdownRef.current) === null || _dropdownRef$current === void 0 ? void 0 : _dropdownRef$current.getBoundingClientRect()) !== null && _dropdownRef$current$ !== void 0 ? _dropdownRef$current$ : {};
301
247
  const sw = dropdownListWrapperRef === null || dropdownListWrapperRef === void 0 ? void 0 : dropdownListWrapperRef.current;
302
248
  const dl = lc.getElementsByClassName("tags-dropdown__list")[0];
303
249
  const lh = sw === null || sw === void 0 ? void 0 : sw.getElementsByClassName("tags-dropdown__header")[0];
304
250
  const lf = sw === null || sw === void 0 ? void 0 : sw.getElementsByClassName("tags-dropdown__footer")[0];
305
- const margin = parseInt((_getComputedStyle$mar = (_getComputedStyle = getComputedStyle(sw)) === 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);
306
- const maxHeight = initListHeight !== null && initListHeight !== void 0 ? initListHeight : parseInt((_getComputedStyle$max = (_getComputedStyle2 = getComputedStyle(dl)) === 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);
251
+ const margin = parseInt((_getComputedStyle$mar = (_getComputedStyle = getComputedStyle(sw)) === null || _getComputedStyle === void 0 || (_getComputedStyle = _getComputedStyle.marginTop) === null || _getComputedStyle === void 0 ? void 0 : _getComputedStyle.replace("px", "")) !== null && _getComputedStyle$mar !== void 0 ? _getComputedStyle$mar : 0, 10);
252
+ const maxHeight = initListHeight !== null && initListHeight !== void 0 ? initListHeight : parseInt((_getComputedStyle$max = (_getComputedStyle2 = getComputedStyle(dl)) === null || _getComputedStyle2 === void 0 || (_getComputedStyle2 = _getComputedStyle2.maxHeight) === null || _getComputedStyle2 === void 0 ? void 0 : _getComputedStyle2.replace("px", "")) !== null && _getComputedStyle$max !== void 0 ? _getComputedStyle$max : 0, 10);
307
253
  if (initListHeight === null) setInitListHeight(maxHeight);
308
254
  const toTop = top - margin;
309
255
  const toBottom = windowHeight - top - height - margin * 2;
310
- const dlHeight = dl === null || dl === void 0 ? void 0 : (_dl$getBoundingClient = dl.getBoundingClientRect()) === null || _dl$getBoundingClient === void 0 ? void 0 : _dl$getBoundingClient.height;
311
- let swHeight = sw === null || sw === void 0 ? void 0 : (_sw$getBoundingClient = sw.getBoundingClientRect()) === null || _sw$getBoundingClient === void 0 ? void 0 : _sw$getBoundingClient.height;
256
+ const dlHeight = dl === null || dl === void 0 || (_dl$getBoundingClient = dl.getBoundingClientRect()) === null || _dl$getBoundingClient === void 0 ? void 0 : _dl$getBoundingClient.height;
257
+ let swHeight = sw === null || sw === void 0 || (_sw$getBoundingClient = sw.getBoundingClientRect()) === null || _sw$getBoundingClient === void 0 ? void 0 : _sw$getBoundingClient.height;
312
258
  const controlsHeight = swHeight - dlHeight;
313
259
  if (swHeight > maxHeight) swHeight = maxHeight - 2 * margin;
314
- const maxSwHeight = isMobile ? (sw === null || sw === void 0 ? void 0 : (_sw$getBoundingClient2 = sw.getBoundingClientRect()) === null || _sw$getBoundingClient2 === void 0 ? void 0 : _sw$getBoundingClient2.height) - (lh === null || lh === void 0 ? void 0 : (_lh$getBoundingClient = lh.getBoundingClientRect()) === null || _lh$getBoundingClient === void 0 ? void 0 : _lh$getBoundingClient.height) - (lf === null || lf === void 0 ? void 0 : (_lf$getBoundingClient = lf.getBoundingClientRect()) === null || _lf$getBoundingClient === void 0 ? void 0 : _lf$getBoundingClient.height) : toTop - margin >= maxHeight || toBottom - margin >= maxHeight ? maxHeight - 3 * margin : toTop > toBottom ? toTop - 3 * margin : toBottom - 4 * margin;
260
+ const maxSwHeight = isMobile ? (sw === null || sw === void 0 || (_sw$getBoundingClient2 = sw.getBoundingClientRect()) === null || _sw$getBoundingClient2 === void 0 ? void 0 : _sw$getBoundingClient2.height) - (lh === null || lh === void 0 || (_lh$getBoundingClient = lh.getBoundingClientRect()) === null || _lh$getBoundingClient === void 0 ? void 0 : _lh$getBoundingClient.height) - (lf === null || lf === void 0 || (_lf$getBoundingClient = lf.getBoundingClientRect()) === null || _lf$getBoundingClient === void 0 ? void 0 : _lf$getBoundingClient.height) : toTop - margin >= maxHeight || toBottom - margin >= maxHeight ? maxHeight - 3 * margin : toTop > toBottom ? toTop - 3 * margin : toBottom - 4 * margin;
315
261
  const listPos = toTop < toBottom || toBottom >= swHeight ? "bottom" : "top";
316
262
  if (swHeight > (listPos === "top" ? toTop : toBottom)) swHeight = (listPos === "top" ? toTop : toBottom) - 3 * margin;
317
263
  lc.style.minWidth = "".concat(width, "px");
@@ -319,61 +265,49 @@ const TagsDropdown = _ref => {
319
265
  lc.style.top = "".concat(listPos === "bottom" ? top + height : top - swHeight - 2 * margin, "px");
320
266
  dl.style.maxHeight = "".concat(isMobile ? maxSwHeight : maxSwHeight - controlsHeight, "px");
321
267
  };
322
-
323
268
  const renderListContainer = () => {
324
269
  const lc = getListContainer();
325
270
  if (!lc) return null;
326
271
  return /*#__PURE__*/(0, _reactDom.createPortal)(getListMarkUp(), lc);
327
272
  };
328
-
329
273
  const isTargetInParent = target => {
330
274
  var _target$className, _target$className$ind, _target$className2, _target$className2$in;
331
-
332
275
  if ((target === null || target === void 0 ? void 0 : target.tagName) === "svg" && (target === null || target === void 0 ? void 0 : target.parentNodclassName) === "tag__button" || (target === null || target === void 0 ? void 0 : target.tagName) === "line") return false;
333
- if ((target === null || target === void 0 ? void 0 : target.tagName) === "svg" && (target === null || target === void 0 ? void 0 : target.parentNodclassName) !== "tag__button" || (target === null || target === void 0 ? void 0 : (_target$className = target.className) === null || _target$className === void 0 ? void 0 : (_target$className$ind = _target$className.indexOf) === null || _target$className$ind === void 0 ? void 0 : _target$className$ind.call(_target$className, "tag__label")) !== -1 || (target === null || target === void 0 ? void 0 : (_target$className2 = target.className) === null || _target$className2 === void 0 ? void 0 : (_target$className2$in = _target$className2.indexOf) === null || _target$className2$in === void 0 ? void 0 : _target$className2$in.call(_target$className2, "tag-list_wrapper")) !== -1 || (target === null || target === void 0 ? void 0 : target.className) === "".concat(RC, "__trigger") || (target === null || target === void 0 ? void 0 : target.className) === "tags-dropdown__arrow") return true;
276
+ if ((target === null || target === void 0 ? void 0 : target.tagName) === "svg" && (target === null || target === void 0 ? void 0 : target.parentNodclassName) !== "tag__button" || (target === null || target === void 0 || (_target$className = target.className) === null || _target$className === void 0 || (_target$className$ind = _target$className.indexOf) === null || _target$className$ind === void 0 ? void 0 : _target$className$ind.call(_target$className, "tag__label")) !== -1 || (target === null || target === void 0 || (_target$className2 = target.className) === null || _target$className2 === void 0 || (_target$className2$in = _target$className2.indexOf) === null || _target$className2$in === void 0 ? void 0 : _target$className2$in.call(_target$className2, "tag-list_wrapper")) !== -1 || (target === null || target === void 0 ? void 0 : target.className) === "".concat(RC, "__trigger") || (target === null || target === void 0 ? void 0 : target.className) === "tags-dropdown__arrow") return true;
334
277
  return false;
335
278
  };
336
-
337
279
  const isItemMatchesSearch = item => {
338
280
  const title = item.title || item.label;
339
281
  return searchValue.length ? title.toLowerCase().includes((searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase()) || "") : true;
340
282
  };
341
-
342
283
  const getFilteredOptions = options => options === null || options === void 0 ? void 0 : options.reduce((result, option) => {
343
284
  if (option.groupName) {
344
285
  var _option$list;
345
-
346
- const filteredGroupItems = option === null || option === void 0 ? void 0 : (_option$list = option.list) === null || _option$list === void 0 ? void 0 : _option$list.filter(item => isItemMatchesSearch(item));
347
-
286
+ const filteredGroupItems = option === null || option === void 0 || (_option$list = option.list) === null || _option$list === void 0 ? void 0 : _option$list.filter(item => isItemMatchesSearch(item));
348
287
  if (filteredGroupItems !== null && filteredGroupItems !== void 0 && filteredGroupItems.length) {
349
- result.push({ ...option,
288
+ result.push({
289
+ ...option,
350
290
  list: filteredGroupItems
351
291
  });
352
292
  }
353
293
  } else if (isItemMatchesSearch(option)) {
354
294
  result.push(option);
355
295
  }
356
-
357
296
  return result;
358
297
  }, []);
359
-
360
298
  const getTotalOptions = (0, _react.useCallback)(() => {
361
299
  return options === null || options === void 0 ? void 0 : options.reduce((result, item) => {
362
300
  if (item !== null && item !== void 0 && item.list) {
363
301
  var _item$list;
364
-
365
- result += (item === null || item === void 0 ? void 0 : (_item$list = item.list) === null || _item$list === void 0 ? void 0 : _item$list.length) || 0;
302
+ result += (item === null || item === void 0 || (_item$list = item.list) === null || _item$list === void 0 ? void 0 : _item$list.length) || 0;
366
303
  } else {
367
304
  ++result;
368
305
  }
369
-
370
306
  return result;
371
307
  }, 0);
372
308
  }, [options]);
373
-
374
309
  const getListMarkUp = () => {
375
310
  var _filteredOptions$filt, _filteredOptions$filt2;
376
-
377
311
  const filteredOptions = getFilteredOptions(options);
378
312
  return /*#__PURE__*/_react.default.createElement("div", {
379
313
  className: (0, _classnames.default)("".concat(RC, "__container-wrapper")),
@@ -424,10 +358,9 @@ const TagsDropdown = _ref => {
424
358
  ref: dropdownListRef,
425
359
  className: "".concat(RC, "__list ").concat(headerContent || isMobile ? "".concat(RC, "__list--with-header") : "", " ").concat(footerContent ? "".concat(RC, "__list--with-footer") : "")
426
360
  }, filteredOptions === null || filteredOptions === void 0 ? void 0 : filteredOptions.map(option => {
427
- var _option$groupName, _option$groupName$toS, _option$list2;
428
-
361
+ var _option$groupName, _option$list2;
429
362
  return option.groupName ? /*#__PURE__*/_react.default.createElement("div", {
430
- key: (_option$groupName = option.groupName) === null || _option$groupName === void 0 ? void 0 : (_option$groupName$toS = _option$groupName.toString()) === null || _option$groupName$toS === void 0 ? void 0 : _option$groupName$toS.replace(/ /g, "_").concat(Date.now()),
363
+ key: (_option$groupName = option.groupName) === null || _option$groupName === void 0 || (_option$groupName = _option$groupName.toString()) === null || _option$groupName === void 0 ? void 0 : _option$groupName.replace(/ /g, "_").concat(Date.now()),
431
364
  className: (0, _classnames.default)("".concat(RC, "-group"), option.className)
432
365
  }, /*#__PURE__*/_react.default.createElement("span", {
433
366
  className: "".concat(RC, "-group__name")
@@ -453,14 +386,11 @@ const TagsDropdown = _ref => {
453
386
  onClick: () => setIsOpen(false)
454
387
  }, "Apply", chosenOptions !== null && chosenOptions !== void 0 && chosenOptions.length ? "(".concat(chosenOptions === null || chosenOptions === void 0 ? void 0 : chosenOptions.length, ")") : "")) : null));
455
388
  };
456
-
457
389
  const closeList = e => {
458
390
  var _inputRef$current;
459
-
460
391
  handleClickOutside(e);
461
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.blur();
392
+ inputRef === null || inputRef === void 0 || (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.blur();
462
393
  };
463
-
464
394
  (0, _react.useLayoutEffect)(() => {
465
395
  initListContainer();
466
396
  }, []);
@@ -474,7 +404,6 @@ const TagsDropdown = _ref => {
474
404
  window.removeEventListener("mousewheel", closeList);
475
405
  window.removeEventListener("mouseup", handleClickOutside);
476
406
  }
477
-
478
407
  return () => {
479
408
  window.removeEventListener("resize", setListContainerStyles);
480
409
  window.removeEventListener("mousewheel", closeList);
@@ -483,76 +412,62 @@ const TagsDropdown = _ref => {
483
412
  }, [getListContainer]);
484
413
  (0, _react.useLayoutEffect)(() => {
485
414
  setListContainerStyles();
486
- }, [isOpen, chosenOptions, isMobile, dropdownListWrapperRef === null || dropdownListWrapperRef === void 0 ? void 0 : (_dropdownListWrapperR = dropdownListWrapperRef.current) === null || _dropdownListWrapperR === void 0 ? void 0 : (_dropdownListWrapperR2 = _dropdownListWrapperR.getBoundingClientRect()) === null || _dropdownListWrapperR2 === void 0 ? void 0 : _dropdownListWrapperR2.height]);
415
+ }, [isOpen, chosenOptions, isMobile, dropdownListWrapperRef === null || dropdownListWrapperRef === void 0 || (_dropdownListWrapperR = dropdownListWrapperRef.current) === null || _dropdownListWrapperR === void 0 || (_dropdownListWrapperR = _dropdownListWrapperR.getBoundingClientRect()) === null || _dropdownListWrapperR === void 0 ? void 0 : _dropdownListWrapperR.height]);
487
416
  (0, _react.useEffect)(() => {
488
417
  if (!isMobile) {
489
418
  document.addEventListener("click", handleClickOutside, true);
490
419
  } else {
491
420
  document.removeEventListener("click", handleClickOutside, true);
492
421
  }
493
-
494
422
  return () => document.removeEventListener("click", handleClickOutside, true);
495
423
  }, [isMobile]);
496
424
  (0, _react.useEffect)(() => {
497
425
  var _selectAllButtonRef$c, _unselectAllButtonRef;
498
-
499
426
  const fn = isOpen ? "addEventListener" : "removeEventListener";
500
- selectAllButtonRef === null || selectAllButtonRef === void 0 ? void 0 : (_selectAllButtonRef$c = selectAllButtonRef.current) === null || _selectAllButtonRef$c === void 0 ? void 0 : _selectAllButtonRef$c[fn]("click", selectAllItems, true);
501
- unselectAllButtonRef === null || unselectAllButtonRef === void 0 ? void 0 : (_unselectAllButtonRef = unselectAllButtonRef.current) === null || _unselectAllButtonRef === void 0 ? void 0 : _unselectAllButtonRef[fn]("click", unselectAllItems, true);
502
-
427
+ selectAllButtonRef === null || selectAllButtonRef === void 0 || (_selectAllButtonRef$c = selectAllButtonRef.current) === null || _selectAllButtonRef$c === void 0 || _selectAllButtonRef$c[fn]("click", selectAllItems, true);
428
+ unselectAllButtonRef === null || unselectAllButtonRef === void 0 || (_unselectAllButtonRef = unselectAllButtonRef.current) === null || _unselectAllButtonRef === void 0 || _unselectAllButtonRef[fn]("click", unselectAllItems, true);
503
429
  if (isOpen) {
504
430
  var _getListContainer2;
505
-
506
- (_getListContainer2 = getListContainer()) === null || _getListContainer2 === void 0 ? void 0 : _getListContainer2.classList.add("tags-dropdown__container--opened");
431
+ (_getListContainer2 = getListContainer()) === null || _getListContainer2 === void 0 || _getListContainer2.classList.add("tags-dropdown__container--opened");
507
432
  } else {
508
433
  var _getListContainer3;
509
-
510
- (_getListContainer3 = getListContainer()) === null || _getListContainer3 === void 0 ? void 0 : _getListContainer3.classList.remove("tags-dropdown__container--opened");
434
+ (_getListContainer3 = getListContainer()) === null || _getListContainer3 === void 0 || _getListContainer3.classList.remove("tags-dropdown__container--opened");
511
435
  }
512
436
  }, [isOpen]);
513
437
  (0, _react.useEffect)(() => {
514
438
  if (isOpen && isMobile, dropdownListRef !== null && dropdownListRef !== void 0 && dropdownListRef.current) {
515
439
  var _dropdownListRef$curr, _dropdownListRef$curr2;
516
-
517
- setIsScrollableList((dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr = dropdownListRef.current) === null || _dropdownListRef$curr === void 0 ? void 0 : _dropdownListRef$curr.scrollHeight) > (dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr2 = dropdownListRef.current) === null || _dropdownListRef$curr2 === void 0 ? void 0 : _dropdownListRef$curr2.clientHeight));
518
-
440
+ setIsScrollableList((dropdownListRef === null || dropdownListRef === void 0 || (_dropdownListRef$curr = dropdownListRef.current) === null || _dropdownListRef$curr === void 0 ? void 0 : _dropdownListRef$curr.scrollHeight) > (dropdownListRef === null || dropdownListRef === void 0 || (_dropdownListRef$curr2 = dropdownListRef.current) === null || _dropdownListRef$curr2 === void 0 ? void 0 : _dropdownListRef$curr2.clientHeight));
519
441
  if (isScrollableList === null) {
520
442
  var _dropdownListRef$curr3, _dropdownListRef$curr4;
521
-
522
- setIsFixedMaxHeight((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));
443
+ setIsFixedMaxHeight((dropdownListRef === null || dropdownListRef === void 0 || (_dropdownListRef$curr3 = dropdownListRef.current) === null || _dropdownListRef$curr3 === void 0 ? void 0 : _dropdownListRef$curr3.scrollHeight) > (dropdownListRef === null || dropdownListRef === void 0 || (_dropdownListRef$curr4 = dropdownListRef.current) === null || _dropdownListRef$curr4 === void 0 ? void 0 : _dropdownListRef$curr4.clientHeight));
523
444
  }
524
445
  }
525
- }, [isOpen, isMobile, 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]);
446
+ }, [isOpen, isMobile, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : dropdownListRef.current, dropdownListRef === null || dropdownListRef === void 0 || (_dropdownListRef$curr5 = dropdownListRef.current) === null || _dropdownListRef$curr5 === void 0 ? void 0 : _dropdownListRef$curr5.scrollHeight, dropdownListRef === null || dropdownListRef === void 0 || (_dropdownListRef$curr6 = dropdownListRef.current) === null || _dropdownListRef$curr6 === void 0 ? void 0 : _dropdownListRef$curr6.clientHeight]);
526
447
  (0, _react.useEffect)(() => {
527
448
  const setScrollTopValue = e => {
528
449
  setScrollTop(parseInt(e.target.scrollTop, 10));
529
450
  };
530
-
531
451
  if (isOpen && isMobile && dropdownListRef !== null && dropdownListRef !== void 0 && dropdownListRef.current) {
532
452
  var _dropdownListRef$curr7;
533
-
534
- dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr7 = dropdownListRef.current) === null || _dropdownListRef$curr7 === void 0 ? void 0 : _dropdownListRef$curr7.addEventListener("scroll", setScrollTopValue);
453
+ dropdownListRef === null || dropdownListRef === void 0 || (_dropdownListRef$curr7 = dropdownListRef.current) === null || _dropdownListRef$curr7 === void 0 || _dropdownListRef$curr7.addEventListener("scroll", setScrollTopValue);
535
454
  }
536
-
537
455
  return () => {
538
456
  var _dropdownListRef$curr8;
539
-
540
- dropdownListRef === null || dropdownListRef === void 0 ? void 0 : (_dropdownListRef$curr8 = dropdownListRef.current) === null || _dropdownListRef$curr8 === void 0 ? void 0 : _dropdownListRef$curr8.removeEventListener("scroll", setScrollTopValue);
457
+ dropdownListRef === null || dropdownListRef === void 0 || (_dropdownListRef$curr8 = dropdownListRef.current) === null || _dropdownListRef$curr8 === void 0 || _dropdownListRef$curr8.removeEventListener("scroll", setScrollTopValue);
541
458
  };
542
459
  }, [isOpen, isMobile, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : dropdownListRef.current]);
543
460
  (0, _react.useEffect)(() => {
544
461
  if (dropdownListRef !== null && dropdownListRef !== void 0 && dropdownListRef.current) {
545
462
  var _dropdownListRef$curr9, _dropdownListRef$curr10;
546
-
547
- 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));
463
+ setScrollHeight(parseInt((dropdownListRef === null || dropdownListRef === void 0 || (_dropdownListRef$curr9 = dropdownListRef.current) === null || _dropdownListRef$curr9 === void 0 ? void 0 : _dropdownListRef$curr9.scrollHeight) - (dropdownListRef === null || dropdownListRef === void 0 || (_dropdownListRef$curr10 = dropdownListRef.current) === null || _dropdownListRef$curr10 === void 0 ? void 0 : _dropdownListRef$curr10.clientHeight), 10));
548
464
  }
549
465
  }, [scrollTop, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : dropdownListRef.current]);
550
466
  (0, _react.useEffect)(() => {
551
467
  return () => {
552
468
  var _getListContainer4, _getListContainerWrap;
553
-
554
- (_getListContainer4 = getListContainer()) === null || _getListContainer4 === void 0 ? void 0 : _getListContainer4.remove();
555
- (_getListContainerWrap = getListContainerWrapper()) === null || _getListContainerWrap === void 0 ? void 0 : _getListContainerWrap.remove();
469
+ (_getListContainer4 = getListContainer()) === null || _getListContainer4 === void 0 || _getListContainer4.remove();
470
+ (_getListContainerWrap = getListContainerWrapper()) === null || _getListContainerWrap === void 0 || _getListContainerWrap.remove();
556
471
  };
557
472
  }, []);
558
473
  return /*#__PURE__*/_react.default.createElement("div", {
@@ -605,8 +520,7 @@ const TagsDropdown = _ref => {
605
520
  onKeyDown: e => onKeyPress(e, searchValue),
606
521
  onFocus: e => {
607
522
  var _e$target;
608
-
609
- if (isMobile) e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.blur();
523
+ if (isMobile) e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 || _e$target.blur();
610
524
  }
611
525
  }, attributesOfNativeInput)) : "", isOpen && renderListContainer(), /*#__PURE__*/_react.default.createElement("span", {
612
526
  className: (0, _classnames.default)("".concat(RC, "__arrow"), {
@@ -620,6 +534,4 @@ const TagsDropdown = _ref => {
620
534
  className: "color--text"
621
535
  }))));
622
536
  };
623
-
624
- var _default = TagsDropdown;
625
- exports.default = _default;
537
+ var _default = exports.default = TagsDropdown;
@@ -1,21 +1,16 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
-
12
9
  var _react = _interopRequireDefault(require("react"));
13
-
14
10
  var _classnames = _interopRequireDefault(require("classnames"));
15
-
16
11
  require("./Text.scss");
17
-
18
12
  const RC = "text";
13
+
19
14
  /**
20
15
  *
21
16
  * @param value
@@ -28,6 +23,7 @@ const RC = "text";
28
23
  * @return {JSX.Element|null}
29
24
  * @constructor
30
25
  */
26
+
31
27
  //? Прототип лежит на проекте кабинета src\JS\Components\Atomic\FormElements\Text\Text.js
32
28
  //? Что поменял?
33
29
  //? - в верстке убрал дополнительную вложенность
@@ -39,13 +35,18 @@ const RC = "text";
39
35
  //? - переработал пропу link, может быть строкой или объектом
40
36
  //? если это объект, то у него могут быть свойства
41
37
  //? - path - значение для href
38
+
42
39
  //? - target - значение для атрибута target, имеет смысл передавать, если не передаются onClick или redirect
40
+
43
41
  //? - onClick - альтернативный обработчик нажатия, если он есть то он будет ипользован в приоритете,
44
42
  //? ф-я будет вызвана с 1 аргументом - props, в объекте props будет свойство ev (event) и все содержание link,
45
43
  //? по умолчанию до использования onClick будут вызваны e.preventDefault() и e.stopPropagation
44
+
46
45
  //? - redirect - альтернативный исполнитель редиректа (например history.push),
47
46
  //? если есть и нет onClick - будет вызван с одним аргументом (link.path)
47
+
48
48
  //? - isNoPreventDefault - отключает вызов e.preventDefault перед вызовом onClick или redirect
49
+
49
50
  //? - isNoStopPropagation - отключает вызов e.preventDefault перед вызовом onClick или redirect
50
51
 
51
52
  const Text = _ref => {
@@ -71,19 +72,17 @@ const Text = _ref => {
71
72
  isNoPreventDefault,
72
73
  isNoStopPropagation
73
74
  } = linkObj;
74
-
75
75
  const preparedPath = (() => {
76
76
  if (!isLink) return "";
77
77
  return isLinkAsObj ? path : link;
78
78
  })();
79
-
80
79
  const atributes = {};
81
-
82
80
  if (typeof onClickInner === "function" || typeof redirect === "function") {
83
81
  atributes.onClick = function onClick(ev) {
84
82
  if (!isNoPreventDefault) ev.preventDefault();
85
- if (!isNoStopPropagation) ev.stopPropagation(); //? если переданы и onClick, и redirect, то onClick считается приоритетнее redirect
83
+ if (!isNoStopPropagation) ev.stopPropagation();
86
84
 
85
+ //? если переданы и onClick, и redirect, то onClick считается приоритетнее redirect
87
86
  if (onClickInner) {
88
87
  onClickInner({
89
88
  ev,
@@ -91,15 +90,12 @@ const Text = _ref => {
91
90
  });
92
91
  return;
93
92
  }
94
-
95
93
  redirect(preparedPath);
96
94
  };
97
95
  }
98
-
99
96
  const mainInner = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, icon && /*#__PURE__*/_react.default.createElement("div", {
100
97
  className: "".concat(RC, "__icon-container")
101
98
  }, icon), value);
102
-
103
99
  return /*#__PURE__*/_react.default.createElement("div", {
104
100
  "data-testid": "text--".concat(testId),
105
101
  className: (0, _classnames.default)(RC, className, {
@@ -115,6 +111,4 @@ const Text = _ref => {
115
111
  rel: "noreferrer"
116
112
  }), mainInner) : mainInner);
117
113
  };
118
-
119
- var _default = Text;
120
- exports.default = _default;
114
+ var _default = exports.default = Text;
@@ -1,20 +1,14 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
-
12
9
  var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
10
  require("./TextSwitcher.scss");
15
-
16
11
  const RC = "text-switcher";
17
-
18
12
  const TextSwitcher = _ref => {
19
13
  let {
20
14
  isActive,
@@ -43,6 +37,4 @@ const TextSwitcher = _ref => {
43
37
  })
44
38
  }));
45
39
  };
46
-
47
- var _default = TextSwitcher;
48
- exports.default = _default;
40
+ var _default = exports.default = TextSwitcher;
@@ -1,22 +1,15 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
-
12
9
  var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
10
  var _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
15
-
16
11
  require("./Textarea.scss");
17
-
18
12
  const RC = "textarea";
19
-
20
13
  const Textarea = _ref => {
21
14
  let {
22
15
  value,
@@ -45,6 +38,4 @@ const Textarea = _ref => {
45
38
  disabled: disabled
46
39
  }));
47
40
  };
48
-
49
- var _default = Textarea;
50
- exports.default = _default;
41
+ var _default = exports.default = Textarea;