@tap-payments/os-micro-frontend-shared 0.0.28 → 0.0.31-dev-shared-migration-v1
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/components/VirtualTable/components/index.d.ts +1 -1
- package/build/components/VirtualTable/components/index.js +1 -1
- package/build/components/VirtualTable/index.d.ts +1 -0
- package/build/components/VirtualTable/index.js +1 -0
- package/build/components/index.d.ts +1 -1
- package/build/components/index.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/hooks/index.d.ts +0 -1
- package/build/hooks/index.js +0 -1
- 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/index.d.ts +0 -1
- package/build/utils/index.js +0 -1
- 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 -5
- package/build/hooks/useQueryCancel.d.ts +0 -3
- package/build/hooks/useQueryCancel.js +0 -15
- package/build/utils/reactQuery.d.ts +0 -3
- package/build/utils/reactQuery.js +0 -18
package/build/hooks/index.js
CHANGED
|
@@ -7,6 +7,5 @@ export * from './useCheckInternetConnection';
|
|
|
7
7
|
export * from './useCheckUserLoggedIn';
|
|
8
8
|
export * from './useDelayedUpdate';
|
|
9
9
|
export * from './useIsParameterSelected';
|
|
10
|
-
export * from './useQueryCancel';
|
|
11
10
|
export * from './useStickyHeaderShadow';
|
|
12
11
|
export * from './useThemeMode';
|
package/build/theme/palette.js
CHANGED
package/build/types/cell.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { authenticationsTableCellWidth, authorizationTableCellWidth, walletTableCellWidth, walletStatementTableCellWidth, walletDetailsTableCellWidth, topupsTableCellWidth, tokensTableCellWidth, refundTableCellWidth, protectChargesTableCellWidth, payoutsTableCellWidth, ordersTableCellWidth, invoicesTableCellWidth, leadsTableCellWidth, intentsTableCellWidth, chargeTableCellWidth, protectAuthorizationsTableCellWidth, destinationsTableCellWidth, merchantsTableCellWidth } from '../constants/index.js';
|
|
1
|
+
import { authenticationsTableCellWidth, authorizationTableCellWidth, walletTableCellWidth, walletStatementTableCellWidth, walletDetailsTableCellWidth, topupsTableCellWidth, tokensTableCellWidth, refundTableCellWidth, protectChargesTableCellWidth, payoutsTableCellWidth, ordersTableCellWidth, invoicesTableCellWidth, leadsTableCellWidth, intentsTableCellWidth, chargeTableCellWidth, protectAuthorizationsTableCellWidth, destinationsTableCellWidth, merchantsTableCellWidth, terminalsTableCellWidth } from '../constants/index.js';
|
|
2
2
|
import { IVirtualTable } from './index.js';
|
|
3
3
|
export type AuthenticationsTableCellID = keyof typeof authenticationsTableCellWidth;
|
|
4
4
|
export type AuthorizationTableCellID = keyof typeof authorizationTableCellWidth;
|
|
@@ -18,6 +18,7 @@ export type ChargeTableCellID = keyof typeof chargeTableCellWidth;
|
|
|
18
18
|
export type ProtectAuthorizationsTableCellID = keyof typeof protectAuthorizationsTableCellWidth;
|
|
19
19
|
export type DestinationsTableCellID = keyof typeof destinationsTableCellWidth;
|
|
20
20
|
export type MerchantsTableCellID = keyof typeof merchantsTableCellWidth;
|
|
21
|
+
export type TerminalsTableCellID = keyof typeof terminalsTableCellWidth;
|
|
21
22
|
export type TableCellWidthProps = {
|
|
22
23
|
tableMode: NonNullable<IVirtualTable['tableMode']>;
|
|
23
24
|
} & ({
|
|
@@ -74,4 +75,7 @@ export type TableCellWidthProps = {
|
|
|
74
75
|
} | {
|
|
75
76
|
table: 'merchants';
|
|
76
77
|
cellID: MerchantsTableCellID;
|
|
78
|
+
} | {
|
|
79
|
+
table: 'terminals';
|
|
80
|
+
cellID: TerminalsTableCellID;
|
|
77
81
|
});
|
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/index.d.ts
CHANGED
package/build/utils/index.js
CHANGED
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-dev-shared-migration-v1",
|
|
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",
|
|
@@ -90,7 +90,6 @@
|
|
|
90
90
|
"react-hot-toast": "^2.4.1",
|
|
91
91
|
"react-i18next": "^12.2.2",
|
|
92
92
|
"react-multi-date-picker": "^4.1.2",
|
|
93
|
-
"react-query": "^3.39.3",
|
|
94
93
|
"react-router-dom": "^6.14.2",
|
|
95
94
|
"react-virtualized-auto-sizer": "^1.0.20",
|
|
96
95
|
"react-window": "^1.8.9",
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { useCallback, useEffect } from 'react';
|
|
2
|
-
import { queryClient } from '../utils/index.js';
|
|
3
|
-
export const useQueryCancel = (name, type = 'query') => {
|
|
4
|
-
const cancel = useCallback(() => {
|
|
5
|
-
if (type === 'query') {
|
|
6
|
-
queryClient.cancelQueries(name);
|
|
7
|
-
}
|
|
8
|
-
}, [type, name]);
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
return () => {
|
|
11
|
-
cancel();
|
|
12
|
-
};
|
|
13
|
-
}, [cancel]);
|
|
14
|
-
return { cancel };
|
|
15
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { QueryClient } from 'react-query';
|
|
2
|
-
export const queryClient = new QueryClient({
|
|
3
|
-
defaultOptions: {
|
|
4
|
-
queries: {
|
|
5
|
-
retry: false,
|
|
6
|
-
refetchOnWindowFocus: false,
|
|
7
|
-
staleTime: 1000 * 60 * 3,
|
|
8
|
-
cacheTime: 1000 * 60 * 3,
|
|
9
|
-
},
|
|
10
|
-
},
|
|
11
|
-
});
|
|
12
|
-
export const removeQueries = (excludedKeys) => {
|
|
13
|
-
queryClient.removeQueries({
|
|
14
|
-
predicate: (query) => {
|
|
15
|
-
return !(excludedKeys === null || excludedKeys === void 0 ? void 0 : excludedKeys.includes(query.queryKey[0]));
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
};
|