@datlv-trustshop/shopify-inapp-components 0.1.14 → 0.1.16
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.
|
@@ -3,7 +3,7 @@ import { Badge, BlockStack, Box, Button, Card, InlineStack, Text, Grid, Skeleton
|
|
|
3
3
|
import { ExternalIcon } from "@shopify/polaris-icons";
|
|
4
4
|
import { usePartnerIntegrations } from "../hooks/usePartnerIntegration";
|
|
5
5
|
import { useDashboardContext } from "../provider/DashboardProvider";
|
|
6
|
-
export const PartnerIntegration = ({ className = "", onManage, onInstall, onOpen, onUpgradeClick, renderCard,
|
|
6
|
+
export const PartnerIntegration = ({ className = "", onManage, onInstall, onOpen, onUpgradeClick, renderCard, showEmptyState = true, statusProvider, }) => {
|
|
7
7
|
const { groups, loading, error } = usePartnerIntegrations();
|
|
8
8
|
const { translations } = useDashboardContext();
|
|
9
9
|
const handleManage = (item) => {
|
|
@@ -151,7 +151,7 @@ export const PartnerIntegration = ({ className = "", onManage, onInstall, onOpen
|
|
|
151
151
|
};
|
|
152
152
|
// Loading state
|
|
153
153
|
if (loading) {
|
|
154
|
-
return (_jsx("div", { className: className, children: _jsx(BlockStack, { gap: "600", children: [1, 2, 3].map((groupIndex) => (_jsxs(BlockStack, { gap: "400", children: [_jsx(Box, { paddingInlineStart: { xs: "200", md: "0" }, children: _jsx(SkeletonBodyText, { lines: 1 }) }), _jsx(Grid, { children: [1, 2].map((cardIndex) => (_jsx(Grid.Cell, {
|
|
154
|
+
return (_jsx("div", { className: className, children: _jsx(BlockStack, { gap: "600", children: [1, 2, 3].map((groupIndex) => (_jsxs(BlockStack, { gap: "400", children: [_jsx(Box, { paddingInlineStart: { xs: "200", md: "0" }, children: _jsx(SkeletonBodyText, { lines: 1 }) }), _jsx(Grid, { columns: { xs: 1, sm: 1, md: 2, lg: 2, xl: 2 }, children: [1, 2].map((cardIndex) => (_jsx(Grid.Cell, { children: _jsx(Card, { children: _jsx(BlockStack, { gap: "300", children: _jsx(SkeletonBodyText, { lines: 3 }) }) }) }, `skeleton-card-${groupIndex}-${cardIndex}`))) })] }, `skeleton-group-${groupIndex}`))) }) }));
|
|
155
155
|
}
|
|
156
156
|
// Error state
|
|
157
157
|
if (error) {
|
|
@@ -168,9 +168,6 @@ export const PartnerIntegration = ({ className = "", onManage, onInstall, onOpen
|
|
|
168
168
|
"Check back later for available integrations" }) }) }) }));
|
|
169
169
|
}
|
|
170
170
|
// Render groups
|
|
171
|
-
return (_jsx("div", { className: className, children: _jsx(BlockStack, { gap: "600", children: groups.map((group) => (_jsxs(BlockStack, { gap: "400", children: [_jsx(Box, { paddingInlineStart: { xs: "200", md: "0" }, children: _jsx(Text, { as: "h3", variant: "headingMd", fontWeight: "semibold", children: group.title }) }), _jsx(Grid, { children: group.items.map((item) => (_jsx(Grid.Cell, {
|
|
172
|
-
xs: 6,
|
|
173
|
-
md: maxColumns === 1 ? 6 : maxColumns === 3 ? 2 : 3,
|
|
174
|
-
}, children: renderIntegrationCard(item) }, `integration-cell--${item.id || item.key}`))) })] }, `integration-group--${group.key}`))) }) }));
|
|
171
|
+
return (_jsx("div", { className: className, children: _jsx(BlockStack, { gap: "600", children: groups.map((group) => (_jsxs(BlockStack, { gap: "400", children: [_jsx(Box, { paddingInlineStart: { xs: "200", md: "0" }, children: _jsx(Text, { as: "h3", variant: "headingMd", fontWeight: "semibold", children: group.title }) }), _jsx(Grid, { columns: { xs: 1, sm: 1, md: 2, lg: 2, xl: 2 }, children: group.items.map((item) => (_jsx(Grid.Cell, { children: renderIntegrationCard(item) }, `integration-cell--${item.id || item.key}`))) })] }, `integration-group--${group.key}`))) }) }));
|
|
175
172
|
};
|
|
176
173
|
export default PartnerIntegration;
|