@tap-payments/os-micro-frontend-shared 0.1.96-test.24 → 0.1.96-test.26

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 (161) hide show
  1. package/build/components/AmountInput/AmountInput.d.ts +14 -0
  2. package/build/components/AmountInput/AmountInput.js +43 -0
  3. package/build/components/AmountInput/index.d.ts +2 -0
  4. package/build/components/AmountInput/index.js +2 -0
  5. package/build/components/AmountInput/style.d.ts +8 -0
  6. package/build/components/AmountInput/style.js +30 -0
  7. package/build/components/AppServices/AppServices.js +2 -0
  8. package/build/components/BackgroundAnimation/BackgroundAnimation.js +28 -0
  9. package/build/components/BackgroundAnimation/Blob/Blob.js +2 -0
  10. package/build/components/Chip/style.js +1 -0
  11. package/build/components/ColorPicker/HexaFields.js +4 -0
  12. package/build/components/ColorPicker/style.js +1 -1
  13. package/build/components/Dialog/style.js +1 -0
  14. package/build/components/DisplayAmount/DisplayAmount.d.ts +10 -0
  15. package/build/components/DisplayAmount/DisplayAmount.js +22 -0
  16. package/build/components/DisplayAmount/index.d.ts +2 -0
  17. package/build/components/DisplayAmount/index.js +2 -0
  18. package/build/components/DisplayAmount/style.d.ts +5 -0
  19. package/build/components/DisplayAmount/style.js +14 -0
  20. package/build/components/Dropdown2/style.js +2 -0
  21. package/build/components/ErrorToast/ErrorToast.d.ts +3 -0
  22. package/build/components/ErrorToast/ErrorToast.js +7 -0
  23. package/build/components/ErrorToast/index.d.ts +2 -0
  24. package/build/components/ErrorToast/index.js +2 -0
  25. package/build/components/ErrorToast/style.d.ts +9 -0
  26. package/build/components/ErrorToast/style.js +33 -0
  27. package/build/components/ErrorToast/type.d.ts +10 -0
  28. package/build/components/ErrorToast/type.js +1 -0
  29. package/build/components/HeatMap/constant.js +1 -1
  30. package/build/components/InputBase/AmountInputBase/CurrencyList/style.js +3 -0
  31. package/build/components/InputBase/PhoneInputBase/CountriesList/CountriesList.js +1 -1
  32. package/build/components/InputBase/PhoneInputBase/CountriesList/style.js +3 -0
  33. package/build/components/InputBase/SelectBase/SelectBase.js +1 -0
  34. package/build/components/InputBase/SelectBase/SelectBaseMultiple.js +3 -0
  35. package/build/components/InputBase/SelectBase/style.js +3 -2
  36. package/build/components/InputNumber/InputNumber.js +2 -0
  37. package/build/components/Inputs/Input/style.js +6 -2
  38. package/build/components/Inputs/Select/Select.js +1 -0
  39. package/build/components/Inputs/Select/style.js +3 -2
  40. package/build/components/JSONViewer/JSONViewer.js +10 -2
  41. package/build/components/JSONViewer/context/Provider.js +2 -0
  42. package/build/components/LanguageDropdown/LanguageDropdown.d.ts +6 -0
  43. package/build/components/LanguageDropdown/LanguageDropdown.js +24 -0
  44. package/build/components/LanguageDropdown/index.d.ts +2 -0
  45. package/build/components/LanguageDropdown/index.js +2 -0
  46. package/build/components/LanguageDropdown/style.d.ts +6 -0
  47. package/build/components/LanguageDropdown/style.js +5 -0
  48. package/build/components/LeftPeekRightExpandingChip/LeftPeekRightExpandingChip.d.ts +10 -0
  49. package/build/components/LeftPeekRightExpandingChip/LeftPeekRightExpandingChip.js +14 -1
  50. package/build/components/LeftPeekRightExpandingChip/style.js +1 -0
  51. package/build/components/LeftPeekRightExpandingChip/useLeftPeekRightExpandingChip.js +30 -2
  52. package/build/components/MFWidgetLoader/MFWidgetLoader.js +3 -3
  53. package/build/components/MultiSelectStatusButton/MultiSelectStatusButton.js +3 -0
  54. package/build/components/NestedDropdown/Dropdown.js +3 -0
  55. package/build/components/RFH/Inputs/FormInput/FormInput.js +1 -0
  56. package/build/components/RFH/Inputs/MultiSelect/MultiSelect.js +1 -0
  57. package/build/components/RangeCalender/RangeCalender.js +1 -0
  58. package/build/components/RangeCalender/components/RangeDatepicker/RangeDatepicker.js +3 -1
  59. package/build/components/RangeCalender/style.js +1 -1
  60. package/build/components/RightLeftExpandingCenterChip/RightLeftExpandingCenterChip.d.ts +32 -0
  61. package/build/components/RightLeftExpandingCenterChip/RightLeftExpandingCenterChip.js +36 -2
  62. package/build/components/RightLeftExpandingCenterChip/style.js +25 -4
  63. package/build/components/RightLeftExpandingCenterChip/useRightLeftExpandingCenterChip.d.ts +5 -0
  64. package/build/components/RightLeftExpandingCenterChip/useRightLeftExpandingCenterChip.js +53 -1
  65. package/build/components/ScrollLoader/ScrollLoader.js +2 -1
  66. package/build/components/SearchListInput/SearchListInput.d.ts +10 -0
  67. package/build/components/SearchListInput/SearchListInput.js +20 -0
  68. package/build/components/SearchListInput/index.d.ts +2 -0
  69. package/build/components/SearchListInput/index.js +2 -0
  70. package/build/components/SearchListInput/style.d.ts +7 -0
  71. package/build/components/SearchListInput/style.js +15 -0
  72. package/build/components/StatusButton/StatusButton.js +11 -3
  73. package/build/components/StatusButton/constant.js +3 -1
  74. package/build/components/StatusButton/style.d.ts +2 -1
  75. package/build/components/StatusButton/type.d.ts +13 -1
  76. package/build/components/StatusIcons/AuthIcons/constants.js +5 -0
  77. package/build/components/StatusIcons/AuthorizationAutoIcons/CaptureAutoIcon.js +11 -0
  78. package/build/components/StatusIcons/AuthorizationAutoIcons/VoidAutoIcon.js +11 -0
  79. package/build/components/TableCells/CustomCells/ApplicationStatusCell/ApplicationStatusCell.js +3 -1
  80. package/build/components/TableCells/CustomCells/BankCell/BankCell.js +2 -2
  81. package/build/components/TableCells/CustomCells/BrandCell/BrandCell.js +1 -0
  82. package/build/components/TableCells/CustomCells/DateCell/DateCell.js +2 -2
  83. package/build/components/TableCells/CustomCells/EntityCell/EntityCell.js +4 -3
  84. package/build/components/TableCells/CustomCells/EntityCell/style.d.ts +0 -3
  85. package/build/components/TableCells/CustomCells/EntityCell/style.js +2 -22
  86. package/build/components/TableCells/CustomCells/ReferenceCell/ReferenceCell.js +3 -1
  87. package/build/components/TableCells/CustomCells/RefundStatusCell/components/RefundStateIcon.js +1 -0
  88. package/build/components/TableCells/CustomCells/SalesChannelCell/SalesChannelCell.js +4 -3
  89. package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +2 -1
  90. package/build/components/TableCells/CustomCells/SalesChannelCell/style.js +5 -6
  91. package/build/components/TableCells/CustomCells/SegmentsCell/SegmentsCell.js +3 -1
  92. package/build/components/TableCells/CustomCells/SourceMergedCell/SourceMergedCell.js +7 -1
  93. package/build/components/TableCells/CustomCells/StatusCell/StatusCell.js +1 -0
  94. package/build/components/TableCells/CustomCells/WalletCell/WalletCell.js +3 -3
  95. package/build/components/TableView/CustomViews.js +2 -0
  96. package/build/components/TableView/TableView.js +1 -0
  97. package/build/components/Timepicker/Timepicker.js +1 -0
  98. package/build/components/Timepicker/utils.js +9 -5
  99. package/build/components/ToggleView/index.d.ts +1 -1
  100. package/build/components/ToggleView/index.js +1 -1
  101. package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.js +11 -1
  102. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableHeaderCell.js +2 -0
  103. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableLoading.js +5 -2
  104. package/build/components/VirtualTables/SheetViewVirtualTable/components/VirtualTable.js +6 -2
  105. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/usePinnedColumns.js +2 -0
  106. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useTableData.js +1 -0
  107. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useTableState.js +2 -0
  108. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useVirtualTableContainer.js +3 -2
  109. package/build/components/VirtualTables/SheetViewVirtualTable/style.js +1 -1
  110. package/build/components/VirtualTables/VirtualTable/VirtualTable.js +12 -2
  111. package/build/components/VirtualTables/VirtualTableWithCard/VirtualTableWithCard.js +6 -1
  112. package/build/components/VirtualTables/components/ColumnFilter/Inputs/Inputs.js +1 -0
  113. package/build/components/VirtualTables/components/TableFooter/TableFooter.js +9 -0
  114. package/build/components/VirtualTables/components/TableRow.js +5 -0
  115. package/build/components/VirtualTables/components/virtualScroll/ListItemWrapper.js +2 -0
  116. package/build/components/VirtualTables/components/virtualScroll/ListItemWrapperWithCard.js +2 -0
  117. package/build/components/VirtualTables/components/virtualScroll/VirtualScrollList.js +16 -1
  118. package/build/components/Widget/style.js +1 -0
  119. package/build/components/Window/style.js +1 -0
  120. package/build/components/index.d.ts +10 -5
  121. package/build/components/index.js +10 -5
  122. package/build/constants/assets.d.ts +2 -0
  123. package/build/constants/assets.js +6 -0
  124. package/build/constants/server.js +1 -0
  125. package/build/constants/table/cell/authorizationTableCellWidth.d.ts +6 -6
  126. package/build/constants/table/cell/authorizationTableCellWidth.js +6 -6
  127. package/build/constants/table/cell/chargeTableCellWidth.d.ts +6 -6
  128. package/build/constants/table/cell/chargeTableCellWidth.js +6 -6
  129. package/build/constants/table/cell/destinationsTableCellWidth.d.ts +5 -5
  130. package/build/constants/table/cell/destinationsTableCellWidth.js +5 -5
  131. package/build/constants/table/cell/refundTableCellWidth.d.ts +7 -7
  132. package/build/constants/table/cell/refundTableCellWidth.js +7 -7
  133. package/build/constants/table/cell/terminalsTableCellWidth.d.ts +3 -3
  134. package/build/constants/table/cell/terminalsTableCellWidth.js +3 -3
  135. package/build/hooks/useCountdown.js +4 -0
  136. package/build/hooks/useStickyHeaderShadow.js +6 -0
  137. package/build/types/entity.d.ts +5 -0
  138. package/build/utils/api.js +3 -0
  139. package/build/utils/array.js +5 -1
  140. package/build/utils/billing.js +1 -0
  141. package/build/utils/country.d.ts +1 -1
  142. package/build/utils/country.js +2 -1
  143. package/build/utils/currency.js +6 -0
  144. package/build/utils/date.d.ts +5 -0
  145. package/build/utils/date.js +31 -3
  146. package/build/utils/encrypt.js +3 -1
  147. package/build/utils/error.js +2 -0
  148. package/build/utils/freshdesk.js +2 -0
  149. package/build/utils/geography.js +1 -1
  150. package/build/utils/localStorage.js +7 -0
  151. package/build/utils/merchant.js +3 -0
  152. package/build/utils/number.d.ts +2 -0
  153. package/build/utils/number.js +8 -0
  154. package/build/utils/segment.js +1 -0
  155. package/build/utils/string.d.ts +7 -0
  156. package/build/utils/string.js +10 -0
  157. package/build/utils/style.d.ts +11 -0
  158. package/build/utils/style.js +28 -0
  159. package/build/utils/table.js +1 -1
  160. package/build/utils/url.js +2 -0
  161. package/package.json +2 -2
@@ -1,14 +1,25 @@
1
1
  import { useRef, useEffect, useState, useMemo, useCallback, useLayoutEffect } from 'react';
2
2
  import { animate, useMotionValue } from 'framer-motion';
3
3
  import { CHIP_GAP } from './style';
4
+ /**
5
+ * Hook: useRightLeftExpandingCenterChip
6
+ * Encapsulates hover logic, measurement (anchors, chip widths, expandable width),
7
+ * and motion values for the RightLeftExpandingCenterChip component.
8
+ */
4
9
  export const DEFAULT_CHIP_MIN_WIDTH = 24;
5
10
  export function useRightLeftExpandingCenterChip({ leftIcons, rightIcons, centerIcon, expandableCenterRight, expandableCenterLeft, }) {
11
+ // =================================
12
+ // State (move all state to the top)
13
+ // =================================
6
14
  const [isHovering, setIsHovering] = useState(false);
7
15
  const [anchors, setAnchors] = useState({ left: 0, right: 0 });
8
16
  const [leftWidths, setLeftWidths] = useState([]);
9
17
  const [rightWidths, setRightWidths] = useState([]);
10
18
  const [expandableRightWidth, setExpandableRightWidth] = useState(0);
11
19
  const [expandableLeftWidth, setExpandableLeftWidth] = useState(0);
20
+ // ======================
21
+ // Refs (DOM and timers)
22
+ // ======================
12
23
  const hoverTimeoutRef = useRef(null);
13
24
  const centerWrapRef = useRef(null);
14
25
  const centerContentRef = useRef(null);
@@ -17,7 +28,9 @@ export function useRightLeftExpandingCenterChip({ leftIcons, rightIcons, centerI
17
28
  const rightChipRefs = useRef([]);
18
29
  const expandableRightInnerRef = useRef(null);
19
30
  const expandableLeftInnerRef = useRef(null);
31
+ // rAF id for resize throttling
20
32
  const resizeRaf = useRef(null);
33
+ // Small helpers to avoid unnecessary state updates
21
34
  const arraysEqual = useCallback((a, b) => {
22
35
  if (a === b)
23
36
  return true;
@@ -31,9 +44,16 @@ export function useRightLeftExpandingCenterChip({ leftIcons, rightIcons, centerI
31
44
  const anchorsEqual = useCallback((a, b) => {
32
45
  return a.left === b.left && a.right === b.right;
33
46
  }, []);
47
+ // ======================
48
+ // Motion values
49
+ // ======================
34
50
  const expandedRightMV = useMotionValue(0);
35
51
  const expandedLeftMV = useMotionValue(0);
52
+ // Center icon stays fixed - no shift needed
36
53
  const shiftX = useMotionValue(0);
54
+ // ======================
55
+ // Computed values
56
+ // ======================
37
57
  const leftOffsets = useMemo(() => {
38
58
  if (!leftWidths.length)
39
59
  return [];
@@ -58,21 +78,31 @@ export function useRightLeftExpandingCenterChip({ leftIcons, rightIcons, centerI
58
78
  }
59
79
  return acc;
60
80
  }, [rightWidths]);
81
+ // Right icons shift to account for expandable content without gap
61
82
  const rightShift = isHovering && expandableCenterRight ? expandableRightWidth : 0;
83
+ // Left icons shift to account for expandable content without gap
62
84
  const leftShift = isHovering && expandableCenterLeft ? expandableLeftWidth : 0;
85
+ // Predict max right shift even when not hovering to size hover zone generously
63
86
  const maxRightShift = expandableCenterRight ? expandableRightWidth : 0;
87
+ // ======================
88
+ // Callbacks
89
+ // ======================
64
90
  const handleMouseEnter = useCallback(() => {
65
91
  if (hoverTimeoutRef.current)
66
92
  clearTimeout(hoverTimeoutRef.current);
93
+ // Enter immediately to keep hover active while moving across expanded areas
67
94
  setIsHovering(true);
68
95
  }, []);
69
96
  const handleMouseLeave = useCallback(() => {
70
97
  if (hoverTimeoutRef.current)
71
98
  clearTimeout(hoverTimeoutRef.current);
99
+ // Delay hover off to avoid flicker when moving between center and expanded icons
72
100
  hoverTimeoutRef.current = setTimeout(() => setIsHovering(false), 120);
73
101
  }, []);
102
+ // Single measurement function to batch reads and writes
74
103
  const measureAll = useCallback(() => {
75
104
  var _a, _b, _c, _d, _e;
105
+ // Read DOM
76
106
  const wrap = centerWrapRef.current;
77
107
  const chip = centerChipRef.current;
78
108
  const content = centerContentRef.current;
@@ -81,6 +111,7 @@ export function useRightLeftExpandingCenterChip({ leftIcons, rightIcons, centerI
81
111
  const wrapRect = wrap.getBoundingClientRect();
82
112
  const targetRect = (_a = (chip !== null && chip !== void 0 ? chip : content)) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
83
113
  if (targetRect) {
114
+ // Round to prevent tiny sub-pixel changes causing re-renders
84
115
  const left = Math.round(targetRect.left - wrapRect.left);
85
116
  const right = Math.round(targetRect.right - wrapRect.left);
86
117
  nextAnchors = { left, right };
@@ -90,6 +121,7 @@ export function useRightLeftExpandingCenterChip({ leftIcons, rightIcons, centerI
90
121
  const nextRightWidths = rightChipRefs.current.map((el) => (el ? el.offsetWidth : DEFAULT_CHIP_MIN_WIDTH));
91
122
  const nextExpandableRightWidth = (_c = (_b = expandableRightInnerRef.current) === null || _b === void 0 ? void 0 : _b.scrollWidth) !== null && _c !== void 0 ? _c : 0;
92
123
  const nextExpandableLeftWidth = (_e = (_d = expandableLeftInnerRef.current) === null || _d === void 0 ? void 0 : _d.scrollWidth) !== null && _e !== void 0 ? _e : 0;
124
+ // Write state only if changed
93
125
  if (!anchorsEqual(anchors, nextAnchors))
94
126
  setAnchors(nextAnchors);
95
127
  if (!arraysEqual(leftWidths, nextLeftWidths))
@@ -101,6 +133,7 @@ export function useRightLeftExpandingCenterChip({ leftIcons, rightIcons, centerI
101
133
  if (expandableLeftWidth !== nextExpandableLeftWidth)
102
134
  setExpandableLeftWidth(nextExpandableLeftWidth);
103
135
  }, [anchors, leftWidths, rightWidths, expandableRightWidth, expandableLeftWidth, anchorsEqual, arraysEqual]);
136
+ // rAF-throttled resize handler (memoized)
104
137
  const onResize = useCallback(() => {
105
138
  if (resizeRaf.current)
106
139
  cancelAnimationFrame(resizeRaf.current);
@@ -108,17 +141,22 @@ export function useRightLeftExpandingCenterChip({ leftIcons, rightIcons, centerI
108
141
  measureAll();
109
142
  });
110
143
  }, [measureAll]);
144
+ // ======================
145
+ // Effects
146
+ // ======================
111
147
  useEffect(() => {
112
148
  return () => {
113
149
  if (hoverTimeoutRef.current)
114
150
  clearTimeout(hoverTimeoutRef.current);
115
151
  };
116
152
  }, []);
153
+ // Perform initial measurements (and when inputs that affect layout change) before paint
117
154
  useLayoutEffect(() => {
118
155
  measureAll();
119
156
  }, [centerIcon, leftIcons, rightIcons, expandableCenterRight, expandableCenterLeft, measureAll]);
157
+ // Window resize listener effect
120
158
  useEffect(() => {
121
- onResize();
159
+ onResize(); // initial measurement on mount
122
160
  window.addEventListener('resize', onResize);
123
161
  return () => {
124
162
  window.removeEventListener('resize', onResize);
@@ -126,16 +164,21 @@ export function useRightLeftExpandingCenterChip({ leftIcons, rightIcons, centerI
126
164
  cancelAnimationFrame(resizeRaf.current);
127
165
  };
128
166
  }, [onResize]);
167
+ // Animate right expandable content - no gap for seamless connection
129
168
  useEffect(() => {
130
169
  const target = isHovering && expandableCenterRight ? expandableRightWidth : 0;
131
170
  const controls = animate(expandedRightMV, target, { duration: 0.2, ease: 'easeOut' });
132
171
  return () => controls.stop();
133
172
  }, [isHovering, expandableCenterRight, expandableRightWidth, expandedRightMV]);
173
+ // Animate left expandable content - no gap for seamless connection
134
174
  useEffect(() => {
135
175
  const target = isHovering && expandableCenterLeft ? expandableLeftWidth : 0;
136
176
  const controls = animate(expandedLeftMV, target, { duration: 0.2, ease: 'easeOut' });
137
177
  return () => controls.stop();
138
178
  }, [isHovering, expandableCenterLeft, expandableLeftWidth, expandedLeftMV]);
179
+ // ======================
180
+ // Derived hover zone widths (adjusted for seamless positioning)
181
+ // ======================
139
182
  const leftHoverWidth = useMemo(() => {
140
183
  var _a;
141
184
  if (!leftOffsets.length)
@@ -154,27 +197,36 @@ export function useRightLeftExpandingCenterChip({ leftIcons, rightIcons, centerI
154
197
  const farthest = maxRightShift + rightOffsets[last] + lastWidth / 2;
155
198
  return farthest + CHIP_GAP;
156
199
  }, [rightOffsets, rightWidths, maxRightShift]);
200
+ // ======================
201
+ // Public API
202
+ // ======================
157
203
  return {
204
+ // hover state/handlers
158
205
  isHovering,
159
206
  handleMouseEnter,
160
207
  handleMouseLeave,
208
+ // anchors/refs
161
209
  centerWrapRef,
162
210
  centerContentRef,
163
211
  centerChipRef,
164
212
  anchors,
213
+ // chip measurement/offsets
165
214
  leftChipRefs,
166
215
  rightChipRefs,
167
216
  leftOffsets,
168
217
  rightOffsets,
218
+ // expandable area
169
219
  expandableRightInnerRef,
170
220
  expandableLeftInnerRef,
171
221
  expandableRightWidth,
172
222
  expandableLeftWidth,
223
+ // motion values
173
224
  expandedRightMV,
174
225
  expandedLeftMV,
175
226
  shiftX,
176
227
  rightShift,
177
228
  leftShift,
229
+ // hover zone widths
178
230
  leftHoverWidth,
179
231
  rightHoverWidth,
180
232
  };
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { useCallback, useEffect, useRef, useState } from 'react';
14
14
  import Stack from '@mui/material/Stack';
15
- const OFFSET = 50;
15
+ const OFFSET = 50; // px to trigger loading before reaching full bottom
16
16
  const isNearBottom = (el, offset = OFFSET) => {
17
17
  const scrollBottom = el.scrollTop + el.clientHeight;
18
18
  const scrollHeight = el.scrollHeight;
@@ -44,6 +44,7 @@ const ScrollLoader = (props) => {
44
44
  el.addEventListener('scroll', handleScroll);
45
45
  return () => el.removeEventListener('scroll', handleScroll);
46
46
  }, [handleScroll]);
47
+ // Initially .. auto load the data if the scrollable container allows
47
48
  useEffect(() => {
48
49
  const el = containerRef.current;
49
50
  if (!el || loading || initialChecked)
@@ -0,0 +1,10 @@
1
+ import { BoxProps } from '@mui/material/Box';
2
+ type Props = BoxProps & {
3
+ value: string;
4
+ name: string;
5
+ placeholder: string;
6
+ onSearchChange: (value: string) => void;
7
+ onSearchReset: () => void;
8
+ };
9
+ declare const SearchListInput: ({ value, name, placeholder, onSearchChange, onSearchReset, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export default SearchListInput;
@@ -0,0 +1,20 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import Box from '@mui/material/Box';
14
+ import { grayCloseIcon, searchIcon } from '../../constants/index.js';
15
+ import { InputsWrapper, InputStyled } from './style';
16
+ const SearchListInput = (_a) => {
17
+ var { value, name, placeholder, onSearchChange, onSearchReset } = _a, props = __rest(_a, ["value", "name", "placeholder", "onSearchChange", "onSearchReset"]);
18
+ return (_jsx(InputsWrapper, Object.assign({}, props, { children: _jsx(InputStyled, { className: "input", name: name, placeholder: placeholder, onChange: (e) => onSearchChange(e.target.value), value: value, inputProps: { autoComplete: 'off' }, endAdornment: _jsx(Box, { component: "img", "data-icon": value ? 'close' : 'search', src: value ? grayCloseIcon : searchIcon, alt: "search", className: "icon", sx: { cursor: value ? 'pointer' : 'default' }, onClick: onSearchReset }) }) })));
19
+ };
20
+ export default SearchListInput;
@@ -0,0 +1,2 @@
1
+ import SearchListInput from './SearchListInput';
2
+ export default SearchListInput;
@@ -0,0 +1,2 @@
1
+ import SearchListInput from './SearchListInput';
2
+ export default SearchListInput;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare const InputStyled: import("@emotion/styled").StyledComponent<Readonly<import("@mui/material").InputProps & {
3
+ isError?: boolean | undefined;
4
+ }> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
5
+ export declare const InputsWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
6
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
7
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -0,0 +1,15 @@
1
+ import { styled } from '@mui/material/styles';
2
+ import Input from '../Input';
3
+ import Box from '@mui/material/Box';
4
+ export const InputStyled = styled(Input)(({ theme }) => ({
5
+ border: `1px solid ${theme.palette.divider}`,
6
+ '.icon': {
7
+ width: 14,
8
+ },
9
+ }));
10
+ export const InputsWrapper = styled(Box)(() => ({
11
+ padding: '8px 16px',
12
+ '> div + div': {
13
+ marginTop: '8px',
14
+ },
15
+ }));
@@ -19,29 +19,34 @@ import { ChevronContainer, Label, LabelWrapper, StyledStatusIcon, StyledDropdown
19
19
  import { statusButtonIcons } from './constant';
20
20
  const StatusButton = memo((props) => {
21
21
  var _a;
22
- const { variant = 'inActive', badgeCount, icon, label, dropdownOptions, onButtonBodyClick } = props, restProps = __rest(props, ["variant", "badgeCount", "icon", "label", "dropdownOptions", "onButtonBodyClick"]);
22
+ const { variant = 'inActive', badgeCount, icon, label, dropdownOptions, onButtonBodyClick, iconMapper = statusButtonIcons } = props, restProps = __rest(props, ["variant", "badgeCount", "icon", "label", "dropdownOptions", "onButtonBodyClick", "iconMapper"]);
23
23
  const [buttonClicks, setButtonClicks] = useState(0);
24
24
  const { t } = useTranslation();
25
25
  const buttonRef = useRef(null);
26
26
  const [anchorEl, setAnchorEl] = useState(null);
27
27
  const [selectedStatus, setSelectedStatus] = useState((_a = dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions[0]) === null || _a === void 0 ? void 0 : _a.status);
28
+ // Memoized computed values
28
29
  const hasDropdown = useMemo(() => Boolean(dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.length), [dropdownOptions]);
30
+ // only open if button is clicked more than once
29
31
  const isDropdownOpen = Boolean(anchorEl) && buttonClicks > 1;
30
32
  const isActiveVariant = variant === 'active';
31
33
  const badgeVariant = useMemo(() => (isActiveVariant ? BadgeVariants.ACTIVE : BadgeVariants.INACTIVE), [isActiveVariant]);
32
- const statusIcon = useMemo(() => (icon ? _jsx(StyledStatusIcon, { icon: icon, variant: variant, src: statusButtonIcons[icon], alt: `${icon}-icon` }) : null), [icon, variant]);
34
+ // Memoized UI elements
35
+ const statusIcon = useMemo(() => (icon ? _jsx(StyledStatusIcon, { icon: icon, variant: variant, src: iconMapper[icon], alt: `${icon}-icon` }) : null), [icon, iconMapper, variant]);
33
36
  const statusBadge = useMemo(() => {
34
37
  if (!badgeCount || Number.isNaN(convertToNumber(badgeCount)))
35
38
  return null;
36
39
  return _jsx(StyledBadge, Object.assign({ variant: badgeVariant }, { children: formatNumber(Number(badgeCount)) }));
37
40
  }, [badgeCount, badgeVariant]);
38
41
  const dropdownIcon = useMemo(() => (hasDropdown ? _jsx(ChevronIcon, { isActive: isActiveVariant }) : null), [hasDropdown, isActiveVariant]);
42
+ // Reset button clicks and anchor element when variant changes
39
43
  useEffect(() => {
40
44
  if (!isActiveVariant) {
41
45
  setButtonClicks(0);
42
46
  setAnchorEl(null);
43
47
  }
44
48
  }, [isActiveVariant]);
49
+ // Event handlers
45
50
  const handleDropdownClose = useCallback(() => {
46
51
  setAnchorEl(null);
47
52
  }, []);
@@ -58,12 +63,15 @@ const StatusButton = memo((props) => {
58
63
  handleDropdownToggle();
59
64
  setButtonClicks((prev) => prev + 1);
60
65
  }, [props, onButtonBodyClick, selectedStatus, dropdownOptions, handleDropdownToggle]);
61
- const handleMenuItemClick = useCallback((item) => (e) => {
66
+ const handleMenuItemClick = useCallback(
67
+ // eslint-disable-next-line
68
+ (item) => (e) => {
62
69
  var _a;
63
70
  (_a = item === null || item === void 0 ? void 0 : item.onClick) === null || _a === void 0 ? void 0 : _a.call(item, e);
64
71
  setSelectedStatus(item.status);
65
72
  handleDropdownClose();
66
73
  }, [handleDropdownClose]);
74
+ // Enhanced dropdown menu items
67
75
  const menuItems = useMemo(() => (dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.map((item) => (Object.assign(Object.assign({}, item), { onClick: handleMenuItemClick(item) })))) || [], [dropdownOptions, handleMenuItemClick]);
68
76
  const ButtonComponent = statusButtonVariants[variant];
69
77
  const displayLabel = selectedStatus ? t(selectedStatus) : label;
@@ -1,4 +1,6 @@
1
- import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon, searchIcon, chevronDownIcon, unAuthorizedIcon, settlementInitiatedIcon, unCapturedIcon, capturedIcon, authorizedIcon, openFlagIcon, closedFlagIcon, reverseActionIcon, authenticatedIcon, unauthenticatedIcon, paidOutFilterIcon, scheduledFilterIcon, completedBlackIcon, } from '../../constants/index.js';
1
+ import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon, searchIcon, chevronDownIcon, unAuthorizedIcon, settlementInitiatedIcon, unCapturedIcon, capturedIcon, authorizedIcon, openFlagIcon, closedFlagIcon, reverseActionIcon, authenticatedIcon, unauthenticatedIcon, paidOutFilterIcon, scheduledFilterIcon, completedBlackIcon,
2
+ // trashBinIcon,
3
+ } from '../../constants/index.js';
2
4
  export const statusButtonIcons = {
3
5
  inProgress: initiatedIcon,
4
6
  initiated: initiatedIcon,
@@ -1,5 +1,6 @@
1
1
  import type React from 'react';
2
2
  import { type Theme } from '@mui/material';
3
+ import { StatusButtonProps } from './type';
3
4
  export declare const statusButtonVariants: {
4
5
  active: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
5
6
  ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
@@ -35,5 +36,5 @@ export declare const LabelWrapper: import("@emotion/styled").StyledComponent<imp
35
36
  }, keyof import("@mui/system").BoxOwnProps<Theme>> & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
36
37
  export declare const StyledStatusIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme> & {
37
38
  variant: StatusButtonVariant;
38
- icon?: "search" | "scheduled" | "paidOut" | "reversed" | "checked" | "initiated" | "captured" | "unCaptured" | "inProgress" | "abandoned" | "cancelled" | "authorized" | "unauthenticated" | "authenticated" | "unSettled" | "reports" | "chevronDown" | "unAuthorized" | "openFlag" | "closedFlag" | undefined;
39
+ icon?: StatusButtonProps['icon'];
39
40
  }, React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
@@ -8,11 +8,23 @@ export interface StatusButtonProps extends Omit<ButtonProps, 'variant' | 'childr
8
8
  variant?: StatusButtonVariant;
9
9
  badgeCount?: number | string;
10
10
  hasDropdown?: boolean;
11
- icon?: StatusButtonIcon;
11
+ icon?: StatusButtonIcon | (string & {});
12
12
  label?: ReactNode | null;
13
13
  showDropdownIcon?: boolean;
14
14
  totalCount?: number;
15
15
  onButtonBodyClick?: (status: TableHeaderStatus) => void;
16
+ /**
17
+ * @description
18
+ * `iconMapper` is used as an override for mapping between a given key (statusKey .. ex:`"active"`) and icon src URL
19
+ * @example
20
+ * ```js
21
+ * iconMapper: {
22
+ * active:'http://base-url/active.svg',
23
+ * inactive:'http://base-url/inactive.svg',
24
+ * }
25
+ * ```
26
+ */
27
+ iconMapper?: Record<StatusButtonIcon | (string & {}), string>;
16
28
  dropdownOptions?: Array<MenuItemI & {
17
29
  status: TableHeaderStatus;
18
30
  }>;
@@ -27,4 +27,9 @@ export const statusLabels = {
27
27
  icon: authenticationDeclinedIcon,
28
28
  borderColor: 'rgba(255, 61, 0, 0.10)',
29
29
  },
30
+ // noAuth: {
31
+ // tooltip: 'Not Authenticated',
32
+ // icon: authenticationNoAuthIcon,
33
+ // borderColor: '#F2F2F2'
34
+ // }
30
35
  };
@@ -20,6 +20,17 @@ function CaptureAutoIcon({ voidPercentage, capturePercentage, captureCount, auto
20
20
  const formattedAmount = formatAmount(remainingAmount || 0);
21
21
  const generateAutoTooltip = useCallback((type) => {
22
22
  return `Auto ${type} - ${currency} ${formattedAmount.integerAmount}.${formattedAmount.decimalAmount}`;
23
+ // if (!lastDate) return `Auto ${type}`
24
+ // const typeLabel = `Auto ${type} - Scheduled`
25
+ // const date = dayjs(lastDate).calendar(null, {
26
+ // sameDay: '[for Today at] h:mm A',
27
+ // nextDay: '[for Tomorrow at] h:mm A',
28
+ // lastDay: '[for Yesterday at] h:mm A',
29
+ // sameElse: '[for] MMM DD [at] h:mm A',
30
+ // lastWeek: '[for] MMM DD [at] h:mm A',
31
+ // nextWeek: '[for] MMM DD [at] h:mm A'
32
+ // })
33
+ // return `${typeLabel} ${date}`
23
34
  }, [currency, formattedAmount.decimalAmount, formattedAmount.integerAmount]);
24
35
  const generatePartialTooltip = useCallback((type) => {
25
36
  const amount = type === 'Capture' ? captureAmount : voidAmount;
@@ -20,6 +20,17 @@ function VoidAutoIcon({ voidPercentage, capturePercentage, voidCount, autoType,
20
20
  const formattedAmount = formatAmount(remainingAmount || 0);
21
21
  const generateAutoTooltip = useCallback((type) => {
22
22
  return `Auto ${type} - ${currency} ${formattedAmount.integerAmount}.${formattedAmount.decimalAmount}`;
23
+ // if (!lastDate) return `Auto ${type}`
24
+ // const typeLabel = `Auto ${type} - Scheduled`
25
+ // const date = dayjs(lastDate).calendar(null, {
26
+ // sameDay: '[for Today at] h:mm A',
27
+ // nextDay: '[for Tomorrow at] h:mm A',
28
+ // lastDay: '[for Yesterday at] h:mm A',
29
+ // sameElse: '[for] MMM DD [at] h:mm A',
30
+ // lastWeek: '[for] MMM DD [at] h:mm A',
31
+ // nextWeek: '[for] MMM DD [at] h:mm A'
32
+ // })
33
+ // return `${typeLabel} ${date}`
23
34
  }, [currency, formattedAmount.decimalAmount, formattedAmount.integerAmount]);
24
35
  const generatePartialTooltip = useCallback((type) => {
25
36
  const amount = type === 'Capture' ? captureAmount : voidAmount;
@@ -49,7 +49,9 @@ export default function ApplicationStatusCell(_a) {
49
49
  }, borderColor: "transparent" }) })) }), `${app}-${index}`));
50
50
  }), [apps, theme]);
51
51
  const appsCount = (apps === null || apps === void 0 ? void 0 : apps.length) || 0;
52
- return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(StyledAppsCell, { children: appsCount > 0 ? (_jsx(AppsStatusContainer, Object.assign({ layout: true, className: "reference-sources-container", whileHover: "animate", animate: isTooltipOpen ? 'animate' : 'start', sourcesCount: appsCount, variants: { animate: { width: appsCount * (6 + 32) } }, style: {
52
+ return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(StyledAppsCell, { children: appsCount > 0 ? (_jsx(AppsStatusContainer, Object.assign({ layout: true, className: "reference-sources-container", whileHover: "animate",
53
+ // animate when state changes
54
+ animate: isTooltipOpen ? 'animate' : 'start', sourcesCount: appsCount, variants: { animate: { width: appsCount * (6 + 32) } }, style: {
53
55
  zIndex: 29,
54
56
  } }, { children: appsStatus }))) : null }) })));
55
57
  }
@@ -14,12 +14,12 @@ import Tooltip from '../../../Tooltip';
14
14
  import CountryFlag from '../../../CountryFlag';
15
15
  import { TableCell } from '../../../TableCells';
16
16
  import { bankIcon } from '../../../../constants/index.js';
17
- import { getCountryName } from '../../../../utils/index.js';
17
+ import { getCountryNameByISO } from '../../../../utils/index.js';
18
18
  import { BankCellContainer, BankIcon, BankIdContainer, BankWrapper, IconWrapper } from './style';
19
19
  import { GeographyBox } from '../style';
20
20
  function BankCell(_a) {
21
21
  var { walletId, country, name } = _a, props = __rest(_a, ["walletId", "country", "name"]);
22
- const icon = country && (_jsx(Tooltip, Object.assign({ title: getCountryName(country) }, { children: _jsx(CountryFlag, { code: country, sx: { padding: '1px' } }) })));
22
+ const icon = country && (_jsx(Tooltip, Object.assign({ title: getCountryNameByISO(country) }, { children: _jsx(CountryFlag, { code: country, sx: { padding: '1px' } }) })));
23
23
  return (_jsx(TableCell, Object.assign({ style: {
24
24
  textAlign: 'center',
25
25
  overflow: 'visible',
@@ -17,6 +17,7 @@ import { BrandCellContainer, WalletIcon, WalletIconContainer } from './style';
17
17
  function BrandCell(_a) {
18
18
  var { brandName, brandIcon } = _a, props = __rest(_a, ["brandName", "brandIcon"]);
19
19
  const icon = brandIcon ? (_jsx(Tooltip, Object.assign({ title: brandName }, { children: _jsx(WalletIcon, { src: brandIcon, alt: "brand icon", onError: (e) => {
20
+ // set the default icon if the image is not found
20
21
  e.currentTarget.src = brandPlaceholderIcon;
21
22
  } }) }))) : (_jsx(WalletIcon, { src: brandPlaceholderIcon, alt: "brand icon" }));
22
23
  return (_jsx(TableCell, Object.assign({ style: {
@@ -14,13 +14,13 @@ import { useMemo } from 'react';
14
14
  import { TableCell } from '../../../TableCells';
15
15
  import Tooltip from '../../../Tooltip';
16
16
  import CountryFlag from '../../../CountryFlag';
17
- import { formatCellDate, getCountryName } from '../../../../utils/index.js';
17
+ import { formatCellDate, getCountryNameByISO } from '../../../../utils/index.js';
18
18
  import { DateCellContainer } from './style';
19
19
  import { GeographyBox } from '../style';
20
20
  import { Box } from '@mui/material';
21
21
  function DateCell(_a) {
22
22
  var { value, format: dateFormat, flagIcon, hasFlag, tableMode } = _a, props = __rest(_a, ["value", "format", "flagIcon", "hasFlag", "tableMode"]);
23
- const icon = flagIcon && (_jsx(Tooltip, Object.assign({ title: getCountryName(flagIcon || '') }, { children: _jsx(CountryFlag, { code: flagIcon }) })));
23
+ const icon = flagIcon && (_jsx(Tooltip, Object.assign({ title: getCountryNameByISO(flagIcon || '') }, { children: _jsx(CountryFlag, { code: flagIcon }) })));
24
24
  const renderedValue = useMemo(() => formatCellDate(value, dateFormat), [value]);
25
25
  return (_jsx(TableCell, Object.assign({}, props, { children: _jsxs(DateCellContainer, { children: [hasFlag && (_jsx(GeographyBox, Object.assign({ sx: {
26
26
  visibility: 'visible',
@@ -11,13 +11,14 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import TableCell from '../../TableCell';
14
- import { EntityName, EntityWrapper, VerificationIcon, EntityContainer, EntityInfoContainer, VerificationContainer, EmptyCell } from './style';
14
+ import { EntityName, EntityWrapper, VerificationIcon, VerificationContainer } from './style';
15
15
  import { verificationIcon } from './constants';
16
16
  import Tooltip from '../../../Tooltip';
17
17
  import { CountryFlag } from '../../../index.js';
18
- import { getCountryName } from '../../../../utils/index.js';
18
+ import { getCountryNameByISO } from '../../../../utils/index.js';
19
+ import { Box } from '@mui/material';
19
20
  export default function EntityCell(_a) {
20
21
  var { entity, country, verificationStatus, licenseNumber, hideStatus } = _a, props = __rest(_a, ["entity", "country", "verificationStatus", "licenseNumber", "hideStatus"]);
21
22
  const icon = verificationIcon[verificationStatus !== null && verificationStatus !== void 0 ? verificationStatus : 'incomplete'];
22
- return (_jsx(TableCell, Object.assign({}, props, { sx: { cursor: (props === null || props === void 0 ? void 0 : props.onClick) ? 'pointer' : 'default' } }, { children: _jsx(Tooltip, Object.assign({ title: entity }, { children: _jsx(EntityWrapper, { children: licenseNumber ? (_jsxs(EntityContainer, { children: [_jsxs(EntityInfoContainer, { children: [_jsx(Tooltip, Object.assign({ title: getCountryName(country) }, { children: _jsx(CountryFlag, { code: country }) })), _jsx(EntityName, { children: licenseNumber })] }), !hideStatus && (_jsx(VerificationContainer, { children: _jsx(VerificationIcon, { src: icon }) }))] })) : (_jsx(EmptyCell, { children: "Not Available" })) }) })) })));
23
+ return (_jsx(TableCell, Object.assign({}, props, { sx: { cursor: (props === null || props === void 0 ? void 0 : props.onClick) ? 'pointer' : 'default' } }, { children: _jsx(Tooltip, Object.assign({ title: entity }, { children: _jsx(EntityWrapper, Object.assign({ sx: { cursor: props.onClick ? 'pointer' : 'default' } }, { children: _jsxs(Box, Object.assign({ display: "flex", alignItems: "center", gap: '5px', sx: { overflow: 'hidden', width: '100%' } }, { children: [_jsx(Tooltip, Object.assign({ title: getCountryNameByISO(country) }, { children: _jsx(CountryFlag, { code: country }) })), _jsx(EntityName, { children: licenseNumber }), !hideStatus && (_jsx(VerificationContainer, { children: _jsx(VerificationIcon, { src: icon }) }))] })) })) })) })));
23
24
  }
@@ -3,7 +3,4 @@ export declare const EntityWrapper: import("@emotion/styled").StyledComponent<im
3
3
  export declare const EntityIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
4
4
  export declare const EntityName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
5
  export declare const VerificationIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
6
- export declare const EntityContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
7
- export declare const EntityInfoContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
8
6
  export declare const VerificationContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
9
- export declare const EmptyCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -3,7 +3,7 @@ export const EntityWrapper = styled('div')(({ theme }) => ({
3
3
  display: 'flex',
4
4
  alignItems: 'center',
5
5
  gap: theme.spacing(1),
6
- border: '1.029px solid #F2F2F2',
6
+ border: '1px solid #F2F2F2',
7
7
  borderRadius: '44px',
8
8
  padding: '4px 8px',
9
9
  lineHeight: '120%',
@@ -20,33 +20,13 @@ export const EntityName = styled('div')(({ theme }) => ({
20
20
  textOverflow: 'ellipsis',
21
21
  whiteSpace: 'nowrap',
22
22
  maxWidth: '100%',
23
+ margin: '0',
23
24
  }));
24
25
  export const VerificationIcon = styled('img')(() => ({
25
26
  width: '10.5px',
26
27
  height: '10.5px',
27
28
  }));
28
- export const EntityContainer = styled('div')({
29
- display: 'flex',
30
- alignItems: 'center',
31
- justifyContent: 'space-between',
32
- width: '100%',
33
- });
34
- export const EntityInfoContainer = styled('div')({
35
- display: 'flex',
36
- alignItems: 'center',
37
- minWidth: '110px',
38
- gap: '8px',
39
- });
40
29
  export const VerificationContainer = styled('div')({
41
30
  marginLeft: 'auto',
42
31
  width: 'auto',
43
32
  });
44
- export const EmptyCell = styled('div')({
45
- fontWeight: 400,
46
- fontSize: 14,
47
- lineHeight: '120%',
48
- letterSpacing: 0,
49
- color: '#B1B1B1',
50
- textAlign: 'center',
51
- width: '100%',
52
- });
@@ -34,7 +34,9 @@ function ReferenceCell(_a) {
34
34
  } }, { children: isTextShown ? (_jsx(ReferenceTextWrapper, { children: _jsx(ReferenceTextLabel, { children: startCase(reference) }) })) : (_jsx(StyledSourceImage, { src: referenceIcons[reference], alt: reference, sx: Object.assign({}, (reference === 'order' && { width: '11.82px' })) })) })) }), `${reference}-${index}`));
35
35
  }), [props, references, isTextShown, theme]);
36
36
  const referenceSourcesCount = (ReferenceSources === null || ReferenceSources === void 0 ? void 0 : ReferenceSources.length) || 0;
37
- return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(StyledSourceCell, { children: referenceSourcesCount > 0 ? (_jsx(ReferenceSourcesContainer, Object.assign({ layout: true, className: "reference-sources-container", whileHover: "animate", animate: isTooltipOpen ? 'animate' : 'start', sourcesCount: referenceSourcesCount, variants: { animate: { width: referenceSourcesCount * (6 + 32) } }, style: {
37
+ return (_jsx(TableCell, Object.assign({}, props, { children: _jsx(StyledSourceCell, { children: referenceSourcesCount > 0 ? (_jsx(ReferenceSourcesContainer, Object.assign({ layout: true, className: "reference-sources-container", whileHover: "animate",
38
+ // animate when state changes
39
+ animate: isTooltipOpen ? 'animate' : 'start', sourcesCount: referenceSourcesCount, variants: { animate: { width: referenceSourcesCount * (6 + 32) } }, style: {
38
40
  zIndex: 29,
39
41
  } }, { children: ReferenceSources }))) : null }) })));
40
42
  }
@@ -8,6 +8,7 @@ import { RefundStatusIcon } from './RefundStatusIcon';
8
8
  export function RefundStateIcon({ status, gatewayTooltip, unCapturedTooltip, acquirerTooltip, errorCode, acquirerCode, gatewayCode, refundTooltip, }) {
9
9
  const { t } = useTranslation();
10
10
  if (!(unCapturedStatuses === null || unCapturedStatuses === void 0 ? void 0 : unCapturedStatuses.includes(status !== null && status !== void 0 ? status : ''))) {
11
+ // eslint-disable-next-line
11
12
  return _jsx(RefundStatusIcon, { status: status, refundTooltip: refundTooltip });
12
13
  }
13
14
  return (_jsx(Tooltip, Object.assign({ title: t(camelCase(status)) }, { children: _jsx(ChargeStatusIcon, { chargeStatus: status, gatewayTooltip: gatewayTooltip, chargeTooltip: unCapturedTooltip, acquirerTooltip: acquirerTooltip, errorCode: errorCode, acquirerCode: acquirerCode, gatewayCode: gatewayCode, unCapturedStyles: {
@@ -24,9 +24,10 @@ function SalesChannelCell(_a) {
24
24
  const sourceTooltip = channel.address;
25
25
  const channelCode = (_a = channel.code) === null || _a === void 0 ? void 0 : _a.replace(/_/g, '');
26
26
  const isLastChannel = index === (channels === null || channels === void 0 ? void 0 : channels.length) - 1;
27
- return (_jsx(Tooltip, Object.assign({ title: sourceTooltip }, { children: _jsx(ImageWrapper, Object.assign({ order: index, variants: salesChannelAnimation(index, isTextShown ? 74 : 0), sx: Object.assign({ width: isTextShown ? '70px' : '36px', cursor: NON_CLICKABLE_CHANNELS.includes(channel.code) ? 'default' : 'pointer' }, (isLastChannel && {
28
- boxShadow: '7px 0px 8px 0px #F2F2F2',
29
- })), onClick: () => {
27
+ return (_jsx(Tooltip, Object.assign({ title: sourceTooltip }, { children: _jsx(ImageWrapper, Object.assign({ order: index, variants: salesChannelAnimation(index, isTextShown ? 74 : 0, isLastChannel), sx: {
28
+ width: isTextShown ? '70px' : '36px',
29
+ cursor: NON_CLICKABLE_CHANNELS.includes(channel.code) ? 'default' : 'pointer',
30
+ }, onClick: () => {
30
31
  if (NON_CLICKABLE_CHANNELS.includes(channel.code))
31
32
  return;
32
33
  if (channel === null || channel === void 0 ? void 0 : channel.address)
@@ -267,7 +267,7 @@ export declare const SalesChannelsContainer: import("@emotion/styled").StyledCom
267
267
  }, {}, {}>;
268
268
  export declare const ChannelTextLabel: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
269
269
  export declare const ChannelTextWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
270
- export declare const salesChannelAnimation: (index: number, xDelta?: number) => {
270
+ export declare const salesChannelAnimation: (index: number, xDelta?: number, isLastChannel?: boolean) => {
271
271
  start: {
272
272
  x: number;
273
273
  transition: {
@@ -277,6 +277,7 @@ export declare const salesChannelAnimation: (index: number, xDelta?: number) =>
277
277
  };
278
278
  };
279
279
  animate: {
280
+ boxShadow?: string | undefined;
280
281
  x: number;
281
282
  transition: {
282
283
  duration: number;