@tap-payments/os-micro-frontend-shared 0.0.273-test.3-test.4 → 0.0.273-test.8

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.
@@ -17,7 +17,7 @@ import { TABLE_ROW_HEIGHT, TABLE_THRESHOLD, TABLE_LIST_OVER_SCAN, SHEET_VIEW_TAB
17
17
  import { useDelayToSetValue } from '../../hooks/index.js';
18
18
  import { isHeightNotFullyFilledByRows, isNotFoundError, isTimeoutError, hasError } from '../../utils/index.js';
19
19
  import TableFooter from './components/TableFooter/TableFooter';
20
- import TableHeader from './components/TableHeader/TableHeader';
20
+ import TableHeader from './components/TableHeader';
21
21
  import TableLastItem from './components/TableLastItem';
22
22
  import TableNoData from './components/TableNoData';
23
23
  import ListItemWrapper from './components/virtualScroll/ListItemWrapper';
@@ -0,0 +1,27 @@
1
+ /// <reference types="react" />
2
+ import { type TableHeadProps } from '@mui/material';
3
+ import type { IColumnProps, IVirtualTable } from '../../../types/index.js';
4
+ export declare const actionsIcons: {
5
+ flag: string;
6
+ dispute: string;
7
+ refund: string;
8
+ };
9
+ export declare const ActionIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
10
+ export declare const ColumnIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
11
+ interface StyledHeaderProps {
12
+ showBackDrop: boolean;
13
+ }
14
+ export declare const StyledHeader: import("@emotion/styled").StyledComponent<import("@mui/material").TableHeadOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & {
15
+ ref?: ((instance: HTMLTableSectionElement | null) => void) | import("react").RefObject<HTMLTableSectionElement> | null | undefined;
16
+ }, "className" | "style" | "classes" | "children" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & StyledHeaderProps, {}, {}>;
17
+ interface TableHeaderProps {
18
+ columns: IColumnProps[];
19
+ headerProps?: TableHeadProps;
20
+ columnsSorting?: IVirtualTable['columnsSorting'];
21
+ onColumnSort?: IVirtualTable['onColumnSort'];
22
+ showBackDrop: boolean;
23
+ isSheetView?: boolean;
24
+ }
25
+ declare function TableHeader({ columns, headerProps, showBackDrop, onColumnSort, columnsSorting, isSheetView }: TableHeaderProps): import("react/jsx-runtime").JSX.Element;
26
+ declare const _default: import("react").MemoExoticComponent<typeof TableHeader>;
27
+ export default _default;
@@ -1,12 +1,36 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { memo, useState } from 'react';
3
3
  import { Box, styled, useTheme } from '@mui/material';
4
+ import TableHead from '@mui/material/TableHead';
4
5
  import MUITableRow from '@mui/material/TableRow';
5
- import Dropdown from '../../../DropdownMenu';
6
- import { columnIcon, sortAzIcon, sortZaIcon } from '../../../../constants/index.js';
7
- import ColumnFilter from '../ColumnFilter';
8
- import { StyledCell } from '../../style';
9
- import { ActionIcon, ColumnIcon, StyledHeader } from './style';
6
+ import Dropdown from '../../DropdownMenu';
7
+ import { columnIcon, disputeIcon, flagIcon, refundInitiatedIcon, sortAzIcon, sortZaIcon } from '../../../constants/index.js';
8
+ import ColumnFilter from './ColumnFilter';
9
+ import { StyledCell } from '../style';
10
+ export const actionsIcons = {
11
+ flag: flagIcon,
12
+ dispute: disputeIcon,
13
+ refund: refundInitiatedIcon,
14
+ };
15
+ export const ActionIcon = styled('img')(() => ({
16
+ width: '13.3px',
17
+ height: '13.3px',
18
+ }));
19
+ export const ColumnIcon = styled('img')(() => ({
20
+ width: '8px',
21
+ height: '6.4px',
22
+ cursor: 'pointer',
23
+ }));
24
+ export const StyledHeader = styled(TableHead, {
25
+ shouldForwardProp: (prop) => prop !== 'showBackDrop',
26
+ })(({ showBackDrop, theme }) => ({
27
+ width: '100%',
28
+ minWidth: 'fit-content',
29
+ flex: '0 0 auto',
30
+ boxShadow: showBackDrop ? theme.shadows[23] : 'none',
31
+ backgroundColor: theme.palette.background.default,
32
+ zIndex: 1,
33
+ }));
10
34
  const StyledMUITableRow = styled(MUITableRow, {
11
35
  shouldForwardProp: (prop) => prop !== 'isSheetView',
12
36
  })(({ theme, isSheetView }) => (Object.assign({ display: 'flex', justifyContent: 'flex-start', width: '100%', minWidth: 'fit-content', paddingInline: '32px', paddingBlock: '16px' }, (isSheetView && {
@@ -5,7 +5,7 @@ export * from './TableFooter';
5
5
  export { default as TableFooter } from './TableFooter';
6
6
  export * from './virtualScroll';
7
7
  export * from './RowErrorState';
8
- export { default as TableHeader } from './TableHeader/TableHeader';
8
+ export { default as TableHeader } from './TableHeader';
9
9
  export { default as TableLastItem } from './TableLastItem';
10
10
  export { default as TableLoading } from './TableLoading';
11
11
  export { default as TableLoadingWithCard } from './TableLoadingWithCard';
@@ -5,7 +5,7 @@ export * from './TableFooter';
5
5
  export { default as TableFooter } from './TableFooter';
6
6
  export * from './virtualScroll';
7
7
  export * from './RowErrorState';
8
- export { default as TableHeader } from './TableHeader/TableHeader';
8
+ export { default as TableHeader } from './TableHeader';
9
9
  export { default as TableLastItem } from './TableLastItem';
10
10
  export { default as TableLoading } from './TableLoading';
11
11
  export { default as TableLoadingWithCard } from './TableLoadingWithCard';
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.0.273-test.3-test.4",
5
- "testVersion": 4,
4
+ "version": "0.0.273-test.8",
5
+ "testVersion": 8,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",
@@ -1,14 +0,0 @@
1
- /// <reference types="react" />
2
- import { type TableHeadProps } from '@mui/material';
3
- import type { IColumnProps, IVirtualTable } from '../../../../types/index.js';
4
- interface TableHeaderProps {
5
- columns: IColumnProps[];
6
- headerProps?: TableHeadProps;
7
- columnsSorting?: IVirtualTable['columnsSorting'];
8
- onColumnSort?: IVirtualTable['onColumnSort'];
9
- showBackDrop: boolean;
10
- isSheetView?: boolean;
11
- }
12
- declare function TableHeader({ columns, headerProps, showBackDrop, onColumnSort, columnsSorting, isSheetView }: TableHeaderProps): import("react/jsx-runtime").JSX.Element;
13
- declare const _default: import("react").MemoExoticComponent<typeof TableHeader>;
14
- export default _default;
@@ -1,5 +0,0 @@
1
- export declare const actionsIcons: {
2
- flag: string;
3
- dispute: string;
4
- refund: string;
5
- };
@@ -1,6 +0,0 @@
1
- import { disputeIcon, flagIcon, refundInitiatedIcon } from '../../../../constants/index.js';
2
- export const actionsIcons = {
3
- flag: flagIcon,
4
- dispute: disputeIcon,
5
- refund: refundInitiatedIcon,
6
- };
@@ -1,2 +0,0 @@
1
- import TableHeader from "./TableHeader";
2
- export default TableHeader;
@@ -1,2 +0,0 @@
1
- import TableHeader from "./TableHeader";
2
- export default TableHeader;
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const ActionIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
3
- export declare const ColumnIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
4
- export declare const StyledHeader: import("@emotion/styled").StyledComponent<import("@mui/material/TableHead").TableHeadOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & {
5
- ref?: ((instance: HTMLTableSectionElement | null) => void) | import("react").RefObject<HTMLTableSectionElement> | null | undefined;
6
- }, "className" | "style" | "classes" | "children" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
7
- showBackDrop: boolean;
8
- }, {}, {}>;
@@ -1,21 +0,0 @@
1
- import { styled } from '@mui/material/styles';
2
- import TableHead from '@mui/material/TableHead';
3
- export const ActionIcon = styled('img')(() => ({
4
- width: '13.3px',
5
- height: '13.3px',
6
- }));
7
- export const ColumnIcon = styled('img')(() => ({
8
- width: '8px',
9
- height: '6.4px',
10
- cursor: 'pointer',
11
- }));
12
- export const StyledHeader = styled(TableHead, {
13
- shouldForwardProp: (prop) => prop !== 'showBackDrop',
14
- })(({ showBackDrop, theme }) => ({
15
- width: '100%',
16
- minWidth: 'fit-content',
17
- flex: '0 0 auto',
18
- boxShadow: showBackDrop ? theme.shadows[23] : 'none',
19
- backgroundColor: theme.palette.background.default,
20
- zIndex: 1,
21
- }));