@tap-payments/os-micro-frontend-shared 0.0.243 → 0.0.244

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.
@@ -11,14 +11,13 @@ 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 Icon from '../../../Icon';
15
- import { getCountriesIcon } from '../../../../constants/index.js';
16
14
  import { EntityName, EntityWrapper, VerificationIcon, EntityContainer, EntityInfoContainer, VerificationContainer, EmptyCell } from './style';
17
15
  import { verificationIcon } from './constants';
18
16
  import Tooltip from '../../../Tooltip';
17
+ import { CountryFlag } from '../../../index.js';
18
+ import { getCountryName } from '../../../../utils/index.js';
19
19
  export default function EntityCell(_a) {
20
20
  var { entity, country, verificationStatus, licenseNumber } = _a, props = __rest(_a, ["entity", "country", "verificationStatus", "licenseNumber"]);
21
- const countryIcon = getCountriesIcon(country);
22
21
  const icon = verificationIcon[verificationStatus !== null && verificationStatus !== void 0 ? verificationStatus : 'incomplete'];
23
- return (_jsx(TableCell, Object.assign({}, props, { sx: { cursor: 'pointer' } }, { children: _jsx(Tooltip, Object.assign({ title: entity }, { children: _jsx(EntityWrapper, { children: licenseNumber ? (_jsxs(EntityContainer, { children: [_jsxs(EntityInfoContainer, { children: [_jsx(Icon, { src: countryIcon, sx: { width: '16px', height: '11.73' } }), _jsx(EntityName, { children: licenseNumber })] }), _jsx(VerificationContainer, { children: _jsx(VerificationIcon, { src: icon }) })] })) : (_jsx(EmptyCell, { children: "Not Available" })) }) })) })));
22
+ return (_jsx(TableCell, Object.assign({}, props, { sx: { cursor: 'pointer' } }, { 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 })] }), _jsx(VerificationContainer, { children: _jsx(VerificationIcon, { src: icon }) })] })) : (_jsx(EmptyCell, { children: "Not Available" })) }) })) })));
24
23
  }
@@ -25,7 +25,7 @@ function TableRow({ row, columns, index, rowProps, isSheetView, selectedCell = n
25
25
  isColumnSelected,
26
26
  isLastRow,
27
27
  });
28
- return (_jsx(StyledCell, Object.assign({ component: "div", "data-testid": "TableRow_TableCell", "data-column-id": column.id, "data-column-width": column.width, "data-column-width-used": column.width, "data-column-align": column.align, "data-column-order": column.order, "data-column-header": typeof column.header === 'string' ? column.header : 'component', "data-column-sortable": !!column.sortable, "data-column-filterable": !!column.filter, isFirst: column.id === columns[0].id, isLast: column.id === columns[columns.length - 1].id, onClick: (event) => onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(index, columnIdStr, event), sx: Object.assign(Object.assign({ width: column.width, minWidth: column.width, textAlign: column.align, justifyContent: column.align === 'right' ? 'flex-end' : 'flex-start', cursor: 'pointer' }, borderStyle), column.cellStyle), isSheetView: isSheetView }, { children: renderCell(column) }), `${column.id}-${colIndex}`));
28
+ return (_jsx(StyledCell, Object.assign({ component: "div", "data-testid": "TableRow_TableCell", "data-column-id": column.id, "data-column-width": column.width, "data-column-width-used": column.width, "data-column-align": column.align, "data-column-order": column.order, "data-column-header": typeof column.header === 'string' ? column.header : 'component', "data-column-sortable": !!column.sortable, "data-column-filterable": !!column.filter, isFirst: column.id === columns[0].id, isLast: column.id === columns[columns.length - 1].id, onClick: (event) => onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(index, columnIdStr, event), sx: Object.assign(Object.assign({ width: column.width, minWidth: column.width, textAlign: column.align, justifyContent: column.align === 'right' ? 'flex-end' : 'flex-start', cursor: onCellClick ? 'pointer' : 'default' }, borderStyle), column.cellStyle), isSheetView: isSheetView }, { children: renderCell(column) }), `${column.id}-${colIndex}`));
29
29
  }) })), [columns, row, index, selectedCell, selectedColumn, onCellClick, isLastRow]);
30
30
  return (_createElement(StyledTableRow, Object.assign({ "data-testid": "TableRow", onClick: rowProps === null || rowProps === void 0 ? void 0 : rowProps.onRowClick, showShadowHighlight: rowProps === null || rowProps === void 0 ? void 0 : rowProps.showShadowHighlight, showLoadedStyle: rowProps === null || rowProps === void 0 ? void 0 : rowProps.showLoadedStyle, component: "article" }, rowProps, { key: index, isSheetView: isSheetView }), content));
31
31
  }
@@ -431,6 +431,23 @@ export declare const APP_CODES: {
431
431
  };
432
432
  };
433
433
  };
434
+ paymentTechnology: {
435
+ code: string;
436
+ functions: {
437
+ view: {
438
+ code: string;
439
+ };
440
+ sandbox: {
441
+ code: string;
442
+ };
443
+ jsonApi: {
444
+ code: string;
445
+ };
446
+ reports: {
447
+ code: string;
448
+ };
449
+ };
450
+ };
434
451
  };
435
452
  };
436
453
  payouts: {
@@ -170,6 +170,10 @@ export const APP_CODES = {
170
170
  code: 'SUMMARY',
171
171
  } }),
172
172
  },
173
+ paymentTechnology: {
174
+ code: 'PAYMENT_TECHNOLOGY_WALLET',
175
+ functions: Object.assign({}, SERVICE_COMMON_FUNCTIONS),
176
+ },
173
177
  },
174
178
  },
175
179
  payouts: {
@@ -54,4 +54,9 @@ export declare const merchantsTableCellWidth: {
54
54
  readonly text: "180px";
55
55
  readonly sheet: "180px";
56
56
  };
57
+ readonly channels: {
58
+ readonly default: "100px";
59
+ readonly text: "120px";
60
+ readonly sheet: "120px";
61
+ };
57
62
  };
@@ -54,4 +54,9 @@ export const merchantsTableCellWidth = {
54
54
  text: '180px',
55
55
  sheet: '180px',
56
56
  },
57
+ channels: {
58
+ default: '100px',
59
+ text: '120px',
60
+ sheet: '120px',
61
+ },
57
62
  };
@@ -0,0 +1 @@
1
+ export type Day = 'sun' | 'mon' | 'tue' | 'wed' | 'thur' | 'fri' | 'sat';
@@ -0,0 +1 @@
1
+ export {};
@@ -23,3 +23,4 @@ export * from './analytics';
23
23
  export * from './refund';
24
24
  export * from './destination';
25
25
  export * from './account';
26
+ export * from './day';
@@ -23,3 +23,4 @@ export * from './analytics';
23
23
  export * from './refund';
24
24
  export * from './destination';
25
25
  export * from './account';
26
+ export * from './day';
@@ -0,0 +1,2 @@
1
+ import { Day } from '../types/index.js';
2
+ export declare function getOrderedWeekDays(startDay?: Day): string[];
@@ -0,0 +1,9 @@
1
+ export function getOrderedWeekDays(startDay = 'sun') {
2
+ const days = ['sun', 'mon', 'tue', 'wed', 'thur', 'fri', 'sat'];
3
+ const startIndex = days.indexOf(startDay.toLowerCase());
4
+ if (startIndex === -1) {
5
+ console.error(`${startDay} is not a valid day`);
6
+ return days;
7
+ }
8
+ return [...days.slice(startIndex), ...days.slice(0, startIndex)];
9
+ }
@@ -39,3 +39,4 @@ export * from './billing';
39
39
  export * from './toggleOptions';
40
40
  export * from './flag';
41
41
  export * from './encrypt';
42
+ export * from './day';
@@ -39,3 +39,4 @@ export * from './billing';
39
39
  export * from './toggleOptions';
40
40
  export * from './flag';
41
41
  export * from './encrypt';
42
+ export * from './day';
package/package.json CHANGED
@@ -1,7 +1,7 @@
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.0.243",
4
+ "version": "0.0.244",
5
5
  "testVersion": 1,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
@@ -131,4 +131,4 @@
131
131
  "publishConfig": {
132
132
  "registry": "https://registry.npmjs.org/"
133
133
  }
134
- }
134
+ }