@tap-payments/os-micro-frontend-shared 0.1.219 → 0.1.221
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/StatusButton/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/ActionCell.js +13 -10
- package/build/components/TableCells/CustomCells/ActionCell/components/ActionIconColumn.js +13 -10
- package/build/components/TableCells/CustomCells/ActionCell/hooks/useActionCell.d.ts +3 -1
- package/build/components/TableCells/CustomCells/type.d.ts +3 -1
- package/build/constants/assets.d.ts +1 -0
- package/build/constants/assets.js +1 -0
- package/build/constants/table/cell/authorizationTableCellWidth.d.ts +1 -1
- package/build/constants/table/cell/authorizationTableCellWidth.js +1 -1
- package/build/constants/table/cell/chargeTableCellWidth.d.ts +1 -1
- package/build/constants/table/cell/chargeTableCellWidth.js +1 -1
- package/build/constants/table/cell/destinationsTableCellWidth.d.ts +1 -1
- package/build/constants/table/cell/destinationsTableCellWidth.js +1 -1
- package/build/constants/table/cell/refundTableCellWidth.d.ts +1 -1
- package/build/constants/table/cell/refundTableCellWidth.js +1 -1
- package/build/types/table.d.ts +9 -0
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ export declare const CountBadge: import("@emotion/styled").StyledComponent<impor
|
|
|
21
21
|
}, {}, {}>;
|
|
22
22
|
export declare const StatusIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
23
23
|
variant: StatusButtonVariant;
|
|
24
|
-
icon?: "search" | "scheduled" | "paidOut" | "reversed" | "checked" | "
|
|
24
|
+
icon?: "search" | "scheduled" | "paidOut" | "reversed" | "checked" | "inProgress" | "initiated" | "abandoned" | "cancelled" | "reports" | "chevronDown" | "unAuthorized" | "unSettled" | "unCaptured" | "captured" | "authorized" | "openFlag" | "closedFlag" | "unauthenticated" | "authenticated" | "dashedChecked" | "deactivated" | undefined;
|
|
25
25
|
}, React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
26
26
|
export declare const StyledFilterName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
27
27
|
export declare const StyledDropdown: import("@emotion/styled").StyledComponent<import("../DropdownMenu").IProps & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
|
|
@@ -80,15 +80,18 @@ export const ActionCell = memo((_a) => {
|
|
|
80
80
|
pointerEvents: 'none',
|
|
81
81
|
})) }, { children: [_jsx(TransparentButton, Object.assign({ onClick: handleClick, "data-testid": "ActionCell_ActionsIconContainer_TransparentButton", "data-is-active": areThereAnyShownActions, sx: Object.assign({}, (!areThereAnyShownActions && {
|
|
82
82
|
pointerEvents: 'none',
|
|
83
|
-
})) }, { children: _jsx(AnimatePresence, Object.assign({ mode: "wait" }, { children: _jsx(ActionIconsVariants, { isAnyActionLoading: isAnyActionLoading, isAnyActionHasError: isAnyActionHasError, isAnyActionSuccessful: isAnyActionSuccessful, areThereAnyShownActions: areThereAnyShownActions }) })) })), renderDropdown ? (renderDropdown(anchorEl, setAnchorEl)) : (_jsxs(_Fragment, { children: [dropdownAction, areThereAnyShownActions && (_jsx(Dropdown, { style: { zIndex: 2000 }, open: open, onClose: handleClose, anchorEl: anchorEl, menuItems: filteredActions.map((action) =>
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
})) }, { children: _jsx(AnimatePresence, Object.assign({ mode: "wait" }, { children: _jsx(ActionIconsVariants, { isAnyActionLoading: isAnyActionLoading, isAnyActionHasError: isAnyActionHasError, isAnyActionSuccessful: isAnyActionSuccessful, areThereAnyShownActions: areThereAnyShownActions }) })) })), renderDropdown ? (renderDropdown(anchorEl, setAnchorEl)) : (_jsxs(_Fragment, { children: [dropdownAction, areThereAnyShownActions && (_jsx(Dropdown, { style: { zIndex: 2000 }, open: open, onClose: handleClose, anchorEl: anchorEl, menuItems: filteredActions.map((action) => {
|
|
84
|
+
var _a;
|
|
85
|
+
return (Object.assign(Object.assign({}, action), { onClick: (e) => {
|
|
86
|
+
var _a;
|
|
87
|
+
(_a = action === null || action === void 0 ? void 0 : action.onClick) === null || _a === void 0 ? void 0 : _a.call(action, e);
|
|
88
|
+
if (!action.hasActionMenu) {
|
|
89
|
+
handleClose();
|
|
90
|
+
}
|
|
91
|
+
}, onRightClick: (e) => {
|
|
92
|
+
var _a;
|
|
93
|
+
(_a = action === null || action === void 0 ? void 0 : action.onRightClick) === null || _a === void 0 ? void 0 : _a.call(action, e);
|
|
87
94
|
handleClose();
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
var _a;
|
|
91
|
-
(_a = action === null || action === void 0 ? void 0 : action.onRightClick) === null || _a === void 0 ? void 0 : _a.call(action, e);
|
|
92
|
-
handleClose();
|
|
93
|
-
}, icon: (_jsx(ActionIcon, { icon: action.icon, src: actionIcons[action.icon], initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 } }, `action.label-${action.label.trim()}`)) }))) }))] }))] }))] }))] })) })));
|
|
95
|
+
}, icon: action.customIcon || (_jsx(ActionIcon, { icon: action.icon, src: (_a = action.iconSrc) !== null && _a !== void 0 ? _a : (action.icon && actionIcons[action.icon]), initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 } }, `action.label-${action.label.trim()}`)) }));
|
|
96
|
+
}) }))] }))] }))] }))] })) })));
|
|
94
97
|
});
|
|
@@ -33,16 +33,19 @@ function ActionIconColumn(_a) {
|
|
|
33
33
|
pointerEvents: 'none',
|
|
34
34
|
})) }, { children: [_jsx(TransparentButton, Object.assign({ onClick: handleClick, "data-testid": "ActionIconColumn_ActionsIconContainer_TransparentButton", "data-is-active": areThereAnyShownActions, sx: Object.assign({}, (!areThereAnyShownActions && {
|
|
35
35
|
pointerEvents: 'none',
|
|
36
|
-
})) }, { children: _jsx(AnimatePresence, Object.assign({ mode: "wait" }, { children: _jsx(ActionIconsVariants, { isAnyActionLoading: isAnyActionLoading, isAnyActionHasError: isAnyActionHasError, isAnyActionSuccessful: isAnyActionSuccessful, areThereAnyShownActions: areThereAnyShownActions }) })) })), renderDropdown ? (renderDropdown(anchorEl, setAnchorEl)) : (_jsxs(_Fragment, { children: [dropdownAction, areThereAnyShownActions && (_jsx(Dropdown, { style: { zIndex: 2000 }, open: open, onClose: handleClose, anchorEl: anchorEl, menuItems: filteredActions.map((action) =>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
})) }, { children: _jsx(AnimatePresence, Object.assign({ mode: "wait" }, { children: _jsx(ActionIconsVariants, { isAnyActionLoading: isAnyActionLoading, isAnyActionHasError: isAnyActionHasError, isAnyActionSuccessful: isAnyActionSuccessful, areThereAnyShownActions: areThereAnyShownActions }) })) })), renderDropdown ? (renderDropdown(anchorEl, setAnchorEl)) : (_jsxs(_Fragment, { children: [dropdownAction, areThereAnyShownActions && (_jsx(Dropdown, { style: { zIndex: 2000 }, open: open, onClose: handleClose, anchorEl: anchorEl, menuItems: filteredActions.map((action) => {
|
|
37
|
+
var _a;
|
|
38
|
+
return (Object.assign(Object.assign({}, action), { onClick: (e) => {
|
|
39
|
+
var _a;
|
|
40
|
+
(_a = action === null || action === void 0 ? void 0 : action.onClick) === null || _a === void 0 ? void 0 : _a.call(action, e);
|
|
41
|
+
if (!action.hasActionMenu) {
|
|
42
|
+
handleClose();
|
|
43
|
+
}
|
|
44
|
+
}, onRightClick: (e) => {
|
|
45
|
+
var _a;
|
|
46
|
+
(_a = action === null || action === void 0 ? void 0 : action.onRightClick) === null || _a === void 0 ? void 0 : _a.call(action, e);
|
|
40
47
|
handleClose();
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
var _a;
|
|
44
|
-
(_a = action === null || action === void 0 ? void 0 : action.onRightClick) === null || _a === void 0 ? void 0 : _a.call(action, e);
|
|
45
|
-
handleClose();
|
|
46
|
-
}, icon: (_jsx(ActionIcon, { icon: action.icon, src: actionIcons[action.icon], initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 } }, `action.label-${action.label.trim()}`)) }))) }))] }))] })) })) })));
|
|
48
|
+
}, icon: action.customIcon || (_jsx(ActionIcon, { icon: action.icon, src: (_a = action.iconSrc) !== null && _a !== void 0 ? _a : (action.icon && actionIcons[action.icon]), initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 } }, `action.label-${action.label.trim()}`)) }));
|
|
49
|
+
}) }))] }))] })) })) })));
|
|
47
50
|
}
|
|
48
51
|
export default memo(ActionIconColumn);
|
|
@@ -13,12 +13,14 @@ export declare function useActionCell({ actions, isDropdownShown, onCloseDropdow
|
|
|
13
13
|
label: string;
|
|
14
14
|
onClick: (e: React.MouseEvent<HTMLLIElement, MouseEvent>) => void;
|
|
15
15
|
onRightClick?: ((e: React.MouseEvent<HTMLLIElement, MouseEvent>) => void) | undefined;
|
|
16
|
-
icon
|
|
16
|
+
icon?: "brand" | "users" | "cancel" | "reverse" | "refund" | "destination" | "capture" | "flag" | "dispute" | "void" | "clock" | "invoice" | "clipboard" | "viewApi" | "viewReceipt" | undefined;
|
|
17
17
|
isLoading?: boolean | undefined;
|
|
18
18
|
isError?: boolean | undefined;
|
|
19
19
|
isSuccess?: boolean | undefined;
|
|
20
20
|
isShown?: boolean | undefined;
|
|
21
21
|
hasActionMenu?: boolean | undefined;
|
|
22
|
+
iconSrc?: string | undefined;
|
|
23
|
+
customIcon?: React.ReactNode;
|
|
22
24
|
}[];
|
|
23
25
|
isAnyActionLoading: boolean;
|
|
24
26
|
isAnyActionHasError: boolean;
|
|
@@ -39,12 +39,14 @@ export interface ActionCellProps extends TableCellProps {
|
|
|
39
39
|
label: string;
|
|
40
40
|
onClick: (e: React.MouseEvent<HTMLLIElement, MouseEvent>) => void;
|
|
41
41
|
onRightClick?: (e: React.MouseEvent<HTMLLIElement, MouseEvent>) => void;
|
|
42
|
-
icon
|
|
42
|
+
icon?: ActionType;
|
|
43
43
|
isLoading?: boolean;
|
|
44
44
|
isError?: boolean;
|
|
45
45
|
isSuccess?: boolean;
|
|
46
46
|
isShown?: boolean;
|
|
47
47
|
hasActionMenu?: boolean;
|
|
48
|
+
iconSrc?: string;
|
|
49
|
+
customIcon?: React.ReactNode;
|
|
48
50
|
}>;
|
|
49
51
|
flagTooltip?: React.ReactNode;
|
|
50
52
|
flagsCount?: number;
|
|
@@ -563,3 +563,4 @@ export const activeGreenIcon = `${lightUrl}/activeGreenIcon.svg`;
|
|
|
563
563
|
export const inActiveGreyIcon = `${lightUrl}/inActiveGreyIcon.svg`;
|
|
564
564
|
export const terminalLinkVideo = `${videosUrl}/terminal_link.mp4`;
|
|
565
565
|
export const bluePlusIcon = `${lightUrl}/bluePlusIcon.svg`;
|
|
566
|
+
export const blackSettingsVariant2Icon = `${lightUrl}/blackSettingsVariant2Icon.svg`;
|
package/build/types/table.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { TableHeadProps } from '@mui/material/TableHead';
|
|
|
5
5
|
import { TableRowProps } from '@mui/material/TableRow';
|
|
6
6
|
import { DragControls } from 'framer-motion';
|
|
7
7
|
import { CustomColumnFilterProps } from '../components/VirtualTables';
|
|
8
|
+
import { ActionCellProps } from '../components/index.js';
|
|
8
9
|
import { Country } from './appConfig';
|
|
9
10
|
import { SortingOrder } from './sort';
|
|
10
11
|
export interface TableFilters<T> {
|
|
@@ -152,3 +153,11 @@ export type IColumnFilter = ({
|
|
|
152
153
|
isOnlyOneFilter?: boolean;
|
|
153
154
|
wrapperSx?: SxProps;
|
|
154
155
|
} & (IColumnFilterList | IColumnFilterInputs | IColumnFilterCustom));
|
|
156
|
+
type ActionCellActionProps = Exclude<ActionCellProps['actions'], undefined>[number];
|
|
157
|
+
export interface TableNavigation {
|
|
158
|
+
label: string;
|
|
159
|
+
onClick: (e: React.MouseEvent<HTMLLIElement, MouseEvent>) => void;
|
|
160
|
+
onRightClick: (e: React.MouseEvent<HTMLLIElement, MouseEvent>) => void;
|
|
161
|
+
icon?: ActionCellActionProps['icon'];
|
|
162
|
+
}
|
|
163
|
+
export {};
|
package/package.json
CHANGED