intelicoreact 1.8.10 → 1.8.11

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 +8 -15
  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,63 +0,0 @@
1
- import cn from 'classnames';
2
-
3
- import TdHeader from './Partials/TdHeader';
4
- import TdRow from './Partials/TdRow';
5
-
6
- import './Table.scss';
7
-
8
- function Table({
9
- rows,
10
- onChange,
11
- className,
12
- header,
13
- onActionClick,
14
- testId = 'table',
15
- }) {
16
- const handleArrayChange = (value, index) => {
17
- rows[index] = value;
18
- onChange({ header: [...header], rows: [...rows] });
19
- };
20
-
21
- return (
22
- <div
23
- data-testid={testId}
24
- className={cn('simple-table', {
25
- [`simple-table--${className}`]: className,
26
- })}
27
- >
28
- <table>
29
- <thead>
30
- <tr>
31
- {header?.map(item => (
32
- <TdHeader item={item} key={item.key} />
33
- ))}
34
- </tr>
35
- </thead>
36
- <tbody>
37
- {rows && rows?.length
38
- ? (
39
- rows?.map((row, index) => (
40
- <TdRow
41
- onActionClick={onActionClick}
42
- rowIndex={index}
43
- key={typeof row.id === 'object' ? row.id.value : row.id}
44
- item={row}
45
- header={header}
46
- onChange={value => handleArrayChange(value, index)}
47
- />
48
- ))
49
- )
50
- : (
51
- <tr>
52
- <td className="row--not-found" colSpan={header?.length}>
53
- Not set
54
- </td>
55
- </tr>
56
- )}
57
- </tbody>
58
- </table>
59
- </div>
60
- );
61
- }
62
-
63
- export default Table;
@@ -1,80 +0,0 @@
1
- import { useState } from 'react';
2
-
3
- import * as Icons from 'react-feather';
4
-
5
- import Switcher from '../../../FormElements/Switcher/Switcher';
6
-
7
- import './TdTypes.scss';
8
-
9
- export function TdActions({ actions, onChange, onActionClick, rowItem }) {
10
- if (!actions) return false;
11
-
12
- const [state, setState] = useState(actions);
13
-
14
- const handleArrayChange = (value, index, prop) => {
15
- state[index][prop] = value;
16
- setState([...state]);
17
- onChange(state);
18
- };
19
-
20
- return (
21
- <div className="j6">
22
- {actions?.map((action, index) => {
23
- switch (action.type) {
24
- case 'download':
25
- return (
26
- <div
27
- key={index}
28
- className="td-actions--item td-actions--download"
29
- onClick={() => {}}
30
- >
31
- <Icons.Download />
32
- </div>
33
- );
34
- case 'edit':
35
- return (
36
- <div
37
- key={index}
38
- className="td-actions--item td-actions--edit"
39
- onClick={() => {}}
40
- >
41
- <Icons.Edit3 />
42
- </div>
43
- );
44
- case 'delete':
45
- return (
46
- <div
47
- key={index}
48
- className="td-actions--item td-actions--delete"
49
- onClick={() => onActionClick('delete', rowItem)}
50
- >
51
- <Icons.Trash2 />
52
- </div>
53
- );
54
- case 'undo':
55
- return (
56
- <div
57
- key={index}
58
- className="td-actions--item td-actions--undo"
59
- onClick={() => onActionClick('undo', rowItem)}
60
- >
61
- <Icons.RotateCcw />
62
- </div>
63
- );
64
- case 'switcher':
65
- return (
66
- <div key={index} className="df">
67
- <Switcher
68
- label={action.label || null}
69
- isActive={action?.value}
70
- onChange={e => handleArrayChange(e, index, 'value')}
71
- />
72
- </div>
73
- );
74
- default:
75
- return null;
76
- }
77
- })}
78
- </div>
79
- );
80
- }
@@ -1,26 +0,0 @@
1
- import cn from 'classnames';
2
- import { ArrowDown, ArrowUp } from 'react-feather';
3
-
4
- import '../Table.scss';
5
-
6
- function TdPriority({ onClick, rowIndex, cardLength }) {
7
- return (
8
- <div className="cards-table__priority">
9
- <span className="mr5">{rowIndex + 1}</span>
10
- <div className="df">
11
- <ArrowDown
12
- onClick={() => onClick(rowIndex)}
13
- className={cn('table--icon', {
14
- disabled: rowIndex + 1 === cardLength,
15
- })}
16
- />
17
- <ArrowUp
18
- onClick={() => onClick(rowIndex, true)}
19
- className={cn('table--icon', { disabled: rowIndex === 0 })}
20
- />
21
- </div>
22
- </div>
23
- );
24
- }
25
-
26
- export default TdPriority;
@@ -1,13 +0,0 @@
1
- function TdRange({ item }) {
2
- if (!item) return false;
3
-
4
- return (
5
- <div>
6
- <span>{item.from}</span>
7
- <span> - </span>
8
- <span>{item.to}</span>
9
- </div>
10
- );
11
- }
12
-
13
- export default TdRange;
@@ -1,56 +0,0 @@
1
- import cn from 'classnames';
2
-
3
- import { useEffect, useState } from 'react';
4
-
5
- import { useOutsideToggle } from '../../../../Functions/utils';
6
- import { KEY_CODE } from '../../Modal/Modal';
7
-
8
- import '../Table.scss';
9
-
10
- function TdWeight({ value, percent, onChange, className }) {
11
- const [state, setState] = useState(value);
12
- const {
13
- isToggled: isEdited,
14
- toggleOff: unsetIsEdited,
15
- toggleOn: setIsEdited,
16
- } = useOutsideToggle(false);
17
-
18
- useEffect(() => {
19
- setState(value);
20
- }, [value, isEdited]);
21
-
22
- const handleKeyUp = ({ keyCode, target }) => {
23
- if (keyCode === KEY_CODE.ENTER) {
24
- const newValue = Number(target.value) || 1;
25
- onChange(newValue);
26
- unsetIsEdited();
27
- }
28
- };
29
-
30
- return (
31
- <>
32
- {isEdited
33
- ? (
34
- <Input
35
- value={state}
36
- onChange={e => setState(e)}
37
- onBlur={unsetIsEdited}
38
- onKeyUp={handleKeyUp}
39
- autoFocus
40
- />
41
- )
42
- : (
43
- <div className={cn('td-weight', className)} onClick={setIsEdited}>
44
- <span>{value}</span>
45
- <span className="ml2 color--grey-gull">
46
- (
47
- {percent}
48
- %)
49
- </span>
50
- </div>
51
- )}
52
- </>
53
- );
54
- }
55
-
56
- export default TdWeight;
@@ -1,256 +0,0 @@
1
- import cn from 'classnames';
2
-
3
- import {
4
- createRef,
5
- useEffect,
6
- useLayoutEffect,
7
- useRef,
8
- useState,
9
- } from 'react';
10
- import { Edit3 } from 'react-feather';
11
-
12
- import { checkedRef } from '../../../Functions/utils';
13
- import Tag from '../Tag/Tag';
14
-
15
- import './TagList.scss';
16
-
17
- function TagList({
18
- disabled,
19
- className,
20
- onTagClick,
21
- removeItem = null,
22
- items = [],
23
- withToggle = true,
24
- disableShowMore = false,
25
- shownItemsCount = 'auto',
26
- testId = 'test-taglist',
27
- refProp,
28
-
29
- renderOrder,
30
-
31
- onEditClick,
32
- onToggleRenderAll,
33
- }) {
34
- const wrapperRef = useRef(null);
35
- const [tagList, setTagList] = useState([]);
36
-
37
- const [staticTagsCount, setStaticTagsCount] = useState(-1);
38
- const [renderItemsCount, setRenderItemsCount] = useState(-1);
39
- const [renderAll, setRenderAll] = useState(!withToggle);
40
-
41
- const wrapperWidth
42
- = wrapperRef?.current?.getBoundingClientRect()?.width ?? -1;
43
-
44
- const setRenderAllInterceptor = (v) => {
45
- setRenderAll(v);
46
- onToggleRenderAll?.(v);
47
- };
48
-
49
- const getStaticTagsCount = (computedWidth) => {
50
- if (typeof shownItemsCount === 'number') return shownItemsCount;
51
-
52
- const delta = typeof onEditClick === 'function' ? 60 : 32;
53
- const result = tagList.reduce(
54
- (result, { itemRef }, index) => {
55
- if (result.skip) return result;
56
-
57
- const itemStyle
58
- = itemRef?.current && window.getComputedStyle(itemRef.current);
59
-
60
- const itemWidth = [
61
- Number.parseInt(itemRef.current?.getBoundingClientRect()?.width, 10),
62
- Number.parseInt(itemStyle?.marginLeft, 10),
63
- Number.parseInt(itemStyle?.marginRight, 10),
64
- ].reduce((result, item) => {
65
- if (!isNaN(item)) result += item;
66
- return result;
67
- }, 0);
68
-
69
- if (
70
- (!isNaN(itemWidth)
71
- && itemWidth > 0
72
- && itemWidth + result.width < computedWidth - delta)
73
- || index === 0
74
- ) {
75
- result = {
76
- count: result.count + 1,
77
- width: result.width + itemWidth,
78
- items: [...result.items, { w: itemWidth, r: itemRef?.current }],
79
- };
80
- }
81
- else {
82
- result.skip = true;
83
- }
84
-
85
- return result;
86
- },
87
- { count: 0, width: 0, items: [], skip: false },
88
- );
89
- if (result?.items?.length === 1 && tagList.length > 1) {
90
- result.items[0].r.style.maxWidth = `${computedWidth - delta - 8}px`;
91
- }
92
-
93
- return result?.count;
94
- };
95
-
96
- const cancelDefault = (e, cb = () => {}) => {
97
- e?.preventDefault();
98
- e?.stopPropagation();
99
-
100
- cb(e);
101
- };
102
-
103
- const renderTags = () => {
104
- const tagsRenderOrder
105
- = renderOrder ?? tagList.map(({ value, id }) => value ?? id);
106
-
107
- return tagsRenderOrder.map((v, i) => {
108
- const item = tagList.find(({ value, id }) => {
109
- if (id) return id === v; // сначала ищем по id
110
- if (value) return value === v; // потом по value
111
- return false;
112
- });
113
-
114
- if (!item) return null;
115
-
116
- const isHidden
117
- = renderItemsCount !== -1 && staticTagsCount !== -1
118
- ? i >= renderItemsCount
119
- : false;
120
-
121
- return (
122
- <div
123
- className={`tag-list_wrapper_item ${isHidden ? 'tag-list_wrapper_item--hidden' : ''}`}
124
- key={`tag-list-item-${item?.id ?? item?.value}`}
125
- ref={checkedRef(item?.itemRef)}
126
- >
127
- <Tag
128
- testId={`test-taglist-item-${item?.id ?? item?.value}`}
129
- {...item}
130
- onClick={onTagClick}
131
- removeItem={removeItem}
132
- />
133
- </div>
134
- );
135
- });
136
- };
137
-
138
- const renderMoreTags = () => {
139
- if (
140
- tagList?.length < shownItemsCount
141
- || !tagList?.length
142
- || disableShowMore
143
- ) {
144
- return null;
145
- }
146
- const restItems = tagList.length - renderItemsCount;
147
-
148
- if (restItems === 0 || !withToggle || staticTagsCount === -1) return null;
149
-
150
- return (
151
- <Tag
152
- label={`+${restItems}`}
153
- className="tag-list_wrapper_render-more"
154
- onClick={
155
- disableShowMore
156
- ? () => {}
157
- : e => cancelDefault(e, () => setRenderAllInterceptor(true))
158
- }
159
- />
160
- );
161
- };
162
- const renderHideTags = () => {
163
- if (
164
- renderItemsCount !== tagList?.length
165
- || !withToggle
166
- || staticTagsCount === -1
167
- || staticTagsCount === tagList?.length
168
- ) {
169
- return null;
170
- }
171
-
172
- return (
173
- <Tag
174
- label="..."
175
- className="tag-list_wrapper_hide-more"
176
- onClick={e => cancelDefault(e, () => setRenderAllInterceptor(false))}
177
- />
178
- );
179
- };
180
-
181
- // Set TagList Items
182
- useEffect(() => {
183
- setStaticTagsCount(-1);
184
- setRenderItemsCount(-1);
185
- setRenderAllInterceptor(false);
186
- const itemsWithRef = items.map(item => ({ ...item, itemRef: createRef() }));
187
- setTagList(itemsWithRef);
188
- }, [items]);
189
-
190
- // Count Row Tags
191
- useLayoutEffect(() => {
192
- if (withToggle && wrapperWidth !== -1 && staticTagsCount === -1) {
193
- let computedWidth = wrapperWidth;
194
-
195
- if (computedWidth === 0) {
196
- computedWidth = Number.parseInt(
197
- wrapperRef?.current
198
- ? window.getComputedStyle(wrapperRef?.current)?.width
199
- : 0,
200
- );
201
- }
202
-
203
- if (!isNaN(computedWidth)) {
204
- setStaticTagsCount(getStaticTagsCount(computedWidth));
205
- }
206
- }
207
- }, [tagList, wrapperWidth, wrapperRef?.current]);
208
-
209
- //
210
- useLayoutEffect(() => {
211
- setRenderItemsCount(staticTagsCount);
212
- }, [staticTagsCount]);
213
-
214
- // Toggle Show/Hide More Tags
215
- useEffect(() => {
216
- setRenderItemsCount(renderAll ? tagList?.length : staticTagsCount);
217
- }, [renderAll]);
218
-
219
- useEffect(() => {
220
- if (wrapperRef?.current && refProp) refProp.current = wrapperRef?.current;
221
- }, [wrapperRef?.current]);
222
-
223
- return (
224
- <div
225
- className={cn(
226
- 'tag-list_wrapper',
227
- `${
228
- renderItemsCount !== tagList?.length
229
- || !withToggle
230
- || staticTagsCount === -1
231
- || staticTagsCount === tagList?.length
232
- ? 'tag-list_wrapper--only-static-items'
233
- : 'tag-list_wrapper--all-items'
234
- }`,
235
- className,
236
- { 'tag-list_wrapper--disabled': disabled },
237
- )}
238
- style={{
239
- visibility: staticTagsCount === -1 ? 'hidden' : 'visible',
240
- zIndex: staticTagsCount === -1 ? '-1' : 'auto',
241
- }}
242
- ref={wrapperRef}
243
- >
244
- {renderTags()}
245
- {renderMoreTags()}
246
- {renderHideTags()}
247
- {typeof onEditClick === 'function' && (
248
- <div className="tag-list__edit-trigger">
249
- <Edit3 onClick={onEditClick} />
250
- </div>
251
- )}
252
- </div>
253
- );
254
- }
255
-
256
- export default TagList;
@@ -1,86 +0,0 @@
1
- import Status from '../Status/Status';
2
-
3
- export const WIZARD_STEP_VARIANTS = Object.freeze({
4
- DEFAULT: 'default',
5
- DONE: 'done',
6
- ACTIVE: 'active',
7
- });
8
-
9
- function JSXMockComponent() {
10
- const arr = [
11
- { title: 'Requested Amont', value: '$15,000' },
12
- { title: 'Repayment Amount', value: '$15,001' },
13
- { title: 'Repayment Date', value: '12/12/2021' },
14
- ]
15
-
16
- const textStyles = {
17
- fontSize: '14px',
18
- fontWeight: 400,
19
- lineHeight: '20px',
20
- letterSpacing: '0.2px',
21
- };
22
-
23
- return arr.map((row) => {
24
- return (
25
- <div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '250px' }}>
26
- <span style={textStyles}>{row.title}</span>
27
- <span style={textStyles}>{row.value}</span>
28
- </div>
29
- )
30
- });
31
- }
32
-
33
- export const mockData = [
34
- {
35
- key: 'businessInfo',
36
- label: 'Provide Business Info',
37
- description: 'This information will help us to evaluate your application',
38
- isFinished: true,
39
- },
40
- {
41
- key: 'principal',
42
- label: 'Add Principal Information',
43
- description: 'A principal is essentially another name for a company owner. At some corporations, the principal is also the founder, CEO, or even the chief investor',
44
- isFinished: true,
45
- isOptional: true,
46
- },
47
- {
48
- key: 'coOwners',
49
- label: 'Add Co-Owners',
50
- description: '{merchantName} will receive that amount from {lenderNmae}',
51
- isActive: true,
52
- titleSlot: <span className="custom-title-slot">$15,001</span>,
53
- contentSlot: <JSXMockComponent />,
54
- },
55
- {
56
- key: 'bankAccount',
57
- label: 'Add a Bank Account',
58
- description: 'Your bank account information will be used to securely and automatically transfer the funds',
59
- titleSlot: <Status label="Some JSX" status="draft" />,
60
- },
61
- {
62
- key: 'documents',
63
- label: 'Upload Documents',
64
- description: 'Please upload the required documents',
65
- },
66
- {
67
- key: 'review',
68
- label: 'Review & Submit',
69
- description: 'Please review the information and submit your application',
70
- },
71
- {
72
- key: 'success',
73
- label: 'Success',
74
- description: 'Your application has been submitted successfully',
75
- },
76
- {
77
- key: 'failure',
78
- label: 'Failure',
79
- description: 'Your application has been failed',
80
- },
81
- {
82
- key: 'pending',
83
- label: 'Pending',
84
- description: 'Your application is under review',
85
- },
86
- ]