intelicoreact 1.6.2 → 1.6.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 (467) hide show
  1. package/dist/ArrayElement.d.ts +13 -0
  2. package/dist/AsyncReturnType.d.ts +17 -0
  3. package/dist/Atomic/FormElements/ActionAlert/ActionAlert.interface.js +4 -1
  4. package/dist/Atomic/FormElements/ActionAlert/ActionAlert.js +69 -14
  5. package/dist/Atomic/FormElements/ActionAlert/ActionAlert.stories.js +30 -7
  6. package/dist/Atomic/FormElements/ActionAlert/ActionAlert.test.js +43 -34
  7. package/dist/Atomic/FormElements/ActionAlert/index.js +17 -2
  8. package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.interface.js +4 -1
  9. package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +26 -11
  10. package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.stories.js +35 -12
  11. package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.test.js +29 -20
  12. package/dist/Atomic/FormElements/AdvancedStatus/index.js +17 -2
  13. package/dist/Atomic/FormElements/Calendar/Calendar.js +109 -53
  14. package/dist/Atomic/FormElements/Calendar/Calendar.props.js +4 -1
  15. package/dist/Atomic/FormElements/Calendar/Calendar.stories.js +74 -10
  16. package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.interface.js +4 -1
  17. package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +27 -12
  18. package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.stories.js +39 -16
  19. package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.test.js +46 -37
  20. package/dist/Atomic/FormElements/CheckboxInput/index.js +17 -2
  21. package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.interface.js +4 -1
  22. package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +24 -9
  23. package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.stories.js +33 -10
  24. package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.test.js +34 -25
  25. package/dist/Atomic/FormElements/CheckboxesLine/index.js +17 -2
  26. package/dist/Atomic/FormElements/Datepicker/Datepicker.js +160 -104
  27. package/dist/Atomic/FormElements/Datepicker/Datepicker.stories.js +31 -8
  28. package/dist/Atomic/FormElements/Datepicker/components/Calendar.js +89 -33
  29. package/dist/Atomic/FormElements/Dropdown/Dropdown.js +154 -98
  30. package/dist/Atomic/FormElements/Dropdown/Dropdown.stories.js +82 -18
  31. package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +25 -10
  32. package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +138 -82
  33. package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.stories.js +79 -15
  34. package/dist/Atomic/FormElements/FileLoader/FileLoader.js +69 -13
  35. package/dist/Atomic/FormElements/FileLoader/FileLoader.stories.js +86 -22
  36. package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +69 -13
  37. package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +71 -15
  38. package/dist/Atomic/FormElements/FileLoaderDescription/FileLoaderDescription.js +91 -35
  39. package/dist/Atomic/FormElements/FileLoaderDescription/FileLoaderDescription.stories.js +82 -18
  40. package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +40 -25
  41. package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.stories.js +79 -15
  42. package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +78 -22
  43. package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.stories.js +33 -10
  44. package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +73 -17
  45. package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.stories.js +73 -9
  46. package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN_old.js +75 -19
  47. package/dist/Atomic/FormElements/Input/Input.js +100 -45
  48. package/dist/Atomic/FormElements/Input/Input.stories.js +73 -9
  49. package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +85 -29
  50. package/dist/Atomic/FormElements/InputCalendar/InputCalendar.stories.js +78 -14
  51. package/dist/Atomic/FormElements/InputColor/InputColor.js +30 -15
  52. package/dist/Atomic/FormElements/InputColor/InputColor.stories.js +73 -9
  53. package/dist/Atomic/FormElements/InputCurrency/InputCurrency.interface.js +4 -1
  54. package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +73 -17
  55. package/dist/Atomic/FormElements/InputCurrency/InputCurrency.stories.js +52 -14
  56. package/dist/Atomic/FormElements/InputCurrency/InputCurrency.test.js +45 -36
  57. package/dist/Atomic/FormElements/InputCurrency/index.js +16 -1
  58. package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +128 -72
  59. package/dist/Atomic/FormElements/InputDateRange/InputDateRange.stories.js +75 -11
  60. package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +30 -15
  61. package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +182 -126
  62. package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +98 -42
  63. package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +24 -9
  64. package/dist/Atomic/FormElements/InputDateRange/dependencies.js +144 -53
  65. package/dist/Atomic/FormElements/InputLink/InputLink.js +76 -20
  66. package/dist/Atomic/FormElements/InputLink/InputLink.stories.js +73 -9
  67. package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +20 -2
  68. package/dist/Atomic/FormElements/InputMask/InputMask.js +158 -103
  69. package/dist/Atomic/FormElements/InputMask/InputMask.stories.js +81 -17
  70. package/dist/Atomic/FormElements/InputMask/config.js +1 -0
  71. package/dist/Atomic/FormElements/InputMask/functions.js +59 -14
  72. package/dist/Atomic/FormElements/InputMask2/InputMask2.js +129 -73
  73. package/dist/Atomic/FormElements/InputMask2/InputMask2.stories.js +77 -13
  74. package/dist/Atomic/FormElements/InputMask2/config.js +1 -0
  75. package/dist/Atomic/FormElements/InputMask2/functions.js +59 -14
  76. package/dist/Atomic/FormElements/InputMask3/InputMask3.js +133 -77
  77. package/dist/Atomic/FormElements/InputMask3/InputMask3.stories.js +79 -15
  78. package/dist/Atomic/FormElements/InputMask3/config.js +1 -0
  79. package/dist/Atomic/FormElements/InputMask3/functions.js +59 -14
  80. package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +79 -23
  81. package/dist/Atomic/FormElements/InputWithAction/InputWithAction.stories.js +72 -8
  82. package/dist/Atomic/FormElements/InputsRow/InputsRow.js +81 -25
  83. package/dist/Atomic/FormElements/InputsRow/InputsRow.stories.js +31 -8
  84. package/dist/Atomic/FormElements/Label/Label.interface.js +4 -1
  85. package/dist/Atomic/FormElements/Label/Label.js +31 -16
  86. package/dist/Atomic/FormElements/Label/Label.stories.js +30 -7
  87. package/dist/Atomic/FormElements/Label/Label.test.js +46 -37
  88. package/dist/Atomic/FormElements/Label/index.js +17 -2
  89. package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +124 -68
  90. package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.stories.js +74 -10
  91. package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +67 -11
  92. package/dist/Atomic/FormElements/MultiSelect/MultiSelect.stories.js +73 -9
  93. package/dist/Atomic/FormElements/NumericInput/NumericInput.js +105 -49
  94. package/dist/Atomic/FormElements/NumericInput/NumericInput.stories.js +75 -11
  95. package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +67 -11
  96. package/dist/Atomic/FormElements/RadioGroup/RadioGroup.stories.js +31 -8
  97. package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +33 -18
  98. package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.stories.js +73 -9
  99. package/dist/Atomic/FormElements/RadioInput/RadioInput.js +27 -12
  100. package/dist/Atomic/FormElements/RadioInput/RadioInput.stories.js +31 -8
  101. package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +25 -10
  102. package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.stories.js +73 -9
  103. package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +92 -36
  104. package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.stories.js +85 -21
  105. package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +81 -25
  106. package/dist/Atomic/FormElements/RangeInputs/RangeInputs.stories.js +74 -10
  107. package/dist/Atomic/FormElements/RangeList/RangeList.js +89 -34
  108. package/dist/Atomic/FormElements/RangeList/RangeList.stories.js +81 -14
  109. package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +37 -14
  110. package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +120 -64
  111. package/dist/Atomic/FormElements/RangeSlider/RangeSlider.stories.js +102 -38
  112. package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +137 -81
  113. package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.stories.js +82 -18
  114. package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +26 -11
  115. package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.stories.js +85 -21
  116. package/dist/Atomic/FormElements/Switcher/Switcher.js +31 -16
  117. package/dist/Atomic/FormElements/Switcher/Switcher.stories.js +74 -10
  118. package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +26 -11
  119. package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.stories.js +75 -11
  120. package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +24 -9
  121. package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.stories.js +75 -11
  122. package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +68 -13
  123. package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.stories.js +74 -10
  124. package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +64 -8
  125. package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.stories.js +75 -11
  126. package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +26 -11
  127. package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.stories.js +76 -12
  128. package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +81 -25
  129. package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.stories.js +78 -14
  130. package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +11 -1
  131. package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +30 -15
  132. package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.stories.js +76 -12
  133. package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.js +70 -14
  134. package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.stories.js +73 -9
  135. package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +208 -152
  136. package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.stories.js +80 -16
  137. package/dist/Atomic/FormElements/Text/Text.js +25 -10
  138. package/dist/Atomic/FormElements/Text/Text.stories.js +30 -7
  139. package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +27 -12
  140. package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.stories.js +74 -10
  141. package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.test.js +26 -17
  142. package/dist/Atomic/FormElements/Textarea/Textarea.js +69 -13
  143. package/dist/Atomic/FormElements/Textarea/Textarea.stories.js +75 -11
  144. package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +77 -22
  145. package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.stories.js +76 -12
  146. package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +27 -12
  147. package/dist/Atomic/FormElements/TimeRange/TimeRange.interface.js +4 -1
  148. package/dist/Atomic/FormElements/TimeRange/TimeRange.js +79 -23
  149. package/dist/Atomic/FormElements/TimeRange/TimeRange.stories.js +30 -7
  150. package/dist/Atomic/FormElements/TimeRange/TimeRange.test.js +59 -50
  151. package/dist/Atomic/FormElements/TimeRange/index.js +17 -2
  152. package/dist/Atomic/FormElements/UserContacts/UserContact.test.js +77 -68
  153. package/dist/Atomic/FormElements/UserContacts/UserContacts.interface.js +4 -1
  154. package/dist/Atomic/FormElements/UserContacts/UserContacts.js +79 -23
  155. package/dist/Atomic/FormElements/UserContacts/UserContacts.stories.js +31 -8
  156. package/dist/Atomic/FormElements/UserContacts/index.js +17 -2
  157. package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +71 -15
  158. package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.stories.js +78 -14
  159. package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +39 -24
  160. package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +45 -30
  161. package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.stories.js +81 -17
  162. package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +11 -1
  163. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +45 -30
  164. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.stories.js +82 -18
  165. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +11 -1
  166. package/dist/Atomic/Layout/Header/Header.js +83 -27
  167. package/dist/Atomic/Layout/Header/Header.stories.js +31 -8
  168. package/dist/Atomic/Layout/MainMenu/MainMenu.js +107 -51
  169. package/dist/Atomic/Layout/MainMenu/MainMenu.stories.js +31 -8
  170. package/dist/Atomic/Layout/Spinner/Spinner.interface.js +4 -1
  171. package/dist/Atomic/Layout/Spinner/Spinner.js +28 -13
  172. package/dist/Atomic/Layout/Spinner/Spinner.stories.js +30 -7
  173. package/dist/Atomic/Layout/Spinner/Spinner.test.js +22 -13
  174. package/dist/Atomic/Layout/Spinner/index.js +17 -2
  175. package/dist/Atomic/UI/Accordion/Accordion.interface.js +4 -1
  176. package/dist/Atomic/UI/Accordion/Accordion.js +77 -21
  177. package/dist/Atomic/UI/Accordion/Accordion.stories.js +36 -10
  178. package/dist/Atomic/UI/Accordion/Accordion.test.js +18 -9
  179. package/dist/Atomic/UI/Accordion/AccordionItem.js +84 -28
  180. package/dist/Atomic/UI/Accordion/AccordionItem.test.js +18 -9
  181. package/dist/Atomic/UI/Accordion/index.js +17 -2
  182. package/dist/Atomic/UI/AccordionTable/AccordionTable.js +99 -43
  183. package/dist/Atomic/UI/AccordionTable/AccordionTable.stories.js +80 -16
  184. package/dist/Atomic/UI/AccordionText/AccordionText.js +73 -18
  185. package/dist/Atomic/UI/AccordionText/AccordionText.stories.js +59 -36
  186. package/dist/Atomic/UI/AdvancedTag/AdvTag.js +94 -38
  187. package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +70 -14
  188. package/dist/Atomic/UI/AdvancedTag/AdvancedTags.stories.js +31 -8
  189. package/dist/Atomic/UI/Alert/Alert.js +78 -22
  190. package/dist/Atomic/UI/Alert/Alert.stories.js +38 -12
  191. package/dist/Atomic/UI/Arrow/Arrow.js +78 -22
  192. package/dist/Atomic/UI/Arrow/Arrow.stories.js +31 -8
  193. package/dist/Atomic/UI/Box/Box.js +22 -8
  194. package/dist/Atomic/UI/Box/Box.stories.js +41 -18
  195. package/dist/Atomic/UI/Button/Button.js +24 -9
  196. package/dist/Atomic/UI/Button/Button.stories.js +32 -9
  197. package/dist/Atomic/UI/Button/Button.test.js +51 -42
  198. package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +30 -15
  199. package/dist/Atomic/UI/ButtonsBar/ButtonsBar.stories.js +35 -13
  200. package/dist/Atomic/UI/Chart/Chart.js +105 -49
  201. package/dist/Atomic/UI/Chart/Chart.stories.js +31 -8
  202. package/dist/Atomic/UI/Chart/partial/Chart.constants.js +44 -8
  203. package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +30 -15
  204. package/dist/Atomic/UI/Chart/partial/datasetSetters.js +34 -9
  205. package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +41 -16
  206. package/dist/Atomic/UI/Chart/partial/optionsSetters.js +24 -3
  207. package/dist/Atomic/UI/Chart/partial/utils.js +45 -13
  208. package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +76 -20
  209. package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.stories.js +32 -9
  210. package/dist/Atomic/UI/DateTime/DateTime.js +70 -14
  211. package/dist/Atomic/UI/DateTime/DateTime.stories.js +32 -9
  212. package/dist/Atomic/UI/DebugContainer/DebugContainer.js +65 -14
  213. package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +62 -6
  214. package/dist/Atomic/UI/DoubleString/DoubleString.js +85 -29
  215. package/dist/Atomic/UI/DoubleString/DoubleString.stories.js +39 -13
  216. package/dist/Atomic/UI/DynamicIcon/DynamicIcon.interface.js +4 -1
  217. package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +58 -7
  218. package/dist/Atomic/UI/DynamicIcon/DynamicIcon.stories.js +72 -8
  219. package/dist/Atomic/UI/DynamicIcon/DynamicIcon.test.js +24 -15
  220. package/dist/Atomic/UI/DynamicIcon/index.js +17 -2
  221. package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +101 -46
  222. package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.stories.js +72 -8
  223. package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +41 -12
  224. package/dist/Atomic/UI/Hint/Hint.interface.js +4 -1
  225. package/dist/Atomic/UI/Hint/Hint.js +93 -37
  226. package/dist/Atomic/UI/Hint/Hint.stories.js +38 -15
  227. package/dist/Atomic/UI/Hint/Hint.test.js +13 -4
  228. package/dist/Atomic/UI/Hint/index.js +17 -2
  229. package/dist/Atomic/UI/Hint/partials/_utils.js +36 -11
  230. package/dist/Atomic/UI/Modal/Modal.interface.js +4 -1
  231. package/dist/Atomic/UI/Modal/Modal.js +61 -35
  232. package/dist/Atomic/UI/Modal/Modal.stories.js +85 -38
  233. package/dist/Atomic/UI/Modal/ModalHOC.js +68 -12
  234. package/dist/Atomic/UI/Modal/ModalHOC.stories.js +59 -27
  235. package/dist/Atomic/UI/Modal/ModalHOC.test.js +47 -38
  236. package/dist/Atomic/UI/Modal/index.js +26 -4
  237. package/dist/Atomic/UI/Modal/partials/ModalFooter.js +63 -7
  238. package/dist/Atomic/UI/Modal/partials/ModalFooter.test.js +40 -31
  239. package/dist/Atomic/UI/Modal/partials/ModalTitle.js +71 -15
  240. package/dist/Atomic/UI/Modal/partials/ModalTitle.test.js +39 -30
  241. package/dist/Atomic/UI/Modal/partials/useMobileModal.js +34 -19
  242. package/dist/Atomic/UI/Modal/partials/useMobileModal.test.js +28 -19
  243. package/dist/Atomic/UI/MonoAccordion/MonoAccordion._test.js +34 -25
  244. package/dist/Atomic/UI/MonoAccordion/MonoAccordion.interface.js +4 -1
  245. package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +73 -17
  246. package/dist/Atomic/UI/MonoAccordion/MonoAccordion.stories.js +184 -101
  247. package/dist/Atomic/UI/MonoAccordion/index.js +17 -2
  248. package/dist/Atomic/UI/NavLine/NavLine.interface.js +4 -1
  249. package/dist/Atomic/UI/NavLine/NavLine.js +102 -46
  250. package/dist/Atomic/UI/NavLine/NavLine.stories.js +116 -32
  251. package/dist/Atomic/UI/NavLine/NavLine.test.js +53 -44
  252. package/dist/Atomic/UI/NavLine/index.js +17 -2
  253. package/dist/Atomic/UI/PageTitle/PageTitle.interface.js +4 -1
  254. package/dist/Atomic/UI/PageTitle/PageTitle.js +34 -19
  255. package/dist/Atomic/UI/PageTitle/PageTitle.stories.js +33 -10
  256. package/dist/Atomic/UI/PageTitle/PageTitle.test.js +51 -42
  257. package/dist/Atomic/UI/PageTitle/index.js +17 -2
  258. package/dist/Atomic/UI/PieChart/PieChart.js +35 -66
  259. package/dist/Atomic/UI/PieChart/PieChart.scss +11 -87
  260. package/dist/Atomic/UI/PieChart/PieChart.stories.js +81 -56
  261. package/dist/Atomic/UI/Price/Price.interface.js +4 -1
  262. package/dist/Atomic/UI/Price/Price.js +24 -9
  263. package/dist/Atomic/UI/Price/Price.stories.js +30 -7
  264. package/dist/Atomic/UI/Price/Price.test.js +21 -12
  265. package/dist/Atomic/UI/Price/index.js +17 -2
  266. package/dist/Atomic/UI/PriceRange/PriceRange.interface.js +4 -1
  267. package/dist/Atomic/UI/PriceRange/PriceRange.js +26 -11
  268. package/dist/Atomic/UI/PriceRange/PriceRange.stories.js +30 -7
  269. package/dist/Atomic/UI/PriceRange/PriceRange.test.js +18 -9
  270. package/dist/Atomic/UI/PriceRange/index.js +17 -2
  271. package/dist/Atomic/UI/ProgressLine/ProgressLine.interface.js +4 -1
  272. package/dist/Atomic/UI/ProgressLine/ProgressLine.js +32 -17
  273. package/dist/Atomic/UI/ProgressLine/ProgressLine.stories.js +30 -7
  274. package/dist/Atomic/UI/ProgressLine/ProgressLine.test.js +18 -9
  275. package/dist/Atomic/UI/ProgressLine/index.js +17 -2
  276. package/dist/Atomic/UI/Status/Status.interface.js +4 -1
  277. package/dist/Atomic/UI/Status/Status.js +31 -16
  278. package/dist/Atomic/UI/Status/Status.stories.js +34 -8
  279. package/dist/Atomic/UI/Status/Status.test.js +32 -23
  280. package/dist/Atomic/UI/Status/index.js +17 -2
  281. package/dist/Atomic/UI/Table/Partials/TdCell.js +79 -23
  282. package/dist/Atomic/UI/Table/Partials/TdHeader.js +32 -17
  283. package/dist/Atomic/UI/Table/Partials/TdRow.js +81 -25
  284. package/dist/Atomic/UI/Table/Partials/TdTitle.js +75 -19
  285. package/dist/Atomic/UI/Table/Table.js +32 -17
  286. package/dist/Atomic/UI/Table/Table.stories.js +73 -9
  287. package/dist/Atomic/UI/Table/TdTypes/TdActions.js +74 -18
  288. package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +28 -13
  289. package/dist/Atomic/UI/Table/TdTypes/TdRange.js +16 -6
  290. package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +32 -17
  291. package/dist/Atomic/UI/Tag/Tag.interface.js +4 -1
  292. package/dist/Atomic/UI/Tag/Tag.js +80 -24
  293. package/dist/Atomic/UI/Tag/Tag.stories.js +38 -15
  294. package/dist/Atomic/UI/Tag/Tag.test.js +30 -21
  295. package/dist/Atomic/UI/Tag/index.js +17 -2
  296. package/dist/Atomic/UI/TagList/TagList.js +84 -28
  297. package/dist/Atomic/UI/TagList/TagList.stories.js +80 -16
  298. package/dist/Atomic/UI/UserBox/UserBox.interface.js +4 -1
  299. package/dist/Atomic/UI/UserBox/UserBox.js +37 -22
  300. package/dist/Atomic/UI/UserBox/UserBox.stories.js +30 -7
  301. package/dist/Atomic/UI/UserBox/UserBox.test.js +74 -24
  302. package/dist/Atomic/UI/UserBox/index.js +17 -2
  303. package/dist/Atomic/UI/WizardStepper/WizardStepper.stories.js +34 -11
  304. package/dist/Atomic/UI/WizardStepper/constructor.js +34 -11
  305. package/dist/Atomic/UI/WizardStepper/index.js +17 -2
  306. package/dist/Atomic/UI/WizardStepper/ui/StateIcon/StateIcon.js +31 -16
  307. package/dist/Atomic/UI/WizardStepper/ui/StateIcon/index.js +12 -2
  308. package/dist/Atomic/UI/WizardStepper/ui/StepRow/StepRow.js +39 -25
  309. package/dist/Atomic/UI/WizardStepper/ui/StepRow/index.js +17 -2
  310. package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/StepWrapper.js +34 -19
  311. package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/index.js +17 -2
  312. package/dist/Atomic/UI/WizardStepper/ui/icons.js +39 -24
  313. package/dist/Atomic/UI/WizardStepper/ui/index.js +17 -2
  314. package/dist/Classes/AbortableFetch.js +12 -2
  315. package/dist/Classes/AnimatedHandler.js +11 -1
  316. package/dist/Classes/RESTAPI/index.js +24 -9
  317. package/dist/Classes/RESTAPI/partials/AbortableFetch.js +12 -2
  318. package/dist/Classes/RESTAPI/partials/ApiBase.js +18 -3
  319. package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +25 -10
  320. package/dist/Classes/RESTAPI/partials/ApiUtils.js +22 -7
  321. package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +20 -5
  322. package/dist/Classes/RESTAPI/partials/Utils.js +14 -4
  323. package/dist/Classes/RESTAPI/partials/_outerDependencies.js +18 -3
  324. package/dist/Classes/RESTAPI/partials/_utils.js +43 -10
  325. package/dist/Constants/index.constants.js +40 -7
  326. package/dist/DeepPartial.d.ts +40 -0
  327. package/dist/DeepReadonly.d.ts +38 -0
  328. package/dist/DeepRequired.d.ts +50 -0
  329. package/dist/Flatten.d.ts +34 -0
  330. package/dist/FunctionType.d.ts +37 -0
  331. package/dist/Functions/Portal.js +62 -6
  332. package/dist/Functions/customEventListener.js +1 -0
  333. package/dist/Functions/dateTime.js +31 -21
  334. package/dist/Functions/fieldValueFormatters.js +79 -61
  335. package/dist/Functions/guards/assertions.js +19 -4
  336. package/dist/Functions/guards/safeValue.js +21 -6
  337. package/dist/Functions/guards/typeGuards.js +12 -2
  338. package/dist/Functions/hooks/useFormFieldsChangesManager.js +55 -4
  339. package/dist/Functions/locale/createTranslator.js +13 -3
  340. package/dist/Functions/operations.js +11 -1
  341. package/dist/Functions/presets/inputMaskPresets.js +12 -2
  342. package/dist/Functions/presets/inputPresets.js +14 -4
  343. package/dist/Functions/presets/mobileKeyboardTypesPresets.js +24 -32
  344. package/dist/Functions/schemas.js +77 -15
  345. package/dist/Functions/useBodyScrollLock.js +13 -3
  346. package/dist/Functions/useClickOutside.js +13 -3
  347. package/dist/Functions/useDebounce.js +55 -4
  348. package/dist/Functions/useFieldFocus.js +17 -7
  349. package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +18 -3
  350. package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +11 -1
  351. package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +18 -3
  352. package/dist/Functions/useFormTools/functions/General.js +11 -1
  353. package/dist/Functions/useFormTools/functions/RenderFields.js +16 -6
  354. package/dist/Functions/useFormTools/functions/usePrevious.js +14 -4
  355. package/dist/Functions/useFormTools/index.js +50 -35
  356. package/dist/Functions/useInputHighlightError.js +68 -9
  357. package/dist/Functions/useIsMobile/index.js +17 -2
  358. package/dist/Functions/useIsMobile/useIsMobile.js +14 -4
  359. package/dist/Functions/useIsMobile/useIsMobile.test.js +18 -9
  360. package/dist/Functions/useKeyPress/useHandleKeyPress.js +21 -6
  361. package/dist/Functions/useKeyPress/useHandleKeyPress.test.js +20 -11
  362. package/dist/Functions/useKeyPress/useKeyPress.js +16 -6
  363. package/dist/Functions/useKeyPress/useKeyPress.test.js +25 -16
  364. package/dist/Functions/useLocalStorage.js +13 -3
  365. package/dist/Functions/useLocationParams.js +14 -4
  366. package/dist/Functions/useMediaQuery.js +13 -3
  367. package/dist/Functions/useMetaInfo.js +27 -9
  368. package/dist/Functions/useMouseUpOutside.js +13 -3
  369. package/dist/Functions/useOnlineStatus.js +14 -4
  370. package/dist/Functions/usePasswordChecker.js +69 -13
  371. package/dist/Functions/usePrevious.js +14 -4
  372. package/dist/Functions/useResize.js +15 -5
  373. package/dist/Functions/useScrollTo.js +15 -5
  374. package/dist/Functions/useToggle.js +16 -6
  375. package/dist/Functions/utils.js +173 -67
  376. package/dist/If.d.ts +34 -0
  377. package/dist/KeysType.d.ts +10 -0
  378. package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +57 -6
  379. package/dist/Molecular/CustomIcons/components/AlertCircle.js +57 -6
  380. package/dist/Molecular/CustomIcons/components/AppStore.js +59 -8
  381. package/dist/Molecular/CustomIcons/components/Arrow.js +62 -11
  382. package/dist/Molecular/CustomIcons/components/ArrowDown.js +55 -4
  383. package/dist/Molecular/CustomIcons/components/ArrowLeft.js +56 -5
  384. package/dist/Molecular/CustomIcons/components/ArrowRight.js +56 -5
  385. package/dist/Molecular/CustomIcons/components/ArrowUp.js +55 -4
  386. package/dist/Molecular/CustomIcons/components/Bell.js +55 -4
  387. package/dist/Molecular/CustomIcons/components/Button.js +55 -4
  388. package/dist/Molecular/CustomIcons/components/Campaigns.js +55 -4
  389. package/dist/Molecular/CustomIcons/components/Check.js +55 -4
  390. package/dist/Molecular/CustomIcons/components/Check2.js +55 -4
  391. package/dist/Molecular/CustomIcons/components/ChevronDown.js +55 -4
  392. package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +55 -4
  393. package/dist/Molecular/CustomIcons/components/ChevronLeft.js +55 -4
  394. package/dist/Molecular/CustomIcons/components/ChevronRight.js +55 -4
  395. package/dist/Molecular/CustomIcons/components/ChevronUp.js +55 -4
  396. package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +58 -7
  397. package/dist/Molecular/CustomIcons/components/Close.js +56 -5
  398. package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +60 -9
  399. package/dist/Molecular/CustomIcons/components/Delete.js +55 -4
  400. package/dist/Molecular/CustomIcons/components/Edit.js +55 -4
  401. package/dist/Molecular/CustomIcons/components/Email.js +59 -8
  402. package/dist/Molecular/CustomIcons/components/FinturfLogo.js +60 -9
  403. package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +59 -8
  404. package/dist/Molecular/CustomIcons/components/Flows.js +55 -4
  405. package/dist/Molecular/CustomIcons/components/Gift.js +56 -5
  406. package/dist/Molecular/CustomIcons/components/GoogleAuth.js +59 -8
  407. package/dist/Molecular/CustomIcons/components/GooglePlay.js +59 -8
  408. package/dist/Molecular/CustomIcons/components/HelpCircle.js +56 -5
  409. package/dist/Molecular/CustomIcons/components/HelpCircle2.js +56 -5
  410. package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +56 -5
  411. package/dist/Molecular/CustomIcons/components/Home.js +56 -5
  412. package/dist/Molecular/CustomIcons/components/Home2.js +56 -5
  413. package/dist/Molecular/CustomIcons/components/Key.js +55 -4
  414. package/dist/Molecular/CustomIcons/components/Landers.js +56 -5
  415. package/dist/Molecular/CustomIcons/components/Lock.js +55 -4
  416. package/dist/Molecular/CustomIcons/components/Mail.js +57 -6
  417. package/dist/Molecular/CustomIcons/components/Mastercard.js +67 -16
  418. package/dist/Molecular/CustomIcons/components/Minus.js +58 -7
  419. package/dist/Molecular/CustomIcons/components/Offers.js +55 -4
  420. package/dist/Molecular/CustomIcons/components/Pause.js +58 -7
  421. package/dist/Molecular/CustomIcons/components/PayPal.js +61 -10
  422. package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +59 -8
  423. package/dist/Molecular/CustomIcons/components/Phone.js +58 -7
  424. package/dist/Molecular/CustomIcons/components/Play.js +58 -7
  425. package/dist/Molecular/CustomIcons/components/Plus.js +58 -7
  426. package/dist/Molecular/CustomIcons/components/Profile.js +56 -5
  427. package/dist/Molecular/CustomIcons/components/QRCode.js +59 -8
  428. package/dist/Molecular/CustomIcons/components/Rectangle.js +55 -4
  429. package/dist/Molecular/CustomIcons/components/Revert.js +56 -5
  430. package/dist/Molecular/CustomIcons/components/Star.js +55 -4
  431. package/dist/Molecular/CustomIcons/components/Star2.js +55 -4
  432. package/dist/Molecular/CustomIcons/components/TrafficSources.js +57 -6
  433. package/dist/Molecular/CustomIcons/components/Trash.js +55 -4
  434. package/dist/Molecular/CustomIcons/components/TrashRed.js +55 -4
  435. package/dist/Molecular/CustomIcons/components/Triggers.js +55 -4
  436. package/dist/Molecular/CustomIcons/components/User.js +56 -5
  437. package/dist/Molecular/CustomIcons/components/Visa.js +61 -10
  438. package/dist/Molecular/CustomIcons/components/X.js +55 -4
  439. package/dist/Molecular/CustomIcons/index.js +78 -61
  440. package/dist/Molecular/FormElement/FormElement.js +28 -13
  441. package/dist/Molecular/FormElement/FormElement.stories.js +33 -10
  442. package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +74 -19
  443. package/dist/Molecular/FormWithDependOn/FormWithDependOn.stories.js +81 -17
  444. package/dist/Molecular/FormWithDependOn/partials/_utils.js +13 -3
  445. package/dist/Molecular/InputAddress/InputAddress.js +139 -83
  446. package/dist/Molecular/InputAddress/InputAddress.stories.js +78 -14
  447. package/dist/Molecular/InputPassword/InputPassword.js +73 -17
  448. package/dist/Molecular/InputPassword/InputPassword.stories.js +72 -8
  449. package/dist/NonNullableType.d.ts +13 -0
  450. package/dist/ObjectType.d.ts +9 -0
  451. package/dist/OnlyObjectKeys.d.ts +65 -0
  452. package/dist/PrettyPrint.d.ts +29 -0
  453. package/dist/RequiredFields.d.ts +21 -0
  454. package/dist/TupleType.d.ts +10 -0
  455. package/dist/ValuesType.d.ts +10 -0
  456. package/dist/lib/src/Atomic/UI/PieChart/PieChart.d.ts +7 -3
  457. package/dist/lib/src/Atomic/UI/PieChart/PieChart.stories.d.ts +15 -6
  458. package/dist/tsconfig.tsbuildinfo +1 -1
  459. package/dist/types/base.interface.js +4 -1
  460. package/dist/types/base.types.js +4 -1
  461. package/package.json +4 -3
  462. package/dist/Atomic/UI/PieChart/PieChar.interface.js +0 -1
  463. package/dist/Atomic/UI/PieChart/PieChart.test.js +0 -133
  464. package/dist/Atomic/UI/PieChart/index.js +0 -5
  465. package/dist/lib/src/Atomic/UI/PieChart/PieChar.interface.d.ts +0 -36
  466. package/dist/lib/src/Atomic/UI/PieChart/PieChart.test.d.ts +0 -1
  467. package/dist/lib/src/Atomic/UI/PieChart/index.d.ts +0 -13
@@ -1,9 +1,128 @@
1
- import { useEffect } from "react";
2
- import moment from "moment-timezone";
3
- import { DEFAULT_COLORS, OS } from "../Constants/index.constants";
4
- export const uuid = ()=>Date.now().toString(36) + Math.random().toString(36).substring(2);
5
- export const getIsOnlyAnObject = (input)=>typeof input === "object" && input instanceof Object && !Array.isArray(input);
6
- /* eslint-disable guard-for-in, no-unused-vars */ export const handleObjectChange = (updateObject, updateFunction)=>(data, prop = "", isNumber)=>{
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ addBitDepthPoints: function() {
13
+ return addBitDepthPoints;
14
+ },
15
+ capitalized: function() {
16
+ return capitalized;
17
+ },
18
+ changeMeta: function() {
19
+ return changeMeta;
20
+ },
21
+ checkedRef: function() {
22
+ return checkedRef;
23
+ },
24
+ clone: function() {
25
+ return clone;
26
+ },
27
+ compare: function() {
28
+ return compare;
29
+ },
30
+ compareAlphabetical: function() {
31
+ return compareAlphabetical;
32
+ },
33
+ debounce: function() {
34
+ return debounce;
35
+ },
36
+ disableDefaultBehavior: function() {
37
+ return disableDefaultBehavior;
38
+ },
39
+ downloadEmulation: function() {
40
+ return downloadEmulation;
41
+ },
42
+ downloadFile: function() {
43
+ return downloadFile;
44
+ },
45
+ firstLetterCapital: function() {
46
+ return firstLetterCapital;
47
+ },
48
+ getBase64: function() {
49
+ return getBase64;
50
+ },
51
+ getColorById: function() {
52
+ return getColorById;
53
+ },
54
+ getCorrectTestId: function() {
55
+ return getCorrectTestId;
56
+ },
57
+ getIsOnlyAnObject: function() {
58
+ return getIsOnlyAnObject;
59
+ },
60
+ getLimitedMask: function() {
61
+ return getLimitedMask;
62
+ },
63
+ getOS: function() {
64
+ return getOS;
65
+ },
66
+ getResponseClone: function() {
67
+ return getResponseClone;
68
+ },
69
+ getStyles: function() {
70
+ return getStyles;
71
+ },
72
+ getUniqueFileExtensions: function() {
73
+ return getUniqueFileExtensions;
74
+ },
75
+ handleObjectChange: function() {
76
+ return handleObjectChange;
77
+ },
78
+ logout: function() {
79
+ return logout;
80
+ },
81
+ omitKeys: function() {
82
+ return omitKeys;
83
+ },
84
+ renderFileSize: function() {
85
+ return renderFileSize;
86
+ },
87
+ setCarretToEnd: function() {
88
+ return setCarretToEnd;
89
+ },
90
+ throttle: function() {
91
+ return throttle;
92
+ },
93
+ transformDateOrTimeOrTogetherToFormat: function() {
94
+ return transformDateOrTimeOrTogetherToFormat;
95
+ },
96
+ transformDateOrTimeOrTogetherToFormattedLocal: function() {
97
+ return transformDateOrTimeOrTogetherToFormattedLocal;
98
+ },
99
+ transformLocalTimeToUTC: function() {
100
+ return transformLocalTimeToUTC;
101
+ },
102
+ transformUTCHoursToLocal: function() {
103
+ return transformUTCHoursToLocal;
104
+ },
105
+ transformUTCTimeToLocal: function() {
106
+ return transformUTCTimeToLocal;
107
+ },
108
+ useOutsideToggle: function() {
109
+ return useOutsideToggle;
110
+ },
111
+ uuid: function() {
112
+ return uuid;
113
+ }
114
+ });
115
+ const _react = require("react");
116
+ const _momenttimezone = /*#__PURE__*/ _interop_require_default(require("moment-timezone"));
117
+ const _indexconstants = require("../Constants/index.constants");
118
+ function _interop_require_default(obj) {
119
+ return obj && obj.__esModule ? obj : {
120
+ default: obj
121
+ };
122
+ }
123
+ const uuid = ()=>Date.now().toString(36) + Math.random().toString(36).substring(2);
124
+ const getIsOnlyAnObject = (input)=>typeof input === "object" && input instanceof Object && !Array.isArray(input);
125
+ const handleObjectChange = (updateObject, updateFunction)=>(data, prop = "", isNumber)=>{
7
126
  let value;
8
127
  if (data === null || data === void 0 ? void 0 : data.target) {
9
128
  value = data.target.type === "checkbox" ? data.target.checked : data.target.value;
@@ -17,13 +136,13 @@ export const getIsOnlyAnObject = (input)=>typeof input === "object" && input ins
17
136
  currentObject[props.pop()] = value;
18
137
  updateFunction();
19
138
  };
20
- export const useOutsideToggle = (ref, setOut, open)=>{
139
+ const useOutsideToggle = (ref, setOut, open)=>{
21
140
  function handleClickOutside(event) {
22
141
  if (ref.current && !ref.current.contains(event.target)) {
23
142
  setOut(open);
24
143
  }
25
144
  }
26
- useEffect(()=>{
145
+ (0, _react.useEffect)(()=>{
27
146
  document.addEventListener("mouseup", handleClickOutside);
28
147
  return ()=>{
29
148
  // Unbind the event listener on clean up
@@ -33,33 +152,26 @@ export const useOutsideToggle = (ref, setOut, open)=>{
33
152
  ref
34
153
  ]);
35
154
  };
36
- // export const clone = obj => {
37
- // const data = obj instanceof Array ? [] : {};
38
- // for (const i in obj) data[i] = typeof obj[i] === 'object' && obj[i] != null ? clone(obj[i]) : obj[i];
39
- // return data;
40
- // };
41
- // ! Этот правильнее
42
- export const clone = (input)=>{
155
+ const clone = (input)=>{
43
156
  if (input === null || typeof input !== "object") return input;
44
157
  const data = input instanceof Array ? [] : {};
45
158
  for(const i in input)data[i] = clone(input[i]);
46
159
  return data;
47
160
  };
48
- export const getResponseClone = async (res)=>await (typeof (res === null || res === void 0 ? void 0 : res.clone) === "function" ? res.clone() : clone(res));
49
- //TimeUtils
50
- export function transformUTCTimeToLocal(date, format = "YYYY-MM-DD HH:mm:ss") {
161
+ const getResponseClone = async (res)=>await (typeof (res === null || res === void 0 ? void 0 : res.clone) === "function" ? res.clone() : clone(res));
162
+ function transformUTCTimeToLocal(date, format = "YYYY-MM-DD HH:mm:ss") {
51
163
  if (!date) return;
52
- const utcDate = moment.utc(date).toDate();
53
- return moment(utcDate, format).local().format(format);
164
+ const utcDate = _momenttimezone.default.utc(date).toDate();
165
+ return (0, _momenttimezone.default)(utcDate, format).local().format(format);
54
166
  }
55
- export function transformLocalTimeToUTC(date, format = "YYYY-MM-DD HH:mm:ss") {
167
+ function transformLocalTimeToUTC(date, format = "YYYY-MM-DD HH:mm:ss") {
56
168
  if (!date) return;
57
- return moment(date, format).utc().format(format);
169
+ return (0, _momenttimezone.default)(date, format).utc().format(format);
58
170
  }
59
- export function transformUTCHoursToLocal(time, format = "HH:mm:ss") {
171
+ function transformUTCHoursToLocal(time, format = "HH:mm:ss") {
60
172
  if (!time) return;
61
173
  const splitedTime = time.split(":");
62
- const offset = moment().utcOffset();
174
+ const offset = (0, _momenttimezone.default)().utcOffset();
63
175
  let HH = Number(splitedTime[0]);
64
176
  let mm = Number(splitedTime[1]);
65
177
  const ss = splitedTime[2];
@@ -76,13 +188,12 @@ export function transformUTCHoursToLocal(time, format = "HH:mm:ss") {
76
188
  if (HH < 0) HH += 24;
77
189
  return `${HH}:${mm}:${ss}`;
78
190
  }
79
- //? Намерянно значением по умолчанию назначаю самый информационно-маленький паттерн
80
- export function transformDateOrTimeOrTogetherToFormat(data, outputFormat = "HH:mm", additional) {
191
+ function transformDateOrTimeOrTogetherToFormat(data, outputFormat = "HH:mm", additional) {
81
192
  const ERROR_VALUE = "Invalid date";
82
193
  const ERROR_MESSGE = `Invalid input data for ${outputFormat} format`;
83
194
  const { parseFormat, isReturnAsMomentInstance } = getIsOnlyAnObject(additional) ? additional : {};
84
195
  if (typeof data !== "string" && typeof data !== "number") {
85
- return isReturnAsMomentInstance ? moment("error") : ERROR_MESSGE;
196
+ return isReturnAsMomentInstance ? (0, _momenttimezone.default)("error") : ERROR_MESSGE;
86
197
  }
87
198
  //? Игнорируем parseFormat, если data пришла как timestamp или если parseFormat не строка
88
199
  const momentArgs = [
@@ -93,7 +204,7 @@ export function transformDateOrTimeOrTogetherToFormat(data, outputFormat = "HH:m
93
204
  ];
94
205
  //? Задача получить moment-экземпляр, валидный либо невалидный
95
206
  const momentInstance = (()=>{
96
- let instance = moment(...momentArgs);
207
+ let instance = (0, _momenttimezone.default)(...momentArgs);
97
208
  //? Проверяем валидность moment-экземпляр-а путем попытки привести его к выходному формату
98
209
  //? Попадем в этот кейс если
99
210
  //? - data это timestamp
@@ -101,7 +212,7 @@ export function transformDateOrTimeOrTogetherToFormat(data, outputFormat = "HH:m
101
212
  //? - data это строка в формате date (в этом случае время выставится 00:00:00)
102
213
  if (instance.format(outputFormat) !== ERROR_VALUE) return instance;
103
214
  else if (/^\d\d.\d\d/.test(data)) {
104
- instance = moment();
215
+ instance = (0, _momenttimezone.default)();
105
216
  const symbols = data.split("");
106
217
  const timeArr = symbols.reduce((acc, symbol, idx)=>{
107
218
  if (Number.isNaN(Number(symbol))) {
@@ -121,15 +232,14 @@ export function transformDateOrTimeOrTogetherToFormat(data, outputFormat = "HH:m
121
232
  instance.minutes(Number(timeArr.pop()));
122
233
  instance.seconds(timeArr.length ? Number(timeArr.pop()) : 0);
123
234
  instance.milliseconds(timeArr.length ? Number(timeArr.pop()) : 0);
124
- } else instance = moment("error"); //? Иначе создаем заведомо невалидный moment-экземпляр
235
+ } else instance = (0, _momenttimezone.default)("error"); //? Иначе создаем заведомо невалидный moment-экземпляр
125
236
  return instance;
126
237
  })();
127
238
  if (isReturnAsMomentInstance) return momentInstance;
128
239
  const output = momentInstance.format(outputFormat);
129
240
  return output === ERROR_VALUE ? ERROR_MESSGE : output;
130
241
  }
131
- //? Намерянно значением по умолчанию назначаю самый информационно-маленький паттерн
132
- export function transformDateOrTimeOrTogetherToFormattedLocal(data, outputFormat = "HH:mm", additional) {
242
+ function transformDateOrTimeOrTogetherToFormattedLocal(data, outputFormat = "HH:mm", additional) {
133
243
  const ERROR_VALUE = "Invalid date";
134
244
  const ERROR_MESSGE = `Invalid input data for ${outputFormat} format`;
135
245
  if (additional && !getIsOnlyAnObject(additional)) {
@@ -140,30 +250,28 @@ export function transformDateOrTimeOrTogetherToFormattedLocal(data, outputFormat
140
250
  isReturnAsMomentInstance: true
141
251
  };
142
252
  const date = transformDateOrTimeOrTogetherToFormat(data, outputFormat, compositeAdditional);
143
- const dateWithLocale = date.add(moment().utcOffset(), "minutes");
253
+ const dateWithLocale = date.add((0, _momenttimezone.default)().utcOffset(), "minutes");
144
254
  const output = dateWithLocale.format(outputFormat);
145
255
  return output === ERROR_VALUE ? ERROR_MESSGE : output;
146
256
  }
147
- //принимает обьект и массив ключей обьекта
148
- //возвращает обьект с теми полями, которых нет в массиве ключей
149
- export const omitKeys = (obj = {}, keys = [])=>keys.reduce((acc, key)=>{
257
+ const omitKeys = (obj = {}, keys = [])=>keys.reduce((acc, key)=>{
150
258
  const { [key]: omit, ...rest } = acc;
151
259
  return rest;
152
260
  }, obj);
153
- export const logout = ()=>{
261
+ const logout = ()=>{
154
262
  window.localStorage.removeItem("accessToken");
155
263
  window.localStorage.removeItem("tokenExpires");
156
264
  window.location.reload();
157
265
  };
158
- export const getStyles = (el, prop)=>{
266
+ const getStyles = (el, prop)=>{
159
267
  if (!el) return null;
160
268
  if (!prop) return window.getComputedStyle(el);
161
269
  return window.getComputedStyle(el).getPropertyValue(prop);
162
270
  };
163
- export const getColorById = (id, colors)=>{
271
+ const getColorById = (id, colors)=>{
164
272
  if (!id) return "#FF7D00";
165
273
  const idToArr = Array.from(id);
166
- const colorsArr = colors && colors.length > 0 ? colors : DEFAULT_COLORS;
274
+ const colorsArr = colors && colors.length > 0 ? colors : _indexconstants.DEFAULT_COLORS;
167
275
  let number = idToArr.reduce((acc, item)=>{
168
276
  if (Number(item)) {
169
277
  return acc + Number(item);
@@ -175,7 +283,7 @@ export const getColorById = (id, colors)=>{
175
283
  }
176
284
  return colorsArr[number];
177
285
  };
178
- export const debounce = (fn, ms)=>{
286
+ const debounce = (fn, ms)=>{
179
287
  let id = null;
180
288
  return (...args)=>{
181
289
  clearTimeout(id);
@@ -185,7 +293,7 @@ export const debounce = (fn, ms)=>{
185
293
  }, ms);
186
294
  };
187
295
  };
188
- export const throttle = (fn, ms)=>{
296
+ const throttle = (fn, ms)=>{
189
297
  let id = null;
190
298
  return (...args)=>{
191
299
  if (id) return;
@@ -196,7 +304,7 @@ export const throttle = (fn, ms)=>{
196
304
  }, ms);
197
305
  };
198
306
  };
199
- export const addBitDepthPoints = (value, step = 3)=>{
307
+ const addBitDepthPoints = (value, step = 3)=>{
200
308
  //содержит ли value точку
201
309
  const isFraction = value === null || value === void 0 ? void 0 : value.includes(".");
202
310
  //взять строку до точки
@@ -212,7 +320,7 @@ export const addBitDepthPoints = (value, step = 3)=>{
212
320
  ], []).reverse().join("");
213
321
  return isFraction ? intPart + (value === null || value === void 0 ? void 0 : value.slice(value === null || value === void 0 ? void 0 : value.indexOf("."))) : intPart;
214
322
  };
215
- export const changeMeta = (key, items = [])=>{
323
+ const changeMeta = (key, items = [])=>{
216
324
  const defaultMeta = items.find((i)=>i.key === "default");
217
325
  if (key) {
218
326
  const item = items.find((i)=>i.key === key);
@@ -222,10 +330,10 @@ export const changeMeta = (key, items = [])=>{
222
330
  document.querySelector('meta[name="description"]').setAttribute("content", (_item_description = item === null || item === void 0 ? void 0 : item.description) !== null && _item_description !== void 0 ? _item_description : defaultMeta === null || defaultMeta === void 0 ? void 0 : defaultMeta.description);
223
331
  }
224
332
  };
225
- export const firstLetterCapital = (str)=>typeof str === "string" ? `${str.charAt(0).toUpperCase()}${str.slice(1)}` : str;
226
- export const capitalized = firstLetterCapital;
227
- export const checkedRef = (ref)=>ref ? typeof ref === "function" ? (node)=>ref(node) : ref : null;
228
- export function downloadEmulation(data, filename, type = "image/*") {
333
+ const firstLetterCapital = (str)=>typeof str === "string" ? `${str.charAt(0).toUpperCase()}${str.slice(1)}` : str;
334
+ const capitalized = firstLetterCapital;
335
+ const checkedRef = (ref)=>ref ? typeof ref === "function" ? (node)=>ref(node) : ref : null;
336
+ function downloadEmulation(data, filename, type = "image/*") {
229
337
  const file = new Blob([
230
338
  data
231
339
  ], {
@@ -246,14 +354,14 @@ export function downloadEmulation(data, filename, type = "image/*") {
246
354
  }, 0);
247
355
  }
248
356
  }
249
- export const downloadFile = async ({ url, name, type })=>{
357
+ const downloadFile = async ({ url, name, type })=>{
250
358
  const response = await fetch(url).then(async (res)=>({
251
359
  data: await res.blob(),
252
360
  type: type !== null && type !== void 0 ? type : res.headers.get("content-type")
253
361
  }));
254
362
  downloadEmulation(response.data, name, response.type);
255
363
  };
256
- export const compare = (first, second, keys = [])=>{
364
+ const compare = (first, second, keys = [])=>{
257
365
  //? Если типы НЕ равны - не равны априори
258
366
  if (typeof first !== typeof second) return false;
259
367
  //? Если ответы на вопрос "массив ли?" не равны, то не равны и типы, значит тоже не равны априори
@@ -275,15 +383,14 @@ export const compare = (first, second, keys = [])=>{
275
383
  const structureForComparingOfSecond = getComparationStructure(second);
276
384
  return JSON.stringify(structureForComparingOfFirst) === JSON.stringify(structureForComparingOfSecond);
277
385
  };
278
- // Set Carret to the End of Input
279
- export const setCarretToEnd = (input)=>{
386
+ const setCarretToEnd = (input)=>{
280
387
  setTimeout(()=>{
281
388
  const tmp = input.value;
282
389
  input.value = "";
283
390
  input.value = tmp;
284
391
  }, 10);
285
392
  };
286
- export const compareAlphabetical = (a, b, key = "label")=>{
393
+ const compareAlphabetical = (a, b, key = "label")=>{
287
394
  let item1 = a === null || a === void 0 ? void 0 : a[key];
288
395
  let item2 = b === null || b === void 0 ? void 0 : b[key];
289
396
  if (typeof item1 !== "string" || typeof item2 !== "string") return 0;
@@ -297,7 +404,7 @@ export const compareAlphabetical = (a, b, key = "label")=>{
297
404
  }
298
405
  return 0;
299
406
  };
300
- export const getBase64 = (file)=>{
407
+ const getBase64 = (file)=>{
301
408
  if (file) {
302
409
  return new Promise(function(resolve, reject) {
303
410
  const reader = new FileReader();
@@ -307,7 +414,7 @@ export const getBase64 = (file)=>{
307
414
  });
308
415
  }
309
416
  };
310
- export const renderFileSize = (bytes, decimals = 2)=>{
417
+ const renderFileSize = (bytes, decimals = 2)=>{
311
418
  if (!Number(bytes)) return "0 Bytes";
312
419
  const k = 1024;
313
420
  const dm = decimals < 0 ? 0 : decimals;
@@ -320,7 +427,7 @@ export const renderFileSize = (bytes, decimals = 2)=>{
320
427
  const i = Math.floor(Math.log(bytes) / Math.log(k));
321
428
  return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;
322
429
  };
323
- export const getUniqueFileExtensions = (extListString)=>{
430
+ const getUniqueFileExtensions = (extListString)=>{
324
431
  // Split the extensions list into an array
325
432
  const extArray = extListString === null || extListString === void 0 ? void 0 : extListString.split(",").map((ext)=>ext.trim().toUpperCase());
326
433
  // Remove duplicates using a Set
@@ -330,7 +437,7 @@ export const getUniqueFileExtensions = (extListString)=>{
330
437
  // Join the unique extensions into a string
331
438
  return uniqueExts.join(", ");
332
439
  };
333
- export const getOS = ()=>{
440
+ const getOS = ()=>{
334
441
  var _window_navigator_userAgentData, _window_navigator;
335
442
  let userAgent = window.navigator.userAgent, platform = ((_window_navigator = window.navigator) === null || _window_navigator === void 0 ? void 0 : (_window_navigator_userAgentData = _window_navigator.userAgentData) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform, macosPlatforms = [
336
443
  "Macintosh",
@@ -346,21 +453,21 @@ export const getOS = ()=>{
346
453
  "iPhone",
347
454
  "iPad",
348
455
  "iPod"
349
- ], os = OS.Unknown;
456
+ ], os = _indexconstants.OS.Unknown;
350
457
  if (macosPlatforms.indexOf(platform) !== -1) {
351
- os = OS.MacOS;
458
+ os = _indexconstants.OS.MacOS;
352
459
  } else if (iosPlatforms.indexOf(platform) !== -1) {
353
- os = OS.iOS;
460
+ os = _indexconstants.OS.iOS;
354
461
  } else if (windowsPlatforms.indexOf(platform) !== -1) {
355
- os = OS.Windows;
462
+ os = _indexconstants.OS.Windows;
356
463
  } else if (/Android/.test(userAgent)) {
357
- os = OS.Android;
464
+ os = _indexconstants.OS.Android;
358
465
  } else if (/Linux/.test(platform)) {
359
- os = OS.Linux;
466
+ os = _indexconstants.OS.Linux;
360
467
  }
361
468
  return os;
362
469
  };
363
- export const disableDefaultBehavior = (e)=>{
470
+ const disableDefaultBehavior = (e)=>{
364
471
  e === null || e === void 0 ? void 0 : e.preventDefault();
365
472
  e === null || e === void 0 ? void 0 : e.stopPropagation();
366
473
  };
@@ -372,9 +479,8 @@ String.prototype.lastIndexEqualsTo = function(index) {
372
479
  var _this;
373
480
  return ((_this = this) === null || _this === void 0 ? void 0 : _this.length) - 1 === index;
374
481
  };
375
- export const getCorrectTestId = ({ testId = "", withTier = true })=>testId && testId !== undefined ? `${withTier ? "-" : ""}${testId}` : "";
376
- //? Метод возращает корректно обрезанную маску с учетом лимита значащих символов
377
- export const getLimitedMask = (props)=>{
482
+ const getCorrectTestId = ({ testId = "", withTier = true })=>testId && testId !== undefined ? `${withTier ? "-" : ""}${testId}` : "";
483
+ const getLimitedMask = (props)=>{
378
484
  const { mask = '', significantChars = [], limit, isOnlyMask = true } = props;
379
485
  // ? Проверяем основные входные пропы
380
486
  if (typeof mask !== 'string' || !Array.isArray(significantChars) || !significantChars.every((item)=>typeof item === 'string' && item.length === 1)) {
package/dist/If.d.ts ADDED
@@ -0,0 +1,34 @@
1
+ import type { PrettyPrint } from './PrettyPrint';
2
+
3
+ /**
4
+ * Утилитарный тип для условного ветвления на уровне типов.
5
+ *
6
+ * @template C - Условие (должно быть boolean)
7
+ * @template T - Тип, возвращаемый при истинном условии
8
+ * @template F - Тип, возвращаемый при ложном условии
9
+ *
10
+ * @description
11
+ * Позволяет выбирать между двумя типами на основе условия.
12
+ * Работает аналогично тернарному оператору в JavaScript.
13
+ * Может использоваться в сложных типовых конструкциях для создания условной логики.
14
+ *
15
+ * @example
16
+ * Простое условие
17
+ * type IsString<T> = T extends string ? true : false;
18
+ * type Result = If<IsString<"text">, number, string>; // number
19
+ *
20
+ * Проверка пустого объекта
21
+ * type IsEmpty<T> = T extends {} ? keyof T extends never ? true : false : false;
22
+ * type EmptyCheck = If<IsEmpty<{}>, "Empty", "Not Empty">; // "Empty"
23
+ *
24
+ * Условная типизация в интерфейсах
25
+ * interface Config<T> {
26
+ * value: If<T extends number, "numeric", "non-numeric">;
27
+ * data: If<T extends string, string[], number[]>;
28
+ * }
29
+ *
30
+ * Использование с дженериками
31
+ * type ArrayType<T> = If<T extends any[], T[number], T>;
32
+ * type ElementType = ArrayType<string[]>; // string
33
+ */
34
+ export type If<C extends boolean, T, F> = PrettyPrint<C extends true ? T : F>
@@ -0,0 +1,10 @@
1
+ import type { PrettyPrint } from './PrettyPrint';
2
+
3
+ /**
4
+ * Извлекает все ключи объекта T в виде union типа.
5
+ * @template T - Тип объекта, из которого извлекаются ключи
6
+ * @example
7
+ * type Person = { name: string; age: number }
8
+ * type PersonKeys = KeysType<Person> // "name" | "age"
9
+ */
10
+ export type KeysType<T> = PrettyPrint<keyof T>
@@ -1,24 +1,75 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from "react";
3
- export const AffiliateNetworks = (props)=>/*#__PURE__*/ _jsxs("svg", {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "AffiliateNetworks", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return AffiliateNetworks;
9
+ }
10
+ });
11
+ const _jsxruntime = require("react/jsx-runtime");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
13
+ function _getRequireWildcardCache(nodeInterop) {
14
+ if (typeof WeakMap !== "function") return null;
15
+ var cacheBabelInterop = new WeakMap();
16
+ var cacheNodeInterop = new WeakMap();
17
+ return (_getRequireWildcardCache = function(nodeInterop) {
18
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
19
+ })(nodeInterop);
20
+ }
21
+ function _interop_require_wildcard(obj, nodeInterop) {
22
+ if (!nodeInterop && obj && obj.__esModule) {
23
+ return obj;
24
+ }
25
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
26
+ return {
27
+ default: obj
28
+ };
29
+ }
30
+ var cache = _getRequireWildcardCache(nodeInterop);
31
+ if (cache && cache.has(obj)) {
32
+ return cache.get(obj);
33
+ }
34
+ var newObj = {
35
+ __proto__: null
36
+ };
37
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
38
+ for(var key in obj){
39
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
40
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
41
+ if (desc && (desc.get || desc.set)) {
42
+ Object.defineProperty(newObj, key, desc);
43
+ } else {
44
+ newObj[key] = obj[key];
45
+ }
46
+ }
47
+ }
48
+ newObj.default = obj;
49
+ if (cache) {
50
+ cache.set(obj, newObj);
51
+ }
52
+ return newObj;
53
+ }
54
+ const AffiliateNetworks = (props)=>/*#__PURE__*/ (0, _jsxruntime.jsxs)("svg", {
4
55
  xmlns: "http://www.w3.org/2000/svg",
5
56
  xmlSpace: "preserve",
6
57
  viewBox: "0 0 24 24",
7
58
  ...props,
8
59
  children: [
9
- /*#__PURE__*/ _jsx("path", {
60
+ /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
10
61
  fill: "none",
11
62
  stroke: "#9AA0B9",
12
63
  d: "M17 21v-2c0-2.2-1.8-4-4-4H5c-2.2 0-4 1.8-4 4v2"
13
64
  }),
14
- /*#__PURE__*/ _jsx("circle", {
65
+ /*#__PURE__*/ (0, _jsxruntime.jsx)("circle", {
15
66
  cx: 9,
16
67
  cy: 7,
17
68
  r: 4,
18
69
  fill: "none",
19
70
  stroke: "#9AA0B9"
20
71
  }),
21
- /*#__PURE__*/ _jsx("path", {
72
+ /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
22
73
  fill: "none",
23
74
  stroke: "#9AA0B9",
24
75
  d: "M23 21v-2c0-1.8-1.2-3.4-3-3.9M16 3.1c2.1.5 3.4 2.7 2.9 4.9-.4 1.4-1.5 2.5-2.9 2.9"
@@ -1,6 +1,57 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from "react";
3
- export const AlertCircle = (props)=>/*#__PURE__*/ _jsxs("svg", {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "AlertCircle", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return AlertCircle;
9
+ }
10
+ });
11
+ const _jsxruntime = require("react/jsx-runtime");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
13
+ function _getRequireWildcardCache(nodeInterop) {
14
+ if (typeof WeakMap !== "function") return null;
15
+ var cacheBabelInterop = new WeakMap();
16
+ var cacheNodeInterop = new WeakMap();
17
+ return (_getRequireWildcardCache = function(nodeInterop) {
18
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
19
+ })(nodeInterop);
20
+ }
21
+ function _interop_require_wildcard(obj, nodeInterop) {
22
+ if (!nodeInterop && obj && obj.__esModule) {
23
+ return obj;
24
+ }
25
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
26
+ return {
27
+ default: obj
28
+ };
29
+ }
30
+ var cache = _getRequireWildcardCache(nodeInterop);
31
+ if (cache && cache.has(obj)) {
32
+ return cache.get(obj);
33
+ }
34
+ var newObj = {
35
+ __proto__: null
36
+ };
37
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
38
+ for(var key in obj){
39
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
40
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
41
+ if (desc && (desc.get || desc.set)) {
42
+ Object.defineProperty(newObj, key, desc);
43
+ } else {
44
+ newObj[key] = obj[key];
45
+ }
46
+ }
47
+ }
48
+ newObj.default = obj;
49
+ if (cache) {
50
+ cache.set(obj, newObj);
51
+ }
52
+ return newObj;
53
+ }
54
+ const AlertCircle = (props)=>/*#__PURE__*/ (0, _jsxruntime.jsxs)("svg", {
4
55
  xmlns: "http://www.w3.org/2000/svg",
5
56
  xmlSpace: "preserve",
6
57
  id: "Layer_1",
@@ -12,16 +63,16 @@ export const AlertCircle = (props)=>/*#__PURE__*/ _jsxs("svg", {
12
63
  viewBox: "0 0 24 24",
13
64
  ...props,
14
65
  children: [
15
- /*#__PURE__*/ _jsx("style", {
66
+ /*#__PURE__*/ (0, _jsxruntime.jsx)("style", {
16
67
  children: ".st0{fill:none;stroke:#f06d8d;strokeWidth:2;strokeLinecap:round;strokeLinejoin:round}"
17
68
  }),
18
- /*#__PURE__*/ _jsx("circle", {
69
+ /*#__PURE__*/ (0, _jsxruntime.jsx)("circle", {
19
70
  cx: 12,
20
71
  cy: 12,
21
72
  r: 10,
22
73
  className: "st0"
23
74
  }),
24
- /*#__PURE__*/ _jsx("path", {
75
+ /*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
25
76
  d: "M12 8v4M12 16",
26
77
  className: "st0"
27
78
  })