intelicoreact 1.8.10 → 1.8.12

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 (259) hide show
  1. package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +1 -0
  2. package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN_old.js +1 -0
  3. package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +1 -0
  4. package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +1 -0
  5. package/dist/Atomic/FormElements/NumericInput/NumericInput.js +1 -0
  6. package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +1 -0
  7. package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +1 -0
  8. package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +1 -0
  9. package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +1 -0
  10. package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +1 -1
  11. package/dist/Atomic/FormElements/RangeList/RangeList.js +1 -0
  12. package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +1 -0
  13. package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +1 -0
  14. package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +1 -0
  15. package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +1 -0
  16. package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +1 -0
  17. package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +1 -0
  18. package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +1 -0
  19. package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +1 -0
  20. package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.js +1 -0
  21. package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.interface.ts +3 -3
  22. package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +1 -1
  23. package/dist/Atomic/FormElements/Text/Text.js +1 -0
  24. package/dist/Atomic/FormElements/Textarea/Textarea.js +1 -0
  25. package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +1 -0
  26. package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +1 -0
  27. package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +1 -0
  28. package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +1 -0
  29. package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +1 -0
  30. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +1 -0
  31. package/dist/Atomic/Layout/Header/Header.js +1 -0
  32. package/dist/Atomic/Layout/MainMenu/MainMenu.js +1 -0
  33. package/dist/Atomic/UI/AccordionTable/AccordionTable.js +1 -0
  34. package/dist/Atomic/UI/AccordionText/AccordionText.js +1 -0
  35. package/dist/Atomic/UI/Arrow/Arrow.js +1 -0
  36. package/dist/Atomic/UI/Box/Box.js +1 -0
  37. package/dist/Atomic/UI/Chart/Chart.js +1 -0
  38. package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +1 -0
  39. package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +1 -0
  40. package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +1 -0
  41. package/dist/Atomic/UI/DateTime/DateTime.js +1 -0
  42. package/dist/Atomic/UI/DebugContainer/DebugContainer.js +1 -0
  43. package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +1 -0
  44. package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +1 -0
  45. package/dist/Atomic/UI/MonoAccordion/MonoAccordion._test.js +1 -0
  46. package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +1 -0
  47. package/dist/Atomic/UI/PieChart/PieChart.js +1 -0
  48. package/dist/Atomic/UI/Table/Partials/TdCell.js +1 -0
  49. package/dist/Atomic/UI/Table/Partials/TdHeader.js +1 -0
  50. package/dist/Atomic/UI/Table/Partials/TdRow.js +1 -0
  51. package/dist/Atomic/UI/Table/Partials/TdTitle.js +1 -0
  52. package/dist/Atomic/UI/Table/Table.js +1 -0
  53. package/dist/Atomic/UI/Table/TdTypes/TdActions.js +1 -0
  54. package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +1 -0
  55. package/dist/Atomic/UI/Table/TdTypes/TdRange.js +1 -0
  56. package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +1 -0
  57. package/dist/Atomic/UI/Tag/Tag.interface.ts +1 -1
  58. package/dist/Atomic/UI/Tag/Tag.js +1 -1
  59. package/dist/Atomic/UI/TagList/TagList.js +1 -0
  60. package/dist/Atomic/UI/WizardStepper/constructor.js +1 -0
  61. package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +1 -0
  62. package/dist/Functions/customEventListener.js +1 -0
  63. package/dist/Functions/operations.js +1 -0
  64. package/dist/Functions/useFormTools/functions/RenderFields.js +1 -0
  65. package/dist/Functions/useFormTools/index.js +1 -0
  66. package/dist/Functions/usePasswordChecker.js +1 -0
  67. package/dist/Functions/utils.js +1 -0
  68. package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +1 -0
  69. package/dist/Molecular/CustomIcons/components/AlertCircle.js +1 -0
  70. package/dist/Molecular/CustomIcons/components/AppStore.js +1 -0
  71. package/dist/Molecular/CustomIcons/components/Arrow.js +1 -0
  72. package/dist/Molecular/CustomIcons/components/ArrowDown.js +1 -0
  73. package/dist/Molecular/CustomIcons/components/ArrowLeft.js +1 -0
  74. package/dist/Molecular/CustomIcons/components/ArrowRight.js +1 -0
  75. package/dist/Molecular/CustomIcons/components/ArrowUp.js +1 -0
  76. package/dist/Molecular/CustomIcons/components/Bell.js +1 -0
  77. package/dist/Molecular/CustomIcons/components/Button.js +1 -0
  78. package/dist/Molecular/CustomIcons/components/Campaigns.js +1 -0
  79. package/dist/Molecular/CustomIcons/components/Check.js +1 -0
  80. package/dist/Molecular/CustomIcons/components/Check2.js +1 -0
  81. package/dist/Molecular/CustomIcons/components/ChevronDown.js +1 -0
  82. package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +1 -0
  83. package/dist/Molecular/CustomIcons/components/ChevronLeft.js +1 -0
  84. package/dist/Molecular/CustomIcons/components/ChevronRight.js +1 -0
  85. package/dist/Molecular/CustomIcons/components/ChevronUp.js +1 -0
  86. package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +1 -0
  87. package/dist/Molecular/CustomIcons/components/Close.js +1 -0
  88. package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +1 -0
  89. package/dist/Molecular/CustomIcons/components/Delete.js +1 -0
  90. package/dist/Molecular/CustomIcons/components/Edit.js +1 -0
  91. package/dist/Molecular/CustomIcons/components/Email.js +1 -0
  92. package/dist/Molecular/CustomIcons/components/FinturfLogo.js +1 -0
  93. package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +1 -0
  94. package/dist/Molecular/CustomIcons/components/Flows.js +1 -0
  95. package/dist/Molecular/CustomIcons/components/Gift.js +1 -0
  96. package/dist/Molecular/CustomIcons/components/GoogleAuth.js +1 -0
  97. package/dist/Molecular/CustomIcons/components/GooglePlay.js +1 -0
  98. package/dist/Molecular/CustomIcons/components/HelpCircle.js +1 -0
  99. package/dist/Molecular/CustomIcons/components/HelpCircle2.js +1 -0
  100. package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +1 -0
  101. package/dist/Molecular/CustomIcons/components/Home.js +1 -0
  102. package/dist/Molecular/CustomIcons/components/Home2.js +1 -0
  103. package/dist/Molecular/CustomIcons/components/Key.js +1 -0
  104. package/dist/Molecular/CustomIcons/components/Landers.js +1 -0
  105. package/dist/Molecular/CustomIcons/components/Lock.js +1 -0
  106. package/dist/Molecular/CustomIcons/components/Mail.js +1 -0
  107. package/dist/Molecular/CustomIcons/components/Mastercard.js +1 -0
  108. package/dist/Molecular/CustomIcons/components/Minus.js +1 -0
  109. package/dist/Molecular/CustomIcons/components/Offers.js +1 -0
  110. package/dist/Molecular/CustomIcons/components/Pause.js +1 -0
  111. package/dist/Molecular/CustomIcons/components/PayPal.js +1 -0
  112. package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +1 -0
  113. package/dist/Molecular/CustomIcons/components/Phone.js +1 -0
  114. package/dist/Molecular/CustomIcons/components/Play.js +1 -0
  115. package/dist/Molecular/CustomIcons/components/Plus.js +1 -0
  116. package/dist/Molecular/CustomIcons/components/Profile.js +1 -0
  117. package/dist/Molecular/CustomIcons/components/QRCode.js +1 -0
  118. package/dist/Molecular/CustomIcons/components/Rectangle.js +1 -0
  119. package/dist/Molecular/CustomIcons/components/Revert.js +1 -0
  120. package/dist/Molecular/CustomIcons/components/Star.js +1 -0
  121. package/dist/Molecular/CustomIcons/components/Star2.js +1 -0
  122. package/dist/Molecular/CustomIcons/components/TrafficSources.js +1 -0
  123. package/dist/Molecular/CustomIcons/components/Trash.js +1 -0
  124. package/dist/Molecular/CustomIcons/components/TrashRed.js +1 -0
  125. package/dist/Molecular/CustomIcons/components/Triggers.js +1 -0
  126. package/dist/Molecular/CustomIcons/components/User.js +1 -0
  127. package/dist/Molecular/CustomIcons/components/Visa.js +1 -0
  128. package/dist/Molecular/CustomIcons/components/X.js +1 -0
  129. package/dist/Molecular/FormElement/FormElement.js +1 -0
  130. package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +1 -0
  131. package/dist/Molecular/InputAddress/InputAddress.js +1 -0
  132. package/dist/Molecular/InputPassword/InputPassword.js +1 -0
  133. package/package.json +6 -13
  134. package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.jsx +0 -18
  135. package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN_old.jsx +0 -121
  136. package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.jsx +0 -507
  137. package/dist/Atomic/FormElements/MultiSelect/MultiSelect.jsx +0 -46
  138. package/dist/Atomic/FormElements/NumericInput/NumericInput.jsx +0 -337
  139. package/dist/Atomic/FormElements/RadioGroup/RadioGroup.jsx +0 -66
  140. package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.jsx +0 -78
  141. package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.jsx +0 -54
  142. package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.jsx +0 -183
  143. package/dist/Atomic/FormElements/RangeList/RangeList.jsx +0 -181
  144. package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.jsx +0 -41
  145. package/dist/Atomic/FormElements/RangeSlider/RangeSlider.jsx +0 -449
  146. package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.jsx +0 -865
  147. package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.jsx +0 -37
  148. package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.jsx +0 -48
  149. package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.jsx +0 -62
  150. package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.jsx +0 -175
  151. package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.jsx +0 -65
  152. package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.jsx +0 -118
  153. package/dist/Atomic/FormElements/Text/Text.jsx +0 -126
  154. package/dist/Atomic/FormElements/Textarea/Textarea.jsx +0 -61
  155. package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.jsx +0 -181
  156. package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.jsx +0 -60
  157. package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.jsx +0 -83
  158. package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.jsx +0 -80
  159. package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.jsx +0 -103
  160. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.jsx +0 -115
  161. package/dist/Atomic/Layout/Header/Header.jsx +0 -86
  162. package/dist/Atomic/UI/AccordionTable/AccordionTable.jsx +0 -250
  163. package/dist/Atomic/UI/AccordionText/AccordionText.jsx +0 -68
  164. package/dist/Atomic/UI/Arrow/Arrow.jsx +0 -134
  165. package/dist/Atomic/UI/Box/Box.jsx +0 -53
  166. package/dist/Atomic/UI/Chart/Chart.jsx +0 -178
  167. package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.jsx +0 -78
  168. package/dist/Atomic/UI/Chart/partial/optionsConstructor.jsx +0 -334
  169. package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.jsx +0 -111
  170. package/dist/Atomic/UI/DateTime/DateTime.jsx +0 -57
  171. package/dist/Atomic/UI/DebugContainer/DebugContainer.jsx +0 -44
  172. package/dist/Atomic/UI/DebugContainer/useDebugContainer.jsx +0 -15
  173. package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.jsx +0 -223
  174. package/dist/Atomic/UI/MonoAccordion/MonoAccordion._test.jsx +0 -75
  175. package/dist/Atomic/UI/MonoAccordion/MonoAccordion.jsx +0 -86
  176. package/dist/Atomic/UI/PieChart/PieChart.jsx +0 -41
  177. package/dist/Atomic/UI/Table/Partials/TdCell.jsx +0 -87
  178. package/dist/Atomic/UI/Table/Partials/TdHeader.jsx +0 -36
  179. package/dist/Atomic/UI/Table/Partials/TdRow.jsx +0 -103
  180. package/dist/Atomic/UI/Table/Partials/TdTitle.jsx +0 -55
  181. package/dist/Atomic/UI/Table/Table.jsx +0 -63
  182. package/dist/Atomic/UI/Table/TdTypes/TdActions.jsx +0 -80
  183. package/dist/Atomic/UI/Table/TdTypes/TdPriority.jsx +0 -26
  184. package/dist/Atomic/UI/Table/TdTypes/TdRange.jsx +0 -13
  185. package/dist/Atomic/UI/Table/TdTypes/TdWeight.jsx +0 -56
  186. package/dist/Atomic/UI/TagList/TagList.jsx +0 -256
  187. package/dist/Atomic/UI/WizardStepper/constructor.jsx +0 -86
  188. package/dist/Classes/RESTAPI/partials/CredentialsProcessing.jsx +0 -254
  189. package/dist/Functions/customEventListener.jsx +0 -96
  190. package/dist/Functions/operations.jsx +0 -138
  191. package/dist/Functions/useFormTools/functions/RenderFields.jsx +0 -108
  192. package/dist/Functions/useFormTools/index.jsx +0 -777
  193. package/dist/Functions/usePasswordChecker.jsx +0 -128
  194. package/dist/Functions/utils.jsx +0 -492
  195. package/dist/Molecular/CustomIcons/components/AffiliateNetworks.jsx +0 -22
  196. package/dist/Molecular/CustomIcons/components/AlertCircle.jsx +0 -24
  197. package/dist/Molecular/CustomIcons/components/AppStore.jsx +0 -30
  198. package/dist/Molecular/CustomIcons/components/Arrow.jsx +0 -33
  199. package/dist/Molecular/CustomIcons/components/ArrowDown.jsx +0 -18
  200. package/dist/Molecular/CustomIcons/components/ArrowLeft.jsx +0 -23
  201. package/dist/Molecular/CustomIcons/components/ArrowRight.jsx +0 -23
  202. package/dist/Molecular/CustomIcons/components/ArrowUp.jsx +0 -18
  203. package/dist/Molecular/CustomIcons/components/Bell.jsx +0 -16
  204. package/dist/Molecular/CustomIcons/components/Button.jsx +0 -13
  205. package/dist/Molecular/CustomIcons/components/Campaigns.jsx +0 -17
  206. package/dist/Molecular/CustomIcons/components/Check.jsx +0 -15
  207. package/dist/Molecular/CustomIcons/components/Check2.jsx +0 -13
  208. package/dist/Molecular/CustomIcons/components/ChevronDown.jsx +0 -13
  209. package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.jsx +0 -12
  210. package/dist/Molecular/CustomIcons/components/ChevronLeft.jsx +0 -12
  211. package/dist/Molecular/CustomIcons/components/ChevronRight.jsx +0 -12
  212. package/dist/Molecular/CustomIcons/components/ChevronUp.jsx +0 -12
  213. package/dist/Molecular/CustomIcons/components/ChevronUpDown.jsx +0 -28
  214. package/dist/Molecular/CustomIcons/components/Close.jsx +0 -15
  215. package/dist/Molecular/CustomIcons/components/ColumnsOrder.jsx +0 -18
  216. package/dist/Molecular/CustomIcons/components/Delete.jsx +0 -17
  217. package/dist/Molecular/CustomIcons/components/Edit.jsx +0 -16
  218. package/dist/Molecular/CustomIcons/components/Email.jsx +0 -32
  219. package/dist/Molecular/CustomIcons/components/FinturfLogo.jsx +0 -19
  220. package/dist/Molecular/CustomIcons/components/FinturfLogo2.jsx +0 -36
  221. package/dist/Molecular/CustomIcons/components/Flows.jsx +0 -16
  222. package/dist/Molecular/CustomIcons/components/Gift.jsx +0 -26
  223. package/dist/Molecular/CustomIcons/components/GoogleAuth.jsx +0 -30
  224. package/dist/Molecular/CustomIcons/components/GooglePlay.jsx +0 -30
  225. package/dist/Molecular/CustomIcons/components/HelpCircle.jsx +0 -20
  226. package/dist/Molecular/CustomIcons/components/HelpCircle2.jsx +0 -21
  227. package/dist/Molecular/CustomIcons/components/HelpCircleFilled.jsx +0 -20
  228. package/dist/Molecular/CustomIcons/components/Home.jsx +0 -17
  229. package/dist/Molecular/CustomIcons/components/Home2.jsx +0 -23
  230. package/dist/Molecular/CustomIcons/components/Key.jsx +0 -24
  231. package/dist/Molecular/CustomIcons/components/Landers.jsx +0 -21
  232. package/dist/Molecular/CustomIcons/components/Lock.jsx +0 -16
  233. package/dist/Molecular/CustomIcons/components/Mail.jsx +0 -27
  234. package/dist/Molecular/CustomIcons/components/Mastercard.jsx +0 -74
  235. package/dist/Molecular/CustomIcons/components/Minus.jsx +0 -26
  236. package/dist/Molecular/CustomIcons/components/Offers.jsx +0 -17
  237. package/dist/Molecular/CustomIcons/components/Pause.jsx +0 -29
  238. package/dist/Molecular/CustomIcons/components/PayPal.jsx +0 -42
  239. package/dist/Molecular/CustomIcons/components/PayPalLightLarge.jsx +0 -29
  240. package/dist/Molecular/CustomIcons/components/Phone.jsx +0 -31
  241. package/dist/Molecular/CustomIcons/components/Play.jsx +0 -26
  242. package/dist/Molecular/CustomIcons/components/Plus.jsx +0 -26
  243. package/dist/Molecular/CustomIcons/components/Profile.jsx +0 -17
  244. package/dist/Molecular/CustomIcons/components/QRCode.jsx +0 -30
  245. package/dist/Molecular/CustomIcons/components/Rectangle.jsx +0 -13
  246. package/dist/Molecular/CustomIcons/components/Revert.jsx +0 -14
  247. package/dist/Molecular/CustomIcons/components/Star.jsx +0 -15
  248. package/dist/Molecular/CustomIcons/components/Star2.jsx +0 -17
  249. package/dist/Molecular/CustomIcons/components/TrafficSources.jsx +0 -15
  250. package/dist/Molecular/CustomIcons/components/Trash.jsx +0 -16
  251. package/dist/Molecular/CustomIcons/components/TrashRed.jsx +0 -16
  252. package/dist/Molecular/CustomIcons/components/Triggers.jsx +0 -16
  253. package/dist/Molecular/CustomIcons/components/User.jsx +0 -26
  254. package/dist/Molecular/CustomIcons/components/Visa.jsx +0 -32
  255. package/dist/Molecular/CustomIcons/components/X.jsx +0 -13
  256. package/dist/Molecular/FormElement/FormElement.jsx +0 -52
  257. package/dist/Molecular/FormWithDependOn/FormWithDependOn.jsx +0 -161
  258. package/dist/Molecular/InputAddress/InputAddress.jsx +0 -641
  259. package/dist/Molecular/InputPassword/InputPassword.jsx +0 -50
@@ -1,250 +0,0 @@
1
- import cn from 'classnames';
2
-
3
- import { useEffect, useState } from 'react';
4
- import { ArrowDown, ArrowUp, ChevronDown, Tag } from 'react-feather';
5
-
6
- import MonoAccordion from '../MonoAccordion/MonoAccordion';
7
-
8
- import './AccordionTable.scss';
9
-
10
- function AccordionTable({
11
- className,
12
- header,
13
- items,
14
- onChange,
15
- testId,
16
- onSort = () => {},
17
- sortParams,
18
- }) {
19
- const [accordions, setAccordions] = useState(items);
20
-
21
- const sortedColClassName = item =>
22
- cn(
23
- 'accordion-table__header-item',
24
- item.className,
25
- {
26
- 'accordion-table--sorted-col':
27
- sortParams && sortParams.key === item.key,
28
- },
29
- { 'accordion-table__header-item-sortable': !item.noSort },
30
- );
31
-
32
- const handle = {
33
- accordionChange: (key, e) => {
34
- const newArr = accordions?.map((item) => {
35
- if (item.key === key) {
36
- return {
37
- ...item,
38
- isOpen: !item.isOpen,
39
- };
40
- }
41
- return item;
42
- });
43
- const isArrowSvg = e?.target?.tagName === 'svg';
44
- const isAccordionElement
45
- = e.target.className?.includes?.('accordion-table');
46
- if (isAccordionElement || isArrowSvg) {
47
- onChange(newArr);
48
- setAccordions(newArr);
49
- }
50
- },
51
-
52
- setSort: (key) => {
53
- let newSorting;
54
- if (key !== sortParams.key) {
55
- newSorting = { key, direction: 'DESC' };
56
- }
57
- else {
58
- newSorting = {
59
- key,
60
- direction: sortParams.direction === 'ASC' ? 'DESC' : 'ASC',
61
- };
62
- }
63
- onSort(newSorting);
64
- },
65
- };
66
-
67
- const getHeaderItem = (key) => {
68
- return header?.find(item => item.key === key);
69
- };
70
-
71
- const renderTd = (tr) => {
72
- return Object.entries(tr)?.map(([key, value]) => {
73
- return key === 'promoDetails' || key === 'disclosure'
74
- ? null
75
- : (
76
- <div
77
- key={key}
78
- style={{ flexBasis: `${getHeaderItem(key)?.width}%` }}
79
- className={cn(
80
- 'accordion-table__td',
81
- `accordion-table__td--${key}`,
82
- getHeaderItem(key)?.className,
83
- )}
84
- >
85
- <p
86
- className="accordion-table__statistics-td-value"
87
- title={typeof value !== 'object' ? value : value.value}
88
- >
89
- {typeof value !== 'object' ? value : value.value}
90
- </p>
91
- </div>
92
- );
93
- });
94
- };
95
-
96
- const renderTr = (rows) => {
97
- return rows?.map((row, index) => {
98
- return (
99
- <div
100
- key={index}
101
- className={cn(
102
- 'accordion-table__tr',
103
- {
104
- 'accordion-table__tr-with-promo':
105
- row.promoDetails || row.cols?.promoDetails,
106
- },
107
- row.className,
108
- )}
109
- >
110
- <div className="df w100">{renderTd(row.cols || row)}</div>
111
- {row.promoDetails || row.cols?.promoDetails
112
- ? (
113
- <div className="accordion-table__tr-promo-wrapper">
114
- <div className="accordion-table__tr-promo">
115
- <Tag className="tr-promo-icon" width={16} height={16} />
116
- <span className="tr-promo-label">PROMOTION</span>
117
- {row.promoDetails || row.cols?.promoDetails}
118
- </div>
119
- </div>
120
- )
121
- : null}
122
-
123
- {row.disclosure || row.cols?.disclosure
124
- ? (
125
- <div className="accordion-table__tr-promo-wrapper">
126
- <div className="accordion-table__tr-promo accordion-table__tr-promo-disclosure">
127
- {row.disclosure || row.cols?.disclosure}
128
- </div>
129
- </div>
130
- )
131
- : null}
132
- </div>
133
- );
134
- });
135
- };
136
-
137
- const defineAccordionTitle = (row) => {
138
- return (
139
- <div
140
- onClick={e => handle.accordionChange(row.key, e)}
141
- className="accordion-table__accordion-label-box"
142
- >
143
- <div className="accordion-table__accordion-label-wrapper j4">
144
- <ChevronDown
145
- width={8}
146
- height={4}
147
- className={cn('accordion-label-box__icon', {
148
- 'accordion-label-box__icon--open': row.isOpen,
149
- })}
150
- />
151
- <span className="accordion-label-box__label">{row.label}</span>
152
- {row.statistics && (
153
- <div className={cn('accordion-table__tr', row.className)}>
154
- {Object.entries(row.statistics).map(([key, value]) => {
155
- return (
156
- <div
157
- key={key}
158
- style={{ width: `${getHeaderItem(key)?.width}%` }}
159
- className={cn(
160
- 'accordion-table__statistics-td',
161
- getHeaderItem(key)?.className,
162
- )}
163
- >
164
- <div className="accordion-table__statistics-td-value-wrapper">
165
- {key === 'status'
166
- ? (
167
- <div className="accordion-table__statistics-td-value">
168
- {value}
169
- </div>
170
- )
171
- : (
172
- <p
173
- className="accordion-table__statistics-td-value"
174
- title={value}
175
- >
176
- {value}
177
- </p>
178
- )}
179
- </div>
180
- </div>
181
- );
182
- })}
183
- </div>
184
- )}
185
- </div>
186
-
187
- {row.titleContent}
188
- </div>
189
- );
190
- };
191
-
192
- useEffect(() => {
193
- setAccordions(items);
194
- }, [items]);
195
-
196
- return (
197
- <div className={cn('accordion-table', className)}>
198
- <div className="accordion-table__header">
199
- {header?.map((item) => {
200
- return (
201
- <div
202
- style={{ flexBasis: `${item.width}%` }}
203
- key={item.key}
204
- className={sortedColClassName(item)}
205
- onClick={() => !item.noSort && handle.setSort(item.key)}
206
- >
207
- {sortParams
208
- && item.key === sortParams.key
209
- && sortParams.key !== 'actions'
210
- && (sortParams.direction === 'DESC'
211
- ? (
212
- <ArrowDown size={16} />
213
- )
214
- : (
215
- <ArrowUp size={16} />
216
- ))}
217
-
218
- {item.label}
219
- </div>
220
- );
221
- })}
222
- </div>
223
-
224
- <div className="accordion-table__body">
225
- {accordions?.map((accordion) => {
226
- return (
227
- <MonoAccordion
228
- testId={testId}
229
- key={accordion.key}
230
- onClick={e => handle.accordionChange(accordion.key, e)}
231
- isOpen={accordion.isOpen}
232
- className={cn(
233
- 'accordion-table__body-accordion',
234
- {
235
- 'accordion-table__body-accordion--closed': !accordion.isOpen,
236
- },
237
- accordion.className,
238
- )}
239
- titleJSX={defineAccordionTitle(accordion)}
240
- >
241
- {accordion.children ?? renderTr(accordion.rows)}
242
- </MonoAccordion>
243
- );
244
- })}
245
- </div>
246
- </div>
247
- );
248
- }
249
-
250
- export default AccordionTable;
@@ -1,68 +0,0 @@
1
- import cn from 'classnames';
2
- import { useEffect, useRef, useState } from 'react';
3
- import { ChevronDown, ChevronUp } from 'react-feather';
4
- import './AccordionText.scss';
5
-
6
- const defaultText = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.`;
7
-
8
- function AccordionText({
9
- isDefaultOpen = false,
10
- isOuterOpen = false,
11
- className,
12
- text = defaultText,
13
- shortText = null,
14
- }) {
15
- const bodyRef = useRef(null);
16
- const [isOpen, setIsOpen] = useState(isDefaultOpen);
17
- const [isNeedTrimText, setIsNeedTrimText] = useState(false);
18
-
19
- useEffect(() => {
20
- setIsOpen(isOuterOpen);
21
- }, [isOuterOpen]);
22
-
23
- useEffect(() => {
24
- const checkEllipsis = () => {
25
- if (bodyRef.current) {
26
- setIsNeedTrimText(bodyRef.current.scrollWidth > bodyRef.current.clientWidth);
27
- }
28
- };
29
-
30
- const resizeObserver = new ResizeObserver(() => {
31
- checkEllipsis();
32
- });
33
-
34
- if (bodyRef.current) {
35
- resizeObserver.observe(bodyRef.current);
36
- checkEllipsis();
37
- }
38
-
39
- return () => {
40
- if (bodyRef.current) {
41
- resizeObserver.unobserve(bodyRef.current);
42
- }
43
- };
44
- }, [text]);
45
-
46
- return (
47
- <div
48
- className={cn('accordion-text', className, {
49
- 'accordion-text--open': isOpen,
50
- })}
51
- onClick={() => setIsOpen(prevIsOpen => !prevIsOpen)}
52
- >
53
- <div
54
- className={cn('accordion-text__body', {
55
- 'accordion-text__body--trim-text': isNeedTrimText && !isOpen,
56
- })}
57
- ref={bodyRef}
58
- >
59
- {shortText ? (isOpen ? text : shortText) : text}
60
- </div>
61
- <div className="accordion-text__toggle">
62
- {isOpen ? <ChevronUp /> : <ChevronDown />}
63
- </div>
64
- </div>
65
- );
66
- }
67
-
68
- export default AccordionText;
@@ -1,134 +0,0 @@
1
- import cn from 'classnames';
2
-
3
- import { useEffect, useRef, useState } from 'react';
4
-
5
- import { getStyles } from '../../../Functions/utils';
6
-
7
- import './Arrow.scss';
8
-
9
- function Arrow({ type, className, onClick, disabled, testId, isAlt }) {
10
- if (!type || (type !== 'left' && type !== 'right')) return null;
11
- const ref = useRef();
12
- const [color, setColor] = useState('currentColor');
13
-
14
- useEffect(() => {
15
- if (ref.current) {
16
- setColor(getStyles(ref.current, 'color'));
17
- }
18
- }, [ref.current]);
19
-
20
- function renderSVG() {
21
- if (type === 'left') {
22
- if (isAlt) {
23
- return (
24
- <svg
25
- data-testid={testId}
26
- version="1.1"
27
- id="Layer_1"
28
- xmlns="http://www.w3.org/2000/svg"
29
- width="16"
30
- height="16"
31
- viewBox="0 0 16 16"
32
- >
33
- <path
34
- d="M12.7,8H3.3"
35
- stroke={color}
36
- fill="none"
37
- strokeWidth={1.3333}
38
- strokeLinecap="round"
39
- strokeLinejoin="round"
40
- />
41
- <path
42
- d="M8,3.3L3.3,8L8,12.7"
43
- stroke={color}
44
- fill="none"
45
- strokeWidth={1.3333}
46
- strokeLinecap="round"
47
- strokeLinejoin="round"
48
- />
49
- </svg>
50
- );
51
- }
52
- return (
53
- <svg
54
- data-testid={testId}
55
- width="24"
56
- height="24"
57
- viewBox="0 0 24 24"
58
- fill="none"
59
- xmlns="http://www.w3.org/2000/svg"
60
- >
61
- <path
62
- d="M15 18L9 12L15 6"
63
- stroke={color}
64
- strokeWidth="2"
65
- strokeLinecap="round"
66
- strokeLinejoin="round"
67
- />
68
- </svg>
69
- );
70
- }
71
- if (isAlt) {
72
- return (
73
- <svg
74
- data-testid={testId}
75
- id="Layer_1"
76
- xmlns="http://www.w3.org/2000/svg"
77
- width="16"
78
- height="16"
79
- viewBox="0 0 16 16"
80
- >
81
- <path
82
- d="M3.3,8h9.3"
83
- stroke={color}
84
- fill="none"
85
- strokeWidth={1.3333}
86
- strokeLinecap="round"
87
- strokeLinejoin="round"
88
- />
89
- <path
90
- d="M8,3.3L12.7,8L8,12.7"
91
- stroke={color}
92
- fill="none"
93
- strokeWidth={1.3333}
94
- strokeLinecap="round"
95
- strokeLinejoin="round"
96
- />
97
- </svg>
98
- );
99
- }
100
- return (
101
- <svg
102
- data-testid={testId}
103
- width="24"
104
- height="24"
105
- viewBox="0 0 24 24"
106
- fill="none"
107
- xmlns="http://www.w3.org/2000/svg"
108
- >
109
- <path
110
- d="M9 18L15 12L9 6"
111
- stroke="currentColor"
112
- strokeWidth="2"
113
- strokeLinecap="round"
114
- strokeLinejoin="round"
115
- />
116
- </svg>
117
- );
118
- }
119
-
120
- return (
121
- <div
122
- data-testid={`arrow--key-${testId}--type-${type}`}
123
- ref={ref}
124
- className={cn('arrow', `arrow_${type}`, className, {
125
- arrow_disabled: disabled,
126
- })}
127
- onClick={onClick}
128
- >
129
- {renderSVG()}
130
- </div>
131
- );
132
- }
133
-
134
- export default Arrow;
@@ -1,53 +0,0 @@
1
- import cn from 'classnames';
2
-
3
- // global
4
-
5
- // styles
6
- import './Box.scss';
7
-
8
- const directionVariants = {
9
- column: 'column',
10
- row: 'row',
11
- };
12
-
13
- const sizes = {
14
- none: 'none',
15
- xs: 'xs',
16
- s: 's',
17
- m: 'm',
18
- l: 'l',
19
- xl: 'xl',
20
- };
21
-
22
- function Box({
23
- children,
24
- paddingVariant = sizes.m,
25
- radiiVariant = sizes.s,
26
- direction = directionVariants.column,
27
- className,
28
- ...restProps
29
- }) {
30
- const styles = {
31
- flexDirection: direction,
32
- };
33
- return (
34
- <div
35
- style={styles}
36
- className={cn(
37
- 'box',
38
- `box--padding-${paddingVariant}`,
39
- `box--radii-${radiiVariant}`,
40
- className,
41
- {
42
- 'df': direction === directionVariants.row,
43
- 'dfc-jc': direction === directionVariants.column,
44
- },
45
- )}
46
- {...restProps}
47
- >
48
- {children}
49
- </div>
50
- );
51
- }
52
-
53
- export default Box;
@@ -1,178 +0,0 @@
1
- import {
2
- BarElement,
3
- CategoryScale,
4
- Chart as ChartJS,
5
- Filler,
6
- LinearScale,
7
- LineElement,
8
- PointElement,
9
- Tooltip,
10
- } from 'chart.js';
11
-
12
- import cn from 'classnames';
13
- import {
14
- useCallback,
15
- useEffect,
16
- useLayoutEffect,
17
- useMemo,
18
- useRef,
19
- useState,
20
- } from 'react';
21
- import * as ChartComponents from 'react-chartjs-2';
22
-
23
- import { clone } from '../../../Functions/utils';
24
-
25
- import {
26
- COMPONENT_OPTIONS,
27
- DEFAULT_CHART_MODEL,
28
- ICON_MODELS,
29
- } from './partial/Chart.constants';
30
- import ChartTypeSwitcherIcon from './partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon';
31
- import {
32
- correctModelKey,
33
- getChartTypeKey,
34
- getNotLibraryOptionsOptions,
35
- getOptions,
36
- prepareData,
37
- } from './partial/utils';
38
-
39
- import './Chart.scss';
40
-
41
- const RC = 'chart';
42
-
43
- ChartJS.register(
44
- CategoryScale,
45
- LinearScale,
46
- BarElement,
47
- PointElement,
48
- LineElement,
49
- Filler,
50
- Tooltip,
51
- );
52
-
53
- function Chart({
54
- className,
55
- initialModel,
56
- modelsForSwitch,
57
- setModelExternalValue,
58
- description,
59
- customOptions,
60
- data,
61
- addToDatasets,
62
- modifyOptions,
63
- }) {
64
- if (!data) return null;
65
-
66
- const { label, value } = description || {};
67
-
68
- const [model, setModel] = useState(DEFAULT_CHART_MODEL);
69
- const [localData, setLocalData] = useState(data);
70
- const chartRef = useRef(null);
71
- const charContainertRef = useRef(null);
72
-
73
- const options = useMemo(
74
- () =>
75
- customOptions
76
- || (modifyOptions ? modifyOptions(getOptions(model)) : getOptions(model)),
77
- [customOptions, model, modifyOptions?.toString?.(), data],
78
- );
79
-
80
- const notLibraryOptionsOptions = useMemo(
81
- () =>
82
- customOptions
83
- ? customOptions?.notLibraryOptions
84
- : getNotLibraryOptionsOptions(model),
85
- [customOptions, model, data],
86
- );
87
-
88
- const ChartComponent = useCallback(
89
- (props) => {
90
- const Component = ChartComponents[getChartTypeKey(model)];
91
- return <Component ref={chartRef} {...props} />;
92
- },
93
- [model],
94
- );
95
-
96
- const isExcludeDescription
97
- = COMPONENT_OPTIONS.disableDescriptionsFor.includes(model);
98
- const isExcludeChartTypeSwitcher
99
- = COMPONENT_OPTIONS.disableChartTypeSwitcherFor.includes(model);
100
-
101
- useLayoutEffect(() => {
102
- if (setModelExternalValue && model !== 'emptyLayout')
103
- setModelExternalValue(model);
104
- }, [model]);
105
-
106
- useLayoutEffect(() => {
107
- const { setCanvasDimensions } = notLibraryOptionsOptions || {};
108
- if (charContainertRef.current) {
109
- charContainertRef.current.style.width = setCanvasDimensions?.width ?? '';
110
- charContainertRef.current.style.height
111
- = setCanvasDimensions?.height ?? '';
112
- }
113
- }, [notLibraryOptionsOptions]);
114
-
115
- useEffect(() => {
116
- setModel(correctModelKey(initialModel));
117
- }, [initialModel]);
118
-
119
- useEffect(() => {
120
- setLocalData(
121
- prepareData(model, clone(data), chartRef.current, addToDatasets),
122
- );
123
- }, [model, data]);
124
-
125
- return (
126
- <div
127
- className={cn(
128
- RC,
129
- { [`${RC}_icon-mode`]: ICON_MODELS.includes(model) },
130
- className,
131
- )}
132
- >
133
- <div
134
- className={cn(`${RC}__header`, {
135
- [`${RC}__header_only-switcher`]: !description,
136
- })}
137
- >
138
- {description && !isExcludeDescription
139
- ? (
140
- <div className={cn(`${RC}__description`)}>
141
- {label
142
- ? (
143
- <span className={cn(`${RC}__description-title`)}>{label}</span>
144
- )
145
- : null}
146
- {value
147
- ? (
148
- <div className={cn(`${RC}__description-value`)}>{value}</div>
149
- )
150
- : null}
151
- </div>
152
- )
153
- : null}
154
- {!isExcludeChartTypeSwitcher
155
- ? (
156
- <div className={cn(`${RC}__type-switcher`)}>
157
- <ChartTypeSwitcherIcon
158
- iconType="Bar"
159
- isActive={getChartTypeKey(model) === 'Bar'}
160
- onClick={() => setModel(modelsForSwitch?.[0] || 'barLayout')}
161
- />
162
- <ChartTypeSwitcherIcon
163
- iconType="Line"
164
- isActive={getChartTypeKey(model) === 'Line'}
165
- onClick={() => setModel(modelsForSwitch?.[1] || 'lineLayout')}
166
- />
167
- </div>
168
- )
169
- : null}
170
- </div>
171
- <div ref={charContainertRef} className={cn(`${RC}__chart-wrapper`)}>
172
- <ChartComponent {...options} data={localData} />
173
- </div>
174
- </div>
175
- );
176
- }
177
-
178
- export default Chart;