@tap-payments/os-micro-frontend-shared 0.1.96-test.23 → 0.1.96-test.25

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 (164) 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.d.ts +2 -0
  53. package/build/components/MFWidgetLoader/MFWidgetLoader.js +12 -0
  54. package/build/components/MFWidgetLoader/index.d.ts +2 -0
  55. package/build/components/MFWidgetLoader/index.js +2 -0
  56. package/build/components/MultiSelectStatusButton/MultiSelectStatusButton.js +3 -0
  57. package/build/components/NestedDropdown/Dropdown.js +3 -0
  58. package/build/components/RFH/Inputs/FormInput/FormInput.js +1 -0
  59. package/build/components/RFH/Inputs/MultiSelect/MultiSelect.js +1 -0
  60. package/build/components/RangeCalender/RangeCalender.js +1 -0
  61. package/build/components/RangeCalender/components/RangeDatepicker/RangeDatepicker.js +3 -1
  62. package/build/components/RangeCalender/style.js +1 -1
  63. package/build/components/RightLeftExpandingCenterChip/RightLeftExpandingCenterChip.d.ts +32 -0
  64. package/build/components/RightLeftExpandingCenterChip/RightLeftExpandingCenterChip.js +36 -2
  65. package/build/components/RightLeftExpandingCenterChip/style.js +25 -4
  66. package/build/components/RightLeftExpandingCenterChip/useRightLeftExpandingCenterChip.d.ts +5 -0
  67. package/build/components/RightLeftExpandingCenterChip/useRightLeftExpandingCenterChip.js +53 -1
  68. package/build/components/ScrollLoader/ScrollLoader.js +2 -1
  69. package/build/components/SearchListInput/SearchListInput.d.ts +10 -0
  70. package/build/components/SearchListInput/SearchListInput.js +20 -0
  71. package/build/components/SearchListInput/index.d.ts +2 -0
  72. package/build/components/SearchListInput/index.js +2 -0
  73. package/build/components/SearchListInput/style.d.ts +7 -0
  74. package/build/components/SearchListInput/style.js +15 -0
  75. package/build/components/StatusButton/StatusButton.js +11 -3
  76. package/build/components/StatusButton/constant.js +3 -1
  77. package/build/components/StatusButton/style.d.ts +2 -1
  78. package/build/components/StatusButton/type.d.ts +13 -1
  79. package/build/components/StatusIcons/AuthIcons/constants.js +5 -0
  80. package/build/components/StatusIcons/AuthorizationAutoIcons/CaptureAutoIcon.js +11 -0
  81. package/build/components/StatusIcons/AuthorizationAutoIcons/VoidAutoIcon.js +11 -0
  82. package/build/components/TableCells/CustomCells/ApplicationStatusCell/ApplicationStatusCell.js +3 -1
  83. package/build/components/TableCells/CustomCells/BankCell/BankCell.js +2 -2
  84. package/build/components/TableCells/CustomCells/BrandCell/BrandCell.js +1 -0
  85. package/build/components/TableCells/CustomCells/DateCell/DateCell.js +2 -2
  86. package/build/components/TableCells/CustomCells/EntityCell/EntityCell.js +4 -3
  87. package/build/components/TableCells/CustomCells/EntityCell/style.d.ts +0 -3
  88. package/build/components/TableCells/CustomCells/EntityCell/style.js +2 -22
  89. package/build/components/TableCells/CustomCells/ReferenceCell/ReferenceCell.js +3 -1
  90. package/build/components/TableCells/CustomCells/RefundStatusCell/components/RefundStateIcon.js +1 -0
  91. package/build/components/TableCells/CustomCells/SalesChannelCell/SalesChannelCell.js +4 -3
  92. package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +2 -1
  93. package/build/components/TableCells/CustomCells/SalesChannelCell/style.js +5 -6
  94. package/build/components/TableCells/CustomCells/SegmentsCell/SegmentsCell.js +3 -1
  95. package/build/components/TableCells/CustomCells/SourceMergedCell/SourceMergedCell.js +7 -1
  96. package/build/components/TableCells/CustomCells/StatusCell/StatusCell.js +1 -0
  97. package/build/components/TableCells/CustomCells/WalletCell/WalletCell.js +3 -3
  98. package/build/components/TableView/CustomViews.js +2 -0
  99. package/build/components/TableView/TableView.js +1 -0
  100. package/build/components/Timepicker/Timepicker.js +1 -0
  101. package/build/components/Timepicker/utils.js +9 -5
  102. package/build/components/ToggleView/index.d.ts +1 -1
  103. package/build/components/ToggleView/index.js +1 -1
  104. package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.js +11 -1
  105. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableHeaderCell.js +2 -0
  106. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableLoading.js +5 -2
  107. package/build/components/VirtualTables/SheetViewVirtualTable/components/VirtualTable.js +6 -2
  108. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/usePinnedColumns.js +2 -0
  109. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useTableData.js +1 -0
  110. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useTableState.js +2 -0
  111. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useVirtualTableContainer.js +3 -2
  112. package/build/components/VirtualTables/SheetViewVirtualTable/style.js +1 -1
  113. package/build/components/VirtualTables/VirtualTable/VirtualTable.js +12 -2
  114. package/build/components/VirtualTables/VirtualTableWithCard/VirtualTableWithCard.js +6 -1
  115. package/build/components/VirtualTables/components/ColumnFilter/Inputs/Inputs.js +1 -0
  116. package/build/components/VirtualTables/components/TableFooter/TableFooter.js +9 -0
  117. package/build/components/VirtualTables/components/TableRow.js +5 -0
  118. package/build/components/VirtualTables/components/virtualScroll/ListItemWrapper.js +2 -0
  119. package/build/components/VirtualTables/components/virtualScroll/ListItemWrapperWithCard.js +2 -0
  120. package/build/components/VirtualTables/components/virtualScroll/VirtualScrollList.js +16 -1
  121. package/build/components/Widget/style.js +1 -0
  122. package/build/components/Window/style.js +1 -0
  123. package/build/components/index.d.ts +10 -5
  124. package/build/components/index.js +10 -5
  125. package/build/constants/assets.d.ts +2 -0
  126. package/build/constants/assets.js +6 -0
  127. package/build/constants/server.js +1 -0
  128. package/build/constants/table/cell/authorizationTableCellWidth.d.ts +6 -6
  129. package/build/constants/table/cell/authorizationTableCellWidth.js +6 -6
  130. package/build/constants/table/cell/chargeTableCellWidth.d.ts +6 -6
  131. package/build/constants/table/cell/chargeTableCellWidth.js +6 -6
  132. package/build/constants/table/cell/destinationsTableCellWidth.d.ts +5 -5
  133. package/build/constants/table/cell/destinationsTableCellWidth.js +5 -5
  134. package/build/constants/table/cell/refundTableCellWidth.d.ts +7 -7
  135. package/build/constants/table/cell/refundTableCellWidth.js +7 -7
  136. package/build/constants/table/cell/terminalsTableCellWidth.d.ts +3 -3
  137. package/build/constants/table/cell/terminalsTableCellWidth.js +3 -3
  138. package/build/hooks/useCountdown.js +4 -0
  139. package/build/hooks/useStickyHeaderShadow.js +6 -0
  140. package/build/types/entity.d.ts +5 -0
  141. package/build/utils/api.js +3 -0
  142. package/build/utils/array.js +5 -1
  143. package/build/utils/billing.js +1 -0
  144. package/build/utils/country.d.ts +1 -1
  145. package/build/utils/country.js +2 -1
  146. package/build/utils/currency.js +6 -0
  147. package/build/utils/date.d.ts +5 -0
  148. package/build/utils/date.js +31 -3
  149. package/build/utils/encrypt.js +3 -1
  150. package/build/utils/error.js +2 -0
  151. package/build/utils/freshdesk.js +2 -0
  152. package/build/utils/geography.js +1 -1
  153. package/build/utils/localStorage.js +7 -0
  154. package/build/utils/merchant.js +3 -0
  155. package/build/utils/number.d.ts +2 -0
  156. package/build/utils/number.js +8 -0
  157. package/build/utils/segment.js +1 -0
  158. package/build/utils/string.d.ts +7 -0
  159. package/build/utils/string.js +10 -0
  160. package/build/utils/style.d.ts +11 -0
  161. package/build/utils/style.js +28 -0
  162. package/build/utils/table.js +1 -1
  163. package/build/utils/url.js +2 -0
  164. package/package.json +2 -2
@@ -12,7 +12,8 @@ export { default as Checkbox } from './Checkbox';
12
12
  export { default as Dialog, DialogToolbar } from './Dialog';
13
13
  export { default as Tooltip } from './Tooltip';
14
14
  export * from './RFH';
15
- export { VirtualTable, TableRowLoading, TableHeader as VirtualTableHeader, TableLastItem, TableLoading, TableLoadingWithCard, TableNoData, TableNoDataWithCard, LastRowContent, ListItemWrapperWithCard, RowErrorState, StyledItemWrapper, TableRow, TableRowLoadingWithCard, TableRowWithCard, VirtualScrollInner, VirtualScrollList, VirtualScrollOuter, VirtualTableWithCard, Inputs, List, ColumnFilter, StyledCell, TableFooter, TableError, } from './VirtualTables';
15
+ export { VirtualTable, TableRowLoading, TableHeader as VirtualTableHeader, // To not to be confused/conflicted with the other seperated `components/TableHeader`
16
+ TableLastItem, TableLoading, TableLoadingWithCard, TableNoData, TableNoDataWithCard, LastRowContent, ListItemWrapperWithCard, RowErrorState, StyledItemWrapper, TableRow, TableRowLoadingWithCard, TableRowWithCard, VirtualScrollInner, VirtualScrollList, VirtualScrollOuter, VirtualTableWithCard, Inputs, List, ColumnFilter, StyledCell, TableFooter, TableError, } from './VirtualTables';
16
17
  export { default as SheetViewVirtualTable } from './VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable';
17
18
  export { default as Widget, ListItem, WidgetHeader, WidgetList } from './Widget';
18
19
  export { default as TapLogo } from './TapLogo';
@@ -108,9 +109,13 @@ export { default as LazyImage } from './LazyImage';
108
109
  export { default as AmountStatusChip } from './AmountStatusChip';
109
110
  export { default as AuthenticationTypeChip } from './AuthenticationTypeChip';
110
111
  export * from './LazyImage';
111
- export { default as ListLayout } from './ListLayout';
112
- export * from './ListLayout';
113
- export { default as ToggleView } from './ToggleView';
114
- export * from './ToggleView';
112
+ export { default as SearchListInput } from './SearchListInput';
113
+ export { default as ErrorToast } from './ErrorToast';
114
+ export { default as ToggleView, ToggleViews } from './ToggleView';
115
+ export { default as LanguageDropdown } from './LanguageDropdown';
116
+ export { default as DisplayAmount } from './DisplayAmount';
117
+ export { default as AmountInput } from './AmountInput';
115
118
  export { default as AppServicesBar } from './AppServicesBar';
116
119
  export * from './AppServicesBar';
120
+ export { default as ListLayout } from './ListLayout';
121
+ export * from './ListLayout';
@@ -547,3 +547,5 @@ export declare const sortAscArrowIcon: string;
547
547
  export declare const closedOutlinedYellowCircle: string;
548
548
  export declare const deactivatedOrangeCircle: string;
549
549
  export declare const exclamationOutlinedOrangeCircle: string;
550
+ export declare const activeGreenIcon: string;
551
+ export declare const inActiveGreyIcon: string;
@@ -2,6 +2,7 @@ const cdnUrl = 'https://cdn.tap.company/tap-assets';
2
2
  export const lightUrl = `${cdnUrl}/icons/dashboard/light`;
3
3
  export const appBaseUrl = `${lightUrl}/other`;
4
4
  export const functionBaseUrl = `${lightUrl}/function`;
5
+ // Icons getters
5
6
  export const getLightUrlIcon = (source) => `${lightUrl}/${source}.svg`;
6
7
  export const getPaymentMethodsIcon = (source) => `${lightUrl}/payment-method/v2/${source}.svg`;
7
8
  export const getPaymentIssuersIcon = (source) => `${lightUrl}/payment-issuer/${source}.svg`;
@@ -297,6 +298,7 @@ export const braveIcon = `${appBaseUrl}/braveBrowser.svg`;
297
298
  export const arcIcon = `${appBaseUrl}/arcBrowser.svg`;
298
299
  export const chromiumIcon = `${appBaseUrl}/chromiumBrowser.svg`;
299
300
  export const userIcon = `${appBaseUrl}/userIcon.svg`;
301
+ // table status icons
300
302
  export const abandonedTableIcon = `${lightUrl}/status/table/abandoned.svg`;
301
303
  export const cancelledTableIcon = `${lightUrl}/status/table/cancelled.svg`;
302
304
  export const capturedTableIcon = `${lightUrl}/status/table/captured.svg`;
@@ -397,6 +399,7 @@ export const windowEntityIcon = `${lightUrl}/window/entity.svg`;
397
399
  export const windowBankIcon = `${lightUrl}/window/bank.svg`;
398
400
  export const windowIndividualIcon = `${lightUrl}/window/individual.svg`;
399
401
  export const windowPasswordIcon = `${lightUrl}/window/password.svg`;
402
+ // New Invoice Icons
400
403
  export const actionsIcon = `${lightUrl}/actionsIcon.svg`;
401
404
  export const addItem = `${lightUrl}/addItem.svg`;
402
405
  export const attachIcon = `${lightUrl}/attachIcon.svg`;
@@ -494,6 +497,7 @@ export const rightLightArrowIcon = `${appBaseUrl}/rightLightArrow.svg`;
494
497
  export const segmentInstitutionIcon = `${appBaseUrl}/segmentInstitution.svg`;
495
498
  export const segmentTechnologyIcon = `${appBaseUrl}/segmentTechnology.svg`;
496
499
  export const segmentDevelopmentHouseIcon = `${appBaseUrl}/segmentDevelopmentHouse.svg`;
500
+ // Terminal App
497
501
  export const terminalAppIcon = `${appBaseUrl}/terminal.svg`;
498
502
  export const terminalWindowIcon = `${lightUrl}/window/terminal.svg`;
499
503
  export const terminalCardPhone = `${lightUrl}/terminalCardPhone.svg`;
@@ -551,3 +555,5 @@ export const sortAscArrowIcon = `${lightUrl}/sortAscArrowIcon.svg`;
551
555
  export const closedOutlinedYellowCircle = `${lightUrl}/closedOutlinedYellowCircle.svg`;
552
556
  export const deactivatedOrangeCircle = `${lightUrl}/deactivatedOrangeCircle.svg`;
553
557
  export const exclamationOutlinedOrangeCircle = `${lightUrl}/exclamationOutlinedOrangeCircle.svg`;
558
+ export const activeGreenIcon = `${lightUrl}/activeGreenIcon.svg`;
559
+ export const inActiveGreyIcon = `${lightUrl}/inActiveGreyIcon.svg`;
@@ -1,4 +1,5 @@
1
1
  var _a;
2
+ // NOTE: This environment variables should be defined in .env file of the hosting server
2
3
  const isSAOCI = import.meta.env.VITE_DEPLOYMENT_REGION === 'sa-oci';
3
4
  export const BASE_URL = (_a = (isSAOCI ? 'https://mw-os.tap.com.sa' : import.meta.env.VITE_MW_BASE_URL)) !== null && _a !== void 0 ? _a : import.meta.env.VITE_BASE_URL;
4
5
  export const API_URL = `${BASE_URL}/api`;
@@ -5,7 +5,7 @@ export declare const authorizationTableCellWidth: {
5
5
  readonly sheet: "240px";
6
6
  };
7
7
  readonly id: {
8
- readonly default: "225px";
8
+ readonly default: "205px";
9
9
  readonly text: "225px";
10
10
  readonly sheet: "250px";
11
11
  };
@@ -25,7 +25,7 @@ export declare const authorizationTableCellWidth: {
25
25
  readonly sheet: "85px";
26
26
  };
27
27
  readonly date: {
28
- readonly default: "170px";
28
+ readonly default: "140px";
29
29
  readonly text: "170px";
30
30
  readonly sheet: "130px";
31
31
  };
@@ -35,7 +35,7 @@ export declare const authorizationTableCellWidth: {
35
35
  readonly sheet: "80px";
36
36
  };
37
37
  readonly customer: {
38
- readonly default: "170px";
38
+ readonly default: "140px";
39
39
  readonly text: "180px";
40
40
  readonly sheet: "600px";
41
41
  };
@@ -65,7 +65,7 @@ export declare const authorizationTableCellWidth: {
65
65
  readonly sheet: "180px";
66
66
  };
67
67
  readonly source: {
68
- readonly default: "104px";
68
+ readonly default: "70px";
69
69
  readonly text: "125px";
70
70
  readonly sheet: "125px";
71
71
  };
@@ -80,7 +80,7 @@ export declare const authorizationTableCellWidth: {
80
80
  readonly sheet: "230px";
81
81
  };
82
82
  readonly amount: {
83
- readonly default: "170px";
83
+ readonly default: "130px";
84
84
  readonly text: "195px";
85
85
  readonly sheet: "150px";
86
86
  };
@@ -95,7 +95,7 @@ export declare const authorizationTableCellWidth: {
95
95
  readonly sheet: "95px";
96
96
  };
97
97
  readonly status: {
98
- readonly default: "77px";
98
+ readonly default: "70px";
99
99
  readonly text: "100px";
100
100
  readonly sheet: "300px";
101
101
  };
@@ -5,7 +5,7 @@ export const authorizationTableCellWidth = {
5
5
  sheet: '240px',
6
6
  },
7
7
  id: {
8
- default: '225px',
8
+ default: '205px',
9
9
  text: '225px',
10
10
  sheet: '250px',
11
11
  },
@@ -25,7 +25,7 @@ export const authorizationTableCellWidth = {
25
25
  sheet: '85px',
26
26
  },
27
27
  date: {
28
- default: '170px',
28
+ default: '140px',
29
29
  text: '170px',
30
30
  sheet: '130px',
31
31
  },
@@ -35,7 +35,7 @@ export const authorizationTableCellWidth = {
35
35
  sheet: '80px',
36
36
  },
37
37
  customer: {
38
- default: '170px',
38
+ default: '140px',
39
39
  text: '180px',
40
40
  sheet: '600px',
41
41
  },
@@ -65,7 +65,7 @@ export const authorizationTableCellWidth = {
65
65
  sheet: '180px',
66
66
  },
67
67
  source: {
68
- default: '104px',
68
+ default: '70px',
69
69
  text: '125px',
70
70
  sheet: '125px',
71
71
  },
@@ -80,7 +80,7 @@ export const authorizationTableCellWidth = {
80
80
  sheet: '230px',
81
81
  },
82
82
  amount: {
83
- default: '170px',
83
+ default: '130px',
84
84
  text: '195px',
85
85
  sheet: '150px',
86
86
  },
@@ -95,7 +95,7 @@ export const authorizationTableCellWidth = {
95
95
  sheet: '95px',
96
96
  },
97
97
  status: {
98
- default: '77px',
98
+ default: '70px',
99
99
  text: '100px',
100
100
  sheet: '300px',
101
101
  },
@@ -10,7 +10,7 @@ export declare const chargeTableCellWidth: {
10
10
  readonly sheet: "160px";
11
11
  };
12
12
  readonly id: {
13
- readonly default: "225px";
13
+ readonly default: "205px";
14
14
  readonly text: "225px";
15
15
  readonly sheet: "250px";
16
16
  };
@@ -20,7 +20,7 @@ export declare const chargeTableCellWidth: {
20
20
  readonly sheet: "85px";
21
21
  };
22
22
  readonly date: {
23
- readonly default: "170px";
23
+ readonly default: "140px";
24
24
  readonly text: "170px";
25
25
  readonly sheet: "130px";
26
26
  };
@@ -35,7 +35,7 @@ export declare const chargeTableCellWidth: {
35
35
  readonly sheet: "80px";
36
36
  };
37
37
  readonly customer: {
38
- readonly default: "180px";
38
+ readonly default: "140px";
39
39
  readonly text: "180px";
40
40
  readonly sheet: "600px";
41
41
  };
@@ -60,7 +60,7 @@ export declare const chargeTableCellWidth: {
60
60
  readonly sheet: "150px";
61
61
  };
62
62
  readonly source: {
63
- readonly default: "114px";
63
+ readonly default: "70px";
64
64
  readonly text: "125px";
65
65
  readonly sheet: "1250px";
66
66
  };
@@ -115,7 +115,7 @@ export declare const chargeTableCellWidth: {
115
115
  readonly sheet: "72px";
116
116
  };
117
117
  readonly amount: {
118
- readonly default: "170px";
118
+ readonly default: "130px";
119
119
  readonly text: "195px";
120
120
  readonly sheet: "550px";
121
121
  };
@@ -180,7 +180,7 @@ export declare const chargeTableCellWidth: {
180
180
  readonly sheet: "170px";
181
181
  };
182
182
  readonly metadata: {
183
- readonly default: "180px";
183
+ readonly default: "185px";
184
184
  readonly text: "180px";
185
185
  readonly sheet: "275px";
186
186
  };
@@ -10,7 +10,7 @@ export const chargeTableCellWidth = {
10
10
  sheet: '160px',
11
11
  },
12
12
  id: {
13
- default: '225px',
13
+ default: '205px',
14
14
  text: '225px',
15
15
  sheet: '250px',
16
16
  },
@@ -20,7 +20,7 @@ export const chargeTableCellWidth = {
20
20
  sheet: '85px',
21
21
  },
22
22
  date: {
23
- default: '170px',
23
+ default: '140px',
24
24
  text: '170px',
25
25
  sheet: '130px',
26
26
  },
@@ -35,7 +35,7 @@ export const chargeTableCellWidth = {
35
35
  sheet: '80px',
36
36
  },
37
37
  customer: {
38
- default: '180px',
38
+ default: '140px',
39
39
  text: '180px',
40
40
  sheet: '600px',
41
41
  },
@@ -60,7 +60,7 @@ export const chargeTableCellWidth = {
60
60
  sheet: '150px',
61
61
  },
62
62
  source: {
63
- default: '114px',
63
+ default: '70px',
64
64
  text: '125px',
65
65
  sheet: '1250px',
66
66
  },
@@ -115,7 +115,7 @@ export const chargeTableCellWidth = {
115
115
  sheet: '72px',
116
116
  },
117
117
  amount: {
118
- default: '170px',
118
+ default: '130px',
119
119
  text: '195px',
120
120
  sheet: '550px',
121
121
  },
@@ -180,7 +180,7 @@ export const chargeTableCellWidth = {
180
180
  sheet: '170px',
181
181
  },
182
182
  metadata: {
183
- default: '180px',
183
+ default: '185px',
184
184
  text: '180px',
185
185
  sheet: '275px',
186
186
  },
@@ -1,6 +1,6 @@
1
1
  export declare const destinationsTableCellWidth: {
2
2
  readonly id: {
3
- readonly default: "225px";
3
+ readonly default: "205px";
4
4
  readonly text: "225px";
5
5
  readonly sheet: "225px";
6
6
  };
@@ -10,7 +10,7 @@ export declare const destinationsTableCellWidth: {
10
10
  readonly sheet: "255px";
11
11
  };
12
12
  readonly created: {
13
- readonly default: "170px";
13
+ readonly default: "140px";
14
14
  readonly text: "170px";
15
15
  readonly sheet: "130px";
16
16
  };
@@ -30,7 +30,7 @@ export declare const destinationsTableCellWidth: {
30
30
  readonly sheet: "250px";
31
31
  };
32
32
  readonly customer: {
33
- readonly default: "180px";
33
+ readonly default: "140px";
34
34
  readonly text: "180px";
35
35
  readonly sheet: "600px";
36
36
  };
@@ -70,7 +70,7 @@ export declare const destinationsTableCellWidth: {
70
70
  readonly sheet: "235px";
71
71
  };
72
72
  readonly source: {
73
- readonly default: "114px";
73
+ readonly default: "70px";
74
74
  readonly text: "125px";
75
75
  readonly sheet: "125px";
76
76
  };
@@ -85,7 +85,7 @@ export declare const destinationsTableCellWidth: {
85
85
  readonly sheet: "165px";
86
86
  };
87
87
  readonly amount: {
88
- readonly default: "195px";
88
+ readonly default: "130px";
89
89
  readonly text: "195px";
90
90
  readonly sheet: "150px";
91
91
  };
@@ -1,6 +1,6 @@
1
1
  export const destinationsTableCellWidth = {
2
2
  id: {
3
- default: '225px',
3
+ default: '205px',
4
4
  text: '225px',
5
5
  sheet: '225px',
6
6
  },
@@ -10,7 +10,7 @@ export const destinationsTableCellWidth = {
10
10
  sheet: '255px',
11
11
  },
12
12
  created: {
13
- default: '170px',
13
+ default: '140px',
14
14
  text: '170px',
15
15
  sheet: '130px',
16
16
  },
@@ -30,7 +30,7 @@ export const destinationsTableCellWidth = {
30
30
  sheet: '250px',
31
31
  },
32
32
  customer: {
33
- default: '180px',
33
+ default: '140px',
34
34
  text: '180px',
35
35
  sheet: '600px',
36
36
  },
@@ -70,7 +70,7 @@ export const destinationsTableCellWidth = {
70
70
  sheet: '235px',
71
71
  },
72
72
  source: {
73
- default: '114px',
73
+ default: '70px',
74
74
  text: '125px',
75
75
  sheet: '125px',
76
76
  },
@@ -85,7 +85,7 @@ export const destinationsTableCellWidth = {
85
85
  sheet: '165px',
86
86
  },
87
87
  amount: {
88
- default: '195px',
88
+ default: '130px',
89
89
  text: '195px',
90
90
  sheet: '150px',
91
91
  },
@@ -5,14 +5,14 @@ export declare const refundTableCellWidth: {
5
5
  readonly sheet: "240px";
6
6
  };
7
7
  readonly id: {
8
- readonly default: "225px";
8
+ readonly default: "205px";
9
9
  readonly text: "225px";
10
10
  readonly sheet: "250px";
11
11
  };
12
12
  readonly date: {
13
- readonly default: "170px";
13
+ readonly default: "140px";
14
14
  readonly text: "170px";
15
- readonly sheet: "129px";
15
+ readonly sheet: "130px";
16
16
  };
17
17
  readonly order: {
18
18
  readonly default: "80px";
@@ -25,7 +25,7 @@ export declare const refundTableCellWidth: {
25
25
  readonly sheet: "85px";
26
26
  };
27
27
  readonly customer: {
28
- readonly default: "180px";
28
+ readonly default: "140px";
29
29
  readonly text: "180px";
30
30
  readonly sheet: "600px";
31
31
  };
@@ -55,7 +55,7 @@ export declare const refundTableCellWidth: {
55
55
  readonly sheet: "235px";
56
56
  };
57
57
  readonly source: {
58
- readonly default: "114px";
58
+ readonly default: "70px";
59
59
  readonly text: "125px";
60
60
  readonly sheet: "125px";
61
61
  };
@@ -110,7 +110,7 @@ export declare const refundTableCellWidth: {
110
110
  readonly sheet: "72px";
111
111
  };
112
112
  readonly amount: {
113
- readonly default: "195px";
113
+ readonly default: "130px";
114
114
  readonly text: "195px";
115
115
  readonly sheet: "150px";
116
116
  };
@@ -155,7 +155,7 @@ export declare const refundTableCellWidth: {
155
155
  readonly sheet: "200px";
156
156
  };
157
157
  readonly metadata: {
158
- readonly default: "180px";
158
+ readonly default: "185px";
159
159
  readonly text: "180px";
160
160
  readonly sheet: "180px";
161
161
  };
@@ -5,14 +5,14 @@ export const refundTableCellWidth = {
5
5
  sheet: '240px',
6
6
  },
7
7
  id: {
8
- default: '225px',
8
+ default: '205px',
9
9
  text: '225px',
10
10
  sheet: '250px',
11
11
  },
12
12
  date: {
13
- default: '170px',
13
+ default: '140px',
14
14
  text: '170px',
15
- sheet: '129px',
15
+ sheet: '130px',
16
16
  },
17
17
  order: {
18
18
  default: '80px',
@@ -25,7 +25,7 @@ export const refundTableCellWidth = {
25
25
  sheet: '85px',
26
26
  },
27
27
  customer: {
28
- default: '180px',
28
+ default: '140px',
29
29
  text: '180px',
30
30
  sheet: '600px',
31
31
  },
@@ -55,7 +55,7 @@ export const refundTableCellWidth = {
55
55
  sheet: '235px',
56
56
  },
57
57
  source: {
58
- default: '114px',
58
+ default: '70px',
59
59
  text: '125px',
60
60
  sheet: '125px',
61
61
  },
@@ -110,7 +110,7 @@ export const refundTableCellWidth = {
110
110
  sheet: '72px',
111
111
  },
112
112
  amount: {
113
- default: '195px',
113
+ default: '130px',
114
114
  text: '195px',
115
115
  sheet: '150px',
116
116
  },
@@ -155,7 +155,7 @@ export const refundTableCellWidth = {
155
155
  sheet: '200px',
156
156
  },
157
157
  metadata: {
158
- default: '180px',
158
+ default: '185px',
159
159
  text: '180px',
160
160
  sheet: '180px',
161
161
  },
@@ -20,9 +20,9 @@ export declare const terminalsTableCellWidth: {
20
20
  readonly sheet: "80px";
21
21
  };
22
22
  readonly platform: {
23
- readonly default: "80px";
24
- readonly text: "80px";
25
- readonly sheet: "80px";
23
+ readonly default: "100px";
24
+ readonly text: "100px";
25
+ readonly sheet: "100px";
26
26
  };
27
27
  readonly branding: {
28
28
  readonly default: "80px";
@@ -20,9 +20,9 @@ export const terminalsTableCellWidth = {
20
20
  sheet: '80px',
21
21
  },
22
22
  platform: {
23
- default: '80px',
24
- text: '80px',
25
- sheet: '80px',
23
+ default: '100px',
24
+ text: '100px',
25
+ sheet: '100px',
26
26
  },
27
27
  branding: {
28
28
  default: '80px',
@@ -4,16 +4,19 @@ export function useCountdown() {
4
4
  const [timer, setTimer] = useState(0);
5
5
  const timerInterval = useRef(null);
6
6
  const formattedTime = secondsToTimeString(timer);
7
+ // Stop the timer
7
8
  const stopTimer = () => {
8
9
  if (timerInterval.current) {
9
10
  clearInterval(timerInterval.current);
10
11
  timerInterval.current = null;
11
12
  }
12
13
  };
14
+ // Reset the timer
13
15
  const resetTimer = () => {
14
16
  stopTimer();
15
17
  setTimer(0);
16
18
  };
19
+ // Start the timer
17
20
  const startTimer = (expiryTime) => {
18
21
  if (expiryTime <= 0)
19
22
  return;
@@ -31,6 +34,7 @@ export function useCountdown() {
31
34
  });
32
35
  }, 1000);
33
36
  };
37
+ // Auto-stop and cleanup on unmount
34
38
  useEffect(() => {
35
39
  return () => {
36
40
  stopTimer();
@@ -1,4 +1,10 @@
1
1
  import { useEffect, useState } from 'react';
2
+ /* Usage: you will need to add an empty div before your sticky header and pass it's ref to this hook
3
+ Example:
4
+ <Box ref={interceptRef} />
5
+ <StickyHeader></StickyHeader>
6
+ */
7
+ // TODO: enhance the hook to take only the ref of the sticky bar and handle adding the interceptRef internally from the hook
2
8
  export const useStickyHeaderShadow = (interceptRef) => {
3
9
  const [showShadow, setShowShadow] = useState(false);
4
10
  useEffect(() => {
@@ -1,5 +1,9 @@
1
1
  import { Merchant } from './merchant';
2
2
  import { TextAndLang } from './user';
3
+ export interface Branch {
4
+ id: string;
5
+ name: TextAndLang[];
6
+ }
3
7
  export interface Entity {
4
8
  id: string;
5
9
  legal_name: TextAndLang[];
@@ -7,6 +11,7 @@ export interface Entity {
7
11
  created: number;
8
12
  country?: string;
9
13
  merchants?: Merchant[];
14
+ branches?: Branch[];
10
15
  }
11
16
  type DataStatus = 'editable' | 'noneditable';
12
17
  export interface EntityDetails {
@@ -61,6 +61,7 @@ api.interceptors.request.use((config) => {
61
61
  }, 0);
62
62
  });
63
63
  });
64
+ // create interceptor to add token to all requests
64
65
  api.interceptors.request.use((config) => {
65
66
  config.headers.Authorization = getLoggedInUserJwtToken();
66
67
  const secretKey = getSecretKey();
@@ -81,7 +82,9 @@ export function setApiToken(token) {
81
82
  api.defaults.headers.common.Authorization = token;
82
83
  });
83
84
  }
85
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
84
86
  export function getHeaders(attrs) {
87
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
85
88
  const _a = attrs !== null && attrs !== void 0 ? attrs : {}, { sandboxMode, fixedSecretKey, applicationId, serviceId, functionId, userFunctionId, segmentId } = _a, rest = __rest(_a, ["sandboxMode", "fixedSecretKey", "applicationId", "serviceId", "functionId", "userFunctionId", "segmentId"]);
86
89
  return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, rest), { live_mode: sandboxMode ? 'false' : 'true' }), (!!fixedSecretKey && { 'x-test-secret': fixedSecretKey })), (!!applicationId && { application_id: applicationId })), (!!serviceId && { service_id: serviceId })), (!!functionId && { function_id: functionId })), (!!userFunctionId && { user_function_id: userFunctionId }));
87
90
  }
@@ -1,10 +1,14 @@
1
1
  import orderBy from 'lodash/orderBy';
2
2
  import get from 'lodash/get';
3
3
  export const generateArray = (length) => Array.from({ length }, (_, i) => i);
4
- export const groupBy = (arr, groupFn) => arr.reduce((grouped, obj) => (Object.assign(Object.assign({}, grouped), { [groupFn(obj)]: [...(grouped[groupFn(obj)] || []), obj] })), {});
4
+ // eslint-disable-next-line
5
+ export const groupBy = (arr, groupFn) => arr.reduce(
6
+ // eslint-disable-next-line
7
+ (grouped, obj) => (Object.assign(Object.assign({}, grouped), { [groupFn(obj)]: [...(grouped[groupFn(obj)] || []), obj] })), {});
5
8
  export function sortList({ list, sortBy, orders }) {
6
9
  return (sortBy === null || sortBy === void 0 ? void 0 : sortBy.length) && (orders === null || orders === void 0 ? void 0 : orders.length) ? orderBy(list, sortBy, orders) : list;
7
10
  }
11
+ // eslint-disable-next-line
8
12
  export const sortByString = (list = [], key) => {
9
13
  if (!list.length)
10
14
  return [];
@@ -28,5 +28,6 @@ export const getDefaultInvoiceInfo = () => ({
28
28
  isItemsNotValid: false,
29
29
  isAmountIsMissing: false,
30
30
  errors: [],
31
+ // eslint-disable-next-line
31
32
  brand: {},
32
33
  });
@@ -1 +1 @@
1
- export declare function getCountryName(countryCode: string): string | undefined;
1
+ export declare function getCountryNameByISO(countryCode: string): string | undefined;
@@ -1,9 +1,10 @@
1
1
  import { toast } from 'react-hot-toast';
2
- export function getCountryName(countryCode) {
2
+ export function getCountryNameByISO(countryCode) {
3
3
  var _a, _b, _c;
4
4
  try {
5
5
  const regionNames = new Intl.DisplayNames(['en'], { type: 'region' });
6
6
  return regionNames.of(countryCode);
7
+ // eslint-disable-next-line
7
8
  }
8
9
  catch (error) {
9
10
  toast.error((_c = (_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.message);
@@ -22,6 +22,7 @@ export const intlCurrency = (charge, currencyType) => {
22
22
  minimumFractionDigits: currencyConfig[currencyType] ? 3 : 2,
23
23
  }).format(charge);
24
24
  return currency;
25
+ // eslint-disable-next-line
25
26
  }
26
27
  catch (error) {
27
28
  toast.error((_c = (_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.message);
@@ -56,7 +57,9 @@ export const formatCurrencyWithInput = (charge, selectedCurrency) => {
56
57
  return chargeString;
57
58
  };
58
59
  export function formatAmount(amount, decimal = 2) {
60
+ // Ensure the input is a number
59
61
  const num = parseFloat(amount.toString());
62
+ // Check if it's a valid number
60
63
  if (isNaN(num)) {
61
64
  const [integerAmount, decimalAmount] = (0).toFixed(decimal).split('.');
62
65
  const fullAmount = `${integerAmount}.${decimalAmount}`;
@@ -66,8 +69,11 @@ export function formatAmount(amount, decimal = 2) {
66
69
  fullAmount,
67
70
  };
68
71
  }
72
+ // Use toFixed(limit) to limit to 2 decimal places
69
73
  const fixedNumber = num.toFixed(decimal);
74
+ // Split integer and decimal parts
70
75
  const [integerPart, decimalPart] = fixedNumber.split('.');
76
+ // Add commas to the integer part
71
77
  const formattedInteger = parseInt(integerPart).toLocaleString();
72
78
  return {
73
79
  integerAmount: formattedInteger,