@tap-payments/os-micro-frontend-shared 0.1.109 → 0.1.110-test.2

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 (27) hide show
  1. package/build/components/AmountStatusChip/AmountStatusChip.js +1 -1
  2. package/build/components/StatusChip/style.d.ts +1 -0
  3. package/build/components/StatusChip/style.js +3 -4
  4. package/build/components/StatusChip/type.d.ts +1 -0
  5. package/build/components/TableCells/SheetViewCells/PaymentAgreementCell/PaymentAgreementCell.d.ts +13 -0
  6. package/build/components/TableCells/SheetViewCells/PaymentAgreementCell/PaymentAgreementCell.js +26 -0
  7. package/build/components/TableCells/SheetViewCells/PaymentAgreementCell/index.d.ts +1 -0
  8. package/build/components/TableCells/SheetViewCells/PaymentAgreementCell/index.js +1 -0
  9. package/build/components/TableCells/SheetViewCells/index.d.ts +1 -0
  10. package/build/components/TableCells/SheetViewCells/index.js +1 -0
  11. package/build/components/TableCells/index.d.ts +1 -0
  12. package/build/components/TableCells/index.js +1 -0
  13. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableLoading.js +1 -1
  14. package/build/constants/table/cell/authorizationTableCellWidth.d.ts +2 -2
  15. package/build/constants/table/cell/authorizationTableCellWidth.js +2 -2
  16. package/build/constants/table/cell/chargeTableCellWidth.d.ts +2 -2
  17. package/build/constants/table/cell/chargeTableCellWidth.js +2 -2
  18. package/build/constants/table/cell/destinationsTableCellWidth.d.ts +3 -3
  19. package/build/constants/table/cell/destinationsTableCellWidth.js +3 -3
  20. package/build/constants/table/cell/merchantsTableCellWidth.d.ts +1 -1
  21. package/build/constants/table/cell/merchantsTableCellWidth.js +1 -1
  22. package/build/constants/table/cell/refundTableCellWidth.d.ts +3 -3
  23. package/build/constants/table/cell/refundTableCellWidth.js +3 -3
  24. package/build/types/brand.d.ts +62 -0
  25. package/build/utils/object.d.ts +0 -1
  26. package/build/utils/object.js +3 -4
  27. package/package.json +3 -3
@@ -14,6 +14,6 @@ import { memo } from 'react';
14
14
  import { AmountLabel, StyledAmountStatusChip } from './style';
15
15
  function AmountStatusChip(_a) {
16
16
  var { amount, currency } = _a, rest = __rest(_a, ["amount", "currency"]);
17
- return (_jsxs(StyledAmountStatusChip, Object.assign({ expandDirection: "left" }, rest, { children: [currency && _jsx(AmountLabel, { children: currency }), amount] })));
17
+ return (_jsxs(StyledAmountStatusChip, Object.assign({ disableAnimation: true, expandDirection: "left" }, rest, { children: [currency && _jsx(AmountLabel, { children: currency }), amount] })));
18
18
  }
19
19
  export default memo(AmountStatusChip);
@@ -8,6 +8,7 @@ export declare const ChipStyled: import("@emotion/styled").StyledComponent<impor
8
8
  disabled?: boolean | undefined;
9
9
  padding?: string | undefined;
10
10
  unknownText?: string | undefined;
11
+ minWidth?: string | undefined;
11
12
  maxWidth?: string | undefined;
12
13
  isSelected?: boolean | undefined;
13
14
  copyText?: string | undefined;
@@ -1,9 +1,9 @@
1
1
  import Box from '@mui/material/Box';
2
2
  import { styled } from '@mui/material/styles';
3
3
  export const ChipStyled = styled(Box, {
4
- shouldForwardProp: (prop) => !['textColor', 'bgColor', 'borderColor', 'disabled', 'padding', 'maxWidth', 'isSelected', 'disableAnimation'].includes(prop),
5
- })(({ theme, isSelected, textColor = theme.palette.text.primary, bgColor = '#EFF1F2', borderColor = '#EFF1F2', disabled = false, padding, maxWidth, disableAnimation, }) => {
6
- return Object.assign(Object.assign({ display: 'flex', justifyContent: 'center', alignItems: 'center', gap: '4px', height: '18px', padding: padding || '0px 9.5px', borderRadius: '30px', border: `1px solid ${borderColor}`, backgroundColor: bgColor, color: textColor, cursor: disabled ? 'not-allowed' : 'pointer', opacity: disabled ? 0.5 : 1, whiteSpace: 'nowrap', fontSize: '11px', minWidth: '67px', maxWidth: maxWidth || 'none', width: 'fit-content', overflow: 'hidden', textOverflow: maxWidth ? 'ellipsis' : 'unset', boxSizing: 'border-box' }, (isSelected && {
4
+ shouldForwardProp: (prop) => !['textColor', 'bgColor', 'borderColor', 'disabled', 'minWidth', 'padding', 'maxWidth', 'isSelected', 'disableAnimation'].includes(prop),
5
+ })(({ theme, isSelected, textColor = theme.palette.text.primary, bgColor = '#EFF1F2', borderColor = '#EFF1F2', disabled = false, padding, minWidth, maxWidth, disableAnimation, }) => {
6
+ return Object.assign(Object.assign({ display: 'flex', justifyContent: 'center', alignItems: 'center', gap: '4px', height: '18px', padding: padding || '0px 9.5px', borderRadius: '30px', border: `1px solid ${borderColor}`, backgroundColor: bgColor, color: textColor, cursor: disabled ? 'not-allowed' : 'pointer', opacity: disabled ? 0.5 : 1, whiteSpace: 'nowrap', fontSize: '11px', minWidth: minWidth || '67px', maxWidth: maxWidth || 'none', width: 'fit-content', overflow: 'hidden', textOverflow: maxWidth ? 'ellipsis' : 'unset', boxSizing: 'border-box' }, (isSelected && {
7
7
  boxShadow: 'white 7px 0px 8px 2px',
8
8
  })), (disableAnimation && {
9
9
  transition: 'none !important',
@@ -21,7 +21,6 @@ export const Wrapper = styled(Box)(() => ({
21
21
  alignItems: 'center',
22
22
  justifyContent: 'center',
23
23
  gap: '4px',
24
- minWidth: 46,
25
24
  textAlign: 'center',
26
25
  }));
27
26
  export const CopyWrapper = styled(Box)(() => ({
@@ -7,6 +7,7 @@ export type ChipProps = PropsWithChildren<{
7
7
  disabled?: boolean;
8
8
  padding?: string;
9
9
  unknownText?: string;
10
+ minWidth?: string;
10
11
  maxWidth?: string;
11
12
  isSelected?: boolean;
12
13
  copyText?: string;
@@ -0,0 +1,13 @@
1
+ import { StatusChipWithCopyProps } from '../../../StatusChipWithCopy';
2
+ interface PaymentAgreementCellProps extends Omit<StatusChipWithCopyProps, 'chipIndex'> {
3
+ type?: keyof typeof paymentAgreementTypes;
4
+ count?: number;
5
+ }
6
+ declare const paymentAgreementTypes: {
7
+ SAVED_CARD: string;
8
+ ORDER: string;
9
+ SUBSCRIPTION: string;
10
+ INSTALLMENT: string;
11
+ };
12
+ declare function PaymentAgreementCell({ type, count, ...props }: PaymentAgreementCellProps): import("react/jsx-runtime").JSX.Element;
13
+ export default PaymentAgreementCell;
@@ -0,0 +1,26 @@
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, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { Box } from '@mui/material';
14
+ import { StatusChipWithCopy } from '../../../index.js';
15
+ const paymentAgreementTypes = {
16
+ SAVED_CARD: 'Card Agreement',
17
+ ORDER: 'Order',
18
+ SUBSCRIPTION: 'Subscription',
19
+ INSTALLMENT: 'Installment',
20
+ };
21
+ function PaymentAgreementCell(_a) {
22
+ var { type, count } = _a, props = __rest(_a, ["type", "count"]);
23
+ const countText = count === null || count === void 0 ? void 0 : count.toString();
24
+ return (_jsxs(Box, Object.assign({ sx: { display: 'flex', flexDirection: 'row', gap: '4px' } }, { children: [_jsx(StatusChipWithCopy, Object.assign({ copyText: type, unknownText: "noPaymentAgreement" }, props, { chipIndex: 0 }, { children: type ? paymentAgreementTypes[type] : type })), countText && (_jsx(StatusChipWithCopy, Object.assign({ copyText: countText }, props, { chipIndex: 1, minWidth: "38px" }, { children: countText })))] })));
25
+ }
26
+ export default PaymentAgreementCell;
@@ -0,0 +1 @@
1
+ export { default as PaymentAgreementCell } from './PaymentAgreementCell';
@@ -0,0 +1 @@
1
+ export { default as PaymentAgreementCell } from './PaymentAgreementCell';
@@ -0,0 +1 @@
1
+ export * from './PaymentAgreementCell';
@@ -0,0 +1 @@
1
+ export * from './PaymentAgreementCell';
@@ -1,3 +1,4 @@
1
1
  export { default as TableCell } from './TableCell';
2
2
  export * from './CustomCells';
3
+ export * from './SheetViewCells';
3
4
  export * from './type';
@@ -1,3 +1,4 @@
1
1
  export { default as TableCell } from './TableCell';
2
2
  export * from './CustomCells';
3
+ export * from './SheetViewCells';
3
4
  export * from './type';
@@ -14,7 +14,7 @@ const Wrapper = styled('section')(({ isLoaded = false, isPinned = false }) => ({
14
14
  height: '100%',
15
15
  maxHeight: '100%',
16
16
  }));
17
- function SheetViewTableLoading({ columns, isLoaded = false, animationType, isLoading = false, rowsCount, isPinned = false, }) {
17
+ function SheetViewTableLoading({ columns, isLoaded = false, animationType, isLoading = false, rowsCount = 13, isPinned = false, }) {
18
18
  const [maxAllowedRows, setMaxAllowedRows] = useState(() => {
19
19
  return rowsCount || Math.min(calculateMaxAllowedRows(isLoaded, isLoading), 15);
20
20
  });
@@ -82,7 +82,7 @@ export declare const authorizationTableCellWidth: {
82
82
  readonly merchant: {
83
83
  readonly default: "110px";
84
84
  readonly text: "150px";
85
- readonly sheet: "215px";
85
+ readonly sheet: "138px";
86
86
  };
87
87
  readonly charge: {
88
88
  readonly default: "150px";
@@ -207,7 +207,7 @@ export declare const authorizationTableCellWidth: {
207
207
  readonly eci: {
208
208
  readonly default: "150px";
209
209
  readonly text: "150px";
210
- readonly sheet: "100px";
210
+ readonly sheet: "72px";
211
211
  };
212
212
  readonly acquirer_response: {
213
213
  readonly default: "70px";
@@ -82,7 +82,7 @@ export const authorizationTableCellWidth = {
82
82
  merchant: {
83
83
  default: '110px',
84
84
  text: '150px',
85
- sheet: '215px',
85
+ sheet: '138px',
86
86
  },
87
87
  charge: {
88
88
  default: '150px',
@@ -207,7 +207,7 @@ export const authorizationTableCellWidth = {
207
207
  eci: {
208
208
  default: '150px',
209
209
  text: '150px',
210
- sheet: '100px',
210
+ sheet: '72px',
211
211
  },
212
212
  acquirer_response: {
213
213
  default: '70px',
@@ -92,7 +92,7 @@ export declare const chargeTableCellWidth: {
92
92
  readonly eci: {
93
93
  readonly default: "150px";
94
94
  readonly text: "150px";
95
- readonly sheet: "100px";
95
+ readonly sheet: "72px";
96
96
  };
97
97
  readonly amount: {
98
98
  readonly default: "170px";
@@ -132,7 +132,7 @@ export declare const chargeTableCellWidth: {
132
132
  readonly merchant: {
133
133
  readonly default: "100px";
134
134
  readonly text: "150px";
135
- readonly sheet: "215px";
135
+ readonly sheet: "138px";
136
136
  };
137
137
  readonly charge: {
138
138
  readonly default: "150px";
@@ -92,7 +92,7 @@ export const chargeTableCellWidth = {
92
92
  eci: {
93
93
  default: '150px',
94
94
  text: '150px',
95
- sheet: '100px',
95
+ sheet: '72px',
96
96
  },
97
97
  amount: {
98
98
  default: '170px',
@@ -132,7 +132,7 @@ export const chargeTableCellWidth = {
132
132
  merchant: {
133
133
  default: '100px',
134
134
  text: '150px',
135
- sheet: '215px',
135
+ sheet: '138px',
136
136
  },
137
137
  charge: {
138
138
  default: '150px',
@@ -62,7 +62,7 @@ export declare const destinationsTableCellWidth: {
62
62
  readonly payment_agreement: {
63
63
  readonly default: "50px";
64
64
  readonly text: "250px";
65
- readonly sheet: "230px";
65
+ readonly sheet: "165px";
66
66
  };
67
67
  readonly amount: {
68
68
  readonly default: "195px";
@@ -82,7 +82,7 @@ export declare const destinationsTableCellWidth: {
82
82
  readonly merchant: {
83
83
  readonly default: "100px";
84
84
  readonly text: "150px";
85
- readonly sheet: "215px";
85
+ readonly sheet: "138px";
86
86
  };
87
87
  readonly actions: {
88
88
  readonly default: "100px";
@@ -157,7 +157,7 @@ export declare const destinationsTableCellWidth: {
157
157
  readonly eci: {
158
158
  readonly default: "150px";
159
159
  readonly text: "150px";
160
- readonly sheet: "100px";
160
+ readonly sheet: "72px";
161
161
  };
162
162
  readonly payout_status: {
163
163
  readonly default: "120px";
@@ -62,7 +62,7 @@ export const destinationsTableCellWidth = {
62
62
  payment_agreement: {
63
63
  default: '50px',
64
64
  text: '250px',
65
- sheet: '230px',
65
+ sheet: '165px',
66
66
  },
67
67
  amount: {
68
68
  default: '195px',
@@ -82,7 +82,7 @@ export const destinationsTableCellWidth = {
82
82
  merchant: {
83
83
  default: '100px',
84
84
  text: '150px',
85
- sheet: '215px',
85
+ sheet: '138px',
86
86
  },
87
87
  actions: {
88
88
  default: '100px',
@@ -157,7 +157,7 @@ export const destinationsTableCellWidth = {
157
157
  eci: {
158
158
  default: '150px',
159
159
  text: '150px',
160
- sheet: '100px',
160
+ sheet: '72px',
161
161
  },
162
162
  payout_status: {
163
163
  default: '120px',
@@ -72,6 +72,6 @@ export declare const merchantsTableCellWidth: {
72
72
  readonly merchant: {
73
73
  readonly default: "175px";
74
74
  readonly text: "180px";
75
- readonly sheet: "180px";
75
+ readonly sheet: "138px";
76
76
  };
77
77
  };
@@ -72,6 +72,6 @@ export const merchantsTableCellWidth = {
72
72
  merchant: {
73
73
  default: '175px',
74
74
  text: '180px',
75
- sheet: '180px',
75
+ sheet: '138px',
76
76
  },
77
77
  };
@@ -47,7 +47,7 @@ export declare const refundTableCellWidth: {
47
47
  readonly payment_agreement: {
48
48
  readonly default: "50px";
49
49
  readonly text: "200px";
50
- readonly sheet: "230px";
50
+ readonly sheet: "165px";
51
51
  };
52
52
  readonly payment_initiated: {
53
53
  readonly default: "150px";
@@ -87,7 +87,7 @@ export declare const refundTableCellWidth: {
87
87
  readonly eci: {
88
88
  readonly default: "150px";
89
89
  readonly text: "150px";
90
- readonly sheet: "100px";
90
+ readonly sheet: "72px";
91
91
  };
92
92
  readonly amount: {
93
93
  readonly default: "195px";
@@ -122,7 +122,7 @@ export declare const refundTableCellWidth: {
122
122
  readonly merchant: {
123
123
  readonly default: "100px";
124
124
  readonly text: "150px";
125
- readonly sheet: "215px";
125
+ readonly sheet: "138px";
126
126
  };
127
127
  readonly reference: {
128
128
  readonly default: "95px";
@@ -47,7 +47,7 @@ export const refundTableCellWidth = {
47
47
  payment_agreement: {
48
48
  default: '50px',
49
49
  text: '200px',
50
- sheet: '230px',
50
+ sheet: '165px',
51
51
  },
52
52
  payment_initiated: {
53
53
  default: '150px',
@@ -87,7 +87,7 @@ export const refundTableCellWidth = {
87
87
  eci: {
88
88
  default: '150px',
89
89
  text: '150px',
90
- sheet: '100px',
90
+ sheet: '72px',
91
91
  },
92
92
  amount: {
93
93
  default: '195px',
@@ -122,7 +122,7 @@ export const refundTableCellWidth = {
122
122
  merchant: {
123
123
  default: '100px',
124
124
  text: '150px',
125
- sheet: '215px',
125
+ sheet: '138px',
126
126
  },
127
127
  reference: {
128
128
  default: '95px',
@@ -28,6 +28,68 @@ export interface Brand {
28
28
  name: TextAndLang[];
29
29
  logo: string;
30
30
  entities: (EntityDetails & Entity)[];
31
+ activities: Array<{
32
+ id: string;
33
+ code: string;
34
+ name: Record<string, string>;
35
+ isic_code: string;
36
+ mcc_value: {
37
+ id: string;
38
+ mcc: string;
39
+ name: Record<string, string>;
40
+ description: string;
41
+ created: number;
42
+ };
43
+ }>;
44
+ operations: {
45
+ sales: {
46
+ id: string;
47
+ name: TextAndLang[];
48
+ range: {
49
+ from: number;
50
+ to: number;
51
+ };
52
+ sub: Array<{
53
+ id: string;
54
+ name: TextAndLang[];
55
+ range: {
56
+ from: number;
57
+ to: number;
58
+ };
59
+ }>;
60
+ };
61
+ customer_base: {
62
+ id: string;
63
+ name: TextAndLang[];
64
+ locations: Array<{
65
+ id: string;
66
+ code: string;
67
+ name: TextAndLang[];
68
+ }>;
69
+ };
70
+ };
71
+ segment: {
72
+ team: {
73
+ id: string;
74
+ name: TextAndLang[];
75
+ };
76
+ location_type: {
77
+ id: string;
78
+ name: TextAndLang[];
79
+ };
80
+ profit_type: {
81
+ id: string;
82
+ name: TextAndLang[];
83
+ tech_type: {
84
+ id: string;
85
+ name: TextAndLang[];
86
+ };
87
+ };
88
+ };
89
+ business_id: string;
90
+ channel_services: Channel[];
91
+ physical_store_available: boolean;
92
+ data_state: string;
31
93
  }
32
94
  export interface BrandDetails {
33
95
  id: string;
@@ -1,7 +1,6 @@
1
1
  export declare function removeUndefinedValues(obj: Record<string, unknown>): {
2
2
  [k: string]: unknown;
3
3
  };
4
- export declare const isEmptyValue: (value: unknown) => boolean;
5
4
  export declare function removeUndefinedArrayValues(obj: Record<string, unknown>): {
6
5
  [k: string]: unknown;
7
6
  };
@@ -1,15 +1,14 @@
1
1
  export function removeUndefinedValues(obj) {
2
2
  return Object.fromEntries(Object.entries(obj).filter(([, value]) => value !== undefined));
3
3
  }
4
- export const isEmptyValue = (value) => value === undefined || value === null || value === '';
5
4
  export function removeUndefinedArrayValues(obj) {
6
5
  return Object.fromEntries(Object.entries(obj).filter(([, value]) => {
7
6
  if (Array.isArray(value)) {
8
- return value.length > 0 && (value === null || value === void 0 ? void 0 : value.some((v) => !isEmptyValue(v)));
7
+ return value.length > 0 && (value === null || value === void 0 ? void 0 : value.some((v) => v !== undefined && v !== null && v !== ''));
9
8
  }
10
9
  if (typeof value === 'object') {
11
- return Object.values(value || {}).some((v) => !isEmptyValue(v));
10
+ return Object.values(value || {}).some((v) => v !== undefined && v !== null && v !== '');
12
11
  }
13
- return !isEmptyValue(value);
12
+ return !!value;
14
13
  }));
15
14
  }
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.109",
5
- "testVersion": 0,
4
+ "version": "0.1.110-test.2",
5
+ "testVersion": 2,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",
@@ -136,4 +136,4 @@
136
136
  "publishConfig": {
137
137
  "registry": "https://registry.npmjs.org/"
138
138
  }
139
- }
139
+ }