@tap-payments/os-micro-frontend-shared 0.1.355 → 0.1.356-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.
- package/build/components/AnimatedSpinnerIcon/style.d.ts +0 -1
- package/build/components/BrandLogo/BrandLogo.d.ts +2 -1
- package/build/components/BrandLogo/BrandLogo.js +7 -3
- package/build/components/Chip/style.d.ts +0 -1
- package/build/components/CountBadge/style.d.ts +0 -1
- package/build/components/Dialog/style.d.ts +0 -1
- package/build/components/FlippingCard/style.d.ts +0 -1
- package/build/components/Icon/type.d.ts +2 -1
- package/build/components/ImageWrapper/ImageWrapper.d.ts +0 -1
- package/build/components/JSONViewer/style.d.ts +0 -1
- package/build/components/LeftPeekRightExpandingChip/style.d.ts +0 -1
- package/build/components/RightLeftExpandingCenterChip/style.d.ts +0 -1
- package/build/components/SearchButton/styles.d.ts +0 -1
- package/build/components/StatusIcons/AuthIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
- package/build/components/StatusIcons/SourceIcons/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AgreementCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/PayoutReportCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/style.d.ts +0 -1
- package/build/components/TableReports/components/DownloadButton/style.d.ts +0 -1
- package/build/components/TableReports/style.d.ts +0 -1
- package/build/components/VirtualTables/components/style.d.ts +0 -1
- package/build/constants/apps.js +1 -0
- package/build/types/apps.d.ts +2 -1
- package/build/types/user.d.ts +62 -14
- package/build/utils/segment.d.ts +2 -2
- package/package.json +3 -3
|
@@ -6,7 +6,8 @@ export interface BrandLogoProps extends BoxProps {
|
|
|
6
6
|
height?: number | string;
|
|
7
7
|
isError?: boolean;
|
|
8
8
|
isLoading?: boolean;
|
|
9
|
+
imageUrl?: string;
|
|
9
10
|
}
|
|
10
|
-
declare function BrandLogo({ data, isError, isLoading, width, height, ...props }: Readonly<BrandLogoProps>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function BrandLogo({ data, isError, isLoading, imageUrl, width, height, ...props }: Readonly<BrandLogoProps>): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
declare const _default: import("react").MemoExoticComponent<typeof BrandLogo>;
|
|
12
13
|
export default _default;
|
|
@@ -16,20 +16,24 @@ 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, width = 24, height = 24 } = _a, props = __rest(_a, ["data", "isError", "isLoading", "width", "height"]);
|
|
19
|
+
var { data, isError, isLoading, imageUrl, width = 24, height = 24 } = _a, props = __rest(_a, ["data", "isError", "isLoading", "imageUrl", "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;
|
|
24
26
|
if (isError || !data)
|
|
25
27
|
return grayBrandIcon;
|
|
26
28
|
if (isPdf)
|
|
27
29
|
return pdfIcon;
|
|
28
30
|
return logoUrl;
|
|
29
|
-
}, [
|
|
31
|
+
}, [imageUrl, isError, data, isPdf, logoUrl]);
|
|
30
32
|
if (isLoading)
|
|
31
33
|
return _jsx(Loading, { width: width, height: height });
|
|
32
34
|
return (_jsx(Icon, { alt: "brand", src: imageSrc, sx: Object.assign({ borderRadius: '50%', backgroundColor: theme.palette.common.white, width,
|
|
33
|
-
height, objectFit: isPdf ? 'none' : 'contain' }, props.sx)
|
|
35
|
+
height, objectFit: isPdf ? 'none' : 'contain' }, props.sx), onError: (e) => {
|
|
36
|
+
e.currentTarget.src = grayBrandIcon;
|
|
37
|
+
} }));
|
|
34
38
|
}
|
|
35
39
|
export default memo(BrandLogo);
|
|
@@ -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,6 +1,7 @@
|
|
|
1
1
|
import type { SxProps } from '@mui/material/styles';
|
|
2
2
|
import { Theme } from '@mui/system';
|
|
3
|
-
|
|
3
|
+
import { HTMLAttributes } from 'react';
|
|
4
|
+
export interface IconProps extends HTMLAttributes<HTMLImageElement> {
|
|
4
5
|
src: string;
|
|
5
6
|
onClick?: () => void;
|
|
6
7
|
sx?: SxProps<Theme>;
|
|
@@ -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 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 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 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 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 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 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>, {}>;
|
package/build/constants/apps.js
CHANGED
package/build/types/apps.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColumnsView } from './column';
|
|
2
|
-
import { Segment, SegmentCountry, SegmentUser, SelectedBrand, SelectedCountry } from './user';
|
|
2
|
+
import { Segment, SegmentCountry, SegmentUser, SelectedBrand, SelectedCountry, User } from './user';
|
|
3
3
|
import { BusinessMerchant } from './merchant';
|
|
4
4
|
import type { i18n } from 'i18next';
|
|
5
5
|
import { Theme } from '@mui/material';
|
|
@@ -101,6 +101,7 @@ export type MFWidgetBaseProps = {
|
|
|
101
101
|
initialServiceCode?: string;
|
|
102
102
|
initialPayload?: Record<string, any> & AppPayload;
|
|
103
103
|
};
|
|
104
|
+
user: User;
|
|
104
105
|
segment: {
|
|
105
106
|
code: string;
|
|
106
107
|
type: string;
|
package/build/types/user.d.ts
CHANGED
|
@@ -99,18 +99,19 @@ export interface SegmentDetails {
|
|
|
99
99
|
interface SegmentEntity {
|
|
100
100
|
id: string;
|
|
101
101
|
}
|
|
102
|
+
export interface Contact {
|
|
103
|
+
email: string;
|
|
104
|
+
phone: {
|
|
105
|
+
country_code: string;
|
|
106
|
+
number: string;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
102
109
|
export interface SegmentUser {
|
|
103
110
|
id: string;
|
|
104
111
|
created: number;
|
|
105
112
|
individual_id: string;
|
|
106
113
|
name: Record<string, SegmentUserName>;
|
|
107
|
-
contact:
|
|
108
|
-
email: string;
|
|
109
|
-
phone: {
|
|
110
|
-
country_code: string;
|
|
111
|
-
number: string;
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
+
contact: Contact;
|
|
114
115
|
birth: {
|
|
115
116
|
date: number;
|
|
116
117
|
};
|
|
@@ -124,13 +125,7 @@ export interface SegmentUser {
|
|
|
124
125
|
export interface IndividualSegmentDetails {
|
|
125
126
|
individual: {
|
|
126
127
|
name: UserName[];
|
|
127
|
-
contact:
|
|
128
|
-
email: string;
|
|
129
|
-
phone: {
|
|
130
|
-
country_code: string;
|
|
131
|
-
number: string;
|
|
132
|
-
};
|
|
133
|
-
};
|
|
128
|
+
contact: Contact;
|
|
134
129
|
};
|
|
135
130
|
segment: Segment;
|
|
136
131
|
}
|
|
@@ -211,4 +206,57 @@ export interface UserFormI {
|
|
|
211
206
|
is_authorized?: boolean;
|
|
212
207
|
}
|
|
213
208
|
export type GeographyVariant = 'G' | 'L' | 'R';
|
|
209
|
+
export interface BrandReference {
|
|
210
|
+
id: string;
|
|
211
|
+
}
|
|
212
|
+
export interface CountryReference {
|
|
213
|
+
id: string;
|
|
214
|
+
entities: EntityReference[];
|
|
215
|
+
}
|
|
216
|
+
export interface EntityReference {
|
|
217
|
+
id: string;
|
|
218
|
+
}
|
|
219
|
+
export interface UserReference {
|
|
220
|
+
id: string;
|
|
221
|
+
}
|
|
222
|
+
export interface DeveloperReference {
|
|
223
|
+
id: string;
|
|
224
|
+
}
|
|
225
|
+
export interface CustomerReference {
|
|
226
|
+
id: string;
|
|
227
|
+
}
|
|
228
|
+
export interface SelectedSegment {
|
|
229
|
+
id: string;
|
|
230
|
+
brands: BrandReference[];
|
|
231
|
+
countries: CountryReference[];
|
|
232
|
+
users: UserReference[];
|
|
233
|
+
developers: DeveloperReference[];
|
|
234
|
+
customers: CustomerReference[];
|
|
235
|
+
}
|
|
236
|
+
export interface UserNameLocale {
|
|
237
|
+
lang: string;
|
|
238
|
+
first: string;
|
|
239
|
+
last: string;
|
|
240
|
+
}
|
|
241
|
+
export interface Individual {
|
|
242
|
+
id: string;
|
|
243
|
+
contact: Contact;
|
|
244
|
+
name: UserNameLocale[];
|
|
245
|
+
}
|
|
246
|
+
export interface User {
|
|
247
|
+
individual: Individual;
|
|
248
|
+
authentication_id: string;
|
|
249
|
+
individual_id: string;
|
|
250
|
+
is_active: boolean;
|
|
251
|
+
bi: string;
|
|
252
|
+
count: number;
|
|
253
|
+
has_more: boolean;
|
|
254
|
+
live_mode: boolean;
|
|
255
|
+
force_logout: boolean;
|
|
256
|
+
segments: Segment[];
|
|
257
|
+
active_segment_id: string;
|
|
258
|
+
active_segments: SelectedSegment[];
|
|
259
|
+
created_at: string;
|
|
260
|
+
updated_at: string;
|
|
261
|
+
}
|
|
214
262
|
export {};
|
package/build/utils/segment.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Segment, SegmentData } from '../types/index.js';
|
|
2
|
-
export declare const getSegmentData: (segments: Segment[], activeSegmentId: string, activeSegments:
|
|
1
|
+
import { SelectedSegment, Segment, SegmentData } from '../types/index.js';
|
|
2
|
+
export declare const getSegmentData: (segments: Segment[], activeSegmentId: string, activeSegments: SelectedSegment[]) => SegmentData;
|
|
3
3
|
export declare const getBusinessSegmentConfig: ({ merchantsIds, options }: {
|
|
4
4
|
merchantsIds: string[];
|
|
5
5
|
options?: Record<string, unknown> | undefined;
|
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.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.356-test.2",
|
|
5
|
+
"testVersion": 2,
|
|
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
|
+
}
|