@xyo-network/react-embed 7.4.2 → 7.5.0

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