@tap-payments/os-micro-frontend-shared 0.1.96-test.2 → 0.1.96-test.21

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 (136) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +12 -12
  3. package/build/components/ActionMenu/style.d.ts +1 -1
  4. package/build/components/AmountStatusChip/AmountStatusChip.d.ts +9 -0
  5. package/build/components/AmountStatusChip/AmountStatusChip.js +19 -0
  6. package/build/components/AmountStatusChip/index.d.ts +3 -0
  7. package/build/components/AmountStatusChip/index.js +2 -0
  8. package/build/components/AmountStatusChip/style.d.ts +3 -0
  9. package/build/components/AmountStatusChip/style.js +13 -0
  10. package/build/components/AppServices/AppServices.d.ts +10 -5
  11. package/build/components/AppServices/AppServices.js +16 -18
  12. package/build/components/AppServices/ServiceItem.d.ts +2 -4
  13. package/build/components/AppServices/ServiceItem.js +2 -4
  14. package/build/components/AppServicesBar/AppServicesBar.d.ts +22 -0
  15. package/build/components/AppServicesBar/AppServicesBar.js +18 -0
  16. package/build/components/AppServicesBar/index.d.ts +3 -0
  17. package/build/components/AppServicesBar/index.js +3 -0
  18. package/build/components/AppServicesBar/style.d.ts +4 -0
  19. package/build/components/AppServicesBar/style.js +6 -0
  20. package/build/components/AppWindowWrapper/headers/AccountHeader/components/AccountHeaderTitle/AccountHeaderTitle.d.ts +1 -1
  21. package/build/components/AppWindowWrapper/headers/AccountHeader/components/AccountHeaderTitle/AccountHeaderTitle.js +1 -1
  22. package/build/components/AppWindowWrapper/headers/AppWindowHeader/AppWindowHeaderBase.d.ts +1 -1
  23. package/build/components/AppWindowWrapper/headers/AppWindowHeader/AppWindowHeaderBase.js +2 -2
  24. package/build/components/AuthenticationTypeChip/AuthenticationTypeChip.d.ts +9 -0
  25. package/build/components/AuthenticationTypeChip/AuthenticationTypeChip.js +21 -0
  26. package/build/components/AuthenticationTypeChip/constants.d.ts +16 -0
  27. package/build/components/AuthenticationTypeChip/constants.js +13 -0
  28. package/build/components/AuthenticationTypeChip/index.d.ts +3 -0
  29. package/build/components/AuthenticationTypeChip/index.js +2 -0
  30. package/build/components/ColorPicker/ColorPicker.d.ts +4 -1
  31. package/build/components/ColorPicker/ColorPicker.js +10 -43
  32. package/build/components/ColorPicker/ColorPickerPanel.d.ts +7 -0
  33. package/build/components/ColorPicker/ColorPickerPanel.js +41 -0
  34. package/build/components/ColorPicker/ColorSchemeSelect.d.ts +7 -0
  35. package/build/components/ColorPicker/ColorSchemeSelect.js +35 -0
  36. package/build/components/ColorPicker/HexaFields.d.ts +7 -0
  37. package/build/components/ColorPicker/HexaFields.js +79 -0
  38. package/build/components/ColorPicker/RGBAFields.d.ts +7 -0
  39. package/build/components/ColorPicker/RGBAFields.js +25 -0
  40. package/build/components/ColorPicker/style.d.ts +20 -9
  41. package/build/components/ColorPicker/style.js +49 -2
  42. package/build/components/JSONViewer/components/JSONTitleBar/JSONTitleBar.d.ts +1 -1
  43. package/build/components/JSONViewer/components/JSONTitleBar/JSONTitleBar.js +1 -1
  44. package/build/components/ListLayout/ListLayout.d.ts +10 -0
  45. package/build/components/ListLayout/ListLayout.js +20 -0
  46. package/build/components/ListLayout/index.d.ts +2 -0
  47. package/build/components/ListLayout/index.js +2 -0
  48. package/build/components/ListLayout/styles.d.ts +4 -0
  49. package/build/components/ListLayout/styles.js +9 -0
  50. package/build/components/RightLeftExpandingCenterChip/style.js +0 -2
  51. package/build/components/SearchButton/styles.d.ts +1 -1
  52. package/build/components/StatusChip/StatusChip.d.ts +1 -1
  53. package/build/components/StatusChip/StatusChip.js +13 -10
  54. package/build/components/StatusChip/style.d.ts +4 -0
  55. package/build/components/StatusChip/style.js +13 -5
  56. package/build/components/StatusChip/type.d.ts +4 -0
  57. package/build/components/StatusChipWithCopy/StatusChipWithCopy.d.ts +2 -1
  58. package/build/components/StatusChipWithCopy/StatusChipWithCopy.js +2 -2
  59. package/build/components/StatusIcons/AuthorizationAutoIcons/style.js +1 -1
  60. package/build/components/TableCells/CustomCells/ActionCell/constant.d.ts +1 -0
  61. package/build/components/TableCells/CustomCells/ActionCell/constant.js +2 -1
  62. package/build/components/TableCells/CustomCells/ActionCell/hooks/useActionCell.d.ts +1 -1
  63. package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +1 -1
  64. package/build/components/TableCells/CustomCells/ApplicationStatusCell/ApplicationStatusCell.js +4 -4
  65. package/build/components/TableCells/CustomCells/BalanceCell/style.js +1 -1
  66. package/build/components/TableCells/CustomCells/ProductsCell/style.js +1 -1
  67. package/build/components/TableCells/CustomCells/RefundChargeCell/style.js +1 -1
  68. package/build/components/TableCells/CustomCells/RefundStatusCell/style.js +1 -1
  69. package/build/components/TableCells/CustomCells/style.js +1 -1
  70. package/build/components/TableCells/SheetViewCells/PaymentAgreementCell/PaymentAgreementCell.d.ts +13 -0
  71. package/build/components/TableCells/SheetViewCells/PaymentAgreementCell/PaymentAgreementCell.js +26 -0
  72. package/build/components/TableCells/SheetViewCells/PaymentAgreementCell/index.d.ts +1 -0
  73. package/build/components/TableCells/SheetViewCells/PaymentAgreementCell/index.js +1 -0
  74. package/build/components/TableCells/SheetViewCells/index.d.ts +1 -0
  75. package/build/components/TableCells/SheetViewCells/index.js +1 -0
  76. package/build/components/TableCells/index.d.ts +1 -0
  77. package/build/components/TableCells/index.js +1 -0
  78. package/build/components/ToggleView/ToggleView.d.ts +16 -0
  79. package/build/components/ToggleView/ToggleView.js +32 -0
  80. package/build/components/ToggleView/ToggleWrapper.d.ts +4 -0
  81. package/build/components/ToggleView/ToggleWrapper.js +8 -0
  82. package/build/components/ToggleView/index.d.ts +3 -0
  83. package/build/components/ToggleView/index.js +3 -0
  84. package/build/components/ToggleView/style.d.ts +14 -0
  85. package/build/components/ToggleView/style.js +31 -0
  86. package/build/components/ToggleView/types.d.ts +6 -0
  87. package/build/components/ToggleView/types.js +6 -0
  88. package/build/components/Toolbar/style.d.ts +5 -2
  89. package/build/components/Toolbar/style.js +6 -1
  90. package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.d.ts +1 -1
  91. package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.js +2 -2
  92. package/build/components/VirtualTables/SheetViewVirtualTable/components/LoadingMainTable.js +2 -0
  93. package/build/components/VirtualTables/SheetViewVirtualTable/components/MainTable.js +5 -1
  94. package/build/components/VirtualTables/SheetViewVirtualTable/components/PinnedColumn.js +5 -1
  95. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableLoading.d.ts +1 -4
  96. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableLoading.js +39 -7
  97. package/build/components/VirtualTables/VirtualTable/VirtualTable.d.ts +1 -1
  98. package/build/components/VirtualTables/VirtualTable/VirtualTable.js +2 -2
  99. package/build/components/VirtualTables/VirtualTableWithCard/VirtualTableWithCard.d.ts +1 -1
  100. package/build/components/VirtualTables/VirtualTableWithCard/VirtualTableWithCard.js +2 -2
  101. package/build/components/VirtualTables/components/TableRow.js +2 -1
  102. package/build/components/Window/Window.d.ts +2 -1
  103. package/build/components/Window/Window.js +2 -2
  104. package/build/components/Window/style.d.ts +1 -0
  105. package/build/components/Window/style.js +1 -1
  106. package/build/components/index.d.ts +8 -0
  107. package/build/components/index.js +8 -0
  108. package/build/constants/apps.d.ts +41 -0
  109. package/build/constants/apps.js +19 -2
  110. package/build/constants/chips/index.d.ts +1 -0
  111. package/build/constants/chips/index.js +1 -0
  112. package/build/{components/StatusChip/constants.d.ts → constants/chips/statusChips.d.ts} +1 -1
  113. package/build/{components/StatusChip/constants.js → constants/chips/statusChips.js} +1 -1
  114. package/build/constants/index.d.ts +1 -0
  115. package/build/constants/index.js +1 -0
  116. package/build/constants/table/cell/authenticationsTableCellWidth.d.ts +1 -1
  117. package/build/constants/table/cell/authenticationsTableCellWidth.js +1 -1
  118. package/build/constants/table/cell/authorizationTableCellWidth.d.ts +4 -4
  119. package/build/constants/table/cell/authorizationTableCellWidth.js +4 -4
  120. package/build/constants/table/cell/chargeTableCellWidth.d.ts +3 -3
  121. package/build/constants/table/cell/chargeTableCellWidth.js +3 -3
  122. package/build/constants/table/cell/destinationsTableCellWidth.d.ts +3 -3
  123. package/build/constants/table/cell/destinationsTableCellWidth.js +3 -3
  124. package/build/constants/table/cell/merchantsTableCellWidth.d.ts +1 -1
  125. package/build/constants/table/cell/merchantsTableCellWidth.js +1 -1
  126. package/build/constants/table/cell/refundTableCellWidth.d.ts +3 -3
  127. package/build/constants/table/cell/refundTableCellWidth.js +3 -3
  128. package/build/types/apps.d.ts +50 -1
  129. package/build/types/table.d.ts +1 -1
  130. package/build/utils/color.d.ts +11 -0
  131. package/build/utils/color.js +27 -0
  132. package/build/utils/object.d.ts +1 -0
  133. package/build/utils/object.js +4 -3
  134. package/build/utils/table.d.ts +3 -6
  135. package/build/utils/table.js +6 -32
  136. package/package.json +29 -2
@@ -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
  }, {}, {}>;
@@ -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}.00%, transparent 0.00%)`,
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}.00%, transparent 0.00%)`,
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}.00%, transparent 0.00%)`,
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}.00%, transparent 0.00%)`,
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}.00%, transparent 0.00%)`,
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,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;
@@ -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';
@@ -0,0 +1 @@
1
+ export * from './PaymentAgreementCell';
@@ -0,0 +1 @@
1
+ export * from './PaymentAgreementCell';
@@ -1,3 +1,4 @@
1
1
  export { default as TableCell } from './TableCell';
2
2
  export * from './CustomCells';
3
+ export * from './SheetViewCells';
3
4
  export * from './type';
@@ -1,3 +1,4 @@
1
1
  export { default as TableCell } from './TableCell';
2
2
  export * from './CustomCells';
3
+ export * from './SheetViewCells';
3
4
  export * from './type';
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { ToggleViews, ToggleViewsValues } from './types';
3
+ declare const DEFAULT_TOGGLE_VIEWS: {
4
+ icon: import("react/jsx-runtime").JSX.Element;
5
+ value: ToggleViews;
6
+ }[];
7
+ export interface ToggleViewProps {
8
+ onToggleClick: (view: ToggleViewsValues) => void;
9
+ currentView: ToggleViewsValues;
10
+ getOverrideViews?: (defaultViews: typeof DEFAULT_TOGGLE_VIEWS) => {
11
+ icon: React.ReactNode;
12
+ value: ToggleViewsValues;
13
+ }[];
14
+ }
15
+ declare const ToggleView: (props: ToggleViewProps) => import("react/jsx-runtime").JSX.Element | null;
16
+ export default ToggleView;
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cardViewButtonIcon, listViewButtonIcon } from '../../constants/index.js';
3
+ import { ActiveOverlay, ViewButton } from './style';
4
+ import { ToggleViews } from './types';
5
+ import { useMemo } from 'react';
6
+ import ToggleWrapper from './ToggleWrapper';
7
+ const DEFAULT_TOGGLE_VIEWS = [
8
+ {
9
+ icon: _jsx("img", { src: cardViewButtonIcon, alt: "card" }),
10
+ value: ToggleViews.CARDS,
11
+ },
12
+ {
13
+ icon: _jsx("img", { src: listViewButtonIcon, alt: ToggleViews.LIST }),
14
+ value: ToggleViews.LIST,
15
+ },
16
+ ];
17
+ const ToggleView = (props) => {
18
+ const { currentView, onToggleClick, getOverrideViews } = props;
19
+ const views = useMemo(() => {
20
+ if (getOverrideViews)
21
+ return getOverrideViews(DEFAULT_TOGGLE_VIEWS);
22
+ return DEFAULT_TOGGLE_VIEWS;
23
+ }, [getOverrideViews]);
24
+ const viewIndex = useMemo(() => views.findIndex((view) => view.value === currentView), [views, currentView]);
25
+ if (!onToggleClick)
26
+ return null;
27
+ return (_jsxs(ToggleWrapper, { children: [views.map((view) => (_jsx(ViewButton, Object.assign({ onClick: () => onToggleClick(view.value), sx: {
28
+ height: '11.6px',
29
+ width: '11.6px',
30
+ }, isActive: currentView === view.value }, { children: view.icon }), view.value))), _jsx(ActiveOverlay, { activeIndex: viewIndex })] }));
31
+ };
32
+ export default ToggleView;
@@ -0,0 +1,4 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { type BoxProps } from '@mui/material/Box';
3
+ declare const ToggleWrapper: (props: PropsWithChildren<BoxProps>) => import("react/jsx-runtime").JSX.Element;
4
+ export default ToggleWrapper;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { ToggleWrapperStyled } from './style';
4
+ const ToggleWrapper = (props) => {
5
+ const viewTogglers = React.Children.count(props.children) - 1;
6
+ return _jsx(ToggleWrapperStyled, Object.assign({}, props, { sx: { width: viewTogglers * 30 + 2 } }));
7
+ };
8
+ export default ToggleWrapper;
@@ -0,0 +1,3 @@
1
+ import ToggleView from './ToggleView';
2
+ export default ToggleView;
3
+ export * from './types';
@@ -0,0 +1,3 @@
1
+ import ToggleView from './ToggleView';
2
+ export default ToggleView;
3
+ export * from './types';
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ export declare const ToggleWrapperStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
5
+ export declare const ViewButton: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
6
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
7
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
8
+ isActive: boolean;
9
+ }, {}, {}>;
10
+ export declare const ActiveOverlay: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
11
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
12
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
13
+ activeIndex: number;
14
+ }, {}, {}>;
@@ -0,0 +1,31 @@
1
+ import { Box, styled } from '@mui/material';
2
+ export const ToggleWrapperStyled = styled(Box)(({ theme }) => ({
3
+ height: '32px',
4
+ borderRadius: '4px',
5
+ backgroundColor: theme.palette.action.hover,
6
+ padding: '2px',
7
+ display: 'flex',
8
+ alignItems: 'center',
9
+ position: 'relative',
10
+ cursor: 'pointer',
11
+ }));
12
+ export const ViewButton = styled(Box, { shouldForwardProp: (props) => props !== 'isActive' })(({ isActive }) => ({
13
+ flex: 1,
14
+ display: 'flex',
15
+ justifyContent: 'center',
16
+ alignItems: 'center',
17
+ position: 'relative',
18
+ zIndex: 2,
19
+ opacity: isActive ? 1 : 0.5,
20
+ }));
21
+ export const ActiveOverlay = styled(Box, { shouldForwardProp: (props) => props !== 'activeIndex' })(({ theme, activeIndex }) => ({
22
+ position: 'absolute',
23
+ top: 2,
24
+ left: activeIndex * 30 + 2,
25
+ transition: 'all 0.25s ease-in-out',
26
+ width: '28px',
27
+ height: '28px',
28
+ backgroundColor: theme.palette.common.white,
29
+ borderRadius: '2px',
30
+ boxShadow: '0px 0px 4px 0px rgba(0, 0, 0, 0.20)',
31
+ }));
@@ -0,0 +1,6 @@
1
+ export declare enum ToggleViews {
2
+ LIST = "LIST",
3
+ CARDS = "CARDS",
4
+ MAP = "MAP"
5
+ }
6
+ export type ToggleViewsValues = `${ToggleViews}` | (string & {});
@@ -0,0 +1,6 @@
1
+ export var ToggleViews;
2
+ (function (ToggleViews) {
3
+ ToggleViews["LIST"] = "LIST";
4
+ ToggleViews["CARDS"] = "CARDS";
5
+ ToggleViews["MAP"] = "MAP";
6
+ })(ToggleViews || (ToggleViews = {}));
@@ -9,10 +9,14 @@ export declare const StyledBox: import("@emotion/styled").StyledComponent<import
9
9
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
10
10
  }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
11
11
  export declare const StyledHeaderWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
12
- sandboxMode?: boolean | undefined;
13
12
  maximized?: boolean | undefined;
14
13
  isDragging?: boolean | undefined;
15
14
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
15
+ export declare const StyledAppHeaderWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
16
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
17
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
18
+ isDragging?: boolean | undefined;
19
+ }, {}, {}>;
16
20
  export declare const ToolbarStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
17
21
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
18
22
  }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
@@ -20,7 +24,6 @@ export declare const ToolbarStyled: import("@emotion/styled").StyledComponent<im
20
24
  isHovered?: boolean | undefined;
21
25
  }, {}, {}>;
22
26
  export declare const StyledHeaderWrapperStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
23
- sandboxMode?: boolean | undefined;
24
27
  maximized?: boolean | undefined;
25
28
  isDragging?: boolean | undefined;
26
29
  } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, {}, {}>;
@@ -38,12 +38,17 @@ export const StyledBox = styled(Box)(({ theme }) => ({
38
38
  }));
39
39
  export const StyledHeaderWrapper = styled('div', {
40
40
  shouldForwardProp: (prop) => prop !== 'sandboxMode' && prop !== 'maximized' && prop !== 'isDragging',
41
- })(({ theme, sandboxMode, maximized, isDragging }) => (Object.assign(Object.assign(Object.assign({ background: sandboxMode ? theme.palette.common.lightOrange : theme.palette.background.transparent[0], backdropFilter: 'blur(32px)' }, (!maximized && {
41
+ })(({ maximized, isDragging }) => (Object.assign(Object.assign(Object.assign({}, (!maximized && {
42
42
  borderTopRightRadius: 12,
43
43
  borderTopLeftRadius: 12,
44
44
  })), (isDragging && {
45
45
  cursor: 'move',
46
46
  })), { margin: 0 })));
47
+ export const StyledAppHeaderWrapper = styled(Box, {
48
+ shouldForwardProp: (prop) => prop !== 'maximized' && prop !== 'isDragging',
49
+ })(({ isDragging }) => (Object.assign(Object.assign({}, (isDragging && {
50
+ cursor: 'move',
51
+ })), { margin: 0 })));
47
52
  export const ToolbarStyled = styled(Box, {
48
53
  shouldForwardProp: (props) => props !== 'maximized' && props !== 'isHovered',
49
54
  })(({ theme, maximized }) => (Object.assign(Object.assign({ height: 32, position: 'relative', display: 'flex', width: '100%', justifyContent: 'center', transition: 'all 0.5s ease-in-out', borderTopLeftRadius: '12px', borderTopRightRadius: '12px' }, (maximized && {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { ISheetViewVirtualTable } from './types';
3
- declare function SheetViewVirtualTable({ columns, rows, threshold, showHeader, headerProps, rowProps, footerProps, rowHeight, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded, tableBodyStyles, tableTitle, dragControls, onColumnPin, clearBackdropVisibilityTimeout, isPinnable, tableMode, overscanCount, }: Readonly<ISheetViewVirtualTable>): import("react/jsx-runtime").JSX.Element;
3
+ declare function SheetViewVirtualTable({ columns, rows, threshold, showHeader, headerProps, rowProps, footerProps, rowHeight, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded, tableBodyStyles, tableTitle, onStartDrag, onColumnPin, clearBackdropVisibilityTimeout, isPinnable, tableMode, overscanCount, }: Readonly<ISheetViewVirtualTable>): import("react/jsx-runtime").JSX.Element;
4
4
  declare const _default: import("react").MemoExoticComponent<typeof SheetViewVirtualTable>;
5
5
  export default _default;
@@ -6,7 +6,7 @@ import { SheetViewTableContainer } from '../components/style';
6
6
  import { SheetViewVirtualTableWrapper } from './style';
7
7
  import { usePinnedColumns, useSynchronizedScroll, useTableState, useTableData, useVirtualTableContainer, usePinnedColumnsWidths } from './hooks';
8
8
  import { PinnedColumn, MainTable, LoadingMainTable, NoDataView, VirtualTable } from './components';
9
- function SheetViewVirtualTable({ columns, rows, threshold = SHEET_VIEW_TABLE_THRESHOLD, showHeader, headerProps, rowProps, footerProps, rowHeight = 28, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded = false, tableBodyStyles, tableTitle, dragControls, onColumnPin, clearBackdropVisibilityTimeout = 100, isPinnable = false, tableMode, overscanCount, }) {
9
+ function SheetViewVirtualTable({ columns, rows, threshold = SHEET_VIEW_TABLE_THRESHOLD, showHeader, headerProps, rowProps, footerProps, rowHeight = 28, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded = false, tableBodyStyles, tableTitle, onStartDrag, onColumnPin, clearBackdropVisibilityTimeout = 100, isPinnable = false, tableMode, overscanCount, }) {
10
10
  const { selectedCell, selectedColumn, selectedRow, showBackDrop, setShowBackdrop, handleCellClick, handleColumnClick, handleChipClick, selectedChip, } = useTableState();
11
11
  const { isError, tableLoading, tableError, tableEmpty, hasTimeoutError, showNoDataView, lastItemIndex, areTotalRowsNotFillingHeight, itemsCount, isDelayedFetchingNextPage, } = useTableData({
12
12
  rows,
@@ -35,7 +35,7 @@ function SheetViewVirtualTable({ columns, rows, threshold = SHEET_VIEW_TABLE_THR
35
35
  handleChipClick,
36
36
  });
37
37
  const onPointerDown = (e) => {
38
- dragControls === null || dragControls === void 0 ? void 0 : dragControls.start(e);
38
+ onStartDrag === null || onStartDrag === void 0 ? void 0 : onStartDrag(e);
39
39
  };
40
40
  const createVirtualTableContainer = useCallback((columnsData, containerKey, isPinned = false, fixedWidth) => {
41
41
  const listRef = containerKey === 'pinnedStart' ? pinnedStartVirtualListRef : containerKey === 'pinnedEnd' ? pinnedEndVirtualListRef : scrollableVirtualListRef;
@@ -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" }, { children: tableLoading ? (_jsx(SheetViewTableLoading, { "data-testid": "SheetViewVirtualTable_TableLoading", columns: unpinnedColumnsData, isLoading: true, isPinned: false })) : (createVirtualTableContainer(unpinnedColumnsData, 'scrollable', false)) })) }))] })) })) })));
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" }, { children: tableLoading ? (_jsx(SheetViewTableLoading, { "data-testid": `SheetViewVirtualTable_PinnedTableLoading_${position}`, columns: columnsData, isLoading: true, isPinned: true })) : (createVirtualTableContainer(columnsData, containerKey, true, columnsWidth)) })) }))] })) }));
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);
@@ -7,10 +7,7 @@ interface ISheetViewTableLoadingProps {
7
7
  isLoading?: boolean;
8
8
  rowsCount?: number;
9
9
  isPinned?: boolean;
10
- tableType?: string;
11
- containerHeight?: number;
12
- isCompact?: boolean;
13
10
  }
14
- declare function SheetViewTableLoading({ columns, isLoaded, animationType, isLoading, rowsCount, isPinned, tableType, containerHeight, isCompact, }: ISheetViewTableLoadingProps): import("react/jsx-runtime").JSX.Element;
11
+ declare function SheetViewTableLoading({ columns, isLoaded, animationType, isLoading, rowsCount, isPinned, }: ISheetViewTableLoadingProps): import("react/jsx-runtime").JSX.Element;
15
12
  declare const _default: import("react").MemoExoticComponent<typeof SheetViewTableLoading>;
16
13
  export default _default;
@@ -1,21 +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
- import { calculateSheetViewMaxRows, getSheetViewRowHeight } from '../../../../utils/index.js';
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, tableType = 'default', containerHeight, isCompact = false, }) {
15
- const availableHeight = containerHeight || window.innerHeight * 0.8;
16
- const rowHeight = getSheetViewRowHeight();
17
- const maxAllowedRows = calculateSheetViewMaxRows(availableHeight, rowHeight);
18
- console.log({ maxAllowedRows, availableHeight, rowHeight, tableType, isCompact, containerHeight });
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]);
19
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_')}`))) })));
20
52
  }
21
53
  export default memo(SheetViewTableLoading);
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import type { IVirtualTable } from '../../../types/index.js';
3
- declare function VirtualTable({ columns, rows, threshold, showHeader, headerProps, rowProps, footerProps, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded, tableBodyStyles, tableMode, tableTitle, dragControls, isSheetView, isMinimized, }: Readonly<IVirtualTable>): import("react/jsx-runtime").JSX.Element;
3
+ declare function VirtualTable({ columns, rows, threshold, showHeader, headerProps, rowProps, footerProps, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded, tableBodyStyles, tableMode, tableTitle, onStartDrag, isSheetView, isMinimized, }: Readonly<IVirtualTable>): import("react/jsx-runtime").JSX.Element;
4
4
  declare const _default: import("react").MemoExoticComponent<typeof VirtualTable>;
5
5
  export default _default;
@@ -34,11 +34,11 @@ const createItemData = memoize((columns, isLoading, rows, rowProps, scrollToInde
34
34
  areAllRowsLoaded,
35
35
  isSheetView,
36
36
  }));
37
- function VirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, showHeader, headerProps, rowProps, footerProps, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded = false, tableBodyStyles, tableMode, tableTitle, dragControls, isSheetView = false, isMinimized, }) {
37
+ function VirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, showHeader, headerProps, rowProps, footerProps, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded = false, tableBodyStyles, tableMode, tableTitle, onStartDrag, isSheetView = false, isMinimized, }) {
38
38
  var _a;
39
39
  const theme = useTheme();
40
40
  const onPointerDown = (e) => {
41
- dragControls === null || dragControls === void 0 ? void 0 : dragControls.start(e);
41
+ onStartDrag === null || onStartDrag === void 0 ? void 0 : onStartDrag(e);
42
42
  };
43
43
  const isDelayedFetchingNextPage = useDelayToSetValue({
44
44
  value: isFetchingNextPage,
@@ -8,6 +8,6 @@ export interface VirtualTableWithCardProps extends Omit<IVirtualTable, 'showHead
8
8
  tableHeight: number;
9
9
  tableHeaderHeight?: number;
10
10
  }
11
- declare function VirtualTableWithCard({ rows, threshold, rowProps, footerProps, rowHeight, isLoading, error, tableHeader, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded, tableBodyStyles, tableMode, tableTitle, renderCardComponent, cardLoadingComponent, tableHeight, tableHeaderHeight, noDataComponent, dragControls, }: VirtualTableWithCardProps): import("react/jsx-runtime").JSX.Element;
11
+ declare function VirtualTableWithCard({ rows, threshold, rowProps, footerProps, rowHeight, isLoading, error, tableHeader, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded, tableBodyStyles, tableMode, tableTitle, renderCardComponent, cardLoadingComponent, tableHeight, tableHeaderHeight, noDataComponent, onStartDrag, }: Readonly<VirtualTableWithCardProps>): import("react/jsx-runtime").JSX.Element;
12
12
  declare const _default: import("react").MemoExoticComponent<typeof VirtualTableWithCard>;
13
13
  export default _default;
@@ -32,11 +32,11 @@ const createItemData = memoize((isLoading, rows, rowProps, scrollToIndex, lastIt
32
32
  areAllRowsLoaded,
33
33
  renderCardComponent,
34
34
  }));
35
- function VirtualTableWithCard({ rows, threshold = TABLE_THRESHOLD, rowProps, footerProps, rowHeight = TABLE_ROW_HEIGHT, isLoading, error, tableHeader, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded = false, tableBodyStyles, tableMode, tableTitle, renderCardComponent, cardLoadingComponent, tableHeight, tableHeaderHeight, noDataComponent, dragControls, }) {
35
+ function VirtualTableWithCard({ rows, threshold = TABLE_THRESHOLD, rowProps, footerProps, rowHeight = TABLE_ROW_HEIGHT, isLoading, error, tableHeader, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded = false, tableBodyStyles, tableMode, tableTitle, renderCardComponent, cardLoadingComponent, tableHeight, tableHeaderHeight, noDataComponent, onStartDrag, }) {
36
36
  var _a;
37
37
  const theme = useTheme();
38
38
  const onPointerDown = (e) => {
39
- dragControls === null || dragControls === void 0 ? void 0 : dragControls.start(e);
39
+ onStartDrag === null || onStartDrag === void 0 ? void 0 : onStartDrag(e);
40
40
  };
41
41
  const isDelayedFetchingNextPage = useDelayToSetValue({
42
42
  value: isFetchingNextPage,
@@ -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
  }
@@ -18,7 +18,8 @@ interface WindowWrapperProps {
18
18
  order?: number;
19
19
  openOrder?: number;
20
20
  };
21
+ sandboxMode?: boolean;
21
22
  }
22
- declare function WindowWrapper({ children, id, onResize, isMaximized, isMinimized, dragControls, onClick, options: { width, height, minHeight, minWidth, maxHeight, maxWidth, order, openOrder }, }: WindowWrapperProps): import("react/jsx-runtime").JSX.Element;
23
+ declare function WindowWrapper({ children, id, onResize, isMaximized, isMinimized, dragControls, onClick, options: { width, height, minHeight, minWidth, maxHeight, maxWidth, order, openOrder }, sandboxMode, }: Readonly<WindowWrapperProps>): import("react/jsx-runtime").JSX.Element;
23
24
  declare const _default: import("react").MemoExoticComponent<typeof WindowWrapper>;
24
25
  export default _default;