@tap-payments/os-micro-frontend-shared 0.1.273-test.1 → 0.1.273-test.1-test.2

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.
@@ -1,9 +1,3 @@
1
- import { DateCellBaseProps } from '../../../index.js';
2
- interface DateCellProps extends DateCellBaseProps {
3
- currentTimezone?: string;
4
- timezoneOffset?: number;
5
- defaultTimezoneOffset?: number;
6
- hideTimezoneIcon?: boolean;
7
- }
8
- export default function DateCell({ value, currentTimezone, timezoneOffset, defaultTimezoneOffset, hideTimezoneIcon, ...props }: DateCellProps): import("react/jsx-runtime").JSX.Element;
9
- export {};
1
+ import { DateCellProps } from '../type';
2
+ declare function DateCell({ value, format: dateFormat, flagIcon, hasFlag, tableMode, ...props }: DateCellProps): import("react/jsx-runtime").JSX.Element;
3
+ export default DateCell;
@@ -10,17 +10,20 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import Box from '@mui/material/Box';
14
- import { Tooltip } from '../../../index.js';
15
- import DateViewer from './DateViewer';
16
- import { greyTimezoneIcon, TIMEZONES } from '../../../../constants/index.js';
17
- import { changeDateTimezone, formatCellDate } from '../../../../utils/index.js';
18
- export default function DateCell(_a) {
19
- var { value, currentTimezone = TIMEZONES.UTC, timezoneOffset = 0, defaultTimezoneOffset = 0, hideTimezoneIcon = false } = _a, props = __rest(_a, ["value", "currentTimezone", "timezoneOffset", "defaultTimezoneOffset", "hideTimezoneIcon"]);
20
- const formatDate = (targetTimezone) => changeDateTimezone(value, { currentTimezone, targetTimezone });
21
- const formattedDate = formatDate(timezoneOffset);
22
- const formattedDefaultDate = formatDate(defaultTimezoneOffset);
23
- const renderDefaultDate = formatCellDate(formattedDefaultDate);
24
- const showTimezoneIcon = !hideTimezoneIcon && defaultTimezoneOffset !== timezoneOffset;
25
- return (_jsxs(Box, Object.assign({ sx: { display: 'flex', gap: '8px' } }, { children: [_jsx(DateViewer, Object.assign({ value: formattedDate }, props)), showTimezoneIcon && (_jsx(Tooltip, Object.assign({ title: renderDefaultDate }, { children: _jsx("img", { src: greyTimezoneIcon, width: 14, alt: "timezone" }) })))] })));
13
+ import { useMemo } from 'react';
14
+ import { TableCell } from '../../../TableCells';
15
+ import Tooltip from '../../../Tooltip';
16
+ import CountryFlag from '../../../CountryFlag';
17
+ import { formatCellDate, getCountryNameByISO } from '../../../../utils/index.js';
18
+ import { DateCellContainer } from './style';
19
+ import { GeographyBox } from '../style';
20
+ import { Box } from '@mui/material';
21
+ function DateCell(_a) {
22
+ var { value, format: dateFormat, flagIcon, hasFlag, tableMode } = _a, props = __rest(_a, ["value", "format", "flagIcon", "hasFlag", "tableMode"]);
23
+ const icon = flagIcon && (_jsx(Tooltip, Object.assign({ title: getCountryNameByISO(flagIcon || '') }, { children: _jsx(CountryFlag, { countryCode: flagIcon }) })));
24
+ const renderedValue = useMemo(() => formatCellDate(value, dateFormat), [value]);
25
+ return (_jsx(TableCell, Object.assign({}, props, { children: _jsxs(DateCellContainer, { children: [hasFlag && (_jsx(GeographyBox, Object.assign({ sx: {
26
+ visibility: 'visible',
27
+ }, className: "geography-box" }, { children: icon }))), _jsx(Box, Object.assign({ sx: Object.assign({}, (tableMode === 'sheet' && { fontSize: '11px' })) }, { children: renderedValue }))] }) })));
26
28
  }
29
+ export default DateCell;
@@ -1,2 +1 @@
1
- export { default as DateViewer } from './DateViewer';
2
1
  export { default as DateCell } from './DateCell';
@@ -1,2 +1 @@
1
- export { default as DateViewer } from './DateViewer';
2
1
  export { default as DateCell } from './DateCell';
@@ -1,2 +1,2 @@
1
- import { DateCellBaseProps } from '../type';
2
- export default function PayoutDateCell({ value, ...props }: DateCellBaseProps): import("react/jsx-runtime").JSX.Element;
1
+ import { DateCellProps } from '../type';
2
+ export default function PayoutDateCell({ value, ...props }: DateCellProps): import("react/jsx-runtime").JSX.Element;
@@ -265,7 +265,7 @@ export declare const RefundCellContainer: import("@emotion/styled").StyledCompon
265
265
  isFullyUsed?: boolean | undefined;
266
266
  }, {}, {}>;
267
267
  export declare const PercentageContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
268
- export declare const DateContainer: import("@emotion/styled").StyledComponent<import("..").DateCellBaseProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
268
+ export declare const DateContainer: import("@emotion/styled").StyledComponent<import("..").DateCellProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
269
269
  export declare const PiePercentage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
270
270
  percentage: number;
271
271
  isCapture?: boolean | undefined;
@@ -1,6 +1,6 @@
1
1
  import { styled } from '@mui/material/styles';
2
2
  import { motion } from 'framer-motion';
3
- import DateViewer from '../DateCell/DateViewer';
3
+ import DateCell from '../DateCell/DateCell';
4
4
  import Box from '@mui/material/Box';
5
5
  export const RefundCellContainer = styled(motion.div)(({ theme }) => ({
6
6
  display: 'flex',
@@ -32,7 +32,7 @@ export const PercentageContainer = styled('div')(({ theme }) => ({
32
32
  gap: theme.spacing(0.5),
33
33
  lineHeight: 0,
34
34
  }));
35
- export const DateContainer = styled(DateViewer)(({ theme }) => ({
35
+ export const DateContainer = styled(DateCell)(({ theme }) => ({
36
36
  fontSize: '12px',
37
37
  fontWeight: theme.typography.fontWeightRegular,
38
38
  color: theme.palette.secondary.main,
@@ -5,7 +5,7 @@ import { getGeographyBoxColor } from '../../../utils/index.js';
5
5
  import type { ActionType, FlagType } from './ActionCell';
6
6
  export type GeographyBoxVariant = keyof ReturnType<typeof getGeographyBoxColor>;
7
7
  export type PaymentMethod = 'VISA' | 'card' | 'MASTERCARD' | 'APPLE_PAY' | 'KNET' | 'MADA';
8
- export interface DateCellBaseProps extends TableCellProps {
8
+ export interface DateCellProps extends TableCellProps {
9
9
  value: string | Date;
10
10
  format?: object;
11
11
  flagIcon?: string;
@@ -104,7 +104,7 @@ export const getPossibleActionNavigationView = () => {
104
104
  },
105
105
  authorize: {
106
106
  prefixes: ['auth_'],
107
- keys: ['id', 'authorize.id', 'source.id'],
107
+ keys: ['id', 'authorize.id', 'source.id', 'charge.source.id'],
108
108
  label: 'Authorization',
109
109
  appCode: APP_CODES.acceptance.code,
110
110
  serviceCode: APP_CODES.acceptance.services.authorization.code,
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.273-test.1",
5
- "testVersion": 1,
4
+ "version": "0.1.273-test.1-test.2",
5
+ "testVersion": 2,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",
@@ -1,3 +0,0 @@
1
- import { DateCellBaseProps } from '../type';
2
- declare function DateViewer({ value, format: dateFormat, flagIcon, hasFlag, tableMode, ...props }: DateCellBaseProps): import("react/jsx-runtime").JSX.Element;
3
- export default DateViewer;
@@ -1,29 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { useMemo } from 'react';
14
- import { TableCell } from '../../../TableCells';
15
- import Tooltip from '../../../Tooltip';
16
- import CountryFlag from '../../../CountryFlag';
17
- import { formatCellDate, getCountryNameByISO } from '../../../../utils/index.js';
18
- import { DateCellContainer } from './style';
19
- import { GeographyBox } from '../style';
20
- import { Box } from '@mui/material';
21
- function DateViewer(_a) {
22
- var { value, format: dateFormat, flagIcon, hasFlag, tableMode } = _a, props = __rest(_a, ["value", "format", "flagIcon", "hasFlag", "tableMode"]);
23
- const icon = flagIcon && (_jsx(Tooltip, Object.assign({ title: getCountryNameByISO(flagIcon || '') }, { children: _jsx(CountryFlag, { countryCode: flagIcon }) })));
24
- const renderedValue = useMemo(() => formatCellDate(value, dateFormat), [value]);
25
- return (_jsx(TableCell, Object.assign({}, props, { children: _jsxs(DateCellContainer, { children: [hasFlag && (_jsx(GeographyBox, Object.assign({ sx: {
26
- visibility: 'visible',
27
- }, className: "geography-box" }, { children: icon }))), _jsx(Box, Object.assign({ sx: Object.assign({}, (tableMode === 'sheet' && { fontSize: '11px' })) }, { children: renderedValue }))] }) })));
28
- }
29
- export default DateViewer;