@tap-payments/os-micro-frontend-shared 0.0.30 → 0.0.31
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.
- package/build/components/Chip/Chip.d.ts +4 -0
- package/build/components/Chip/Chip.js +19 -0
- package/build/components/Chip/GroupIconChip.d.ts +3 -0
- package/build/components/Chip/GroupIconChip.js +11 -0
- package/build/components/Chip/GroupIconChips.d.ts +3 -0
- package/build/components/Chip/GroupIconChips.js +10 -0
- package/build/components/Chip/index.d.ts +4 -0
- package/build/components/Chip/index.js +4 -0
- package/build/components/Chip/style.d.ts +293 -0
- package/build/components/Chip/style.js +78 -0
- package/build/components/Chip/type.d.ts +13 -0
- package/build/components/Chip/type.js +1 -0
- package/build/components/MultiSelectDropdownButton/MultiSelectDropdownButton.js +3 -3
- package/build/components/TableHeader_V2/FiltersRow.d.ts +2 -0
- package/build/components/TableHeader_V2/FiltersRow.js +5 -0
- package/build/components/TableHeader_V2/TableHeader.d.ts +4 -0
- package/build/components/TableHeader_V2/TableHeader.js +7 -0
- package/build/components/TableHeader_V2/components/StatusButtons/ChevronIcon.d.ts +2 -0
- package/build/components/TableHeader_V2/components/StatusButtons/ChevronIcon.js +16 -0
- package/build/components/TableHeader_V2/components/StatusButtons/StatusButton.d.ts +3 -0
- package/build/components/TableHeader_V2/components/StatusButtons/StatusButton.js +54 -0
- package/build/components/TableHeader_V2/components/StatusButtons/StatusButtons.d.ts +11 -0
- package/build/components/TableHeader_V2/components/StatusButtons/StatusButtons.js +38 -0
- package/build/components/TableHeader_V2/components/StatusButtons/constant.d.ts +24 -0
- package/build/components/TableHeader_V2/components/StatusButtons/constant.js +25 -0
- package/build/components/TableHeader_V2/components/StatusButtons/index.d.ts +3 -0
- package/build/components/TableHeader_V2/components/StatusButtons/index.js +3 -0
- package/build/components/TableHeader_V2/components/StatusButtons/style.d.ts +35 -0
- package/build/components/TableHeader_V2/components/StatusButtons/style.js +74 -0
- package/build/components/TableHeader_V2/components/StatusButtons/type.d.ts +22 -0
- package/build/components/TableHeader_V2/components/StatusButtons/type.js +1 -0
- package/build/components/TableHeader_V2/components/TableView/CustomViews.d.ts +13 -0
- package/build/components/TableHeader_V2/components/TableView/CustomViews.js +78 -0
- package/build/components/TableHeader_V2/components/TableView/DefaultViews.d.ts +13 -0
- package/build/components/TableHeader_V2/components/TableView/DefaultViews.js +22 -0
- package/build/components/TableHeader_V2/components/TableView/TableView.d.ts +12 -0
- package/build/components/TableHeader_V2/components/TableView/TableView.js +55 -0
- package/build/components/TableHeader_V2/components/TableView/index.d.ts +3 -0
- package/build/components/TableHeader_V2/components/TableView/index.js +3 -0
- package/build/components/TableHeader_V2/components/TableView/style.d.ts +24 -0
- package/build/components/TableHeader_V2/components/TableView/style.js +102 -0
- package/build/components/TableHeader_V2/components/index.d.ts +2 -0
- package/build/components/TableHeader_V2/components/index.js +2 -0
- package/build/components/TableHeader_V2/data.d.ts +5 -0
- package/build/components/TableHeader_V2/data.js +7 -0
- package/build/components/TableHeader_V2/index.d.ts +5 -0
- package/build/components/TableHeader_V2/index.js +5 -0
- package/build/components/TableHeader_V2/style.d.ts +21 -0
- package/build/components/TableHeader_V2/style.js +43 -0
- package/build/components/TableHeader_V2/type.d.ts +67 -0
- package/build/components/TableHeader_V2/type.js +8 -0
- package/build/components/VirtualTable/components/ColumnFilter/ColumnFilter.js +16 -10
- package/build/components/VirtualTable/components/ColumnFilter/Inputs/Inputs.js +66 -14
- package/build/components/VirtualTable/components/ColumnFilter/List/List.js +1 -1
- package/build/constants/api.d.ts +3 -0
- package/build/constants/api.js +3 -0
- package/build/constants/apps.d.ts +3 -0
- package/build/constants/apps.js +9 -1
- package/build/constants/assets.d.ts +8 -0
- package/build/constants/assets.js +8 -0
- package/build/constants/table/cell/index.d.ts +1 -0
- package/build/constants/table/cell/index.js +1 -0
- package/build/constants/table/cell/merchantsTableCellWidth.d.ts +6 -2
- package/build/constants/table/cell/merchantsTableCellWidth.js +6 -2
- package/build/constants/table/cell/terminalsTableCellWidth.d.ts +46 -0
- package/build/constants/table/cell/terminalsTableCellWidth.js +46 -0
- package/build/theme/palette.js +1 -0
- package/build/types/cell.d.ts +5 -1
- package/build/types/table.d.ts +17 -7
- package/build/utils/string.d.ts +1 -0
- package/build/utils/string.js +1 -0
- package/build/utils/table.js +3 -1
- package/package.json +4 -4
package/build/types/table.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { BoxProps } from '@mui/material/Box';
|
|
|
3
3
|
import { TableHeadProps } from '@mui/material/TableHead';
|
|
4
4
|
import { TableRowProps } from '@mui/material/TableRow';
|
|
5
5
|
import { DragControls } from 'framer-motion';
|
|
6
|
+
import { Country } from './appConfig';
|
|
6
7
|
import { SortingOrder } from './sort';
|
|
7
8
|
export interface TableFilters<T> {
|
|
8
9
|
order: string;
|
|
@@ -71,10 +72,13 @@ export interface IColumnFilterOption {
|
|
|
71
72
|
value: unknown;
|
|
72
73
|
setValue: (value: unknown) => void;
|
|
73
74
|
isDisabled?: boolean;
|
|
74
|
-
getInputValue: (key: string) => string;
|
|
75
|
-
isInputHasValue: boolean;
|
|
76
|
-
onClickReset: () => void;
|
|
75
|
+
getInputValue: (key: string, type?: string) => string;
|
|
76
|
+
isInputHasValue: (key: string, type?: string) => boolean;
|
|
77
|
+
onClickReset: (key: string, type?: string) => void;
|
|
77
78
|
}) => React.ReactNode;
|
|
79
|
+
type?: 'text' | 'phone';
|
|
80
|
+
countries?: Country[];
|
|
81
|
+
isCountriesLoading?: boolean;
|
|
78
82
|
}
|
|
79
83
|
export type IColumnListFilterOption = Omit<IColumnFilterOption, 'apiKey' | 'options'> & {
|
|
80
84
|
value: string;
|
|
@@ -88,6 +92,8 @@ export interface IColumnFilterList {
|
|
|
88
92
|
export interface IColumnFilterInputs {
|
|
89
93
|
type: 'inputs';
|
|
90
94
|
options?: IColumnFilterOption[];
|
|
95
|
+
countries?: Country[];
|
|
96
|
+
isCountriesLoading?: boolean;
|
|
91
97
|
}
|
|
92
98
|
export interface IColumnFilterCustom {
|
|
93
99
|
type: 'custom';
|
|
@@ -127,9 +133,13 @@ export interface IVirtualTable<R = any> {
|
|
|
127
133
|
};
|
|
128
134
|
dragControls?: DragControls;
|
|
129
135
|
}
|
|
130
|
-
export type
|
|
131
|
-
|
|
136
|
+
export type ColumnFilterValues = Record<string, string | string[] | {
|
|
137
|
+
phone: string;
|
|
138
|
+
country: Country | undefined;
|
|
139
|
+
}>;
|
|
140
|
+
export type IColumnFilter = ({
|
|
141
|
+
onConfirm?: (filterValues: ColumnFilterValues) => void;
|
|
132
142
|
onClear: (apiKeys: string[]) => void;
|
|
133
|
-
data?:
|
|
143
|
+
data?: ColumnFilterValues;
|
|
134
144
|
isOnlyOneFilter?: boolean;
|
|
135
|
-
} & (IColumnFilterList | IColumnFilterInputs | IColumnFilterCustom);
|
|
145
|
+
} & (IColumnFilterList | IColumnFilterInputs | IColumnFilterCustom));
|
package/build/utils/string.d.ts
CHANGED
|
@@ -6,3 +6,4 @@ export declare const generateUniqueUUID: () => `${string}-${string}-${string}-${
|
|
|
6
6
|
export declare const copyText: (text: string) => void;
|
|
7
7
|
export declare const capitalizeFirstLetter: (text: string) => string;
|
|
8
8
|
export declare const percentageToNumber: (percentageStr: string) => number;
|
|
9
|
+
export declare const maskValue: (value: string) => string;
|
package/build/utils/string.js
CHANGED
package/build/utils/table.js
CHANGED
|
@@ -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, } 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, } 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;
|
|
@@ -43,6 +43,8 @@ export const getCellWidth = ({ table, cellID, tableMode }) => {
|
|
|
43
43
|
return walletStatementTableCellWidth[cellID][tableMode];
|
|
44
44
|
case 'merchants':
|
|
45
45
|
return merchantsTableCellWidth[cellID][tableMode];
|
|
46
|
+
case 'terminals':
|
|
47
|
+
return terminalsTableCellWidth[cellID][tableMode];
|
|
46
48
|
default:
|
|
47
49
|
return '100px';
|
|
48
50
|
}
|
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.
|
|
4
|
+
"version": "0.0.31",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|
|
7
7
|
"module": "build/index.js",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"types": "./build/components/index.d.ts"
|
|
24
24
|
},
|
|
25
25
|
"./components/*": {
|
|
26
|
-
"import": "./build/components
|
|
27
|
-
"require": "./build/components
|
|
28
|
-
"types": "./build/components
|
|
26
|
+
"import": "./build/components/*/index.js",
|
|
27
|
+
"require": "./build/components/*/index.js",
|
|
28
|
+
"types": "./build/components/*/index.d.ts"
|
|
29
29
|
},
|
|
30
30
|
"./hooks": {
|
|
31
31
|
"import": "./build/hooks/index.js",
|