@tap-payments/os-micro-frontend-shared 0.1.96-test.16 → 0.1.96-test.18
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/AmountStatusChip/AmountStatusChip.d.ts +9 -0
- package/build/components/AmountStatusChip/AmountStatusChip.js +19 -0
- package/build/components/AmountStatusChip/index.d.ts +3 -0
- package/build/components/AmountStatusChip/index.js +2 -0
- package/build/components/AmountStatusChip/style.d.ts +3 -0
- package/build/components/AmountStatusChip/style.js +13 -0
- package/build/components/AppServicesBar/style.js +1 -1
- package/build/components/AuthenticationTypeChip/AuthenticationTypeChip.d.ts +9 -0
- package/build/components/AuthenticationTypeChip/AuthenticationTypeChip.js +21 -0
- package/build/components/AuthenticationTypeChip/constants.d.ts +16 -0
- package/build/components/AuthenticationTypeChip/constants.js +13 -0
- package/build/components/AuthenticationTypeChip/index.d.ts +3 -0
- package/build/components/AuthenticationTypeChip/index.js +2 -0
- package/build/components/ColorPicker/ColorPicker.d.ts +4 -1
- package/build/components/ColorPicker/ColorPicker.js +10 -43
- package/build/components/ColorPicker/ColorPickerPanel.d.ts +7 -0
- package/build/components/ColorPicker/ColorPickerPanel.js +41 -0
- package/build/components/ColorPicker/ColorSchemeSelect.d.ts +7 -0
- package/build/components/ColorPicker/ColorSchemeSelect.js +35 -0
- package/build/components/ColorPicker/HexaFields.d.ts +7 -0
- package/build/components/ColorPicker/HexaFields.js +79 -0
- package/build/components/ColorPicker/RGBAFields.d.ts +7 -0
- package/build/components/ColorPicker/RGBAFields.js +25 -0
- package/build/components/ColorPicker/style.d.ts +20 -9
- package/build/components/ColorPicker/style.js +49 -2
- package/build/components/ListLayout/ListLayout.js +1 -1
- package/build/components/NestedDropdown/Dropdown.js +2 -2
- package/build/components/RightLeftExpandingCenterChip/style.js +0 -2
- package/build/components/StatusChip/StatusChip.d.ts +1 -1
- package/build/components/StatusChip/StatusChip.js +13 -10
- package/build/components/StatusChip/style.d.ts +4 -0
- package/build/components/StatusChip/style.js +13 -5
- package/build/components/StatusChip/type.d.ts +4 -0
- package/build/components/StatusChipWithCopy/StatusChipWithCopy.d.ts +2 -1
- package/build/components/StatusChipWithCopy/StatusChipWithCopy.js +2 -2
- package/build/components/StatusIcons/AuthorizationAutoIcons/style.js +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/constant.d.ts +1 -0
- package/build/components/TableCells/CustomCells/ActionCell/constant.js +2 -1
- package/build/components/TableCells/CustomCells/ActionCell/hooks/useActionCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ApplicationStatusCell/ApplicationStatusCell.js +4 -4
- package/build/components/TableCells/CustomCells/BalanceCell/style.js +1 -1
- package/build/components/TableCells/CustomCells/ProductsCell/style.js +1 -1
- package/build/components/TableCells/CustomCells/RefundChargeCell/style.js +1 -1
- package/build/components/TableCells/CustomCells/RefundStatusCell/style.js +1 -1
- package/build/components/TableCells/CustomCells/style.js +1 -1
- package/build/components/TableCells/SheetViewCells/CustomerSheetCell/CustomerSheetCell.d.ts +14 -0
- package/build/components/TableCells/SheetViewCells/CustomerSheetCell/CustomerSheetCell.js +21 -0
- package/build/components/TableCells/SheetViewCells/CustomerSheetCell/index.d.ts +1 -0
- package/build/components/TableCells/SheetViewCells/CustomerSheetCell/index.js +1 -0
- package/build/components/TableCells/SheetViewCells/PaymentAgreementCell/PaymentAgreementCell.d.ts +13 -0
- package/build/components/TableCells/SheetViewCells/PaymentAgreementCell/PaymentAgreementCell.js +26 -0
- package/build/components/TableCells/SheetViewCells/PaymentAgreementCell/index.d.ts +1 -0
- package/build/components/TableCells/SheetViewCells/PaymentAgreementCell/index.js +1 -0
- package/build/components/TableCells/SheetViewCells/index.d.ts +2 -0
- package/build/components/TableCells/SheetViewCells/index.js +2 -0
- package/build/components/TableCells/index.d.ts +1 -0
- package/build/components/TableCells/index.js +1 -0
- package/build/components/ToggleView/style.js +3 -3
- package/build/components/VirtualTables/SheetViewVirtualTable/components/LoadingMainTable.js +2 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/components/MainTable.js +5 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/components/PinnedColumn.js +5 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableLoading.js +38 -4
- package/build/components/VirtualTables/components/ColumnFilter/List/List.js +1 -1
- package/build/components/VirtualTables/components/TableRow.js +2 -1
- package/build/components/VirtualTables/components/style.js +1 -1
- package/build/components/VirtualTables/components/virtualScroll/ListItemWrapper.d.ts +1 -0
- package/build/components/VirtualTables/components/virtualScroll/ListItemWrapper.js +3 -3
- package/build/components/index.d.ts +6 -4
- package/build/components/index.js +6 -4
- package/build/constants/apps.d.ts +38 -0
- package/build/constants/apps.js +16 -2
- package/build/constants/assets.d.ts +3 -0
- package/build/constants/assets.js +3 -0
- package/build/constants/chips/index.d.ts +1 -0
- package/build/constants/chips/index.js +1 -0
- package/build/{components/StatusChip/constants.d.ts → constants/chips/statusChips.d.ts} +1 -1
- package/build/{components/StatusChip/constants.js → constants/chips/statusChips.js} +1 -1
- package/build/constants/index.d.ts +1 -0
- package/build/constants/index.js +1 -0
- package/build/constants/table/cell/authenticationsTableCellWidth.d.ts +1 -1
- package/build/constants/table/cell/authenticationsTableCellWidth.js +1 -1
- package/build/constants/table/cell/authorizationTableCellWidth.d.ts +11 -6
- package/build/constants/table/cell/authorizationTableCellWidth.js +11 -6
- package/build/constants/table/cell/chargeTableCellWidth.d.ts +6 -6
- package/build/constants/table/cell/chargeTableCellWidth.js +6 -6
- package/build/constants/table/cell/destinationsTableCellWidth.d.ts +5 -5
- package/build/constants/table/cell/destinationsTableCellWidth.js +5 -5
- package/build/constants/table/cell/merchantsTableCellWidth.d.ts +1 -1
- package/build/constants/table/cell/merchantsTableCellWidth.js +1 -1
- package/build/constants/table/cell/refundTableCellWidth.d.ts +5 -5
- package/build/constants/table/cell/refundTableCellWidth.js +5 -5
- package/build/utils/color.d.ts +11 -0
- package/build/utils/color.js +27 -0
- package/build/utils/object.d.ts +1 -0
- package/build/utils/object.js +4 -3
- package/build/utils/style.js +0 -4
- package/build/utils/table.d.ts +3 -1
- package/build/utils/table.js +7 -1
- package/package.json +2 -2
|
@@ -15,15 +15,15 @@ import { useTranslation } from 'react-i18next';
|
|
|
15
15
|
import { AnimatePresence, motion } from 'framer-motion';
|
|
16
16
|
import { copyText as copyTextHandler } from '../../utils/index.js';
|
|
17
17
|
import { copyIcon, greenCheckIcon } from '../../constants/index.js';
|
|
18
|
-
import { unknownGeographyColors } from './constants';
|
|
19
18
|
import { ChipStyled, Wrapper, CopyWrapper } from './style';
|
|
19
|
+
import { emptyStatusChipColors } from '../../constants/index.js';
|
|
20
20
|
const StatusChip = (_a) => {
|
|
21
|
-
var { children, unknownText, copyText } = _a, props = __rest(_a, ["children", "unknownText", "copyText"]);
|
|
21
|
+
var { children, unknownText, copyText, expandDirection = 'right', chipStyles } = _a, props = __rest(_a, ["children", "unknownText", "copyText", "expandDirection", "chipStyles"]);
|
|
22
22
|
const [showCopy, setShowCopy] = useState(false);
|
|
23
23
|
const { t } = useTranslation();
|
|
24
24
|
const isSelected = props.isSelected;
|
|
25
25
|
if (!children) {
|
|
26
|
-
return (_jsx(ChipStyled, Object.assign({},
|
|
26
|
+
return (_jsx(ChipStyled, Object.assign({}, emptyStatusChipColors, props, { isSelected: false, sx: (theme) => ({ borderColor: theme.palette.divider }) }, { children: unknownText ? t(unknownText) : t('unknown') })));
|
|
27
27
|
}
|
|
28
28
|
const handleCopy = (e) => {
|
|
29
29
|
e.stopPropagation();
|
|
@@ -38,12 +38,15 @@ const StatusChip = (_a) => {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
const isCopyActive = isSelected && copyText;
|
|
42
|
+
return (_jsxs(motion.div, Object.assign({ style: { position: 'relative' }, animate: { zIndex: isSelected ? 3 : 0 } }, { children: [_jsx(ChipStyled, Object.assign({}, props, { sx: { visibility: 'hidden', pointerEvents: 'none' } }, { children: _jsx(Wrapper, { children: children }) })), _jsx(motion.div, Object.assign({ style: { position: 'absolute', top: 0, zIndex: isSelected ? 3 : 0 }, animate: {
|
|
43
|
+
left: isCopyActive && expandDirection === 'left' ? -12 : 0,
|
|
44
|
+
}, transition: { delay: isSelected ? 0 : 0.2, duration: 0.2 } }, { children: _jsx(ChipStyled, Object.assign({}, props, { isSelected: isSelected }, chipStyles, { children: _jsxs(motion.div, Object.assign({ layout: "size", style: { display: 'flex', gap: '4px' }, animate: {
|
|
45
|
+
paddingRight: isCopyActive ? 12 : 0,
|
|
46
|
+
}, transition: { delay: isSelected ? 0 : 0.2, duration: 0.2 } }, { children: [_jsx(Wrapper, { children: children }), _jsx(AnimatePresence, { children: isCopyActive && (_jsx(CopyWrapper, { children: _jsx(motion.img, { initial: { opacity: 0, x: -5 }, animate: { opacity: 1, x: 0 }, exit: { opacity: 0, x: -2 }, transition: { delay: 0.2, duration: 0.1 }, onClick: handleCopy, src: showCopy ? greenCheckIcon : copyIcon, style: {
|
|
47
|
+
height: 12,
|
|
48
|
+
width: 12,
|
|
49
|
+
objectFit: 'contain',
|
|
50
|
+
} }) })) })] })) })) }))] })));
|
|
48
51
|
};
|
|
49
52
|
export default StatusChip;
|
|
@@ -8,9 +8,13 @@ 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;
|
|
15
|
+
expandDirection?: "left" | "right" | undefined;
|
|
16
|
+
chipStyles?: object | undefined;
|
|
17
|
+
disableAnimation?: boolean | undefined;
|
|
14
18
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
15
19
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
16
20
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & {
|
|
@@ -1,10 +1,19 @@
|
|
|
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'].includes(prop),
|
|
5
|
-
})(({ theme, isSelected, textColor = theme.palette.text.primary, bgColor = '#EFF1F2', borderColor = '#EFF1F2', disabled = false, padding, maxWidth, }) => {
|
|
6
|
-
return Object.assign({ display: 'flex', 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'
|
|
7
|
-
boxShadow: '
|
|
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
|
+
boxShadow: 'white 7px 0px 8px 2px',
|
|
8
|
+
})), (disableAnimation && {
|
|
9
|
+
transition: 'none !important',
|
|
10
|
+
animation: 'none !important',
|
|
11
|
+
transform: 'none !important',
|
|
12
|
+
'& *': {
|
|
13
|
+
transition: 'none !important',
|
|
14
|
+
animation: 'none !important',
|
|
15
|
+
transform: 'none !important',
|
|
16
|
+
},
|
|
8
17
|
}));
|
|
9
18
|
});
|
|
10
19
|
export const Wrapper = styled(Box)(() => ({
|
|
@@ -12,7 +21,6 @@ export const Wrapper = styled(Box)(() => ({
|
|
|
12
21
|
alignItems: 'center',
|
|
13
22
|
justifyContent: 'center',
|
|
14
23
|
gap: '4px',
|
|
15
|
-
minWidth: 46,
|
|
16
24
|
textAlign: 'center',
|
|
17
25
|
}));
|
|
18
26
|
export const CopyWrapper = styled(Box)(() => ({
|
|
@@ -7,7 +7,11 @@ 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;
|
|
14
|
+
expandDirection?: 'left' | 'right';
|
|
15
|
+
chipStyles?: object;
|
|
16
|
+
disableAnimation?: boolean;
|
|
13
17
|
} & BoxProps>;
|
|
@@ -5,7 +5,8 @@ export interface StatusChipWithCopyProps extends StatusChipProps {
|
|
|
5
5
|
copyText?: string;
|
|
6
6
|
chipIndex: number;
|
|
7
7
|
selectionProps: SelectionProps;
|
|
8
|
+
chipStyles?: object;
|
|
8
9
|
}
|
|
9
|
-
declare function StatusChipWithCopy({ children, copyText, chipIndex, selectionProps: { onClick, rowIndex, colIndex, selectedId }, ...
|
|
10
|
+
declare function StatusChipWithCopy({ children, copyText, chipIndex, selectionProps: { onClick, rowIndex, colIndex, selectedId }, ...rest }: StatusChipWithCopyProps): import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
declare const _default: import("react").MemoExoticComponent<typeof StatusChipWithCopy>;
|
|
11
12
|
export default _default;
|
|
@@ -14,9 +14,9 @@ import { memo, useMemo } from 'react';
|
|
|
14
14
|
import StatusChip from '../StatusChip';
|
|
15
15
|
import { checkIsSelected } from './utils';
|
|
16
16
|
function StatusChipWithCopy(_a) {
|
|
17
|
-
var { children, copyText, chipIndex, selectionProps: { onClick, rowIndex, colIndex, selectedId } } = _a,
|
|
17
|
+
var { children, copyText, chipIndex, selectionProps: { onClick, rowIndex, colIndex, selectedId } } = _a, rest = __rest(_a, ["children", "copyText", "chipIndex", "selectionProps"]);
|
|
18
18
|
const isSelected = useMemo(() => checkIsSelected({ rowIndex, colIndex, selectedId, chipIndex }), [rowIndex, colIndex, selectedId, chipIndex]);
|
|
19
|
-
return (_jsx(StatusChip, Object.assign({},
|
|
19
|
+
return (_jsx(StatusChip, Object.assign({}, rest, { copyText: copyText, onClick: (e) => {
|
|
20
20
|
onClick === null || onClick === void 0 ? void 0 : onClick(e, chipIndex);
|
|
21
21
|
}, isSelected: isSelected }, { children: children })));
|
|
22
22
|
}
|
|
@@ -33,7 +33,7 @@ export const PercentageContainer = styled('div')(({ theme, percentage, isCapture
|
|
|
33
33
|
gap: theme.spacing(0.5),
|
|
34
34
|
}));
|
|
35
35
|
export const PiePercentage = styled('div')(({ percentage, isCapture, theme }) => ({
|
|
36
|
-
background: `conic-gradient(${isCapture ? theme.palette.info.dark : '#656565'} ${percentage}
|
|
36
|
+
background: `conic-gradient(${isCapture ? theme.palette.info.dark : '#656565'} ${percentage}%, transparent 0.00%)`,
|
|
37
37
|
borderRadius: '50%',
|
|
38
38
|
width: '8.333px',
|
|
39
39
|
height: '8.333px',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BadgeVariants } from '../../../CountBadge';
|
|
2
|
-
import { flagIcon, clockIcon, disputeIcon, redFlagIcon, cancelledIcon, closedFlagIcon, orangeFlagIcon, refundInitiatedIcon, viewInvoiceIcon, reverseActionIcon, voidedIcon, capturedDropdownIcon, destinationReversedTableIcon, brandPlaceholderIcon, usersIcon, clipboardIcon, } from '../../../../constants/index.js';
|
|
2
|
+
import { flagIcon, clockIcon, disputeIcon, redFlagIcon, cancelledIcon, closedFlagIcon, orangeFlagIcon, refundInitiatedIcon, viewInvoiceIcon, reverseActionIcon, voidedIcon, capturedDropdownIcon, destinationReversedTableIcon, brandPlaceholderIcon, usersIcon, clipboardIcon, jsonBlackIcon, } from '../../../../constants/index.js';
|
|
3
3
|
export const flags = {
|
|
4
4
|
GRAY: { icon: closedFlagIcon, color: '#CFCFCF' },
|
|
5
5
|
ORANGE: { icon: orangeFlagIcon, color: '#FFD503' },
|
|
@@ -24,4 +24,5 @@ export const actionIcons = {
|
|
|
24
24
|
users: usersIcon,
|
|
25
25
|
brand: brandPlaceholderIcon,
|
|
26
26
|
clipboard: clipboardIcon,
|
|
27
|
+
viewApi: jsonBlackIcon,
|
|
27
28
|
};
|
|
@@ -13,7 +13,7 @@ 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: "brand" | "users" | "cancel" | "reverse" | "refund" | "destination" | "capture" | "flag" | "dispute" | "void" | "clock" | "invoice" | "clipboard";
|
|
16
|
+
icon: "brand" | "users" | "cancel" | "reverse" | "refund" | "destination" | "capture" | "flag" | "dispute" | "void" | "clock" | "invoice" | "clipboard" | "viewApi";
|
|
17
17
|
isLoading?: boolean | undefined;
|
|
18
18
|
isError?: boolean | undefined;
|
|
19
19
|
isSuccess?: boolean | undefined;
|
|
@@ -283,5 +283,5 @@ export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
|
|
|
283
283
|
fetchPriority?: "auto" | "high" | "low" | undefined;
|
|
284
284
|
srcSet?: string | undefined;
|
|
285
285
|
} & import("framer-motion").MotionProps & import("react").RefAttributes<HTMLImageElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
286
|
-
icon?: "brand" | "users" | "cancel" | "reverse" | "refund" | "destination" | "capture" | "flag" | "dispute" | "void" | "clock" | "invoice" | "clipboard" | undefined;
|
|
286
|
+
icon?: "brand" | "users" | "cancel" | "reverse" | "refund" | "destination" | "capture" | "flag" | "dispute" | "void" | "clock" | "invoice" | "clipboard" | "viewApi" | undefined;
|
|
287
287
|
}, {}, {}>;
|
package/build/components/TableCells/CustomCells/ApplicationStatusCell/ApplicationStatusCell.js
CHANGED
|
@@ -30,11 +30,10 @@ export default function ApplicationStatusCell(_a) {
|
|
|
30
30
|
tooltip: 'Acceptance',
|
|
31
31
|
enabled: isAcceptanceEnabled,
|
|
32
32
|
shown: !hideAcceptance,
|
|
33
|
+
zIndex: isAcceptanceEnabled && !isPayoutEnabled ? 3 : 1,
|
|
33
34
|
},
|
|
34
|
-
{ icon: isPayoutEnabled ? payoutsGreenIcon : payoutWindowIcon, tooltip: 'Payout', enabled: isPayoutEnabled, shown: !hidePayout },
|
|
35
|
-
]
|
|
36
|
-
.filter((app) => app.shown)
|
|
37
|
-
.sort((a, b) => (a.enabled !== b.enabled && b.enabled ? -1 : 0)), [isAcceptanceEnabled, isPayoutEnabled, hideAcceptance, hidePayout]);
|
|
35
|
+
{ icon: isPayoutEnabled ? payoutsGreenIcon : payoutWindowIcon, tooltip: 'Payout', enabled: isPayoutEnabled, shown: !hidePayout, zIndex: 2 },
|
|
36
|
+
].filter((app) => app.shown), [isAcceptanceEnabled, isPayoutEnabled, hideAcceptance, hidePayout]);
|
|
38
37
|
const appsStatus = useMemo(() => apps.map((app, index) => {
|
|
39
38
|
const sourceTooltip = app.tooltip;
|
|
40
39
|
return (_jsx(Tooltip, Object.assign({ onOpen: () => {
|
|
@@ -43,6 +42,7 @@ export default function ApplicationStatusCell(_a) {
|
|
|
43
42
|
setIsTooltipOpen(false);
|
|
44
43
|
}, title: sourceTooltip }, { children: _jsx(ImageWrapper, Object.assign({ order: index, variants: appStatusAnimation(index, theme.shadows[4], 40), sx: {
|
|
45
44
|
width: '36px',
|
|
45
|
+
zIndex: app.zIndex + 6,
|
|
46
46
|
} }, { children: _jsx(IconWithBadge, { mainIcon: app.icon, mainIconSize: 16, containerSize: 16, sx: { borderRadius: '40px' }, onError: (e) => {
|
|
47
47
|
e.currentTarget.src = app.icon;
|
|
48
48
|
e.currentTarget.style.borderRadius = '0px';
|
|
@@ -31,7 +31,7 @@ export const PercentageContainer = styled('div')(({ theme, percentage }) => ({
|
|
|
31
31
|
gap: theme.spacing(0.5),
|
|
32
32
|
}));
|
|
33
33
|
export const PiePercentage = styled('div')(({ percentage, isCapture, theme }) => ({
|
|
34
|
-
background: `conic-gradient(${isCapture ? theme.palette.info.dark : '#656565'} ${percentage}
|
|
34
|
+
background: `conic-gradient(${isCapture ? theme.palette.info.dark : '#656565'} ${percentage}%, transparent 0.00%)`,
|
|
35
35
|
borderRadius: '50%',
|
|
36
36
|
width: '8.333px',
|
|
37
37
|
height: '8.333px',
|
|
@@ -34,7 +34,7 @@ export const PercentageContainer = styled('div')(({ theme }) => ({
|
|
|
34
34
|
lineHeight: 0,
|
|
35
35
|
}));
|
|
36
36
|
export const PiePercentage = styled('div')(({ percentage, isCapture, theme }) => ({
|
|
37
|
-
background: `conic-gradient(${isCapture ? theme.palette.info.dark : '#656565'} ${percentage}
|
|
37
|
+
background: `conic-gradient(${isCapture ? theme.palette.info.dark : '#656565'} ${percentage}%, transparent 0.00%)`,
|
|
38
38
|
borderRadius: '50%',
|
|
39
39
|
width: '8.333px',
|
|
40
40
|
height: '8.333px',
|
|
@@ -31,7 +31,7 @@ export const PercentageContainer = styled(motion.div)(({ theme, percentage }) =>
|
|
|
31
31
|
minWidth: '44px',
|
|
32
32
|
}));
|
|
33
33
|
export const PiePercentage = styled('div')(({ percentage, isCapture, theme }) => ({
|
|
34
|
-
background: `conic-gradient(${isCapture ? theme.palette.info.dark : '#656565'} ${percentage}
|
|
34
|
+
background: `conic-gradient(${isCapture ? theme.palette.info.dark : '#656565'} ${percentage}%, transparent 0.00%)`,
|
|
35
35
|
borderRadius: '50%',
|
|
36
36
|
width: '8.333px',
|
|
37
37
|
height: '8.333px',
|
|
@@ -38,7 +38,7 @@ export const DateContainer = styled(DateCell)(({ theme }) => ({
|
|
|
38
38
|
color: theme.palette.secondary.main,
|
|
39
39
|
}));
|
|
40
40
|
export const PiePercentage = styled('div')(({ percentage, isCapture, theme }) => ({
|
|
41
|
-
background: `conic-gradient(${isCapture ? theme.palette.info.dark : '#656565'} ${percentage}
|
|
41
|
+
background: `conic-gradient(${isCapture ? theme.palette.info.dark : '#656565'} ${percentage}%, transparent 0.00%)`,
|
|
42
42
|
borderRadius: '50%',
|
|
43
43
|
width: '8.333px',
|
|
44
44
|
height: '8.333px',
|
|
@@ -136,7 +136,7 @@ export const StatusIcon = styled('img')(() => ({
|
|
|
136
136
|
height: '16px',
|
|
137
137
|
}));
|
|
138
138
|
export const PiePercentage = styled('div')(({ percentage, isCapture, theme }) => ({
|
|
139
|
-
background: `conic-gradient(${isCapture ? theme.palette.info.dark : '#656565'} ${percentage}
|
|
139
|
+
background: `conic-gradient(${isCapture ? theme.palette.info.dark : '#656565'} ${percentage}%, transparent 0.00%)`,
|
|
140
140
|
borderRadius: '50%',
|
|
141
141
|
width: '8.333px',
|
|
142
142
|
height: '8.333px',
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StatusChipWithCopyProps } from '../../../StatusChipWithCopy';
|
|
2
|
+
interface CustomerSheetCellProps extends Pick<StatusChipWithCopyProps, 'selectionProps'> {
|
|
3
|
+
id?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
email?: string;
|
|
6
|
+
phone?: string;
|
|
7
|
+
isFirstNameShown?: boolean;
|
|
8
|
+
isLastNameShown?: boolean;
|
|
9
|
+
isEmailShown?: boolean;
|
|
10
|
+
isPhoneShown?: boolean;
|
|
11
|
+
isIdShown?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare function CustomerSheetCell({ id, name, email, phone, isFirstNameShown, isLastNameShown, isEmailShown, isPhoneShown, isIdShown, ...props }: CustomerSheetCellProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default CustomerSheetCell;
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
import { isArabic } from '../../../../utils/index.js';
|
|
16
|
+
function CustomerSheetCell(_a) {
|
|
17
|
+
var { id, name, email, phone, isFirstNameShown = true, isLastNameShown = true, isEmailShown = true, isPhoneShown = true, isIdShown = true } = _a, props = __rest(_a, ["id", "name", "email", "phone", "isFirstNameShown", "isLastNameShown", "isEmailShown", "isPhoneShown", "isIdShown"]);
|
|
18
|
+
const isArabicname = isArabic(name);
|
|
19
|
+
return (_jsxs(Box, Object.assign({ sx: { display: 'flex', flexDirection: 'row', gap: '4px' } }, { children: [name && (isFirstNameShown || isLastNameShown) && (_jsx(StatusChipWithCopy, Object.assign({ disableAnimation: true, copyText: name, chipIndex: 0 }, props, { children: _jsx("span", Object.assign({ "data-is-arabic": isArabicname }, { children: name })) }))), isEmailShown && email && (_jsx(StatusChipWithCopy, Object.assign({ copyText: email, chipIndex: 1 }, props, { children: email }))), isPhoneShown && phone && (_jsx(StatusChipWithCopy, Object.assign({ copyText: phone, chipIndex: 2 }, props, { children: phone }))), isIdShown && id && (_jsx(StatusChipWithCopy, Object.assign({ copyText: id, chipIndex: 3 }, props, { children: id })))] })));
|
|
20
|
+
}
|
|
21
|
+
export default CustomerSheetCell;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CustomerSheetCell } from './CustomerSheetCell';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CustomerSheetCell } from './CustomerSheetCell';
|
package/build/components/TableCells/SheetViewCells/PaymentAgreementCell/PaymentAgreementCell.d.ts
ADDED
|
@@ -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;
|
package/build/components/TableCells/SheetViewCells/PaymentAgreementCell/PaymentAgreementCell.js
ADDED
|
@@ -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';
|
|
@@ -7,7 +7,7 @@ export const ToggleWrapperStyled = styled(Box)(({ theme }) => ({
|
|
|
7
7
|
display: 'flex',
|
|
8
8
|
alignItems: 'center',
|
|
9
9
|
position: 'relative',
|
|
10
|
-
cursor: 'pointer'
|
|
10
|
+
cursor: 'pointer',
|
|
11
11
|
}));
|
|
12
12
|
export const ViewButton = styled(Box, { shouldForwardProp: (props) => props !== 'isActive' })(({ isActive }) => ({
|
|
13
13
|
flex: 1,
|
|
@@ -16,7 +16,7 @@ export const ViewButton = styled(Box, { shouldForwardProp: (props) => props !==
|
|
|
16
16
|
alignItems: 'center',
|
|
17
17
|
position: 'relative',
|
|
18
18
|
zIndex: 2,
|
|
19
|
-
opacity: isActive ? 1 : 0.5
|
|
19
|
+
opacity: isActive ? 1 : 0.5,
|
|
20
20
|
}));
|
|
21
21
|
export const ActiveOverlay = styled(Box, { shouldForwardProp: (props) => props !== 'activeIndex' })(({ theme, activeIndex }) => ({
|
|
22
22
|
position: 'absolute',
|
|
@@ -27,5 +27,5 @@ export const ActiveOverlay = styled(Box, { shouldForwardProp: (props) => props !
|
|
|
27
27
|
height: '28px',
|
|
28
28
|
backgroundColor: theme.palette.common.white,
|
|
29
29
|
borderRadius: '2px',
|
|
30
|
-
boxShadow: '0px 0px 4px 0px rgba(0, 0, 0, 0.20)'
|
|
30
|
+
boxShadow: '0px 0px 4px 0px rgba(0, 0, 0, 0.20)',
|
|
31
31
|
}));
|
|
@@ -12,8 +12,10 @@ function LoadingMainTable({ hasPinnedStart, hasPinnedEnd, unpinnedColumnsData, s
|
|
|
12
12
|
minWidth: 'fit-content',
|
|
13
13
|
} }, { children: _jsx(StyledBox, Object.assign({ "data-testid": "SheetViewVirtualTable_LoadingStyledBox", hidePadding: true, className: "list-wrapper", sx: {
|
|
14
14
|
height: '100%',
|
|
15
|
+
maxHeight: '100%',
|
|
15
16
|
display: 'flex',
|
|
16
17
|
flexDirection: 'column',
|
|
18
|
+
overflow: 'hidden',
|
|
17
19
|
} }, { children: _jsx(SheetViewTableLoading, { "data-testid": "SheetViewVirtualTable_TableLoading", columns: unpinnedColumnsData, isLoading: true, isPinned: false }) })) }))] })) })) })));
|
|
18
20
|
}
|
|
19
21
|
export default memo(LoadingMainTable);
|
|
@@ -10,6 +10,10 @@ function MainTable({ hasPinnedStart, hasPinnedEnd, unpinnedColumnsData, showHead
|
|
|
10
10
|
return (_jsx(MainTableWrapper, Object.assign({ hasPinnedStart: hasPinnedStart, hasPinnedEnd: hasPinnedEnd }, { children: _jsx(StyledTableBox, Object.assign({ as: "main", id: "sheet-table-box-container", "aria-labelledby": "sheet-table-box-container", "data-testid": "SheetViewVirtualTable_StyledTableBox", "data-title": tableTitle, "data-direction": theme.direction, "data-are-all-rows-loaded": !!areAllRowsLoaded, "data-is-fetching-next-page": !!isFetchingNextPage, "data-scroll-to-index": scrollToIndex, "data-is-loading": !!isLoading, "data-is-error": !!isError, "data-is-error-timeout": !!hasTimeoutError, "data-table-mode": tableMode, height: "100%", dir: theme.direction, showNoDataView: showNoDataView, scrollable: true }, { children: _jsxs(TableWrapper, Object.assign({ "data-testid": "SheetViewVirtualTable_TableWrapper", showNoDataView: showNoDataView, sx: Object.assign(Object.assign({}, tableBodyStyles), { display: 'flex', flexDirection: 'column', height: '100%' }) }, { children: [showHeader && (_jsx(UnpinnedTableHeaderWrapper, { children: _jsx(SheetViewTableHeader, { "data-testid": "SheetViewVirtualTable_UnpinnedTableHeader", columnsSorting: columnsSorting, onColumnSort: onColumnSort, columns: unpinnedColumnsData, headerProps: headerProps, showBackDrop: showBackDrop, pinnedColumns: [...pinnedStartColumns, ...pinnedEndColumns], onColumnPin: onColumnPin, isPinnable: isPinnable, lastColumnId: lastColumnId, selectedColumn: selectedColumn, onColumnClick: onColumnClick, tablePosition: "scrollable", hasPinnedStart: hasPinnedStart, hasPinnedEnd: hasPinnedEnd }) })), _jsx(TableWrapper, Object.assign({ "data-testid": "VirtualTable_TableWrapper", sx: {
|
|
11
11
|
width: '100%',
|
|
12
12
|
minWidth: 'fit-content',
|
|
13
|
-
} }, { children: _jsx(StyledBox, Object.assign({ "data-testid": "SheetViewVirtualTable_ScrollableStyledBox", hidePadding: true, className: "list-wrapper"
|
|
13
|
+
} }, { children: _jsx(StyledBox, Object.assign({ "data-testid": "SheetViewVirtualTable_ScrollableStyledBox", hidePadding: true, className: "list-wrapper", sx: {
|
|
14
|
+
height: '100%',
|
|
15
|
+
maxHeight: '100%',
|
|
16
|
+
overflow: 'hidden',
|
|
17
|
+
} }, { children: tableLoading ? (_jsx(SheetViewTableLoading, { "data-testid": "SheetViewVirtualTable_TableLoading", columns: unpinnedColumnsData, isLoading: true, isPinned: false })) : (createVirtualTableContainer(unpinnedColumnsData, 'scrollable', false)) })) }))] })) })) })));
|
|
14
18
|
}
|
|
15
19
|
export default memo(MainTable);
|
|
@@ -15,6 +15,10 @@ function PinnedColumn({ position, columnsData, columnsWidth, pinnedColumnsList,
|
|
|
15
15
|
width: '100%',
|
|
16
16
|
minWidth: 'fit-content',
|
|
17
17
|
overflowX: 'hidden',
|
|
18
|
-
} }, { children: _jsx(StyledBox, Object.assign({ "data-testid": "SheetViewVirtualTable_PinnedStyledBox", hidePadding: true, className: "list-wrapper"
|
|
18
|
+
} }, { children: _jsx(StyledBox, Object.assign({ "data-testid": "SheetViewVirtualTable_PinnedStyledBox", hidePadding: true, className: "list-wrapper", sx: {
|
|
19
|
+
height: '100%',
|
|
20
|
+
maxHeight: '100%',
|
|
21
|
+
overflow: 'hidden',
|
|
22
|
+
} }, { children: tableLoading ? (_jsx(SheetViewTableLoading, { "data-testid": `SheetViewVirtualTable_PinnedTableLoading_${position}`, columns: columnsData, isLoading: true, isPinned: true })) : (createVirtualTableContainer(columnsData, containerKey, true, columnsWidth)) })) }))] })) }));
|
|
19
23
|
}
|
|
20
24
|
export default memo(PinnedColumn);
|
package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableLoading.js
CHANGED
|
@@ -1,19 +1,53 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { memo } from 'react';
|
|
2
|
+
import { memo, useEffect, useState } from 'react';
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
4
|
import uniqueId from 'lodash/uniqueId';
|
|
5
5
|
import { calculateMaxAllowedRows } from '../../../../utils/index.js';
|
|
6
6
|
import SheetViewTableRowLoading from './SheetViewTableRowLoading';
|
|
7
|
+
import { SHEET_VIEW_TABLE_ROW_HEIGHT } from '../../../../constants/index.js';
|
|
7
8
|
const Wrapper = styled('section')(({ isLoaded = false, isPinned = false }) => ({
|
|
8
9
|
overflow: 'hidden',
|
|
9
10
|
paddingInline: isLoaded && !isPinned ? '32px' : '0px',
|
|
10
11
|
backgroundColor: isLoaded && !isPinned ? 'rgba(255, 255, 255, 0.60)' : 'none',
|
|
11
12
|
filter: isLoaded && !isPinned ? 'blur(8px)' : 'none',
|
|
12
13
|
marginTop: isLoaded && !isPinned ? '1rem' : '0',
|
|
14
|
+
height: '100%',
|
|
15
|
+
maxHeight: '100%',
|
|
13
16
|
}));
|
|
14
|
-
function SheetViewTableLoading({ columns, isLoaded = false, animationType, isLoading = false, rowsCount, isPinned = false, }) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
function SheetViewTableLoading({ columns, isLoaded = false, animationType, isLoading = false, rowsCount = 13, isPinned = false, }) {
|
|
18
|
+
const [maxAllowedRows, setMaxAllowedRows] = useState(() => {
|
|
19
|
+
return rowsCount || Math.min(calculateMaxAllowedRows(isLoaded, isLoading), 15);
|
|
20
|
+
});
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (rowsCount) {
|
|
23
|
+
setMaxAllowedRows(rowsCount);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const calculateRowsForContainer = () => {
|
|
27
|
+
var _a;
|
|
28
|
+
const wrapperElement = document.querySelector('[data-testid="SheetViewTableLoading"]');
|
|
29
|
+
if (!wrapperElement) {
|
|
30
|
+
return Math.min(calculateMaxAllowedRows(isLoaded, isLoading), 25);
|
|
31
|
+
}
|
|
32
|
+
const containerHeight = ((_a = wrapperElement.parentElement) === null || _a === void 0 ? void 0 : _a.clientHeight) || 0;
|
|
33
|
+
const rowHeight = SHEET_VIEW_TABLE_ROW_HEIGHT;
|
|
34
|
+
const headerHeight = 40;
|
|
35
|
+
const availableHeight = containerHeight - headerHeight;
|
|
36
|
+
if (availableHeight <= 0) {
|
|
37
|
+
return Math.min(calculateMaxAllowedRows(isLoaded, isLoading), 25);
|
|
38
|
+
}
|
|
39
|
+
const calculatedRows = Math.floor(availableHeight / rowHeight);
|
|
40
|
+
return Math.max(3, Math.min(calculatedRows + 2, 25));
|
|
41
|
+
};
|
|
42
|
+
const rows = calculateRowsForContainer();
|
|
43
|
+
setMaxAllowedRows(rows);
|
|
44
|
+
const handleResize = () => {
|
|
45
|
+
const calculatedRows = calculateRowsForContainer();
|
|
46
|
+
setMaxAllowedRows(calculatedRows);
|
|
47
|
+
};
|
|
48
|
+
window.addEventListener('resize', handleResize);
|
|
49
|
+
return () => window.removeEventListener('resize', handleResize);
|
|
50
|
+
}, [isLoaded, isLoading, rowsCount]);
|
|
17
51
|
return (_jsx(Wrapper, Object.assign({ isLoaded: isLoaded, isPinned: isPinned, "data-testid": "SheetViewTableLoading" }, { children: [...Array(maxAllowedRows)].map((_, index) => (_jsx(SheetViewTableRowLoading, { columns: columns, animationType: animationType, rowIndex: index, useTableBackground: !isPinned }, `i-${uniqueId('SheetViewTableLoadingRow_')}`))) })));
|
|
18
52
|
}
|
|
19
53
|
export default memo(SheetViewTableLoading);
|
|
@@ -56,6 +56,6 @@ function List({ onCloseDropdown, filter, styles }) {
|
|
|
56
56
|
bottom: 0,
|
|
57
57
|
backgroundColor: 'white',
|
|
58
58
|
zIndex: 99999,
|
|
59
|
-
} }, { children: [_jsx(CancelButton, Object.assign({ onClick: onClickCancel }, { children: t('cancel') })), _jsx(OkayButton, Object.assign({ onClick: onClickOkay }, { children: t('okay') }))] })) }));
|
|
59
|
+
} }, { children: [_jsx(CancelButton, Object.assign({ onClick: onClickCancel }, { children: t('cancel') }), "nested-dropdown-cancel"), _jsx(OkayButton, Object.assign({ onClick: onClickOkay }, { children: t('okay') }), "nested-dropdown-ok")] })) }));
|
|
60
60
|
}
|
|
61
61
|
export default memo(List);
|
|
@@ -53,9 +53,10 @@ function TableRow({ row, columns, index, rowProps, isSheetView, selectedCell = n
|
|
|
53
53
|
isPinnedEnd: column.pinned === 'end',
|
|
54
54
|
})
|
|
55
55
|
: {};
|
|
56
|
+
const isIndexColumn = column.pinned === 'start' && effectiveFirst;
|
|
56
57
|
return (_jsx(StyledCell, Object.assign({ component: "div", "data-testid": "TableRow_TableCell", "data-column-id": column.id, "data-column-width": column.width, "data-column-width-used": column.width, "data-column-align": column.align, "data-column-order": column.order, "data-column-header": typeof column.header === 'string' ? column.header : 'component', "data-column-sortable": !!column.sortable, "data-column-filterable": !!column.filter, isFirst: effectiveFirst, isLast: effectiveLast, onClick: (event) => {
|
|
57
58
|
onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(index, colIndex, event, column.pinned);
|
|
58
|
-
}, sx: Object.assign(Object.assign(Object.assign({ width: column.width, minWidth: column.width, textAlign: column.align, justifyContent: column.align === 'right' ? 'flex-end' : 'flex-start', cursor: onCellClick ? 'pointer' : 'default' }, selectionStyles), rowSelectionBorderStyles), column.cellStyle), isSheetView: isSheetView, isSelected: isCellSelected }, { children: isSheetView ? (_jsx(Box, Object.assign({ sx: { position: 'relative', zIndex: 1 } }, { children: renderCell(column, index, colIndex) }))) : (_jsx(_Fragment, { children: renderCell(column, index, colIndex) })) }), `${column.id}-${colIndex}`));
|
|
59
|
+
}, sx: Object.assign(Object.assign(Object.assign({ width: column.width, minWidth: column.width, textAlign: column.align, justifyContent: isIndexColumn ? 'center' : column.align === 'right' ? 'flex-end' : 'flex-start', cursor: onCellClick ? 'pointer' : 'default' }, selectionStyles), rowSelectionBorderStyles), column.cellStyle), isSheetView: isSheetView, isSelected: isCellSelected }, { children: isSheetView ? (_jsx(Box, Object.assign({ sx: { position: 'relative', zIndex: 1 } }, { children: renderCell(column, index, colIndex) }))) : (_jsx(_Fragment, { children: renderCell(column, index, colIndex) })) }), `${column.id}-${colIndex}`));
|
|
59
60
|
}) })), [columns, row, index, selectedCell, selectedColumn, selectedRow, onCellClick, isLastRow, selectedChip, isSheetView]);
|
|
60
61
|
return (_createElement(StyledTableRow, Object.assign({ "data-testid": "TableRow", onClick: rowProps === null || rowProps === void 0 ? void 0 : rowProps.onRowClick, showShadowHighlight: rowProps === null || rowProps === void 0 ? void 0 : rowProps.showShadowHighlight, showLoadedStyle: rowProps === null || rowProps === void 0 ? void 0 : rowProps.showLoadedStyle, component: "article" }, rowProps, { key: index, isSheetView: isSheetView }), content));
|
|
61
62
|
}
|
|
@@ -146,7 +146,7 @@ export const SheetViewTableContainer = styled(Box)(() => ({
|
|
|
146
146
|
position: 'relative',
|
|
147
147
|
display: 'flex',
|
|
148
148
|
flexDirection: 'column',
|
|
149
|
-
height: '
|
|
149
|
+
height: '100%',
|
|
150
150
|
paddingInline: '28px',
|
|
151
151
|
borderRadius: '8px',
|
|
152
152
|
marginBottom: '16px !important',
|
|
@@ -9,6 +9,7 @@ export declare const LastRowContent: React.MemoExoticComponent<({ isLoadingRow,
|
|
|
9
9
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
10
10
|
export declare const StyledItemWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
11
11
|
showShadowHighlight?: boolean | undefined;
|
|
12
|
+
isSheetView?: boolean | undefined;
|
|
12
13
|
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
13
14
|
declare function ListItemWrapper({ index, style, data: { renderedScrollTopRef, rows, rowProps, columns, isLoading, scrollToIndex, newLoadedRowsEndIndex, isError, areAllRowsLoaded, isSheetView, isPinned, isLoadMoreLoading, ...restData }, }: Readonly<ListChildComponentProps>): import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
export default ListItemWrapper;
|
|
@@ -46,8 +46,8 @@ const createRowClickHandler = (row, onRowClick) => (e) => {
|
|
|
46
46
|
};
|
|
47
47
|
export const StyledItemWrapper = styled('div', {
|
|
48
48
|
shouldForwardProp: (props) => props !== 'showShadowHighlight' && props !== 'isSheetView',
|
|
49
|
-
})(({ theme }) => ({
|
|
50
|
-
height: '100%',
|
|
49
|
+
})(({ theme, isSheetView }) => ({
|
|
50
|
+
height: isSheetView ? SHEET_VIEW_TABLE_ROW_HEIGHT : '100%',
|
|
51
51
|
backgroundColor: theme.palette.background.default,
|
|
52
52
|
}));
|
|
53
53
|
function ListItemWrapper(_a) {
|
|
@@ -105,6 +105,6 @@ function ListItemWrapper(_a) {
|
|
|
105
105
|
renderSheetViewLoadingRow,
|
|
106
106
|
isLoadMoreLoading,
|
|
107
107
|
]);
|
|
108
|
-
return (_jsx("div", Object.assign({ "data-testid": "ListItemWrapper", style: Object.assign(Object.assign({}, style), { top: Number(style.top) - ((_b = renderedScrollTopRef === null || renderedScrollTopRef === void 0 ? void 0 : renderedScrollTopRef.current) !== null && _b !== void 0 ? _b : 0), willChange: 'top' }) }, { children: _jsx(StyledItemWrapper, Object.assign({ "data-testid": "ListItemWrapper_StyledItemWrapper" }, { children: memoizedListItemComponent })) })));
|
|
108
|
+
return (_jsx("div", Object.assign({ "data-testid": "ListItemWrapper", style: Object.assign(Object.assign({}, (!isSheetView && style)), { top: Number(style.top) - ((_b = renderedScrollTopRef === null || renderedScrollTopRef === void 0 ? void 0 : renderedScrollTopRef.current) !== null && _b !== void 0 ? _b : 0), willChange: 'top' }) }, { children: _jsx(StyledItemWrapper, Object.assign({ "data-testid": "ListItemWrapper_StyledItemWrapper", isSheetView: isSheetView }, { children: memoizedListItemComponent })) })));
|
|
109
109
|
}
|
|
110
110
|
export default ListItemWrapper;
|
|
@@ -97,10 +97,6 @@ export { default as AppServices } from './AppServices';
|
|
|
97
97
|
export { default as ScrollLoader } from './ScrollLoader';
|
|
98
98
|
export * from './ScrollLoader';
|
|
99
99
|
export * from './TooltipChip';
|
|
100
|
-
export { default as ListLayout } from './ListLayout';
|
|
101
|
-
export * from './ListLayout';
|
|
102
|
-
export { default as ToggleView } from './ToggleView';
|
|
103
|
-
export * from './ToggleView';
|
|
104
100
|
export * from './RightLeftExpandingCenterChip';
|
|
105
101
|
export { default as StatusChipWithCopy } from './StatusChipWithCopy';
|
|
106
102
|
export * from './RadioButton';
|
|
@@ -109,6 +105,12 @@ export * from './LeftPeekRightExpandingChip';
|
|
|
109
105
|
export { default as ColorPicker } from './ColorPicker';
|
|
110
106
|
export { default as WindowBackdrop } from './WindowBackdrop';
|
|
111
107
|
export { default as LazyImage } from './LazyImage';
|
|
108
|
+
export { default as AmountStatusChip, type AmountStatusChipProps } from './AmountStatusChip';
|
|
109
|
+
export { default as AuthenticationTypeChip, type AuthenticationTypeChipProps } from './AuthenticationTypeChip';
|
|
112
110
|
export * from './LazyImage';
|
|
111
|
+
export { default as ListLayout } from './ListLayout';
|
|
112
|
+
export * from './ListLayout';
|
|
113
|
+
export { default as ToggleView } from './ToggleView';
|
|
114
|
+
export * from './ToggleView';
|
|
113
115
|
export { default as AppServicesBar } from './AppServicesBar';
|
|
114
116
|
export * from './AppServicesBar';
|