@tap-payments/os-micro-frontend-shared 0.0.306 → 0.0.307
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.
|
@@ -3,6 +3,6 @@ import type { ActionCellProps } from '../type';
|
|
|
3
3
|
type Props = Readonly<ActionCellProps> & {
|
|
4
4
|
onJsonViewClick?: () => void;
|
|
5
5
|
};
|
|
6
|
-
declare function ActionCell({ flag, actions, flagTooltip, flagsCount, dropdownAction, onCloseDropdown, isDropdownShown, row, showJsonViewer, isTextShown, showIdButton, rowId, onJsonViewClick, renderDropdown, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function ActionCell({ flag, actions, flagTooltip, flagsCount, dropdownAction, onCloseDropdown, isDropdownShown, row, showJsonViewer, isTextShown, showIdButton, rowId, onJsonViewClick, renderDropdown, render, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
declare const _default: React.MemoExoticComponent<typeof ActionCell>;
|
|
8
8
|
export default _default;
|
|
@@ -26,12 +26,12 @@ import { IDButton } from '../IDButton';
|
|
|
26
26
|
import { BadgeWrapper, IdButtonContainer, TextLabel, TransparentButton } from '../style';
|
|
27
27
|
function ActionCell(_a) {
|
|
28
28
|
var _b, _c;
|
|
29
|
-
var { flag, actions, flagTooltip, flagsCount, dropdownAction, onCloseDropdown, isDropdownShown = true, row, showJsonViewer = true, isTextShown, showIdButton = true, rowId, onJsonViewClick, renderDropdown } = _a, props = __rest(_a, ["flag", "actions", "flagTooltip", "flagsCount", "dropdownAction", "onCloseDropdown", "isDropdownShown", "row", "showJsonViewer", "isTextShown", "showIdButton", "rowId", "onJsonViewClick", "renderDropdown"]);
|
|
29
|
+
var { flag, actions, flagTooltip, flagsCount, dropdownAction, onCloseDropdown, isDropdownShown = true, row, showJsonViewer = true, isTextShown, showIdButton = true, rowId, onJsonViewClick, renderDropdown, render } = _a, props = __rest(_a, ["flag", "actions", "flagTooltip", "flagsCount", "dropdownAction", "onCloseDropdown", "isDropdownShown", "row", "showJsonViewer", "isTextShown", "showIdButton", "rowId", "onJsonViewClick", "renderDropdown", "render"]);
|
|
30
30
|
const { t } = useTranslation();
|
|
31
31
|
const { open, anchorEl, filteredActions, isAnyActionLoading, isAnyActionHasError, isAnyActionSuccessful, areThereAnyShownActions, handleClick, handleClose, setAnchorEl, } = useActionCell({ actions, isDropdownShown, onCloseDropdown, renderDropdown });
|
|
32
32
|
return (_jsx(TableCell, Object.assign({}, props, { sx: {
|
|
33
33
|
overflow: 'visible',
|
|
34
|
-
} }, { children: _jsxs(ActionCellContainer, Object.assign({ "data-testid": "ActionCell_ActionCellContainer" }, { children: [flag && (_jsx(_Fragment, { children: isTextShown ? (_jsx(Tooltip, Object.assign({ title: flagTooltip }, { children: _jsx(TextLabel, Object.assign({ "data-testid": "ActionCell_FlagLabel", sx: {
|
|
34
|
+
} }, { children: _jsxs(ActionCellContainer, Object.assign({ "data-testid": "ActionCell_ActionCellContainer" }, { children: [render && render, flag && (_jsx(_Fragment, { children: isTextShown ? (_jsx(Tooltip, Object.assign({ title: flagTooltip }, { children: _jsx(TextLabel, Object.assign({ "data-testid": "ActionCell_FlagLabel", sx: {
|
|
35
35
|
textAlign: 'left',
|
|
36
36
|
justifyContent: 'flex-start',
|
|
37
37
|
} }, { children: flagTooltip })) }))) : (_jsx(Tooltip, Object.assign({ title: flagTooltip }, { children: _jsxs(BadgeWrapper, Object.assign({ "data-testid": "ActionCell_FlagBadge", sx: {
|
|
@@ -116,6 +116,7 @@ export interface ActionCellProps extends TableCellProps {
|
|
|
116
116
|
isTextShown?: boolean;
|
|
117
117
|
showIdButton?: boolean;
|
|
118
118
|
renderDropdown?: (anchorEl: HTMLElement | null, setAnchorEl: (anchorEl: HTMLElement | null) => void) => React.ReactNode;
|
|
119
|
+
render?: JSX.Element;
|
|
119
120
|
}
|
|
120
121
|
export interface DeviceCellProps extends TableCellProps {
|
|
121
122
|
deviceType?: 'DESKTOP' | 'PHONE' | 'TABLET';
|
package/package.json
CHANGED