@tap-payments/os-micro-frontend-shared 0.1.432 → 0.1.434-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 (57) hide show
  1. package/build/components/ActivityAreaChart/ActivityAreaChart.js +1 -1
  2. package/build/components/AnimatedSpinnerIcon/style.d.ts +0 -1
  3. package/build/components/Chip/style.d.ts +0 -1
  4. package/build/components/CountBadge/style.d.ts +0 -1
  5. package/build/components/Dialog/style.d.ts +0 -1
  6. package/build/components/FlippingCard/style.d.ts +0 -1
  7. package/build/components/ImageWrapper/ImageWrapper.d.ts +0 -1
  8. package/build/components/JSONViewer/style.d.ts +0 -1
  9. package/build/components/LeftPeekRightExpandingChip/style.d.ts +0 -1
  10. package/build/components/PaymentSourceFilter/PaymentInitiated.d.ts +3 -3
  11. package/build/components/PaymentSourceFilter/PaymentSchemes.js +1 -1
  12. package/build/components/PaymentSourceFilter/PaymentSourceFilter.d.ts +3 -3
  13. package/build/components/PaymentSourceFilter/PaymentSourceFilter.js +1 -0
  14. package/build/components/PaymentSourceFilter/index.d.ts +4 -1
  15. package/build/components/PaymentSourceFilter/index.js +4 -0
  16. package/build/components/PaymentSourceFilter/type.d.ts +3 -2
  17. package/build/components/RightLeftExpandingCenterChip/style.d.ts +0 -1
  18. package/build/components/SearchButton/styles.d.ts +0 -1
  19. package/build/components/StatusIcons/AuthIcons/style.d.ts +0 -1
  20. package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
  21. package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
  22. package/build/components/StatusIcons/SourceIcons/style.d.ts +0 -1
  23. package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +0 -1
  24. package/build/components/TableCells/CustomCells/AgreementCell/style.d.ts +0 -1
  25. package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
  26. package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
  27. package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
  28. package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
  29. package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
  30. package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
  31. package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
  32. package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
  33. package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
  34. package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
  35. package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
  36. package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
  37. package/build/components/TableCells/CustomCells/PayoutReportCell/style.d.ts +0 -1
  38. package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
  39. package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
  40. package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
  41. package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
  42. package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
  43. package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
  44. package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
  45. package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
  46. package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
  47. package/build/components/TableCells/CustomCells/style.d.ts +0 -1
  48. package/build/components/TableHeader/TableView/ViewsDropdown.js +2 -0
  49. package/build/components/TableHeader/TableView/utils/templateToColumnsView.js +21 -11
  50. package/build/components/TableReports/components/DownloadButton/style.d.ts +0 -1
  51. package/build/components/TableReports/style.d.ts +0 -1
  52. package/build/components/VirtualTables/components/ColumnSort/ColumnSort.js +10 -5
  53. package/build/components/VirtualTables/components/style.d.ts +0 -1
  54. package/build/types/charge.d.ts +16 -0
  55. package/build/types/column.d.ts +2 -0
  56. package/build/utils/columns.js +20 -14
  57. package/package.json +3 -3
@@ -15,7 +15,7 @@ const ActivityAreaChart = ({ data, dataKey, isLoading, dateRange, selectedCurren
15
15
  };
16
16
  const MemoizedChartTooltip = useMemo(() => {
17
17
  return _jsx(ChartTooltip, { position: cursorPosition, dateRange: dateRange, selectedCurrency: selectedCurrency });
18
- }, [cursorPosition]);
18
+ }, [cursorPosition, dateRange, selectedCurrency]);
19
19
  if (isLoading || isEmpty) {
20
20
  return _jsx(LoadingChart, {});
21
21
  }
@@ -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,8 +1,8 @@
1
1
  import { CustomColumnFilterProps } from '../VirtualTables';
2
- import { PaymentSourceFilters } from './type';
2
+ import { Filter } from './type';
3
3
  interface PaymentInitiatedFilterProps extends Partial<CustomColumnFilterProps> {
4
- filters?: PaymentSourceFilters;
5
- setFilters?: (filters: PaymentSourceFilters) => void;
4
+ filters?: Filter;
5
+ setFilters?: (filters: Filter) => void;
6
6
  }
7
7
  export default function PaymentInitiatedFilter({ filters, setFilters }: Readonly<PaymentInitiatedFilterProps>): import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -26,7 +26,7 @@ export default function PaymentSchemes({ paymentSchemesSource, filters, setFilte
26
26
  const onClose = () => {
27
27
  setAnchorEl(null);
28
28
  };
29
- const isSelected = useMemo(() => { var _a; return paymentScheme.length === ((_a = paymentSchemesSource === null || paymentSchemesSource === void 0 ? void 0 : paymentSchemesSource.options) === null || _a === void 0 ? void 0 : _a.length) && paymentScheme.length > 0; }, [paymentScheme.length, (_c = paymentSchemesSource === null || paymentSchemesSource === void 0 ? void 0 : paymentSchemesSource.options) === null || _c === void 0 ? void 0 : _c.length]);
29
+ const isSelected = useMemo(() => { var _a; return (paymentScheme === null || paymentScheme === void 0 ? void 0 : paymentScheme.length) === ((_a = paymentSchemesSource === null || paymentSchemesSource === void 0 ? void 0 : paymentSchemesSource.options) === null || _a === void 0 ? void 0 : _a.length) && paymentScheme.length > 0; }, [paymentScheme === null || paymentScheme === void 0 ? void 0 : paymentScheme.length, (_c = paymentSchemesSource === null || paymentSchemesSource === void 0 ? void 0 : paymentSchemesSource.options) === null || _c === void 0 ? void 0 : _c.length]);
30
30
  const isIndeterminate = useMemo(() => !isSelected && paymentScheme.length > 0, [paymentScheme.length, isSelected]);
31
31
  const isSelectedPaymentScheme = useCallback((selectedPaymentScheme) => { var _a; return (_a = paymentScheme.includes(selectedPaymentScheme)) !== null && _a !== void 0 ? _a : false; }, [paymentScheme]);
32
32
  const onClick = () => {
@@ -1,9 +1,9 @@
1
1
  import { SourceFilter } from '../../types/index.js';
2
2
  import { CustomColumnFilterProps } from '../VirtualTables';
3
- import { PaymentSourceFilters } from './type';
3
+ import { Filter } from './type';
4
4
  interface SourceFilterProps extends CustomColumnFilterProps {
5
- filters: PaymentSourceFilters;
6
- setFilters: (filters: PaymentSourceFilters) => void;
5
+ filters: Filter;
6
+ setFilters: (filters: Filter) => void;
7
7
  showPaymentSchemes?: boolean;
8
8
  showPaymentMethods?: boolean;
9
9
  showPaymentInitiated?: boolean;
@@ -4,6 +4,7 @@ import { Menu, FilterTitle, FilterOkayButton, FilterFooter, FilterCancelButton }
4
4
  import PaymentMethods from './PaymentMethods';
5
5
  import PaymentSchemes from './PaymentSchemes';
6
6
  import PaymentInitiated from './PaymentInitiated';
7
+ // TODO: Refactor this component to be generic for all source filters
7
8
  export default function PaymentSourceFilter({ filters, setFilters, anchorEl, showPaymentSchemes = true, showPaymentMethods = true, showPaymentInitiated = true, paymentMethodsSource, paymentSchemesSource, onCloseDropdown, onConfirm, }) {
8
9
  const { t } = useTranslation();
9
10
  const open = Boolean(anchorEl);
@@ -1,2 +1,5 @@
1
1
  export { default as PaymentSourceFilter } from './PaymentSourceFilter';
2
- export { type PaymentSourceFilters } from './type';
2
+ export { default as PaymentMethods } from './PaymentMethods';
3
+ export { default as PaymentSchemes } from './PaymentSchemes';
4
+ export { default as PaymentInitiated } from './PaymentInitiated';
5
+ export * from './type';
@@ -1 +1,5 @@
1
1
  export { default as PaymentSourceFilter } from './PaymentSourceFilter';
2
+ export { default as PaymentMethods } from './PaymentMethods';
3
+ export { default as PaymentSchemes } from './PaymentSchemes';
4
+ export { default as PaymentInitiated } from './PaymentInitiated';
5
+ export * from './type';
@@ -4,7 +4,8 @@ export interface PaymentSourceFilters {
4
4
  payment_initiated?: string[];
5
5
  issuer_countries?: string[];
6
6
  }
7
+ export type Filter = Record<string, boolean | string | number | string[]>;
7
8
  export interface Filters {
8
- filters: PaymentSourceFilters;
9
- setFilters: (filters: PaymentSourceFilters) => void;
9
+ filters: Filter;
10
+ setFilters: (filters: Filter) => void;
10
11
  }
@@ -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>, {}>;
@@ -74,6 +74,7 @@ function ViewsDropdown({ open, selectedViewInfo, setSelectedViewInfo, anchorEl,
74
74
  setDraftColumns(null);
75
75
  clearOriginalState();
76
76
  forceClose();
77
+ onClose === null || onClose === void 0 ? void 0 : onClose();
77
78
  }
78
79
  function applyAndClose() {
79
80
  const isDefaultView = selectedViewInfo.id === (defaultTemplate === null || defaultTemplate === void 0 ? void 0 : defaultTemplate.id) || selectedViewInfo.id === 'default' || (defaultTemplate === null || defaultTemplate === void 0 ? void 0 : defaultTemplate.default) === true;
@@ -88,6 +89,7 @@ function ViewsDropdown({ open, selectedViewInfo, setSelectedViewInfo, anchorEl,
88
89
  setDraftColumns(null);
89
90
  clearOriginalState();
90
91
  forceClose();
92
+ onClose === null || onClose === void 0 ? void 0 : onClose();
91
93
  }
92
94
  function toggleColumn(columnName) {
93
95
  if (!draftColumns)
@@ -80,23 +80,32 @@ export const convertTemplateToColumnsView = (template, tableMode) => {
80
80
  if (layoutForMode && layoutForMode.columns && layoutForMode.columns.length > 0) {
81
81
  const templateColumnsView = layoutForMode.columns
82
82
  .map((templateCol) => {
83
- var _a, _b;
84
- return ({
83
+ var _a, _b, _c, _d;
84
+ const hasFields = !!((_a = templateCol.fields) === null || _a === void 0 ? void 0 : _a.length);
85
+ const anyFieldDefault = hasFields && templateCol.fields.some((f) => { var _a; return (_a = f.default) !== null && _a !== void 0 ? _a : false; });
86
+ const parentSelected = ((_b = templateCol.default) !== null && _b !== void 0 ? _b : false) || anyFieldDefault;
87
+ return {
88
+ code: templateCol.code,
85
89
  name: templateCol.name && templateCol.name.length > 0 ? templateCol.name : [{ text: templateCol.code, lang: 'en' }],
86
- selected: (_a = templateCol.default) !== null && _a !== void 0 ? _a : false,
90
+ selected: parentSelected,
87
91
  sort_order: getColumnOrder(templateCol),
88
- fields: ((_b = templateCol.fields) === null || _b === void 0 ? void 0 : _b.map((field) => ({
89
- code: field.code,
90
- type: 'single',
91
- parameters: [{ parameter: field.code, code: field.code }],
92
- }))) || [
92
+ fields: ((_c = templateCol.fields) === null || _c === void 0 ? void 0 : _c.map((field) => {
93
+ var _a;
94
+ return ({
95
+ code: field.code.toLowerCase(),
96
+ type: 'single',
97
+ parameters: [{ parameter: field.code.toLowerCase(), code: field.code.toLowerCase(), selected: (_a = field.default) !== null && _a !== void 0 ? _a : false }],
98
+ });
99
+ })) || [
93
100
  {
94
- code: templateCol.code,
101
+ code: templateCol.code.toLowerCase(),
95
102
  type: 'single',
96
- parameters: [{ parameter: templateCol.code, code: templateCol.code }],
103
+ parameters: [
104
+ { parameter: templateCol.code.toLowerCase(), code: templateCol.code.toLowerCase(), selected: (_d = templateCol.default) !== null && _d !== void 0 ? _d : false },
105
+ ],
97
106
  },
98
107
  ],
99
- });
108
+ };
100
109
  })
101
110
  .sort((a, b) => { var _a, _b; return ((_a = a.sort_order) !== null && _a !== void 0 ? _a : 999) - ((_b = b.sort_order) !== null && _b !== void 0 ? _b : 999); });
102
111
  return templateColumnsView;
@@ -120,6 +129,7 @@ export const convertTemplateToColumnsView = (template, tableMode) => {
120
129
  : [{ parameter: columnCode, code: columnCode }];
121
130
  const fieldType = selectedMenuItems.length > 1 ? 'combined' : 'single';
122
131
  const result = {
132
+ code: submenuItem.name,
123
133
  name: [{ text: submenuItem.label || submenuItem.name, lang: 'en' }],
124
134
  selected: submenuItem.selected,
125
135
  sort_order: index + 1,
@@ -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;
@@ -6,6 +6,11 @@ import MenuItem from '../../../MenuItem';
6
6
  import Text from '../../../Text';
7
7
  import { columnIcon, sortAzIcon, sortZaIcon } from '../../../../constants/index.js';
8
8
  import { ActionIcon, ColumnIcon } from './style';
9
+ var SORTING_ORDER;
10
+ (function (SORTING_ORDER) {
11
+ SORTING_ORDER["ASC"] = "asc";
12
+ SORTING_ORDER["DESC"] = "desc";
13
+ })(SORTING_ORDER || (SORTING_ORDER = {}));
9
14
  function ColumnSort({ onColumnSort, columnsSorting, columnId, onClick }) {
10
15
  const [anchorEl, setAnchorEl] = useState(null);
11
16
  const open = Boolean(anchorEl);
@@ -27,10 +32,10 @@ function ColumnSort({ onColumnSort, columnsSorting, columnId, onClick }) {
27
32
  handleClose(event);
28
33
  }
29
34
  };
30
- return (_jsxs(_Fragment, { children: [_jsx(ColumnIcon, { onClick: handleClick, src: columnIcon, alt: "column-icon", "data-id": columnId, sx: { userSelect: 'none', marginTop: '2px' } }), open && _jsx(CustomBackdrop, { onClick: handleClose }), _jsxs(Menu, Object.assign({ anchorEl: anchorEl, open: open }, { children: [_jsxs(MenuItem, Object.assign({ onClick: (e) => {
31
- handleSortingOption(anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.dataset.id, 'asc', e);
32
- }, sx: (theme) => (Object.assign({}, ((columnsSorting === null || columnsSorting === void 0 ? void 0 : columnsSorting[(anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.dataset.id) || '']) === 'asc' && { boxShadow: theme.shadows[10] }))) }, { children: [_jsx(ActionIcon, { src: sortAzIcon, alt: "sort-icon" }), _jsx(Text, Object.assign({ sx: { fontSize: '0.6875rem' } }, { children: "Sort Z-A" }))] })), _jsxs(MenuItem, Object.assign({ onClick: (e) => {
33
- handleSortingOption(anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.dataset.id, 'desc', e);
34
- }, sx: (theme) => (Object.assign({}, ((columnsSorting === null || columnsSorting === void 0 ? void 0 : columnsSorting[(anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.dataset.id) || '']) === 'desc' && { boxShadow: theme.shadows[10] }))) }, { children: [_jsx(ActionIcon, { src: sortZaIcon, alt: "sort-icon" }), _jsx(Text, Object.assign({ sx: { fontSize: '0.6875rem' } }, { children: "Sort Z-A" }))] }))] }))] }));
35
+ return (_jsxs(_Fragment, { children: [_jsx(ColumnIcon, { onClick: handleClick, src: columnIcon, alt: "column-icon", "data-id": columnId, sx: { userSelect: 'none', marginTop: '2px' } }), open && _jsx(CustomBackdrop, { onClick: handleClose }), _jsxs(Menu, Object.assign({ anchorEl: anchorEl, open: open }, { children: [_jsxs(MenuItem, Object.assign({ isSelected: (columnsSorting === null || columnsSorting === void 0 ? void 0 : columnsSorting[(anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.dataset.id) || '']) === SORTING_ORDER.ASC, onClick: (e) => {
36
+ handleSortingOption(anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.dataset.id, SORTING_ORDER.ASC, e);
37
+ }, sx: (theme) => (Object.assign({}, ((columnsSorting === null || columnsSorting === void 0 ? void 0 : columnsSorting[(anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.dataset.id) || '']) === SORTING_ORDER.ASC && { boxShadow: theme.shadows[10] }))) }, { children: [_jsx(ActionIcon, { src: sortAzIcon, alt: "sort-icon" }), _jsx(Text, Object.assign({ sx: { fontSize: '0.6875rem' } }, { children: "Sort A-Z" }))] })), _jsxs(MenuItem, Object.assign({ isSelected: (columnsSorting === null || columnsSorting === void 0 ? void 0 : columnsSorting[(anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.dataset.id) || '']) === SORTING_ORDER.DESC, onClick: (e) => {
38
+ handleSortingOption(anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.dataset.id, SORTING_ORDER.DESC, e);
39
+ }, sx: (theme) => (Object.assign({}, ((columnsSorting === null || columnsSorting === void 0 ? void 0 : columnsSorting[(anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.dataset.id) || '']) === SORTING_ORDER.DESC && { boxShadow: theme.shadows[10] }))) }, { children: [_jsx(ActionIcon, { src: sortZaIcon, alt: "sort-icon" }), _jsx(Text, Object.assign({ sx: { fontSize: '0.6875rem' } }, { children: "Sort Z-A" }))] }))] }))] }));
35
40
  }
36
41
  export default memo(ColumnSort);
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  interface TableWrapperProps {
4
3
  showNoDataView?: boolean;
5
4
  }
@@ -3,6 +3,7 @@ import { Country } from './appConfig';
3
3
  import { Currency } from './currency';
4
4
  import { Discount, Item, Vat } from './invoice';
5
5
  import { HttpMethodFilters } from './api';
6
+ import { TextAndLang } from './common';
6
7
  export interface ChargeDialog {
7
8
  id: string;
8
9
  order: number;
@@ -117,6 +118,7 @@ export interface Charge {
117
118
  status: AuthenticationStatus;
118
119
  threeDSecure?: {
119
120
  status: AuthenticationStatus;
121
+ provider: string;
120
122
  };
121
123
  };
122
124
  payment: {
@@ -332,6 +334,20 @@ export interface Charge {
332
334
  retailer: {
333
335
  id: string;
334
336
  };
337
+ payment_provider?: {
338
+ technology?: {
339
+ id: string;
340
+ brand?: {
341
+ name: TextAndLang[];
342
+ };
343
+ };
344
+ institution?: {
345
+ id: string;
346
+ brand?: {
347
+ name: TextAndLang[];
348
+ };
349
+ };
350
+ };
335
351
  };
336
352
  refunds: {
337
353
  summary: {
@@ -2,6 +2,7 @@ import type { ReactNode } from 'react';
2
2
  import { TextAndLang } from './common';
3
3
  import { SxProps, Theme } from '@mui/material/styles';
4
4
  export interface ColumnsView {
5
+ code?: string;
5
6
  name: TextAndLang[];
6
7
  sorting?: 'ascending' | 'descending';
7
8
  sort_order: number;
@@ -30,6 +31,7 @@ export interface ColumnsView {
30
31
  }>;
31
32
  }
32
33
  export interface ColumnViewProps {
34
+ code?: string;
33
35
  label?: string | null | ReactNode;
34
36
  name: string;
35
37
  icon?: ReactNode;
@@ -3,11 +3,17 @@ import { getNameText } from './index.js';
3
3
  export function filterShownColumns(columns, tableViews) {
4
4
  return columns.filter((column) => {
5
5
  var _a, _b, _c, _d, _e;
6
- const selectedColumn = tableViews.find((view) => { var _a; return ((_a = view.name) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === (column === null || column === void 0 ? void 0 : column.id) && view.selected; });
7
- const isColumnWithMenuItems = !!column.tableViewId && (((_a = selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.menuItems) === null || _a === void 0 ? void 0 : _a.length) || 0) > 1;
8
- const isMenuItemSelected = (_c = (_b = selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.menuItems) === null || _b === void 0 ? void 0 : _b.find((item) => item.name === column.tableViewId)) === null || _c === void 0 ? void 0 : _c.selected;
6
+ const columnId = (_a = column === null || column === void 0 ? void 0 : column.id) === null || _a === void 0 ? void 0 : _a.toString();
7
+ const selectedColumn = tableViews.find((view) => {
8
+ var _a, _b;
9
+ const codeMatch = ((_a = view.code) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === (columnId === null || columnId === void 0 ? void 0 : columnId.toLowerCase());
10
+ const nameMatch = ((_b = view.name) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === (columnId === null || columnId === void 0 ? void 0 : columnId.toLowerCase());
11
+ return (codeMatch || nameMatch) && view.selected;
12
+ });
13
+ const isColumnWithMenuItems = !!column.tableViewId && (((_b = selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.menuItems) === null || _b === void 0 ? void 0 : _b.length) || 0) > 0;
14
+ const isMenuItemSelected = (_d = (_c = selectedColumn === null || selectedColumn === void 0 ? void 0 : selectedColumn.menuItems) === null || _c === void 0 ? void 0 : _c.find((item) => { var _a, _b, _c; return ((_a = item.name) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_c = (_b = column.tableViewId) === null || _b === void 0 ? void 0 : _b.toString()) === null || _c === void 0 ? void 0 : _c.toLowerCase()); })) === null || _d === void 0 ? void 0 : _d.selected;
9
15
  const isColumnSelected = !!selectedColumn && (isMenuItemSelected || !isColumnWithMenuItems);
10
- const isBasicColumn = ['actions', 'action_icon'].includes((_e = (_d = column.id) === null || _d === void 0 ? void 0 : _d.toString()) === null || _e === void 0 ? void 0 : _e.toLowerCase());
16
+ const isBasicColumn = ['actions', 'action_icon'].includes((_e = columnId === null || columnId === void 0 ? void 0 : columnId.toLowerCase()) !== null && _e !== void 0 ? _e : '');
11
17
  if (isColumnSelected || isBasicColumn) {
12
18
  return true;
13
19
  }
@@ -16,13 +22,19 @@ export function filterShownColumns(columns, tableViews) {
16
22
  }
17
23
  export function isParameterSelected(columns, columnId, parameter) {
18
24
  var _a, _b, _c;
19
- return (((_c = (_b = (_a = columns === null || columns === void 0 ? void 0 : columns.find((view) => { var _a; return ((_a = view.name) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === columnId.toLowerCase(); })) === null || _a === void 0 ? void 0 : _a.menuItems) === null || _b === void 0 ? void 0 : _b.find((item) => { var _a; return ((_a = item.name) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === parameter.toLowerCase() && item.selected; })) === null || _c === void 0 ? void 0 : _c.selected) || false);
25
+ return (((_c = (_b = (_a = columns === null || columns === void 0 ? void 0 : columns.find((view) => {
26
+ var _a, _b;
27
+ const codeMatch = ((_a = view.code) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === columnId.toLowerCase();
28
+ const nameMatch = ((_b = view.name) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === columnId.toLowerCase();
29
+ return codeMatch || nameMatch;
30
+ })) === null || _a === void 0 ? void 0 : _a.menuItems) === null || _b === void 0 ? void 0 : _b.find((item) => { var _a; return ((_a = item.name) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === parameter.toLowerCase() && item.selected; })) === null || _c === void 0 ? void 0 : _c.selected) || false);
20
31
  }
21
32
  export function mapDataToViews(columnData, language) {
22
33
  var _a;
23
34
  return (((_a = columnData === null || columnData === void 0 ? void 0 : columnData.filter((c) => { var _a, _b; return !!((_b = (_a = c.name) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.text); })) === null || _a === void 0 ? void 0 : _a.map((column) => {
24
35
  var _a;
25
36
  return ({
37
+ code: column.code,
26
38
  label: getNameText(column.name, language),
27
39
  name: getNameText(column.name, language) || '',
28
40
  selected: (column === null || column === void 0 ? void 0 : column.selected) !== false,
@@ -33,7 +45,7 @@ export function mapDataToViews(columnData, language) {
33
45
  return {
34
46
  label: startCase(param.code),
35
47
  name: `${param.code}`,
36
- selected: (column === null || column === void 0 ? void 0 : column.selected) !== false && (param === null || param === void 0 ? void 0 : param.selected) !== false,
48
+ selected: (param === null || param === void 0 ? void 0 : param.selected) !== false,
37
49
  };
38
50
  });
39
51
  })
@@ -44,12 +56,7 @@ export function mapDataToViews(columnData, language) {
44
56
  export function mapViewsToData(columns) {
45
57
  return columns.map((column) => {
46
58
  var _a;
47
- return {
48
- name: [{ text: column.name, lang: 'en' }],
49
- selected: column.selected,
50
- sort_order: 1,
51
- sorting: 'descending',
52
- fields: ((_a = column.menuItems) === null || _a === void 0 ? void 0 : _a.map((item) => {
59
+ return Object.assign(Object.assign({}, (column.code ? { code: column.code } : {})), { name: [{ text: column.name, lang: 'en' }], selected: column.selected, sort_order: 1, sorting: 'descending', fields: ((_a = column.menuItems) === null || _a === void 0 ? void 0 : _a.map((item) => {
53
60
  return {
54
61
  code: item.name,
55
62
  type: 'single',
@@ -61,8 +68,7 @@ export function mapViewsToData(columns) {
61
68
  },
62
69
  ],
63
70
  };
64
- })) || [],
65
- };
71
+ })) || [] });
66
72
  });
67
73
  }
68
74
  export const updateColumnSelection = ({ columnsViewData, columnsName, selected, }) => {
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@tap-payments/os-micro-frontend-shared",
3
3
  "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.1.432",
5
- "testVersion": 0,
4
+ "version": "0.1.434-test.1",
5
+ "testVersion": 1,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",
@@ -164,4 +164,4 @@
164
164
  "publishConfig": {
165
165
  "registry": "https://registry.npmjs.org/"
166
166
  }
167
- }
167
+ }