@xyo-network/react-embed 2.68.3 → 2.69.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/components/controls/ListModeSelect.d.cts +3 -3
- package/dist/browser/components/controls/ListModeSelect.d.cts.map +1 -1
- package/dist/browser/components/controls/ListModeSelect.d.mts +3 -3
- package/dist/browser/components/controls/ListModeSelect.d.mts.map +1 -1
- package/dist/browser/components/controls/ListModeSelect.d.ts +3 -3
- package/dist/browser/components/controls/ListModeSelect.d.ts.map +1 -1
- package/dist/browser/components/controls/RenderSelect.d.cts +2 -2
- package/dist/browser/components/controls/RenderSelect.d.cts.map +1 -1
- package/dist/browser/components/controls/RenderSelect.d.mts +2 -2
- package/dist/browser/components/controls/RenderSelect.d.mts.map +1 -1
- package/dist/browser/components/controls/RenderSelect.d.ts +2 -2
- package/dist/browser/components/controls/RenderSelect.d.ts.map +1 -1
- package/dist/browser/components/embed-card/card/BusyCard.d.cts.map +1 -1
- package/dist/browser/components/embed-card/card/BusyCard.d.mts.map +1 -1
- package/dist/browser/components/embed-card/card/BusyCard.d.ts.map +1 -1
- package/dist/browser/components/embed-card/card/EmbedCardHeader.d.cts.map +1 -1
- package/dist/browser/components/embed-card/card/EmbedCardHeader.d.mts.map +1 -1
- package/dist/browser/components/embed-card/card/EmbedCardHeader.d.ts.map +1 -1
- package/dist/browser/components/embed-card/card/EmbedPluginCard.d.cts.map +1 -1
- package/dist/browser/components/embed-card/card/EmbedPluginCard.d.mts.map +1 -1
- package/dist/browser/components/embed-card/card/EmbedPluginCard.d.ts.map +1 -1
- package/dist/browser/contexts/ValidatePayloadContext/Provider.d.cts.map +1 -1
- package/dist/browser/contexts/ValidatePayloadContext/Provider.d.mts.map +1 -1
- package/dist/browser/contexts/ValidatePayloadContext/Provider.d.ts.map +1 -1
- package/dist/browser/index.cjs +4 -2
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +6 -4
- package/dist/browser/index.js.map +1 -1
- package/dist/node/components/controls/ListModeSelect.d.cts +3 -3
- package/dist/node/components/controls/ListModeSelect.d.cts.map +1 -1
- package/dist/node/components/controls/ListModeSelect.d.mts +3 -3
- package/dist/node/components/controls/ListModeSelect.d.mts.map +1 -1
- package/dist/node/components/controls/ListModeSelect.d.ts +3 -3
- package/dist/node/components/controls/ListModeSelect.d.ts.map +1 -1
- package/dist/node/components/controls/RenderSelect.d.cts +2 -2
- package/dist/node/components/controls/RenderSelect.d.cts.map +1 -1
- package/dist/node/components/controls/RenderSelect.d.mts +2 -2
- package/dist/node/components/controls/RenderSelect.d.mts.map +1 -1
- package/dist/node/components/controls/RenderSelect.d.ts +2 -2
- package/dist/node/components/controls/RenderSelect.d.ts.map +1 -1
- package/dist/node/components/embed-card/card/BusyCard.d.cts.map +1 -1
- package/dist/node/components/embed-card/card/BusyCard.d.mts.map +1 -1
- package/dist/node/components/embed-card/card/BusyCard.d.ts.map +1 -1
- package/dist/node/components/embed-card/card/EmbedCardHeader.d.cts.map +1 -1
- package/dist/node/components/embed-card/card/EmbedCardHeader.d.mts.map +1 -1
- package/dist/node/components/embed-card/card/EmbedCardHeader.d.ts.map +1 -1
- package/dist/node/components/embed-card/card/EmbedPluginCard.d.cts.map +1 -1
- package/dist/node/components/embed-card/card/EmbedPluginCard.d.mts.map +1 -1
- package/dist/node/components/embed-card/card/EmbedPluginCard.d.ts.map +1 -1
- package/dist/node/contexts/ValidatePayloadContext/Provider.d.cts.map +1 -1
- package/dist/node/contexts/ValidatePayloadContext/Provider.d.mts.map +1 -1
- package/dist/node/contexts/ValidatePayloadContext/Provider.d.ts.map +1 -1
- package/dist/node/index.cjs +4 -2
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +6 -4
- package/dist/node/index.js.map +1 -1
- package/package.json +16 -16
- package/src/components/controls/ListModeSelect.tsx +6 -5
- package/src/components/controls/RenderSelect.tsx +5 -4
- package/src/components/embed-card/card/BusyCard.tsx +6 -2
- package/src/components/embed-card/card/EmbedCardHeader.tsx +7 -10
- package/src/components/embed-card/card/EmbedPluginCard.tsx +11 -5
- package/src/components/embed-card/error-handling/EmbedErrorCard.tsx +3 -4
- package/src/components/embed-card/menu/JsonMenuItem.tsx +2 -2
- package/src/contexts/ValidatePayloadContext/Provider.tsx +3 -1
@@ -17,14 +17,20 @@ export const EmbedPluginCard: React.FC<BusyCardProps> = ({ ...props }) => {
|
|
17
17
|
<BusyCard {...props}>
|
18
18
|
{hideElementsConfig?.hideCardHeader ? null : <EmbedCardHeader />}
|
19
19
|
{/* Only show the row if the children are present */}
|
20
|
-
{(plugins && plugins.length > 0) || supportsListMode ?
|
20
|
+
{(plugins && plugins.length > 0) || supportsListMode ?
|
21
21
|
<FlexGrowRow columnGap={2} rowGap={2} flexWrap="wrap" pb={1}>
|
22
|
-
{plugins && plugins.length > 1 ?
|
23
|
-
|
22
|
+
{plugins && plugins.length > 1 ?
|
23
|
+
<EmbedRenderSelect />
|
24
|
+
: null}
|
25
|
+
{supportsListMode ?
|
26
|
+
<ListModeSelectFormControl />
|
27
|
+
: null}
|
24
28
|
</FlexGrowRow>
|
25
|
-
|
29
|
+
: null}
|
26
30
|
<CardContent sx={{ height: '100%' }}>
|
27
|
-
{ActivePlugin ?
|
31
|
+
{ActivePlugin ?
|
32
|
+
<ActivePlugin.components.box.detailsBox payload={payload} {...(supportsListMode && { listMode })} />
|
33
|
+
: null}
|
28
34
|
</CardContent>
|
29
35
|
</BusyCard>
|
30
36
|
)
|
@@ -26,16 +26,15 @@ const DefaultErrorAlert: React.FC<EmbedErrorCardBaseProps> = ({ alertProps, hide
|
|
26
26
|
return (
|
27
27
|
<Alert severity="error" {...alertProps}>
|
28
28
|
<AlertTitle>Whoops! Something went wrong</AlertTitle>
|
29
|
-
{!hideErrorDetails && error ?
|
29
|
+
{!hideErrorDetails && error ?
|
30
30
|
<>
|
31
31
|
<Typography variant="caption">Error: </Typography>
|
32
32
|
<Typography variant="caption">{error?.message}</Typography>
|
33
33
|
</>
|
34
|
-
|
35
|
-
<Typography variant="caption" fontSize="small">
|
34
|
+
: <Typography variant="caption" fontSize="small">
|
36
35
|
Error Loading Plugin
|
37
36
|
</Typography>
|
38
|
-
|
37
|
+
}
|
39
38
|
</Alert>
|
40
39
|
)
|
41
40
|
}
|
@@ -8,14 +8,14 @@ export const JsonMenuItem: React.FC<MenuItemProps> = (props) => {
|
|
8
8
|
|
9
9
|
return (
|
10
10
|
<>
|
11
|
-
{huri ?
|
11
|
+
{huri ?
|
12
12
|
<MenuItem title="Source Payload JSON" onClick={() => window.open(huri, '_blank')} {...props}>
|
13
13
|
<ListItemText sx={{ mr: 1 }}>JSON</ListItemText>
|
14
14
|
<ListItemIcon sx={{ justifyContent: 'end' }}>
|
15
15
|
<OpenInNewIcon fontSize="small" />
|
16
16
|
</ListItemIcon>
|
17
17
|
</MenuItem>
|
18
|
-
|
18
|
+
: null}
|
19
19
|
</>
|
20
20
|
)
|
21
21
|
}
|
@@ -37,7 +37,9 @@ export const ValidatePayloadProvider: React.FC<WithChildren<ValidatePayloadProvi
|
|
37
37
|
|
38
38
|
return (
|
39
39
|
<ValidatePayloadContext.Provider value={{ enabled, provided: true, schema: payload?.schema, validPayload: valid }}>
|
40
|
-
{enabled ?
|
40
|
+
{enabled ?
|
41
|
+
<>{initialized ? children : <Chip label="Validating Payload..." />}</>
|
42
|
+
: children}
|
41
43
|
</ValidatePayloadContext.Provider>
|
42
44
|
)
|
43
45
|
}
|