intelicoreact 1.4.2 → 1.4.4

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 (254) 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 +51 -144
  9. package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +1 -7
  10. package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +25 -91
  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/FileLoaderLocalGroup/FileLoaderLocalGroup.js +19 -35
  16. package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +9 -38
  17. package/dist/Atomic/FormElements/Input/Input.js +25 -59
  18. package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +4 -31
  19. package/dist/Atomic/FormElements/InputColor/InputColor.js +4 -14
  20. package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +6 -29
  21. package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +8 -43
  22. package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +3 -21
  23. package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +58 -81
  24. package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +6 -41
  25. package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +1 -8
  26. package/dist/Atomic/FormElements/InputDateRange/dependencies.js +16 -46
  27. package/dist/Atomic/FormElements/InputLink/InputLink.js +6 -23
  28. package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +0 -4
  29. package/dist/Atomic/FormElements/InputMask/InputMask.js +77 -208
  30. package/dist/Atomic/FormElements/InputMask/functions.js +2 -28
  31. package/dist/Atomic/FormElements/InputMask2/InputMask2.js +43 -119
  32. package/dist/Atomic/FormElements/InputMask2/functions.js +2 -28
  33. package/dist/Atomic/FormElements/InputMask3/InputMask3.js +44 -137
  34. package/dist/Atomic/FormElements/InputMask3/functions.js +2 -28
  35. package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +3 -17
  36. package/dist/Atomic/FormElements/InputsRow/InputsRow.js +5 -24
  37. package/dist/Atomic/FormElements/Label/Label.js +1 -9
  38. package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +35 -73
  39. package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +3 -15
  40. package/dist/Atomic/FormElements/NumericInput/NumericInput.js +23 -44
  41. package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +7 -17
  42. package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +3 -14
  43. package/dist/Atomic/FormElements/RadioInput/RadioInput.js +1 -10
  44. package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +3 -14
  45. package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +3 -23
  46. package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +17 -34
  47. package/dist/Atomic/FormElements/RangeList/RangeList.js +6 -25
  48. package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +1 -11
  49. package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +14 -72
  50. package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +43 -132
  51. package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +1 -10
  52. package/dist/Atomic/FormElements/Switcher/Switcher.js +1 -10
  53. package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +1 -13
  54. package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +1 -10
  55. package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +2 -17
  56. package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +3 -17
  57. package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +1 -11
  58. package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +6 -29
  59. package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +2 -3
  60. package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +1 -12
  61. package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +57 -152
  62. package/dist/Atomic/FormElements/Text/Text.js +10 -16
  63. package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +1 -9
  64. package/dist/Atomic/FormElements/Textarea/Textarea.js +6 -17
  65. package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +6 -35
  66. package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +4 -13
  67. package/dist/Atomic/FormElements/TimeRange/TimeRange.js +7 -21
  68. package/dist/Atomic/FormElements/UserContacts/UserContacts.js +8 -35
  69. package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +5 -18
  70. package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +3 -10
  71. package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +3 -11
  72. package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +1 -2
  73. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +5 -12
  74. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +3 -3
  75. package/dist/Atomic/Layout/Header/Header.js +3 -15
  76. package/dist/Atomic/Layout/MainMenu/MainMenu.js +3 -20
  77. package/dist/Atomic/Layout/Spinner/Spinner.js +1 -8
  78. package/dist/Atomic/UI/Accordion/Accordion.js +3 -19
  79. package/dist/Atomic/UI/Accordion/AccordionItem.js +9 -23
  80. package/dist/Atomic/UI/AccordionTable/AccordionTable.js +7 -32
  81. package/dist/Atomic/UI/AccordionText/AccordionText.js +3 -15
  82. package/dist/Atomic/UI/AdvancedTag/AdvTag.js +4 -21
  83. package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +3 -15
  84. package/dist/Atomic/UI/Alert/Alert.js +3 -19
  85. package/dist/Atomic/UI/Arrow/Arrow.js +3 -16
  86. package/dist/Atomic/UI/Box/Box.js +3 -9
  87. package/dist/Atomic/UI/Button/Button.js +2 -11
  88. package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +1 -10
  89. package/dist/Atomic/UI/Chart/Chart.js +4 -29
  90. package/dist/Atomic/UI/Chart/partial/Chart.constants.js +11 -19
  91. package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +1 -12
  92. package/dist/Atomic/UI/Chart/partial/datasetSetters.js +11 -34
  93. package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +82 -56
  94. package/dist/Atomic/UI/Chart/partial/optionsSetters.js +15 -19
  95. package/dist/Atomic/UI/Chart/partial/utils.js +6 -20
  96. package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +3 -13
  97. package/dist/Atomic/UI/DateTime/DateTime.js +3 -14
  98. package/dist/Atomic/UI/DebugContainer/DebugContainer.js +4 -16
  99. package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +3 -11
  100. package/dist/Atomic/UI/DoubleString/DoubleString.js +12 -19
  101. package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +3 -10
  102. package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +17 -52
  103. package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +1 -29
  104. package/dist/Atomic/UI/Hint/Hint.js +7 -33
  105. package/dist/Atomic/UI/Modal/Modal.js +6 -28
  106. package/dist/Atomic/UI/Modal/ModalHOC.js +1 -9
  107. package/dist/Atomic/UI/Modal/partials/ModalFooter.js +1 -7
  108. package/dist/Atomic/UI/Modal/partials/ModalTitle.js +1 -8
  109. package/dist/Atomic/UI/Modal/partials/useMobileModal.js +32 -49
  110. package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +6 -21
  111. package/dist/Atomic/UI/NavLine/NavLine.js +26 -55
  112. package/dist/Atomic/UI/NavLine/Tabs.js +2 -3
  113. package/dist/Atomic/UI/PageTitle/PageTitle.js +2 -10
  114. package/dist/Atomic/UI/PieChart/PieChart.js +1 -10
  115. package/dist/Atomic/UI/Price/Price.js +3 -8
  116. package/dist/Atomic/UI/PriceRange/PriceRange.js +1 -7
  117. package/dist/Atomic/UI/ProgressLine/ProgressLine.js +1 -16
  118. package/dist/Atomic/UI/Status/Status.js +1 -8
  119. package/dist/Atomic/UI/Table/Partials/TdCell.js +5 -29
  120. package/dist/Atomic/UI/Table/Partials/TdHeader.js +1 -11
  121. package/dist/Atomic/UI/Table/Partials/TdRow.js +5 -17
  122. package/dist/Atomic/UI/Table/Partials/TdTitle.js +3 -14
  123. package/dist/Atomic/UI/Table/Table.js +1 -12
  124. package/dist/Atomic/UI/Table/TdTypes/TdActions.js +2 -18
  125. package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +1 -9
  126. package/dist/Atomic/UI/Table/TdTypes/TdRange.js +1 -4
  127. package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +1 -13
  128. package/dist/Atomic/UI/Tag/Tag.js +3 -14
  129. package/dist/Atomic/UI/TagList/TagList.js +19 -35
  130. package/dist/Atomic/UI/UserBox/UserBox.js +1 -13
  131. package/dist/Classes/AbortableFetch.js +36 -93
  132. package/dist/Classes/AnimatedHandler.js +3 -7
  133. package/dist/Classes/RESTAPI/index.js +39 -44
  134. package/dist/Classes/RESTAPI/partials/AbortableFetch.js +35 -93
  135. package/dist/Classes/RESTAPI/partials/ApiBase.js +1 -9
  136. package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +24 -32
  137. package/dist/Classes/RESTAPI/partials/ApiUtils.js +34 -41
  138. package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +21 -44
  139. package/dist/Classes/RESTAPI/partials/Utils.js +6 -19
  140. package/dist/Classes/RESTAPI/partials/_outerDependencies.js +2 -6
  141. package/dist/Classes/RESTAPI/partials/_utils.js +13 -36
  142. package/dist/Constants/index.constants.js +8 -15
  143. package/dist/Functions/Portal.js +5 -16
  144. package/dist/Functions/customEventListener.js +4 -17
  145. package/dist/Functions/fieldValueFormatters.js +43 -83
  146. package/dist/Functions/hooks/useFormFieldsChangesManager.js +23 -26
  147. package/dist/Functions/locale/createTranslator.js +4 -9
  148. package/dist/Functions/operations.js +12 -22
  149. package/dist/Functions/presets/inputMaskPresets.js +9 -11
  150. package/dist/Functions/presets/inputPresets.js +8 -11
  151. package/dist/Functions/presets/mobileKeyboardTypesPresets.js +7 -9
  152. package/dist/Functions/schemas.js +6 -13
  153. package/dist/Functions/useBodyScrollLock.js +1 -6
  154. package/dist/Functions/useClickOutside.js +0 -4
  155. package/dist/Functions/useDebounce.js +2 -7
  156. package/dist/Functions/useFieldFocus.js +6 -18
  157. package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +0 -9
  158. package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +12 -23
  159. package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +6 -15
  160. package/dist/Functions/useFormTools/functions/General.js +18 -28
  161. package/dist/Functions/useFormTools/functions/RenderFields.js +2 -11
  162. package/dist/Functions/useFormTools/functions/usePrevious.js +1 -5
  163. package/dist/Functions/useFormTools/index.js +85 -144
  164. package/dist/Functions/useInputHighlightError.js +3 -12
  165. package/dist/Functions/useIsMobile.js +7 -13
  166. package/dist/Functions/useKeyPress/useHandleKeyPress.js +1 -7
  167. package/dist/Functions/useKeyPress/useKeyPress.js +1 -9
  168. package/dist/Functions/useLocalStorage.js +1 -9
  169. package/dist/Functions/useLocationParams.js +4 -5
  170. package/dist/Functions/useMediaQuery.js +3 -9
  171. package/dist/Functions/useMetaInfo.js +3 -10
  172. package/dist/Functions/useMouseUpOutside.js +0 -3
  173. package/dist/Functions/useOnlineStatus.js +1 -9
  174. package/dist/Functions/usePasswordChecker.js +4 -20
  175. package/dist/Functions/usePrevious.js +1 -5
  176. package/dist/Functions/useResize.js +2 -10
  177. package/dist/Functions/useScrollTo.js +2 -7
  178. package/dist/Functions/useToggle.js +1 -5
  179. package/dist/Functions/utils.js +56 -131
  180. package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +2 -9
  181. package/dist/Molecular/CustomIcons/components/AlertCircle.js +2 -9
  182. package/dist/Molecular/CustomIcons/components/AppStore.js +2 -9
  183. package/dist/Molecular/CustomIcons/components/Arrow.js +2 -9
  184. package/dist/Molecular/CustomIcons/components/ArrowDown.js +2 -9
  185. package/dist/Molecular/CustomIcons/components/ArrowLeft.js +2 -9
  186. package/dist/Molecular/CustomIcons/components/ArrowRight.js +2 -9
  187. package/dist/Molecular/CustomIcons/components/ArrowUp.js +2 -9
  188. package/dist/Molecular/CustomIcons/components/Bell.js +2 -9
  189. package/dist/Molecular/CustomIcons/components/Button.js +2 -9
  190. package/dist/Molecular/CustomIcons/components/Campaigns.js +2 -9
  191. package/dist/Molecular/CustomIcons/components/Check.js +2 -9
  192. package/dist/Molecular/CustomIcons/components/Check2.js +2 -9
  193. package/dist/Molecular/CustomIcons/components/ChevronDown.js +2 -9
  194. package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +2 -9
  195. package/dist/Molecular/CustomIcons/components/ChevronLeft.js +2 -9
  196. package/dist/Molecular/CustomIcons/components/ChevronRight.js +2 -9
  197. package/dist/Molecular/CustomIcons/components/ChevronUp.js +2 -9
  198. package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +2 -9
  199. package/dist/Molecular/CustomIcons/components/Close.js +2 -9
  200. package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +2 -9
  201. package/dist/Molecular/CustomIcons/components/Delete.js +2 -9
  202. package/dist/Molecular/CustomIcons/components/Edit.js +2 -9
  203. package/dist/Molecular/CustomIcons/components/Email.js +2 -9
  204. package/dist/Molecular/CustomIcons/components/FinturfLogo.js +2 -9
  205. package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +2 -9
  206. package/dist/Molecular/CustomIcons/components/Flows.js +2 -9
  207. package/dist/Molecular/CustomIcons/components/Gift.js +2 -9
  208. package/dist/Molecular/CustomIcons/components/GoogleAuth.js +2 -9
  209. package/dist/Molecular/CustomIcons/components/GooglePlay.js +2 -9
  210. package/dist/Molecular/CustomIcons/components/HelpCircle.js +2 -9
  211. package/dist/Molecular/CustomIcons/components/HelpCircle2.js +2 -9
  212. package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +2 -9
  213. package/dist/Molecular/CustomIcons/components/Home.js +2 -9
  214. package/dist/Molecular/CustomIcons/components/Home2.js +2 -9
  215. package/dist/Molecular/CustomIcons/components/Key.js +2 -9
  216. package/dist/Molecular/CustomIcons/components/Landers.js +2 -9
  217. package/dist/Molecular/CustomIcons/components/Lock.js +2 -9
  218. package/dist/Molecular/CustomIcons/components/Mail.js +2 -9
  219. package/dist/Molecular/CustomIcons/components/Mastercard.js +2 -9
  220. package/dist/Molecular/CustomIcons/components/Minus.js +2 -9
  221. package/dist/Molecular/CustomIcons/components/Offers.js +2 -9
  222. package/dist/Molecular/CustomIcons/components/Pause.js +2 -9
  223. package/dist/Molecular/CustomIcons/components/PayPal.js +2 -9
  224. package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +2 -9
  225. package/dist/Molecular/CustomIcons/components/Phone.js +2 -9
  226. package/dist/Molecular/CustomIcons/components/Play.js +2 -9
  227. package/dist/Molecular/CustomIcons/components/Plus.js +2 -9
  228. package/dist/Molecular/CustomIcons/components/Profile.js +2 -9
  229. package/dist/Molecular/CustomIcons/components/QRCode.js +2 -9
  230. package/dist/Molecular/CustomIcons/components/Rectangle.js +2 -9
  231. package/dist/Molecular/CustomIcons/components/Revert.js +2 -9
  232. package/dist/Molecular/CustomIcons/components/Star.js +2 -9
  233. package/dist/Molecular/CustomIcons/components/Star2.js +2 -9
  234. package/dist/Molecular/CustomIcons/components/TrafficSources.js +2 -9
  235. package/dist/Molecular/CustomIcons/components/Trash.js +2 -9
  236. package/dist/Molecular/CustomIcons/components/TrashRed.js +2 -9
  237. package/dist/Molecular/CustomIcons/components/Triggers.js +2 -9
  238. package/dist/Molecular/CustomIcons/components/User.js +2 -9
  239. package/dist/Molecular/CustomIcons/components/Visa.js +2 -9
  240. package/dist/Molecular/CustomIcons/components/X.js +2 -9
  241. package/dist/Molecular/CustomIcons/index.js +0 -122
  242. package/dist/Molecular/FormElement/FormElement.js +1 -12
  243. package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +30 -31
  244. package/dist/Molecular/FormWithDependOn/partials/_utils.js +9 -12
  245. package/dist/Molecular/InputAddress/InputAddress.js +65 -114
  246. package/dist/Molecular/InputPassword/InputPassword.js +5 -19
  247. package/dist/index.js +0 -2
  248. package/package.json +1 -1
  249. package/dist/Atomic/FormElements/UserContacts/partial/defaultIcons.js +0 -91
  250. package/dist/Atomic/UI/ModalBackup/Modal.js +0 -174
  251. package/dist/Atomic/UI/ModalBackup/Modal.scss +0 -333
  252. package/dist/Atomic/UI/ModalBackup/ModalHOC.js +0 -51
  253. package/dist/Atomic/UI/ModalBackup/partials/ModalFooter.js +0 -24
  254. package/dist/Atomic/UI/ModalBackup/partials/ModalTitle.js +0 -41
@@ -1,34 +1,23 @@
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 = _interopRequireWildcard(require("react"));
11
-
12
9
  var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
10
  var _reactFeather = require("react-feather");
15
-
16
11
  var _utils = require("../../../Functions/utils");
17
-
18
12
  var _Alert = _interopRequireDefault(require("../../UI/Alert/Alert"));
19
-
20
13
  var _FileLoaderLocal = _interopRequireDefault(require("../FileLoaderLocal/FileLoaderLocal"));
21
-
22
14
  require("./FileLoaderLocalGroup.scss");
23
-
24
- 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); }
25
-
26
- 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; }
27
-
15
+ 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); }
16
+ 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; }
28
17
  /* eslint-disable no-console */
18
+
29
19
  const DEFAULT_LABEL_PREFIX = "Please attach";
30
20
  const MAX_FILE_SIZE = 10 * 1024 * 1024;
31
-
32
21
  const FileLoaderLocalGroup = _ref => {
33
22
  let {
34
23
  className,
@@ -40,10 +29,8 @@ const FileLoaderLocalGroup = _ref => {
40
29
  alertText
41
30
  } = _ref;
42
31
  const [groups, setGroups] = (0, _react.useState)((0, _utils.clone)(groupsArray));
43
-
44
32
  const getNewFile = group => {
45
33
  var _group$files, _group$files2, _group$maxItemSizeByt;
46
-
47
34
  return {
48
35
  id: isNaN(((_group$files = group.files) === null || _group$files === void 0 ? void 0 : _group$files.at(-1).id) + 1) ? 1 : ((_group$files2 = group.files) === null || _group$files2 === void 0 ? void 0 : _group$files2.at(-1).id) + 1,
49
36
  value: "",
@@ -54,10 +41,10 @@ const FileLoaderLocalGroup = _ref => {
54
41
  isRequired: (group === null || group === void 0 ? void 0 : group.isRequired) || false
55
42
  };
56
43
  };
57
-
58
44
  (0, _react.useEffect)(() => {
59
45
  const mergedGroups = groupsArray === null || groupsArray === void 0 ? void 0 : groupsArray.map(group => {
60
- return { ...group,
46
+ return {
47
+ ...group,
61
48
  files: [getNewFile(group)]
62
49
  };
63
50
  });
@@ -77,7 +64,6 @@ const FileLoaderLocalGroup = _ref => {
77
64
  const currentGroup = groups === null || groups === void 0 ? void 0 : groups.find(group => group.groupId === groupId.toString());
78
65
  const files = currentGroup === null || currentGroup === void 0 ? void 0 : currentGroup.files;
79
66
  const changedField = files.find(item => Number(item.id) === Number(id));
80
-
81
67
  if (error) {
82
68
  changedField.value = name;
83
69
  changedField.error = error;
@@ -90,17 +76,19 @@ const FileLoaderLocalGroup = _ref => {
90
76
  changedField.error = "";
91
77
  const oldDataWithNewFile = groups === null || groups === void 0 ? void 0 : groups.map(group => {
92
78
  if ((group === null || group === void 0 ? void 0 : group.groupId) === groupId.toString() && isSingleGroup) {
93
- return { ...group,
79
+ return {
80
+ ...group,
94
81
  files: [...group.files]
95
82
  };
96
83
  } else if ((group === null || group === void 0 ? void 0 : group.groupId) === groupId.toString() && group.files.length < 10 && !isSingleGroup) {
97
- return { ...group,
98
- files: [...group.files, { ...getNewFile(group),
84
+ return {
85
+ ...group,
86
+ files: [...group.files, {
87
+ ...getNewFile(group),
99
88
  isRequired: group.files.length > 1
100
89
  }]
101
90
  };
102
91
  }
103
-
104
92
  return group;
105
93
  });
106
94
  setGroups([...oldDataWithNewFile]);
@@ -109,18 +97,20 @@ const FileLoaderLocalGroup = _ref => {
109
97
  } else {
110
98
  const oldDataWithRemovedFile = groups === null || groups === void 0 ? void 0 : groups.map(group => {
111
99
  if (isSingleGroup && (group === null || group === void 0 ? void 0 : group.groupId) === groupId.toString()) {
112
- return { ...group,
113
- files: [{ ...getNewFile(group),
100
+ return {
101
+ ...group,
102
+ files: [{
103
+ ...getNewFile(group),
114
104
  value: "",
115
105
  base64: ""
116
106
  }]
117
107
  };
118
108
  } else if ((group === null || group === void 0 ? void 0 : group.groupId) === groupId.toString() && !isSingleGroup) {
119
- return { ...group,
109
+ return {
110
+ ...group,
120
111
  files: group.files.filter(item => item.id !== id)
121
112
  };
122
113
  }
123
-
124
114
  return group;
125
115
  });
126
116
  setGroups([...oldDataWithRemovedFile]);
@@ -128,12 +118,9 @@ const FileLoaderLocalGroup = _ref => {
128
118
  }
129
119
  }
130
120
  };
131
-
132
121
  const getUniqueExts = acceptExts => (0, _utils.getUniqueFileExtensions)(acceptExts === null || acceptExts === void 0 ? void 0 : acceptExts.replace(/\./g, ""));
133
-
134
122
  return groups === null || groups === void 0 ? void 0 : groups.map(group => {
135
123
  var _group$files3;
136
-
137
124
  return /*#__PURE__*/_react.default.createElement("div", {
138
125
  key: group.groupId,
139
126
  className: (0, _classnames.default)("file-loader-local-groups", className)
@@ -151,9 +138,8 @@ const FileLoaderLocalGroup = _ref => {
151
138
  }), /*#__PURE__*/_react.default.createElement("div", {
152
139
  "data-testid": "input--group-file-loader--key-".concat(testId || (group === null || group === void 0 ? void 0 : group.groupId)),
153
140
  className: "file-loader-local-groups__item"
154
- }, group === null || group === void 0 ? void 0 : (_group$files3 = group.files) === null || _group$files3 === void 0 ? void 0 : _group$files3.map((file, index) => {
141
+ }, group === null || group === void 0 || (_group$files3 = group.files) === null || _group$files3 === void 0 ? void 0 : _group$files3.map((file, index) => {
155
142
  var _group$files4, _group$files5;
156
-
157
143
  return /*#__PURE__*/_react.default.createElement(_FileLoaderLocal.default, {
158
144
  groupId: group === null || group === void 0 ? void 0 : group.groupId,
159
145
  key: (file === null || file === void 0 ? void 0 : file.id) || index,
@@ -171,6 +157,4 @@ const FileLoaderLocalGroup = _ref => {
171
157
  })));
172
158
  });
173
159
  };
174
-
175
- var _default = FileLoaderLocalGroup;
176
- exports.default = _default;
160
+ var _default = exports.default = FileLoaderLocalGroup;
@@ -1,31 +1,20 @@
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 _reactFeather = require("react-feather");
15
-
16
11
  var _utils = require("../../../Functions/utils");
17
-
18
12
  var _Input = _interopRequireDefault(require("../Input/Input"));
19
-
20
13
  require("./FormattedRawSSN.scss");
21
-
22
- 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); }
23
-
24
- 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; }
25
-
14
+ 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); }
15
+ 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; }
26
16
  const FormattedRawSSN = _ref => {
27
17
  var _value$substring;
28
-
29
18
  let {
30
19
  value = "",
31
20
  postfix = "",
@@ -41,22 +30,17 @@ const FormattedRawSSN = _ref => {
41
30
  const wrapperRef = (0, _react.useRef)(null);
42
31
  (0, _react.useEffect)(() => {
43
32
  var _value$toString$subst, _value$toString;
44
-
45
- setSSN((_value$toString$subst = value === null || value === void 0 ? void 0 : (_value$toString = value.toString()) === null || _value$toString === void 0 ? void 0 : _value$toString.substring(0, maxLen)) !== null && _value$toString$subst !== void 0 ? _value$toString$subst : "");
33
+ setSSN((_value$toString$subst = value === null || value === void 0 || (_value$toString = value.toString()) === null || _value$toString === void 0 ? void 0 : _value$toString.substring(0, maxLen)) !== null && _value$toString$subst !== void 0 ? _value$toString$subst : "");
46
34
  }, [value]);
47
-
48
35
  const onChange = value => {
49
36
  if (!value && value !== "") return "";
50
-
51
37
  if (value.replace(/-/g, "").length < SSN.length) {
52
38
  const last = SSN.length - 1;
53
39
  setSSN(SSN.slice(0, last));
54
40
  return;
55
41
  }
56
-
57
42
  const numValue = value.replace(/\D/g, "");
58
43
  let newSSN = "";
59
-
60
44
  if (isHidden) {
61
45
  if (SSN.length > 5) {
62
46
  newSSN = SSN.slice(0, 5) + numValue;
@@ -66,46 +50,36 @@ const FormattedRawSSN = _ref => {
66
50
  } else {
67
51
  newSSN = numValue;
68
52
  }
69
-
70
53
  if (newSSN.length > maxLen) {
71
54
  return;
72
55
  }
73
-
74
56
  setSSN(newSSN);
75
57
  };
76
-
77
58
  const switchView = () => {
78
59
  var _wrapperRef$current;
79
-
80
- const input = wrapperRef === null || wrapperRef === void 0 ? void 0 : (_wrapperRef$current = wrapperRef.current) === null || _wrapperRef$current === void 0 ? void 0 : _wrapperRef$current.querySelector("input");
81
- input === null || input === void 0 ? void 0 : input.focus();
60
+ const input = wrapperRef === null || wrapperRef === void 0 || (_wrapperRef$current = wrapperRef.current) === null || _wrapperRef$current === void 0 ? void 0 : _wrapperRef$current.querySelector("input");
61
+ input === null || input === void 0 || input.focus();
82
62
  (0, _utils.setCarretToEnd)(input);
83
63
  setIsHidden(!isHidden);
84
64
  };
85
-
86
65
  const getFormatedValue = v => {
87
66
  if (!v) return "";
88
67
  v = v.slice(0, 11).replace(/-/g, "");
89
-
90
68
  if (v.length <= 3) {
91
69
  return v;
92
70
  }
93
-
94
71
  if (v.length > 3 && v.length <= 5) {
95
72
  return "".concat(v.slice(0, 3), "-").concat(v.slice(3));
96
73
  }
97
-
98
74
  if (v.length > 5) {
99
75
  return "".concat(v.slice(0, 3), "-").concat(v.slice(3, 5), "-").concat(v.slice(5));
100
76
  }
101
77
  };
102
-
103
78
  const getMaskedValue = v => {
104
79
  return isHidden ? v.slice(0, 7).replace(/[0-9]/g, maskChar).concat(v.slice(7)) : v;
105
80
  };
106
-
107
81
  (0, _react.useEffect)(() => {
108
- if (SSN) onChangeProp === null || onChangeProp === void 0 ? void 0 : onChangeProp(SSN.concat(SSN.length === maxLen ? postfix : "").replace(/-/g, ""));
82
+ if (SSN) onChangeProp === null || onChangeProp === void 0 || onChangeProp(SSN.concat(SSN.length === maxLen ? postfix : "").replace(/-/g, ""));
109
83
  }, [SSN]);
110
84
  return /*#__PURE__*/_react.default.createElement("div", {
111
85
  className: "formatted-raw-ssn",
@@ -117,9 +91,8 @@ const FormattedRawSSN = _ref => {
117
91
  })), postfix && /*#__PURE__*/_react.default.createElement("span", {
118
92
  className: "formatted-raw-ssn-postfix",
119
93
  onClick: () => {
120
- var _wrapperRef$current2, _wrapperRef$current2$;
121
-
122
- return wrapperRef === null || wrapperRef === void 0 ? void 0 : (_wrapperRef$current2 = wrapperRef.current) === null || _wrapperRef$current2 === void 0 ? void 0 : (_wrapperRef$current2$ = _wrapperRef$current2.querySelector("input")) === null || _wrapperRef$current2$ === void 0 ? void 0 : _wrapperRef$current2$.focus();
94
+ var _wrapperRef$current2;
95
+ return wrapperRef === null || wrapperRef === void 0 || (_wrapperRef$current2 = wrapperRef.current) === null || _wrapperRef$current2 === void 0 || (_wrapperRef$current2 = _wrapperRef$current2.querySelector("input")) === null || _wrapperRef$current2 === void 0 ? void 0 : _wrapperRef$current2.focus();
123
96
  }
124
97
  }, postfix), /*#__PURE__*/_react.default.createElement("span", {
125
98
  className: "formatted-raw-ssn-eye-holder",
@@ -133,6 +106,4 @@ const FormattedRawSSN = _ref => {
133
106
  className: "password-icon"
134
107
  })));
135
108
  };
136
-
137
- var _default = FormattedRawSSN;
138
- exports.default = _default;
109
+ var _default = exports.default = FormattedRawSSN;
@@ -1,36 +1,25 @@
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 _index = require("../../../Constants/index.constants");
17
-
18
12
  var _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
19
-
20
13
  var _utils = require("../../../Functions/utils");
21
-
22
14
  var _Spinner = _interopRequireDefault(require("../../Layout/Spinner/Spinner"));
23
-
24
15
  var _DynamicIcon = _interopRequireDefault(require("../../UI/DynamicIcon/DynamicIcon"));
25
-
26
16
  require("./Input.scss");
27
-
28
- 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); }
29
-
30
- 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; }
31
-
17
+ 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); }
18
+ 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; }
32
19
  // import InputMask from 'react-input-mask';
20
+
33
21
  const HIDE_SYMBOL = "\u2022";
22
+
34
23
  /**
35
24
  * Input компонент.
36
25
  *
@@ -66,7 +55,6 @@ const HIDE_SYMBOL = "\u2022";
66
55
  * @param {boolean} props.isNotValidateASCII - Отключает проверку ASCII для вводимых символов.
67
56
  * @param {boolean} props.isNumericMobileKeyboard - Отображает цифровую клавиатуру на мобильных устройствах.
68
57
  */
69
-
70
58
  const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
71
59
  let {
72
60
  blurTrim,
@@ -107,7 +95,6 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
107
95
  name,
108
96
  fieldKey,
109
97
  id,
110
- key,
111
98
  attributesOfNativeInput = {}
112
99
  } = _ref;
113
100
  const {
@@ -118,13 +105,13 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
118
105
  const DynamicIconComponent = iconDynamicKey && !icon ? /*#__PURE__*/_react.default.createElement(_DynamicIcon.default, (0, _extends2.default)({
119
106
  iconKey: iconDynamicKey
120
107
  }, iconDynamicProps)) : null;
121
- const DEFAULT_BLINK_TIME = 100; // STATES
122
-
108
+ const DEFAULT_BLINK_TIME = 100;
109
+ // STATES
123
110
  const [isFocused, setIsFocused] = (0, _react.useState)(false);
124
111
  const [isEditing, setEditing] = (0, _react.useState)(false);
125
112
  const inputInnerRef = (0, _react.useRef)(null);
126
- const inputRef = (0, _react.useMemo)(() => ref || inputInnerRef, [ref]); // const previousValueRef = useRef(value);
127
-
113
+ const inputRef = (0, _react.useMemo)(() => ref || inputInnerRef, [ref]);
114
+ // const previousValueRef = useRef(value);
128
115
  const [isAttemptToChange, setIsAttemptToChange] = (0, _react.useState)(false);
129
116
  const [isToHighlightError, setIsToHighlightError] = (0, _react.useState)(false);
130
117
  const [onInputHover, setOnInputHover] = (0, _react.useState)(false);
@@ -136,9 +123,10 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
136
123
  });
137
124
  const isUseBitDepthPoints = Boolean(onlyNumbers) && isPriceInput;
138
125
  const isUseErrorsBlink = !isNotBlinkErrors && !mask;
139
- const inputName = name || fieldKey || id || key;
140
- const isPseudoPasswordMode = type === "pseudoPassword"; // HANDLES
126
+ const inputName = name || fieldKey || id;
127
+ const isPseudoPasswordMode = type === "pseudoPassword";
141
128
 
129
+ // HANDLES
142
130
  const handle = {
143
131
  correctMinMax: (value, correctionType) => {
144
132
  if (!onlyNumbers) return value;
@@ -152,66 +140,57 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
152
140
  const maximum = !Number.isNaN(Number(max)) && max !== null && (max >= 0 || !isOnlyPositive) ? max : undefined;
153
141
  let minusSymbol;
154
142
  let inputValue = (0, _fieldValueFormatters.getSafelyValue)(value);
155
-
156
143
  const checkMin = () => {
157
144
  var _minusSymbol;
158
-
159
145
  if (!inputValue && isNoEmptyValues) inputValue = minimum !== undefined ? minimum : "0";else if (inputValue && !Number.isNaN(Number(minimum)) && Number(minimum) > Number(((_minusSymbol = minusSymbol) !== null && _minusSymbol !== void 0 ? _minusSymbol : "") + inputValue)) inputValue = minimum;
160
146
  };
161
-
162
147
  const checkMax = () => {
163
148
  var _minusSymbol2;
164
-
165
149
  if (!Number.isNaN(Number(maximum)) && Number(maximum) < Number(((_minusSymbol2 = minusSymbol) !== null && _minusSymbol2 !== void 0 ? _minusSymbol2 : "") + inputValue)) {
166
150
  inputValue = maximum;
167
151
  minusSymbol = null;
168
152
  }
169
153
  };
170
-
171
154
  if (isUseBitDepthPoints) inputValue = (0, _fieldValueFormatters.formatToRemoveComa)(inputValue);
172
-
173
155
  if (!isOnlyPositive && inputValue[0] === "-") {
174
156
  minusSymbol = "-";
175
157
  inputValue = inputValue.slice(1);
176
158
  }
177
-
178
159
  inputValue = (0, _fieldValueFormatters.filterNumeric)(inputValue, onlyNumbers);
179
-
180
160
  switch (correctionType) {
181
161
  case "min":
182
162
  checkMin();
183
163
  break;
184
-
185
164
  case "max":
186
165
  checkMax();
187
166
  break;
188
-
189
167
  default:
190
168
  checkMin();
191
169
  checkMax();
192
170
  break;
193
171
  }
194
-
195
172
  return inputValue;
196
173
  },
197
174
  processPseudoValue: (newValue, oldValue) => {
198
- const insertedPart = newValue.replace(new RegExp(HIDE_SYMBOL, "g"), ""); //? Если insertedPart.length > 1, то это точно копи-паст
199
- //? По договоренности любой копипаст заменяет текущее велью
175
+ const insertedPart = newValue.replace(new RegExp(HIDE_SYMBOL, "g"), "");
200
176
 
177
+ //? Если insertedPart.length > 1, то это точно копи-паст
178
+ //? По договоренности любой копипаст заменяет текущее велью
201
179
  if (insertedPart.length > 1) return insertedPart;
202
180
  const isOldValueHasBeenReduced = newValue.replace(new RegExp(/^HIDE_SYMBOL/g), "").length < oldValue.length;
203
181
  const oldValueArr = oldValue.split("");
204
-
205
182
  const getIsInclude = idx => {
206
- const BACKSPACE_CODE = 8; //? Если позиции не равны, значит была выделена область, значит будем воспринимать как копи-паст
183
+ const BACKSPACE_CODE = 8;
207
184
 
208
- if (keyDownData.start !== keyDownData.end) return false; //? Если позиции равны и есть вставляемое значение - обрезаем "хвост"
185
+ //? Если позиции не равны, значит была выделена область, значит будем воспринимать как копи-паст
186
+ if (keyDownData.start !== keyDownData.end) return false;
209
187
 
210
- if (insertedPart) return idx < keyDownData.start; //? Если позиции равны и нет вставляемого значения - значит симвовол удалили
188
+ //? Если позиции равны и есть вставляемое значение - обрезаем "хвост"
189
+ if (insertedPart) return idx < keyDownData.start;
211
190
 
191
+ //? Если позиции равны и нет вставляемого значения - значит симвовол удалили
212
192
  return keyDownData.keyCode === BACKSPACE_CODE ? idx < keyDownData.start - 1 || idx > keyDownData.end - 1 : idx < keyDownData.start || idx > keyDownData.end;
213
193
  };
214
-
215
194
  if (!insertedPart) return oldValueArr.reduce((acc, sym, idx) => getIsInclude(idx) ? "".concat(acc).concat(sym) : acc, "");
216
195
  const outputStructure = oldValueArr.reduce((acc, sym, idx) => {
217
196
  if (getIsInclude(idx)) acc.result = "".concat(acc.result).concat(sym);else if (!acc.position) acc.position = insertedPart ? idx : idx - 1;
@@ -225,7 +204,6 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
225
204
  },
226
205
  change: e => {
227
206
  var _minusSymbol3;
228
-
229
207
  const {
230
208
  isOnlyPositive
231
209
  } = (0, _utils.getIsOnlyAnObject)(onlyNumbers) ? onlyNumbers : {};
@@ -234,12 +212,10 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
234
212
  if (isPseudoPasswordMode) inputValue = inputValue.includes(HIDE_SYMBOL) ? handle.processPseudoValue(inputValue, value, e) : inputValue;
235
213
  if (isUseBitDepthPoints) inputValue = (0, _fieldValueFormatters.formatToRemoveComa)(inputValue);
236
214
  if (onlyNumbers) inputValue = inputValue.replace(/,/g, ".");
237
-
238
215
  if (onlyNumbers && !isOnlyPositive && inputValue[0] === "-") {
239
216
  minusSymbol = "-";
240
217
  inputValue = inputValue.slice(1);
241
218
  }
242
-
243
219
  if (!isNotValidateASCII) inputValue = (0, _fieldValueFormatters.formatToOnlyASCIICodeText)(inputValue);
244
220
  if (symbolsLimit && inputValue.length > Number(symbolsLimit)) inputValue = inputValue.substring(0, Number(symbolsLimit));
245
221
  if (isCropFirstNool && inputValue[0] == 0) return "";else if (onlyNumbers) inputValue = handle.correctMinMax(inputValue, "max");
@@ -259,15 +235,14 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
259
235
  if (trimEnd) inputValue = inputValue.replace(new RegExp("[".concat(characters, "]+$")), "");
260
236
  if (value !== inputValue) onChange(inputValue);
261
237
  setIsFocused(false);
262
- setEditing(false); // использую setTimeout для того чтоб прошли переназначения велью, если они есть,
238
+ setEditing(false);
239
+ // использую setTimeout для того чтоб прошли переназначения велью, если они есть,
263
240
  // для того, чтоб верхний onBlur при обращении к e.target.value получал обновленное велью
264
-
265
241
  if (onBlur) setTimeout(() => onBlur(e), 0);
266
242
  },
267
243
  keyDown: e => {
268
244
  var _e$target;
269
-
270
- setPreviousValue(e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
245
+ setPreviousValue(e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
271
246
  setKeyDownData({
272
247
  start: e.target.selectionStart,
273
248
  end: e.target.selectionEnd,
@@ -297,14 +272,12 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
297
272
  const currentSet = changedValue === null || changedValue === void 0 ? void 0 : changedValue.replace(samePart, "");
298
273
  if (!_index.KEYBOARD_SERVICE_KEYS.includes(e.key) && changedValue === previousValue) setIsAttemptToChange(!(!differencesLength && e.key === currentSet));
299
274
  }
300
-
301
275
  onKeyUp(e.keyCode, e);
302
276
  }
303
277
  };
304
278
  (0, _react.useEffect)(() => {
305
279
  var _inputRef$current, _inputRef$current$foc;
306
-
307
- if (isEditing) inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : (_inputRef$current$foc = _inputRef$current.focus) === null || _inputRef$current$foc === void 0 ? void 0 : _inputRef$current$foc.call(_inputRef$current);
280
+ if (isEditing) inputRef === null || inputRef === void 0 || (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || (_inputRef$current$foc = _inputRef$current.focus) === null || _inputRef$current$foc === void 0 || _inputRef$current$foc.call(_inputRef$current);
308
281
  }, [isEditing, isFocused]);
309
282
  (0, _react.useEffect)(() => {
310
283
  setEditing(isSelect !== null && isSelect !== void 0 ? isSelect : false);
@@ -322,23 +295,18 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
322
295
  if (inputRef !== null && inputRef !== void 0 && inputRef.current && typeof isFocusDefault === "boolean") setIsFocused(isFocusDefault);
323
296
  setEditing(isFocusDefault);
324
297
  }, [inputRef, isFocusDefault]);
325
-
326
298
  const getInputType = () => {
327
299
  if (isPriceInput || isPseudoPasswordMode) return "text";
328
300
  return type;
329
301
  };
330
-
331
302
  const formatedValue = (() => {
332
303
  let safelyValue = (0, _fieldValueFormatters.getSafelyValue)(value);
333
-
334
304
  const hideSymbols = () => safelyValue.split("").map(() => HIDE_SYMBOL).join("");
335
-
336
305
  if (isPseudoPasswordMode) return hideSymbols();
337
306
  if (onlyNumbers !== null && onlyNumbers !== void 0 && onlyNumbers.isNoEmptyValues) safelyValue = handle.correctMinMax(safelyValue, "min");
338
307
  if (isUseBitDepthPoints) safelyValue = (0, _fieldValueFormatters.formatToAddBitDepthPoints)(safelyValue, onlyNumbers);
339
308
  return safelyValue;
340
309
  })();
341
-
342
310
  const uniProps = {
343
311
  name: inputName,
344
312
  className: (0, _classnames.default)("input", className, {
@@ -392,6 +360,4 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
392
360
  size: "small"
393
361
  }));
394
362
  });
395
-
396
- var _default = Input;
397
- exports.default = _default;
363
+ var _default = exports.default = Input;
@@ -1,30 +1,19 @@
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 = _interopRequireWildcard(require("react"));
11
-
12
9
  var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
10
  var _momentTimezone = _interopRequireDefault(require("moment-timezone"));
15
-
16
11
  var _reactInputMask = _interopRequireDefault(require("react-input-mask"));
17
-
18
12
  var _useClickOutside = require("../../../Functions/useClickOutside");
19
-
20
13
  var _Calendar = _interopRequireDefault(require("../Calendar/Calendar"));
21
-
22
14
  require("./InputCalendar.scss");
23
-
24
- 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); }
25
-
26
- 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; }
27
-
15
+ 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); }
16
+ 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; }
28
17
  const InputCalendar = _ref => {
29
18
  let {
30
19
  value,
@@ -53,64 +42,50 @@ const InputCalendar = _ref => {
53
42
  const momentMinDate = (0, _momentTimezone.default)(formattedMinDate, format).startOf("day");
54
43
  const momentMaxDate = (0, _momentTimezone.default)(formattedMaxDate, format).startOf("day");
55
44
  (0, _useClickOutside.useClickOutside)(calendarRef, () => setIsOpened(false));
56
-
57
45
  const changeInputValue = val => {
58
46
  if (onChange) onChange(val);
59
47
  };
60
-
61
48
  const changeCalendarDay = val => {
62
49
  if (onChange) onChange(val);
63
50
  };
64
-
65
51
  const getCalendarValue = value => {
66
52
  const date = (0, _momentTimezone.default)(value).format("L");
67
53
  if (date !== "Invalid date") return date;
68
54
  return (0, _momentTimezone.default)(new Date()).format("L");
69
55
  };
70
-
71
56
  (0, _react.useEffect)(() => {
72
57
  if (typeof isOpened === "boolean" && !isOpened) {
73
58
  handleBlur();
74
59
  }
75
60
  }, [isOpened]);
76
-
77
61
  const handleBlur = e => {
78
62
  var _inputRef$current;
79
-
80
- let value = inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value;
63
+ let value = inputRef === null || inputRef === void 0 || (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value;
81
64
  if ((0, _momentTimezone.default)(value, format).format(format) === "Invalid date" || value.indexOf("_") > -1) value = "";
82
65
  if (value && typeof isOpened === "boolean" && (0, _momentTimezone.default)(value, format).startOf("day").isBefore(momentMinDate, "days")) onChange(formattedMinDate);else if (value && typeof isOpened === "boolean" && (0, _momentTimezone.default)(value, format).endOf("day").isAfter(momentMaxDate, "days")) onChange(formattedMaxDate);else if (value) onChange((0, _momentTimezone.default)(value, format).format(format));
83
66
  };
84
-
85
67
  const onKeyDown = e => {
86
68
  if (isOpened && [9, 13].includes(e.keyCode)) {
87
69
  setIsOpened(false);
88
70
  setOpenedByEnter(true);
89
71
  }
90
-
91
72
  onKeyDownProp(e);
92
73
  };
93
-
94
74
  const onKeyUp = e => {
95
75
  var _e$target$value;
96
-
97
76
  const isValidLenght = ((_e$target$value = e.target.value) === null || _e$target$value === void 0 ? void 0 : _e$target$value.replace(/[^0-9]/g, "").length) === 8;
98
-
99
77
  if ([9, 13].includes(e.keyCode)) {
100
78
  setIsOpened(true);
101
79
  setOpenedByEnter(true);
102
80
  }
103
-
104
81
  if (isValidLenght) {
105
82
  setIsOpened(false);
106
83
  handleBlur();
107
84
  } else {
108
85
  setIsOpened(true);
109
86
  }
110
-
111
87
  onKeyUpProp(e);
112
88
  };
113
-
114
89
  return /*#__PURE__*/_react.default.createElement("div", {
115
90
  "data-testid": "inputCalendar--key-".concat(testId, "--container"),
116
91
  className: (0, _classnames.default)("input__wrap calendar-container", className, {
@@ -144,6 +119,4 @@ const InputCalendar = _ref => {
144
119
  setIsOpened: setIsOpened
145
120
  }) : null);
146
121
  };
147
-
148
- var _default = InputCalendar;
149
- exports.default = _default;
122
+ var _default = exports.default = InputCalendar;