@tap-payments/os-micro-frontend-shared 0.0.297-test.9 → 0.0.297
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.
|
@@ -11,7 +11,7 @@ export default function IconWithBadge({ mainIcon, overlayIcon, mainIconAlt = 'ma
|
|
|
11
11
|
borderColor,
|
|
12
12
|
width: containerSize,
|
|
13
13
|
height: containerSize,
|
|
14
|
-
} }, { children: [_jsx(Box, Object.assign({ width: mainIconSize, height: mainIconSize }, { children: isLoading && _jsx(Skeleton, { variant: "circular", width: `${mainIconSize}px`, height: `${mainIconSize}px` }) })), _jsxs(_Fragment, { children: [overlayIcon && _jsx(BadgeBox, Object.assign({ sx: overlayPosition }, { children: overlayIcon })), _jsx(Box, { width: mainIconSize, height: mainIconSize, component: "img", src: mainIcon || brandPlaceholderIcon, alt: mainIconAlt, sx: Object.assign({ borderRadius: '50%', objectFit: 'scale-down', opacity: isLoading ? 0 : 1 }, sx), onError: (e) => {
|
|
14
|
+
} }, { children: [mainIconSize && isLoading && (_jsx(Box, Object.assign({ width: mainIconSize, height: mainIconSize }, { children: isLoading && _jsx(Skeleton, { variant: "circular", width: `${mainIconSize}px`, height: `${mainIconSize}px` }) }))), _jsxs(_Fragment, { children: [overlayIcon && _jsx(BadgeBox, Object.assign({ sx: overlayPosition }, { children: overlayIcon })), _jsx(Box, { width: mainIconSize, height: mainIconSize, component: "img", src: mainIcon || brandPlaceholderIcon, alt: mainIconAlt, sx: Object.assign({ borderRadius: '50%', objectFit: 'scale-down', opacity: isLoading ? 0 : 1 }, sx), onError: (e) => {
|
|
15
15
|
setIsLoading(false);
|
|
16
16
|
e.currentTarget.src = brandPlaceholderIcon;
|
|
17
17
|
onError === null || onError === void 0 ? void 0 : onError(e);
|
package/build/components/TableCells/CustomCells/ApplicationStatusCell/ApplicationStatusCell.js
CHANGED
|
@@ -17,7 +17,7 @@ import { ImageWrapper } from '../../../index.js';
|
|
|
17
17
|
import { TableCell } from '../../../TableCells';
|
|
18
18
|
import { AppsStatusContainer, StyledAppsCell, appStatusAnimation } from './style';
|
|
19
19
|
import IconWithBadge from '../../../IconWithBadge';
|
|
20
|
-
import {
|
|
20
|
+
import { acceptanceBlueIcon, acceptanceWindowIcon, payoutsGreenIcon, payoutWindowIcon } from '../../../../constants/index.js';
|
|
21
21
|
export default function ApplicationStatusCell(_a) {
|
|
22
22
|
var { acceptance, payout, hideAcceptance, hidePayout } = _a, props = __rest(_a, ["acceptance", "payout", "hideAcceptance", "hidePayout"]);
|
|
23
23
|
const isAcceptanceEnabled = (acceptance === null || acceptance === void 0 ? void 0 : acceptance.toLowerCase()) === 'enabled';
|
|
@@ -25,9 +25,17 @@ export default function ApplicationStatusCell(_a) {
|
|
|
25
25
|
const [isTooltipOpen, setIsTooltipOpen] = useState(false);
|
|
26
26
|
const theme = useTheme();
|
|
27
27
|
const apps = useMemo(() => [
|
|
28
|
-
{
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
{
|
|
29
|
+
icon: isAcceptanceEnabled ? acceptanceBlueIcon : acceptanceWindowIcon,
|
|
30
|
+
tooltip: 'Acceptance',
|
|
31
|
+
enabled: isAcceptanceEnabled,
|
|
32
|
+
shown: !hideAcceptance,
|
|
33
|
+
order: 0,
|
|
34
|
+
},
|
|
35
|
+
{ icon: isPayoutEnabled ? payoutsGreenIcon : payoutWindowIcon, tooltip: 'Payout', enabled: isPayoutEnabled, shown: !hidePayout, order: 1 },
|
|
36
|
+
]
|
|
37
|
+
.filter((app) => app.shown)
|
|
38
|
+
.sort((a, b) => (a.enabled !== b.enabled ? -1 : a.order - b.order)), [isAcceptanceEnabled, isPayoutEnabled, hideAcceptance, hidePayout]);
|
|
31
39
|
const appsStatus = useMemo(() => apps.map((app, index) => {
|
|
32
40
|
const sourceTooltip = app.tooltip;
|
|
33
41
|
return (_jsx(Tooltip, Object.assign({ onOpen: () => {
|
|
@@ -133,6 +133,8 @@ export declare const receiptBillIcon: string;
|
|
|
133
133
|
export declare const newReceiptIcon: string;
|
|
134
134
|
export declare const acceptanceAppIcon: string;
|
|
135
135
|
export declare const acceptanceEnabledIcon: string;
|
|
136
|
+
export declare const acceptanceBlueIcon: string;
|
|
137
|
+
export declare const payoutsGreenIcon: string;
|
|
136
138
|
export declare const acceptanceAppDisabledIcon: string;
|
|
137
139
|
export declare const payoutAppDisabledIcon: string;
|
|
138
140
|
export declare const payoutEnabledIcon: string;
|
|
@@ -134,6 +134,8 @@ export const receiptBillIcon = `${appBaseUrl}/receiptBill.svg`;
|
|
|
134
134
|
export const newReceiptIcon = `${lightUrl}/newReceiptIcon.svg`;
|
|
135
135
|
export const acceptanceAppIcon = `${appBaseUrl}/acceptance.svg`;
|
|
136
136
|
export const acceptanceEnabledIcon = `${lightUrl}/acceptanceEnabled.svg`;
|
|
137
|
+
export const acceptanceBlueIcon = `${lightUrl}/acceptanceBlue.svg`;
|
|
138
|
+
export const payoutsGreenIcon = `${lightUrl}/payoutsGreen.svg`;
|
|
137
139
|
export const acceptanceAppDisabledIcon = `${appBaseUrl}/acceptanceAppIconDisabled.svg`;
|
|
138
140
|
export const payoutAppDisabledIcon = `${appBaseUrl}/payoutsAppIconDisabled.svg`;
|
|
139
141
|
export const payoutEnabledIcon = `${lightUrl}/payoutEnabled.svg`;
|
package/package.json
CHANGED