@tap-payments/os-micro-frontend-shared 0.1.236 → 0.1.237-test.1

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 (107) hide show
  1. package/build/components/AccordionAdapter/style.d.ts +2 -2
  2. package/build/components/AccountDropdown/style.d.ts +1 -1
  3. package/build/components/ActionMenu/style.d.ts +1 -1
  4. package/build/components/ActivityAreaChart/styles.d.ts +3 -3
  5. package/build/components/AppServices/style.d.ts +1 -1
  6. package/build/components/AppWindowWrapper/AppWindow/style.d.ts +2 -2
  7. package/build/components/Button/style.d.ts +1 -1
  8. package/build/components/Calender/style.d.ts +4 -4
  9. package/build/components/Chip/style.d.ts +6 -7
  10. package/build/components/CircularProgressWithLabel/style.d.ts +1 -1
  11. package/build/components/ColorPicker/style.d.ts +3 -3
  12. package/build/components/ConfirmDialog/styles.d.ts +1 -1
  13. package/build/components/CountBadge/style.d.ts +6 -7
  14. package/build/components/Dialog/style.d.ts +6 -7
  15. package/build/components/DockButton/style.d.ts +1 -1
  16. package/build/components/DropdownButton/constants.d.ts +2 -2
  17. package/build/components/DropdownButton/style.d.ts +2 -2
  18. package/build/components/DropdownMenu/styles.d.ts +2 -2
  19. package/build/components/ErrorBoundary/style.d.ts +1 -1
  20. package/build/components/ErrorToast/style.d.ts +1 -1
  21. package/build/components/FileUpload/style.d.ts +3 -3
  22. package/build/components/FileUploader/style.d.ts +1 -1
  23. package/build/components/FlippingCard/style.d.ts +6 -7
  24. package/build/components/IconWithLabel/style.d.ts +1 -1
  25. package/build/components/IconsDropdown/style.d.ts +2 -2
  26. package/build/components/ImageWrapper/ImageWrapper.d.ts +6 -7
  27. package/build/components/InputBase/SelectBase/style.d.ts +1 -1
  28. package/build/components/Inputs/FileInput/style.d.ts +1 -1
  29. package/build/components/JSONViewer/style.d.ts +13 -14
  30. package/build/components/LabeledIconDropdown/style.d.ts +3 -3
  31. package/build/components/LeftPeekRightExpandingChip/style.d.ts +18 -19
  32. package/build/components/MultiSelectStatusButton/style.d.ts +1 -1
  33. package/build/components/MultiSelectWithSearch/style.d.ts +3 -3
  34. package/build/components/NestedDropdown/styles.d.ts +1 -1
  35. package/build/components/ProgressBar/style.d.ts +1 -1
  36. package/build/components/ProgressRing/style.d.ts +2 -2
  37. package/build/components/RFH/Inputs/SelectWithAccordion/style.d.ts +3 -3
  38. package/build/components/RangeCalender/components/QuickFilters/style.d.ts +1 -1
  39. package/build/components/RangeCalender/components/RangeDatepicker/style.d.ts +1 -1
  40. package/build/components/RangeCalender/style.d.ts +3 -3
  41. package/build/components/RightLeftExpandingCenterChip/style.d.ts +78 -79
  42. package/build/components/SearchButton/styles.d.ts +17 -18
  43. package/build/components/SelectDropdown/style.d.ts +1 -1
  44. package/build/components/SelectWithSearch/style.d.ts +3 -3
  45. package/build/components/StatusButton/style.d.ts +2 -2
  46. package/build/components/StatusChip/StatusChip.js +2 -2
  47. package/build/components/StatusIcons/AuthIcons/style.d.ts +12 -13
  48. package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +6 -7
  49. package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +36 -37
  50. package/build/components/StatusIcons/SourceIcons/style.d.ts +6 -7
  51. package/build/components/StatusLabel/style.d.ts +1 -1
  52. package/build/components/TableCells/CustomCells/ActionCell/hooks/useActionCell.d.ts +1 -1
  53. package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +8 -9
  54. package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +6 -7
  55. package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +12 -13
  56. package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +30 -31
  57. package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +30 -31
  58. package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +6 -7
  59. package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +6 -7
  60. package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +6 -7
  61. package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +30 -31
  62. package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +6 -7
  63. package/build/components/TableCells/CustomCells/IDButton/style.d.ts +12 -13
  64. package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +6 -7
  65. package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +6 -7
  66. package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +30 -31
  67. package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +6 -7
  68. package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +6 -7
  69. package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +12 -13
  70. package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +6 -7
  71. package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +6 -7
  72. package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +6 -7
  73. package/build/components/TableCells/CustomCells/SourceCell/style.d.ts +6 -7
  74. package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +37 -38
  75. package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +30 -31
  76. package/build/components/TableCells/CustomCells/style.d.ts +7 -8
  77. package/build/components/TableHeader/style.d.ts +1 -1
  78. package/build/components/Timepicker/style.d.ts +2 -2
  79. package/build/components/ToolbarIcon/ExpandButton/style.d.ts +1 -1
  80. package/build/components/VirtualTables/SheetViewVirtualTable/style.d.ts +2 -2
  81. package/build/components/VirtualTables/components/ColumnFilter/Inputs/style.d.ts +1 -1
  82. package/build/components/VirtualTables/components/ColumnFilter/style.d.ts +2 -2
  83. package/build/components/VirtualTables/components/ErrorList/styles.d.ts +1 -1
  84. package/build/components/VirtualTables/components/TableFooter/style.d.ts +2 -2
  85. package/build/components/VirtualTables/components/TableHeader/style.d.ts +2 -2
  86. package/build/components/VirtualTables/components/style.d.ts +8 -9
  87. package/build/components/Widget/style.d.ts +1 -1
  88. package/build/components/Window/style.d.ts +12 -12
  89. package/build/components/WindowAppIcon/style.d.ts +1 -1
  90. package/build/constants/apps.d.ts +1 -0
  91. package/build/constants/apps.js +1 -0
  92. package/build/hooks/index.d.ts +3 -0
  93. package/build/hooks/index.js +3 -0
  94. package/build/hooks/useAppEventListener.d.ts +2 -0
  95. package/build/hooks/useAppEventListener.js +13 -0
  96. package/build/hooks/useAppEventPublisher.d.ts +2 -0
  97. package/build/hooks/useAppEventPublisher.js +7 -0
  98. package/build/hooks/useAppsInfo.d.ts +17 -0
  99. package/build/hooks/useAppsInfo.js +21 -0
  100. package/build/types/appEvents.d.ts +44 -0
  101. package/build/types/appEvents.js +14 -0
  102. package/build/types/apps.d.ts +25 -18
  103. package/build/types/index.d.ts +1 -0
  104. package/build/types/index.js +1 -0
  105. package/build/utils/table.d.ts +12 -1
  106. package/build/utils/table.js +147 -1
  107. package/package.json +3 -3
@@ -0,0 +1,21 @@
1
+ import { useCallback } from 'react';
2
+ export const useAppsInfo = (segmentApps) => {
3
+ const getAppInfo = useCallback((appCode) => segmentApps.find((app) => app.code.toLowerCase() === appCode.toLowerCase()), [segmentApps]);
4
+ const getServiceInfo = useCallback(({ appCode, serviceCode }) => {
5
+ var _a;
6
+ return (_a = getAppInfo(appCode)) === null || _a === void 0 ? void 0 : _a.app_services.find(({ code }) => code.toLowerCase() === serviceCode.toLowerCase());
7
+ }, [getAppInfo]);
8
+ const getServiceFunctions = useCallback(({ appCode, serviceCode }) => {
9
+ var _a, _b;
10
+ return (_b = (_a = getServiceInfo({ appCode, serviceCode })) === null || _a === void 0 ? void 0 : _a.functions) !== null && _b !== void 0 ? _b : [];
11
+ }, [getServiceInfo]);
12
+ const getFunctionInfo = useCallback(({ appCode, serviceCode, functionCode }) => {
13
+ return getServiceFunctions({ appCode, serviceCode }).find(({ code }) => code.toLowerCase() === functionCode.toLowerCase());
14
+ }, [getServiceFunctions]);
15
+ return {
16
+ getAppInfo,
17
+ getServiceInfo,
18
+ getServiceFunctions,
19
+ getFunctionInfo,
20
+ };
21
+ };
@@ -0,0 +1,44 @@
1
+ import { CalenderMode, NavigateFunction, TableMode, Timezone } from './index.js';
2
+ import { DragControls } from 'framer-motion';
3
+ export declare enum AppEvent {
4
+ OnClickTableAction = "on-click-table-action",
5
+ OnRightClickTableAction = "on-right-click-table-action",
6
+ OnToggleTableMode = "on-toggle-table-mode",
7
+ OnChangeTableMode = "on-change-table-mode",
8
+ OnChangeCalenderMode = "on-change-calender-mode",
9
+ OnChangeTimezone = "on-change-timezone",
10
+ OnNavigate = "on-navigate",
11
+ OnStartDrag = "on-start-drag",
12
+ OnModifyRemotePayload = "on-modify-remote-payload"
13
+ }
14
+ /**
15
+ * Map event names to their corresponding payload types.
16
+ */
17
+ export type AppEventMap = {
18
+ [AppEvent.OnClickTableAction]: (params: {
19
+ targetApp: {
20
+ appCode: string;
21
+ serviceCode: string;
22
+ sandboxMode?: boolean;
23
+ payload?: object;
24
+ };
25
+ }) => void;
26
+ [AppEvent.OnRightClickTableAction]: (params: {
27
+ targetApp: {
28
+ appCode: string;
29
+ serviceCode: string;
30
+ sandboxMode?: boolean;
31
+ payload?: object;
32
+ };
33
+ }) => void;
34
+ [AppEvent.OnToggleTableMode]: () => void;
35
+ [AppEvent.OnChangeTableMode]: (tableMode: TableMode) => void;
36
+ [AppEvent.OnChangeCalenderMode]: (calenderMode: CalenderMode) => void;
37
+ [AppEvent.OnChangeTimezone]: (timezone: Timezone) => void;
38
+ [AppEvent.OnNavigate]: NavigateFunction;
39
+ [AppEvent.OnStartDrag]: (...args: Parameters<DragControls['start']>) => void;
40
+ [AppEvent.OnModifyRemotePayload]: (params: {
41
+ windowId: string;
42
+ payload: object;
43
+ }) => void;
44
+ };
@@ -0,0 +1,14 @@
1
+ export var AppEvent;
2
+ (function (AppEvent) {
3
+ // Host Events
4
+ AppEvent["OnClickTableAction"] = "on-click-table-action";
5
+ AppEvent["OnRightClickTableAction"] = "on-right-click-table-action";
6
+ AppEvent["OnToggleTableMode"] = "on-toggle-table-mode";
7
+ AppEvent["OnChangeTableMode"] = "on-change-table-mode";
8
+ AppEvent["OnChangeCalenderMode"] = "on-change-calender-mode";
9
+ AppEvent["OnChangeTimezone"] = "on-change-timezone";
10
+ AppEvent["OnNavigate"] = "on-navigate";
11
+ AppEvent["OnStartDrag"] = "on-start-drag";
12
+ // Remote Events
13
+ AppEvent["OnModifyRemotePayload"] = "on-modify-remote-payload";
14
+ })(AppEvent || (AppEvent = {}));
@@ -1,11 +1,11 @@
1
1
  import { ColumnsView } from './column';
2
- import { Segment, SegmentCountry, TextAndLang } from './user';
2
+ import { SegmentCountry, SelectedBrand, SelectedCountry, TextAndLang } from './user';
3
3
  import { BusinessMerchant } from './merchant';
4
4
  import type { i18n } from 'i18next';
5
- import type { DragControls } from 'framer-motion';
6
5
  import { Theme } from '@mui/material';
7
6
  import { CalenderMode } from './theme';
8
7
  import { Timezone } from './appConfig';
8
+ import { Brand, Entity, TableMode } from './index.js';
9
9
  export interface AccountAppPayload {
10
10
  disabledAccountDataFetching?: boolean;
11
11
  isAccountDetailsOpen: boolean;
@@ -69,16 +69,16 @@ export interface UserApp {
69
69
  app_services: AppService[];
70
70
  }
71
71
  export type NavigateFunction = (params: {
72
- instanceId?: string;
73
- appId?: string;
72
+ windowId?: string;
74
73
  appCode: string;
75
74
  serviceCode: string;
75
+ sandboxMode?: boolean;
76
76
  state?: any;
77
77
  }) => void;
78
78
  export type MFWidgetBaseProps = {
79
- instanceId: string;
79
+ windowId: string;
80
80
  i18n?: i18n;
81
- app?: UserApp;
81
+ app: UserApp;
82
82
  appWindow: {
83
83
  isMinimized: boolean;
84
84
  isMaximized: boolean;
@@ -86,29 +86,36 @@ export type MFWidgetBaseProps = {
86
86
  dimensions: Pick<AppDetails['dimensions'], 'width' | 'height'>;
87
87
  };
88
88
  features: {
89
+ calendarMode: CalenderMode;
90
+ tableMode: TableMode;
89
91
  hasReportsApp: boolean;
90
92
  hasHeader: boolean;
91
93
  sandboxMode: boolean;
92
94
  initialServiceCode?: string;
95
+ initialPayload?: Record<string, any> & AppPayload;
93
96
  };
94
- segment: Pick<Segment, 'id' | 'brands' | 'countries'> & {
95
- defaultCountry?: SegmentCountry;
97
+ segment: {
98
+ code: string;
99
+ type: string;
100
+ brands: Brand[];
101
+ countries: SegmentCountry[];
102
+ defaultCountry: SegmentCountry;
103
+ defaultEntity: Entity;
104
+ apps: UserApp[];
105
+ isBusinessSegment: boolean;
106
+ isAnyMerchantHasMarketplace: boolean;
107
+ isSegmentHasMoreThanOneMerchant: boolean;
108
+ };
109
+ selectedSegment: {
110
+ id: string;
111
+ selectedBrands: SelectedBrand[];
112
+ selectedCountries: SelectedCountry[];
96
113
  };
97
114
  ui: {
98
115
  theme: Theme;
99
- onStartDrag: DragControls['start'];
100
- };
101
- calendar: {
102
- mode: CalenderMode;
103
- onSwitch: (mode: CalenderMode) => void;
104
- };
105
- navigation: {
106
- navigate: NavigateFunction;
107
116
  };
108
117
  timezone: {
109
118
  current?: Timezone | null;
110
119
  default?: Timezone;
111
- onChange: (timezone: Timezone) => void;
112
- onChangeHistory: (timezone: Timezone) => void;
113
120
  };
114
121
  };
@@ -24,3 +24,4 @@ export * from './destination';
24
24
  export * from './account';
25
25
  export * from './day';
26
26
  export * from './tsUtils';
27
+ export * from './appEvents';
@@ -24,3 +24,4 @@ export * from './destination';
24
24
  export * from './account';
25
25
  export * from './day';
26
26
  export * from './tsUtils';
27
+ export * from './appEvents';
@@ -1,4 +1,4 @@
1
- import { TableCellWidthProps, TableMode } from '../types/index.js';
1
+ import { TableCellWidthProps, TableMode, TableNavigation } from '../types/index.js';
2
2
  export declare const getColumnWidthPercentage: (widthInPx: number, options?: {
3
3
  isFirst?: boolean;
4
4
  isLast?: boolean;
@@ -9,3 +9,14 @@ export declare const isHeightNotFullyFilledByRows: (totalRows: number) => boolea
9
9
  export declare const isTableDefaultMode: (tableMode: TableMode) => boolean;
10
10
  export declare const isTableSheetMode: (tableMode: TableMode) => boolean;
11
11
  export declare const isTableTextMode: (tableMode: TableMode) => boolean;
12
+ interface ActionNavigationView<T> {
13
+ prefixes: string[];
14
+ keys?: string[];
15
+ label: string;
16
+ appCode: string;
17
+ serviceCode: string;
18
+ icon: TableNavigation['icon'];
19
+ accessor?: (rowData: T) => string[];
20
+ }
21
+ export declare const getPossibleActionNavigationView: <T>() => Record<string, ActionNavigationView<T>>;
22
+ export {};
@@ -1,4 +1,4 @@
1
- import { walletDetailsTableCellWidth, authenticationsTableCellWidth, authorizationTableCellWidth, chargeTableCellWidth, destinationsTableCellWidth, intentsTableCellWidth, invoicesTableCellWidth, leadsTableCellWidth, ordersTableCellWidth, payoutsTableCellWidth, protectChargesTableCellWidth, protectAuthorizationsTableCellWidth, refundTableCellWidth, tokensTableCellWidth, walletStatementTableCellWidth, topupsTableCellWidth, walletTableCellWidth, TABLE_CONTENT_ROW_HEIGHT, TABLE_LOADING_ROW_HEIGHT, TABLE_ROW_HEIGHT, merchantsTableCellWidth, terminalsTableCellWidth, } from '../constants/index.js';
1
+ import { walletDetailsTableCellWidth, authenticationsTableCellWidth, authorizationTableCellWidth, chargeTableCellWidth, destinationsTableCellWidth, intentsTableCellWidth, invoicesTableCellWidth, leadsTableCellWidth, ordersTableCellWidth, payoutsTableCellWidth, protectChargesTableCellWidth, protectAuthorizationsTableCellWidth, refundTableCellWidth, tokensTableCellWidth, walletStatementTableCellWidth, topupsTableCellWidth, walletTableCellWidth, TABLE_CONTENT_ROW_HEIGHT, TABLE_LOADING_ROW_HEIGHT, TABLE_ROW_HEIGHT, merchantsTableCellWidth, terminalsTableCellWidth, APP_CODES, } from '../constants/index.js';
2
2
  export const getColumnWidthPercentage = (widthInPx, options) => {
3
3
  const { isFirst, isLast } = options || {};
4
4
  const paddingInPx = isFirst || isLast ? 0 : 0;
@@ -82,3 +82,149 @@ export const isTableSheetMode = (tableMode) => {
82
82
  export const isTableTextMode = (tableMode) => {
83
83
  return tableMode === 'text';
84
84
  };
85
+ export const getPossibleActionNavigationView = () => {
86
+ return {
87
+ charge: {
88
+ prefixes: ['chg_', 'payout_', 'settlement_', 'terminal_'],
89
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
90
+ accessor: (rowData) => {
91
+ var _a, _b, _c, _d;
92
+ return [
93
+ rowData.id,
94
+ (_b = (_a = rowData.capture) === null || _a === void 0 ? void 0 : _a.charge) === null || _b === void 0 ? void 0 : _b.map((charge) => charge.id),
95
+ (_c = rowData.charge) === null || _c === void 0 ? void 0 : _c.id,
96
+ (_d = rowData.transactions) === null || _d === void 0 ? void 0 : _d.map((transaction) => transaction.id),
97
+ rowData.charge_id,
98
+ ];
99
+ },
100
+ label: 'Charge',
101
+ appCode: APP_CODES.acceptance.code,
102
+ serviceCode: APP_CODES.acceptance.services.charges.code,
103
+ icon: 'capture',
104
+ },
105
+ authorize: {
106
+ prefixes: ['auth_'],
107
+ keys: ['id', 'authorize.id', 'source.id'],
108
+ label: 'Authorization',
109
+ appCode: APP_CODES.acceptance.code,
110
+ serviceCode: APP_CODES.acceptance.services.authorization.code,
111
+ icon: 'capture',
112
+ },
113
+ intents: {
114
+ prefixes: ['intent_'],
115
+ keys: [],
116
+ label: 'Intents',
117
+ appCode: APP_CODES.acceptance.code,
118
+ serviceCode: APP_CODES.acceptance.services.intents.code,
119
+ icon: 'capture',
120
+ },
121
+ refunds: {
122
+ prefixes: ['re_', 'payout_'],
123
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
124
+ accessor: (rowData) => {
125
+ var _a, _b, _c, _d;
126
+ return [
127
+ (_b = (_a = rowData === null || rowData === void 0 ? void 0 : rowData.refunds) === null || _a === void 0 ? void 0 : _a.refund) === null || _b === void 0 ? void 0 : _b.map((refund) => refund.id),
128
+ rowData === null || rowData === void 0 ? void 0 : rowData.id,
129
+ ...(((_c = rowData === null || rowData === void 0 ? void 0 : rowData.refunds) === null || _c === void 0 ? void 0 : _c.length) ? [(_d = rowData === null || rowData === void 0 ? void 0 : rowData.refunds) === null || _d === void 0 ? void 0 : _d.map((refund) => refund.id)] : []),
130
+ ];
131
+ },
132
+ label: 'Refunds',
133
+ appCode: APP_CODES.acceptance.code,
134
+ serviceCode: APP_CODES.acceptance.services.refunds.code,
135
+ icon: 'refund',
136
+ },
137
+ authentication: {
138
+ prefixes: ['auth_payer_'],
139
+ keys: ['authentication.id'],
140
+ label: 'Authentication',
141
+ appCode: APP_CODES.authentication.code,
142
+ serviceCode: APP_CODES.authentication.services.authentication.code,
143
+ icon: 'capture',
144
+ },
145
+ order: {
146
+ prefixes: ['order_', 'ord_'],
147
+ keys: ['order.id'],
148
+ label: 'Order',
149
+ appCode: APP_CODES.order.code,
150
+ serviceCode: APP_CODES.order.services.orders.code,
151
+ icon: 'capture',
152
+ },
153
+ chargeFlags: {
154
+ prefixes: ['flag_'],
155
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
156
+ accessor: (rowData) => {
157
+ var _a, _b;
158
+ return (_b = (_a = rowData === null || rowData === void 0 ? void 0 : rowData.flags) === null || _a === void 0 ? void 0 : _a.flag) === null || _b === void 0 ? void 0 : _b.map((flag) => flag.id);
159
+ },
160
+ label: 'Flags',
161
+ appCode: APP_CODES.protect.code,
162
+ serviceCode: APP_CODES.protect.services.chargesFlags.code,
163
+ icon: 'flag',
164
+ },
165
+ authorizationFlags: {
166
+ prefixes: ['flag_'],
167
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
168
+ accessor: (rowData) => {
169
+ var _a, _b;
170
+ return (_b = (_a = rowData === null || rowData === void 0 ? void 0 : rowData.flags) === null || _a === void 0 ? void 0 : _a.flag) === null || _b === void 0 ? void 0 : _b.map((flag) => flag.id);
171
+ },
172
+ label: 'Flags',
173
+ appCode: APP_CODES.protect.code,
174
+ serviceCode: APP_CODES.protect.services.authorizationsFlags.code,
175
+ icon: 'flag',
176
+ },
177
+ token: {
178
+ prefixes: ['tok_'],
179
+ keys: ['source.id'],
180
+ label: 'Token',
181
+ appCode: APP_CODES.tokens.code,
182
+ serviceCode: APP_CODES.tokens.services.tokens.code,
183
+ icon: 'capture',
184
+ },
185
+ destination: {
186
+ prefixes: ['trf_', 'payout_'],
187
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
188
+ accessor: (rowData) => {
189
+ var _a, _b;
190
+ return [(_b = (_a = rowData === null || rowData === void 0 ? void 0 : rowData.destinations) === null || _a === void 0 ? void 0 : _a.destination) === null || _b === void 0 ? void 0 : _b.map((destination) => { var _a; return (_a = destination === null || destination === void 0 ? void 0 : destination.transfer) === null || _a === void 0 ? void 0 : _a.id; }), rowData === null || rowData === void 0 ? void 0 : rowData.id];
191
+ },
192
+ label: 'Destination',
193
+ appCode: APP_CODES.acceptance.code,
194
+ serviceCode: APP_CODES.acceptance.services.destinations.code,
195
+ icon: 'destination',
196
+ },
197
+ payout: {
198
+ prefixes: ['payout_'],
199
+ keys: ['balance.payout.id'],
200
+ label: 'Payout',
201
+ appCode: APP_CODES.payouts.code,
202
+ serviceCode: APP_CODES.payouts.services.payouts.code,
203
+ icon: 'capture',
204
+ },
205
+ settlement: {
206
+ prefixes: ['settlement_'],
207
+ keys: ['settlement.id'],
208
+ label: 'Settlement',
209
+ appCode: APP_CODES.acceptance.code,
210
+ serviceCode: APP_CODES.acceptance.services.settlements.code,
211
+ icon: 'capture',
212
+ },
213
+ intent: {
214
+ prefixes: ['intent_'],
215
+ keys: ['intent.id'],
216
+ label: 'Intent',
217
+ appCode: APP_CODES.acceptance.code,
218
+ serviceCode: APP_CODES.acceptance.services.intents.code,
219
+ icon: 'capture',
220
+ },
221
+ topup: {
222
+ prefixes: ['topup_'],
223
+ keys: ['topup.id'],
224
+ label: 'Topup',
225
+ appCode: APP_CODES.acceptance.code,
226
+ serviceCode: APP_CODES.acceptance.services.topups.code,
227
+ icon: 'capture',
228
+ },
229
+ };
230
+ };
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@tap-payments/os-micro-frontend-shared",
3
3
  "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.1.236",
5
- "testVersion": 0,
4
+ "version": "0.1.237-test.1",
5
+ "testVersion": 1,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",
@@ -163,4 +163,4 @@
163
163
  "publishConfig": {
164
164
  "registry": "https://registry.npmjs.org/"
165
165
  }
166
- }
166
+ }