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

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/Chip/style.d.ts +1 -0
  2. package/build/components/CountBadge/style.d.ts +1 -0
  3. package/build/components/Dialog/style.d.ts +1 -0
  4. package/build/components/FlippingCard/style.d.ts +1 -0
  5. package/build/components/ImageWrapper/ImageWrapper.d.ts +1 -0
  6. package/build/components/JSONViewer/style.d.ts +1 -0
  7. package/build/components/LeftPeekRightExpandingChip/style.d.ts +1 -0
  8. package/build/components/RightLeftExpandingCenterChip/style.d.ts +1 -0
  9. package/build/components/SearchButton/styles.d.ts +1 -0
  10. package/build/components/StatusIcons/AuthIcons/style.d.ts +1 -0
  11. package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +1 -0
  12. package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +1 -0
  13. package/build/components/StatusIcons/SourceIcons/style.d.ts +1 -0
  14. package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +1 -0
  15. package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +1 -0
  16. package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +1 -0
  17. package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +1 -0
  18. package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +1 -0
  19. package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +1 -0
  20. package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +1 -0
  21. package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +1 -0
  22. package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +1 -0
  23. package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +1 -0
  24. package/build/components/TableCells/CustomCells/IDButton/style.d.ts +1 -0
  25. package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +1 -0
  26. package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +1 -0
  27. package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +1 -0
  28. package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +1 -0
  29. package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +1 -0
  30. package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +1 -0
  31. package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +1 -0
  32. package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +1 -0
  33. package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +1 -0
  34. package/build/components/TableCells/CustomCells/SourceCell/style.d.ts +1 -0
  35. package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +1 -0
  36. package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +1 -0
  37. package/build/components/TableCells/CustomCells/style.d.ts +1 -0
  38. package/build/components/VirtualTables/components/style.d.ts +1 -0
  39. package/build/components/index.d.ts +0 -1
  40. package/build/components/index.js +0 -1
  41. package/package.json +3 -3
  42. package/build/components/Amount/TotalAmount/Loading.d.ts +0 -1
  43. package/build/components/Amount/TotalAmount/Loading.js +0 -9
  44. package/build/components/Amount/TotalAmount/TotalAmount.d.ts +0 -15
  45. package/build/components/Amount/TotalAmount/TotalAmount.js +0 -60
  46. package/build/components/Amount/TotalAmount/index.d.ts +0 -1
  47. package/build/components/Amount/TotalAmount/index.js +0 -1
  48. package/build/components/Amount/TotalAmount/style.d.ts +0 -11
  49. package/build/components/Amount/TotalAmount/style.js +0 -26
  50. package/build/components/Amount/index.d.ts +0 -1
  51. package/build/components/Amount/index.js +0 -1
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  import { GetSourceAnimationFunction } from './type';
3
4
  export declare const ChipStyled: import("@emotion/styled").StyledComponent<import("react").RefAttributes<unknown> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
4
5
  variant?: import("./type").ChipVariant | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const AgreementImageWrapper: import("@emotion/styled").StyledComponent<{
3
4
  hidden?: boolean | undefined;
4
5
  color?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const DialogWrapper: import("@emotion/styled").StyledComponent<{
3
4
  hidden?: boolean | undefined;
4
5
  color?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const Wrapper: import("@emotion/styled").StyledComponent<{
3
4
  hidden?: boolean | undefined;
4
5
  color?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  declare const ImageWrapper: import("@emotion/styled").StyledComponent<{
3
4
  hidden?: boolean | undefined;
4
5
  color?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const FOOTER_HEIGHT = 37;
3
4
  export declare const TITLE_BAR_HEIGHT = "32px";
4
5
  export declare const VIEWER_HEIGHT = 545;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  import type { SxProps, Theme } from '@mui/material/styles';
3
4
  export declare const CHIP_GAP = 3;
4
5
  export declare const DEFAULT_CHIP_MIN_WIDTH = 24;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  import type { SxProps, Theme } from '@mui/material/styles';
3
4
  export declare const CHIP_GAP = 3;
4
5
  export declare const CenterIconWrapper: import("@emotion/styled").StyledComponent<{
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const StyledInput: import("@emotion/styled").StyledComponent<{
3
4
  width?: string | number | undefined;
4
5
  height?: string | number | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
3
4
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
4
5
  export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const BalanceCellContainer: import("@emotion/styled").StyledComponent<{
3
4
  hidden?: boolean | undefined;
4
5
  color?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const ErrorCodeLabel: import("@emotion/styled").StyledComponent<{
3
4
  hidden?: boolean | undefined;
4
5
  color?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
3
4
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
4
5
  export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  import { TableMode } from '../../../../types/index.js';
3
4
  export declare const ActionCellContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
4
5
  tableMode?: TableMode | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const StyledAppsCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
3
4
  export declare const AppsStatusContainer: import("@emotion/styled").StyledComponent<{
4
5
  hidden?: boolean | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const AuthIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
3
4
  export declare const AuthCellContainer: import("@emotion/styled").StyledComponent<{
4
5
  hidden?: boolean | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
3
4
  hidden?: boolean | undefined;
4
5
  color?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
3
4
  hidden?: boolean | undefined;
4
5
  color?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const BalanceCellContainer: import("@emotion/styled").StyledComponent<{
3
4
  hidden?: boolean | undefined;
4
5
  color?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
3
4
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
4
5
  export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const DueDateCellContainer: import("@emotion/styled").StyledComponent<{
3
4
  hidden?: boolean | undefined;
4
5
  color?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
3
4
  hidden?: boolean | undefined;
4
5
  color?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const DueDateCellContainer: import("@emotion/styled").StyledComponent<{
3
4
  hidden?: boolean | undefined;
4
5
  color?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const Button: import("@emotion/styled").StyledComponent<{
3
4
  hidden?: boolean | undefined;
4
5
  color?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const DueDateCellContainer: import("@emotion/styled").StyledComponent<{
3
4
  hidden?: boolean | undefined;
4
5
  color?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const DueDateCellContainer: import("@emotion/styled").StyledComponent<{
3
4
  hidden?: boolean | undefined;
4
5
  color?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
3
4
  hidden?: boolean | undefined;
4
5
  color?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const ProductCellContainer: import("@emotion/styled").StyledComponent<{
3
4
  hidden?: boolean | undefined;
4
5
  color?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
3
4
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
4
5
  export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const RefundChargeCellContainer: import("@emotion/styled").StyledComponent<{
3
4
  hidden?: boolean | undefined;
4
5
  color?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const RefundCellContainer: import("@emotion/styled").StyledComponent<{
3
4
  hidden?: boolean | undefined;
4
5
  color?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
3
4
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
4
5
  export declare const SalesChannelsContainer: import("@emotion/styled").StyledComponent<{
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
3
4
  export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
4
5
  hidden?: boolean | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
3
4
  export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
4
5
  export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const MultiRefundIcon: import("@emotion/styled").StyledComponent<{
3
4
  width?: string | number | undefined;
4
5
  height?: string | number | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const UnCapturedContainer: import("@emotion/styled").StyledComponent<{
3
4
  hidden?: boolean | undefined;
4
5
  color?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  export declare const GeographyBox: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
3
4
  variant?: "Global" | "Regional" | "Local" | undefined;
4
5
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ /// <reference types="react" />
2
3
  interface TableWrapperProps {
3
4
  showNoDataView?: boolean;
4
5
  }
@@ -122,4 +122,3 @@ export * from './ListLayout';
122
122
  export { default as MFWidgetLoader } from './MFWidgetLoader';
123
123
  export { default as BetaBanner } from './BetaBanner';
124
124
  export * from './Autocomplete';
125
- export * from './Amount';
@@ -122,4 +122,3 @@ export * from './ListLayout';
122
122
  export { default as MFWidgetLoader } from './MFWidgetLoader';
123
123
  export { default as BetaBanner } from './BetaBanner';
124
124
  export * from './Autocomplete';
125
- export * from './Amount';
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.246-test.1",
5
- "testVersion": 1,
4
+ "version": "0.1.246",
5
+ "testVersion": 0,
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
+ }
@@ -1 +0,0 @@
1
- export declare const Loading: () => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import Skeleton from '@mui/material/Skeleton';
3
- export const Loading = () => {
4
- return (_jsx(Skeleton, { sx: {
5
- height: 32,
6
- width: 80,
7
- borderRadius: '4px',
8
- }, variant: "rectangular" }));
9
- };
@@ -1,15 +0,0 @@
1
- /// <reference types="react" />
2
- import { Currency, Item } from '../../../types/index.js';
3
- export interface TotalAmountProps {
4
- totalGrossAmount: number;
5
- items: Item[];
6
- selectedCurrency: Currency;
7
- isAmountIsMissing: boolean;
8
- isDisabled?: boolean;
9
- isLoading?: boolean;
10
- onResetAllItems: () => void;
11
- onAddFirstItem: (amount: number) => void;
12
- }
13
- declare function TotalAmount({ totalGrossAmount, items, selectedCurrency, isAmountIsMissing, isDisabled, isLoading, onResetAllItems, onAddFirstItem, }: Readonly<TotalAmountProps>): import("react/jsx-runtime").JSX.Element;
14
- declare const _default: import("react").MemoExoticComponent<typeof TotalAmount>;
15
- export default _default;
@@ -1,60 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { memo, useState, useMemo, useEffect } from 'react';
3
- import { useTranslation } from 'react-i18next';
4
- import Box from '@mui/material/Box';
5
- import { removeAllItem, unknownIcon } from '../../../constants/index.js';
6
- import { useConfirmDialog, DisplayAmount } from '../../index.js';
7
- import { isSafariBrowser, numberToString, getAmountPlaceholder } from '../../../utils/index.js';
8
- import { InputStyled, TotalAmountWrapper, Error } from './style';
9
- import { Loading } from './Loading';
10
- const isSafari = isSafariBrowser();
11
- function TotalAmount({ totalGrossAmount, items, selectedCurrency, isAmountIsMissing, isDisabled, isLoading, onResetAllItems, onAddFirstItem, }) {
12
- const [editMode, setEditMode] = useState(false);
13
- const [amount, setAmount] = useState();
14
- const { isConfirmed } = useConfirmDialog();
15
- const { t } = useTranslation();
16
- const currencyPlaceholder = useMemo(() => getAmountPlaceholder(selectedCurrency === null || selectedCurrency === void 0 ? void 0 : selectedCurrency.decimals), [selectedCurrency === null || selectedCurrency === void 0 ? void 0 : selectedCurrency.decimals]);
17
- useEffect(() => {
18
- if (!totalGrossAmount) {
19
- setAmount(undefined);
20
- }
21
- }, [totalGrossAmount]);
22
- const removeAllItems = () => {
23
- isConfirmed({
24
- message: t('removeTotalAmount'),
25
- confirmText: _jsx(Box, Object.assign({ sx: (theme) => ({ color: theme.palette.error.light }) }, { children: t('remove') })),
26
- cancelText: t('cancel') || 'Cancel',
27
- }).then((confirmed) => {
28
- if (confirmed) {
29
- onResetAllItems();
30
- setAmount(undefined);
31
- }
32
- });
33
- };
34
- const handleChangeInput = (e) => {
35
- if (!e.target.value) {
36
- setAmount(undefined);
37
- return false;
38
- }
39
- setAmount(Number(numberToString(Number(e.target.value), selectedCurrency === null || selectedCurrency === void 0 ? void 0 : selectedCurrency.decimals)));
40
- };
41
- const handleBlurInput = (e) => {
42
- setEditMode(false);
43
- onAddFirstItem(Number(numberToString(Number(e.target.value), selectedCurrency === null || selectedCurrency === void 0 ? void 0 : selectedCurrency.decimals)));
44
- };
45
- const isEditable = totalGrossAmount === 0 || (items.length === 1 && totalGrossAmount === items[0].total);
46
- if (isLoading) {
47
- return _jsx(Loading, {});
48
- }
49
- return (_jsxs(Box, Object.assign({ sx: Object.assign({}, (isDisabled && { pointerEvents: 'none', opacity: 0.7 })) }, { children: [editMode ? (_jsx(_Fragment, { children: isEditable ? (_jsx(InputStyled, { value: amount, placeholder: currencyPlaceholder, hideArrows: true, inputProps: { step: '0.01' }, onChange: handleChangeInput, onBlur: handleBlurInput, onKeyDown: (evt) => {
50
- if (isSafari && isNaN(Number(evt.key)) && evt.key !== 'Backspace' && evt.key !== '.') {
51
- evt.preventDefault();
52
- }
53
- }, autoFocus: true })) : (_jsx(DisplayAmount, { sx: { fontSize: '36px', textAlign: 'center' }, amount: totalGrossAmount || 0, selectedCurrency: selectedCurrency, onClick: () => {
54
- setEditMode(true);
55
- } })) })) : (_jsxs(TotalAmountWrapper, { children: [_jsx(DisplayAmount, { sx: { fontSize: '36px', textAlign: 'center' }, selectedCurrency: selectedCurrency, amount: totalGrossAmount || 0, onClick: () => {
56
- if (isEditable)
57
- setEditMode(true);
58
- } }), totalGrossAmount > 0 && _jsx(Box, { component: "img", src: removeAllItem, alt: "r", onClick: removeAllItems })] })), isAmountIsMissing && (_jsxs(Error, { children: [_jsx(Box, { component: "img", src: unknownIcon }), _jsx(Box, { children: t('enterAmount') })] }))] })));
59
- }
60
- export default memo(TotalAmount);
@@ -1 +0,0 @@
1
- export { default } from './TotalAmount';
@@ -1 +0,0 @@
1
- export { default } from './TotalAmount';
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const InputStyled: import("@emotion/styled").StyledComponent<Omit<Readonly<import("@mui/material").InputProps & {
3
- isError?: boolean | undefined;
4
- hideArrows?: boolean | undefined;
5
- }>, "ref"> & import("react").RefAttributes<HTMLInputElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
6
- export declare const TotalAmountWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
7
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
8
- }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
9
- export declare const Error: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
10
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
11
- }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -1,26 +0,0 @@
1
- import Box from '@mui/material/Box';
2
- import { styled } from '@mui/material/styles';
3
- import { InputNumber } from '../../index.js';
4
- export const InputStyled = styled(InputNumber)(() => ({
5
- fontSize: '36px !important',
6
- textAlign: 'center',
7
- border: 'none',
8
- height: 49.5,
9
- input: {
10
- textAlign: 'center',
11
- },
12
- }));
13
- export const TotalAmountWrapper = styled(Box)(() => ({
14
- display: 'flex',
15
- gap: '5px',
16
- alignItems: 'center',
17
- height: 49.5,
18
- maxWidth: '-webkit-fill-available',
19
- paddingInline: '24px',
20
- }));
21
- export const Error = styled(Box)(({ theme }) => ({
22
- fontSize: '10px',
23
- color: theme.palette.error.dark,
24
- display: 'flex',
25
- gap: '4px',
26
- }));
@@ -1 +0,0 @@
1
- export { default as TotalAmount } from './TotalAmount';
@@ -1 +0,0 @@
1
- export { default as TotalAmount } from './TotalAmount';