intelicoreact 1.6.25 → 1.6.27

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 (275) hide show
  1. package/dist/Atomic/FormElements/ActionAlert/ActionAlert.js +1 -98
  2. package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +1 -48
  3. package/dist/Atomic/FormElements/Calendar/Calendar.js +1 -249
  4. package/dist/Atomic/FormElements/Calendar/Calendar.props.js +1 -4
  5. package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +1 -65
  6. package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +1 -52
  7. package/dist/Atomic/FormElements/Datepicker/Datepicker.js +1 -424
  8. package/dist/Atomic/FormElements/Datepicker/Datepicker.props.js +1 -4
  9. package/dist/Atomic/FormElements/Datepicker/components/DatepickerCalendar.js +1 -173
  10. package/dist/Atomic/FormElements/Datepicker/components/DatepickerCalendar.props.js +1 -4
  11. package/dist/Atomic/FormElements/Dropdown/Dropdown.d.ts +5 -0
  12. package/dist/Atomic/FormElements/Dropdown/Dropdown.js +1 -735
  13. package/dist/Atomic/FormElements/Dropdown/Dropdown.js.map +1 -0
  14. package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +1 -20
  15. package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +1 -529
  16. package/dist/Atomic/FormElements/FileLoader/FileLoader.js +1 -94
  17. package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +1 -105
  18. package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +1 -67
  19. package/dist/Atomic/FormElements/FileLoaderDescription/FileLoaderDescription.js +1 -247
  20. package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +1 -160
  21. package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +1 -193
  22. package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +1 -135
  23. package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN_old.js +1 -116
  24. package/dist/Atomic/FormElements/Input/Input.js +1 -467
  25. package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +1 -161
  26. package/dist/Atomic/FormElements/InputColor/InputColor.js +1 -64
  27. package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +1 -200
  28. package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +1 -354
  29. package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +1 -71
  30. package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +1 -693
  31. package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +1 -254
  32. package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +1 -32
  33. package/dist/Atomic/FormElements/InputDateRange/dependencies.js +1 -200
  34. package/dist/Atomic/FormElements/InputLink/InputLink.js +1 -99
  35. package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +1 -37
  36. package/dist/Atomic/FormElements/InputMask/InputMask.js +1 -1214
  37. package/dist/Atomic/FormElements/InputMask/config.js +1 -15
  38. package/dist/Atomic/FormElements/InputMask/functions.js +1 -58
  39. package/dist/Atomic/FormElements/InputMask2/InputMask2.js +1 -674
  40. package/dist/Atomic/FormElements/InputMask2/config.js +1 -15
  41. package/dist/Atomic/FormElements/InputMask2/functions.js +1 -58
  42. package/dist/Atomic/FormElements/InputMask3/InputMask3.js +1 -766
  43. package/dist/Atomic/FormElements/InputMask3/config.js +1 -15
  44. package/dist/Atomic/FormElements/InputMask3/functions.js +1 -58
  45. package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +1 -114
  46. package/dist/Atomic/FormElements/InputsRow/InputsRow.js +1 -140
  47. package/dist/Atomic/FormElements/Label/Label.js +1 -87
  48. package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +1 -506
  49. package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +1 -45
  50. package/dist/Atomic/FormElements/NumericInput/NumericInput.js +1 -331
  51. package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +1 -66
  52. package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +1 -80
  53. package/dist/Atomic/FormElements/RadioInput/RadioInput.js +1 -57
  54. package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +1 -54
  55. package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +1 -183
  56. package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +1 -222
  57. package/dist/Atomic/FormElements/RangeList/RangeList.js +1 -175
  58. package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +1 -43
  59. package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +1 -443
  60. package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +1 -858
  61. package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +1 -39
  62. package/dist/Atomic/FormElements/Switcher/Switcher.js +1 -59
  63. package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +1 -50
  64. package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +1 -44
  65. package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +1 -100
  66. package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +1 -52
  67. package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +1 -64
  68. package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +1 -170
  69. package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +1 -202
  70. package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +1 -67
  71. package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.js +1 -115
  72. package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +1 -1110
  73. package/dist/Atomic/FormElements/Text/Text.js +1 -125
  74. package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +1 -49
  75. package/dist/Atomic/FormElements/Textarea/Textarea.js +1 -80
  76. package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +1 -176
  77. package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +1 -62
  78. package/dist/Atomic/FormElements/TimeRange/TimeRange.js +1 -119
  79. package/dist/Atomic/FormElements/UserContacts/UserContacts.js +1 -188
  80. package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +1 -83
  81. package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +1 -82
  82. package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +1 -101
  83. package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +1 -29
  84. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +1 -113
  85. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +1 -30
  86. package/dist/Atomic/Layout/Header/Header.js +1 -85
  87. package/dist/Atomic/Layout/Spinner/Spinner.js +1 -44
  88. package/dist/Atomic/UI/Accordion/Accordion.js +1 -108
  89. package/dist/Atomic/UI/Accordion/AccordionItem.js +1 -176
  90. package/dist/Atomic/UI/AccordionTable/AccordionTable.js +1 -238
  91. package/dist/Atomic/UI/AccordionText/AccordionText.js +1 -69
  92. package/dist/Atomic/UI/AdvancedTag/AdvTag.js +1 -207
  93. package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +1 -56
  94. package/dist/Atomic/UI/Alert/Alert.js +1 -72
  95. package/dist/Atomic/UI/Arrow/Arrow.js +1 -132
  96. package/dist/Atomic/UI/Box/Box.js +1 -52
  97. package/dist/Atomic/UI/Button/Button.js +1 -47
  98. package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +1 -72
  99. package/dist/Atomic/UI/Chart/Chart.js +1 -172
  100. package/dist/Atomic/UI/Chart/partial/Chart.constants.js +1 -95
  101. package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +1 -80
  102. package/dist/Atomic/UI/Chart/partial/datasetSetters.js +1 -188
  103. package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +1 -335
  104. package/dist/Atomic/UI/Chart/partial/optionsSetters.js +1 -43
  105. package/dist/Atomic/UI/Chart/partial/utils.js +1 -60
  106. package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +1 -109
  107. package/dist/Atomic/UI/DateTime/DateTime.js +1 -57
  108. package/dist/Atomic/UI/DebugContainer/DebugContainer.js +1 -44
  109. package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +1 -15
  110. package/dist/Atomic/UI/DoubleString/DoubleString.js +1 -102
  111. package/dist/Atomic/UI/DoubleString/DoubleString.scss +8 -1
  112. package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +1 -70
  113. package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +1 -221
  114. package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +1 -106
  115. package/dist/Atomic/UI/Hint/Hint.js +1 -256
  116. package/dist/Atomic/UI/Hint/partials/_utils.js +1 -64
  117. package/dist/Atomic/UI/Modal/Modal.js +1 -179
  118. package/dist/Atomic/UI/Modal/ModalHOC.js +1 -97
  119. package/dist/Atomic/UI/Modal/partials/ModalFooter.js +1 -71
  120. package/dist/Atomic/UI/Modal/partials/ModalTitle.js +1 -110
  121. package/dist/Atomic/UI/Modal/partials/useMobileModal.js +1 -192
  122. package/dist/Atomic/UI/MonoAccordion/MonoAccordion._test.js +1 -75
  123. package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +1 -80
  124. package/dist/Atomic/UI/NavLine/NavLine.js +1 -317
  125. package/dist/Atomic/UI/PageTitle/PageTitle.js +1 -77
  126. package/dist/Atomic/UI/PieChart/PieChart.js +1 -42
  127. package/dist/Atomic/UI/Price/Price.js +1 -31
  128. package/dist/Atomic/UI/PriceRange/PriceRange.js +1 -44
  129. package/dist/Atomic/UI/ProgressLine/ProgressLine.js +1 -98
  130. package/dist/Atomic/UI/Status/Status.js +1 -67
  131. package/dist/Atomic/UI/Table/Partials/TdCell.js +1 -87
  132. package/dist/Atomic/UI/Table/Partials/TdHeader.js +1 -38
  133. package/dist/Atomic/UI/Table/Partials/TdRow.js +1 -99
  134. package/dist/Atomic/UI/Table/Partials/TdTitle.js +1 -52
  135. package/dist/Atomic/UI/Table/Table.js +1 -63
  136. package/dist/Atomic/UI/Table/TdTypes/TdActions.js +1 -80
  137. package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +1 -28
  138. package/dist/Atomic/UI/Table/TdTypes/TdRange.js +1 -13
  139. package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +1 -53
  140. package/dist/Atomic/UI/Tag/Tag.js +1 -167
  141. package/dist/Atomic/UI/TagList/TagList.js +1 -251
  142. package/dist/Atomic/UI/UserBox/UserBox.js +1 -86
  143. package/dist/Atomic/UI/WizardStepper/constructor.js +1 -84
  144. package/dist/Atomic/UI/WizardStepper/index.js +1 -3
  145. package/dist/Atomic/UI/WizardStepper/ui/StateIcon/StateIcon.js +1 -37
  146. package/dist/Atomic/UI/WizardStepper/ui/StateIcon/index.js +1 -3
  147. package/dist/Atomic/UI/WizardStepper/ui/StepRow/StepRow.js +1 -61
  148. package/dist/Atomic/UI/WizardStepper/ui/StepRow/index.js +1 -3
  149. package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/StepWrapper.js +1 -39
  150. package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/index.js +1 -3
  151. package/dist/Atomic/UI/WizardStepper/ui/icons.js +1 -49
  152. package/dist/Atomic/UI/WizardStepper/ui/index.js +1 -3
  153. package/dist/Classes/AbortableFetch.js +1 -454
  154. package/dist/Classes/AnimatedHandler.js +1 -47
  155. package/dist/Classes/RESTAPI/index.js +1 -228
  156. package/dist/Classes/RESTAPI/partials/AbortableFetch.js +1 -457
  157. package/dist/Classes/RESTAPI/partials/ApiBase.js +1 -48
  158. package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +1 -112
  159. package/dist/Classes/RESTAPI/partials/ApiUtils.js +1 -189
  160. package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +1 -252
  161. package/dist/Classes/RESTAPI/partials/Utils.js +1 -92
  162. package/dist/Classes/RESTAPI/partials/_outerDependencies.js +1 -3
  163. package/dist/Classes/RESTAPI/partials/_utils.js +1 -197
  164. package/dist/Constants/index.constants.js +1 -78
  165. package/dist/Functions/Portal.js +1 -22
  166. package/dist/Functions/customEventListener.js +1 -96
  167. package/dist/Functions/dateTime.js +1 -149
  168. package/dist/Functions/fieldValueFormatters.js +1 -405
  169. package/dist/Functions/guards/assertions.js +1 -294
  170. package/dist/Functions/guards/safeValue.js +1 -75
  171. package/dist/Functions/guards/typeGuards.js +1 -373
  172. package/dist/Functions/hooks/useFormFieldsChangesManager.js +1 -95
  173. package/dist/Functions/locale/createTranslator.js +1 -32
  174. package/dist/Functions/operations.js +1 -130
  175. package/dist/Functions/presets/inputMaskPresets.js +1 -170
  176. package/dist/Functions/presets/inputPresets.js +1 -60
  177. package/dist/Functions/presets/mobileKeyboardTypesPresets.js +1 -45
  178. package/dist/Functions/schemas.js +1 -31
  179. package/dist/Functions/useBodyScrollLock.js +1 -17
  180. package/dist/Functions/useClickOutside.js +1 -15
  181. package/dist/Functions/useDebounce.js +1 -17
  182. package/dist/Functions/useFieldFocus.js +1 -84
  183. package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +1 -39
  184. package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +1 -159
  185. package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +1 -78
  186. package/dist/Functions/useFormTools/functions/General.js +1 -134
  187. package/dist/Functions/useFormTools/functions/RenderFields.js +1 -111
  188. package/dist/Functions/useFormTools/functions/usePrevious.js +1 -12
  189. package/dist/Functions/useFormTools/index.js +1 -778
  190. package/dist/Functions/useInputHighlightError.js +1 -67
  191. package/dist/Functions/useIsMobile/useIsMobile.js +1 -33
  192. package/dist/Functions/useKeyPress/useHandleKeyPress.js +1 -52
  193. package/dist/Functions/useKeyPress/useKeyPress.js +1 -52
  194. package/dist/Functions/useLocalStorage.js +1 -34
  195. package/dist/Functions/useLocationParams.js +1 -27
  196. package/dist/Functions/useMediaQuery.js +1 -17
  197. package/dist/Functions/useMetaInfo.js +1 -43
  198. package/dist/Functions/useMouseUpOutside.js +1 -16
  199. package/dist/Functions/useOnlineStatus.js +1 -29
  200. package/dist/Functions/usePasswordChecker.js +1 -110
  201. package/dist/Functions/usePrevious.js +1 -12
  202. package/dist/Functions/useResize.js +1 -31
  203. package/dist/Functions/useScrollTo.js +1 -17
  204. package/dist/Functions/useToggle.js +1 -17
  205. package/dist/Functions/utils.js +1 -522
  206. package/dist/Langs.js +1 -168
  207. package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +1 -21
  208. package/dist/Molecular/CustomIcons/components/AlertCircle.js +1 -23
  209. package/dist/Molecular/CustomIcons/components/AppStore.js +1 -29
  210. package/dist/Molecular/CustomIcons/components/Arrow.js +1 -32
  211. package/dist/Molecular/CustomIcons/components/ArrowDown.js +1 -17
  212. package/dist/Molecular/CustomIcons/components/ArrowLeft.js +1 -22
  213. package/dist/Molecular/CustomIcons/components/ArrowRight.js +1 -22
  214. package/dist/Molecular/CustomIcons/components/ArrowUp.js +1 -17
  215. package/dist/Molecular/CustomIcons/components/Bell.js +1 -15
  216. package/dist/Molecular/CustomIcons/components/Button.js +1 -12
  217. package/dist/Molecular/CustomIcons/components/Campaigns.js +1 -16
  218. package/dist/Molecular/CustomIcons/components/Check.js +1 -14
  219. package/dist/Molecular/CustomIcons/components/Check2.js +1 -12
  220. package/dist/Molecular/CustomIcons/components/ChevronDown.js +1 -12
  221. package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +1 -11
  222. package/dist/Molecular/CustomIcons/components/ChevronLeft.js +1 -11
  223. package/dist/Molecular/CustomIcons/components/ChevronRight.js +1 -11
  224. package/dist/Molecular/CustomIcons/components/ChevronUp.js +1 -11
  225. package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +1 -27
  226. package/dist/Molecular/CustomIcons/components/Close.js +1 -14
  227. package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +1 -17
  228. package/dist/Molecular/CustomIcons/components/Delete.js +1 -16
  229. package/dist/Molecular/CustomIcons/components/Edit.js +1 -15
  230. package/dist/Molecular/CustomIcons/components/Email.js +1 -31
  231. package/dist/Molecular/CustomIcons/components/FinturfLogo.js +1 -18
  232. package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +1 -35
  233. package/dist/Molecular/CustomIcons/components/Flows.js +1 -15
  234. package/dist/Molecular/CustomIcons/components/Gift.js +1 -25
  235. package/dist/Molecular/CustomIcons/components/GoogleAuth.js +1 -29
  236. package/dist/Molecular/CustomIcons/components/GooglePlay.js +1 -29
  237. package/dist/Molecular/CustomIcons/components/HelpCircle.js +1 -19
  238. package/dist/Molecular/CustomIcons/components/HelpCircle2.js +1 -20
  239. package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +1 -19
  240. package/dist/Molecular/CustomIcons/components/Home.js +1 -16
  241. package/dist/Molecular/CustomIcons/components/Home2.js +1 -22
  242. package/dist/Molecular/CustomIcons/components/Key.js +1 -23
  243. package/dist/Molecular/CustomIcons/components/Landers.js +1 -20
  244. package/dist/Molecular/CustomIcons/components/Lock.js +1 -15
  245. package/dist/Molecular/CustomIcons/components/Mail.js +1 -26
  246. package/dist/Molecular/CustomIcons/components/Mastercard.js +1 -73
  247. package/dist/Molecular/CustomIcons/components/Minus.js +1 -25
  248. package/dist/Molecular/CustomIcons/components/Offers.js +1 -16
  249. package/dist/Molecular/CustomIcons/components/Pause.js +1 -28
  250. package/dist/Molecular/CustomIcons/components/PayPal.js +1 -41
  251. package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +1 -28
  252. package/dist/Molecular/CustomIcons/components/Phone.js +1 -30
  253. package/dist/Molecular/CustomIcons/components/Play.js +1 -25
  254. package/dist/Molecular/CustomIcons/components/Plus.js +1 -25
  255. package/dist/Molecular/CustomIcons/components/Profile.js +1 -16
  256. package/dist/Molecular/CustomIcons/components/QRCode.js +1 -29
  257. package/dist/Molecular/CustomIcons/components/Rectangle.js +1 -12
  258. package/dist/Molecular/CustomIcons/components/Revert.js +1 -13
  259. package/dist/Molecular/CustomIcons/components/Star.js +1 -14
  260. package/dist/Molecular/CustomIcons/components/Star2.js +1 -16
  261. package/dist/Molecular/CustomIcons/components/TrafficSources.js +1 -14
  262. package/dist/Molecular/CustomIcons/components/Trash.js +1 -15
  263. package/dist/Molecular/CustomIcons/components/TrashRed.js +1 -15
  264. package/dist/Molecular/CustomIcons/components/Triggers.js +1 -15
  265. package/dist/Molecular/CustomIcons/components/User.js +1 -25
  266. package/dist/Molecular/CustomIcons/components/Visa.js +1 -31
  267. package/dist/Molecular/CustomIcons/components/X.js +1 -12
  268. package/dist/Molecular/CustomIcons/index.js +1 -61
  269. package/dist/Molecular/FormElement/FormElement.js +1 -54
  270. package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +1 -184
  271. package/dist/Molecular/FormWithDependOn/partials/_utils.js +1 -53
  272. package/dist/Molecular/InputAddress/InputAddress.js +1 -626
  273. package/dist/Molecular/InputPassword/InputPassword.js +1 -48
  274. package/dist/index.js +1 -104
  275. package/package.json +1 -1
@@ -1,317 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "default", {
6
- enumerable: true,
7
- get: function() {
8
- return _default;
9
- }
10
- });
11
- const _jsxruntime = require("react/jsx-runtime");
12
- const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
13
- const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
14
- const _reactfeather = /*#__PURE__*/ _interop_require_wildcard(require("react-feather"));
15
- const _reactrouterdom = require("react-router-dom");
16
- const _indexconstants = require("../../../Constants/index.constants");
17
- require("./NavLine.scss");
18
- function _interop_require_default(obj) {
19
- return obj && obj.__esModule ? obj : {
20
- default: obj
21
- };
22
- }
23
- function _getRequireWildcardCache(nodeInterop) {
24
- if (typeof WeakMap !== "function") return null;
25
- var cacheBabelInterop = new WeakMap();
26
- var cacheNodeInterop = new WeakMap();
27
- return (_getRequireWildcardCache = function(nodeInterop) {
28
- return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
29
- })(nodeInterop);
30
- }
31
- function _interop_require_wildcard(obj, nodeInterop) {
32
- if (!nodeInterop && obj && obj.__esModule) {
33
- return obj;
34
- }
35
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
36
- return {
37
- default: obj
38
- };
39
- }
40
- var cache = _getRequireWildcardCache(nodeInterop);
41
- if (cache && cache.has(obj)) {
42
- return cache.get(obj);
43
- }
44
- var newObj = {
45
- __proto__: null
46
- };
47
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
48
- for(var key in obj){
49
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
50
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
51
- if (desc && (desc.get || desc.set)) {
52
- Object.defineProperty(newObj, key, desc);
53
- } else {
54
- newObj[key] = obj[key];
55
- }
56
- }
57
- }
58
- newObj.default = obj;
59
- if (cache) {
60
- cache.set(obj, newObj);
61
- }
62
- return newObj;
63
- }
64
- const CN = 'nav-line';
65
- /**
66
- * Проверяет и нормализует ref
67
- * @param ref - React ref объект или функция обратного вызова
68
- * @returns Нормализованный ref или null
69
- */ function checkedRef(ref) {
70
- if (!ref) return null;
71
- return typeof ref === 'function' ? (node)=>ref(node) : ref;
72
- }
73
- const NavLine = ({ root = '', activeTab, variant, onChange, className, items, children, isLocal = false, mode, isNavigateByKeys, isTabLoading, scrollMode = false, testId = CN })=>{
74
- const [navLineItems, setNavLineItems] = (0, _react.useState)([]);
75
- const wrapperRef = (0, _react.useRef)(null);
76
- const wrapperInnerRef = (0, _react.useRef)(null);
77
- const [showScrollButtons, setShowScrollButtons] = (0, _react.useState)(false);
78
- const [canScrollLeft, setCanScrollLeft] = (0, _react.useState)(false);
79
- const [canScrollRight, setCanScrollRight] = (0, _react.useState)(false);
80
- const [isScrollBlocked, setIsScrollBlocked] = (0, _react.useState)(false);
81
- const checkScroll = (0, _react.useCallback)(()=>{
82
- const inner = wrapperInnerRef.current;
83
- if (!inner) return;
84
- const hasOverflow = inner.scrollWidth > inner.clientWidth;
85
- const canScrollLeft = inner.scrollLeft > 0;
86
- const canScrollRight = inner.scrollLeft < inner.scrollWidth - inner.clientWidth;
87
- setShowScrollButtons(hasOverflow);
88
- setCanScrollLeft(canScrollLeft);
89
- setCanScrollRight(canScrollRight);
90
- }, []);
91
- const scroll = (0, _react.useCallback)((direction)=>{
92
- if (isScrollBlocked || !wrapperInnerRef.current) return;
93
- setIsScrollBlocked(true);
94
- const scrollAmount = 100;
95
- const offset = direction === 'left' ? -scrollAmount : scrollAmount;
96
- try {
97
- wrapperInnerRef.current.scrollBy({
98
- left: offset,
99
- behavior: 'smooth'
100
- });
101
- } catch (error) {
102
- console.error('scrollBy is not supported', error);
103
- // Fallback для браузеров, не поддерживающих scrollBy
104
- if (wrapperInnerRef.current) {
105
- wrapperInnerRef.current.scrollLeft += offset;
106
- }
107
- }
108
- setTimeout(()=>{
109
- setIsScrollBlocked(false);
110
- checkScroll();
111
- }, 300);
112
- }, [
113
- isScrollBlocked,
114
- checkScroll
115
- ]);
116
- const handleWheel = (0, _react.useCallback)((e)=>{
117
- if (!scrollMode) return;
118
- e.preventDefault();
119
- if (e.deltaY > 0) {
120
- scroll('right');
121
- } else {
122
- scroll('left');
123
- }
124
- }, [
125
- scroll,
126
- scrollMode
127
- ]);
128
- const onTabChange = (0, _react.useCallback)((item)=>{
129
- if (!item.disabled && !(mode === 'create' && item.tabId !== 'general')) {
130
- onChange(item.tabId);
131
- }
132
- }, [
133
- mode,
134
- onChange
135
- ]);
136
- const navigateByKeys = (0, _react.useCallback)((event)=>{
137
- var _items_, _items_1;
138
- if (event.repeat) return;
139
- const activeTabIndex = items.findIndex((tab)=>tab.tabId === activeTab);
140
- const nextTabID = (_items_ = items[activeTabIndex + 1]) === null || _items_ === void 0 ? void 0 : _items_.tabId;
141
- const prevTabID = (_items_1 = items[activeTabIndex - 1]) === null || _items_1 === void 0 ? void 0 : _items_1.tabId;
142
- if (event.keyCode === _indexconstants.KEYBOARD_KEY_CODES.ARROW_RIGHT && nextTabID) {
143
- onChange(nextTabID);
144
- } else if (event.keyCode === _indexconstants.KEYBOARD_KEY_CODES.ARROW_LEFT && prevTabID) {
145
- onChange(prevTabID);
146
- }
147
- }, [
148
- activeTab,
149
- items,
150
- onChange
151
- ]);
152
- // Инициализация табов с ref
153
- (0, _react.useEffect)(()=>{
154
- setNavLineItems(items.map((item)=>({
155
- ...item,
156
- ref: /*#__PURE__*/ (0, _react.createRef)()
157
- })));
158
- }, [
159
- items
160
- ]);
161
- // Обработка клавиатурной навигации
162
- (0, _react.useEffect)(()=>{
163
- if (isNavigateByKeys && !isTabLoading) {
164
- document.addEventListener('keydown', navigateByKeys);
165
- }
166
- return ()=>document.removeEventListener('keydown', navigateByKeys);
167
- }, [
168
- isNavigateByKeys,
169
- isTabLoading,
170
- navigateByKeys
171
- ]);
172
- // Настройка скролла
173
- (0, _react.useEffect)(()=>{
174
- if (!scrollMode) return;
175
- const inner = wrapperInnerRef.current;
176
- if (!inner) return;
177
- const resizeObserver = new ResizeObserver(checkScroll);
178
- resizeObserver.observe(inner);
179
- inner.addEventListener('scroll', checkScroll);
180
- inner.addEventListener('wheel', handleWheel, {
181
- passive: false
182
- });
183
- checkScroll();
184
- return ()=>{
185
- resizeObserver.disconnect();
186
- inner.removeEventListener('scroll', checkScroll);
187
- inner.removeEventListener('wheel', handleWheel);
188
- };
189
- }, [
190
- scrollMode,
191
- checkScroll,
192
- handleWheel
193
- ]);
194
- const renderNavItem = (item)=>{
195
- const Icon = item.icon ? _reactfeather[item.icon] : null;
196
- const isDisabled = item.disabled || mode === 'create' && item.tabId !== 'general';
197
- const commonProps = {
198
- 'title': item.title,
199
- 'key': `tab__${item.tabId}`,
200
- 'className': (0, _classnames.default)({
201
- 'nav-line__item': !variant
202
- }, {
203
- 'nav-line--simple__item': variant === 'simple'
204
- }, {
205
- active: activeTab === item.tabId
206
- }, {
207
- disabled: isDisabled
208
- }, {
209
- 'nav-line__item--hidden': item.isHidden
210
- }),
211
- 'role': 'tab',
212
- 'aria-selected': activeTab === item.tabId,
213
- 'aria-disabled': isDisabled,
214
- 'tabIndex': isDisabled ? -1 : 0
215
- };
216
- const content = /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
217
- className: "nav-line__content",
218
- children: [
219
- Icon && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
220
- className: "nav-line__item--icon",
221
- "aria-hidden": "true",
222
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(Icon, {})
223
- }),
224
- /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
225
- className: (0, _classnames.default)({
226
- 'nav-line__item--label': variant !== 'simple'
227
- }),
228
- children: item.label
229
- }),
230
- item.count !== undefined && /*#__PURE__*/ (0, _jsxruntime.jsxs)("span", {
231
- className: "nav-line-count",
232
- "aria-label": `${item.count} items`,
233
- children: [
234
- "(",
235
- item.count,
236
- ")"
237
- ]
238
- })
239
- ]
240
- });
241
- if (isLocal) {
242
- return /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
243
- ...commonProps,
244
- ref: checkedRef(item.ref),
245
- onClick: ()=>!isDisabled && onTabChange(item),
246
- onKeyPress: (e)=>{
247
- if (!isDisabled && (e.key === 'Enter' || e.key === ' ')) {
248
- e.preventDefault();
249
- onTabChange(item);
250
- }
251
- },
252
- children: content
253
- });
254
- }
255
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactrouterdom.NavLink, {
256
- ...commonProps,
257
- to: `${root}${(item === null || item === void 0 ? void 0 : item.linkChapter) || item.tabId}/`,
258
- onClick: (e)=>{
259
- if (isDisabled) {
260
- e.preventDefault();
261
- }
262
- },
263
- children: content
264
- });
265
- };
266
- return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
267
- className: "nav-line-wrapper",
268
- children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
269
- "data-testid": testId,
270
- className: (0, _classnames.default)({
271
- [CN]: !variant
272
- }, {
273
- [`${CN}--simple`]: variant === 'simple'
274
- }, {
275
- [`${CN}--scroll-mode`]: scrollMode
276
- }, className),
277
- ref: wrapperRef,
278
- children: [
279
- scrollMode && showScrollButtons && /*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
280
- type: "button",
281
- "data-testid": "nav-line-scroll-prev",
282
- className: "nav-line--simple__arrow nav-line--simple__arrow--prev",
283
- onClick: ()=>scroll('left'),
284
- "aria-label": "Scroll previous",
285
- disabled: !canScrollLeft,
286
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactfeather.ChevronLeft, {})
287
- }),
288
- /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
289
- ref: wrapperInnerRef,
290
- className: (0, _classnames.default)({
291
- 'nav-line__inner': !variant
292
- }, {
293
- 'nav-line--simple__inner': variant === 'simple'
294
- }),
295
- role: "tablist",
296
- "aria-orientation": "horizontal",
297
- children: navLineItems.map(renderNavItem)
298
- }),
299
- scrollMode && showScrollButtons && /*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
300
- type: "button",
301
- "data-testid": "nav-line-scroll-next",
302
- className: "nav-line--simple__arrow nav-line--simple__arrow--next",
303
- onClick: ()=>scroll('right'),
304
- "aria-label": "Scroll next",
305
- disabled: !canScrollRight,
306
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactfeather.ChevronRight, {})
307
- }),
308
- children && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
309
- className: "nav-line__body",
310
- role: "tabpanel",
311
- children: children
312
- })
313
- ]
314
- })
315
- });
316
- };
317
- const _default = NavLine;
1
+ function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},a=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),a.forEach(function(n){t(e,n,r[n])})}return e}function r(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function a(t,n){return function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i=[],l=!0,o=!1;try{for(a=a.call(e);!(l=(n=a.next()).done)&&(i.push(n.value),!t||i.length!==t);l=!0);}catch(e){o=!0,r=e}finally{try{l||null==a.return||a.return()}finally{if(o)throw r}}return i}}(t,n)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}}(t,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return p}});var i,l=require("react/jsx-runtime"),o=(i=require("classnames"))&&i.__esModule?i:{default:i},c=v(require("react")),u=v(require("react-feather")),s=require("react-router-dom"),f=require("../../../Constants/index.constants");function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function v(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||(void 0===e?"undefined":e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)!="object"&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}require("./NavLine.scss");var b="nav-line",p=function(e){var i=e.root,d=void 0===i?"":i,v=e.activeTab,p=e.variant,y=e.onChange,m=e.className,h=e.items,_=e.children,j=e.isLocal,O=void 0!==j&&j,g=e.mode,w=e.isNavigateByKeys,x=e.isTabLoading,k=e.scrollMode,E=void 0!==k&&k,S=e.testId,C=void 0===S?b:S,P=a((0,c.useState)([]),2),I=P[0],L=P[1],N=(0,c.useRef)(null),D=(0,c.useRef)(null),R=a((0,c.useState)(!1),2),A=R[0],W=R[1],M=a((0,c.useState)(!1),2),q=M[0],K=M[1],T=a((0,c.useState)(!1),2),Y=T[0],B=T[1],z=a((0,c.useState)(!1),2),H=z[0],F=z[1],G=(0,c.useCallback)(function(){var e=D.current;if(e){var t=e.scrollWidth>e.clientWidth,n=e.scrollLeft>0,r=e.scrollLeft<e.scrollWidth-e.clientWidth;W(t),K(n),B(r)}},[]),U=(0,c.useCallback)(function(e){if(!H&&D.current){F(!0);var t="left"===e?-100:100;try{D.current.scrollBy({left:t,behavior:"smooth"})}catch(e){D.current&&(D.current.scrollLeft+=t)}setTimeout(function(){F(!1),G()},300)}},[H,G]),$=(0,c.useCallback)(function(e){E&&(e.preventDefault(),e.deltaY>0?U("right"):U("left"))},[U,E]),J=(0,c.useCallback)(function(e){e.disabled||"create"===g&&"general"!==e.tabId||y(e.tabId)},[g,y]),Q=(0,c.useCallback)(function(e){if(!e.repeat){var t,n,r=h.findIndex(function(e){return e.tabId===v}),a=null==(t=h[r+1])?void 0:t.tabId,i=null==(n=h[r-1])?void 0:n.tabId;e.keyCode===f.KEYBOARD_KEY_CODES.ARROW_RIGHT&&a?y(a):e.keyCode===f.KEYBOARD_KEY_CODES.ARROW_LEFT&&i&&y(i)}},[v,h,y]);return(0,c.useEffect)(function(){L(h.map(function(e){return r(n({},e),{ref:(0,c.createRef)()})}))},[h]),(0,c.useEffect)(function(){return w&&!x&&document.addEventListener("keydown",Q),function(){return document.removeEventListener("keydown",Q)}},[w,x,Q]),(0,c.useEffect)(function(){if(E){var e=D.current;if(e){var t=new ResizeObserver(G);return t.observe(e),e.addEventListener("scroll",G),e.addEventListener("wheel",$,{passive:!1}),G(),function(){t.disconnect(),e.removeEventListener("scroll",G),e.removeEventListener("wheel",$)}}}},[E,G,$]),(0,l.jsx)("div",{className:"nav-line-wrapper",children:(0,l.jsxs)("div",{"data-testid":C,className:(0,o.default)(t({},b,!p),t({},"".concat(b,"--simple"),"simple"===p),t({},"".concat(b,"--scroll-mode"),E),m),ref:N,children:[E&&A&&(0,l.jsx)("button",{type:"button","data-testid":"nav-line-scroll-prev",className:"nav-line--simple__arrow nav-line--simple__arrow--prev",onClick:function(){return U("left")},"aria-label":"Scroll previous",disabled:!q,children:(0,l.jsx)(u.ChevronLeft,{})}),(0,l.jsx)("div",{ref:D,className:(0,o.default)({"nav-line__inner":!p},{"nav-line--simple__inner":"simple"===p}),role:"tablist","aria-orientation":"horizontal",children:I.map(function(e){var t,a=e.icon?u[e.icon]:null,i=e.disabled||"create"===g&&"general"!==e.tabId,c={title:e.title,key:"tab__".concat(e.tabId),className:(0,o.default)({"nav-line__item":!p},{"nav-line--simple__item":"simple"===p},{active:v===e.tabId},{disabled:i},{"nav-line__item--hidden":e.isHidden}),role:"tab","aria-selected":v===e.tabId,"aria-disabled":i,tabIndex:i?-1:0},f=(0,l.jsxs)("div",{className:"nav-line__content",children:[a&&(0,l.jsx)("div",{className:"nav-line__item--icon","aria-hidden":"true",children:(0,l.jsx)(a,{})}),(0,l.jsx)("span",{className:(0,o.default)({"nav-line__item--label":"simple"!==p}),children:e.label}),void 0!==e.count&&(0,l.jsxs)("span",{className:"nav-line-count","aria-label":"".concat(e.count," items"),children:["(",e.count,")"]})]});return O?(0,l.jsx)("span",r(n({},c),{ref:(t=e.ref)?"function"==typeof t?function(e){return t(e)}:t:null,onClick:function(){return!i&&J(e)},onKeyPress:function(t){i||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),J(e))},children:f})):(0,l.jsx)(s.NavLink,r(n({},c),{to:"".concat(d).concat((null==e?void 0:e.linkChapter)||e.tabId,"/"),onClick:function(e){i&&e.preventDefault()},children:f}))})}),E&&A&&(0,l.jsx)("button",{type:"button","data-testid":"nav-line-scroll-next",className:"nav-line--simple__arrow nav-line--simple__arrow--next",onClick:function(){return U("right")},"aria-label":"Scroll next",disabled:!Y,children:(0,l.jsx)(u.ChevronRight,{})}),_&&(0,l.jsx)("div",{className:"nav-line__body",role:"tabpanel",children:_})]})})};
@@ -1,77 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "default", {
6
- enumerable: true,
7
- get: function() {
8
- return _default;
9
- }
10
- });
11
- const _jsxruntime = require("react/jsx-runtime");
12
- const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
13
- const _react = /*#__PURE__*/ _interop_require_default(require("react"));
14
- const _reactfeather = require("react-feather");
15
- require("./PageTitle.scss");
16
- function _interop_require_default(obj) {
17
- return obj && obj.__esModule ? obj : {
18
- default: obj
19
- };
20
- }
21
- const RC = 'page-title';
22
- const PageTitle = ({ title, pages, children, testId = RC })=>/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
23
- "data-testid": testId,
24
- className: RC,
25
- role: "region",
26
- "aria-label": title,
27
- children: [
28
- /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
29
- className: `${RC}__wrap`,
30
- children: [
31
- /*#__PURE__*/ (0, _jsxruntime.jsx)("h1", {
32
- className: `${RC}__title`,
33
- children: title
34
- }),
35
- pages.length > 0 && /*#__PURE__*/ (0, _jsxruntime.jsx)("nav", {
36
- className: `${RC}__pages`,
37
- "aria-label": "Breadcrumb",
38
- children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("ol", {
39
- className: `${RC}__list`,
40
- children: [
41
- /*#__PURE__*/ (0, _jsxruntime.jsx)("li", {
42
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)("a", {
43
- className: `${RC}__link`,
44
- href: "/",
45
- "aria-label": "Home page",
46
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactfeather.Home, {
47
- "aria-hidden": "true"
48
- })
49
- })
50
- }),
51
- pages.map(({ name, path }, index)=>/*#__PURE__*/ (0, _jsxruntime.jsxs)("li", {
52
- children: [
53
- /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
54
- className: `${RC}__delimiter`,
55
- "aria-hidden": "true",
56
- children: "/"
57
- }),
58
- pages.length - 1 === index ? /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
59
- className: (0, _classnames.default)(`${RC}__link`, `${RC}__link_last`),
60
- "aria-current": "page",
61
- children: name
62
- }) : /*#__PURE__*/ (0, _jsxruntime.jsx)("a", {
63
- className: `${RC}__link`,
64
- href: path,
65
- children: name
66
- })
67
- ]
68
- }, path))
69
- ]
70
- })
71
- })
72
- ]
73
- }),
74
- children
75
- ]
76
- });
77
- const _default = PageTitle;
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return c}});var e,a=require("react/jsx-runtime"),r=(e=require("classnames"))&&e.__esModule?e:{default:e};require("react");var s=require("react-feather");require("./PageTitle.scss");var l="page-title",c=function(e){var c=e.title,t=e.pages,i=e.children,n=e.testId,d=void 0===n?l:n;return(0,a.jsxs)("div",{"data-testid":d,className:l,role:"region","aria-label":c,children:[(0,a.jsxs)("div",{className:"".concat(l,"__wrap"),children:[(0,a.jsx)("h1",{className:"".concat(l,"__title"),children:c}),t.length>0&&(0,a.jsx)("nav",{className:"".concat(l,"__pages"),"aria-label":"Breadcrumb",children:(0,a.jsxs)("ol",{className:"".concat(l,"__list"),children:[(0,a.jsx)("li",{children:(0,a.jsx)("a",{className:"".concat(l,"__link"),href:"/","aria-label":"Home page",children:(0,a.jsx)(s.Home,{"aria-hidden":"true"})})}),t.map(function(e,s){var c=e.name,i=e.path;return(0,a.jsxs)("li",{children:[(0,a.jsx)("span",{className:"".concat(l,"__delimiter"),"aria-hidden":"true",children:"/"}),t.length-1===s?(0,a.jsx)("span",{className:(0,r.default)("".concat(l,"__link"),"".concat(l,"__link_last")),"aria-current":"page",children:c}):(0,a.jsx)("a",{className:"".concat(l,"__link"),href:i,children:c})]},i)})]})})]}),i]})};
@@ -1,42 +1 @@
1
- import React from "react";
2
-
3
- import { ArcElement, Chart as ChartJS, Tooltip } from "chart.js";
4
- import { Pie } from "react-chartjs-2";
5
-
6
- import "./PieChart.scss";
7
-
8
- ChartJS.register(ArcElement, Tooltip);
9
-
10
- const PieChart = ({
11
- data,
12
- cutout = "80%",
13
- resultLabel,
14
- resultValue = 0,
15
- withLegend = false,
16
- }) => {
17
- const options = {
18
- cutout,
19
- plugins: {
20
- legend: {
21
- display: withLegend,
22
- },
23
- },
24
- };
25
-
26
- return (
27
- <div className="pie-chart-box" style={{ maxWidth: `320px` }}>
28
- <Pie data={data} options={options} />
29
- {Boolean(resultLabel) && (
30
- <div className="pie-chart__result">
31
- <div className="pie-chart__result-value">
32
- {resultValue}
33
- <span className="pie-chart__result-percent">%</span>{" "}
34
- </div>
35
- <div className="pie-chart__result-label">{resultLabel}</div>
36
- </div>
37
- )}
38
- </div>
39
- );
40
- };
41
-
42
- export default PieChart;
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import"react";import{ArcElement as r,Chart as a,Tooltip as s}from"chart.js";import{Pie as i}from"react-chartjs-2";import"./PieChart.scss";a.register(r,s);export default function(r){var a=r.data,s=r.cutout,l=r.resultLabel,c=r.resultValue,d=r.withLegend;return t("div",{className:"pie-chart-box",style:{maxWidth:"320px"},children:[e(i,{data:a,options:{cutout:void 0===s?"80%":s,plugins:{legend:{display:void 0!==d&&d}}}}),!!l&&t("div",{className:"pie-chart__result",children:[t("div",{className:"pie-chart__result-value",children:[void 0===c?0:c,e("span",{className:"pie-chart__result-percent",children:"%"})," "]}),e("div",{className:"pie-chart__result-label",children:l})]})]})}
@@ -1,31 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "default", {
6
- enumerable: true,
7
- get: function() {
8
- return _default;
9
- }
10
- });
11
- const _jsxruntime = require("react/jsx-runtime");
12
- const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
13
- const _react = /*#__PURE__*/ _interop_require_default(require("react"));
14
- const _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
15
- function _interop_require_default(obj) {
16
- return obj && obj.__esModule ? obj : {
17
- default: obj
18
- };
19
- }
20
- const CN = 'price';
21
- const Price = ({ value, currencyCode, isSymbolAfter, className, testId = CN })=>{
22
- if (value === undefined || value === null) return null;
23
- return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
24
- "data-testid": testId,
25
- className: (0, _classnames.default)(CN, className),
26
- role: "contentinfo",
27
- "aria-label": `Price: ${(0, _fieldValueFormatters.formatToPriceWithCurrency)(value, currencyCode, isSymbolAfter ? 'after' : 'before')}`,
28
- children: (0, _fieldValueFormatters.formatToPriceWithCurrency)(value, currencyCode, isSymbolAfter ? 'after' : 'before')
29
- });
30
- };
31
- const _default = Price;
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return u}});var e,r=require("react/jsx-runtime"),t=(e=require("classnames"))&&e.__esModule?e:{default:e};require("react");var a=require("../../../Functions/fieldValueFormatters"),i="price",u=function(e){var u=e.value,n=e.currencyCode,o=e.isSymbolAfter,c=e.className,l=e.testId,s=void 0===l?i:l;return null==u?null:(0,r.jsx)("div",{"data-testid":s,className:(0,t.default)(i,c),role:"contentinfo","aria-label":"Price: ".concat((0,a.formatToPriceWithCurrency)(u,n,o?"after":"before")),children:(0,a.formatToPriceWithCurrency)(u,n,o?"after":"before")})};
@@ -1,44 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "default", {
6
- enumerable: true,
7
- get: function() {
8
- return _default;
9
- }
10
- });
11
- const _jsxruntime = require("react/jsx-runtime");
12
- const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
13
- const _react = /*#__PURE__*/ _interop_require_default(require("react"));
14
- const _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
15
- function _interop_require_default(obj) {
16
- return obj && obj.__esModule ? obj : {
17
- default: obj
18
- };
19
- }
20
- const CN = 'price-range';
21
- const PriceRange = ({ from, to, mode, testId = CN })=>{
22
- return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
23
- "data-testid": testId,
24
- className: (0, _classnames.default)(CN, 'j4'),
25
- role: "region",
26
- "aria-label": "Price range",
27
- children: mode === 'simple' ? /*#__PURE__*/ (0, _jsxruntime.jsxs)("span", {
28
- "aria-live": "polite",
29
- children: [
30
- from,
31
- ' - ',
32
- to
33
- ]
34
- }) : /*#__PURE__*/ (0, _jsxruntime.jsxs)("span", {
35
- "aria-live": "polite",
36
- children: [
37
- (0, _fieldValueFormatters.formatToPriceWithUSD)(from === null || from === void 0 ? void 0 : from.toString()),
38
- ' - ',
39
- (0, _fieldValueFormatters.formatToPriceWithUSD)(to === null || to === void 0 ? void 0 : to.toString())
40
- ]
41
- })
42
- });
43
- };
44
- const _default = PriceRange;
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return l}});var e,r=require("react/jsx-runtime"),i=(e=require("classnames"))&&e.__esModule?e:{default:e};require("react");var t=require("../../../Functions/fieldValueFormatters"),a="price-range",l=function(e){var l=e.from,o=e.to,n=e.mode,s=e.testId,u=void 0===s?a:s;return(0,r.jsx)("div",{"data-testid":u,className:(0,i.default)(a,"j4"),role:"region","aria-label":"Price range",children:"simple"===n?(0,r.jsxs)("span",{"aria-live":"polite",children:[l," - ",o]}):(0,r.jsxs)("span",{"aria-live":"polite",children:[(0,t.formatToPriceWithUSD)(null==l?void 0:l.toString())," - ",(0,t.formatToPriceWithUSD)(null==o?void 0:o.toString())]})})};
@@ -1,98 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "default", {
6
- enumerable: true,
7
- get: function() {
8
- return _default;
9
- }
10
- });
11
- const _jsxruntime = require("react/jsx-runtime");
12
- const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
13
- const _react = /*#__PURE__*/ _interop_require_default(require("react"));
14
- const _utils = require("../../../Functions/utils");
15
- require("./ProgressLine.scss");
16
- function _interop_require_default(obj) {
17
- return obj && obj.__esModule ? obj : {
18
- default: obj
19
- };
20
- }
21
- const CN = 'progress-line';
22
- const ProgressLine = ({ label = '', labelAlign = 'left', renderValue = false, renderValueInPercents = false, valueMeasurement = '', valueHorizontalPosition = 'right', valueVerticalPosition = 'center', symbolsAfterComma = 0, minValue = 0, maxValue = 100, value = 0, showExtremums = false, extremumsPosition = 'top', variant = 'info', useVariantLabelColor = true, isShowLine = true, className, testId = CN })=>{
23
- const getFilledLineWidth = ()=>{
24
- if (value > maxValue) value = maxValue;
25
- return `${((value - minValue) * 100 / (maxValue - minValue)).toFixed(symbolsAfterComma)}%`;
26
- };
27
- const renderLabel = ()=>{
28
- if (!label) return null;
29
- return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
30
- className: `progress-line__wrapper__label align-${labelAlign}`,
31
- children: label
32
- });
33
- };
34
- const renderProgressValue = ()=>{
35
- if (!renderValue) return null;
36
- return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
37
- className: "progress-line__wrapper__value",
38
- "aria-live": "polite",
39
- children: renderValueInPercents ? getFilledLineWidth() : `${(0, _utils.addBitDepthPoints)(String(value))} ${valueMeasurement}`
40
- });
41
- };
42
- const renderExtremums = ()=>{
43
- if (!showExtremums) return null;
44
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
45
- "aria-hidden": "true",
46
- className: `progress-line__wrapper__extremums position-${extremumsPosition}`,
47
- children: [
48
- /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
49
- className: "progress-line__wrapper__extremums--min",
50
- children: renderValueInPercents ? '0 %' : `${minValue} ${valueMeasurement}`
51
- }),
52
- /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
53
- className: "progress-line__wrapper__extremums--max",
54
- children: renderValueInPercents ? '100 %' : `${maxValue} ${valueMeasurement}`
55
- })
56
- ]
57
- });
58
- };
59
- const renderFilledLine = ()=>{
60
- return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
61
- className: "progress-line__wrapper__line--filled",
62
- role: "progressbar",
63
- "aria-label": `Progress: ${value} out of ${maxValue}`,
64
- "aria-valuenow": value,
65
- "aria-valuemin": minValue,
66
- "aria-valuemax": maxValue,
67
- style: {
68
- width: getFilledLineWidth()
69
- }
70
- });
71
- };
72
- const renderLine = ()=>{
73
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
74
- className: "progress-line__wrapper__line",
75
- children: [
76
- renderExtremums(),
77
- renderFilledLine()
78
- ]
79
- });
80
- };
81
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
82
- className: (0, _classnames.default)(CN, className),
83
- "data-testid": testId,
84
- role: "region",
85
- "aria-label": "Progress line",
86
- children: [
87
- renderLabel(),
88
- /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
89
- className: `progress-line__wrapper variant-${useVariantLabelColor && variant} value-${valueVerticalPosition}-${valueHorizontalPosition} ${className}`,
90
- children: [
91
- renderProgressValue(),
92
- isShowLine && renderLine()
93
- ]
94
- })
95
- ]
96
- });
97
- };
98
- const _default = ProgressLine;
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return l}});var e,r=require("react/jsx-runtime"),a=(e=require("classnames"))&&e.__esModule?e:{default:e};require("react");var i=require("../../../Functions/utils");require("./ProgressLine.scss");var s="progress-line",l=function(e){var l=e.label,o=void 0===l?"":l,n=e.labelAlign,t=e.renderValue,c=e.renderValueInPercents,d=void 0!==c&&c,u=e.valueMeasurement,v=void 0===u?"":u,p=e.valueHorizontalPosition,_=e.valueVerticalPosition,m=e.symbolsAfterComma,x=void 0===m?0:m,g=e.minValue,h=void 0===g?0:g,f=e.maxValue,j=void 0===f?100:f,w=e.value,b=void 0===w?0:w,N=e.showExtremums,P=e.extremumsPosition,V=e.variant,q=e.useVariantLabelColor,y=e.isShowLine,L=e.className,M=e.testId,A=void 0===M?s:M,C=function(){return b>j&&(b=j),"".concat(((b-h)*100/(j-h)).toFixed(x),"%")};return(0,r.jsxs)("div",{className:(0,a.default)(s,L),"data-testid":A,role:"region","aria-label":"Progress line",children:[o?(0,r.jsx)("div",{className:"progress-line__wrapper__label align-".concat(void 0===n?"left":n),children:o}):null,(0,r.jsxs)("div",{className:"progress-line__wrapper variant-".concat((void 0===q||q)&&(void 0===V?"info":V)," value-").concat(void 0===_?"center":_,"-").concat(void 0===p?"right":p," ").concat(L),children:[void 0!==t&&t?(0,r.jsx)("div",{className:"progress-line__wrapper__value","aria-live":"polite",children:d?C():"".concat((0,i.addBitDepthPoints)(String(b))," ").concat(v)}):null,(void 0===y||y)&&(0,r.jsxs)("div",{className:"progress-line__wrapper__line",children:[void 0!==N&&N?(0,r.jsxs)("div",{"aria-hidden":"true",className:"progress-line__wrapper__extremums position-".concat(void 0===P?"top":P),children:[(0,r.jsx)("div",{className:"progress-line__wrapper__extremums--min",children:d?"0 %":"".concat(h," ").concat(v)}),(0,r.jsx)("div",{className:"progress-line__wrapper__extremums--max",children:d?"100 %":"".concat(j," ").concat(v)})]}):null,(0,r.jsx)("div",{className:"progress-line__wrapper__line--filled",role:"progressbar","aria-label":"Progress: ".concat(b," out of ").concat(j),"aria-valuenow":b,"aria-valuemin":h,"aria-valuemax":j,style:{width:C()}})]})]})]})};