@tap-payments/os-micro-frontend-shared 0.1.22 → 0.1.24-test.1

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 (100) hide show
  1. package/build/components/AccountDropdown/style.d.ts +1 -1
  2. package/build/components/ActivityAreaChart/styles.d.ts +3 -3
  3. package/build/components/AppServices/style.d.ts +1 -1
  4. package/build/components/CircularProgressWithLabel/style.d.ts +1 -1
  5. package/build/components/DockButton/style.d.ts +1 -1
  6. package/build/components/FileUpload/style.d.ts +2 -2
  7. package/build/components/FileUploader/style.d.ts +1 -1
  8. package/build/components/IconWithBadge/IconWithBadge.d.ts +1 -1
  9. package/build/components/IconWithBadge/IconWithBadge.js +2 -2
  10. package/build/components/IconWithBadge/type.d.ts +1 -0
  11. package/build/components/IconWithLabel/style.d.ts +1 -1
  12. package/build/components/IconsDropdown/style.d.ts +2 -2
  13. package/build/components/JSONViewer/style.d.ts +1 -1
  14. package/build/components/LabeledIconDropdown/style.d.ts +3 -3
  15. package/build/components/MultiSelectWithSearch/style.d.ts +3 -3
  16. package/build/components/NestedDropdown/styles.d.ts +1 -1
  17. package/build/components/ProgressBar/style.d.ts +1 -1
  18. package/build/components/ProgressRing/style.d.ts +2 -2
  19. package/build/components/RFH/Inputs/SelectWithAccordion/style.d.ts +3 -3
  20. package/build/components/SelectDropdown/style.d.ts +1 -1
  21. package/build/components/SelectWithSearch/style.d.ts +3 -3
  22. package/build/components/StatusBar/StatusBar.js +3 -2
  23. package/build/components/StatusIcons/SourceIcons/SourceIcons.js +2 -2
  24. package/build/components/StatusLabel/style.d.ts +1 -1
  25. package/build/components/TableCells/CustomCells/AppsCell/AppsCell.js +3 -0
  26. package/build/components/TableCells/CustomCells/BrandsCell/BrandsCell.d.ts +1 -1
  27. package/build/components/TableCells/CustomCells/BrandsCell/BrandsCell.js +3 -8
  28. package/build/components/TableCells/CustomCells/BrandsCell/type.d.ts +1 -0
  29. package/build/components/TableCells/CustomCells/DestinationCell/DestinationCell.js +2 -2
  30. package/build/components/TableCells/CustomCells/EntityCell/EntityCell.d.ts +1 -1
  31. package/build/components/TableCells/CustomCells/EntityCell/EntityCell.js +2 -2
  32. package/build/components/TableCells/CustomCells/EntityCell/type.d.ts +1 -0
  33. package/build/components/TableCells/CustomCells/LeadStatusCell/LeadStatusCell.d.ts +2 -0
  34. package/build/components/TableCells/CustomCells/LeadStatusCell/LeadStatusCell.js +25 -0
  35. package/build/components/TableCells/CustomCells/LeadStatusCell/constant.d.ts +7 -0
  36. package/build/components/TableCells/CustomCells/LeadStatusCell/constant.js +8 -0
  37. package/build/components/TableCells/CustomCells/LeadStatusCell/index.d.ts +1 -0
  38. package/build/components/TableCells/CustomCells/LeadStatusCell/index.js +1 -0
  39. package/build/components/TableCells/CustomCells/LeadStatusCell/style.d.ts +2 -0
  40. package/build/components/TableCells/CustomCells/LeadStatusCell/style.js +12 -0
  41. package/build/components/TableCells/CustomCells/LeadStatusCell/type.d.ts +6 -0
  42. package/build/components/TableCells/CustomCells/index.d.ts +2 -0
  43. package/build/components/TableCells/CustomCells/index.js +2 -0
  44. package/build/components/TableHeader/style.d.ts +1 -1
  45. package/build/components/Timepicker/style.d.ts +2 -2
  46. package/build/components/ToolbarIcon/ExpandButton/style.d.ts +1 -1
  47. package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.d.ts +1 -6
  48. package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.js +59 -161
  49. package/build/components/VirtualTables/SheetViewVirtualTable/components/LoadingMainTable.d.ts +5 -0
  50. package/build/components/VirtualTables/SheetViewVirtualTable/components/LoadingMainTable.js +19 -0
  51. package/build/components/VirtualTables/SheetViewVirtualTable/components/MainTable.d.ts +5 -0
  52. package/build/components/VirtualTables/SheetViewVirtualTable/components/MainTable.js +15 -0
  53. package/build/components/VirtualTables/SheetViewVirtualTable/components/NoDataView.d.ts +5 -0
  54. package/build/components/VirtualTables/SheetViewVirtualTable/components/NoDataView.js +13 -0
  55. package/build/components/VirtualTables/SheetViewVirtualTable/components/PinnedColumn.d.ts +5 -0
  56. package/build/components/VirtualTables/SheetViewVirtualTable/components/PinnedColumn.js +20 -0
  57. package/build/components/VirtualTables/SheetViewVirtualTable/components/{SheetViewTableHeader/SheetViewTableHeader.d.ts → SheetViewTableHeader.d.ts} +1 -1
  58. package/build/components/VirtualTables/SheetViewVirtualTable/components/{SheetViewTableHeader/SheetViewTableHeader.js → SheetViewTableHeader.js} +3 -3
  59. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableHeaderCell.d.ts +14 -0
  60. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableHeaderCell.js +49 -0
  61. package/build/components/VirtualTables/SheetViewVirtualTable/components/VirtualTable.d.ts +44 -0
  62. package/build/components/VirtualTables/SheetViewVirtualTable/components/VirtualTable.js +33 -0
  63. package/build/components/VirtualTables/SheetViewVirtualTable/components/index.d.ts +6 -0
  64. package/build/components/VirtualTables/SheetViewVirtualTable/components/index.js +6 -0
  65. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/index.d.ts +6 -0
  66. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/index.js +6 -0
  67. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/usePinnedColumnsWidths.d.ts +5 -0
  68. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/usePinnedColumnsWidths.js +15 -0
  69. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useTableData.d.ts +20 -0
  70. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useTableData.js +40 -0
  71. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useTableState.d.ts +15 -0
  72. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useTableState.js +31 -0
  73. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useVirtualTableContainer.d.ts +44 -0
  74. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useVirtualTableContainer.js +53 -0
  75. package/build/components/VirtualTables/SheetViewVirtualTable/index.d.ts +2 -0
  76. package/build/components/VirtualTables/SheetViewVirtualTable/index.js +2 -0
  77. package/build/components/VirtualTables/SheetViewVirtualTable/types.d.ts +89 -0
  78. package/build/components/VirtualTables/SheetViewVirtualTable/types.js +1 -0
  79. package/build/components/VirtualTables/components/TableFooter/style.d.ts +2 -2
  80. package/build/components/VirtualTables/components/TableHeader/components/TableCell/TableCell.js +7 -5
  81. package/build/components/VirtualTables/components/TableRow.js +1 -1
  82. package/build/components/VirtualTables/components/style.d.ts +3 -0
  83. package/build/components/VirtualTables/components/style.js +6 -0
  84. package/build/components/Widget/style.d.ts +1 -1
  85. package/build/components/WindowAppIcon/style.d.ts +1 -1
  86. package/build/constants/assets.d.ts +5 -0
  87. package/build/constants/assets.js +5 -0
  88. package/build/utils/index.d.ts +1 -0
  89. package/build/utils/index.js +1 -0
  90. package/build/utils/style.d.ts +9 -0
  91. package/build/utils/style.js +62 -0
  92. package/package.json +3 -3
  93. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableHeader/TableCell.d.ts +0 -14
  94. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableHeader/TableCell.js +0 -46
  95. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableHeader/index.d.ts +0 -2
  96. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableHeader/index.js +0 -2
  97. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableHeader/type.d.ts +0 -19
  98. package/build/components/VirtualTables/utils/getSelectionStyles.d.ts +0 -55
  99. package/build/components/VirtualTables/utils/getSelectionStyles.js +0 -31
  100. /package/build/components/{VirtualTables/SheetViewVirtualTable/components/SheetViewTableHeader → TableCells/CustomCells/LeadStatusCell}/type.js +0 -0
@@ -1,14 +0,0 @@
1
- /// <reference types="react" />
2
- import type { IColumnProps } from '../../../../../types/index.js';
3
- import { SheetViewTableHeaderProps } from './type';
4
- interface TableCellProps extends Pick<SheetViewTableHeaderProps, 'onColumnSort' | 'columnsSorting' | 'onColumnPin' | 'isPinnable' | 'lastColumnId' | 'onColumnClick' | 'pinnedColumns'> {
5
- column: IColumnProps;
6
- colIndex: number;
7
- isFirst: boolean;
8
- isLast: boolean;
9
- isSelected: boolean;
10
- isDefaultPinned: boolean;
11
- }
12
- declare function TableCell({ column: { header, id, align, headerStyle, sortable, filter, pinnable, width, order, tableViewId, pinned }, colIndex, isFirst, isLast, isSelected, isDefaultPinned, onColumnSort, columnsSorting, onColumnPin, isPinnable, lastColumnId, onColumnClick, pinnedColumns, }: TableCellProps): import("react/jsx-runtime").JSX.Element;
13
- declare const _default: import("react").MemoExoticComponent<typeof TableCell>;
14
- export default _default;
@@ -1,46 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { memo, useCallback, useMemo, useState } from 'react';
3
- import Box from '@mui/material/Box';
4
- import { pinIcon, unpinIcon } from '../../../../../constants/index.js';
5
- import ColumnFilter from '../../../components/ColumnFilter';
6
- import { StyledCell } from '../../../components/style';
7
- import { PinIconContainer, HeaderText } from '../../style';
8
- import ColumnSort from '../../../../VirtualTables/components/ColumnSort';
9
- function TableCell({ column: { header, id, align, headerStyle, sortable, filter, pinnable, width, order, tableViewId, pinned }, colIndex, isFirst, isLast, isSelected, isDefaultPinned, onColumnSort, columnsSorting, onColumnPin, isPinnable, lastColumnId, onColumnClick, pinnedColumns, }) {
10
- const [columnFilterEl, setColumnFilterEl] = useState(null);
11
- const checkIsPanned = useCallback((columnId) => pinnedColumns === null || pinnedColumns === void 0 ? void 0 : pinnedColumns.includes(columnId), [pinnedColumns]);
12
- const isPinned = useMemo(() => checkIsPanned(id), [id, checkIsPanned]);
13
- const handlePinClick = (columnId) => {
14
- if (checkIsPanned(columnId)) {
15
- onColumnPin === null || onColumnPin === void 0 ? void 0 : onColumnPin(columnId, 'unpin');
16
- }
17
- else {
18
- if (columnId === lastColumnId) {
19
- onColumnPin === null || onColumnPin === void 0 ? void 0 : onColumnPin(columnId, 'end');
20
- }
21
- else {
22
- onColumnPin === null || onColumnPin === void 0 ? void 0 : onColumnPin(columnId, 'start');
23
- }
24
- }
25
- };
26
- return (_jsxs(StyledCell, Object.assign({ "data-id": id, component: "div", "data-testid": "SheetViewVirtualTable_TableHeader_StyledCell", "data-column-id": id, "data-column-width": width, "data-column-width-used": width, "data-column-align": align, "data-column-order": order, "data-column-header": typeof header === 'string' ? header : 'component', "data-column-sortable": !!sortable, "data-column-filterable": !!filter, "data-column-pinned": isPinned, isFirst: isFirst, isLast: isLast, isSheetView: true, onClick: (event) => {
27
- onColumnClick === null || onColumnClick === void 0 ? void 0 : onColumnClick(colIndex, event, pinned);
28
- setColumnFilterEl(event.currentTarget);
29
- }, sx: (theme) => (Object.assign({ display: 'flex', gap: theme.spacing(0.5), alignItems: 'center', justifyContent: align === 'right' ? 'flex-end' : 'flex-start', width, textAlign: align, overflow: 'unset', cursor: 'pointer', boxSizing: 'border-box', border: isSelected ? '1px solid #1F88D0' : '1px solid #F2F2F2', backgroundColor: isSelected ? '#F2F2F2' : '#FCFCFC', minHeight: isSelected ? '28px' : 'auto', position: 'relative', '&:before': {
30
- content: '""',
31
- border: isSelected ? '1px solid #1F88D0' : '1px solid transparent',
32
- position: 'absolute',
33
- top: 0,
34
- right: 0,
35
- left: 0,
36
- bottom: 0,
37
- } }, headerStyle)) }, { children: [typeof header === 'function' ? (header()) : (_jsx(Box, Object.assign({ "data-testid": "SheetViewTableHeader_columns_header", sx: { maxWidth: '100%', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, { children: header && _jsx(HeaderText, Object.assign({ "data-testid": "SheetViewVirtualTable_TableHeader_StyledCell_header_text" }, { children: header })) }))), filter && (_jsx(ColumnFilter, Object.assign({}, filter, { anchorEl: columnFilterEl, setAnchorEl: setColumnFilterEl, onClose: (event) => {
38
- onColumnClick === null || onColumnClick === void 0 ? void 0 : onColumnClick(colIndex, event, pinned);
39
- } }))), sortable && (_jsx(ColumnSort, { columnId: id, onColumnSort: onColumnSort, columnsSorting: columnsSorting, onClick: (e) => {
40
- onColumnClick === null || onColumnClick === void 0 ? void 0 : onColumnClick(colIndex, e, pinned);
41
- } })), isPinnable && pinnable && !isDefaultPinned && !isLast && (_jsx(PinIconContainer, Object.assign({ onClick: (event) => {
42
- event.stopPropagation();
43
- handlePinClick(id);
44
- }, title: isPinned ? 'Unpin column' : 'Pin column' }, { children: _jsx("img", { src: isPinned ? unpinIcon : pinIcon, alt: "pin-icon" }) })))] })));
45
- }
46
- export default memo(TableCell);
@@ -1,2 +0,0 @@
1
- import SheetViewTableHeader from './SheetViewTableHeader';
2
- export default SheetViewTableHeader;
@@ -1,2 +0,0 @@
1
- import SheetViewTableHeader from './SheetViewTableHeader';
2
- export default SheetViewTableHeader;
@@ -1,19 +0,0 @@
1
- /// <reference types="react" />
2
- import { type TableHeadProps } from '@mui/material/TableHead';
3
- import { IColumnProps, IVirtualTable, TablePosition } from '../../../../../types/index.js';
4
- export interface SheetViewTableHeaderProps {
5
- columns: IColumnProps[];
6
- headerProps?: TableHeadProps;
7
- columnsSorting?: IVirtualTable['columnsSorting'];
8
- onColumnSort?: IVirtualTable['onColumnSort'];
9
- showBackDrop: boolean;
10
- pinnedColumns?: string[];
11
- onColumnPin?: (columnId: string, position: 'start' | 'end' | 'unpin') => void;
12
- isPinnable?: boolean;
13
- lastColumnId?: string | null;
14
- selectedColumn?: string | null;
15
- onColumnClick?: (columnIndex: number, event: React.MouseEvent, pinnedType?: 'start' | 'end') => void;
16
- tablePosition?: TablePosition;
17
- hasPinnedStart?: boolean;
18
- hasPinnedEnd?: boolean;
19
- }
@@ -1,55 +0,0 @@
1
- interface GetSelectionStylesParams {
2
- isSelected: boolean;
3
- isCellSelected: boolean;
4
- isColumnSelected: boolean;
5
- isLastRow: boolean;
6
- }
7
- export declare const getSelectionStyles: ({ isSelected, isCellSelected, isColumnSelected, isLastRow }: GetSelectionStylesParams) => {
8
- border?: undefined;
9
- backgroundColor?: undefined;
10
- color?: undefined;
11
- '&:before'?: undefined;
12
- borderWidth?: undefined;
13
- borderStyle?: undefined;
14
- borderColor?: undefined;
15
- borderBottom?: undefined;
16
- height?: undefined;
17
- minHeight?: undefined;
18
- display?: undefined;
19
- alignItems?: undefined;
20
- } | {
21
- border: string;
22
- backgroundColor: string;
23
- color: string;
24
- '&:before': {
25
- border: string;
26
- borderWidth?: undefined;
27
- borderBottom?: undefined;
28
- };
29
- borderWidth?: undefined;
30
- borderStyle?: undefined;
31
- borderColor?: undefined;
32
- borderBottom?: undefined;
33
- height?: undefined;
34
- minHeight?: undefined;
35
- display?: undefined;
36
- alignItems?: undefined;
37
- } | {
38
- borderWidth: string;
39
- borderStyle: string;
40
- borderColor: string;
41
- borderBottom: string;
42
- height: string;
43
- minHeight: string;
44
- display: string;
45
- alignItems: string;
46
- '&:before': {
47
- borderWidth: string;
48
- borderBottom: string;
49
- border?: undefined;
50
- };
51
- border?: undefined;
52
- backgroundColor?: undefined;
53
- color?: undefined;
54
- };
55
- export {};
@@ -1,31 +0,0 @@
1
- export const getSelectionStyles = ({ isSelected, isCellSelected, isColumnSelected, isLastRow }) => {
2
- if (!isSelected)
3
- return {};
4
- if (isCellSelected && !isColumnSelected) {
5
- return {
6
- border: '1px solid #1F88D0',
7
- backgroundColor: 'white',
8
- color: '#1F88D0',
9
- '&:before': {
10
- border: '1px solid #1F88D0',
11
- },
12
- };
13
- }
14
- if (isColumnSelected) {
15
- return {
16
- borderWidth: isLastRow ? '0px 1.5px 1px 1.5px' : '0px 1.5px 0px 1.5px',
17
- borderStyle: 'solid',
18
- borderColor: '#1F88D0',
19
- borderBottom: !isLastRow ? '1px solid #F2F2F2' : '1.5px solid #1F88D0',
20
- height: '100%',
21
- minHeight: '28px',
22
- display: 'flex',
23
- alignItems: 'center',
24
- '&:before': {
25
- borderWidth: isLastRow ? '0px 1.5px 1px 1.5px' : '0px 1.5px 0px 1.5px',
26
- borderBottom: !isLastRow ? '1px solid transparent' : '1.5px solid #1F88D0',
27
- },
28
- };
29
- }
30
- return {};
31
- };