@tap-payments/os-micro-frontend-shared 0.1.276 → 0.1.277-test.10-test.2

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.
Files changed (48) hide show
  1. package/build/components/Chip/style.d.ts +0 -1
  2. package/build/components/CountBadge/style.d.ts +0 -1
  3. package/build/components/DeviceIcon/DeviceIcon.js +1 -1
  4. package/build/components/Dialog/style.d.ts +0 -1
  5. package/build/components/FlippingCard/style.d.ts +0 -1
  6. package/build/components/ImageWrapper/ImageWrapper.d.ts +0 -1
  7. package/build/components/JSONViewer/style.d.ts +0 -1
  8. package/build/components/LeftPeekRightExpandingChip/style.d.ts +0 -1
  9. package/build/components/RightLeftExpandingCenterChip/style.d.ts +0 -1
  10. package/build/components/SearchButton/styles.d.ts +0 -1
  11. package/build/components/StatusButton/constant.d.ts +2 -0
  12. package/build/components/StatusButton/constant.js +3 -1
  13. package/build/components/StatusButton/style.d.ts +1 -1
  14. package/build/components/StatusChip/StatusChip.js +2 -2
  15. package/build/components/StatusIcons/AuthIcons/style.d.ts +0 -1
  16. package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
  17. package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
  18. package/build/components/StatusIcons/GeographyIcon/GeographyIcon.js +1 -1
  19. package/build/components/StatusIcons/IssuerIcon/IssuerIcon.js +1 -1
  20. package/build/components/StatusIcons/SourceIcons/style.d.ts +0 -1
  21. package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +0 -1
  22. package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
  23. package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
  24. package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
  25. package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
  26. package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
  27. package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
  28. package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
  29. package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
  30. package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
  31. package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
  32. package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
  33. package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
  34. package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
  35. package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
  36. package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
  37. package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
  38. package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
  39. package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
  40. package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
  41. package/build/components/TableCells/CustomCells/SourceCell/style.d.ts +0 -1
  42. package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
  43. package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
  44. package/build/components/TableCells/CustomCells/style.d.ts +0 -1
  45. package/build/components/VirtualTables/components/TableRow.d.ts +2 -2
  46. package/build/components/VirtualTables/components/TableRow.js +72 -47
  47. package/build/components/VirtualTables/components/style.d.ts +0 -1
  48. package/package.json +3 -3
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  import { GetSourceAnimationFunction } from './type';
4
3
  export declare const ChipStyled: import("@emotion/styled").StyledComponent<import("react").RefAttributes<unknown> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
5
4
  variant?: import("./type").ChipVariant | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const AgreementImageWrapper: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -24,6 +24,6 @@ function DeviceIcon(_a) {
24
24
  var { type, isTextShown, tableMode } = _a, props = __rest(_a, ["type", "isTextShown", "tableMode"]);
25
25
  const { t } = useTranslation();
26
26
  const icon = isDeviceIconShown(type) ? DEVICE_ICON[type] : null;
27
- return (_jsx(Tooltip, Object.assign({ title: icon ? capitalizeFirstLetter((type !== null && type !== void 0 ? type : '').toLowerCase()) : t('unKnown') }, { children: isTextShown ? (_jsxs(TextLabel, Object.assign({ tableMode: tableMode }, { children: [" ", type ? capitalize(type) : 'Unknown'] }))) : (_jsx(Box, Object.assign({}, props, { component: "img", src: type ? icon || defaultDeviceIcon : defaultDeviceIcon, alt: type }))) })));
27
+ return (_jsx(Tooltip, Object.assign({ title: icon ? `Device - ${capitalizeFirstLetter((type !== null && type !== void 0 ? type : '').toLowerCase())}` : t('unKnown') }, { children: isTextShown ? (_jsxs(TextLabel, Object.assign({ tableMode: tableMode }, { children: [" ", type ? capitalize(type) : 'Unknown'] }))) : (_jsx(Box, Object.assign({}, props, { component: "img", src: type ? icon || defaultDeviceIcon : defaultDeviceIcon, alt: type }))) })));
28
28
  }
29
29
  export default memo(DeviceIcon);
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const DialogWrapper: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const Wrapper: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  declare const ImageWrapper: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const FOOTER_HEIGHT = 37;
4
3
  export declare const TITLE_BAR_HEIGHT = "32px";
5
4
  export declare const VIEWER_HEIGHT = 545;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  import type { SxProps, Theme } from '@mui/material/styles';
4
3
  export declare const CHIP_GAP = 3;
5
4
  export declare const DEFAULT_CHIP_MIN_WIDTH = 24;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  import type { SxProps, Theme } from '@mui/material/styles';
4
3
  export declare const CHIP_GAP = 3;
5
4
  export declare const CenterIconWrapper: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledInput: import("@emotion/styled").StyledComponent<{
4
3
  width?: string | number | undefined;
5
4
  height?: string | number | undefined;
@@ -21,4 +21,6 @@ export declare const statusButtonIcons: {
21
21
  checked: string;
22
22
  dashedChecked: string;
23
23
  deactivated: string;
24
+ destination: string;
25
+ destinationReversed: string;
24
26
  };
@@ -1,4 +1,4 @@
1
- import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon, searchIcon, chevronDownIcon, unAuthorizedIcon, settlementInitiatedIcon, unCapturedIcon, capturedIcon, authorizedIcon, openFlagIcon, closedFlagIcon, reverseActionIcon, authenticatedIcon, unauthenticatedIcon, paidOutFilterIcon, scheduledFilterIcon, completedBlackIcon, dashedCheckIcon, deactivatedIcon,
1
+ import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon, searchIcon, chevronDownIcon, unAuthorizedIcon, settlementInitiatedIcon, unCapturedIcon, capturedIcon, authorizedIcon, openFlagIcon, closedFlagIcon, reverseActionIcon, authenticatedIcon, unauthenticatedIcon, paidOutFilterIcon, scheduledFilterIcon, completedBlackIcon, dashedCheckIcon, deactivatedIcon, destinationsServiceIcon, destinationWithoutBackgroundIcon,
2
2
  // trashBinIcon,
3
3
  } from '../../constants/index.js';
4
4
  export const statusButtonIcons = {
@@ -24,4 +24,6 @@ export const statusButtonIcons = {
24
24
  checked: completedBlackIcon,
25
25
  dashedChecked: dashedCheckIcon,
26
26
  deactivated: deactivatedIcon,
27
+ destination: destinationsServiceIcon,
28
+ destinationReversed: destinationWithoutBackgroundIcon,
27
29
  };
@@ -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" | "inProgress" | "initiated" | "abandoned" | "cancelled" | "reports" | "chevronDown" | "unAuthorized" | "unSettled" | "unCaptured" | "captured" | "authorized" | "openFlag" | "closedFlag" | "unauthenticated" | "authenticated" | "dashedChecked" | "deactivated" | undefined;
24
+ icon?: "search" | "scheduled" | "paidOut" | "destination" | "reversed" | "checked" | "inProgress" | "initiated" | "abandoned" | "cancelled" | "reports" | "chevronDown" | "unAuthorized" | "unSettled" | "unCaptured" | "captured" | "authorized" | "openFlag" | "closedFlag" | "unauthenticated" | "authenticated" | "dashedChecked" | "deactivated" | "destinationReversed" | 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>, {}, {}>;
@@ -41,9 +41,9 @@ const StatusChip = (_a) => {
41
41
  const isCopyActive = isSelected && copyText;
42
42
  return (_jsxs(motion.div, Object.assign({ style: Object.assign({ position: 'relative' }, containerStyles), 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
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: {
44
+ }, transition: { delay: isSelected ? 0 : 0.3, 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
45
  paddingRight: isCopyActive ? 12 : 0,
46
- }, transition: { delay: isSelected ? 0 : 0.2, duration: 0.2 } }, { children: [_jsx(Wrapper, Object.assign({ "data-is-arabic": typeof children === 'string' && isArabic(children) }, { 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: {
46
+ }, transition: { delay: isSelected ? 0 : 0.3, duration: 0.2 } }, { children: [_jsx(Wrapper, Object.assign({ "data-is-arabic": typeof children === 'string' && isArabic(children) }, { 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: { duration: 0.1 }, onClick: handleCopy, src: showCopy ? greenCheckIcon : copyIcon, style: {
47
47
  height: 12,
48
48
  width: 12,
49
49
  objectFit: 'contain',
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
4
  export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const BalanceCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const ErrorCodeLabel: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -9,7 +9,7 @@ const geographyMap = {
9
9
  export const GeographyIcon = ({ geographyVariant, countryCode, isTextShown, }) => {
10
10
  const geographyTooltip = geographyVariant ? geographyMap[geographyVariant] : undefined;
11
11
  const tooltip = geographyTooltip || countryCode
12
- ? `${geographyTooltip || ''} ${geographyTooltip && countryCode ? `-` : ''} ${countryCode ? `${countryCode}` : ''}`
12
+ ? `${geographyTooltip || ''} ${geographyTooltip && countryCode ? `-` : ''} ${countryCode ? `Country - ${countryCode}` : ''}`
13
13
  : undefined;
14
14
  if (isTextShown || !countryCode)
15
15
  return null;
@@ -5,5 +5,5 @@ import Tooltip from '../../Tooltip';
5
5
  export default function IssuerIcon({ countryCode, isTextShown, cardNumber, bankName, tableMode }) {
6
6
  const firstFourDigits = cardNumber === null || cardNumber === void 0 ? void 0 : cardNumber.slice(0, 4);
7
7
  const lastFourDigits = cardNumber === null || cardNumber === void 0 ? void 0 : cardNumber.slice(-4);
8
- return (_jsxs(IssuerIconContainer, Object.assign({ tableMode: tableMode }, { children: [countryCode && _jsx(GeographyIcon, { countryCode: countryCode, isTextShown: isTextShown }), _jsx(Tooltip, Object.assign({ title: bankName }, { children: _jsx(CardNumber, { children: `${firstFourDigits || ''} ${lastFourDigits || ''}` }) }))] })));
8
+ return (_jsxs(IssuerIconContainer, Object.assign({ tableMode: tableMode }, { children: [countryCode && _jsx(GeographyIcon, { countryCode: countryCode, isTextShown: isTextShown }), _jsx(Tooltip, Object.assign({ title: `${bankName ? `Issuer - ${bankName}` : ''}` }, { children: _jsx(CardNumber, { children: `${firstFourDigits || ''} ${lastFourDigits || ''}` }) }))] })));
9
9
  }
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
4
  export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  import { TableMode } from '../../../../types/index.js';
4
3
  export declare const ActionCellContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
5
4
  tableMode?: TableMode | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledAppsCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const AppsStatusContainer: import("@emotion/styled").StyledComponent<{
5
4
  hidden?: boolean | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const AuthIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
4
3
  export declare const AuthCellContainer: import("@emotion/styled").StyledComponent<{
5
4
  hidden?: boolean | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const BalanceCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
4
  export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const DueDateCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const DueDateCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const Button: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const DueDateCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const DueDateCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const ProductCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
4
  export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const RefundChargeCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const RefundCellContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
4
  export declare const SalesChannelsContainer: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
5
4
  hidden?: boolean | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
3
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
5
4
  export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const MultiRefundIcon: import("@emotion/styled").StyledComponent<{
4
3
  width?: string | number | undefined;
5
4
  height?: string | number | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
4
3
  hidden?: boolean | undefined;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  export declare const GeographyBox: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
4
3
  variant?: "Global" | "Regional" | "Local" | undefined;
5
4
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { type TableRowProps } from '@mui/material';
3
3
  import type { IColumnProps } from '../../../types/index.js';
4
4
  interface ITableRowProps<R = any> {
@@ -20,5 +20,5 @@ interface ITableRowProps<R = any> {
20
20
  isLastRow?: boolean;
21
21
  }
22
22
  declare function TableRow({ row, columns, index, rowProps, isSheetView, selectedCell, selectedColumn, selectedRow, selectedChip, onCellClick, isLastRow, onChipClick, }: Readonly<ITableRowProps>): import("react/jsx-runtime").JSX.Element;
23
- declare const _default: import("react").MemoExoticComponent<typeof TableRow>;
23
+ declare const _default: React.MemoExoticComponent<typeof TableRow>;
24
24
  export default _default;
@@ -1,16 +1,18 @@
1
1
  import { createElement as _createElement } from "react";
2
2
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
3
- import { memo, useMemo } from 'react';
3
+ import React, { memo, useMemo } from 'react';
4
4
  import { Box } from '@mui/material';
5
5
  import { areEqual } from 'react-window';
6
6
  import { StyledCell, StyledTableRow } from './style';
7
7
  import { getSelectionStyles, getRowSelectionBorderStyles } from '../../../utils/index.js';
8
8
  function TableRow({ row, columns, index, rowProps, isSheetView, selectedCell = null, selectedColumn = null, selectedRow = null, selectedChip = null, onCellClick, isLastRow = false, onChipClick, }) {
9
- const renderCell = (column, rowIndex, colIndex) => {
9
+ // Memoize chip click handler to prevent recreation on every render
10
+ const handleChipClick = React.useCallback((colIndex, pinned) => (event, chipIndex) => {
11
+ onChipClick === null || onChipClick === void 0 ? void 0 : onChipClick(index, colIndex, event, chipIndex, pinned);
12
+ }, [onChipClick, index]);
13
+ // Memoize cell renderer to prevent recreation
14
+ const renderCell = React.useCallback((column, rowIndex, colIndex) => {
10
15
  const { render, format, selector } = column;
11
- const handleChipClick = (event, chipIndex) => {
12
- onChipClick === null || onChipClick === void 0 ? void 0 : onChipClick(rowIndex, colIndex, event, chipIndex, column.pinned);
13
- };
14
16
  if (!(column === null || column === void 0 ? void 0 : column.id) || !row)
15
17
  return null;
16
18
  const value = selector ? selector({ row, index, value: row[column === null || column === void 0 ? void 0 : column.id] }) : row[column === null || column === void 0 ? void 0 : column.id];
@@ -20,49 +22,72 @@ function TableRow({ row, columns, index, rowProps, isSheetView, selectedCell = n
20
22
  column,
21
23
  index,
22
24
  value: row[column === null || column === void 0 ? void 0 : column.id],
23
- selectionProps: { onClick: handleChipClick, rowIndex, colIndex, selectedId: selectedChip },
25
+ selectionProps: { onClick: handleChipClick(colIndex, column.pinned), rowIndex, colIndex, selectedId: selectedChip },
24
26
  })) : (_jsx(_Fragment, { children: formattedValue }));
25
- };
26
- const content = useMemo(() => (_jsx(_Fragment, { children: columns.map((column, colIndex) => {
27
- var _a, _b;
28
- const cellKey = `${(_a = column.pinned) !== null && _a !== void 0 ? _a : 'default'}-${index}-${colIndex}`;
29
- const isCellSelected = selectedCell === cellKey;
30
- const columnKey = `${(_b = column.pinned) !== null && _b !== void 0 ? _b : 'default'}-${colIndex}`;
31
- const isColumnSelected = selectedColumn === columnKey;
32
- const isRowSelected = selectedRow === index;
33
- const isSelected = isCellSelected || isColumnSelected || isRowSelected;
34
- const selectionStyles = getSelectionStyles({
35
- isSelected,
36
- isCellSelected,
37
- isColumnSelected,
38
- isRowSelected,
39
- isLastRow,
40
- });
41
- // Determine if this cell should be treated as first/last for border radius
42
- const isFirstColumn = column.id === columns[0].id;
43
- const isLastColumn = column.id === columns[columns.length - 1].id;
44
- // For scrollable table, adjust first/last based on pinned tables
45
- let effectiveFirst = isFirstColumn;
46
- let effectiveLast = isLastColumn;
47
- if (!column.pinned) {
48
- // If there are pinned start columns, scrollable table shouldn't have left border radius
49
- effectiveFirst = isFirstColumn && column.pinned !== 'start';
50
- // If there are pinned end columns, scrollable table shouldn't have right border radius
51
- effectiveLast = isLastColumn && column.pinned !== 'end';
52
- }
53
- // Handle border styling for row selection
54
- const rowSelectionBorderStyles = isRowSelected
55
- ? getRowSelectionBorderStyles({
56
- effectiveFirst,
57
- isPinnedStart: column.pinned === 'start',
58
- isPinnedEnd: column.pinned === 'end',
59
- })
60
- : {};
61
- const isIndexColumn = column.pinned === 'start' && effectiveFirst;
62
- 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) => {
63
- onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(index, colIndex, event, column.pinned);
64
- }, 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}`));
65
- }) })), [columns, row, index, selectedCell, selectedColumn, selectedRow, onCellClick, isLastRow, selectedChip, isSheetView]);
27
+ }, [row, index, selectedChip, handleChipClick]);
28
+ // Pre-compute if any selection is active
29
+ const hasActiveSelection = selectedCell !== null || selectedColumn !== null || selectedRow !== null;
30
+ // Memoize cell click handler
31
+ const handleCellClick = React.useCallback((colIndex, pinned) => (event) => {
32
+ onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(index, colIndex, event, pinned);
33
+ }, [onCellClick, index]);
34
+ const content = useMemo(() => {
35
+ var _a, _b;
36
+ const firstColumnId = (_a = columns[0]) === null || _a === void 0 ? void 0 : _a.id;
37
+ const lastColumnId = (_b = columns[columns.length - 1]) === null || _b === void 0 ? void 0 : _b.id;
38
+ const isRowSelected = selectedRow === index;
39
+ return (_jsx(_Fragment, { children: columns.map((column, colIndex) => {
40
+ var _a, _b;
41
+ // Early exit for invalid columns
42
+ if (!(column === null || column === void 0 ? void 0 : column.id))
43
+ return null;
44
+ // Cache cell identifiers
45
+ const cellKey = `${(_a = column.pinned) !== null && _a !== void 0 ? _a : 'default'}-${index}-${colIndex}`;
46
+ const columnKey = `${(_b = column.pinned) !== null && _b !== void 0 ? _b : 'default'}-${colIndex}`;
47
+ // Calculate selection states only if there's an active selection
48
+ const isCellSelected = hasActiveSelection && selectedCell === cellKey;
49
+ const isColumnSelected = hasActiveSelection && selectedColumn === columnKey;
50
+ const isSelected = hasActiveSelection && (isCellSelected || isColumnSelected || isRowSelected);
51
+ // getSelectionStyles already handles the empty return if !isSelected
52
+ const selectionStyles = getSelectionStyles({
53
+ isSelected,
54
+ isCellSelected,
55
+ isColumnSelected,
56
+ isRowSelected,
57
+ isLastRow,
58
+ });
59
+ // Determine if this cell should be treated as first/last for border radius
60
+ const isFirstColumn = column.id === firstColumnId;
61
+ const isLastColumn = column.id === lastColumnId;
62
+ // For scrollable table, adjust first/last based on pinned tables
63
+ const effectiveFirst = !column.pinned ? isFirstColumn && column.pinned !== 'start' : isFirstColumn;
64
+ const effectiveLast = !column.pinned ? isLastColumn && column.pinned !== 'end' : isLastColumn;
65
+ // Handle border styling for row selection only when needed
66
+ const rowSelectionBorderStyles = isRowSelected && hasActiveSelection
67
+ ? getRowSelectionBorderStyles({
68
+ effectiveFirst,
69
+ isPinnedStart: column.pinned === 'start',
70
+ isPinnedEnd: column.pinned === 'end',
71
+ })
72
+ : {};
73
+ const isIndexColumn = column.pinned === 'start' && effectiveFirst;
74
+ 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: handleCellClick(colIndex, column.pinned), 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}`));
75
+ }) }));
76
+ }, [
77
+ columns,
78
+ row,
79
+ index,
80
+ selectedCell,
81
+ selectedColumn,
82
+ selectedRow,
83
+ hasActiveSelection,
84
+ onCellClick,
85
+ isLastRow,
86
+ selectedChip,
87
+ isSheetView,
88
+ renderCell,
89
+ handleCellClick,
90
+ ]);
66
91
  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));
67
92
  }
68
93
  export default memo(TableRow, areEqual);
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  interface TableWrapperProps {
4
3
  showNoDataView?: boolean;
5
4
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
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.1.276",
5
- "testVersion": 0,
4
+ "version": "0.1.277-test.10-test.2",
5
+ "testVersion": 2,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",
@@ -164,4 +164,4 @@
164
164
  "publishConfig": {
165
165
  "registry": "https://registry.npmjs.org/"
166
166
  }
167
- }
167
+ }