@tap-payments/os-micro-frontend-shared 0.1.14-test.6 → 0.1.15

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,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { ChipProps } from './type';
3
- declare const Chip: import("react").FC<ChipProps>;
3
+ declare const Chip: import("react").ForwardRefExoticComponent<Omit<ChipProps, "ref"> & import("react").RefAttributes<import("@mui/types").OverridableComponent<import("@mui/system").BoxTypeMap<{}, "div", import("@mui/material").Theme>>>>;
4
4
  export default Chip;
@@ -44,7 +44,5 @@ export * from './MarketPlaceCell';
44
44
  export * from './IndividualsCell';
45
45
  export * from './BrandsCell';
46
46
  export * from './SalesChannelCell';
47
- export * from './TerminalsBrandCell';
48
- export * from './TerminalsPlatformCell';
49
47
  export * from './type';
50
48
  export * from './style';
@@ -44,7 +44,5 @@ export * from './MarketPlaceCell';
44
44
  export * from './IndividualsCell';
45
45
  export * from './BrandsCell';
46
46
  export * from './SalesChannelCell';
47
- export * from './TerminalsBrandCell';
48
- export * from './TerminalsPlatformCell';
49
47
  export * from './type';
50
48
  export * from './style';
@@ -96,4 +96,3 @@ export { default as RangeCalender } from './RangeCalender';
96
96
  export { default as AppServices } from './AppServices';
97
97
  export { default as ScrollLoader } from './ScrollLoader';
98
98
  export * from './ScrollLoader';
99
- export * from './TooltipChip';
@@ -96,4 +96,3 @@ export { default as RangeCalender } from './RangeCalender';
96
96
  export { default as AppServices } from './AppServices';
97
97
  export { default as ScrollLoader } from './ScrollLoader';
98
98
  export * from './ScrollLoader';
99
- export * from './TooltipChip';
@@ -78,6 +78,8 @@ export interface Segment {
78
78
  };
79
79
  };
80
80
  };
81
+ is_business_segment?: boolean;
82
+ is_segment_has_more_than_one_merchant?: boolean;
81
83
  }
82
84
  interface SegmentUserName {
83
85
  first: string;
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.14-test.6",
5
- "testVersion": 6,
4
+ "version": "0.1.15",
5
+ "testVersion": 0,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",
@@ -131,4 +131,4 @@
131
131
  "publishConfig": {
132
132
  "registry": "https://registry.npmjs.org/"
133
133
  }
134
- }
134
+ }
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- type TerminalsBrandCellProps = {
3
- name: Record<string, string>;
4
- icon?: React.ReactNode;
5
- displayRules: {
6
- showIcon: boolean;
7
- showLabel: boolean;
8
- };
9
- };
10
- declare const TerminalsBrandCell: (props: TerminalsBrandCellProps) => import("react/jsx-runtime").JSX.Element | null;
11
- export default TerminalsBrandCell;
@@ -1,33 +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 { useTranslation } from 'react-i18next';
14
- import Stack from '@mui/material/Stack';
15
- import Typography from '@mui/material/Typography';
16
- import { Chip, TableCell, Tooltip } from '../../../index.js';
17
- import { getNameText } from '../../../../utils/index.js';
18
- const formatPropertyName = (name) => {
19
- const _a = name || {}, { textId: _ } = _a, nameMapper = __rest(_a, ["textId"]);
20
- return Object.entries(nameMapper).map(([lang, text]) => ({ lang, text }));
21
- };
22
- const TerminalsBrandCell = (props) => {
23
- const { name, icon, displayRules } = props;
24
- const { i18n } = useTranslation();
25
- if (!name && icon)
26
- return null;
27
- const { showIcon, showLabel } = displayRules;
28
- const brandName = name ? getNameText(formatPropertyName(name), i18n.language) : '';
29
- const displayLabel = showLabel && !!brandName;
30
- const displayIcon = showIcon && !!icon;
31
- return (_jsx(TableCell, { children: _jsxs(Stack, Object.assign({ direction: "row", alignItems: "center", spacing: 1 }, { children: [displayIcon && (_jsx(Chip, Object.assign({ variant: "circular", sx: { '&.CustomVariant_circular': { minWidth: 32, height: 32 } } }, { children: icon }))), displayLabel && (_jsx(Tooltip, Object.assign({ title: brandName }, { children: _jsx(Typography, Object.assign({ noWrap: true, fontSize: 12, fontWeight: 500 }, { children: brandName })) })))] })) }));
32
- };
33
- export default TerminalsBrandCell;
@@ -1 +0,0 @@
1
- export { default as TerminalsBrandCell } from './TerminalsBrandCell';
@@ -1 +0,0 @@
1
- export { default as TerminalsBrandCell } from './TerminalsBrandCell';
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import { TextAndLang } from '../../../../types/index.js';
3
- type TerminalsPlatformCellProps = {
4
- name: TextAndLang[];
5
- icon?: React.ReactNode;
6
- displayRules: {
7
- showIcon: boolean;
8
- showLabel: boolean;
9
- };
10
- };
11
- declare const _default: import("react").MemoExoticComponent<({ name, icon, displayRules }: TerminalsPlatformCellProps) => import("react/jsx-runtime").JSX.Element>;
12
- export default _default;
@@ -1,16 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { memo } from 'react';
3
- import { useTranslation } from 'react-i18next';
4
- import Stack from '@mui/material/Stack';
5
- import Typography from '@mui/material/Typography';
6
- import Box from '@mui/material/Box';
7
- import { Chip, TableCell, Tooltip } from '../../../index.js';
8
- import { getNameText } from '../../../../utils/index.js';
9
- const TerminalsPlatformCell = ({ name, icon, displayRules }) => {
10
- const { i18n } = useTranslation();
11
- const { showIcon, showLabel } = displayRules;
12
- const platformName = getNameText(name, i18n.language);
13
- const displayIcon = showIcon && !!icon;
14
- return (_jsx(TableCell, { children: _jsxs(Stack, Object.assign({ "data-testid": "sdf", direction: "row", alignItems: "center", spacing: 1 }, { children: [displayIcon && (_jsx(Chip, Object.assign({ variant: "circular", sx: { '&.CustomVariant_circular': { minWidth: 32, height: 32 } } }, { children: icon }))), showLabel && (_jsx(Tooltip, Object.assign({ title: platformName }, { children: _jsx(Typography, Object.assign({ noWrap: true, fontSize: 12, fontWeight: 500 }, { children: platformName || (_jsx(Box, Object.assign({ component: "span", sx: { opacity: 0.2 } }, { children: "Unavailable" }))) })) })))] })) }));
15
- };
16
- export default memo(TerminalsPlatformCell);
@@ -1 +0,0 @@
1
- export { default as TerminalsPlatformCell } from './TerminalsPlatformCell';
@@ -1 +0,0 @@
1
- export { default as TerminalsPlatformCell } from './TerminalsPlatformCell';
@@ -1,14 +0,0 @@
1
- import React, { PropsWithChildren } from 'react';
2
- import Tooltip from '../Tooltip';
3
- import { type ChipProps } from '../Chip';
4
- type TooltipChipProps = PropsWithChildren<{
5
- title: React.ReactNode;
6
- variant?: ChipProps['variant'];
7
- slotProps?: {
8
- tooltip?: React.ComponentProps<typeof Tooltip>;
9
- chip?: Partial<ChipProps>;
10
- };
11
- children: React.ReactNode;
12
- }>;
13
- declare const TooltipChip: ({ title, slotProps, children }: TooltipChipProps) => import("react/jsx-runtime").JSX.Element;
14
- export default TooltipChip;
@@ -1,20 +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 } from "react/jsx-runtime";
13
- import Tooltip from '../Tooltip';
14
- import { StyledChip } from './style';
15
- const TooltipChip = ({ title, slotProps = {}, children }) => {
16
- const { chip = {}, tooltip = {} } = slotProps;
17
- const { sx: chipSx } = chip, chipProps = __rest(chip, ["sx"]);
18
- return (_jsx(Tooltip, Object.assign({}, tooltip, { title: title }, { children: _jsx(StyledChip, Object.assign({}, chipProps, { sx: Object.assign({ '&.CustomVariant_text': { height: 24 }, display: 'inline-flex', color: 'text.primary' }, chipSx) }, { children: children })) })));
19
- };
20
- export default TooltipChip;
@@ -1 +0,0 @@
1
- export { default as TooltipChip } from './TooltipChip';
@@ -1 +0,0 @@
1
- export { default as TooltipChip } from './TooltipChip';
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const StyledChip: import("@emotion/styled").StyledComponent<{
3
- variant?: import("../Chip").ChipVariant | undefined;
4
- icon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactDOM | null | undefined;
5
- } & import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
6
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
7
- }, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & {
8
- children?: import("react").ReactNode;
9
- } & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -1,7 +0,0 @@
1
- import { styled } from '@mui/material/styles';
2
- import { Chip } from '../Chip';
3
- export const StyledChip = styled(Chip)(({ theme }) => ({
4
- color: theme.palette.text.primary,
5
- '&.CustomVariant_text': { height: 24 },
6
- display: 'inline-flex',
7
- }));