@tap-payments/os-micro-frontend-shared 0.1.359 → 0.1.361

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.
@@ -6,8 +6,7 @@ export interface BrandLogoProps extends BoxProps {
6
6
  height?: number | string;
7
7
  isError?: boolean;
8
8
  isLoading?: boolean;
9
- imageUrl?: string;
10
9
  }
11
- declare function BrandLogo({ data, isError, isLoading, imageUrl, width, height, ...props }: Readonly<BrandLogoProps>): import("react/jsx-runtime").JSX.Element;
10
+ declare function BrandLogo({ data, isError, isLoading, width, height, ...props }: Readonly<BrandLogoProps>): import("react/jsx-runtime").JSX.Element;
12
11
  declare const _default: import("react").MemoExoticComponent<typeof BrandLogo>;
13
12
  export default _default;
@@ -16,24 +16,20 @@ import { grayBrandIcon, pdfIcon } from '../../constants/index.js';
16
16
  import { Icon } from '../index.js';
17
17
  import { Loading } from './Loading';
18
18
  function BrandLogo(_a) {
19
- var { data, isError, isLoading, imageUrl, width = 24, height = 24 } = _a, props = __rest(_a, ["data", "isError", "isLoading", "imageUrl", "width", "height"]);
19
+ var { data, isError, isLoading, width = 24, height = 24 } = _a, props = __rest(_a, ["data", "isError", "isLoading", "width", "height"]);
20
20
  const theme = useTheme();
21
21
  const isPdf = useMemo(() => { var _a; return (_a = data === null || data === void 0 ? void 0 : data.type) === null || _a === void 0 ? void 0 : _a.includes('application/pdf'); }, [data]);
22
22
  const logoUrl = useMemo(() => (data ? (window.URL ? URL : webkitURL).createObjectURL(data) : ''), [data]);
23
23
  const imageSrc = useMemo(() => {
24
- if (imageUrl)
25
- return imageUrl;
26
24
  if (isError || !data)
27
25
  return grayBrandIcon;
28
26
  if (isPdf)
29
27
  return pdfIcon;
30
28
  return logoUrl;
31
- }, [imageUrl, isError, data, isPdf, logoUrl]);
29
+ }, [data, isError, isPdf, logoUrl]);
32
30
  if (isLoading)
33
31
  return _jsx(Loading, { width: width, height: height });
34
32
  return (_jsx(Icon, { alt: "brand", src: imageSrc, sx: Object.assign({ borderRadius: '50%', backgroundColor: theme.palette.common.white, width,
35
- height, objectFit: isPdf ? 'none' : 'contain' }, props.sx), onError: (e) => {
36
- e.currentTarget.src = grayBrandIcon;
37
- } }));
33
+ height, objectFit: isPdf ? 'none' : 'contain' }, props.sx) }));
38
34
  }
39
35
  export default memo(BrandLogo);
@@ -1,7 +1,6 @@
1
1
  import type { SxProps } from '@mui/material/styles';
2
2
  import { Theme } from '@mui/system';
3
- import { HTMLAttributes } from 'react';
4
- export interface IconProps extends HTMLAttributes<HTMLImageElement> {
3
+ export interface IconProps {
5
4
  src: string;
6
5
  onClick?: () => void;
7
6
  sx?: SxProps<Theme>;
@@ -25,6 +25,9 @@ export declare const BUSINESS_FUNCTIONS: {
25
25
  createUsers: {
26
26
  code: string;
27
27
  };
28
+ updateWallet: {
29
+ code: string;
30
+ };
28
31
  };
29
32
  export declare const APP_CODES: {
30
33
  tokens: {
@@ -110,6 +113,9 @@ export declare const APP_CODES: {
110
113
  createUsers: {
111
114
  code: string;
112
115
  };
116
+ updateWallet: {
117
+ code: string;
118
+ };
113
119
  view: {
114
120
  code: string;
115
121
  };
@@ -139,6 +145,9 @@ export declare const APP_CODES: {
139
145
  createUsers: {
140
146
  code: string;
141
147
  };
148
+ updateWallet: {
149
+ code: string;
150
+ };
142
151
  view: {
143
152
  code: string;
144
153
  };
@@ -27,6 +27,9 @@ export const BUSINESS_FUNCTIONS = {
27
27
  createUsers: {
28
28
  code: 'CREATE USERS',
29
29
  },
30
+ updateWallet: {
31
+ code: 'UPDATE WALLET',
32
+ },
30
33
  };
31
34
  export const APP_CODES = {
32
35
  tokens: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tap-payments/os-micro-frontend-shared",
3
3
  "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.1.359",
4
+ "version": "0.1.361",
5
5
  "testVersion": 0,
6
6
  "type": "module",
7
7
  "main": "build/index.js",