@tap-payments/os-micro-frontend-shared 0.1.227 → 0.1.228-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 (51) hide show
  1. package/build/components/Autocomplete/Autocomplete.d.ts +1 -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/StatusBar/StatusBar.d.ts +3 -1
  12. package/build/components/StatusBar/StatusBar.js +3 -3
  13. package/build/components/StatusButton/StatusButton.js +2 -2
  14. package/build/components/StatusButton/type.d.ts +2 -1
  15. package/build/components/StatusIcons/AuthIcons/style.d.ts +0 -1
  16. package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
  17. package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
  18. package/build/components/StatusIcons/SourceIcons/style.d.ts +0 -1
  19. package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +0 -1
  20. package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
  21. package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
  22. package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
  23. package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
  24. package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
  25. package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
  26. package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
  27. package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
  28. package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
  29. package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
  30. package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
  31. package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
  32. package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
  33. package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
  34. package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
  35. package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
  36. package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
  37. package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
  38. package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
  39. package/build/components/TableCells/CustomCells/SourceCell/style.d.ts +0 -1
  40. package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
  41. package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
  42. package/build/components/TableCells/CustomCells/style.d.ts +0 -1
  43. package/build/components/VirtualTables/components/style.d.ts +0 -1
  44. package/build/components/index.d.ts +1 -0
  45. package/build/components/index.js +1 -0
  46. package/build/constants/apps.js +3 -3
  47. package/build/constants/assets.d.ts +1 -0
  48. package/build/constants/assets.js +1 -0
  49. package/build/utils/date.d.ts +4 -0
  50. package/build/utils/date.js +21 -0
  51. package/package.json +3 -3
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { AutocompleteRenderInputParams, AutocompleteProps as MuiAutocompleteProps } from '@mui/material/Autocomplete';
3
3
  import { TextFieldProps } from '@mui/material/TextField';
4
- import { MakeOptional } from 'src/types/tsUtils';
4
+ import { MakeOptional } from '../../types/index.js';
5
5
  export type AutocompleteProps<Value = string, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = 'div'> = {
6
6
  label?: TextFieldProps['label'];
7
7
  textFieldProps?: TextFieldProps | ((params: AutocompleteRenderInputParams) => TextFieldProps);
@@ -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
  id?: 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
  id?: 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
  id?: 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
  id?: 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 { SxProps, 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,11 +1,13 @@
1
1
  import { TableHeaderStatus } from '../../types/index.js';
2
2
  import { AvailableStatus } from './type';
3
+ import { SxProps } from '@mui/material';
3
4
  interface StatusBarProps<IStatus extends TableHeaderStatus | TableHeaderStatus[] = undefined> {
4
5
  status?: IStatus;
5
6
  availableStatuses?: AvailableStatus<IStatus>[];
6
7
  isFilteredIdsShown?: boolean;
7
8
  onStatusChange?: (status?: IStatus) => void;
9
+ buttonSx?: SxProps;
8
10
  }
9
- declare function StatusBar<IStatus extends TableHeaderStatus | TableHeaderStatus[] = undefined>({ isFilteredIdsShown, availableStatuses, status, onStatusChange, }: Readonly<StatusBarProps<IStatus>>): import("react/jsx-runtime").JSX.Element;
11
+ declare function StatusBar<IStatus extends TableHeaderStatus | TableHeaderStatus[] = undefined>({ isFilteredIdsShown, availableStatuses, status, onStatusChange, buttonSx, }: Readonly<StatusBarProps<IStatus>>): import("react/jsx-runtime").JSX.Element;
10
12
  declare const _default: typeof StatusBar;
11
13
  export default _default;
@@ -14,7 +14,7 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
14
14
  import { Fragment, memo, useCallback } from 'react';
15
15
  import { useTranslation } from 'react-i18next';
16
16
  import StatusButton from '../StatusButton';
17
- function StatusBar({ isFilteredIdsShown, availableStatuses, status, onStatusChange, }) {
17
+ function StatusBar({ isFilteredIdsShown, availableStatuses, status, onStatusChange, buttonSx, }) {
18
18
  const { t } = useTranslation();
19
19
  const getButtonStatus = useCallback((buttonStatus) => {
20
20
  return buttonStatus === status && !isFilteredIdsShown ? 'active' : 'inActive';
@@ -33,7 +33,7 @@ function StatusBar({ isFilteredIdsShown, availableStatuses, status, onStatusChan
33
33
  if (!Array.isArray(s.status)) {
34
34
  handleStatusChange(s.status);
35
35
  }
36
- } })));
36
+ }, buttonSx: buttonSx })));
37
37
  }
38
38
  const statusItems = s.status;
39
39
  if (!statusItems)
@@ -47,7 +47,7 @@ function StatusBar({ isFilteredIdsShown, availableStatuses, status, onStatusChan
47
47
  status: stat === null || stat === void 0 ? void 0 : stat.value,
48
48
  icon: stat.icon,
49
49
  onClick: () => handleStatusChange(stat.value),
50
- })) })) }, (_c = formattedStatuses[0]) === null || _c === void 0 ? void 0 : _c.value));
50
+ })), buttonSx: buttonSx })) }, (_c = formattedStatuses[0]) === null || _c === void 0 ? void 0 : _c.value));
51
51
  }) }));
52
52
  }
53
53
  export default memo(StatusBar);
@@ -19,7 +19,7 @@ import { ChevronContainer, Label, LabelWrapper, StyledStatusIcon, StyledDropdown
19
19
  import { statusButtonIcons } from './constant';
20
20
  const StatusButton = memo((props) => {
21
21
  var _a;
22
- const { variant = 'inActive', badgeCount, icon, label, dropdownOptions, selectedStatus: initialStatus, onButtonBodyClick, iconMapper = statusButtonIcons } = props, restProps = __rest(props, ["variant", "badgeCount", "icon", "label", "dropdownOptions", "selectedStatus", "onButtonBodyClick", "iconMapper"]);
22
+ const { variant = 'inActive', badgeCount, icon, label, dropdownOptions, selectedStatus: initialStatus, onButtonBodyClick, iconMapper = statusButtonIcons, buttonSx } = props, restProps = __rest(props, ["variant", "badgeCount", "icon", "label", "dropdownOptions", "selectedStatus", "onButtonBodyClick", "iconMapper", "buttonSx"]);
23
23
  const [buttonClicks, setButtonClicks] = useState(0);
24
24
  const { t } = useTranslation();
25
25
  const buttonRef = useRef(null);
@@ -75,6 +75,6 @@ const StatusButton = memo((props) => {
75
75
  const menuItems = useMemo(() => (dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.map((item) => (Object.assign(Object.assign({}, item), { onClick: handleMenuItemClick(item) })))) || [], [dropdownOptions, handleMenuItemClick]);
76
76
  const ButtonComponent = statusButtonVariants[variant];
77
77
  const displayLabel = selectedStatus ? t(selectedStatus) : label;
78
- return (_jsxs(_Fragment, { children: [_jsx(ButtonComponent, Object.assign({ "data-testid": "StatusButton" }, restProps, { ref: buttonRef, onClick: handleButtonClick, sx: Object.assign({}, (hasDropdown && { paddingInlineEnd: '27px' })) }, { children: _jsxs(LabelWrapper, { children: [_jsxs(Label, Object.assign({ variant: variant }, { children: [statusIcon, displayLabel, statusBadge] })), dropdownIcon && _jsx(ChevronContainer, { children: dropdownIcon })] }) })), isDropdownOpen && hasDropdown && (_jsx(StyledDropdown, { open: isDropdownOpen, onClose: handleDropdownClose, anchorEl: anchorEl, menuItems: menuItems }))] }));
78
+ return (_jsxs(_Fragment, { children: [_jsx(ButtonComponent, Object.assign({ "data-testid": "StatusButton" }, restProps, { ref: buttonRef, onClick: handleButtonClick, sx: Object.assign(Object.assign({}, (hasDropdown && { paddingInlineEnd: '27px' })), buttonSx) }, { children: _jsxs(LabelWrapper, { children: [_jsxs(Label, Object.assign({ variant: variant }, { children: [statusIcon, displayLabel, statusBadge] })), dropdownIcon && _jsx(ChevronContainer, { children: dropdownIcon })] }) })), isDropdownOpen && hasDropdown && (_jsx(StyledDropdown, { open: isDropdownOpen, onClose: handleDropdownClose, anchorEl: anchorEl, menuItems: menuItems }))] }));
79
79
  });
80
80
  export default StatusButton;
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { type ButtonProps } from '@mui/material';
2
+ import { SxProps, type ButtonProps } from '@mui/material';
3
3
  import { TableHeaderStatus } from '../../types/index.js';
4
4
  import { type StatusButtonVariant } from './style';
5
5
  import { MenuItemI } from '../DropdownMenu';
@@ -29,6 +29,7 @@ export interface StatusButtonProps extends Omit<ButtonProps, 'variant' | 'childr
29
29
  dropdownOptions?: Array<MenuItemI & {
30
30
  status: TableHeaderStatus;
31
31
  }>;
32
+ buttonSx?: SxProps;
32
33
  }
33
34
  export interface ChevronIconProps {
34
35
  isActive?: boolean;
@@ -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
  id?: 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
  id?: 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 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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
  id?: 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 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 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
  id?: 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,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react" />
3
2
  interface TableWrapperProps {
4
3
  showNoDataView?: boolean;
5
4
  }
@@ -121,3 +121,4 @@ export { default as ListLayout } from './ListLayout';
121
121
  export * from './ListLayout';
122
122
  export { default as MFWidgetLoader } from './MFWidgetLoader';
123
123
  export { default as BetaBanner } from './BetaBanner';
124
+ export * from './Autocomplete';
@@ -121,3 +121,4 @@ export { default as ListLayout } from './ListLayout';
121
121
  export * from './ListLayout';
122
122
  export { default as MFWidgetLoader } from './MFWidgetLoader';
123
123
  export { default as BetaBanner } from './BetaBanner';
124
+ export * from './Autocomplete';
@@ -371,11 +371,11 @@ export const APP_DIMENSIONS = {
371
371
  maxHeight: '100vh',
372
372
  },
373
373
  [APP_CODES.reports.code]: {
374
- width: 500,
375
- minWidth: 500,
374
+ width: 700,
375
+ minWidth: 700,
376
376
  maxWidth: 'unset',
377
377
  maxHeight: 'unset',
378
- height: 600,
378
+ height: 652,
379
379
  },
380
380
  [APP_CODES.billing.code]: {
381
381
  minWidth: 856,
@@ -556,3 +556,4 @@ export declare const inActiveGreyIcon: string;
556
556
  export declare const terminalLinkVideo: string;
557
557
  export declare const bluePlusIcon: string;
558
558
  export declare const blackSettingsVariant2Icon: string;
559
+ export declare const exclamationWhiteIcon: string;
@@ -564,3 +564,4 @@ export const inActiveGreyIcon = `${lightUrl}/inActiveGreyIcon.svg`;
564
564
  export const terminalLinkVideo = `${videosUrl}/terminal_link.mp4`;
565
565
  export const bluePlusIcon = `${lightUrl}/bluePlusIcon.svg`;
566
566
  export const blackSettingsVariant2Icon = `${lightUrl}/blackSettingsVariant2Icon.svg`;
567
+ export const exclamationWhiteIcon = `${lightUrl}/exclamationWhite.svg`;
@@ -38,3 +38,7 @@ export declare const generatePastYearList: (length?: number) => {
38
38
  label: number;
39
39
  }[];
40
40
  export declare function secondsToTimeString(seconds: number): string;
41
+ type TimeUnit = 'seconds' | 'minutes' | 'hours' | 'days';
42
+ export declare function isWithinTimeAgo(timestampMs: number, amount: number, unit?: TimeUnit): boolean;
43
+ export declare const formatRelativeTimeWithinHour: (timestampMs: number) => string;
44
+ export {};
@@ -216,3 +216,24 @@ export function secondsToTimeString(seconds) {
216
216
  }
217
217
  return `${pad(minutes)}:${pad(secondsValue)}`;
218
218
  }
219
+ export function isWithinTimeAgo(timestampMs, amount, unit = 'seconds') {
220
+ const unitSeconds = {
221
+ seconds: 1,
222
+ minutes: 60,
223
+ hours: 3600,
224
+ days: 86400,
225
+ };
226
+ const now = Date.now();
227
+ const diffSeconds = (now - timestampMs) / 1000;
228
+ return diffSeconds < amount * unitSeconds[unit];
229
+ }
230
+ export const formatRelativeTimeWithinHour = (timestampMs) => {
231
+ const now = Date.now();
232
+ const diffSeconds = Math.floor((now - timestampMs) / 1000);
233
+ const diffMinutes = Math.floor(diffSeconds / 60);
234
+ if (isWithinTimeAgo(timestampMs, 60, 'seconds'))
235
+ return 'just now';
236
+ if (isWithinTimeAgo(timestampMs, 60, 'minutes'))
237
+ return `${diffMinutes} min${diffMinutes === 1 ? '' : 's'} ago`;
238
+ return '1 hour ago'; // fallback for > 59 mins
239
+ };
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.227",
5
- "testVersion": 0,
4
+ "version": "0.1.228-test.1",
5
+ "testVersion": 1,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",
@@ -163,4 +163,4 @@
163
163
  "publishConfig": {
164
164
  "registry": "https://registry.npmjs.org/"
165
165
  }
166
- }
166
+ }