intelicoreact 1.3.19 → 1.3.21

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 (252) hide show
  1. package/dist/Atomic/FormElements/ActionAlert/ActionAlert.js +23 -15
  2. package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +23 -15
  3. package/dist/Atomic/FormElements/Calendar/Calendar.js +124 -69
  4. package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +36 -27
  5. package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +39 -23
  6. package/dist/Atomic/FormElements/Datepicker/Datepicker.js +246 -110
  7. package/dist/Atomic/FormElements/Datepicker/components/Calendar.js +85 -44
  8. package/dist/Atomic/FormElements/Dropdown/Dropdown.js +414 -246
  9. package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +9 -5
  10. package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +165 -93
  11. package/dist/Atomic/FormElements/FileLoader/FileLoader.js +64 -39
  12. package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +132 -51
  13. package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +73 -34
  14. package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +75 -54
  15. package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +110 -67
  16. package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +83 -33
  17. package/dist/Atomic/FormElements/Input/Input.js +253 -161
  18. package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +102 -48
  19. package/dist/Atomic/FormElements/InputColor/InputColor.js +40 -27
  20. package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +58 -28
  21. package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +176 -108
  22. package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +57 -32
  23. package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +302 -184
  24. package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +157 -85
  25. package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +16 -11
  26. package/dist/Atomic/FormElements/InputDateRange/dependencies.js +193 -76
  27. package/dist/Atomic/FormElements/InputLink/InputLink.js +58 -34
  28. package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +12 -8
  29. package/dist/Atomic/FormElements/InputMask/InputMask.js +964 -554
  30. package/dist/Atomic/FormElements/InputMask/config.js +1 -1
  31. package/dist/Atomic/FormElements/InputMask/functions.js +43 -17
  32. package/dist/Atomic/FormElements/InputMask2/InputMask2.js +404 -268
  33. package/dist/Atomic/FormElements/InputMask2/config.js +1 -1
  34. package/dist/Atomic/FormElements/InputMask2/functions.js +43 -17
  35. package/dist/Atomic/FormElements/InputMask3/InputMask3.js +459 -299
  36. package/dist/Atomic/FormElements/InputMask3/config.js +1 -1
  37. package/dist/Atomic/FormElements/InputMask3/functions.js +43 -17
  38. package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +113 -53
  39. package/dist/Atomic/FormElements/InputsRow/InputsRow.js +118 -64
  40. package/dist/Atomic/FormElements/Label/Label.js +23 -13
  41. package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +349 -217
  42. package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +47 -25
  43. package/dist/Atomic/FormElements/NumericInput/NumericInput.js +207 -133
  44. package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +61 -29
  45. package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +42 -20
  46. package/dist/Atomic/FormElements/RadioInput/RadioInput.js +33 -22
  47. package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +43 -20
  48. package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +101 -54
  49. package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +102 -59
  50. package/dist/Atomic/FormElements/RangeList/RangeList.js +150 -89
  51. package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +29 -23
  52. package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +300 -135
  53. package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +571 -381
  54. package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +24 -14
  55. package/dist/Atomic/FormElements/Switcher/Switcher.js +29 -24
  56. package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +47 -25
  57. package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +32 -20
  58. package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +55 -32
  59. package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +42 -22
  60. package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +33 -23
  61. package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +120 -51
  62. package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +3 -2
  63. package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +46 -23
  64. package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +417 -253
  65. package/dist/Atomic/FormElements/Text/Text.js +53 -47
  66. package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +31 -21
  67. package/dist/Atomic/FormElements/Textarea/Textarea.js +27 -16
  68. package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +128 -68
  69. package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +36 -25
  70. package/dist/Atomic/FormElements/TimeRange/TimeRange.js +70 -33
  71. package/dist/Atomic/FormElements/UserContacts/UserContacts.js +124 -58
  72. package/dist/Atomic/FormElements/UserContacts/partial/defaultIcons.js +91 -0
  73. package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +80 -48
  74. package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +42 -32
  75. package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +60 -40
  76. package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +3 -2
  77. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +69 -50
  78. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +3 -3
  79. package/dist/Atomic/Layout/Header/Header.js +48 -21
  80. package/dist/Atomic/Layout/MainMenu/MainMenu.js +79 -36
  81. package/dist/Atomic/Layout/Spinner/Spinner.js +14 -8
  82. package/dist/Atomic/UI/Accordion/Accordion.js +48 -18
  83. package/dist/Atomic/UI/Accordion/AccordionItem.js +60 -35
  84. package/dist/Atomic/UI/AccordionTable/AccordionTable.js +106 -49
  85. package/dist/Atomic/UI/AccordionText/AccordionText.js +37 -13
  86. package/dist/Atomic/UI/AdvancedTag/AdvTag.js +94 -48
  87. package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +50 -22
  88. package/dist/Atomic/UI/Alert/Alert.js +44 -20
  89. package/dist/Atomic/UI/Arrow/Arrow.js +35 -15
  90. package/dist/Atomic/UI/Box/Box.js +21 -14
  91. package/dist/Atomic/UI/Button/Button.js +35 -26
  92. package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +31 -22
  93. package/dist/Atomic/UI/Chart/Chart.js +86 -45
  94. package/dist/Atomic/UI/Chart/partial/Chart.constants.js +24 -14
  95. package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +22 -13
  96. package/dist/Atomic/UI/Chart/partial/datasetSetters.js +113 -68
  97. package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +140 -158
  98. package/dist/Atomic/UI/Chart/partial/optionsSetters.js +42 -26
  99. package/dist/Atomic/UI/Chart/partial/utils.js +48 -20
  100. package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +42 -22
  101. package/dist/Atomic/UI/DateTime/DateTime.js +38 -23
  102. package/dist/Atomic/UI/DebugContainer/DebugContainer.js +36 -12
  103. package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +21 -5
  104. package/dist/Atomic/UI/DoubleString/DoubleString.js +50 -27
  105. package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +63 -15
  106. package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +157 -62
  107. package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +110 -47
  108. package/dist/Atomic/UI/Hint/Hint.js +94 -49
  109. package/dist/Atomic/UI/Modal/Modal.js +179 -149
  110. package/dist/Atomic/UI/Modal/ModalHOC.js +21 -12
  111. package/dist/Atomic/UI/Modal/partials/ModalFooter.js +12 -7
  112. package/dist/Atomic/UI/Modal/partials/ModalTitle.js +21 -17
  113. package/dist/Atomic/UI/Modal/partials/useMobileModal.js +167 -94
  114. package/dist/Atomic/UI/ModalBackup/Modal.js +90 -65
  115. package/dist/Atomic/UI/ModalBackup/ModalHOC.js +21 -12
  116. package/dist/Atomic/UI/ModalBackup/partials/ModalFooter.js +11 -6
  117. package/dist/Atomic/UI/ModalBackup/partials/ModalTitle.js +19 -15
  118. package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +62 -32
  119. package/dist/Atomic/UI/NavLine/NavLine.js +211 -120
  120. package/dist/Atomic/UI/NavLine/Tabs.js +3 -2
  121. package/dist/Atomic/UI/PageTitle/PageTitle.js +17 -13
  122. package/dist/Atomic/UI/PieChart/PieChart.js +21 -11
  123. package/dist/Atomic/UI/Price/Price.js +13 -10
  124. package/dist/Atomic/UI/PriceRange/PriceRange.js +11 -7
  125. package/dist/Atomic/UI/ProgressLine/ProgressLine.js +56 -27
  126. package/dist/Atomic/UI/Status/Status.js +30 -19
  127. package/dist/Atomic/UI/Table/Partials/TdCell.js +71 -28
  128. package/dist/Atomic/UI/Table/Partials/TdHeader.js +16 -7
  129. package/dist/Atomic/UI/Table/Partials/TdRow.js +65 -29
  130. package/dist/Atomic/UI/Table/Partials/TdTitle.js +40 -16
  131. package/dist/Atomic/UI/Table/Table.js +47 -27
  132. package/dist/Atomic/UI/Table/TdTypes/TdActions.js +48 -18
  133. package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +19 -9
  134. package/dist/Atomic/UI/Table/TdTypes/TdRange.js +8 -5
  135. package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +47 -25
  136. package/dist/Atomic/UI/Tag/Tag.js +48 -20
  137. package/dist/Atomic/UI/TagList/TagList.js +150 -80
  138. package/dist/Atomic/UI/UserBox/UserBox.js +26 -14
  139. package/dist/Classes/AbortableFetch.js +422 -283
  140. package/dist/Classes/AnimatedHandler.js +56 -44
  141. package/dist/Classes/RESTAPI/index.js +433 -154
  142. package/dist/Classes/RESTAPI/partials/AbortableFetch.js +428 -290
  143. package/dist/Classes/RESTAPI/partials/ApiBase.js +67 -24
  144. package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +275 -57
  145. package/dist/Classes/RESTAPI/partials/ApiUtils.js +377 -146
  146. package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +403 -155
  147. package/dist/Classes/RESTAPI/partials/Utils.js +135 -81
  148. package/dist/Classes/RESTAPI/partials/_outerDependencies.js +6 -2
  149. package/dist/Classes/RESTAPI/partials/_utils.js +395 -101
  150. package/dist/Constants/index.constants.js +15 -8
  151. package/dist/Functions/Portal.js +33 -14
  152. package/dist/Functions/customEventListener.js +20 -5
  153. package/dist/Functions/fieldValueFormatters.js +211 -148
  154. package/dist/Functions/hooks/useFormFieldsChangesManager.js +137 -75
  155. package/dist/Functions/locale/createTranslator.js +27 -13
  156. package/dist/Functions/operations.js +49 -35
  157. package/dist/Functions/presets/inputMaskPresets.js +27 -25
  158. package/dist/Functions/presets/inputPresets.js +22 -19
  159. package/dist/Functions/presets/mobileKeyboardTypesPresets.js +9 -7
  160. package/dist/Functions/schemas.js +15 -6
  161. package/dist/Functions/useClickOutside.js +7 -3
  162. package/dist/Functions/useDebounce.js +25 -11
  163. package/dist/Functions/useFieldFocus.js +67 -42
  164. package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +54 -35
  165. package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +95 -74
  166. package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +91 -55
  167. package/dist/Functions/useFormTools/functions/General.js +99 -80
  168. package/dist/Functions/useFormTools/functions/RenderFields.js +72 -45
  169. package/dist/Functions/useFormTools/functions/usePrevious.js +7 -3
  170. package/dist/Functions/useFormTools/index.js +598 -382
  171. package/dist/Functions/useInputHighlightError.js +52 -27
  172. package/dist/Functions/useIsMobile.js +36 -13
  173. package/dist/Functions/useLocalStorage.js +22 -7
  174. package/dist/Functions/useLocationParams.js +27 -16
  175. package/dist/Functions/useMetaInfo.js +50 -19
  176. package/dist/Functions/useMouseUpOutside.js +5 -2
  177. package/dist/Functions/useOnlineStatus.js +26 -7
  178. package/dist/Functions/usePasswordChecker.js +77 -42
  179. package/dist/Functions/usePrevious.js +7 -3
  180. package/dist/Functions/useResize.js +32 -12
  181. package/dist/Functions/useScrollTo.js +20 -6
  182. package/dist/Functions/useToggle.js +30 -10
  183. package/dist/Functions/utils.js +366 -186
  184. package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +32 -21
  185. package/dist/Molecular/CustomIcons/components/AlertCircle.js +32 -21
  186. package/dist/Molecular/CustomIcons/components/AppStore.js +36 -25
  187. package/dist/Molecular/CustomIcons/components/Arrow.js +42 -31
  188. package/dist/Molecular/CustomIcons/components/ArrowDown.js +24 -13
  189. package/dist/Molecular/CustomIcons/components/ArrowLeft.js +27 -16
  190. package/dist/Molecular/CustomIcons/components/ArrowRight.js +27 -16
  191. package/dist/Molecular/CustomIcons/components/ArrowUp.js +24 -13
  192. package/dist/Molecular/CustomIcons/components/Bell.js +22 -11
  193. package/dist/Molecular/CustomIcons/components/Button.js +22 -11
  194. package/dist/Molecular/CustomIcons/components/Campaigns.js +23 -12
  195. package/dist/Molecular/CustomIcons/components/Check.js +23 -12
  196. package/dist/Molecular/CustomIcons/components/Check2.js +22 -11
  197. package/dist/Molecular/CustomIcons/components/ChevronDown.js +22 -11
  198. package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +22 -11
  199. package/dist/Molecular/CustomIcons/components/ChevronLeft.js +22 -11
  200. package/dist/Molecular/CustomIcons/components/ChevronRight.js +22 -11
  201. package/dist/Molecular/CustomIcons/components/ChevronUp.js +22 -11
  202. package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +37 -26
  203. package/dist/Molecular/CustomIcons/components/Close.js +24 -13
  204. package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +49 -38
  205. package/dist/Molecular/CustomIcons/components/Delete.js +23 -12
  206. package/dist/Molecular/CustomIcons/components/Edit.js +22 -11
  207. package/dist/Molecular/CustomIcons/components/Email.js +40 -29
  208. package/dist/Molecular/CustomIcons/components/FinturfLogo.js +30 -19
  209. package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +38 -27
  210. package/dist/Molecular/CustomIcons/components/Flows.js +22 -11
  211. package/dist/Molecular/CustomIcons/components/Gift.js +27 -16
  212. package/dist/Molecular/CustomIcons/components/GoogleAuth.js +36 -25
  213. package/dist/Molecular/CustomIcons/components/GooglePlay.js +36 -25
  214. package/dist/Molecular/CustomIcons/components/HelpCircle.js +25 -14
  215. package/dist/Molecular/CustomIcons/components/HelpCircle2.js +26 -15
  216. package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +25 -14
  217. package/dist/Molecular/CustomIcons/components/Home.js +25 -14
  218. package/dist/Molecular/CustomIcons/components/Home2.js +28 -17
  219. package/dist/Molecular/CustomIcons/components/Key.js +30 -19
  220. package/dist/Molecular/CustomIcons/components/Landers.js +26 -15
  221. package/dist/Molecular/CustomIcons/components/Lock.js +22 -11
  222. package/dist/Molecular/CustomIcons/components/Mail.js +30 -19
  223. package/dist/Molecular/CustomIcons/components/Mastercard.js +72 -61
  224. package/dist/Molecular/CustomIcons/components/Minus.js +35 -24
  225. package/dist/Molecular/CustomIcons/components/Offers.js +23 -12
  226. package/dist/Molecular/CustomIcons/components/Pause.js +35 -24
  227. package/dist/Molecular/CustomIcons/components/PayPal.js +49 -38
  228. package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +36 -25
  229. package/dist/Molecular/CustomIcons/components/Phone.js +37 -26
  230. package/dist/Molecular/CustomIcons/components/Play.js +35 -24
  231. package/dist/Molecular/CustomIcons/components/Plus.js +35 -24
  232. package/dist/Molecular/CustomIcons/components/Profile.js +27 -16
  233. package/dist/Molecular/CustomIcons/components/QRCode.js +37 -26
  234. package/dist/Molecular/CustomIcons/components/Rectangle.js +22 -11
  235. package/dist/Molecular/CustomIcons/components/Revert.js +25 -14
  236. package/dist/Molecular/CustomIcons/components/Star.js +21 -10
  237. package/dist/Molecular/CustomIcons/components/Star2.js +23 -12
  238. package/dist/Molecular/CustomIcons/components/TrafficSources.js +25 -14
  239. package/dist/Molecular/CustomIcons/components/Trash.js +22 -11
  240. package/dist/Molecular/CustomIcons/components/TrashRed.js +22 -11
  241. package/dist/Molecular/CustomIcons/components/Triggers.js +22 -11
  242. package/dist/Molecular/CustomIcons/components/User.js +27 -16
  243. package/dist/Molecular/CustomIcons/components/Visa.js +38 -27
  244. package/dist/Molecular/CustomIcons/components/X.js +22 -11
  245. package/dist/Molecular/CustomIcons/index.js +183 -61
  246. package/dist/Molecular/FormElement/FormElement.js +27 -18
  247. package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +108 -86
  248. package/dist/Molecular/FormWithDependOn/partials/_utils.js +34 -29
  249. package/dist/Molecular/InputAddress/InputAddress.js +312 -176
  250. package/dist/Molecular/InputPassword/InputPassword.js +39 -15
  251. package/dist/index.js +3 -1
  252. package/package.json +1 -1
@@ -1,184 +1,248 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
4
7
  Object.defineProperty(exports, "__esModule", {
5
8
  value: true
6
9
  });
7
10
  exports.default = void 0;
11
+
12
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
+
8
14
  var _react = _interopRequireWildcard(require("react"));
15
+
9
16
  var _moment = _interopRequireDefault(require("moment"));
17
+
10
18
  require("./MobileCalendar.scss");
19
+
11
20
  var _reactFeather = require("react-feather");
12
- 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); }
13
- 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; }
21
+
22
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
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
26
  require('../../../Functions/customEventListener');
15
- const MobileCalendar = _ref => {
16
- let {
17
- min = (0, _moment.default)().subtract('10', 'years'),
18
- max = (0, _moment.default)().add('10', 'years'),
19
- value = (0, _moment.default)(),
20
- rows = 5,
21
- label = '',
22
- timeout = 75,
23
- isMobile = true,
24
- showSelectedDate = false,
25
- listItemHeight = 32,
26
- classes = {
27
- wrapper: '',
28
- label: '',
29
- body: '',
30
- yearsBlock: '',
31
- yearsList: '',
32
- yearsListItem: '',
33
- monthsBlock: '',
34
- monthsList: '',
35
- monthsListItem: '',
36
- daysBlock: '',
37
- daysList: '',
38
- daysListItem: '',
39
- prevItem: '',
40
- nextItem: '',
41
- activeItem: ''
42
- },
43
- onChange = () => {},
44
- onMinDateReached = () => {},
45
- onMaxDateReached = () => {}
46
- } = _ref;
47
- const Body = document.querySelector('body');
48
- const listItem = document.querySelector('.mobile-calendar_wrapper_body_months-list--item');
49
- const [date, setDate] = (0, _react.useState)(value ? (0, _moment.default)(value) : (0, _moment.default)());
50
- const [minDate, setMinDate] = (0, _react.useState)((0, _moment.default)(min));
51
- const [maxDate, setMaxDate] = (0, _react.useState)((0, _moment.default)(max));
52
- const [isMouseDown, setIsMouseDown] = (0, _react.useState)(false);
53
- const [mouseDownOn, setMouseDownOn] = (0, _react.useState)(null);
54
- const [changeInterval, setChangeInterval] = (0, _react.useState)(null);
55
- const [touchY, setTouchY] = (0, _react.useState)(null);
56
- const [touchType, setTouchType] = (0, _react.useState)(null);
57
- const [touchTimestamp, setTouchTimestamp] = (0, _react.useState)(null);
58
- const [scrollDirection, setScrollDirection] = (0, _react.useState)(0);
59
- const monthsListRef = (0, _react.useRef)(null);
60
- const daysListRef = (0, _react.useRef)(null);
61
- const yearsListRef = (0, _react.useRef)(null);
62
- const dateRef = (0, _react.useRef)(null);
63
- const intervalRef = (0, _react.useRef)(null);
64
-
65
- //--HANDLERS--//
66
- const changeItem = (type, value) => {
27
+
28
+ var MobileCalendar = function MobileCalendar(_ref) {
29
+ var _ref$min = _ref.min,
30
+ min = _ref$min === void 0 ? (0, _moment.default)().subtract('10', 'years') : _ref$min,
31
+ _ref$max = _ref.max,
32
+ max = _ref$max === void 0 ? (0, _moment.default)().add('10', 'years') : _ref$max,
33
+ _ref$value = _ref.value,
34
+ value = _ref$value === void 0 ? (0, _moment.default)() : _ref$value,
35
+ _ref$rows = _ref.rows,
36
+ rows = _ref$rows === void 0 ? 5 : _ref$rows,
37
+ _ref$label = _ref.label,
38
+ label = _ref$label === void 0 ? '' : _ref$label,
39
+ _ref$timeout = _ref.timeout,
40
+ timeout = _ref$timeout === void 0 ? 75 : _ref$timeout,
41
+ _ref$isMobile = _ref.isMobile,
42
+ isMobile = _ref$isMobile === void 0 ? true : _ref$isMobile,
43
+ _ref$showSelectedDate = _ref.showSelectedDate,
44
+ showSelectedDate = _ref$showSelectedDate === void 0 ? false : _ref$showSelectedDate,
45
+ _ref$listItemHeight = _ref.listItemHeight,
46
+ listItemHeight = _ref$listItemHeight === void 0 ? 32 : _ref$listItemHeight,
47
+ _ref$classes = _ref.classes,
48
+ classes = _ref$classes === void 0 ? {
49
+ wrapper: '',
50
+ label: '',
51
+ body: '',
52
+ yearsBlock: '',
53
+ yearsList: '',
54
+ yearsListItem: '',
55
+ monthsBlock: '',
56
+ monthsList: '',
57
+ monthsListItem: '',
58
+ daysBlock: '',
59
+ daysList: '',
60
+ daysListItem: '',
61
+ prevItem: '',
62
+ nextItem: '',
63
+ activeItem: ''
64
+ } : _ref$classes,
65
+ _ref$onChange = _ref.onChange,
66
+ onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
67
+ _ref$onMinDateReached = _ref.onMinDateReached,
68
+ onMinDateReached = _ref$onMinDateReached === void 0 ? function () {} : _ref$onMinDateReached,
69
+ _ref$onMaxDateReached = _ref.onMaxDateReached,
70
+ onMaxDateReached = _ref$onMaxDateReached === void 0 ? function () {} : _ref$onMaxDateReached;
71
+ var Body = document.querySelector('body');
72
+ var listItem = document.querySelector('.mobile-calendar_wrapper_body_months-list--item');
73
+
74
+ var _useState = (0, _react.useState)(value ? (0, _moment.default)(value) : (0, _moment.default)()),
75
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
76
+ date = _useState2[0],
77
+ setDate = _useState2[1];
78
+
79
+ var _useState3 = (0, _react.useState)((0, _moment.default)(min)),
80
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
81
+ minDate = _useState4[0],
82
+ setMinDate = _useState4[1];
83
+
84
+ var _useState5 = (0, _react.useState)((0, _moment.default)(max)),
85
+ _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
86
+ maxDate = _useState6[0],
87
+ setMaxDate = _useState6[1];
88
+
89
+ var _useState7 = (0, _react.useState)(false),
90
+ _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
91
+ isMouseDown = _useState8[0],
92
+ setIsMouseDown = _useState8[1];
93
+
94
+ var _useState9 = (0, _react.useState)(null),
95
+ _useState10 = (0, _slicedToArray2.default)(_useState9, 2),
96
+ mouseDownOn = _useState10[0],
97
+ setMouseDownOn = _useState10[1];
98
+
99
+ var _useState11 = (0, _react.useState)(null),
100
+ _useState12 = (0, _slicedToArray2.default)(_useState11, 2),
101
+ changeInterval = _useState12[0],
102
+ setChangeInterval = _useState12[1];
103
+
104
+ var _useState13 = (0, _react.useState)(null),
105
+ _useState14 = (0, _slicedToArray2.default)(_useState13, 2),
106
+ touchY = _useState14[0],
107
+ setTouchY = _useState14[1];
108
+
109
+ var _useState15 = (0, _react.useState)(null),
110
+ _useState16 = (0, _slicedToArray2.default)(_useState15, 2),
111
+ touchType = _useState16[0],
112
+ setTouchType = _useState16[1];
113
+
114
+ var _useState17 = (0, _react.useState)(null),
115
+ _useState18 = (0, _slicedToArray2.default)(_useState17, 2),
116
+ touchTimestamp = _useState18[0],
117
+ setTouchTimestamp = _useState18[1];
118
+
119
+ var _useState19 = (0, _react.useState)(0),
120
+ _useState20 = (0, _slicedToArray2.default)(_useState19, 2),
121
+ scrollDirection = _useState20[0],
122
+ setScrollDirection = _useState20[1];
123
+
124
+ var monthsListRef = (0, _react.useRef)(null);
125
+ var daysListRef = (0, _react.useRef)(null);
126
+ var yearsListRef = (0, _react.useRef)(null);
127
+ var dateRef = (0, _react.useRef)(null);
128
+ var intervalRef = (0, _react.useRef)(null); //--HANDLERS--//
129
+
130
+ var changeItem = function changeItem(type, value) {
67
131
  setScrollDirection(value);
68
- setDate(date => {
69
- const newDate = (0, _moment.default)(date).add(value, type);
132
+ setDate(function (date) {
133
+ var newDate = (0, _moment.default)(date).add(value, type);
70
134
  if ((0, _moment.default)(newDate).isBefore(minDate)) return minDate;
71
135
  if ((0, _moment.default)(newDate).isAfter(maxDate)) return maxDate;
72
136
  return newDate;
73
137
  });
74
- setTimeout(() => {
138
+ setTimeout(function () {
75
139
  setScrollDirection(0);
76
140
  }, 50);
77
141
  };
78
- const checkAvailability = (type, value) => {
142
+
143
+ var checkAvailability = function checkAvailability(type, value) {
79
144
  if (!(dateRef !== null && dateRef !== void 0 && dateRef.current)) return false;
80
- const newDate = (0, _moment.default)(dateRef === null || dateRef === void 0 ? void 0 : dateRef.current).add(value, type);
145
+ var newDate = (0, _moment.default)(dateRef === null || dateRef === void 0 ? void 0 : dateRef.current).add(value, type);
81
146
  if ((0, _moment.default)(newDate).isBefore(minDate)) return false;
82
147
  if ((0, _moment.default)(newDate).isAfter(maxDate)) return false;
83
148
  return true;
84
149
  };
85
- const onArrowMouseDown = (type, value) => {
150
+
151
+ var onArrowMouseDown = function onArrowMouseDown(type, value) {
86
152
  setIsMouseDown(true);
87
153
  setMouseDownOn({
88
- type,
89
- value
154
+ type: type,
155
+ value: value
90
156
  });
91
157
  };
92
- const onArrowMouseUp = () => {
158
+
159
+ var onArrowMouseUp = function onArrowMouseUp() {
93
160
  setIsMouseDown(false);
94
161
  setMouseDownOn(null);
95
162
  };
96
- const onWheel = (e, type) => {
163
+
164
+ var onWheel = function onWheel(e, type) {
97
165
  e.preventDefault();
98
- const {
99
- deltaY
100
- } = e;
101
- const top = window.scrollX;
102
- const left = window.scrollY;
166
+ var deltaY = e.deltaY;
167
+ var top = window.scrollX;
168
+ var left = window.scrollY;
103
169
  window.scrollTo({
104
- top,
105
- left
170
+ top: top,
171
+ left: left
106
172
  });
107
173
  changeItem(type, deltaY < 0 ? -1 : 1);
108
174
  };
109
- const onTouchStart = (e, type) => {
175
+
176
+ var onTouchStart = function onTouchStart(e, type) {
110
177
  e.preventDefault();
178
+
111
179
  if (intervalRef !== null && intervalRef !== void 0 && intervalRef.current) {
112
180
  clearInterval(intervalRef === null || intervalRef === void 0 ? void 0 : intervalRef.current);
113
181
  intervalRef.current = null;
114
182
  }
115
- const {
116
- timeStamp,
117
- changedTouches
118
- } = e;
119
- const {
120
- pageY
121
- } = changedTouches[0];
183
+
184
+ var timeStamp = e.timeStamp,
185
+ changedTouches = e.changedTouches;
186
+ var pageY = changedTouches[0].pageY;
122
187
  setTouchY(pageY);
123
188
  setTouchTimestamp(timeStamp);
124
189
  setTouchType(type);
125
- window.addEventListener('touchend', e => onTouchEnd(e, pageY, timeStamp, type), {
190
+ window.addEventListener('touchend', function (e) {
191
+ return onTouchEnd(e, pageY, timeStamp, type);
192
+ }, {
126
193
  once: true
127
194
  });
128
195
  };
129
- const onTouchMove = e => {
196
+
197
+ var onTouchMove = function onTouchMove(e) {
130
198
  if (!touchY || !touchType) return;
131
- const {
132
- timeStamp,
133
- changedTouches
134
- } = e;
135
- const {
136
- pageY
137
- } = changedTouches[0];
138
- const deltaY = touchY - pageY;
199
+ var timeStamp = e.timeStamp,
200
+ changedTouches = e.changedTouches;
201
+ var pageY = changedTouches[0].pageY;
202
+ var deltaY = touchY - pageY;
139
203
  if (Math.abs(deltaY) < listItemHeight) return;
140
- const direction = deltaY < 0 ? -1 : 1;
204
+ var direction = deltaY < 0 ? -1 : 1;
141
205
  setScrollDirection(direction);
142
206
  changeItem(touchType, direction);
143
207
  setTouchY(pageY);
144
208
  setTouchTimestamp(timeStamp);
145
209
  };
146
- const onTouchEnd = (e, startY, startTime, touchType) => {
147
- const {
148
- timeStamp,
149
- changedTouches
150
- } = e;
151
- const {
152
- pageY
153
- } = changedTouches[0];
154
- const path = Math.abs(startY - pageY); //in px
155
- const time = timeStamp - startTime; //ms
156
- const pxPerMs = path / time;
210
+
211
+ var onTouchEnd = function onTouchEnd(e, startY, startTime, touchType) {
212
+ var timeStamp = e.timeStamp,
213
+ changedTouches = e.changedTouches;
214
+ var pageY = changedTouches[0].pageY;
215
+ var path = Math.abs(startY - pageY); //in px
216
+
217
+ var time = timeStamp - startTime; //ms
218
+
219
+ var pxPerMs = path / time;
157
220
  if (pxPerMs > 0.65) innertionScroll({
158
- startY,
159
- pageY,
160
- timeStamp,
161
- startTime,
162
- touchType
221
+ startY: startY,
222
+ pageY: pageY,
223
+ timeStamp: timeStamp,
224
+ startTime: startTime,
225
+ touchType: touchType
163
226
  });else setTouchType(null);
164
227
  setTouchY(null);
165
228
  };
166
- const innertionScroll = _ref2 => {
167
- let {
168
- startY,
169
- pageY,
170
- timeStamp,
171
- startTime,
172
- touchType
173
- } = _ref2;
174
- const path = Math.abs(startY - pageY); //in px
175
- const time = timeStamp - startTime; //ms
176
- const pxPerMs = Math.ceil(path / time); //speed
177
-
178
- const S = pxPerMs / 2 * time;
179
- const blocks = Math.ceil(S / listItemHeight * pxPerMs);
180
- let i = 1;
181
- intervalRef.current = setInterval(() => {
229
+
230
+ var innertionScroll = function innertionScroll(_ref2) {
231
+ var startY = _ref2.startY,
232
+ pageY = _ref2.pageY,
233
+ timeStamp = _ref2.timeStamp,
234
+ startTime = _ref2.startTime,
235
+ touchType = _ref2.touchType;
236
+ var path = Math.abs(startY - pageY); //in px
237
+
238
+ var time = timeStamp - startTime; //ms
239
+
240
+ var pxPerMs = Math.ceil(path / time); //speed
241
+
242
+ var S = pxPerMs / 2 * time;
243
+ var blocks = Math.ceil(S / listItemHeight * pxPerMs);
244
+ var i = 1;
245
+ intervalRef.current = setInterval(function () {
182
246
  if (checkAvailability(touchType, startY - pageY < 0 ? -1 : 1, date) && i <= blocks) {
183
247
  changeItem(touchType, startY - pageY < 0 ? -1 : 1);
184
248
  } else {
@@ -186,10 +250,9 @@ const MobileCalendar = _ref => {
186
250
  clearInterval(intervalRef === null || intervalRef === void 0 ? void 0 : intervalRef.current);
187
251
  intervalRef.current = null;
188
252
  }
189
- ++i;
190
- }, timeout);
191
253
 
192
- // for(let i = 1; i <= blocks; ++i){
254
+ ++i;
255
+ }, timeout); // for(let i = 1; i <= blocks; ++i){
193
256
  // // timeout = i*pxPerMs+Math.pow(i,2)*10;
194
257
  // timeout += 80;
195
258
  // if(checkAvailability(touchType, startY-pageY < 0 ? -1 : 1, date)){
@@ -198,144 +261,188 @@ const MobileCalendar = _ref => {
198
261
  // changeItem(touchType, startY-pageY < 0 ? -1 : 1);
199
262
  // }, timeout)
200
263
  // }
201
-
202
264
  // }
203
- };
265
+ }; //--FUNCTIONS--//
204
266
 
205
- //--FUNCTIONS--//
206
- const intervalWorker = () => {
267
+
268
+ var intervalWorker = function intervalWorker() {
207
269
  if (!mouseDownOn) return;
208
- const {
209
- type,
210
- value
211
- } = mouseDownOn;
270
+ var type = mouseDownOn.type,
271
+ value = mouseDownOn.value;
212
272
  changeItem(type, value);
213
273
  };
214
- const getList = (type, format) => {
215
- const list = [];
216
- const renderRows = rows;
217
- for (let i = (renderRows - 1) / 2; i >= (renderRows - 1) / 2 * -1; --i) {
274
+
275
+ var getList = function getList(type, format) {
276
+ var list = [];
277
+ var renderRows = rows;
278
+
279
+ for (var i = (renderRows - 1) / 2; i >= (renderRows - 1) / 2 * -1; --i) {
218
280
  list.push((0, _moment.default)(date).subtract(i, type).format(format));
219
281
  }
282
+
220
283
  return list;
221
284
  };
222
- const getMonthList = () => getList('months', 'MMMM');
223
- const getDaysList = () => getList('days', 'D');
224
- const getYearsList = () => getList('years', 'YYYY');
225
285
 
226
- //--OBSERVERS--//
227
- (0, _react.useEffect)(() => {
286
+ var getMonthList = function getMonthList() {
287
+ return getList('months', 'MMMM');
288
+ };
289
+
290
+ var getDaysList = function getDaysList() {
291
+ return getList('days', 'D');
292
+ };
293
+
294
+ var getYearsList = function getYearsList() {
295
+ return getList('years', 'YYYY');
296
+ }; //--OBSERVERS--//
297
+
298
+
299
+ (0, _react.useEffect)(function () {
228
300
  if ((0, _moment.default)(date.format('L')).isBefore(minDate.format('L'))) setDate(minDate);
229
301
  if ((0, _moment.default)(date.format('L')).isAfter(maxDate.format('L'))) setDate(maxDate);
230
- }, []);
302
+ }, []); //Events Observer
231
303
 
232
- //Events Observer
233
- (0, _react.useEffect)(() => {
304
+ (0, _react.useEffect)(function () {
234
305
  document.addEventListener('mouseup', onArrowMouseUp);
235
- return () => {
306
+ return function () {
236
307
  document.removeEventListener('mouseup', onArrowMouseUp);
237
308
  };
238
309
  }, []);
239
- (0, _react.useEffect)(() => {
310
+ (0, _react.useEffect)(function () {
240
311
  onChange(date);
241
312
  dateRef.current = date;
242
313
  if ((0, _moment.default)(date.format('L')).isSame(minDate.format('L'))) onMinDateReached(minDate);
243
314
  if ((0, _moment.default)(date.format('L')).isSame(maxDate.format('L'))) onMaxDateReached(maxDate);
244
- }, [date]);
315
+ }, [date]); //monthList Events
245
316
 
246
- //monthList Events
247
- (0, _react.useEffect)(() => {
317
+ (0, _react.useEffect)(function () {
248
318
  if (monthsListRef !== null && monthsListRef !== void 0 && monthsListRef.current) {
249
319
  var _monthsListRef$curren, _monthsListRef$curren2;
250
- monthsListRef === null || monthsListRef === void 0 || (_monthsListRef$curren = monthsListRef.current) === null || _monthsListRef$curren === void 0 || _monthsListRef$curren.addEventListener('mousewheel', e => onWheel(e, 'months'), {
320
+
321
+ monthsListRef === null || monthsListRef === void 0 ? void 0 : (_monthsListRef$curren = monthsListRef.current) === null || _monthsListRef$curren === void 0 ? void 0 : _monthsListRef$curren.addEventListener('mousewheel', function (e) {
322
+ return onWheel(e, 'months');
323
+ }, {
251
324
  passive: false
252
325
  });
253
- monthsListRef === null || monthsListRef === void 0 || (_monthsListRef$curren2 = monthsListRef.current) === null || _monthsListRef$curren2 === void 0 || _monthsListRef$curren2.addEventListener('touchstart', e => onTouchStart(e, 'months'), {
326
+ monthsListRef === null || monthsListRef === void 0 ? void 0 : (_monthsListRef$curren2 = monthsListRef.current) === null || _monthsListRef$curren2 === void 0 ? void 0 : _monthsListRef$curren2.addEventListener('touchstart', function (e) {
327
+ return onTouchStart(e, 'months');
328
+ }, {
254
329
  passive: false
255
330
  });
256
331
  }
257
- return () => {
332
+
333
+ return function () {
258
334
  var _monthsListRef$curren3, _monthsListRef$curren4;
259
- monthsListRef === null || monthsListRef === void 0 || (_monthsListRef$curren3 = monthsListRef.current) === null || _monthsListRef$curren3 === void 0 || _monthsListRef$curren3.clearEventListeners('mousewheel');
260
- monthsListRef === null || monthsListRef === void 0 || (_monthsListRef$curren4 = monthsListRef.current) === null || _monthsListRef$curren4 === void 0 || _monthsListRef$curren4.clearEventListeners('touchstart');
335
+
336
+ monthsListRef === null || monthsListRef === void 0 ? void 0 : (_monthsListRef$curren3 = monthsListRef.current) === null || _monthsListRef$curren3 === void 0 ? void 0 : _monthsListRef$curren3.clearEventListeners('mousewheel');
337
+ monthsListRef === null || monthsListRef === void 0 ? void 0 : (_monthsListRef$curren4 = monthsListRef.current) === null || _monthsListRef$curren4 === void 0 ? void 0 : _monthsListRef$curren4.clearEventListeners('touchstart');
261
338
  };
262
- }, [monthsListRef]);
339
+ }, [monthsListRef]); //daysList Events
263
340
 
264
- //daysList Events
265
- (0, _react.useEffect)(() => {
341
+ (0, _react.useEffect)(function () {
266
342
  if (daysListRef !== null && daysListRef !== void 0 && daysListRef.current) {
267
343
  var _daysListRef$current, _daysListRef$current2;
268
- daysListRef === null || daysListRef === void 0 || (_daysListRef$current = daysListRef.current) === null || _daysListRef$current === void 0 || _daysListRef$current.addEventListener('mousewheel', e => onWheel(e, 'days'), {
344
+
345
+ daysListRef === null || daysListRef === void 0 ? void 0 : (_daysListRef$current = daysListRef.current) === null || _daysListRef$current === void 0 ? void 0 : _daysListRef$current.addEventListener('mousewheel', function (e) {
346
+ return onWheel(e, 'days');
347
+ }, {
269
348
  passive: false
270
349
  });
271
- daysListRef === null || daysListRef === void 0 || (_daysListRef$current2 = daysListRef.current) === null || _daysListRef$current2 === void 0 || _daysListRef$current2.addEventListener('touchstart', e => onTouchStart(e, 'days'), {
350
+ daysListRef === null || daysListRef === void 0 ? void 0 : (_daysListRef$current2 = daysListRef.current) === null || _daysListRef$current2 === void 0 ? void 0 : _daysListRef$current2.addEventListener('touchstart', function (e) {
351
+ return onTouchStart(e, 'days');
352
+ }, {
272
353
  passive: false
273
354
  });
274
355
  }
275
- return () => {
356
+
357
+ return function () {
276
358
  var _daysListRef$current3, _daysListRef$current4;
277
- daysListRef === null || daysListRef === void 0 || (_daysListRef$current3 = daysListRef.current) === null || _daysListRef$current3 === void 0 || _daysListRef$current3.clearEventListeners('mousewheel');
278
- daysListRef === null || daysListRef === void 0 || (_daysListRef$current4 = daysListRef.current) === null || _daysListRef$current4 === void 0 || _daysListRef$current4.clearEventListeners('touchstart');
359
+
360
+ daysListRef === null || daysListRef === void 0 ? void 0 : (_daysListRef$current3 = daysListRef.current) === null || _daysListRef$current3 === void 0 ? void 0 : _daysListRef$current3.clearEventListeners('mousewheel');
361
+ daysListRef === null || daysListRef === void 0 ? void 0 : (_daysListRef$current4 = daysListRef.current) === null || _daysListRef$current4 === void 0 ? void 0 : _daysListRef$current4.clearEventListeners('touchstart');
279
362
  };
280
- }, [daysListRef]);
363
+ }, [daysListRef]); //yearsList Events
281
364
 
282
- //yearsList Events
283
- (0, _react.useEffect)(() => {
365
+ (0, _react.useEffect)(function () {
284
366
  if (yearsListRef !== null && yearsListRef !== void 0 && yearsListRef.current) {
285
367
  var _yearsListRef$current, _yearsListRef$current2;
286
- yearsListRef === null || yearsListRef === void 0 || (_yearsListRef$current = yearsListRef.current) === null || _yearsListRef$current === void 0 || _yearsListRef$current.addEventListener('mousewheel', e => onWheel(e, 'years'), {
368
+
369
+ yearsListRef === null || yearsListRef === void 0 ? void 0 : (_yearsListRef$current = yearsListRef.current) === null || _yearsListRef$current === void 0 ? void 0 : _yearsListRef$current.addEventListener('mousewheel', function (e) {
370
+ return onWheel(e, 'years');
371
+ }, {
287
372
  passive: false
288
373
  });
289
- yearsListRef === null || yearsListRef === void 0 || (_yearsListRef$current2 = yearsListRef.current) === null || _yearsListRef$current2 === void 0 || _yearsListRef$current2.addEventListener('touchstart', e => onTouchStart(e, 'years'), {
374
+ yearsListRef === null || yearsListRef === void 0 ? void 0 : (_yearsListRef$current2 = yearsListRef.current) === null || _yearsListRef$current2 === void 0 ? void 0 : _yearsListRef$current2.addEventListener('touchstart', function (e) {
375
+ return onTouchStart(e, 'years');
376
+ }, {
290
377
  passive: false
291
378
  });
292
379
  }
293
- return () => {
380
+
381
+ return function () {
294
382
  var _yearsListRef$current3, _yearsListRef$current4;
295
- yearsListRef === null || yearsListRef === void 0 || (_yearsListRef$current3 = yearsListRef.current) === null || _yearsListRef$current3 === void 0 || _yearsListRef$current3.clearEventListeners('mousewheel');
296
- yearsListRef === null || yearsListRef === void 0 || (_yearsListRef$current4 = yearsListRef.current) === null || _yearsListRef$current4 === void 0 || _yearsListRef$current4.clearEventListeners('touchstart');
383
+
384
+ yearsListRef === null || yearsListRef === void 0 ? void 0 : (_yearsListRef$current3 = yearsListRef.current) === null || _yearsListRef$current3 === void 0 ? void 0 : _yearsListRef$current3.clearEventListeners('mousewheel');
385
+ yearsListRef === null || yearsListRef === void 0 ? void 0 : (_yearsListRef$current4 = yearsListRef.current) === null || _yearsListRef$current4 === void 0 ? void 0 : _yearsListRef$current4.clearEventListeners('touchstart');
297
386
  };
298
- }, [yearsListRef]);
299
-
300
- //--RENDER--//
301
- const renderMonthsList = () => {
302
- const half = (rows - 1) / 2;
303
- return getMonthList().map((month, i) => /*#__PURE__*/_react.default.createElement("div", {
304
- className: "mobile-calendar_wrapper_body_months-list--item ".concat(i === half ? 'active' : '', " ").concat(i === 0 || i === rows - 1 ? 'transparent' : '', " ").concat(classes === null || classes === void 0 ? void 0 : classes.monthsListItem, " ").concat(i === half ? classes === null || classes === void 0 ? void 0 : classes.activeItem : ''),
305
- key: "month-".concat(month),
306
- onClick: touchY ? null : () => i - half === 0 ? {} : changeItem('months', i - half),
307
- "attr-scroll-direction": touchType === 'months' ? scrollDirection : 0,
308
- "attr-is-scrolling": touchType === 'months' ? 1 : 0
309
- }, month));
387
+ }, [yearsListRef]); //--RENDER--//
388
+
389
+ var renderMonthsList = function renderMonthsList() {
390
+ var half = (rows - 1) / 2;
391
+ return getMonthList().map(function (month, i) {
392
+ return /*#__PURE__*/_react.default.createElement("div", {
393
+ className: "mobile-calendar_wrapper_body_months-list--item ".concat(i === half ? 'active' : '', " ").concat(i === 0 || i === rows - 1 ? 'transparent' : '', " ").concat(classes === null || classes === void 0 ? void 0 : classes.monthsListItem, " ").concat(i === half ? classes === null || classes === void 0 ? void 0 : classes.activeItem : ''),
394
+ key: "month-".concat(month),
395
+ onClick: touchY ? null : function () {
396
+ return i - half === 0 ? {} : changeItem('months', i - half);
397
+ },
398
+ "attr-scroll-direction": touchType === 'months' ? scrollDirection : 0,
399
+ "attr-is-scrolling": touchType === 'months' ? 1 : 0
400
+ }, month);
401
+ });
310
402
  };
311
- const renderDaysList = () => {
312
- const half = (rows - 1) / 2;
313
- return getDaysList().map((day, i) => /*#__PURE__*/_react.default.createElement("div", {
314
- className: "mobile-calendar_wrapper_body_days-list--item ".concat(i === half ? 'active' : '', " ").concat(i === 0 || i === rows - 1 ? 'transparent' : '', " ").concat(classes === null || classes === void 0 ? void 0 : classes.daysListItem, " ").concat(i === half ? classes === null || classes === void 0 ? void 0 : classes.activeItem : ''),
315
- key: "day-".concat(day),
316
- onClick: () => i - half === 0 ? {} : changeItem('days', i - half),
317
- "attr-scroll-direction": touchType === 'days' ? scrollDirection : 0,
318
- "attr-is-scrolling": touchType === 'days' ? 1 : 0
319
- }, day));
403
+
404
+ var renderDaysList = function renderDaysList() {
405
+ var half = (rows - 1) / 2;
406
+ return getDaysList().map(function (day, i) {
407
+ return /*#__PURE__*/_react.default.createElement("div", {
408
+ className: "mobile-calendar_wrapper_body_days-list--item ".concat(i === half ? 'active' : '', " ").concat(i === 0 || i === rows - 1 ? 'transparent' : '', " ").concat(classes === null || classes === void 0 ? void 0 : classes.daysListItem, " ").concat(i === half ? classes === null || classes === void 0 ? void 0 : classes.activeItem : ''),
409
+ key: "day-".concat(day),
410
+ onClick: function onClick() {
411
+ return i - half === 0 ? {} : changeItem('days', i - half);
412
+ },
413
+ "attr-scroll-direction": touchType === 'days' ? scrollDirection : 0,
414
+ "attr-is-scrolling": touchType === 'days' ? 1 : 0
415
+ }, day);
416
+ });
320
417
  };
321
- const renderYearsList = () => {
322
- const half = (rows - 1) / 2;
323
- return getYearsList().map((year, i) => /*#__PURE__*/_react.default.createElement("div", {
324
- className: "mobile-calendar_wrapper_body_years-list--item ".concat(i === half ? 'active' : '', " ").concat(i === 0 || i === rows - 1 ? 'transparent' : '', " ").concat(classes === null || classes === void 0 ? void 0 : classes.yearsListItem, " ").concat(i === half ? classes === null || classes === void 0 ? void 0 : classes.activeItem : ''),
325
- key: "year-".concat(year),
326
- onClick: () => i - half === 0 ? {} : changeItem('years', i - half),
327
- "attr-scroll-direction": touchType === 'years' ? scrollDirection : 0,
328
- "attr-is-scrolling": touchType === 'years' ? 1 : 0
329
- }, year));
418
+
419
+ var renderYearsList = function renderYearsList() {
420
+ var half = (rows - 1) / 2;
421
+ return getYearsList().map(function (year, i) {
422
+ return /*#__PURE__*/_react.default.createElement("div", {
423
+ className: "mobile-calendar_wrapper_body_years-list--item ".concat(i === half ? 'active' : '', " ").concat(i === 0 || i === rows - 1 ? 'transparent' : '', " ").concat(classes === null || classes === void 0 ? void 0 : classes.yearsListItem, " ").concat(i === half ? classes === null || classes === void 0 ? void 0 : classes.activeItem : ''),
424
+ key: "year-".concat(year),
425
+ onClick: function onClick() {
426
+ return i - half === 0 ? {} : changeItem('years', i - half);
427
+ },
428
+ "attr-scroll-direction": touchType === 'years' ? scrollDirection : 0,
429
+ "attr-is-scrolling": touchType === 'years' ? 1 : 0
430
+ }, year);
431
+ });
330
432
  };
331
- const renderMonthsBlock = () => {
433
+
434
+ var renderMonthsBlock = function renderMonthsBlock() {
332
435
  return /*#__PURE__*/_react.default.createElement("div", {
333
436
  className: "mobile-calendar_wrapper_body_months ".concat(classes === null || classes === void 0 ? void 0 : classes.monthsBlock)
334
437
  }, /*#__PURE__*/_react.default.createElement("div", {
335
438
  className: "mobile-calendar_wrapper_body_months--prev ".concat(classes === null || classes === void 0 ? void 0 : classes.prevItem)
336
439
  }, /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronUp, {
337
- onClick: () => changeItem('months', -1),
338
- onMouseDown: () => onArrowMouseDown('months', -1),
440
+ onClick: function onClick() {
441
+ return changeItem('months', -1);
442
+ },
443
+ onMouseDown: function onMouseDown() {
444
+ return onArrowMouseDown('months', -1);
445
+ },
339
446
  onMouseUp: onArrowMouseUp
340
447
  })), /*#__PURE__*/_react.default.createElement("div", {
341
448
  className: "mobile-calendar_wrapper_body_months-list ".concat(classes === null || classes === void 0 ? void 0 : classes.monthsList),
@@ -345,19 +452,28 @@ const MobileCalendar = _ref => {
345
452
  })), /*#__PURE__*/_react.default.createElement("div", {
346
453
  className: "mobile-calendar_wrapper_body_months--next ".concat(classes === null || classes === void 0 ? void 0 : classes.nextItem)
347
454
  }, /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronDown, {
348
- onClick: () => changeItem('months', 1),
349
- onMouseDown: () => onArrowMouseDown('months', 1),
455
+ onClick: function onClick() {
456
+ return changeItem('months', 1);
457
+ },
458
+ onMouseDown: function onMouseDown() {
459
+ return onArrowMouseDown('months', 1);
460
+ },
350
461
  onMouseUp: onArrowMouseUp
351
462
  })));
352
463
  };
353
- const renderDaysBlock = () => {
464
+
465
+ var renderDaysBlock = function renderDaysBlock() {
354
466
  return /*#__PURE__*/_react.default.createElement("div", {
355
467
  className: "mobile-calendar_wrapper_body_days ".concat(classes === null || classes === void 0 ? void 0 : classes.daysBlock)
356
468
  }, /*#__PURE__*/_react.default.createElement("div", {
357
469
  className: "mobile-calendar_wrapper_body_days--prev ".concat(classes === null || classes === void 0 ? void 0 : classes.prevItem)
358
470
  }, /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronUp, {
359
- onClick: () => changeItem('days', -1),
360
- onMouseDown: () => onArrowMouseDown('days', -1),
471
+ onClick: function onClick() {
472
+ return changeItem('days', -1);
473
+ },
474
+ onMouseDown: function onMouseDown() {
475
+ return onArrowMouseDown('days', -1);
476
+ },
361
477
  onMouseUp: onArrowMouseUp
362
478
  })), /*#__PURE__*/_react.default.createElement("div", {
363
479
  className: "mobile-calendar_wrapper_body_days-list ".concat(classes === null || classes === void 0 ? void 0 : classes.daysList),
@@ -367,19 +483,28 @@ const MobileCalendar = _ref => {
367
483
  })), /*#__PURE__*/_react.default.createElement("div", {
368
484
  className: "mobile-calendar_wrapper_body_days--next ".concat(classes === null || classes === void 0 ? void 0 : classes.nextItem)
369
485
  }, /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronDown, {
370
- onClick: () => changeItem('days', 1),
371
- onMouseDown: () => onArrowMouseDown('days', 1),
486
+ onClick: function onClick() {
487
+ return changeItem('days', 1);
488
+ },
489
+ onMouseDown: function onMouseDown() {
490
+ return onArrowMouseDown('days', 1);
491
+ },
372
492
  onMouseUp: onArrowMouseUp
373
493
  })));
374
494
  };
375
- const renderYearsBlock = () => {
495
+
496
+ var renderYearsBlock = function renderYearsBlock() {
376
497
  return /*#__PURE__*/_react.default.createElement("div", {
377
498
  className: "mobile-calendar_wrapper_body_years ".concat(classes === null || classes === void 0 ? void 0 : classes.yearsBlock)
378
499
  }, /*#__PURE__*/_react.default.createElement("div", {
379
500
  className: "mobile-calendar_wrapper_body_years--prev ".concat(classes === null || classes === void 0 ? void 0 : classes.prevItem)
380
501
  }, /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronUp, {
381
- onClick: () => changeItem('years', -1),
382
- onMouseDown: () => onArrowMouseDown('years', -1),
502
+ onClick: function onClick() {
503
+ return changeItem('years', -1);
504
+ },
505
+ onMouseDown: function onMouseDown() {
506
+ return onArrowMouseDown('years', -1);
507
+ },
383
508
  onMouseUp: onArrowMouseUp
384
509
  })), /*#__PURE__*/_react.default.createElement("div", {
385
510
  className: "mobile-calendar_wrapper_body_years-list ".concat(classes === null || classes === void 0 ? void 0 : classes.yearsList),
@@ -389,11 +514,16 @@ const MobileCalendar = _ref => {
389
514
  })), /*#__PURE__*/_react.default.createElement("div", {
390
515
  className: "mobile-calendar_wrapper_body_years--next ".concat(classes === null || classes === void 0 ? void 0 : classes.nextItem)
391
516
  }, /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronDown, {
392
- onClick: () => changeItem('years', 1),
393
- onMouseDown: () => onArrowMouseDown('years', 1),
517
+ onClick: function onClick() {
518
+ return changeItem('years', 1);
519
+ },
520
+ onMouseDown: function onMouseDown() {
521
+ return onArrowMouseDown('years', 1);
522
+ },
394
523
  onMouseUp: onArrowMouseUp
395
524
  })));
396
525
  };
526
+
397
527
  return /*#__PURE__*/_react.default.createElement("div", {
398
528
  className: "mobile-calendar_wrapper ".concat(classes === null || classes === void 0 ? void 0 : classes.wrapper),
399
529
  onTouchMove: onTouchMove
@@ -405,4 +535,6 @@ const MobileCalendar = _ref => {
405
535
  className: "mobile-calendar_wrapper_body ".concat(classes === null || classes === void 0 ? void 0 : classes.body)
406
536
  }, renderMonthsBlock(), renderDaysBlock(), renderYearsBlock()));
407
537
  };
408
- var _default = exports.default = MobileCalendar;
538
+
539
+ var _default = MobileCalendar;
540
+ exports.default = _default;