@tap-payments/os-micro-frontend-shared 0.1.424 → 0.1.425-hotfix.1.6.2026

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 (66) hide show
  1. package/build/components/AnimatedSpinnerIcon/style.d.ts +0 -1
  2. package/build/components/Chip/style.d.ts +0 -1
  3. package/build/components/CountBadge/style.d.ts +0 -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/StatusIcons/AuthIcons/style.d.ts +0 -1
  12. package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
  13. package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
  14. package/build/components/StatusIcons/SourceIcons/style.d.ts +0 -1
  15. package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +0 -1
  16. package/build/components/TableCells/CustomCells/AgreementCell/style.d.ts +0 -1
  17. package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
  18. package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
  19. package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
  20. package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
  21. package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
  22. package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
  23. package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
  24. package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
  25. package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
  26. package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
  27. package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
  28. package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
  29. package/build/components/TableCells/CustomCells/PayoutReportCell/style.d.ts +0 -1
  30. package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
  31. package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
  32. package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
  33. package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
  34. package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
  35. package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
  36. package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
  37. package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
  38. package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
  39. package/build/components/TableCells/CustomCells/style.d.ts +0 -1
  40. package/build/components/TableHeader/FiltersRow.d.ts +1 -1
  41. package/build/components/TableHeader/FiltersRow.js +2 -2
  42. package/build/components/TableHeader/TableHeader.d.ts +1 -1
  43. package/build/components/TableHeader/TableHeader.js +2 -2
  44. package/build/components/TableHeader/TableView/DefaultViews.d.ts +5 -5
  45. package/build/components/TableHeader/TableView/DefaultViews.js +7 -6
  46. package/build/components/TableHeader/TableView/TableView.d.ts +2 -1
  47. package/build/components/TableHeader/TableView/TableView.js +7 -10
  48. package/build/components/TableHeader/TableView/hooks/useViewsMenu.d.ts +3 -3
  49. package/build/components/TableHeader/TableView/hooks/useViewsMenu.js +4 -6
  50. package/build/components/TableHeader/TableView/types.d.ts +3 -3
  51. package/build/components/TableHeader/type.d.ts +3 -5
  52. package/build/components/TableReports/components/DownloadButton/style.d.ts +0 -1
  53. package/build/components/TableReports/style.d.ts +0 -1
  54. package/build/components/TableView/DefaultViews.d.ts +5 -5
  55. package/build/components/TableView/DefaultViews.js +7 -6
  56. package/build/components/TableView/TableView.d.ts +3 -2
  57. package/build/components/TableView/TableView.js +7 -10
  58. package/build/components/TableView/constant.d.ts +4 -0
  59. package/build/components/TableView/constant.js +3 -0
  60. package/build/components/TableView/index.d.ts +1 -0
  61. package/build/components/Tooltip/Tooltip.d.ts +3 -1
  62. package/build/components/Tooltip/Tooltip.js +2 -2
  63. package/build/components/VirtualTables/components/style.d.ts +0 -1
  64. package/package.json +2 -2
  65. package/build/components/TableView/data.d.ts +0 -5
  66. package/build/components/TableView/data.js +0 -7
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  type AnimatedSpinnerIconProps = {
4
3
  width?: string;
5
4
  height?: string;
@@ -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;
@@ -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 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;
@@ -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;
@@ -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 AgreementCellContainer: 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 StyledAgreementCardIcon: 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 CardContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -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 StyledDownloadFileImageWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
4
3
  isTextShown?: boolean | undefined;
5
4
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -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 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,2 +1,2 @@
1
1
  import type { FilterRowProps } from './type';
2
- export default function FiltersRow({ date, calendarMode, onDateChange, onCalendarModeSwitch, tableReportsComponent, tableFilterComponent, isReportsButtonVisible, onViewChange, onSearchChange, onToggleViewButtonClick, rightActions, leftActions, setTableViews, tableViews, resetTableViews, onToggleTextButtonClick, calendarGroupBy, onCalendarGroupChange, maxDateRange, searchPlaceholder, isAcceptance, tableMode, timezone, browserTimezone, defaultCountryTimezone, onChangeTimezone, segmentCountries, customViews, lang, }: FilterRowProps): import("react/jsx-runtime").JSX.Element;
2
+ export default function FiltersRow({ date, calendarMode, onDateChange, onCalendarModeSwitch, tableReportsComponent, tableFilterComponent, isReportsButtonVisible, onViewChange, onSearchChange, onToggleViewButtonClick, rightActions, leftActions, setTableViews, tableViews, resetTableViews, onToggleTextButtonClick, calendarGroupBy, onCalendarGroupChange, maxDateRange, searchPlaceholder, isAcceptance, tableMode, timezone, browserTimezone, defaultCountryTimezone, onChangeTimezone, segmentCountries, customViews, lang, onTableViewOptionClick, }: FilterRowProps): import("react/jsx-runtime").JSX.Element;
@@ -6,7 +6,7 @@ import FiltersRowWrapper from './FiltersRowWrapper';
6
6
  import TableView from './TableView';
7
7
  import { ViewsMenu } from './TableView';
8
8
  import TableModeButton from './TableModeButton';
9
- export default function FiltersRow({ date, calendarMode, onDateChange, onCalendarModeSwitch, tableReportsComponent, tableFilterComponent, isReportsButtonVisible, onViewChange, onSearchChange, onToggleViewButtonClick, rightActions, leftActions, setTableViews, tableViews, resetTableViews, onToggleTextButtonClick, calendarGroupBy, onCalendarGroupChange, maxDateRange = 31, searchPlaceholder, isAcceptance, tableMode = 'default', timezone, browserTimezone, defaultCountryTimezone, onChangeTimezone, segmentCountries, customViews, lang, }) {
9
+ export default function FiltersRow({ date, calendarMode, onDateChange, onCalendarModeSwitch, tableReportsComponent, tableFilterComponent, isReportsButtonVisible, onViewChange, onSearchChange, onToggleViewButtonClick, rightActions, leftActions, setTableViews, tableViews, resetTableViews, onToggleTextButtonClick, calendarGroupBy, onCalendarGroupChange, maxDateRange = 31, searchPlaceholder, isAcceptance, tableMode = 'default', timezone, browserTimezone, defaultCountryTimezone, onChangeTimezone, segmentCountries, customViews, lang, onTableViewOptionClick, }) {
10
10
  const [isViewVisible, setIsViewVisible] = useState(false);
11
11
  const timezoneCountriesCodes = useMemo(() => segmentCountries.map(({ code }) => code), [segmentCountries]);
12
12
  const tableModeButton = useMemo(() => _jsx(TableModeButton, { tableMode: tableMode, onToggle: onToggleTextButtonClick }), [tableMode, onToggleTextButtonClick]);
@@ -20,5 +20,5 @@ export default function FiltersRow({ date, calendarMode, onDateChange, onCalenda
20
20
  // @todo to be moved to grouping
21
21
  , Object.assign({
22
22
  // @todo to be moved to grouping
23
- onViewChange: onViewChange, tableMode: tableMode, lang: lang }, customViews))) : (_jsx(TableView, { onViewChange: onViewChange, setIsViewVisible: setIsViewVisible, tableViews: tableViews, setTableViews: setTableViews, resetTableViews: resetTableViews }))), rightActions && !isViewVisible && rightActions] }));
23
+ onViewChange: onViewChange, tableMode: tableMode, lang: lang }, customViews))) : (_jsx(TableView, { onViewChange: onViewChange, setIsViewVisible: setIsViewVisible, tableViews: tableViews, setTableViews: setTableViews, resetTableViews: resetTableViews, onTableViewOptionClick: onTableViewOptionClick }))), rightActions && !isViewVisible && rightActions] }));
24
24
  }
@@ -1,5 +1,5 @@
1
1
  import type { TableHeaderProps } from './type';
2
2
  import { type TableHeaderStatus } from '../../types/index.js';
3
- export declare function TableHeader<IStatus extends TableHeaderStatus | TableHeaderStatus[] = undefined>({ date, status, availableStatuses, showMaximizedView, title, calendarMode, tableReportsComponent, tableFilterComponent, onStatusChange, onViewChange, onDateChange, onCalendarModeSwitch, filteredIds, onCancelFilteredIdsClick, isFilteredIdsShown, cardNumber, leftActions, rightActions, isReportsButtonVisible, onSearchChange, onToggleViewButtonClick, leftComponent, tableViews, setTableViews, resetTableViews, onToggleTextButtonClick, calendarGroupBy, onCalendarGroupChange, children, maxDateRange, isAcceptance, startComponent, searchPlaceholder, tableMode, timezone, browserTimezone, defaultCountryTimezone, onChangeTimezone, segmentCountries, customViews, lang, ...StatusBarProps }: TableHeaderProps<IStatus>): import("react/jsx-runtime").JSX.Element;
3
+ export declare function TableHeader<IStatus extends TableHeaderStatus | TableHeaderStatus[] = undefined>({ date, status, availableStatuses, showMaximizedView, title, calendarMode, tableReportsComponent, tableFilterComponent, onStatusChange, onViewChange, onDateChange, onCalendarModeSwitch, filteredIds, onCancelFilteredIdsClick, isFilteredIdsShown, cardNumber, leftActions, rightActions, isReportsButtonVisible, onSearchChange, onToggleViewButtonClick, leftComponent, tableViews, setTableViews, resetTableViews, onToggleTextButtonClick, calendarGroupBy, onCalendarGroupChange, children, maxDateRange, isAcceptance, startComponent, searchPlaceholder, tableMode, timezone, browserTimezone, defaultCountryTimezone, onChangeTimezone, segmentCountries, customViews, lang, onTableViewOptionClick, ...StatusBarProps }: Readonly<TableHeaderProps<IStatus>>): import("react/jsx-runtime").JSX.Element;
4
4
  declare const _default: typeof TableHeader;
5
5
  export default _default;
@@ -15,8 +15,8 @@ import { FilteredIds, StatusBar, TableHeaderWrapper } from '../index.js';
15
15
  import FiltersRow from './FiltersRow';
16
16
  import { StatusButtonsContainer, TitleContainer, TableHeaderTitle, TableHeaderRow } from './style';
17
17
  export function TableHeader(_a) {
18
- var { date, status, availableStatuses, showMaximizedView, title, calendarMode, tableReportsComponent, tableFilterComponent, onStatusChange, onViewChange, onDateChange, onCalendarModeSwitch, filteredIds, onCancelFilteredIdsClick, isFilteredIdsShown, cardNumber, leftActions, rightActions, isReportsButtonVisible, onSearchChange, onToggleViewButtonClick, leftComponent, tableViews, setTableViews, resetTableViews, onToggleTextButtonClick, calendarGroupBy, onCalendarGroupChange, children, maxDateRange, isAcceptance, startComponent, searchPlaceholder, tableMode, timezone, browserTimezone, defaultCountryTimezone, onChangeTimezone, segmentCountries = [], customViews, lang } = _a, StatusBarProps = __rest(_a, ["date", "status", "availableStatuses", "showMaximizedView", "title", "calendarMode", "tableReportsComponent", "tableFilterComponent", "onStatusChange", "onViewChange", "onDateChange", "onCalendarModeSwitch", "filteredIds", "onCancelFilteredIdsClick", "isFilteredIdsShown", "cardNumber", "leftActions", "rightActions", "isReportsButtonVisible", "onSearchChange", "onToggleViewButtonClick", "leftComponent", "tableViews", "setTableViews", "resetTableViews", "onToggleTextButtonClick", "calendarGroupBy", "onCalendarGroupChange", "children", "maxDateRange", "isAcceptance", "startComponent", "searchPlaceholder", "tableMode", "timezone", "browserTimezone", "defaultCountryTimezone", "onChangeTimezone", "segmentCountries", "customViews", "lang"]);
19
- const filtersRow = (_jsx(FiltersRow, { date: date, calendarMode: calendarMode, onDateChange: onDateChange, onCalendarModeSwitch: onCalendarModeSwitch, tableReportsComponent: tableReportsComponent, tableFilterComponent: tableFilterComponent, onViewChange: onViewChange, leftActions: leftActions, rightActions: rightActions, onSearchChange: onSearchChange, onToggleViewButtonClick: onToggleViewButtonClick, isReportsButtonVisible: isReportsButtonVisible, tableViews: tableViews, setTableViews: setTableViews, resetTableViews: resetTableViews, onToggleTextButtonClick: onToggleTextButtonClick, tableMode: tableMode, onCalendarGroupChange: onCalendarGroupChange, calendarGroupBy: calendarGroupBy, maxDateRange: maxDateRange, isAcceptance: isAcceptance, searchPlaceholder: searchPlaceholder, timezone: timezone, browserTimezone: browserTimezone, defaultCountryTimezone: defaultCountryTimezone, onChangeTimezone: onChangeTimezone, segmentCountries: segmentCountries, customViews: customViews, lang: lang }));
18
+ var { date, status, availableStatuses, showMaximizedView, title, calendarMode, tableReportsComponent, tableFilterComponent, onStatusChange, onViewChange, onDateChange, onCalendarModeSwitch, filteredIds, onCancelFilteredIdsClick, isFilteredIdsShown, cardNumber, leftActions, rightActions, isReportsButtonVisible, onSearchChange, onToggleViewButtonClick, leftComponent, tableViews, setTableViews, resetTableViews, onToggleTextButtonClick, calendarGroupBy, onCalendarGroupChange, children, maxDateRange, isAcceptance, startComponent, searchPlaceholder, tableMode, timezone, browserTimezone, defaultCountryTimezone, onChangeTimezone, segmentCountries = [], customViews, lang, onTableViewOptionClick } = _a, StatusBarProps = __rest(_a, ["date", "status", "availableStatuses", "showMaximizedView", "title", "calendarMode", "tableReportsComponent", "tableFilterComponent", "onStatusChange", "onViewChange", "onDateChange", "onCalendarModeSwitch", "filteredIds", "onCancelFilteredIdsClick", "isFilteredIdsShown", "cardNumber", "leftActions", "rightActions", "isReportsButtonVisible", "onSearchChange", "onToggleViewButtonClick", "leftComponent", "tableViews", "setTableViews", "resetTableViews", "onToggleTextButtonClick", "calendarGroupBy", "onCalendarGroupChange", "children", "maxDateRange", "isAcceptance", "startComponent", "searchPlaceholder", "tableMode", "timezone", "browserTimezone", "defaultCountryTimezone", "onChangeTimezone", "segmentCountries", "customViews", "lang", "onTableViewOptionClick"]);
19
+ const filtersRow = (_jsx(FiltersRow, { date: date, calendarMode: calendarMode, onDateChange: onDateChange, onCalendarModeSwitch: onCalendarModeSwitch, tableReportsComponent: tableReportsComponent, tableFilterComponent: tableFilterComponent, onViewChange: onViewChange, leftActions: leftActions, rightActions: rightActions, onSearchChange: onSearchChange, onToggleViewButtonClick: onToggleViewButtonClick, isReportsButtonVisible: isReportsButtonVisible, tableViews: tableViews, setTableViews: setTableViews, resetTableViews: resetTableViews, onToggleTextButtonClick: onToggleTextButtonClick, tableMode: tableMode, onCalendarGroupChange: onCalendarGroupChange, calendarGroupBy: calendarGroupBy, maxDateRange: maxDateRange, isAcceptance: isAcceptance, searchPlaceholder: searchPlaceholder, timezone: timezone, browserTimezone: browserTimezone, defaultCountryTimezone: defaultCountryTimezone, onChangeTimezone: onChangeTimezone, segmentCountries: segmentCountries, customViews: customViews, lang: lang, onTableViewOptionClick: onTableViewOptionClick }));
20
20
  return (_jsxs(TableHeaderWrapper, { children: [showMaximizedView && (_jsxs(TitleContainer, { children: [_jsx("span", { children: !!title && _jsx(TableHeaderTitle, { children: title }) }), filtersRow] }, "TitleContainer")), _jsxs(TableHeaderRow, Object.assign({ as: "section" }, { children: [_jsxs(StatusButtonsContainer, Object.assign({ as: "aside" }, { children: [startComponent, _jsx(StatusBar, Object.assign({ status: status, availableStatuses: availableStatuses, onStatusChange: onStatusChange, isFilteredIdsShown: isFilteredIdsShown }, StatusBarProps)), leftComponent, isFilteredIdsShown && (_jsx(FilteredIds, { cardNumber: cardNumber, Ids: filteredIds, isShown: isFilteredIdsShown, onCancelClick: onCancelFilteredIdsClick }, "FilteredIds"))] })), !showMaximizedView && filtersRow] }), "FiltersWrapper"), children] }));
21
21
  }
22
22
  export default memo(TableHeader);
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
- import type { ViewOption } from '../type';
2
+ import type { TableViewOption } from '../type';
3
3
  interface DefaultViewsProps {
4
4
  open: boolean;
5
- selectedViewInfo: ViewOption;
6
- setSelectedViewInfo: (selectedView: ViewOption) => void;
5
+ selectedViewInfo: TableViewOption;
6
+ setSelectedViewInfo: (selectedView: TableViewOption) => void;
7
7
  onSelect: (e: React.MouseEvent<HTMLDivElement>) => void;
8
- setViews?: (views: string[]) => void;
8
+ onTableViewOptionClick?: (option: TableViewOption) => void;
9
9
  anchorEl: Element | null;
10
10
  }
11
- declare function DefaultViews({ open, selectedViewInfo, setSelectedViewInfo, onSelect, setViews, anchorEl }: Readonly<DefaultViewsProps>): import("react/jsx-runtime").JSX.Element;
11
+ declare function DefaultViews({ open, selectedViewInfo, setSelectedViewInfo, onSelect, onTableViewOptionClick, anchorEl }: Readonly<DefaultViewsProps>): import("react/jsx-runtime").JSX.Element;
12
12
  declare const _default: React.MemoExoticComponent<typeof DefaultViews>;
13
13
  export default _default;
@@ -4,19 +4,20 @@ import Popper from '@mui/material/Popper';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { downArrowIcon, checkIcon } from '../../../constants/index.js';
6
6
  import { ButtonStyled, ListStyled, DropdownStyled, MenuItem, Space, SpaceAfter } from './styles';
7
- import { dummyViewList } from '../data';
8
- function DefaultViews({ open, selectedViewInfo, setSelectedViewInfo, onSelect, setViews, anchorEl }) {
7
+ import { CUSTOM_VIEW, DEFAULT_VIEW_OPTIONS } from '../../TableView/constant';
8
+ function DefaultViews({ open, selectedViewInfo, setSelectedViewInfo, onSelect, onTableViewOptionClick, anchorEl }) {
9
9
  const { t } = useTranslation();
10
10
  return (_jsxs(DropdownStyled, Object.assign({ "data-testid": "TableView_DefaultViews" }, { children: [_jsxs(ButtonStyled, Object.assign({ onClick: (e) => {
11
11
  onSelect(e);
12
- } }, { children: [_jsx("div", { children: selectedViewInfo.label }), _jsx("img", { src: downArrowIcon, alt: "arrow", style: Object.assign({}, (Boolean(open) && { transform: 'rotate(180deg)' })) })] })), _jsx(Popper, Object.assign({ open: open, anchorEl: anchorEl, placement: "bottom-start" }, { children: _jsxs(ListStyled, { children: [dummyViewList.map((item) => (_jsxs(MenuItem, Object.assign({ onClick: () => {
12
+ } }, { children: [_jsx("div", { children: selectedViewInfo.label }), _jsx("img", { src: downArrowIcon, alt: "arrow", style: Object.assign({}, (Boolean(open) && { transform: 'rotate(180deg)' })) })] })), _jsx(Popper, Object.assign({ open: open, anchorEl: anchorEl, placement: "bottom-start" }, { children: _jsxs(ListStyled, { children: [DEFAULT_VIEW_OPTIONS.map((item) => (_jsxs(MenuItem, Object.assign({ onClick: () => {
13
13
  setSelectedViewInfo(item);
14
- setViews === null || setViews === void 0 ? void 0 : setViews(item.columns);
14
+ onTableViewOptionClick === null || onTableViewOptionClick === void 0 ? void 0 : onTableViewOptionClick(item);
15
15
  } }, { children: [item.id === selectedViewInfo.id ? _jsx("img", { className: "check-icon", src: checkIcon, alt: "arrow" }) : _jsx(Space, {}), _jsx("span", { children: item.label }), _jsx(SpaceAfter, {})] }), item.id))), _jsxs(MenuItem, Object.assign({ sx: {
16
16
  border: 'none',
17
17
  }, onClick: (e) => {
18
18
  e.stopPropagation();
19
- setSelectedViewInfo({ label: 'Custom view', id: 'custom' });
20
- } }, { children: [selectedViewInfo.id === 'custom' ? _jsx("img", { className: "check-icon", src: checkIcon, alt: "arrow" }) : _jsx(Space, {}), _jsx("span", { children: t('createCustomView') }), _jsx(SpaceAfter, {})] }))] }) }))] })));
19
+ setSelectedViewInfo(CUSTOM_VIEW);
20
+ onTableViewOptionClick === null || onTableViewOptionClick === void 0 ? void 0 : onTableViewOptionClick(CUSTOM_VIEW);
21
+ } }, { children: [selectedViewInfo.id === CUSTOM_VIEW.id ? _jsx("img", { className: "check-icon", src: checkIcon, alt: "arrow" }) : _jsx(Space, {}), _jsx("span", { children: t('createCustomView') }), _jsx(SpaceAfter, {})] }))] }) }))] })));
21
22
  }
22
23
  export default React.memo(DefaultViews);
@@ -6,7 +6,8 @@ interface TableViewProps {
6
6
  setTableViews: TableHeaderProps['setTableViews'];
7
7
  tableViews: TableHeaderProps['tableViews'];
8
8
  resetTableViews: TableHeaderProps['resetTableViews'];
9
+ onTableViewOptionClick?: TableHeaderProps['onTableViewOptionClick'];
9
10
  }
10
- declare function TableView({ onViewChange, setIsViewVisible, setTableViews, tableViews, resetTableViews }: Readonly<TableViewProps>): import("react/jsx-runtime").JSX.Element;
11
+ declare function TableView({ onViewChange, setIsViewVisible, setTableViews, tableViews, resetTableViews, onTableViewOptionClick }: Readonly<TableViewProps>): import("react/jsx-runtime").JSX.Element;
11
12
  declare const _default: import("react").MemoExoticComponent<typeof TableView>;
12
13
  export default _default;
@@ -7,14 +7,12 @@ import { closeXIcon, viewIcon } from '../../../constants/index.js';
7
7
  import CustomViews from './CustomViews';
8
8
  import DefaultViews from './DefaultViews';
9
9
  import { ButtonStyled, ViewWrapper } from './styles';
10
- function TableView({ onViewChange, setIsViewVisible, setTableViews, tableViews, resetTableViews }) {
10
+ import { DEFAULT_VIEW, CUSTOM_VIEW } from '../../TableView/constant';
11
+ function TableView({ onViewChange, setIsViewVisible, setTableViews, tableViews, resetTableViews, onTableViewOptionClick }) {
11
12
  const [anchorViewEl, setAnchorViewEl] = useState(null);
12
13
  const [defaultViewEl, setDefaultViewElement] = useState(null);
13
14
  const [customViewEl, setCustomViewElement] = useState(null);
14
- const [selectedViewInfo, setSelectedViewInfo] = useState({
15
- id: 'default',
16
- label: 'Default',
17
- });
15
+ const [selectedViewInfo, setSelectedViewInfo] = useState(DEFAULT_VIEW);
18
16
  const { t } = useTranslation();
19
17
  const onViewButtonClick = (event) => {
20
18
  onViewChange === null || onViewChange === void 0 ? void 0 : onViewChange();
@@ -28,16 +26,17 @@ function TableView({ onViewChange, setIsViewVisible, setTableViews, tableViews,
28
26
  const onClose = () => {
29
27
  setAnchorViewEl(null);
30
28
  setIsViewVisible(false);
31
- setSelectedViewInfo({ label: 'Default', id: 'default' });
29
+ setSelectedViewInfo(DEFAULT_VIEW);
32
30
  };
33
31
  const handleSelectedViewInfo = (selected) => {
34
32
  setSelectedViewInfo(selected);
33
+ resetTableViews === null || resetTableViews === void 0 ? void 0 : resetTableViews(selected);
35
34
  closeViewDropdown();
36
35
  };
37
36
  if (!anchorViewEl) {
38
37
  return (_jsx(StyledButton, Object.assign({ title: t('tableView'), "data-testid": "TableView_no_anchorViewEl", onClick: onViewButtonClick }, { children: _jsx(Icon, { src: viewIcon, alt: "view", sx: { width: 14, height: 14 } }) })));
39
38
  }
40
- return (_jsx(ClickAwayListener, Object.assign({ onClickAway: closeViewDropdown }, { children: _jsxs(ViewWrapper, Object.assign({ "data-testid": "TableView" }, { children: [selectedViewInfo.id === 'custom' && (_jsx(CustomViews, { tableViews: tableViews, setTableViews: setTableViews, anchorEl: customViewEl, open: Boolean(customViewEl), onSelect: (e) => {
39
+ return (_jsx(ClickAwayListener, Object.assign({ onClickAway: closeViewDropdown }, { children: _jsxs(ViewWrapper, Object.assign({ "data-testid": "TableView" }, { children: [selectedViewInfo.id === CUSTOM_VIEW.id && (_jsx(CustomViews, { tableViews: tableViews, setTableViews: setTableViews, anchorEl: customViewEl, open: Boolean(customViewEl), onSelect: (e) => {
41
40
  setCustomViewElement(customViewEl ? null : e.currentTarget);
42
41
  setDefaultViewElement(null);
43
42
  }, onClose: () => {
@@ -47,8 +46,6 @@ function TableView({ onViewChange, setIsViewVisible, setTableViews, tableViews,
47
46
  }, selectedViewInfo: selectedViewInfo, onSelect: (e) => {
48
47
  setDefaultViewElement(defaultViewEl ? null : e.currentTarget);
49
48
  setCustomViewElement(null);
50
- }, setViews: (views) => {
51
- resetTableViews === null || resetTableViews === void 0 ? void 0 : resetTableViews({ id: views[0], label: views[0] });
52
- } }), _jsx(ButtonStyled, Object.assign({ sx: { width: 30, justifyContent: 'center' }, onClick: onClose }, { children: _jsx("img", { src: closeXIcon, alt: "close" }) }))] })) })));
49
+ }, onTableViewOptionClick: onTableViewOptionClick }), _jsx(ButtonStyled, Object.assign({ sx: { width: 30, justifyContent: 'center' }, onClick: onClose }, { children: _jsx("img", { src: closeXIcon, alt: "close" }) }))] })) })));
53
50
  }
54
51
  export default memo(TableView);
@@ -1,7 +1,7 @@
1
1
  import { type MouseEvent } from 'react';
2
2
  import type { ColumnViewProps, TableMode } from '../../../../types/index.js';
3
3
  import type { ViewMenuItem, LayoutSection } from '../types';
4
- import type { ViewOption } from '../../type';
4
+ import type { TableViewOption } from '../../type';
5
5
  export interface UseViewsMenuProps {
6
6
  mode: TableMode;
7
7
  onViewChange?: (selectedView?: ViewMenuItem) => void;
@@ -27,14 +27,14 @@ export declare const useViewsMenu: ({ mode, onViewChange, onCreateCustomView, on
27
27
  anchorEl: HTMLDivElement | null;
28
28
  isCreateDialogOpen: boolean;
29
29
  editingView: ViewMenuItem | null;
30
- selectedViewInfo: ViewOption;
30
+ selectedViewInfo: TableViewOption;
31
31
  shouldUseCurrentState: boolean;
32
32
  selectedView: ViewMenuItem | undefined;
33
33
  currentViewColumns: ColumnViewProps[];
34
34
  initialColumnsForCreate: ColumnViewProps[] | null;
35
35
  handleViewButtonClick: (event: MouseEvent<HTMLDivElement>) => void;
36
36
  handleCloseViewDropdown: () => void;
37
- handleSelectedViewInfo: (selected: ViewOption, viewMenuItem?: ViewMenuItem) => void;
37
+ handleSelectedViewInfo: (selected: TableViewOption, viewMenuItem?: ViewMenuItem) => void;
38
38
  handleOpenCreateDialog: (useCurrentState?: boolean, initialColumns?: ColumnViewProps[]) => void;
39
39
  handleOpenEditDialog: (view: ViewMenuItem) => void;
40
40
  handleCloseCreateDialog: () => void;
@@ -32,12 +32,10 @@ export const useViewsMenu = ({ mode, onViewChange, onCreateCustomView, onEditCus
32
32
  const currentViewColumns = useMemo(() => {
33
33
  return deepCloneColumns((selectedView === null || selectedView === void 0 ? void 0 : selectedView.submenu) || defaultColumns);
34
34
  }, [selectedView, defaultColumns]);
35
- const selectedViewInfo = useMemo(() => {
36
- return {
37
- id: (selectedView === null || selectedView === void 0 ? void 0 : selectedView.id) || 'default',
38
- label: (selectedView === null || selectedView === void 0 ? void 0 : selectedView.label) || 'Default',
39
- };
40
- }, [selectedView]);
35
+ const selectedViewInfo = useMemo(() => ({
36
+ id: (selectedView === null || selectedView === void 0 ? void 0 : selectedView.id) || 'default',
37
+ label: (selectedView === null || selectedView === void 0 ? void 0 : selectedView.label) || 'Default',
38
+ }), [selectedView]);
41
39
  useEffect(() => {
42
40
  if (hasInitializedRef.current)
43
41
  return;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { ColumnViewProps, TableMode } from '../../../types/index.js';
3
- import type { TableHeaderProps, CustomViewsConfig, ViewOption } from '../type';
3
+ import type { TableHeaderProps, CustomViewsConfig, TableViewOption } from '../type';
4
4
  export interface CustomViewsProps {
5
5
  open: boolean;
6
6
  onSelect: (e: React.MouseEvent<HTMLDivElement>) => void;
@@ -121,8 +121,8 @@ export interface ViewsMenuProps extends CustomViewsConfig {
121
121
  }
122
122
  export interface ViewsDropdownProps {
123
123
  open: boolean;
124
- selectedViewInfo: ViewOption;
125
- setSelectedViewInfo: (selected: ViewOption, viewMenuItem?: ViewMenuItem) => void;
124
+ selectedViewInfo: TableViewOption;
125
+ setSelectedViewInfo: (selected: TableViewOption, viewMenuItem?: ViewMenuItem) => void;
126
126
  anchorEl: Element | null;
127
127
  onClose?: () => void;
128
128
  defaultModified?: boolean;
@@ -59,10 +59,8 @@ export interface TableHeaderProps<IStatus extends TableHeaderStatus | TableHeade
59
59
  leftComponent?: React.ReactNode;
60
60
  setTableViews?: (columns: ColumnViewProps[]) => void;
61
61
  tableViews?: ColumnViewProps[];
62
- resetTableViews?: (view: {
63
- id: string;
64
- label: string;
65
- }) => void;
62
+ onTableViewOptionClick?: (option: TableViewOption) => void;
63
+ resetTableViews?: (view: TableViewOption) => void;
66
64
  customViews?: CustomViewsConfig;
67
65
  lang?: string;
68
66
  onToggleTextButtonClick?: () => void;
@@ -86,7 +84,7 @@ export interface Column {
86
84
  groupName: string;
87
85
  selected: boolean;
88
86
  }
89
- export interface ViewOption {
87
+ export interface TableViewOption {
90
88
  id: string;
91
89
  label: string;
92
90
  }
@@ -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
  type ExportButtonProps = {
4
3
  notificationState?: {
5
4
  success: boolean;
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
- import type { ViewOption } from '../TableHeader/type';
2
+ import type { TableViewOption } from '../TableHeader/type';
3
3
  interface DefaultViewsProps {
4
4
  open: boolean;
5
- selectedViewInfo: ViewOption;
6
- setSelectedViewInfo: (selectedView: ViewOption) => void;
5
+ selectedViewInfo: TableViewOption;
6
+ setSelectedViewInfo: (selectedView: TableViewOption) => void;
7
7
  onSelect: (e: React.MouseEvent<HTMLDivElement>) => void;
8
- setViews?: (views: string[]) => void;
8
+ onTableViewOptionClick?: (option: TableViewOption) => void;
9
9
  anchorEl: Element | null;
10
10
  }
11
- declare function DefaultViews({ open, selectedViewInfo, setSelectedViewInfo, onSelect, setViews, anchorEl }: Readonly<DefaultViewsProps>): import("react/jsx-runtime").JSX.Element;
11
+ declare function DefaultViews({ open, selectedViewInfo, setSelectedViewInfo, onSelect, onTableViewOptionClick, anchorEl }: Readonly<DefaultViewsProps>): import("react/jsx-runtime").JSX.Element;
12
12
  declare const _default: React.MemoExoticComponent<typeof DefaultViews>;
13
13
  export default _default;
@@ -4,19 +4,20 @@ import Popper from '@mui/material/Popper';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { downArrowIcon, checkIcon } from '../../constants/index.js';
6
6
  import { ButtonStyled, ListStyled, DropdownStyled, MenuItem, Space, SpaceAfter } from './style';
7
- import { dummyViewList } from './data';
8
- function DefaultViews({ open, selectedViewInfo, setSelectedViewInfo, onSelect, setViews, anchorEl }) {
7
+ import { CUSTOM_VIEW, DEFAULT_VIEW_OPTIONS } from './constant';
8
+ function DefaultViews({ open, selectedViewInfo, setSelectedViewInfo, onSelect, onTableViewOptionClick, anchorEl }) {
9
9
  const { t } = useTranslation();
10
10
  return (_jsxs(DropdownStyled, Object.assign({ "data-testid": "TableView_DefaultViews" }, { children: [_jsxs(ButtonStyled, Object.assign({ onClick: (e) => {
11
11
  onSelect(e);
12
- } }, { children: [_jsx("div", { children: selectedViewInfo.label }), _jsx("img", { src: downArrowIcon, alt: "arrow", style: Object.assign({}, (Boolean(open) && { transform: 'rotate(180deg)' })) })] })), _jsx(Popper, Object.assign({ open: open, anchorEl: anchorEl, placement: "bottom-start" }, { children: _jsxs(ListStyled, { children: [dummyViewList.map((item) => (_jsxs(MenuItem, Object.assign({ onClick: () => {
12
+ } }, { children: [_jsx("div", { children: selectedViewInfo.label }), _jsx("img", { src: downArrowIcon, alt: "arrow", style: Object.assign({}, (Boolean(open) && { transform: 'rotate(180deg)' })) })] })), _jsx(Popper, Object.assign({ open: open, anchorEl: anchorEl, placement: "bottom-start" }, { children: _jsxs(ListStyled, { children: [DEFAULT_VIEW_OPTIONS.map((item) => (_jsxs(MenuItem, Object.assign({ onClick: () => {
13
13
  setSelectedViewInfo(item);
14
- setViews === null || setViews === void 0 ? void 0 : setViews(item.columns);
14
+ onTableViewOptionClick === null || onTableViewOptionClick === void 0 ? void 0 : onTableViewOptionClick(item);
15
15
  } }, { children: [item.id === selectedViewInfo.id ? _jsx("img", { className: "check-icon", src: checkIcon, alt: "arrow" }) : _jsx(Space, {}), _jsx("span", { children: item.label }), _jsx(SpaceAfter, {})] }), item.id))), _jsxs(MenuItem, Object.assign({ sx: {
16
16
  border: 'none',
17
17
  }, onClick: (e) => {
18
18
  e.stopPropagation();
19
- setSelectedViewInfo({ label: 'Custom view', id: 'custom' });
20
- } }, { children: [selectedViewInfo.id === 'custom' ? _jsx("img", { className: "check-icon", src: checkIcon, alt: "arrow" }) : _jsx(Space, {}), _jsx("span", { children: t('createCustomView') }), _jsx(SpaceAfter, {})] }))] }) }))] })));
19
+ setSelectedViewInfo(CUSTOM_VIEW);
20
+ onTableViewOptionClick === null || onTableViewOptionClick === void 0 ? void 0 : onTableViewOptionClick(CUSTOM_VIEW);
21
+ } }, { children: [selectedViewInfo.id === CUSTOM_VIEW.id ? _jsx("img", { className: "check-icon", src: checkIcon, alt: "arrow" }) : _jsx(Space, {}), _jsx("span", { children: t('createCustomView') }), _jsx(SpaceAfter, {})] }))] }) }))] })));
21
22
  }
22
23
  export default React.memo(DefaultViews);
@@ -1,12 +1,13 @@
1
1
  /// <reference types="react" />
2
- import type { TableHeaderProps } from '../TableHeader/type';
2
+ import type { TableHeaderProps, TableViewOption } from '../TableHeader/type';
3
3
  interface TableViewProps {
4
4
  onViewChange?: TableHeaderProps['onViewChange'];
5
5
  setIsViewVisible: (visible: boolean) => void;
6
6
  setTableViews: TableHeaderProps['setTableViews'];
7
7
  tableViews: TableHeaderProps['tableViews'];
8
8
  resetTableViews: TableHeaderProps['resetTableViews'];
9
+ onTableViewOptionClick?: (option: TableViewOption) => void;
9
10
  }
10
- declare function TableView({ onViewChange, setIsViewVisible, setTableViews, tableViews, resetTableViews }: Readonly<TableViewProps>): import("react/jsx-runtime").JSX.Element;
11
+ declare function TableView({ onViewChange, setIsViewVisible, setTableViews, tableViews, resetTableViews, onTableViewOptionClick }: Readonly<TableViewProps>): import("react/jsx-runtime").JSX.Element;
11
12
  declare const _default: import("react").MemoExoticComponent<typeof TableView>;
12
13
  export default _default;
@@ -8,14 +8,12 @@ import Icon from '../Icon';
8
8
  import CustomViews from './CustomViews';
9
9
  import DefaultViews from './DefaultViews';
10
10
  import { ButtonStyled, ViewWrapper } from './style';
11
- function TableView({ onViewChange, setIsViewVisible, setTableViews, tableViews, resetTableViews }) {
11
+ import { DEFAULT_VIEW, CUSTOM_VIEW } from './constant';
12
+ function TableView({ onViewChange, setIsViewVisible, setTableViews, tableViews, resetTableViews, onTableViewOptionClick }) {
12
13
  const [anchorViewEl, setAnchorViewEl] = useState(null);
13
14
  const [defaultViewEl, setDefaultViewElement] = useState(null);
14
15
  const [customViewEl, setCustomViewElement] = useState(null);
15
- const [selectedViewInfo, setSelectedViewInfo] = useState({
16
- id: 'default',
17
- label: 'Default',
18
- });
16
+ const [selectedViewInfo, setSelectedViewInfo] = useState(DEFAULT_VIEW);
19
17
  const { t } = useTranslation();
20
18
  const onViewButtonClick = (event) => {
21
19
  onViewChange === null || onViewChange === void 0 ? void 0 : onViewChange();
@@ -30,16 +28,17 @@ function TableView({ onViewChange, setIsViewVisible, setTableViews, tableViews,
30
28
  setAnchorViewEl(null);
31
29
  setIsViewVisible(false);
32
30
  // to be removed
33
- setSelectedViewInfo({ label: 'Default', id: 'default' });
31
+ setSelectedViewInfo(DEFAULT_VIEW);
34
32
  };
35
33
  const handleSelectedViewInfo = (selected) => {
36
34
  setSelectedViewInfo(selected);
35
+ resetTableViews === null || resetTableViews === void 0 ? void 0 : resetTableViews(selected);
37
36
  closeViewDropdown();
38
37
  };
39
38
  if (!anchorViewEl) {
40
39
  return (_jsx(StyledButton, Object.assign({ title: t('tableView'), onClick: onViewButtonClick, "data-testid": "TableView_no_anchorViewEl_button" }, { children: _jsx(Icon, { src: viewIcon, alt: "view-icon", sx: { width: 14, height: 14 } }) })));
41
40
  }
42
- return (_jsx(ClickAwayListener, Object.assign({ onClickAway: closeViewDropdown }, { children: _jsxs(ViewWrapper, Object.assign({ "data-testid": "TableView" }, { children: [selectedViewInfo.id === 'custom' && (_jsx(CustomViews, { tableViews: tableViews, setTableViews: setTableViews, anchorEl: customViewEl, open: Boolean(customViewEl), onSelect: (e) => {
41
+ return (_jsx(ClickAwayListener, Object.assign({ onClickAway: closeViewDropdown }, { children: _jsxs(ViewWrapper, Object.assign({ "data-testid": "TableView" }, { children: [selectedViewInfo.id === CUSTOM_VIEW.id && (_jsx(CustomViews, { tableViews: tableViews, setTableViews: setTableViews, anchorEl: customViewEl, open: Boolean(customViewEl), onSelect: (e) => {
43
42
  setCustomViewElement(customViewEl ? null : e.currentTarget);
44
43
  setDefaultViewElement(null);
45
44
  }, onClose: () => {
@@ -49,8 +48,6 @@ function TableView({ onViewChange, setIsViewVisible, setTableViews, tableViews,
49
48
  }, selectedViewInfo: selectedViewInfo, onSelect: (e) => {
50
49
  setDefaultViewElement(defaultViewEl ? null : e.currentTarget);
51
50
  setCustomViewElement(null);
52
- }, setViews: (views) => {
53
- resetTableViews === null || resetTableViews === void 0 ? void 0 : resetTableViews({ id: views[0], label: views[0] });
54
- } }), _jsx(ButtonStyled, Object.assign({ sx: { width: 30, justifyContent: 'center' }, onClick: onClose }, { children: _jsx("img", { src: closeXIcon, alt: "close" }) }))] })) })));
51
+ }, onTableViewOptionClick: onTableViewOptionClick }), _jsx(ButtonStyled, Object.assign({ sx: { width: 30, justifyContent: 'center' }, onClick: onClose }, { children: _jsx("img", { src: closeXIcon, alt: "close" }) }))] })) })));
55
52
  }
56
53
  export default memo(TableView);
@@ -0,0 +1,4 @@
1
+ import type { TableViewOption } from '../TableHeader/type';
2
+ export declare const DEFAULT_VIEW: TableViewOption;
3
+ export declare const CUSTOM_VIEW: TableViewOption;
4
+ export declare const DEFAULT_VIEW_OPTIONS: TableViewOption[];
@@ -0,0 +1,3 @@
1
+ export const DEFAULT_VIEW = { id: 'default', label: 'Default' };
2
+ export const CUSTOM_VIEW = { id: 'custom', label: 'Custom view' };
3
+ export const DEFAULT_VIEW_OPTIONS = [DEFAULT_VIEW];
@@ -1,3 +1,4 @@
1
1
  export { default as TableView } from './TableView';
2
2
  export * from './TableView';
3
3
  export * from './style';
4
+ export type { TableViewOption } from '../TableHeader/type';
@@ -1,10 +1,12 @@
1
1
  import React, { ReactElement } from 'react';
2
2
  import type { TooltipProps } from '@mui/material/Tooltip';
3
+ import { BoxProps } from '@mui/material/Box';
3
4
  interface Props extends Omit<TooltipProps, 'children'> {
4
5
  title: React.ReactNode;
5
6
  placement?: TooltipProps['placement'];
6
7
  children?: ReactElement;
7
8
  className?: string;
9
+ wrapperProps?: BoxProps;
8
10
  }
9
- declare function Tooltip({ className, title, placement, children, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
11
+ declare function Tooltip({ className, title, placement, children, wrapperProps, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
10
12
  export default Tooltip;
@@ -14,8 +14,8 @@ import { useId } from 'react';
14
14
  import Box from '@mui/material/Box';
15
15
  import { StyledTooltip } from './styles';
16
16
  function Tooltip(_a) {
17
- var { className, title, placement = 'top', children } = _a, rest = __rest(_a, ["className", "title", "placement", "children"]);
17
+ var { className, title, placement = 'top', children, wrapperProps } = _a, rest = __rest(_a, ["className", "title", "placement", "children", "wrapperProps"]);
18
18
  const id = useId();
19
- return (_jsx(StyledTooltip, Object.assign({ classes: { popper: className }, title: title, placement: placement, arrow: true }, rest, { children: _jsx(Box, Object.assign({ display: "flex", alignItems: "center" }, { children: children }), `tooltip-child-${id}`) })));
19
+ return (_jsx(StyledTooltip, Object.assign({ classes: { popper: className }, title: title, placement: placement, arrow: true }, rest, { children: _jsx(Box, Object.assign({ display: "flex", alignItems: "center" }, wrapperProps, { children: children }), `tooltip-child-${id}`) })));
20
20
  }
21
21
  export default Tooltip;
@@ -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,7 +1,7 @@
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.424",
4
+ "version": "0.1.425-hotfix.1.6.2026",
5
5
  "testVersion": 0,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
@@ -62,7 +62,7 @@
62
62
  "scripts": {
63
63
  "ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
64
64
  "push:local": "yarn ts:build && yalc publish --push",
65
- "push": "npm run ts:build && npm publish --access public",
65
+ "push": "npm run ts:build && npm publish --access public --tag hotfix",
66
66
  "push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
67
67
  "dev": "vite",
68
68
  "build": "tsc -b && vite build ",
@@ -1,5 +0,0 @@
1
- export declare const dummyViewList: {
2
- label: string;
3
- id: string;
4
- columns: string[];
5
- }[];
@@ -1,7 +0,0 @@
1
- export const dummyViewList = [
2
- {
3
- label: 'Default',
4
- id: 'default',
5
- columns: ['default', 'default'],
6
- },
7
- ];