@xyo-network/react-embed 7.4.2 → 7.5.1

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,36 +1,22 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
1
4
  // src/components/embed-card/card/BusyCard.tsx
2
5
  import { Card } from "@mui/material";
3
6
  import { useBusyTiming } from "@xylabs/react-flexbox";
4
- import {
5
- BusyCircularProgress,
6
- BusyLinearProgress
7
- } from "@xylabs/react-shared";
8
- import { jsx, jsxs } from "react/jsx-runtime";
9
- var BusyCard = ({
10
- busy,
11
- busyMinimum = 500,
12
- busyVariant = "circular",
13
- busyVariantProps,
14
- children,
15
- ...props
16
- }) => {
7
+ import { BusyCircularProgress, BusyLinearProgress } from "@xylabs/react-shared";
8
+ import React from "react";
9
+ var BusyCard = /* @__PURE__ */ __name(({ busy, busyMinimum = 500, busyVariant = "circular", busyVariantProps, children, ...props }) => {
17
10
  const internalBusy = useBusyTiming(busy, busyMinimum);
18
- return /* @__PURE__ */ jsxs(Card, { ...props, children: [
19
- children,
20
- busyVariant === "circular" && internalBusy ? /* @__PURE__ */ jsx(BusyCircularProgress, { ...busyVariantProps }) : null,
21
- busyVariant === "linear" && internalBusy ? /* @__PURE__ */ jsx(BusyLinearProgress, { ...busyVariantProps }) : null
22
- ] });
23
- };
11
+ return /* @__PURE__ */ React.createElement(Card, props, children, busyVariant === "circular" && internalBusy ? /* @__PURE__ */ React.createElement(BusyCircularProgress, busyVariantProps) : null, busyVariant === "linear" && internalBusy ? /* @__PURE__ */ React.createElement(BusyLinearProgress, busyVariantProps) : null);
12
+ }, "BusyCard");
24
13
 
25
14
  // src/components/embed-card/card/EmbedCardHeader.tsx
26
15
  import { Refresh as RefreshIcon } from "@mui/icons-material";
27
- import {
28
- Avatar,
29
- CardHeader,
30
- Chip as Chip2
31
- } from "@mui/material";
16
+ import { Avatar, CardHeader, Chip as Chip2 } from "@mui/material";
32
17
  import { FlexRow } from "@xylabs/react-flexbox";
33
- import { isDefined as isDefined3 } from "@xylabs/typeof";
18
+ import { isDefined as isDefined3 } from "@xylabs/sdk-js";
19
+ import React9 from "react";
34
20
 
35
21
  // src/contexts/EmbedPluginContext/Context.ts
36
22
  import { createContextEx } from "@xylabs/react-shared";
@@ -38,611 +24,555 @@ var EmbedPluginContext = createContextEx();
38
24
 
39
25
  // src/contexts/EmbedPluginContext/Provider.tsx
40
26
  import { useResetState } from "@xylabs/react-hooks";
41
- import { jsx as jsx2 } from "react/jsx-runtime";
42
- var EmbedPluginProvider = ({
43
- children,
44
- refreshTitle,
45
- timestampLabel,
46
- hideElementsConfig,
47
- plugins,
48
- embedPluginConfig
49
- }) => {
27
+ import React2 from "react";
28
+ var EmbedPluginProvider = /* @__PURE__ */ __name(({ children, refreshTitle, timestampLabel, hideElementsConfig, plugins, embedPluginConfig }) => {
50
29
  const [activePlugin, setActivePlugin] = useResetState(plugins ? plugins[0] : void 0);
51
- return /* @__PURE__ */ jsx2(
52
- EmbedPluginContext,
53
- {
54
- value: {
55
- activePlugin,
56
- embedPluginConfig,
57
- hideElementsConfig,
58
- provided: true,
59
- refreshTitle,
60
- setActivePlugin,
61
- timestampLabel
62
- },
63
- children
30
+ return /* @__PURE__ */ React2.createElement(EmbedPluginContext, {
31
+ value: {
32
+ activePlugin,
33
+ embedPluginConfig,
34
+ hideElementsConfig,
35
+ provided: true,
36
+ refreshTitle,
37
+ setActivePlugin,
38
+ timestampLabel
64
39
  }
65
- );
66
- };
40
+ }, children);
41
+ }, "EmbedPluginProvider");
67
42
 
68
43
  // src/contexts/EmbedPluginContext/use.ts
69
44
  import { useContextEx } from "@xylabs/react-shared";
70
- var useEmbedPluginState = () => useContextEx(EmbedPluginContext, "EmbedPlugin", true);
45
+ var useEmbedPluginState = /* @__PURE__ */ __name(() => useContextEx(EmbedPluginContext, "EmbedPlugin", true), "useEmbedPluginState");
71
46
 
72
47
  // src/contexts/PluginPropsContext/context.ts
73
48
  import { createContextEx as createContextEx2 } from "@xylabs/react-shared";
74
49
  var PluginPropsContext = createContextEx2();
75
50
 
76
51
  // src/contexts/PluginPropsContext/Provider.tsx
77
- import {
78
- useEffect,
79
- useMemo,
80
- useState
81
- } from "react";
82
- import { jsx as jsx3 } from "react/jsx-runtime";
83
- var PluginPropsProvider = ({ children, pluginProps: pluginPropsProp }) => {
52
+ import React3, { useEffect, useMemo, useState } from "react";
53
+ var PluginPropsProvider = /* @__PURE__ */ __name(({ children, pluginProps: pluginPropsProp }) => {
84
54
  const [pluginProps, setPluginProps] = useState(pluginPropsProp);
85
55
  useEffect(() => {
86
56
  setPluginProps(pluginPropsProp);
87
- }, [pluginPropsProp]);
57
+ }, [
58
+ pluginPropsProp
59
+ ]);
88
60
  const value = useMemo(() => ({
89
61
  pluginProps,
90
62
  provided: true
91
- }), [pluginProps]);
92
- return /* @__PURE__ */ jsx3(PluginPropsContext, { value, children });
93
- };
63
+ }), [
64
+ pluginProps
65
+ ]);
66
+ return /* @__PURE__ */ React3.createElement(PluginPropsContext, {
67
+ value
68
+ }, children);
69
+ }, "PluginPropsProvider");
94
70
 
95
71
  // src/contexts/PluginPropsContext/use.ts
96
72
  import { useContextEx as useContextEx2 } from "@xylabs/react-shared";
97
- var usePluginProps = (required = false) => useContextEx2(PluginPropsContext, "PluginProps", required);
73
+ var usePluginProps = /* @__PURE__ */ __name((required = false) => useContextEx2(PluginPropsContext, "PluginProps", required), "usePluginProps");
98
74
 
99
75
  // src/contexts/RefreshPayloadContext/Provider.tsx
100
- import { useState as useState2 } from "react";
76
+ import React4, { useState as useState2 } from "react";
101
77
 
102
78
  // src/contexts/RefreshPayloadContext/Context.ts
103
79
  import { createContextEx as createContextEx3 } from "@xylabs/react-shared";
104
80
  var RefreshPayloadContext = createContextEx3();
105
81
 
106
82
  // src/contexts/RefreshPayloadContext/Provider.tsx
107
- import { jsx as jsx4 } from "react/jsx-runtime";
108
- var RefreshPayloadProvider = ({
109
- children,
110
- onRefresh,
111
- refreshPayload
112
- }) => {
83
+ var RefreshPayloadProvider = /* @__PURE__ */ __name(({ children, onRefresh, refreshPayload }) => {
113
84
  const [localRefreshPayload, setLocalRefreshPayload] = useState2(refreshPayload);
114
- return /* @__PURE__ */ jsx4(
115
- RefreshPayloadContext,
116
- {
117
- value: {
118
- onRefresh,
119
- provided: true,
120
- refreshPayload: localRefreshPayload,
121
- setRefreshPayload: setLocalRefreshPayload
122
- },
123
- children
85
+ return /* @__PURE__ */ React4.createElement(RefreshPayloadContext, {
86
+ value: {
87
+ onRefresh,
88
+ provided: true,
89
+ refreshPayload: localRefreshPayload,
90
+ setRefreshPayload: setLocalRefreshPayload
124
91
  }
125
- );
126
- };
92
+ }, children);
93
+ }, "RefreshPayloadProvider");
127
94
 
128
95
  // src/contexts/RefreshPayloadContext/use.ts
129
96
  import { useContextEx as useContextEx3 } from "@xylabs/react-shared";
130
- var useRefreshPayload = () => useContextEx3(RefreshPayloadContext, "RefreshPayload", true);
97
+ var useRefreshPayload = /* @__PURE__ */ __name(() => useContextEx3(RefreshPayloadContext, "RefreshPayload", true), "useRefreshPayload");
131
98
 
132
99
  // src/contexts/ResolvePayloadContext/Context.ts
133
100
  import { createContextEx as createContextEx4 } from "@xylabs/react-shared";
134
101
  var ResolvePayloadContext = createContextEx4();
135
102
 
136
103
  // src/contexts/ResolvePayloadContext/Provider.tsx
137
- import { delay } from "@xylabs/delay";
138
104
  import { useAsyncEffect } from "@xylabs/react-async-effect";
139
- import { isDefined } from "@xylabs/typeof";
105
+ import { delay, isDefined } from "@xylabs/sdk-js";
140
106
  import { Huri } from "@xyo-network/huri";
141
107
  import { ModuleErrorSchema } from "@xyo-network/payload-model";
142
- import { useEffect as useEffect2, useState as useState3 } from "react";
143
- import { jsx as jsx5 } from "react/jsx-runtime";
144
- var ResolvePayloadProvider = ({ children, huriPayload }) => {
108
+ import React5, { useEffect as useEffect2, useState as useState3 } from "react";
109
+ var ResolvePayloadProvider = /* @__PURE__ */ __name(({ children, huriPayload }) => {
145
110
  const [payload, setPayload] = useState3();
146
111
  const [huri, setHuri] = useState3();
147
- const {
148
- refreshPayload,
149
- setRefreshPayload,
150
- onRefresh
151
- } = useRefreshPayload();
112
+ const { refreshPayload, setRefreshPayload, onRefresh } = useRefreshPayload();
152
113
  useEffect2(() => {
153
114
  typeof huriPayload === "string" ? setHuri(huriPayload) : void 0;
154
115
  if (typeof huriPayload === "object") {
155
116
  setPayload(huriPayload);
156
117
  setRefreshPayload?.(true);
157
118
  }
158
- }, [huriPayload, setRefreshPayload]);
119
+ }, [
120
+ huriPayload,
121
+ setRefreshPayload
122
+ ]);
159
123
  const [notFound, setNotFound] = useState3();
160
124
  const [huriError, setHuriError] = useState3();
161
- useAsyncEffect(
162
- async (mounted) => {
163
- if (isDefined(huri) && !refreshPayload) {
164
- try {
165
- const huriInstance = new Huri(huri);
166
- const result = await huriInstance.fetch();
167
- await delay(500);
168
- if (mounted()) {
169
- setNotFound(result === null);
170
- setPayload(result);
171
- setRefreshPayload?.(true);
172
- }
173
- } catch (e) {
174
- const error = e;
175
- setHuriError({
176
- message: error.message,
177
- schema: ModuleErrorSchema,
178
- $sources: []
179
- });
125
+ useAsyncEffect(async (mounted) => {
126
+ if (isDefined(huri) && !refreshPayload) {
127
+ try {
128
+ const huriInstance = new Huri(huri);
129
+ const result = await huriInstance.fetch();
130
+ await delay(500);
131
+ if (mounted()) {
132
+ setNotFound(result === null);
133
+ setPayload(result);
134
+ setRefreshPayload?.(true);
180
135
  }
136
+ } catch (e) {
137
+ const error = e;
138
+ setHuriError({
139
+ message: error.message,
140
+ schema: ModuleErrorSchema,
141
+ $sources: []
142
+ });
181
143
  }
182
- },
183
- [huri, payload, refreshPayload, setRefreshPayload]
184
- );
185
- const refreshHuri = () => {
144
+ }
145
+ }, [
146
+ huri,
147
+ payload,
148
+ refreshPayload,
149
+ setRefreshPayload
150
+ ]);
151
+ const refreshHuri = /* @__PURE__ */ __name(() => {
186
152
  onRefresh?.();
187
153
  if (isDefined(huri)) {
188
154
  setRefreshPayload?.(false);
189
155
  }
190
- };
191
- return /* @__PURE__ */ jsx5(
192
- ResolvePayloadContext,
193
- {
194
- value: {
195
- huri,
196
- huriError,
197
- notFound,
198
- payload,
199
- provided: true,
200
- refreshHuri,
201
- setPayload
202
- },
203
- children
156
+ }, "refreshHuri");
157
+ return /* @__PURE__ */ React5.createElement(ResolvePayloadContext, {
158
+ value: {
159
+ huri,
160
+ huriError,
161
+ notFound,
162
+ payload,
163
+ provided: true,
164
+ refreshHuri,
165
+ setPayload
204
166
  }
205
- );
206
- };
167
+ }, children);
168
+ }, "ResolvePayloadProvider");
207
169
 
208
170
  // src/contexts/ResolvePayloadContext/use.ts
209
171
  import { useContextEx as useContextEx4 } from "@xylabs/react-shared";
210
- var useResolvePayload = () => useContextEx4(ResolvePayloadContext, "ResolvePayload", true);
172
+ var useResolvePayload = /* @__PURE__ */ __name(() => useContextEx4(ResolvePayloadContext, "ResolvePayload", true), "useResolvePayload");
211
173
 
212
174
  // src/contexts/ValidatePayloadContext/Provider.tsx
213
175
  import { Chip } from "@mui/material";
214
176
  import { useAsyncEffect as useAsyncEffect2 } from "@xylabs/react-async-effect";
215
177
  import { SchemaCache } from "@xyo-network/schema-cache";
216
- import { useState as useState4 } from "react";
178
+ import React6, { useState as useState4 } from "react";
217
179
 
218
180
  // src/contexts/ValidatePayloadContext/Context.ts
219
181
  import { createContextEx as createContextEx5 } from "@xylabs/react-shared";
220
182
  var ValidatePayloadContext = createContextEx5();
221
183
 
222
184
  // src/contexts/ValidatePayloadContext/Provider.tsx
223
- import { Fragment, jsx as jsx6 } from "react/jsx-runtime";
224
- var ValidatePayloadProvider = ({ children, enabled = false }) => {
185
+ var ValidatePayloadProvider = /* @__PURE__ */ __name(({ children, enabled = false }) => {
225
186
  const { payload } = useResolvePayload();
226
187
  const [initialized, setInitialized] = useState4(false);
227
188
  const [valid, setValid] = useState4();
228
- useAsyncEffect2(
229
- async () => {
230
- if (payload && enabled) {
231
- await SchemaCache.instance.get(payload.schema);
232
- const possibleKnownSchema = payload.schema;
233
- if (SchemaCache.instance.validators[possibleKnownSchema]) {
234
- const validator = SchemaCache.instance.validators[possibleKnownSchema];
235
- setValid(validator?.(payload));
236
- }
237
- setInitialized(true);
189
+ useAsyncEffect2(async () => {
190
+ if (payload && enabled) {
191
+ await SchemaCache.instance.get(payload.schema);
192
+ const possibleKnownSchema = payload.schema;
193
+ if (SchemaCache.instance.validators[possibleKnownSchema]) {
194
+ const validator = SchemaCache.instance.validators[possibleKnownSchema];
238
195
  }
239
- },
240
- [payload, enabled]
241
- );
242
- return /* @__PURE__ */ jsx6(
243
- ValidatePayloadContext,
244
- {
245
- value: {
246
- enabled,
247
- provided: true,
248
- schema: payload?.schema,
249
- validPayload: valid
250
- },
251
- children: enabled ? /* @__PURE__ */ jsx6(Fragment, { children: initialized ? children : /* @__PURE__ */ jsx6(Chip, { label: "Validating Payload..." }) }) : children
196
+ setInitialized(true);
252
197
  }
253
- );
254
- };
198
+ }, [
199
+ payload,
200
+ enabled
201
+ ]);
202
+ return /* @__PURE__ */ React6.createElement(ValidatePayloadContext, {
203
+ value: {
204
+ enabled,
205
+ provided: true,
206
+ schema: payload?.schema,
207
+ validPayload: valid
208
+ }
209
+ }, enabled ? /* @__PURE__ */ React6.createElement(React6.Fragment, null, initialized ? children : /* @__PURE__ */ React6.createElement(Chip, {
210
+ label: "Validating Payload..."
211
+ })) : children);
212
+ }, "ValidatePayloadProvider");
255
213
 
256
214
  // src/contexts/ValidatePayloadContext/use.ts
257
215
  import { useContextEx as useContextEx5 } from "@xylabs/react-shared";
258
- var useValidatePayload = () => useContextEx5(ValidatePayloadContext, "ValidateSchema", true);
216
+ var useValidatePayload = /* @__PURE__ */ __name(() => useContextEx5(ValidatePayloadContext, "ValidateSchema", true), "useValidatePayload");
259
217
 
260
218
  // src/components/embed-card/menu/EmbedMenu.tsx
261
219
  import { MoreVert as MoreVertIcon } from "@mui/icons-material";
262
220
  import { IconButton, Menu } from "@mui/material";
263
- import { useState as useState5 } from "react";
221
+ import React8, { useState as useState5 } from "react";
264
222
 
265
223
  // src/components/embed-card/menu/JsonMenuItem.tsx
266
224
  import { OpenInNew as OpenInNewIcon } from "@mui/icons-material";
267
- import {
268
- ListItemIcon,
269
- ListItemText,
270
- MenuItem
271
- } from "@mui/material";
272
- import { isDefined as isDefined2 } from "@xylabs/typeof";
273
- import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
274
- var JsonMenuItem = (props) => {
225
+ import { ListItemIcon, ListItemText, MenuItem } from "@mui/material";
226
+ import { isDefined as isDefined2 } from "@xylabs/sdk-js";
227
+ import React7 from "react";
228
+ var JsonMenuItem = /* @__PURE__ */ __name((props) => {
275
229
  const { huri } = useResolvePayload();
276
- return /* @__PURE__ */ jsx7(Fragment2, { children: isDefined2(huri) ? /* @__PURE__ */ jsxs2(MenuItem, { title: "Source Payload JSON", onClick: () => window.open(huri, "_blank"), ...props, children: [
277
- /* @__PURE__ */ jsx7(ListItemText, { sx: { mr: 1 }, children: "JSON" }),
278
- /* @__PURE__ */ jsx7(ListItemIcon, { sx: { justifyContent: "end" }, children: /* @__PURE__ */ jsx7(OpenInNewIcon, { fontSize: "small" }) })
279
- ] }) : null });
280
- };
230
+ return /* @__PURE__ */ React7.createElement(React7.Fragment, null, isDefined2(huri) ? /* @__PURE__ */ React7.createElement(MenuItem, {
231
+ title: "Source Payload JSON",
232
+ onClick: /* @__PURE__ */ __name(() => window.open(huri, "_blank"), "onClick"),
233
+ ...props
234
+ }, /* @__PURE__ */ React7.createElement(ListItemText, {
235
+ sx: {
236
+ mr: 1
237
+ }
238
+ }, "JSON"), /* @__PURE__ */ React7.createElement(ListItemIcon, {
239
+ sx: {
240
+ justifyContent: "end"
241
+ }
242
+ }, /* @__PURE__ */ React7.createElement(OpenInNewIcon, {
243
+ fontSize: "small"
244
+ }))) : null);
245
+ }, "JsonMenuItem");
281
246
 
282
247
  // src/components/embed-card/menu/EmbedMenu.tsx
283
- import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
284
- var EmbedMenu = (props) => {
248
+ var EmbedMenu = /* @__PURE__ */ __name((props) => {
285
249
  const [anchorEl, setAnchorEl] = useState5(null);
286
250
  const open = Boolean(anchorEl);
287
- const handleClick = (event) => {
251
+ const handleClick = /* @__PURE__ */ __name((event) => {
288
252
  setAnchorEl(event.currentTarget);
289
- };
290
- const handleClose = () => {
253
+ }, "handleClick");
254
+ const handleClose = /* @__PURE__ */ __name(() => {
291
255
  setAnchorEl(null);
292
- };
293
- return /* @__PURE__ */ jsxs3(Fragment3, { children: [
294
- /* @__PURE__ */ jsx8(IconButton, { onClick: handleClick, ...props, children: /* @__PURE__ */ jsx8(MoreVertIcon, {}) }),
295
- /* @__PURE__ */ jsx8(
296
- Menu,
297
- {
298
- anchorEl,
299
- open,
300
- onClose: handleClose,
301
- slotProps: {
302
- paper: { variant: "elevation" },
303
- list: { dense: true }
304
- },
305
- children: /* @__PURE__ */ jsx8(JsonMenuItem, {})
256
+ }, "handleClose");
257
+ return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(IconButton, {
258
+ onClick: handleClick,
259
+ ...props
260
+ }, /* @__PURE__ */ React8.createElement(MoreVertIcon, null)), /* @__PURE__ */ React8.createElement(Menu, {
261
+ anchorEl,
262
+ open,
263
+ onClose: handleClose,
264
+ slotProps: {
265
+ paper: {
266
+ variant: "elevation"
267
+ },
268
+ list: {
269
+ dense: true
306
270
  }
307
- )
308
- ] });
309
- };
271
+ }
272
+ }, /* @__PURE__ */ React8.createElement(JsonMenuItem, null)));
273
+ }, "EmbedMenu");
310
274
 
311
275
  // src/components/embed-card/card/EmbedCardHeader.tsx
312
- import { Fragment as Fragment4, jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
313
- var EmbedCardHeader = () => {
276
+ var EmbedCardHeader = /* @__PURE__ */ __name(() => {
314
277
  const { refreshHuri, huri } = useResolvePayload();
315
- const {
316
- activePlugin,
317
- timestampLabel,
318
- hideElementsConfig
319
- } = useEmbedPluginState();
320
- const {
321
- hideAvatar,
322
- hideTitle,
323
- hideRefreshButton,
324
- hideTimestamp,
325
- hideCardActions
326
- } = hideElementsConfig ?? {};
278
+ const { activePlugin, timestampLabel, hideElementsConfig } = useEmbedPluginState();
279
+ const { hideAvatar, hideTitle, hideRefreshButton, hideTimestamp, hideCardActions } = hideElementsConfig ?? {};
327
280
  const timestamp = Date.now();
328
- return /* @__PURE__ */ jsx9(
329
- CardHeader,
330
- {
331
- sx: { flexWrap: "wrap", rowGap: 1 },
332
- avatar: hideAvatar ? /* @__PURE__ */ jsx9(Fragment4, {}) : /* @__PURE__ */ jsx9(Avatar, { sx: { bgcolor: (theme) => theme.vars.palette.primary.main }, "aria-label": activePlugin?.name, children: activePlugin?.name?.charAt(0) }),
333
- action: /* @__PURE__ */ jsxs4(FlexRow, { flexWrap: "wrap", columnGap: 0.5, children: [
334
- isDefined3(timestamp) && !Number.isNaN(timestamp) ? hideTimestamp && hideRefreshButton ? "" : /* @__PURE__ */ jsx9(
335
- Chip2,
336
- {
337
- avatar: hideRefreshButton ? /* @__PURE__ */ jsx9(Fragment4, {}) : /* @__PURE__ */ jsx9(RefreshIcon, {}),
338
- clickable: hideRefreshButton ? false : true,
339
- onClick: refreshHuri,
340
- label: hideTimestamp ? "" : `${timestampLabel} ${new Date(timestamp).toLocaleString()}`
341
- }
342
- ) : null,
343
- hideCardActions || huri === void 0 ? null : /* @__PURE__ */ jsx9(EmbedMenu, {})
344
- ] }),
345
- title: hideTitle ? "" : activePlugin?.name
346
- }
347
- );
348
- };
281
+ return /* @__PURE__ */ React9.createElement(CardHeader, {
282
+ sx: {
283
+ flexWrap: "wrap",
284
+ rowGap: 1
285
+ },
286
+ avatar: hideAvatar ? /* @__PURE__ */ React9.createElement(React9.Fragment, null) : /* @__PURE__ */ React9.createElement(Avatar, {
287
+ sx: {
288
+ bgcolor: /* @__PURE__ */ __name((theme) => theme.vars.palette.primary.main, "bgcolor")
289
+ },
290
+ "aria-label": activePlugin?.name
291
+ }, activePlugin?.name?.charAt(0)),
292
+ action: /* @__PURE__ */ React9.createElement(FlexRow, {
293
+ flexWrap: "wrap",
294
+ columnGap: 0.5
295
+ }, isDefined3(timestamp) && !Number.isNaN(timestamp) ? hideTimestamp && hideRefreshButton ? "" : /* @__PURE__ */ React9.createElement(Chip2, {
296
+ avatar: hideRefreshButton ? /* @__PURE__ */ React9.createElement(React9.Fragment, null) : /* @__PURE__ */ React9.createElement(RefreshIcon, null),
297
+ clickable: hideRefreshButton ? false : true,
298
+ onClick: refreshHuri,
299
+ label: hideTimestamp ? "" : `${timestampLabel} ${new Date(timestamp).toLocaleString()}`
300
+ }) : null, hideCardActions || huri === void 0 ? null : /* @__PURE__ */ React9.createElement(EmbedMenu, null)),
301
+ title: hideTitle ? "" : activePlugin?.name
302
+ });
303
+ }, "EmbedCardHeader");
349
304
 
350
305
  // src/components/embed-card/card/EmbedPluginCard.tsx
351
306
  import { CardContent } from "@mui/material";
352
307
  import { FlexGrowRow } from "@xylabs/react-flexbox";
353
- import { isTruthy } from "@xylabs/typeof";
308
+ import { isTruthy } from "@xylabs/sdk-js";
354
309
  import { useListMode as useListMode2 } from "@xyo-network/react-shared";
310
+ import React13 from "react";
355
311
 
356
312
  // src/components/controls/EmbedFormControl.tsx
357
313
  import { FormControl, InputLabel } from "@mui/material";
358
- import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
359
- var EmbedFormControl = ({
360
- formId,
361
- formLabel,
362
- children,
363
- ...props
364
- }) => {
365
- return /* @__PURE__ */ jsxs5(FormControl, { ...props, children: [
366
- /* @__PURE__ */ jsx10(InputLabel, { id: formId, children: formLabel }),
367
- children
368
- ] });
369
- };
314
+ import React10 from "react";
315
+ var EmbedFormControl = /* @__PURE__ */ __name(({ formId, formLabel, children, ...props }) => {
316
+ return /* @__PURE__ */ React10.createElement(FormControl, props, /* @__PURE__ */ React10.createElement(InputLabel, {
317
+ id: formId
318
+ }, formLabel), children);
319
+ }, "EmbedFormControl");
370
320
 
371
321
  // src/components/controls/ListModeSelect.tsx
372
322
  import { MenuItem as MenuItem2 } from "@mui/material";
373
323
  import { SelectEx } from "@xylabs/react-select";
374
324
  import { useListMode } from "@xyo-network/react-shared";
375
- import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
325
+ import React11 from "react";
376
326
  var listModeSelectId = "listmode-select-id";
377
327
  var listModeSelectLabel = "List Mode";
378
- var ListModeSelect = (props) => {
328
+ var ListModeSelect = /* @__PURE__ */ __name((props) => {
379
329
  const { listMode, setListMode } = useListMode();
380
- return /* @__PURE__ */ jsxs6(
381
- SelectEx,
382
- {
383
- value: listMode ?? "default",
384
- onChange: (event) => {
385
- setListMode?.(event.target.value);
386
- },
387
- ...props,
388
- children: [
389
- /* @__PURE__ */ jsx11(MenuItem2, { value: "default", children: "Default" }, "default"),
390
- /* @__PURE__ */ jsx11(MenuItem2, { value: "table", children: "Table" }, "table"),
391
- /* @__PURE__ */ jsx11(MenuItem2, { value: "grid", children: "Grid" }, "grid")
392
- ]
393
- }
394
- );
395
- };
396
- var ListModeSelectFormControl = (props) => {
397
- return /* @__PURE__ */ jsx11(EmbedFormControl, { formId: listModeSelectId, formLabel: listModeSelectLabel, children: /* @__PURE__ */ jsx11(ListModeSelect, { size: "small", label: listModeSelectLabel, labelId: listModeSelectId, ...props }) });
398
- };
330
+ return /* @__PURE__ */ React11.createElement(SelectEx, {
331
+ value: listMode ?? "default",
332
+ onChange: /* @__PURE__ */ __name((event) => {
333
+ setListMode?.(event.target.value);
334
+ }, "onChange"),
335
+ ...props
336
+ }, /* @__PURE__ */ React11.createElement(MenuItem2, {
337
+ key: "default",
338
+ value: "default"
339
+ }, "Default"), /* @__PURE__ */ React11.createElement(MenuItem2, {
340
+ key: "table",
341
+ value: "table"
342
+ }, "Table"), /* @__PURE__ */ React11.createElement(MenuItem2, {
343
+ key: "grid",
344
+ value: "grid"
345
+ }, "Grid"));
346
+ }, "ListModeSelect");
347
+ var ListModeSelectFormControl = /* @__PURE__ */ __name((props) => {
348
+ return /* @__PURE__ */ React11.createElement(EmbedFormControl, {
349
+ formId: listModeSelectId,
350
+ formLabel: listModeSelectLabel
351
+ }, /* @__PURE__ */ React11.createElement(ListModeSelect, {
352
+ size: "small",
353
+ label: listModeSelectLabel,
354
+ labelId: listModeSelectId,
355
+ ...props
356
+ }));
357
+ }, "ListModeSelectFormControl");
399
358
 
400
359
  // src/components/controls/RenderSelect.tsx
401
360
  import { MenuItem as MenuItem3 } from "@mui/material";
402
361
  import { SelectEx as SelectEx2 } from "@xylabs/react-select";
403
- import { jsx as jsx12 } from "react/jsx-runtime";
362
+ import React12 from "react";
404
363
  var renderSelectId = "render-select-id";
405
364
  var renderSelectLabel = "Renderer";
406
- var EmbedRenderSelect = (props) => {
407
- const {
408
- activePlugin,
409
- setActivePlugin,
410
- plugins
411
- } = useEmbedPluginState();
412
- return /* @__PURE__ */ jsx12(EmbedFormControl, { formId: renderSelectId, formLabel: renderSelectLabel, children: /* @__PURE__ */ jsx12(SelectEx2, { size: "small", value: activePlugin?.name, ...props, children: plugins?.map((plugin) => /* @__PURE__ */ jsx12(MenuItem3, { value: plugin.name, onClick: () => setActivePlugin?.(plugin), children: plugin.name }, plugin.name)) }) });
413
- };
365
+ var EmbedRenderSelect = /* @__PURE__ */ __name((props) => {
366
+ const { activePlugin, setActivePlugin, plugins } = useEmbedPluginState();
367
+ return /* @__PURE__ */ React12.createElement(EmbedFormControl, {
368
+ formId: renderSelectId,
369
+ formLabel: renderSelectLabel
370
+ }, /* @__PURE__ */ React12.createElement(SelectEx2, {
371
+ size: "small",
372
+ value: activePlugin?.name,
373
+ ...props
374
+ }, plugins?.map((plugin) => /* @__PURE__ */ React12.createElement(MenuItem3, {
375
+ value: plugin.name,
376
+ key: plugin.name,
377
+ onClick: /* @__PURE__ */ __name(() => setActivePlugin?.(plugin), "onClick")
378
+ }, plugin.name))));
379
+ }, "EmbedRenderSelect");
414
380
 
415
381
  // src/components/embed-card/card/EmbedPluginCard.tsx
416
- import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
417
- var EmbedPluginCard = ({ ...props }) => {
382
+ var EmbedPluginCard = /* @__PURE__ */ __name(({ ...props }) => {
418
383
  const { payload } = useResolvePayload();
419
- const {
420
- activePlugin: ActivePlugin,
421
- plugins,
422
- hideElementsConfig
423
- } = useEmbedPluginState();
384
+ const { activePlugin: ActivePlugin, plugins, hideElementsConfig } = useEmbedPluginState();
424
385
  const { listMode } = useListMode2();
425
386
  const { pluginProps } = usePluginProps();
426
387
  const supportsListMode = isTruthy(ActivePlugin?.components?.box?.listModes?.length) ? true : false;
427
- return /* @__PURE__ */ jsxs7(BusyCard, { ...props, children: [
428
- hideElementsConfig?.hideCardHeader ? null : /* @__PURE__ */ jsx13(EmbedCardHeader, {}),
429
- plugins && plugins.length > 0 || supportsListMode ? /* @__PURE__ */ jsxs7(FlexGrowRow, { columnGap: 2, rowGap: 2, flexWrap: "wrap", pb: 1, children: [
430
- plugins && plugins.length > 1 ? /* @__PURE__ */ jsx13(EmbedRenderSelect, {}) : null,
431
- supportsListMode ? /* @__PURE__ */ jsx13(ListModeSelectFormControl, {}) : null
432
- ] }) : null,
433
- /* @__PURE__ */ jsx13(CardContent, { sx: { height: "100%" }, children: ActivePlugin ? /* @__PURE__ */ jsx13(ActivePlugin.components.box.detailsBox, { payload, ...pluginProps, ...supportsListMode && { listMode } }) : null })
434
- ] });
435
- };
388
+ return /* @__PURE__ */ React13.createElement(BusyCard, props, hideElementsConfig?.hideCardHeader ? null : /* @__PURE__ */ React13.createElement(EmbedCardHeader, null), plugins && plugins.length > 0 || supportsListMode ? /* @__PURE__ */ React13.createElement(FlexGrowRow, {
389
+ columnGap: 2,
390
+ rowGap: 2,
391
+ flexWrap: "wrap",
392
+ pb: 1
393
+ }, plugins && plugins.length > 1 ? /* @__PURE__ */ React13.createElement(EmbedRenderSelect, null) : null, supportsListMode ? /* @__PURE__ */ React13.createElement(ListModeSelectFormControl, null) : null) : null, /* @__PURE__ */ React13.createElement(CardContent, {
394
+ sx: {
395
+ height: "100%"
396
+ }
397
+ }, ActivePlugin ? /* @__PURE__ */ React13.createElement(ActivePlugin.components.box.detailsBox, {
398
+ payload,
399
+ ...pluginProps,
400
+ ...supportsListMode && {
401
+ listMode
402
+ }
403
+ }) : null));
404
+ }, "EmbedPluginCard");
436
405
 
437
406
  // src/components/embed-card/EmbedPluginCard.tsx
438
407
  import { useTheme } from "@mui/material";
408
+ import React20 from "react";
439
409
 
440
410
  // src/components/EmbedPlugin.tsx
441
411
  import { ErrorBoundary } from "@xylabs/react-error";
442
412
  import { ListModeProvider } from "@xyo-network/react-shared";
413
+ import React17 from "react";
443
414
 
444
415
  // src/components/EmbedResolver.tsx
445
416
  import { LoadResult } from "@xyo-network/react-shared";
446
- import { jsx as jsx14 } from "react/jsx-runtime";
447
- var EmbedResolver = ({ children }) => {
448
- const {
449
- payload,
450
- notFound,
451
- huriError
452
- } = useResolvePayload();
453
- return /* @__PURE__ */ jsx14(LoadResult, { searchResult: payload, notFound: !!notFound, error: !!huriError, children });
454
- };
417
+ import React14 from "react";
418
+ var EmbedResolver = /* @__PURE__ */ __name(({ children }) => {
419
+ const { payload, notFound, huriError } = useResolvePayload();
420
+ return /* @__PURE__ */ React14.createElement(LoadResult, {
421
+ searchResult: payload,
422
+ notFound: !!notFound,
423
+ error: !!huriError
424
+ }, children);
425
+ }, "EmbedResolver");
455
426
 
456
427
  // src/components/validation-alerts/ValidatePayload.tsx
457
428
  import { Alert } from "@mui/material";
458
- import { Fragment as Fragment5, jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
459
- var ValidatePayloadAlert = ({ children, ...props }) => {
460
- const {
461
- validPayload,
462
- enabled,
463
- schema
464
- } = useValidatePayload();
429
+ import React15 from "react";
430
+ var ValidatePayloadAlert = /* @__PURE__ */ __name(({ children, ...props }) => {
431
+ const { validPayload, enabled, schema } = useValidatePayload();
465
432
  if (enabled && validPayload === false) {
466
- return /* @__PURE__ */ jsxs8(Alert, { severity: "error", title: "Invalid Payload!", ...props, children: [
467
- "Payload schema claimed to be",
468
- " ",
469
- schema,
470
- " ",
471
- "but failed to validate."
472
- ] });
433
+ return /* @__PURE__ */ React15.createElement(Alert, {
434
+ severity: "error",
435
+ title: "Invalid Payload!",
436
+ ...props
437
+ }, "Payload schema claimed to be", " ", schema, " ", "but failed to validate.");
473
438
  }
474
- return /* @__PURE__ */ jsx15(Fragment5, { children });
475
- };
439
+ return /* @__PURE__ */ React15.createElement(React15.Fragment, null, children);
440
+ }, "ValidatePayloadAlert");
476
441
 
477
442
  // src/components/validation-alerts/ValidatePlugins.tsx
478
443
  import { Alert as Alert2, AlertTitle } from "@mui/material";
479
- import { Fragment as Fragment6, jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
480
- var ValidatePluginsAlert = ({ children, ...props }) => {
444
+ import React16 from "react";
445
+ var ValidatePluginsAlert = /* @__PURE__ */ __name(({ children, ...props }) => {
481
446
  const { payload } = useResolvePayload();
482
447
  const { plugins } = useEmbedPluginState();
483
448
  if (payload && plugins?.length === 0) {
484
- return /* @__PURE__ */ jsxs9(Alert2, { severity: "warning", ...props, children: [
485
- /* @__PURE__ */ jsx16(AlertTitle, { children: "Missing plugins!" }),
486
- "Payload found but no plugins were present."
487
- ] });
449
+ return /* @__PURE__ */ React16.createElement(Alert2, {
450
+ severity: "warning",
451
+ ...props
452
+ }, /* @__PURE__ */ React16.createElement(AlertTitle, null, "Missing plugins!"), "Payload found but no plugins were present.");
488
453
  }
489
- return /* @__PURE__ */ jsx16(Fragment6, { children });
490
- };
454
+ return /* @__PURE__ */ React16.createElement(React16.Fragment, null, children);
455
+ }, "ValidatePluginsAlert");
491
456
 
492
457
  // src/components/EmbedPlugin.tsx
493
- import { jsx as jsx17 } from "react/jsx-runtime";
494
- var EmbedPluginInner = ({
495
- validateSchema,
496
- plugins,
497
- huriPayload,
498
- refreshTitle = "",
499
- timestampLabel = "Data From",
500
- hideElementsConfig,
501
- embedPluginConfig,
502
- onRefresh,
503
- children
504
- }) => {
505
- return /* @__PURE__ */ jsx17(ErrorBoundary, { children: /* @__PURE__ */ jsx17(
506
- EmbedPluginProvider,
507
- {
508
- refreshTitle,
509
- timestampLabel,
510
- hideElementsConfig,
511
- plugins,
512
- embedPluginConfig,
513
- children: /* @__PURE__ */ jsx17(WithResolvers, { onRefresh, huriPayload, children: /* @__PURE__ */ jsx17(WithValidators, { validateSchema, children: /* @__PURE__ */ jsx17(ListModeProvider, { defaultListMode: embedPluginConfig?.listMode, children }) }) })
514
- }
515
- ) });
516
- };
517
- var WithResolvers = ({
518
- children,
519
- onRefresh,
520
- huriPayload
521
- }) => {
522
- return /* @__PURE__ */ jsx17(RefreshPayloadProvider, { onRefresh, children: /* @__PURE__ */ jsx17(ResolvePayloadProvider, { huriPayload, children: /* @__PURE__ */ jsx17(EmbedResolver, { children }) }) });
523
- };
524
- var WithValidators = ({ children, validateSchema }) => {
525
- return /* @__PURE__ */ jsx17(ValidatePayloadProvider, { enabled: validateSchema, children: /* @__PURE__ */ jsx17(ValidatePluginsAlert, { children: /* @__PURE__ */ jsx17(ValidatePayloadAlert, { children }) }) });
526
- };
458
+ var EmbedPluginInner = /* @__PURE__ */ __name(({ validateSchema, plugins, huriPayload, refreshTitle = "", timestampLabel = "Data From", hideElementsConfig, embedPluginConfig, onRefresh, children }) => {
459
+ return /* @__PURE__ */ React17.createElement(ErrorBoundary, null, /* @__PURE__ */ React17.createElement(EmbedPluginProvider, {
460
+ refreshTitle,
461
+ timestampLabel,
462
+ hideElementsConfig,
463
+ plugins,
464
+ embedPluginConfig
465
+ }, /* @__PURE__ */ React17.createElement(WithResolvers, {
466
+ onRefresh,
467
+ huriPayload
468
+ }, /* @__PURE__ */ React17.createElement(WithValidators, {
469
+ validateSchema
470
+ }, /* @__PURE__ */ React17.createElement(ListModeProvider, {
471
+ defaultListMode: embedPluginConfig?.listMode
472
+ }, children)))));
473
+ }, "EmbedPluginInner");
474
+ var WithResolvers = /* @__PURE__ */ __name(({ children, onRefresh, huriPayload }) => {
475
+ return /* @__PURE__ */ React17.createElement(RefreshPayloadProvider, {
476
+ onRefresh
477
+ }, /* @__PURE__ */ React17.createElement(ResolvePayloadProvider, {
478
+ huriPayload
479
+ }, /* @__PURE__ */ React17.createElement(EmbedResolver, null, children)));
480
+ }, "WithResolvers");
481
+ var WithValidators = /* @__PURE__ */ __name(({ children, validateSchema }) => {
482
+ return /* @__PURE__ */ React17.createElement(ValidatePayloadProvider, {
483
+ enabled: validateSchema
484
+ }, /* @__PURE__ */ React17.createElement(ValidatePluginsAlert, null, /* @__PURE__ */ React17.createElement(ValidatePayloadAlert, null, children)));
485
+ }, "WithValidators");
527
486
 
528
487
  // src/components/embed-card/error-handling/EmbedCardApiErrorRenderer.tsx
529
488
  import { ErrorAlert, ErrorRender } from "@xylabs/react-error";
489
+ import React19 from "react";
530
490
 
531
491
  // src/components/embed-card/error-handling/EmbedErrorCard.tsx
532
- import {
533
- Alert as Alert3,
534
- AlertTitle as AlertTitle2,
535
- Card as Card2,
536
- CardContent as CardContent2,
537
- Typography
538
- } from "@mui/material";
539
- import { isDefined as isDefined4 } from "@xylabs/typeof";
540
- import { Fragment as Fragment7, jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
541
- var EmbedErrorCard = (props) => {
542
- const {
543
- alertProps,
544
- error,
545
- scope,
546
- hideErrorDetails = true,
547
- children,
548
- ...cardProps
549
- } = props;
492
+ import { Alert as Alert3, AlertTitle as AlertTitle2, Card as Card2, CardContent as CardContent2, Typography } from "@mui/material";
493
+ import { isDefined as isDefined4 } from "@xylabs/sdk-js";
494
+ import React18 from "react";
495
+ var EmbedErrorCard = /* @__PURE__ */ __name((props) => {
496
+ const { alertProps, error, scope, hideErrorDetails = true, children, ...cardProps } = props;
550
497
  const errorProps = {
551
498
  alertProps,
552
499
  error,
553
500
  hideErrorDetails,
554
501
  scope
555
502
  };
556
- return /* @__PURE__ */ jsx18(Card2, { ...cardProps, children: /* @__PURE__ */ jsx18(CardContent2, { children: children ?? /* @__PURE__ */ jsx18(DefaultErrorAlert, { ...errorProps }) }) });
557
- };
558
- var DefaultErrorAlert = ({
559
- alertProps,
560
- scope,
561
- hideErrorDetails,
562
- error
563
- }) => {
564
- return /* @__PURE__ */ jsxs10(Alert3, { severity: "error", ...alertProps, children: [
565
- /* @__PURE__ */ jsx18(AlertTitle2, { children: "Whoops! Something went wrong" }),
566
- isDefined4(scope) ? /* @__PURE__ */ jsxs10(Typography, { variant: "caption", children: [
567
- "Scope:",
568
- scope
569
- ] }) : null,
570
- !hideErrorDetails && error ? /* @__PURE__ */ jsxs10(Fragment7, { children: [
571
- /* @__PURE__ */ jsx18(Typography, { variant: "caption", children: "Error: " }),
572
- /* @__PURE__ */ jsx18(Typography, { variant: "caption", children: error?.message })
573
- ] }) : /* @__PURE__ */ jsx18(Typography, { variant: "caption", fontSize: "small", children: "Error Loading Plugin" })
574
- ] });
575
- };
503
+ return /* @__PURE__ */ React18.createElement(Card2, cardProps, /* @__PURE__ */ React18.createElement(CardContent2, null, children ?? /* @__PURE__ */ React18.createElement(DefaultErrorAlert, errorProps)));
504
+ }, "EmbedErrorCard");
505
+ var DefaultErrorAlert = /* @__PURE__ */ __name(({ alertProps, scope, hideErrorDetails, error }) => {
506
+ return /* @__PURE__ */ React18.createElement(Alert3, {
507
+ severity: "error",
508
+ ...alertProps
509
+ }, /* @__PURE__ */ React18.createElement(AlertTitle2, null, "Whoops! Something went wrong"), isDefined4(scope) ? /* @__PURE__ */ React18.createElement(Typography, {
510
+ variant: "caption"
511
+ }, "Scope:", scope) : null, !hideErrorDetails && error ? /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(Typography, {
512
+ variant: "caption"
513
+ }, "Error: "), /* @__PURE__ */ React18.createElement(Typography, {
514
+ variant: "caption"
515
+ }, error?.message)) : /* @__PURE__ */ React18.createElement(Typography, {
516
+ variant: "caption",
517
+ fontSize: "small"
518
+ }, "Error Loading Plugin"));
519
+ }, "DefaultErrorAlert");
576
520
 
577
521
  // src/components/embed-card/error-handling/EmbedCardApiErrorRenderer.tsx
578
- import { jsx as jsx19 } from "react/jsx-runtime";
579
- var EmbedCardApiErrorRenderer = ({
580
- xyoError,
581
- children,
582
- ...props
583
- }) => {
584
- return /* @__PURE__ */ jsx19(ErrorRender, { error: xyoError, noReAuth: true, noErrorDisplay: true, customError: /* @__PURE__ */ jsx19(CustomApiErrorCard, { xyoError, ...props }), children });
585
- };
586
- var CustomApiErrorCard = ({ xyoError, ...props }) => {
587
- return /* @__PURE__ */ jsx19(EmbedErrorCard, { ...props, children: /* @__PURE__ */ jsx19(ErrorAlert, { error: xyoError }) });
588
- };
522
+ var EmbedCardApiErrorRenderer = /* @__PURE__ */ __name(({ xyoError, children, ...props }) => {
523
+ return /* @__PURE__ */ React19.createElement(ErrorRender, {
524
+ error: xyoError,
525
+ noReAuth: true,
526
+ noErrorDisplay: true,
527
+ customError: /* @__PURE__ */ React19.createElement(CustomApiErrorCard, {
528
+ xyoError,
529
+ ...props
530
+ })
531
+ }, children);
532
+ }, "EmbedCardApiErrorRenderer");
533
+ var CustomApiErrorCard = /* @__PURE__ */ __name(({ xyoError, ...props }) => {
534
+ return /* @__PURE__ */ React19.createElement(EmbedErrorCard, props, /* @__PURE__ */ React19.createElement(ErrorAlert, {
535
+ error: xyoError
536
+ }));
537
+ }, "CustomApiErrorCard");
589
538
 
590
539
  // src/components/embed-card/EmbedPluginCard.tsx
591
- import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
592
- var ApiEmbedPluginCard = ({ children, ...props }) => {
593
- const {
594
- validateSchema,
595
- plugins = [],
596
- huriPayload,
597
- refreshTitle = "",
598
- timestampLabel = "Data From",
599
- hideElementsConfig,
540
+ var ApiEmbedPluginCard = /* @__PURE__ */ __name(({ children, ...props }) => {
541
+ const { validateSchema, plugins = [], huriPayload, refreshTitle = "", timestampLabel = "Data From", hideElementsConfig, embedPluginConfig, onRefresh, ...busyCardProps } = props;
542
+ return /* @__PURE__ */ React20.createElement(EmbedPluginInner, {
600
543
  embedPluginConfig,
544
+ hideElementsConfig,
545
+ huriPayload,
601
546
  onRefresh,
602
- ...busyCardProps
603
- } = props;
604
- return /* @__PURE__ */ jsxs11(
605
- EmbedPluginInner,
606
- {
607
- ...{
608
- embedPluginConfig,
609
- hideElementsConfig,
610
- huriPayload,
611
- onRefresh,
612
- plugins,
613
- refreshTitle,
614
- timestampLabel,
615
- validateSchema
616
- },
617
- children: [
618
- /* @__PURE__ */ jsx20(EmbedPluginCardInner, { ...busyCardProps }),
619
- children
620
- ]
621
- }
622
- );
623
- };
624
- var EmbedPluginCardInner = (props) => {
547
+ plugins,
548
+ refreshTitle,
549
+ timestampLabel,
550
+ validateSchema
551
+ }, /* @__PURE__ */ React20.createElement(EmbedPluginCardInner, busyCardProps), children);
552
+ }, "ApiEmbedPluginCard");
553
+ var EmbedPluginCardInner = /* @__PURE__ */ __name((props) => {
625
554
  const { payload, huriError } = useResolvePayload();
626
555
  const { refreshPayload } = useRefreshPayload();
627
556
  const theme = useTheme();
628
- return /* @__PURE__ */ jsx20(EmbedCardApiErrorRenderer, { xyoError: huriError, children: /* @__PURE__ */ jsx20(
629
- EmbedPluginCard,
630
- {
631
- elevation: 3,
632
- variant: "elevation",
633
- busy: Boolean(!refreshPayload && payload),
634
- busyVariantProps: {
635
- style: {
636
- alignItems: "start",
637
- paddingTop: theme.spacing(2),
638
- zIndex: 2
639
- }
640
- },
641
- sx: { position: "relative" },
642
- ...props
643
- }
644
- ) });
645
- };
557
+ return /* @__PURE__ */ React20.createElement(EmbedCardApiErrorRenderer, {
558
+ xyoError: huriError
559
+ }, /* @__PURE__ */ React20.createElement(EmbedPluginCard, {
560
+ elevation: 3,
561
+ variant: "elevation",
562
+ busy: Boolean(!refreshPayload && payload),
563
+ busyVariantProps: {
564
+ style: {
565
+ alignItems: "start",
566
+ paddingTop: theme.spacing(2),
567
+ zIndex: 2
568
+ }
569
+ },
570
+ sx: {
571
+ position: "relative"
572
+ },
573
+ ...props
574
+ }));
575
+ }, "EmbedPluginCardInner");
646
576
  export {
647
577
  ApiEmbedPluginCard,
648
578
  BusyCard,