@xyo-network/react-embed 2.78.0 → 2.78.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/index.cjs +513 -1
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +493 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/neutral/index.cjs +513 -1
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.js +493 -1
- package/dist/neutral/index.js.map +1 -1
- package/dist/node/index.cjs +535 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +495 -1
- package/dist/node/index.js.map +1 -1
- package/package.json +15 -15
package/dist/node/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/components/embed-card/card/BusyCard.tsx","../../src/components/embed-card/card/EmbedCardHeader.tsx","../../src/contexts/EmbedPluginContext/Context.tsx","../../src/contexts/EmbedPluginContext/Provider.tsx","../../src/contexts/EmbedPluginContext/use.tsx","../../src/contexts/RefreshPayloadContext/Provider.tsx","../../src/contexts/RefreshPayloadContext/Context.tsx","../../src/contexts/RefreshPayloadContext/use.tsx","../../src/contexts/ResolvePayloadContext/Context.ts","../../src/contexts/ResolvePayloadContext/Provider.tsx","../../src/contexts/ResolvePayloadContext/use.tsx","../../src/contexts/ValidatePayloadContext/Provider.tsx","../../src/contexts/ValidatePayloadContext/Context.ts","../../src/contexts/ValidatePayloadContext/use.tsx","../../src/components/embed-card/menu/EmbedMenu.tsx","../../src/components/embed-card/menu/JsonMenuItem.tsx","../../src/components/embed-card/card/EmbedPluginCard.tsx","../../src/components/controls/EmbedFormControl.tsx","../../src/components/controls/ListModeSelect.tsx","../../src/components/controls/RenderSelect.tsx","../../src/components/embed-card/EmbedPluginCard.tsx","../../src/components/EmbedPlugin.tsx","../../src/components/EmbedResolver.tsx","../../src/components/validation-alerts/ValidatePayload.tsx","../../src/components/validation-alerts/ValidatePlugins.tsx","../../src/components/embed-card/error-handling/EmbedCardApiErrorRenderer.tsx","../../src/components/embed-card/error-handling/EmbedErrorCard.tsx"],"sourcesContent":["import { Card, CardProps } from '@mui/material'\nimport { useBusyTiming } from '@xylabs/react-flexbox'\nimport {\n BusyCircularProgress,\n BusyCircularProgressProps,\n BusyLinearProgress,\n BusyLinearProgressProps,\n BusyVariant,\n WithChildren,\n} from '@xylabs/react-shared'\n\nexport interface BusyCardProps extends CardProps {\n busy?: boolean\n busyMinimum?: number\n busyVariant?: BusyVariant\n busyVariantProps?: BusyCircularProgressProps | BusyLinearProgressProps\n}\n\nexport const BusyCard: React.FC<WithChildren<BusyCardProps>> = ({\n busy,\n busyMinimum = 500,\n busyVariant = 'circular',\n busyVariantProps,\n children,\n ...props\n}) => {\n const internalBusy = useBusyTiming(busy, busyMinimum)\n return (\n <Card {...props}>\n {children}\n {busyVariant === 'circular' && internalBusy ?\n <BusyCircularProgress {...(busyVariantProps as BusyCircularProgressProps)} />\n : null}\n {busyVariant === 'linear' && internalBusy ?\n <BusyLinearProgress {...(busyVariantProps as BusyLinearProgressProps)} />\n : null}\n </Card>\n )\n}\n","import { Refresh as RefreshIcon } from '@mui/icons-material'\nimport { Avatar, CardHeader, CardHeaderProps, Chip, Theme } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\n\nimport { useEmbedPluginState, useResolvePayload } from '../../../contexts'\nimport { EmbedMenu } from '../menu'\n\nexport const EmbedCardHeader: React.FC<CardHeaderProps> = () => {\n const { refreshHuri, huri } = useResolvePayload()\n const { activePlugin, timestampLabel, hideElementsConfig } = useEmbedPluginState()\n const { hideAvatar, hideTitle, hideRefreshButton, hideTimestamp, hideCardActions } = hideElementsConfig ?? {}\n //this is temporary so that we can add the ability to get a timestamp via diviner later\n const timestamp = Date.now()\n return (\n <CardHeader\n sx={{ flexWrap: 'wrap', rowGap: 1 }}\n avatar={\n hideAvatar ?\n <></>\n : <Avatar sx={{ bgcolor: (theme: Theme) => theme.palette.primary.main }} aria-label={activePlugin?.name}>\n {activePlugin?.name?.charAt(0)}\n </Avatar>\n }\n action={\n <FlexRow flexWrap=\"wrap\" columnGap={0.5}>\n {timestamp ?\n hideTimestamp && hideRefreshButton ?\n ''\n : <Chip\n avatar={hideRefreshButton ? <></> : <RefreshIcon />}\n clickable={hideRefreshButton ? false : true}\n onClick={refreshHuri}\n label={hideTimestamp ? '' : `${timestampLabel} ${new Date(timestamp).toLocaleString()}`}\n />\n\n : null}\n {/* Huri case is valid as long as the only menu item is JSON */}\n {hideCardActions || huri === undefined ? null : <EmbedMenu />}\n </FlexRow>\n }\n title={hideTitle ? '' : activePlugin?.name}\n />\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { EmbedPluginState } from './State'\n\nexport const EmbedPluginContext = createContextEx<EmbedPluginState>()\n","import { WithChildren } from '@xylabs/react-shared'\nimport { PayloadRenderPlugin } from '@xyo-network/react-payload-plugin'\nimport { useEffect, useState } from 'react'\n\nimport { EmbedPluginContext } from './Context'\nimport { EmbedPluginBase } from './State'\n\nexport type EmbedPluginProviderProps = EmbedPluginBase\n\n/** Expose passed embed plugin props via context */\nexport const EmbedPluginProvider: React.FC<WithChildren<EmbedPluginProviderProps>> = ({\n children,\n refreshTitle,\n timestampLabel,\n hideElementsConfig,\n plugins,\n embedPluginConfig,\n}) => {\n const [activePlugin, setActivePlugin] = useState<PayloadRenderPlugin | undefined>(plugins ? plugins[0] : undefined)\n\n useEffect(() => {\n setActivePlugin(plugins ? plugins[0] : undefined)\n }, [plugins])\n\n return (\n <EmbedPluginContext.Provider\n value={{\n activePlugin,\n embedPluginConfig,\n hideElementsConfig,\n provided: true,\n refreshTitle,\n setActivePlugin,\n timestampLabel,\n }}\n >\n {children}\n </EmbedPluginContext.Provider>\n )\n}\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { EmbedPluginContext } from './Context'\n\nexport const useEmbedPluginState = () => useContextEx(EmbedPluginContext, 'EmbedPlugin', true)\n","import { WithChildren } from '@xylabs/react-shared'\nimport { useState } from 'react'\n\nimport { RefreshPayloadContext } from './Context'\n\nexport interface RefreshPayloadProps {\n onRefresh?: () => void\n refreshPayload?: boolean\n}\n\nexport const RefreshPayloadProvider: React.FC<WithChildren<RefreshPayloadProps>> = ({ children, onRefresh, refreshPayload }) => {\n const [localRefreshPayload, setRefreshPayload] = useState(refreshPayload)\n\n return (\n <RefreshPayloadContext.Provider value={{ onRefresh, provided: true, refreshPayload: localRefreshPayload, setRefreshPayload }}>\n {children}\n </RefreshPayloadContext.Provider>\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { RefreshPayloadState } from './State'\n\nexport const RefreshPayloadContext = createContextEx<RefreshPayloadState>()\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { RefreshPayloadContext } from './Context'\n\nexport const useRefreshPayload = () => useContextEx(RefreshPayloadContext, 'RefreshPayload', true)\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadState } from './State'\n\nexport const ResolvePayloadContext = createContextEx<ResolvePayloadState>()\n","import { delay } from '@xylabs/delay'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { Huri } from '@xyo-network/huri'\nimport { ModuleError, ModuleErrorSchema, Payload } from '@xyo-network/payload-model'\nimport { useEffect, useState } from 'react'\n\nimport { useRefreshPayload } from '../RefreshPayloadContext'\nimport { ResolvePayloadContext } from './Context'\nimport { ResolvePayloadState } from './State'\n\nexport type ResolvePayloadProviderProps = Omit<ResolvePayloadState, 'provided'>\n\nexport const ResolvePayloadProvider: React.FC<WithChildren<ResolvePayloadProviderProps>> = ({ children, huriPayload }) => {\n const [payload, setPayload] = useState<Payload>()\n const [huri, setHuri] = useState<string>()\n const { refreshPayload, setRefreshPayload, onRefresh } = useRefreshPayload()\n\n useEffect(() => {\n typeof huriPayload === 'string' ? setHuri(huriPayload) : undefined\n if (typeof huriPayload === 'object') {\n setPayload(huriPayload)\n setRefreshPayload?.(true)\n }\n }, [huriPayload, setRefreshPayload])\n\n const [notFound, setNotFound] = useState<boolean>()\n const [huriError, setHuriError] = useState<ModuleError>()\n\n useAsyncEffect(\n // eslint-disable-next-line react-hooks/exhaustive-deps\n async (mounted) => {\n if (huri && !refreshPayload) {\n try {\n const huriInstance = new Huri(huri)\n const result = await huriInstance.fetch()\n // ensure the busy state can stay for a moment to avoid flashing too quickly\n await delay(500)\n\n if (mounted()) {\n setNotFound(result === null)\n setPayload(result)\n setRefreshPayload?.(true)\n }\n } catch (e) {\n const error = e as Error\n setHuriError({ message: error.message, schema: ModuleErrorSchema, sources: [] })\n }\n }\n },\n [huri, payload, refreshPayload, setRefreshPayload],\n )\n\n const refreshHuri = () => {\n onRefresh?.()\n if (huri) {\n setRefreshPayload?.(false)\n }\n }\n\n return (\n <ResolvePayloadContext.Provider value={{ huri, huriError, notFound, payload, provided: true, refreshHuri, setPayload }}>\n {children}\n </ResolvePayloadContext.Provider>\n )\n}\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadContext } from './Context'\n\nexport const useResolvePayload = () => useContextEx(ResolvePayloadContext, 'ResolvePayload', true)\n","import { Chip } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { SchemaCache, SchemaNameToValidatorMap } from '@xyo-network/schema-cache'\nimport { useState } from 'react'\n\nimport { useResolvePayload } from '../ResolvePayloadContext'\nimport { ValidatePayloadContext } from './Context'\n\nexport interface ValidatePayloadProviderProps {\n // Opt-in flag to validate payloads for the plugin(s)\n enabled?: boolean\n}\n\nexport const ValidatePayloadProvider: React.FC<WithChildren<ValidatePayloadProviderProps>> = ({ children, enabled = false }) => {\n const { payload } = useResolvePayload()\n const [initialized, setInitialized] = useState(false)\n const [valid, setValid] = useState<boolean>()\n\n useAsyncEffect(\n // eslint-disable-next-line react-hooks/exhaustive-deps\n async () => {\n if (payload && enabled) {\n await SchemaCache.instance.get(payload.schema)\n\n const possibleKnownSchema = payload.schema as keyof SchemaNameToValidatorMap\n\n if (SchemaCache.instance.validators[possibleKnownSchema]) {\n const validator = SchemaCache.instance.validators[possibleKnownSchema]\n setValid(validator?.(payload))\n }\n setInitialized(true)\n }\n },\n [payload, enabled],\n )\n\n return (\n <ValidatePayloadContext.Provider value={{ enabled, provided: true, schema: payload?.schema, validPayload: valid }}>\n {enabled ?\n <>{initialized ? children : <Chip label=\"Validating Payload...\" />}</>\n : children}\n </ValidatePayloadContext.Provider>\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { ValidatePayloadState } from './State'\n\nexport const ValidatePayloadContext = createContextEx<ValidatePayloadState>()\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { ValidatePayloadContext } from './Context'\n\nexport const useValidatePayload = () => useContextEx(ValidatePayloadContext, 'ValidateSchema', true)\n","import { MoreVert as MoreVertIcon } from '@mui/icons-material'\nimport { IconButton, IconButtonProps, Menu } from '@mui/material'\nimport { useState } from 'react'\n\nimport { JsonMenuItem } from './JsonMenuItem'\n\nexport const EmbedMenu: React.FC<IconButtonProps> = (props) => {\n // TODO - link to explore website\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null)\n const open = Boolean(anchorEl)\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget)\n }\n const handleClose = () => {\n setAnchorEl(null)\n }\n\n return (\n <>\n <IconButton onClick={handleClick} {...props}>\n <MoreVertIcon />\n </IconButton>\n <Menu anchorEl={anchorEl} open={open} onClose={handleClose} PaperProps={{ variant: 'elevation' }} MenuListProps={{ dense: true }}>\n <JsonMenuItem />\n </Menu>\n </>\n )\n}\n","import { OpenInNew as OpenInNewIcon } from '@mui/icons-material'\nimport { ListItemIcon, ListItemText, MenuItem, MenuItemProps } from '@mui/material'\n\nimport { useResolvePayload } from '../../../contexts'\n\nexport const JsonMenuItem: React.FC<MenuItemProps> = (props) => {\n const { huri } = useResolvePayload()\n\n return (\n <>\n {huri ?\n <MenuItem title=\"Source Payload JSON\" onClick={() => window.open(huri, '_blank')} {...props}>\n <ListItemText sx={{ mr: 1 }}>JSON</ListItemText>\n <ListItemIcon sx={{ justifyContent: 'end' }}>\n <OpenInNewIcon fontSize=\"small\" />\n </ListItemIcon>\n </MenuItem>\n : null}\n </>\n )\n}\n","import { CardContent } from '@mui/material'\nimport { FlexGrowRow } from '@xylabs/react-flexbox'\nimport { useListMode } from '@xyo-network/react-shared'\n\nimport { useEmbedPluginState, useResolvePayload } from '../../../contexts'\nimport { EmbedRenderSelect, ListModeSelectFormControl } from '../../controls'\nimport { BusyCard, BusyCardProps } from './BusyCard'\nimport { EmbedCardHeader } from './EmbedCardHeader'\n\nexport const EmbedPluginCard: React.FC<BusyCardProps> = ({ ...props }) => {\n const { payload } = useResolvePayload()\n const { activePlugin: ActivePlugin, plugins, hideElementsConfig } = useEmbedPluginState()\n const { listMode } = useListMode()\n const supportsListMode = ActivePlugin?.components?.box?.listModes?.length ?? 0 > 1\n\n return (\n <BusyCard {...props}>\n {hideElementsConfig?.hideCardHeader ? null : <EmbedCardHeader />}\n {/* Only show the row if the children are present */}\n {(plugins && plugins.length > 0) || supportsListMode ?\n <FlexGrowRow columnGap={2} rowGap={2} flexWrap=\"wrap\" pb={1}>\n {plugins && plugins.length > 1 ?\n <EmbedRenderSelect />\n : null}\n {supportsListMode ?\n <ListModeSelectFormControl />\n : null}\n </FlexGrowRow>\n : null}\n <CardContent sx={{ height: '100%' }}>\n {ActivePlugin ?\n <ActivePlugin.components.box.detailsBox payload={payload} {...(supportsListMode && { listMode })} />\n : null}\n </CardContent>\n </BusyCard>\n )\n}\n","import { FormControl, FormControlProps, InputLabel } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\ninterface EmbedFormControlProps extends FormControlProps {\n formId?: string\n formLabel?: string\n}\n\nexport const EmbedFormControl: React.FC<WithChildren<EmbedFormControlProps>> = ({ formId, formLabel, children, ...props }) => {\n return (\n <FormControl {...props}>\n <InputLabel id={formId}>{formLabel}</InputLabel>\n {children}\n </FormControl>\n )\n}\n","import { MenuItem } from '@mui/material'\nimport { SelectEx, SelectExProps } from '@xylabs/react-select'\nimport { ListMode, useListMode } from '@xyo-network/react-shared'\n\nimport { EmbedFormControl } from './EmbedFormControl'\n\nconst listModeSelectId = 'listmode-select-id'\nconst listModeSelectLabel = 'List Mode'\n\nexport const ListModeSelect: React.FC<SelectExProps<ListMode>> = (props) => {\n const { listMode, setListMode } = useListMode()\n\n return (\n <SelectEx<ListMode>\n value={(listMode ?? 'default') as ListMode}\n onChange={(event) => {\n setListMode?.(event.target.value as ListMode)\n }}\n {...props}\n >\n <MenuItem key=\"default\" value=\"default\">\n Default\n </MenuItem>\n <MenuItem key=\"table\" value=\"table\">\n Table\n </MenuItem>\n <MenuItem key=\"grid\" value=\"grid\">\n Grid\n </MenuItem>\n </SelectEx>\n )\n}\n\nexport const ListModeSelectFormControl: React.FC<SelectExProps<ListMode>> = (props) => {\n return (\n <EmbedFormControl formId={listModeSelectId} formLabel={listModeSelectLabel}>\n <ListModeSelect size=\"small\" label={listModeSelectLabel} labelId={listModeSelectId} {...props} />\n </EmbedFormControl>\n )\n}\n","import { MenuItem } from '@mui/material'\nimport { SelectEx, SelectExProps } from '@xylabs/react-select'\n\nimport { useEmbedPluginState } from '../../contexts'\nimport { EmbedFormControl } from './EmbedFormControl'\n\nconst renderSelectId = 'render-select-id'\nconst renderSelectLabel = 'Renderer'\n\nexport const EmbedRenderSelect: React.FC<SelectExProps<string>> = (props) => {\n const { activePlugin, setActivePlugin, plugins } = useEmbedPluginState()\n return (\n <EmbedFormControl formId={renderSelectId} formLabel={renderSelectLabel}>\n <SelectEx size=\"small\" value={activePlugin?.name} {...props}>\n {plugins?.map((plugin) => (\n <MenuItem value={plugin.name} key={plugin.name} onClick={() => setActivePlugin?.(plugin)}>\n {plugin.name}\n </MenuItem>\n ))}\n </SelectEx>\n </EmbedFormControl>\n )\n}\n","import { useTheme } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\nimport { useRefreshPayload, useResolvePayload } from '../../contexts'\nimport { EmbedPluginProps } from '../../types'\nimport { EmbedPluginInner } from '../EmbedPlugin'\nimport { BusyCardProps, EmbedPluginCard } from './card'\nimport { EmbedCardApiErrorRenderer } from './error-handling'\n\nexport interface EmbedPluginCardProps extends WithChildren, EmbedPluginProps, BusyCardProps {}\n\nexport const ApiEmbedPluginCard: React.FC<EmbedPluginCardProps> = ({ children, ...props }) => {\n const {\n validateSchema,\n plugins = [],\n huriPayload,\n refreshTitle = '',\n timestampLabel = 'Data From',\n hideElementsConfig,\n embedPluginConfig,\n onRefresh,\n ...busyCardProps\n } = props\n\n return (\n <EmbedPluginInner\n {...{\n embedPluginConfig,\n hideElementsConfig,\n huriPayload,\n onRefresh,\n plugins,\n refreshTitle,\n timestampLabel,\n validateSchema,\n }}\n >\n <EmbedPluginCardInner {...busyCardProps} />\n {children}\n </EmbedPluginInner>\n )\n}\n\nexport const EmbedPluginCardInner: React.FC<BusyCardProps> = (props) => {\n const { payload, huriError } = useResolvePayload()\n const { refreshPayload } = useRefreshPayload()\n const theme = useTheme()\n\n return (\n <EmbedCardApiErrorRenderer xyoError={huriError}>\n <EmbedPluginCard\n elevation={3}\n variant=\"elevation\"\n busy={Boolean(!refreshPayload && payload)}\n busyVariantProps={{ style: { alignItems: 'start', paddingTop: theme.spacing(2), zIndex: 2 } }}\n sx={{ position: 'relative' }}\n {...props}\n />\n </EmbedCardApiErrorRenderer>\n )\n}\n\n/** @deprecated - use EmbedPluginCard and use CardProps instead of FlexBoxProps */\n\nexport { EmbedPluginCard as EmbedPlugin } from './card'\n","import { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { ErrorBoundary, ListModeProvider } from '@xyo-network/react-shared'\n\nimport { EmbedPluginProvider, RefreshPayloadProvider, ResolvePayloadProvider, ValidatePayloadProvider } from '../contexts'\nimport { EmbedPluginProps } from '../types'\nimport { EmbedResolver } from './EmbedResolver'\nimport { ValidatePayloadAlert, ValidatePluginsAlert } from './validation-alerts'\n\nexport const EmbedPluginInner: React.FC<WithChildren<EmbedPluginProps>> = ({\n validateSchema,\n plugins = [],\n huriPayload,\n refreshTitle = '',\n timestampLabel = 'Data From',\n hideElementsConfig,\n embedPluginConfig,\n onRefresh,\n children,\n}) => {\n return (\n <ErrorBoundary>\n <EmbedPluginProvider\n refreshTitle={refreshTitle}\n timestampLabel={timestampLabel}\n hideElementsConfig={hideElementsConfig}\n plugins={plugins}\n embedPluginConfig={embedPluginConfig}\n >\n <WithResolvers onRefresh={onRefresh} huriPayload={huriPayload}>\n <WithValidators validateSchema={validateSchema}>\n <ListModeProvider defaultListMode={embedPluginConfig?.listMode}>{children}</ListModeProvider>\n </WithValidators>\n </WithResolvers>\n </EmbedPluginProvider>\n </ErrorBoundary>\n )\n}\n\ninterface WithResolversProps extends Pick<EmbedPluginProps, 'onRefresh' | 'huriPayload'>, FlexBoxProps {}\n\nconst WithResolvers: React.FC<WithChildren<WithResolversProps>> = ({ children, onRefresh, huriPayload }) => {\n return (\n <RefreshPayloadProvider onRefresh={onRefresh}>\n <ResolvePayloadProvider huriPayload={huriPayload}>\n <EmbedResolver>{children}</EmbedResolver>\n </ResolvePayloadProvider>\n </RefreshPayloadProvider>\n )\n}\n\nconst WithValidators: React.FC<WithChildren<{ validateSchema?: boolean }>> = ({ children, validateSchema }) => {\n return (\n <ValidatePayloadProvider enabled={validateSchema}>\n <ValidatePluginsAlert>\n <ValidatePayloadAlert>{children}</ValidatePayloadAlert>\n </ValidatePluginsAlert>\n </ValidatePayloadProvider>\n )\n}\n","import { WithChildren } from '@xylabs/react-shared'\nimport { LoadResult } from '@xyo-network/react-shared'\n\nimport { useResolvePayload } from '../contexts'\n\nexport const EmbedResolver: React.FC<WithChildren> = ({ children }) => {\n const { payload, notFound, huriError } = useResolvePayload()\n\n return (\n <LoadResult searchResult={payload} notFound={!!notFound} error={!!huriError}>\n {children}\n </LoadResult>\n )\n}\n","import { Alert, AlertProps } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\nimport { useValidatePayload } from '../../contexts'\n\nexport const ValidatePayloadAlert: React.FC<WithChildren<AlertProps>> = ({ children, ...props }) => {\n const { validPayload, enabled, schema } = useValidatePayload()\n\n if (enabled && validPayload === false) {\n return (\n <Alert severity=\"error\" title=\"Invalid Payload!\" {...props}>\n Payload schema claimed to be {schema} but failed to validate.\n </Alert>\n )\n }\n\n return <>{children}</>\n}\n","import { Alert, AlertProps, AlertTitle } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\nimport { useEmbedPluginState, useResolvePayload } from '../../contexts'\n\nexport const ValidatePluginsAlert: React.FC<WithChildren<AlertProps>> = ({ children, ...props }) => {\n const { payload } = useResolvePayload()\n const { plugins } = useEmbedPluginState()\n\n if (payload && plugins?.length === 0) {\n return (\n <Alert severity=\"warning\" {...props}>\n <AlertTitle>Missing plugins!</AlertTitle>Payload found but no plugins were present.\n </Alert>\n )\n }\n\n return <>{children}</>\n}\n","import { CardProps } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { ModuleError } from '@xyo-network/payload-model'\nimport { ErrorAlert, ErrorRender } from '@xyo-network/react-error'\n\nimport { EmbedErrorCard } from './EmbedErrorCard'\n\ninterface EmbedCardApiErrorRendererProps extends CardProps {\n xyoError?: ModuleError\n}\n\nexport const EmbedCardApiErrorRenderer: React.FC<WithChildren<EmbedCardApiErrorRendererProps>> = ({ xyoError, children, ...props }) => {\n return (\n <ErrorRender error={xyoError} noReAuth noErrorDisplay customError={<CustomApiErrorCard xyoError={xyoError} {...props} />}>\n {children}\n </ErrorRender>\n )\n}\n\nconst CustomApiErrorCard: React.FC<EmbedCardApiErrorRendererProps> = ({ xyoError, ...props }) => {\n return (\n <EmbedErrorCard {...props}>\n <ErrorAlert error={xyoError} />\n </EmbedErrorCard>\n )\n}\n","import { Alert, AlertProps, AlertTitle, Card, CardContent, CardProps, Typography } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\ninterface EmbedErrorCardBaseProps {\n alertProps?: AlertProps\n error?: Error\n hideErrorDetails?: boolean\n}\n\ninterface EmbedErrorCardProps extends EmbedErrorCardBaseProps, CardProps {\n alertProps?: AlertProps\n error?: Error\n}\n\nexport const EmbedErrorCard: React.FC<WithChildren<EmbedErrorCardProps>> = (props) => {\n const { alertProps, error, hideErrorDetails = true, children, ...cardProps } = props\n const errorProps = { alertProps, error, hideErrorDetails }\n return (\n <Card {...cardProps}>\n <CardContent>{children ?? <DefaultErrorAlert {...errorProps} />}</CardContent>\n </Card>\n )\n}\n\nconst DefaultErrorAlert: React.FC<EmbedErrorCardBaseProps> = ({ alertProps, hideErrorDetails, error }) => {\n return (\n <Alert severity=\"error\" {...alertProps}>\n <AlertTitle>Whoops! Something went wrong</AlertTitle>\n {!hideErrorDetails && error ?\n <>\n <Typography variant=\"caption\">Error: </Typography>\n <Typography variant=\"caption\">{error?.message}</Typography>\n </>\n : <Typography variant=\"caption\" fontSize=\"small\">\n Error Loading Plugin\n </Typography>\n }\n </Alert>\n )\n}\n"],"mappings":"AAAA,OAAS,QAAAA,OAAuB,gBAChC,OAAS,iBAAAC,OAAqB,wBAC9B,OACE,wBAAAC,GAEA,sBAAAC,OAIK,uBAmBH,OAGI,OAAAC,EAHJ,QAAAC,OAAA,oBAVG,IAAMC,EAAkD,CAAC,CAC9D,KAAAC,EACA,YAAAC,EAAc,IACd,YAAAC,EAAc,WACd,iBAAAC,EACA,SAAAC,EACA,GAAGC,CACL,IAAM,CACJ,IAAMC,EAAeZ,GAAcM,EAAMC,CAAW,EACpD,OACEH,GAACL,GAAA,CAAM,GAAGY,EACP,UAAAD,EACAF,IAAgB,YAAcI,EAC7BT,EAACF,GAAA,CAAsB,GAAIQ,EAAgD,EAC3E,KACDD,IAAgB,UAAYI,EAC3BT,EAACD,GAAA,CAAoB,GAAIO,EAA8C,EACvE,MACJ,CAEJ,ECtCA,OAAS,WAAWI,OAAmB,sBACvC,OAAS,UAAAC,GAAQ,cAAAC,GAA6B,QAAAC,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CAAe,EAAIC,EAAkB,EACvCC,EAAQC,GAAS,EAEvB,OACEtB,EAACuB,GAAA,CAA0B,SAAUN,EACnC,SAAAjB,EAACwB,EAAA,CACC,UAAW,EACX,QAAQ,YACR,KAAM,GAAQ,CAACL,GAAkBH,GACjC,iBAAkB,CAAE,MAAO,CAAE,WAAY,QAAS,WAAYK,EAAM,QAAQ,CAAC,EAAG,OAAQ,CAAE,CAAE,EAC5F,GAAI,CAAE,SAAU,UAAW,EAC1B,GAAGjB,EACN,EACF,CAEJ","names":["Card","useBusyTiming","BusyCircularProgress","BusyLinearProgress","jsx","jsxs","BusyCard","busy","busyMinimum","busyVariant","busyVariantProps","children","props","internalBusy","RefreshIcon","Avatar","CardHeader","Chip","FlexRow","createContextEx","EmbedPluginContext","useEffect","useState","jsx","EmbedPluginProvider","children","refreshTitle","timestampLabel","hideElementsConfig","plugins","embedPluginConfig","activePlugin","setActivePlugin","useState","useEffect","EmbedPluginContext","useContextEx","useEmbedPluginState","useContextEx","EmbedPluginContext","useState","createContextEx","RefreshPayloadContext","jsx","RefreshPayloadProvider","children","onRefresh","refreshPayload","localRefreshPayload","setRefreshPayload","useState","RefreshPayloadContext","useContextEx","useRefreshPayload","useContextEx","RefreshPayloadContext","createContextEx","ResolvePayloadContext","delay","useAsyncEffect","Huri","ModuleErrorSchema","useEffect","useState","jsx","ResolvePayloadProvider","children","huriPayload","payload","setPayload","useState","huri","setHuri","refreshPayload","setRefreshPayload","onRefresh","useRefreshPayload","useEffect","notFound","setNotFound","huriError","setHuriError","useAsyncEffect","mounted","result","Huri","delay","e","ModuleErrorSchema","refreshHuri","ResolvePayloadContext","useContextEx","useResolvePayload","useContextEx","ResolvePayloadContext","Chip","useAsyncEffect","SchemaCache","useState","createContextEx","ValidatePayloadContext","Fragment","jsx","ValidatePayloadProvider","children","enabled","payload","useResolvePayload","initialized","setInitialized","useState","valid","setValid","useAsyncEffect","SchemaCache","possibleKnownSchema","validator","ValidatePayloadContext","Chip","useContextEx","useValidatePayload","useContextEx","ValidatePayloadContext","MoreVertIcon","IconButton","Menu","useState","OpenInNewIcon","ListItemIcon","ListItemText","MenuItem","Fragment","jsx","jsxs","JsonMenuItem","props","huri","useResolvePayload","MenuItem","ListItemText","ListItemIcon","OpenInNewIcon","Fragment","jsx","jsxs","EmbedMenu","props","anchorEl","setAnchorEl","useState","open","handleClick","event","handleClose","IconButton","MoreVertIcon","Menu","JsonMenuItem","Fragment","jsx","jsxs","EmbedCardHeader","_a","refreshHuri","huri","useResolvePayload","activePlugin","timestampLabel","hideElementsConfig","useEmbedPluginState","hideAvatar","hideTitle","hideRefreshButton","hideTimestamp","hideCardActions","timestamp","CardHeader","Avatar","theme","FlexRow","Chip","RefreshIcon","EmbedMenu","CardContent","FlexGrowRow","useListMode","FormControl","InputLabel","jsx","jsxs","EmbedFormControl","formId","formLabel","children","props","MenuItem","SelectEx","useListMode","jsx","jsxs","listModeSelectId","listModeSelectLabel","ListModeSelect","props","listMode","setListMode","useListMode","SelectEx","event","MenuItem","ListModeSelectFormControl","EmbedFormControl","MenuItem","SelectEx","jsx","renderSelectId","renderSelectLabel","EmbedRenderSelect","props","activePlugin","setActivePlugin","plugins","useEmbedPluginState","EmbedFormControl","SelectEx","plugin","MenuItem","jsx","jsxs","EmbedPluginCard","props","_a","_b","_c","payload","useResolvePayload","ActivePlugin","plugins","hideElementsConfig","useEmbedPluginState","listMode","useListMode","supportsListMode","BusyCard","EmbedCardHeader","FlexGrowRow","EmbedRenderSelect","ListModeSelectFormControl","CardContent","useTheme","ErrorBoundary","ListModeProvider","LoadResult","jsx","EmbedResolver","children","payload","notFound","huriError","useResolvePayload","LoadResult","Alert","Fragment","jsx","jsxs","ValidatePayloadAlert","children","props","validPayload","enabled","schema","useValidatePayload","Alert","Alert","AlertTitle","Fragment","jsx","jsxs","ValidatePluginsAlert","children","props","payload","useResolvePayload","plugins","useEmbedPluginState","Alert","AlertTitle","jsx","EmbedPluginInner","validateSchema","plugins","huriPayload","refreshTitle","timestampLabel","hideElementsConfig","embedPluginConfig","onRefresh","children","ErrorBoundary","EmbedPluginProvider","WithResolvers","WithValidators","ListModeProvider","RefreshPayloadProvider","ResolvePayloadProvider","EmbedResolver","ValidatePayloadProvider","ValidatePluginsAlert","ValidatePayloadAlert","ErrorAlert","ErrorRender","Alert","AlertTitle","Card","CardContent","Typography","Fragment","jsx","jsxs","EmbedErrorCard","props","alertProps","error","hideErrorDetails","children","cardProps","DefaultErrorAlert","jsx","EmbedCardApiErrorRenderer","xyoError","children","props","ErrorRender","CustomApiErrorCard","EmbedErrorCard","ErrorAlert","jsx","jsxs","ApiEmbedPluginCard","children","props","validateSchema","plugins","huriPayload","refreshTitle","timestampLabel","hideElementsConfig","embedPluginConfig","onRefresh","busyCardProps","EmbedPluginInner","EmbedPluginCardInner","payload","huriError","useResolvePayload","refreshPayload","useRefreshPayload","theme","useTheme","EmbedCardApiErrorRenderer","EmbedPluginCard"]}
|
1
|
+
{"version":3,"sources":["../../src/components/embed-card/card/BusyCard.tsx","../../src/components/embed-card/card/EmbedCardHeader.tsx","../../src/contexts/EmbedPluginContext/Context.tsx","../../src/contexts/EmbedPluginContext/Provider.tsx","../../src/contexts/EmbedPluginContext/use.tsx","../../src/contexts/RefreshPayloadContext/Provider.tsx","../../src/contexts/RefreshPayloadContext/Context.tsx","../../src/contexts/RefreshPayloadContext/use.tsx","../../src/contexts/ResolvePayloadContext/Context.ts","../../src/contexts/ResolvePayloadContext/Provider.tsx","../../src/contexts/ResolvePayloadContext/use.tsx","../../src/contexts/ValidatePayloadContext/Provider.tsx","../../src/contexts/ValidatePayloadContext/Context.ts","../../src/contexts/ValidatePayloadContext/use.tsx","../../src/components/embed-card/menu/EmbedMenu.tsx","../../src/components/embed-card/menu/JsonMenuItem.tsx","../../src/components/embed-card/card/EmbedPluginCard.tsx","../../src/components/controls/EmbedFormControl.tsx","../../src/components/controls/ListModeSelect.tsx","../../src/components/controls/RenderSelect.tsx","../../src/components/embed-card/EmbedPluginCard.tsx","../../src/components/EmbedPlugin.tsx","../../src/components/EmbedResolver.tsx","../../src/components/validation-alerts/ValidatePayload.tsx","../../src/components/validation-alerts/ValidatePlugins.tsx","../../src/components/embed-card/error-handling/EmbedCardApiErrorRenderer.tsx","../../src/components/embed-card/error-handling/EmbedErrorCard.tsx"],"sourcesContent":["import { Card, CardProps } from '@mui/material'\nimport { useBusyTiming } from '@xylabs/react-flexbox'\nimport {\n BusyCircularProgress,\n BusyCircularProgressProps,\n BusyLinearProgress,\n BusyLinearProgressProps,\n BusyVariant,\n WithChildren,\n} from '@xylabs/react-shared'\n\nexport interface BusyCardProps extends CardProps {\n busy?: boolean\n busyMinimum?: number\n busyVariant?: BusyVariant\n busyVariantProps?: BusyCircularProgressProps | BusyLinearProgressProps\n}\n\nexport const BusyCard: React.FC<WithChildren<BusyCardProps>> = ({\n busy,\n busyMinimum = 500,\n busyVariant = 'circular',\n busyVariantProps,\n children,\n ...props\n}) => {\n const internalBusy = useBusyTiming(busy, busyMinimum)\n return (\n <Card {...props}>\n {children}\n {busyVariant === 'circular' && internalBusy ?\n <BusyCircularProgress {...(busyVariantProps as BusyCircularProgressProps)} />\n : null}\n {busyVariant === 'linear' && internalBusy ?\n <BusyLinearProgress {...(busyVariantProps as BusyLinearProgressProps)} />\n : null}\n </Card>\n )\n}\n","import { Refresh as RefreshIcon } from '@mui/icons-material'\nimport { Avatar, CardHeader, CardHeaderProps, Chip, Theme } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\n\nimport { useEmbedPluginState, useResolvePayload } from '../../../contexts'\nimport { EmbedMenu } from '../menu'\n\nexport const EmbedCardHeader: React.FC<CardHeaderProps> = () => {\n const { refreshHuri, huri } = useResolvePayload()\n const { activePlugin, timestampLabel, hideElementsConfig } = useEmbedPluginState()\n const { hideAvatar, hideTitle, hideRefreshButton, hideTimestamp, hideCardActions } = hideElementsConfig ?? {}\n //this is temporary so that we can add the ability to get a timestamp via diviner later\n const timestamp = Date.now()\n return (\n <CardHeader\n sx={{ flexWrap: 'wrap', rowGap: 1 }}\n avatar={\n hideAvatar ?\n <></>\n : <Avatar sx={{ bgcolor: (theme: Theme) => theme.palette.primary.main }} aria-label={activePlugin?.name}>\n {activePlugin?.name?.charAt(0)}\n </Avatar>\n }\n action={\n <FlexRow flexWrap=\"wrap\" columnGap={0.5}>\n {timestamp ?\n hideTimestamp && hideRefreshButton ?\n ''\n : <Chip\n avatar={hideRefreshButton ? <></> : <RefreshIcon />}\n clickable={hideRefreshButton ? false : true}\n onClick={refreshHuri}\n label={hideTimestamp ? '' : `${timestampLabel} ${new Date(timestamp).toLocaleString()}`}\n />\n\n : null}\n {/* Huri case is valid as long as the only menu item is JSON */}\n {hideCardActions || huri === undefined ? null : <EmbedMenu />}\n </FlexRow>\n }\n title={hideTitle ? '' : activePlugin?.name}\n />\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { EmbedPluginState } from './State'\n\nexport const EmbedPluginContext = createContextEx<EmbedPluginState>()\n","import { WithChildren } from '@xylabs/react-shared'\nimport { PayloadRenderPlugin } from '@xyo-network/react-payload-plugin'\nimport { useEffect, useState } from 'react'\n\nimport { EmbedPluginContext } from './Context'\nimport { EmbedPluginBase } from './State'\n\nexport type EmbedPluginProviderProps = EmbedPluginBase\n\n/** Expose passed embed plugin props via context */\nexport const EmbedPluginProvider: React.FC<WithChildren<EmbedPluginProviderProps>> = ({\n children,\n refreshTitle,\n timestampLabel,\n hideElementsConfig,\n plugins,\n embedPluginConfig,\n}) => {\n const [activePlugin, setActivePlugin] = useState<PayloadRenderPlugin | undefined>(plugins ? plugins[0] : undefined)\n\n useEffect(() => {\n setActivePlugin(plugins ? plugins[0] : undefined)\n }, [plugins])\n\n return (\n <EmbedPluginContext.Provider\n value={{\n activePlugin,\n embedPluginConfig,\n hideElementsConfig,\n provided: true,\n refreshTitle,\n setActivePlugin,\n timestampLabel,\n }}\n >\n {children}\n </EmbedPluginContext.Provider>\n )\n}\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { EmbedPluginContext } from './Context'\n\nexport const useEmbedPluginState = () => useContextEx(EmbedPluginContext, 'EmbedPlugin', true)\n","import { WithChildren } from '@xylabs/react-shared'\nimport { useState } from 'react'\n\nimport { RefreshPayloadContext } from './Context'\n\nexport interface RefreshPayloadProps {\n onRefresh?: () => void\n refreshPayload?: boolean\n}\n\nexport const RefreshPayloadProvider: React.FC<WithChildren<RefreshPayloadProps>> = ({ children, onRefresh, refreshPayload }) => {\n const [localRefreshPayload, setRefreshPayload] = useState(refreshPayload)\n\n return (\n <RefreshPayloadContext.Provider value={{ onRefresh, provided: true, refreshPayload: localRefreshPayload, setRefreshPayload }}>\n {children}\n </RefreshPayloadContext.Provider>\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { RefreshPayloadState } from './State'\n\nexport const RefreshPayloadContext = createContextEx<RefreshPayloadState>()\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { RefreshPayloadContext } from './Context'\n\nexport const useRefreshPayload = () => useContextEx(RefreshPayloadContext, 'RefreshPayload', true)\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadState } from './State'\n\nexport const ResolvePayloadContext = createContextEx<ResolvePayloadState>()\n","import { delay } from '@xylabs/delay'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { Huri } from '@xyo-network/huri'\nimport { ModuleError, ModuleErrorSchema, Payload } from '@xyo-network/payload-model'\nimport { useEffect, useState } from 'react'\n\nimport { useRefreshPayload } from '../RefreshPayloadContext'\nimport { ResolvePayloadContext } from './Context'\nimport { ResolvePayloadState } from './State'\n\nexport type ResolvePayloadProviderProps = Omit<ResolvePayloadState, 'provided'>\n\nexport const ResolvePayloadProvider: React.FC<WithChildren<ResolvePayloadProviderProps>> = ({ children, huriPayload }) => {\n const [payload, setPayload] = useState<Payload>()\n const [huri, setHuri] = useState<string>()\n const { refreshPayload, setRefreshPayload, onRefresh } = useRefreshPayload()\n\n useEffect(() => {\n typeof huriPayload === 'string' ? setHuri(huriPayload) : undefined\n if (typeof huriPayload === 'object') {\n setPayload(huriPayload)\n setRefreshPayload?.(true)\n }\n }, [huriPayload, setRefreshPayload])\n\n const [notFound, setNotFound] = useState<boolean>()\n const [huriError, setHuriError] = useState<ModuleError>()\n\n useAsyncEffect(\n // eslint-disable-next-line react-hooks/exhaustive-deps\n async (mounted) => {\n if (huri && !refreshPayload) {\n try {\n const huriInstance = new Huri(huri)\n const result = await huriInstance.fetch()\n // ensure the busy state can stay for a moment to avoid flashing too quickly\n await delay(500)\n\n if (mounted()) {\n setNotFound(result === null)\n setPayload(result)\n setRefreshPayload?.(true)\n }\n } catch (e) {\n const error = e as Error\n setHuriError({ message: error.message, schema: ModuleErrorSchema, sources: [] })\n }\n }\n },\n [huri, payload, refreshPayload, setRefreshPayload],\n )\n\n const refreshHuri = () => {\n onRefresh?.()\n if (huri) {\n setRefreshPayload?.(false)\n }\n }\n\n return (\n <ResolvePayloadContext.Provider value={{ huri, huriError, notFound, payload, provided: true, refreshHuri, setPayload }}>\n {children}\n </ResolvePayloadContext.Provider>\n )\n}\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadContext } from './Context'\n\nexport const useResolvePayload = () => useContextEx(ResolvePayloadContext, 'ResolvePayload', true)\n","import { Chip } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { SchemaCache, SchemaNameToValidatorMap } from '@xyo-network/schema-cache'\nimport { useState } from 'react'\n\nimport { useResolvePayload } from '../ResolvePayloadContext'\nimport { ValidatePayloadContext } from './Context'\n\nexport interface ValidatePayloadProviderProps {\n // Opt-in flag to validate payloads for the plugin(s)\n enabled?: boolean\n}\n\nexport const ValidatePayloadProvider: React.FC<WithChildren<ValidatePayloadProviderProps>> = ({ children, enabled = false }) => {\n const { payload } = useResolvePayload()\n const [initialized, setInitialized] = useState(false)\n const [valid, setValid] = useState<boolean>()\n\n useAsyncEffect(\n // eslint-disable-next-line react-hooks/exhaustive-deps\n async () => {\n if (payload && enabled) {\n await SchemaCache.instance.get(payload.schema)\n\n const possibleKnownSchema = payload.schema as keyof SchemaNameToValidatorMap\n\n if (SchemaCache.instance.validators[possibleKnownSchema]) {\n const validator = SchemaCache.instance.validators[possibleKnownSchema]\n setValid(validator?.(payload))\n }\n setInitialized(true)\n }\n },\n [payload, enabled],\n )\n\n return (\n <ValidatePayloadContext.Provider value={{ enabled, provided: true, schema: payload?.schema, validPayload: valid }}>\n {enabled ?\n <>{initialized ? children : <Chip label=\"Validating Payload...\" />}</>\n : children}\n </ValidatePayloadContext.Provider>\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { ValidatePayloadState } from './State'\n\nexport const ValidatePayloadContext = createContextEx<ValidatePayloadState>()\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { ValidatePayloadContext } from './Context'\n\nexport const useValidatePayload = () => useContextEx(ValidatePayloadContext, 'ValidateSchema', true)\n","import { MoreVert as MoreVertIcon } from '@mui/icons-material'\nimport { IconButton, IconButtonProps, Menu } from '@mui/material'\nimport { useState } from 'react'\n\nimport { JsonMenuItem } from './JsonMenuItem'\n\nexport const EmbedMenu: React.FC<IconButtonProps> = (props) => {\n // TODO - link to explore website\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null)\n const open = Boolean(anchorEl)\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget)\n }\n const handleClose = () => {\n setAnchorEl(null)\n }\n\n return (\n <>\n <IconButton onClick={handleClick} {...props}>\n <MoreVertIcon />\n </IconButton>\n <Menu anchorEl={anchorEl} open={open} onClose={handleClose} PaperProps={{ variant: 'elevation' }} MenuListProps={{ dense: true }}>\n <JsonMenuItem />\n </Menu>\n </>\n )\n}\n","import { OpenInNew as OpenInNewIcon } from '@mui/icons-material'\nimport { ListItemIcon, ListItemText, MenuItem, MenuItemProps } from '@mui/material'\n\nimport { useResolvePayload } from '../../../contexts'\n\nexport const JsonMenuItem: React.FC<MenuItemProps> = (props) => {\n const { huri } = useResolvePayload()\n\n return (\n <>\n {huri ?\n <MenuItem title=\"Source Payload JSON\" onClick={() => window.open(huri, '_blank')} {...props}>\n <ListItemText sx={{ mr: 1 }}>JSON</ListItemText>\n <ListItemIcon sx={{ justifyContent: 'end' }}>\n <OpenInNewIcon fontSize=\"small\" />\n </ListItemIcon>\n </MenuItem>\n : null}\n </>\n )\n}\n","import { CardContent } from '@mui/material'\nimport { FlexGrowRow } from '@xylabs/react-flexbox'\nimport { useListMode } from '@xyo-network/react-shared'\n\nimport { useEmbedPluginState, useResolvePayload } from '../../../contexts'\nimport { EmbedRenderSelect, ListModeSelectFormControl } from '../../controls'\nimport { BusyCard, BusyCardProps } from './BusyCard'\nimport { EmbedCardHeader } from './EmbedCardHeader'\n\nexport const EmbedPluginCard: React.FC<BusyCardProps> = ({ ...props }) => {\n const { payload } = useResolvePayload()\n const { activePlugin: ActivePlugin, plugins, hideElementsConfig } = useEmbedPluginState()\n const { listMode } = useListMode()\n const supportsListMode = ActivePlugin?.components?.box?.listModes?.length ?? 0 > 1\n\n return (\n <BusyCard {...props}>\n {hideElementsConfig?.hideCardHeader ? null : <EmbedCardHeader />}\n {/* Only show the row if the children are present */}\n {(plugins && plugins.length > 0) || supportsListMode ?\n <FlexGrowRow columnGap={2} rowGap={2} flexWrap=\"wrap\" pb={1}>\n {plugins && plugins.length > 1 ?\n <EmbedRenderSelect />\n : null}\n {supportsListMode ?\n <ListModeSelectFormControl />\n : null}\n </FlexGrowRow>\n : null}\n <CardContent sx={{ height: '100%' }}>\n {ActivePlugin ?\n <ActivePlugin.components.box.detailsBox payload={payload} {...(supportsListMode && { listMode })} />\n : null}\n </CardContent>\n </BusyCard>\n )\n}\n","import { FormControl, FormControlProps, InputLabel } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\ninterface EmbedFormControlProps extends FormControlProps {\n formId?: string\n formLabel?: string\n}\n\nexport const EmbedFormControl: React.FC<WithChildren<EmbedFormControlProps>> = ({ formId, formLabel, children, ...props }) => {\n return (\n <FormControl {...props}>\n <InputLabel id={formId}>{formLabel}</InputLabel>\n {children}\n </FormControl>\n )\n}\n","import { MenuItem } from '@mui/material'\nimport { SelectEx, SelectExProps } from '@xylabs/react-select'\nimport { ListMode, useListMode } from '@xyo-network/react-shared'\n\nimport { EmbedFormControl } from './EmbedFormControl'\n\nconst listModeSelectId = 'listmode-select-id'\nconst listModeSelectLabel = 'List Mode'\n\nexport const ListModeSelect: React.FC<SelectExProps<ListMode>> = (props) => {\n const { listMode, setListMode } = useListMode()\n\n return (\n <SelectEx<ListMode>\n value={(listMode ?? 'default') as ListMode}\n onChange={(event) => {\n setListMode?.(event.target.value as ListMode)\n }}\n {...props}\n >\n <MenuItem key=\"default\" value=\"default\">\n Default\n </MenuItem>\n <MenuItem key=\"table\" value=\"table\">\n Table\n </MenuItem>\n <MenuItem key=\"grid\" value=\"grid\">\n Grid\n </MenuItem>\n </SelectEx>\n )\n}\n\nexport const ListModeSelectFormControl: React.FC<SelectExProps<ListMode>> = (props) => {\n return (\n <EmbedFormControl formId={listModeSelectId} formLabel={listModeSelectLabel}>\n <ListModeSelect size=\"small\" label={listModeSelectLabel} labelId={listModeSelectId} {...props} />\n </EmbedFormControl>\n )\n}\n","import { MenuItem } from '@mui/material'\nimport { SelectEx, SelectExProps } from '@xylabs/react-select'\n\nimport { useEmbedPluginState } from '../../contexts'\nimport { EmbedFormControl } from './EmbedFormControl'\n\nconst renderSelectId = 'render-select-id'\nconst renderSelectLabel = 'Renderer'\n\nexport const EmbedRenderSelect: React.FC<SelectExProps<string>> = (props) => {\n const { activePlugin, setActivePlugin, plugins } = useEmbedPluginState()\n return (\n <EmbedFormControl formId={renderSelectId} formLabel={renderSelectLabel}>\n <SelectEx size=\"small\" value={activePlugin?.name} {...props}>\n {plugins?.map((plugin) => (\n <MenuItem value={plugin.name} key={plugin.name} onClick={() => setActivePlugin?.(plugin)}>\n {plugin.name}\n </MenuItem>\n ))}\n </SelectEx>\n </EmbedFormControl>\n )\n}\n","import { useTheme } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\nimport { useRefreshPayload, useResolvePayload } from '../../contexts'\nimport { EmbedPluginProps } from '../../types'\nimport { EmbedPluginInner } from '../EmbedPlugin'\nimport { BusyCardProps, EmbedPluginCard } from './card'\nimport { EmbedCardApiErrorRenderer } from './error-handling'\n\nexport interface EmbedPluginCardProps extends WithChildren, EmbedPluginProps, BusyCardProps {}\n\nexport const ApiEmbedPluginCard: React.FC<EmbedPluginCardProps> = ({ children, ...props }) => {\n const {\n validateSchema,\n plugins = [],\n huriPayload,\n refreshTitle = '',\n timestampLabel = 'Data From',\n hideElementsConfig,\n embedPluginConfig,\n onRefresh,\n ...busyCardProps\n } = props\n\n return (\n <EmbedPluginInner\n {...{\n embedPluginConfig,\n hideElementsConfig,\n huriPayload,\n onRefresh,\n plugins,\n refreshTitle,\n timestampLabel,\n validateSchema,\n }}\n >\n <EmbedPluginCardInner {...busyCardProps} />\n {children}\n </EmbedPluginInner>\n )\n}\n\nexport const EmbedPluginCardInner: React.FC<BusyCardProps> = (props) => {\n const { payload, huriError } = useResolvePayload()\n const { refreshPayload } = useRefreshPayload()\n const theme = useTheme()\n\n return (\n <EmbedCardApiErrorRenderer xyoError={huriError}>\n <EmbedPluginCard\n elevation={3}\n variant=\"elevation\"\n busy={Boolean(!refreshPayload && payload)}\n busyVariantProps={{ style: { alignItems: 'start', paddingTop: theme.spacing(2), zIndex: 2 } }}\n sx={{ position: 'relative' }}\n {...props}\n />\n </EmbedCardApiErrorRenderer>\n )\n}\n\n/** @deprecated - use EmbedPluginCard and use CardProps instead of FlexBoxProps */\n\nexport { EmbedPluginCard as EmbedPlugin } from './card'\n","import { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { ErrorBoundary, ListModeProvider } from '@xyo-network/react-shared'\n\nimport { EmbedPluginProvider, RefreshPayloadProvider, ResolvePayloadProvider, ValidatePayloadProvider } from '../contexts'\nimport { EmbedPluginProps } from '../types'\nimport { EmbedResolver } from './EmbedResolver'\nimport { ValidatePayloadAlert, ValidatePluginsAlert } from './validation-alerts'\n\nexport const EmbedPluginInner: React.FC<WithChildren<EmbedPluginProps>> = ({\n validateSchema,\n plugins = [],\n huriPayload,\n refreshTitle = '',\n timestampLabel = 'Data From',\n hideElementsConfig,\n embedPluginConfig,\n onRefresh,\n children,\n}) => {\n return (\n <ErrorBoundary>\n <EmbedPluginProvider\n refreshTitle={refreshTitle}\n timestampLabel={timestampLabel}\n hideElementsConfig={hideElementsConfig}\n plugins={plugins}\n embedPluginConfig={embedPluginConfig}\n >\n <WithResolvers onRefresh={onRefresh} huriPayload={huriPayload}>\n <WithValidators validateSchema={validateSchema}>\n <ListModeProvider defaultListMode={embedPluginConfig?.listMode}>{children}</ListModeProvider>\n </WithValidators>\n </WithResolvers>\n </EmbedPluginProvider>\n </ErrorBoundary>\n )\n}\n\ninterface WithResolversProps extends Pick<EmbedPluginProps, 'onRefresh' | 'huriPayload'>, FlexBoxProps {}\n\nconst WithResolvers: React.FC<WithChildren<WithResolversProps>> = ({ children, onRefresh, huriPayload }) => {\n return (\n <RefreshPayloadProvider onRefresh={onRefresh}>\n <ResolvePayloadProvider huriPayload={huriPayload}>\n <EmbedResolver>{children}</EmbedResolver>\n </ResolvePayloadProvider>\n </RefreshPayloadProvider>\n )\n}\n\nconst WithValidators: React.FC<WithChildren<{ validateSchema?: boolean }>> = ({ children, validateSchema }) => {\n return (\n <ValidatePayloadProvider enabled={validateSchema}>\n <ValidatePluginsAlert>\n <ValidatePayloadAlert>{children}</ValidatePayloadAlert>\n </ValidatePluginsAlert>\n </ValidatePayloadProvider>\n )\n}\n","import { WithChildren } from '@xylabs/react-shared'\nimport { LoadResult } from '@xyo-network/react-shared'\n\nimport { useResolvePayload } from '../contexts'\n\nexport const EmbedResolver: React.FC<WithChildren> = ({ children }) => {\n const { payload, notFound, huriError } = useResolvePayload()\n\n return (\n <LoadResult searchResult={payload} notFound={!!notFound} error={!!huriError}>\n {children}\n </LoadResult>\n )\n}\n","import { Alert, AlertProps } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\nimport { useValidatePayload } from '../../contexts'\n\nexport const ValidatePayloadAlert: React.FC<WithChildren<AlertProps>> = ({ children, ...props }) => {\n const { validPayload, enabled, schema } = useValidatePayload()\n\n if (enabled && validPayload === false) {\n return (\n <Alert severity=\"error\" title=\"Invalid Payload!\" {...props}>\n Payload schema claimed to be {schema} but failed to validate.\n </Alert>\n )\n }\n\n return <>{children}</>\n}\n","import { Alert, AlertProps, AlertTitle } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\nimport { useEmbedPluginState, useResolvePayload } from '../../contexts'\n\nexport const ValidatePluginsAlert: React.FC<WithChildren<AlertProps>> = ({ children, ...props }) => {\n const { payload } = useResolvePayload()\n const { plugins } = useEmbedPluginState()\n\n if (payload && plugins?.length === 0) {\n return (\n <Alert severity=\"warning\" {...props}>\n <AlertTitle>Missing plugins!</AlertTitle>Payload found but no plugins were present.\n </Alert>\n )\n }\n\n return <>{children}</>\n}\n","import { CardProps } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { ModuleError } from '@xyo-network/payload-model'\nimport { ErrorAlert, ErrorRender } from '@xyo-network/react-error'\n\nimport { EmbedErrorCard } from './EmbedErrorCard'\n\ninterface EmbedCardApiErrorRendererProps extends CardProps {\n xyoError?: ModuleError\n}\n\nexport const EmbedCardApiErrorRenderer: React.FC<WithChildren<EmbedCardApiErrorRendererProps>> = ({ xyoError, children, ...props }) => {\n return (\n <ErrorRender error={xyoError} noReAuth noErrorDisplay customError={<CustomApiErrorCard xyoError={xyoError} {...props} />}>\n {children}\n </ErrorRender>\n )\n}\n\nconst CustomApiErrorCard: React.FC<EmbedCardApiErrorRendererProps> = ({ xyoError, ...props }) => {\n return (\n <EmbedErrorCard {...props}>\n <ErrorAlert error={xyoError} />\n </EmbedErrorCard>\n )\n}\n","import { Alert, AlertProps, AlertTitle, Card, CardContent, CardProps, Typography } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\ninterface EmbedErrorCardBaseProps {\n alertProps?: AlertProps\n error?: Error\n hideErrorDetails?: boolean\n}\n\ninterface EmbedErrorCardProps extends EmbedErrorCardBaseProps, CardProps {\n alertProps?: AlertProps\n error?: Error\n}\n\nexport const EmbedErrorCard: React.FC<WithChildren<EmbedErrorCardProps>> = (props) => {\n const { alertProps, error, hideErrorDetails = true, children, ...cardProps } = props\n const errorProps = { alertProps, error, hideErrorDetails }\n return (\n <Card {...cardProps}>\n <CardContent>{children ?? <DefaultErrorAlert {...errorProps} />}</CardContent>\n </Card>\n )\n}\n\nconst DefaultErrorAlert: React.FC<EmbedErrorCardBaseProps> = ({ alertProps, hideErrorDetails, error }) => {\n return (\n <Alert severity=\"error\" {...alertProps}>\n <AlertTitle>Whoops! Something went wrong</AlertTitle>\n {!hideErrorDetails && error ?\n <>\n <Typography variant=\"caption\">Error: </Typography>\n <Typography variant=\"caption\">{error?.message}</Typography>\n </>\n : <Typography variant=\"caption\" fontSize=\"small\">\n Error Loading Plugin\n </Typography>\n }\n </Alert>\n )\n}\n"],"mappings":";AAAA,SAAS,YAAuB;AAChC,SAAS,qBAAqB;AAC9B;AAAA,EACE;AAAA,EAEA;AAAA,OAIK;AAmBH,SAGI,KAHJ;AAVG,IAAM,WAAkD,CAAC;AAAA,EAC9D;AAAA,EACA,cAAc;AAAA,EACd,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,eAAe,cAAc,MAAM,WAAW;AACpD,SACE,qBAAC,QAAM,GAAG,OACP;AAAA;AAAA,IACA,gBAAgB,cAAc,eAC7B,oBAAC,wBAAsB,GAAI,kBAAgD,IAC3E;AAAA,IACD,gBAAgB,YAAY,eAC3B,oBAAC,s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AAA,MAAC,6BAA0B,UAAU,WACnC,0BAAAA;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,MACX,SAAQ;AAAA,MACR,MAAM,QAAQ,CAAC,kBAAkB,OAAO;AAAA,MACxC,kBAAkB,EAAE,OAAO,EAAE,YAAY,SAAS,YAAY,MAAM,QAAQ,CAAC,GAAG,QAAQ,EAAE,EAAE;AAAA,MAC5F,IAAI,EAAE,UAAU,WAAW;AAAA,MAC1B,GAAG;AAAA;AAAA,EACN,GACF;AAEJ;","names":["Chip","jsx","useState","createContextEx","jsx","useState","useContextEx","useContextEx","createContextEx","useEffect","useState","jsx","useState","useEffect","useContextEx","useContextEx","useAsyncEffect","useState","createContextEx","jsx","useState","useAsyncEffect","useContextEx","useContextEx","useState","Fragment","jsx","jsxs","Fragment","jsx","jsxs","useState","Fragment","jsx","jsxs","Chip","useListMode","jsx","jsxs","MenuItem","jsx","jsxs","MenuItem","MenuItem","SelectEx","jsx","SelectEx","MenuItem","jsx","jsxs","useListMode","jsx","Fragment","jsx","jsxs","Alert","Fragment","jsx","jsxs","Alert","jsx","Alert","AlertTitle","Card","CardContent","Fragment","jsx","jsxs","jsx","jsx","jsxs"]}
|
package/package.json
CHANGED
@@ -10,29 +10,29 @@
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
|
11
11
|
},
|
12
12
|
"dependencies": {
|
13
|
-
"@mui/icons-material": "^5.15.
|
14
|
-
"@mui/material": "^5.15.
|
15
|
-
"@mui/styles": "^5.15.
|
16
|
-
"@xylabs/delay": "^3.5.
|
13
|
+
"@mui/icons-material": "^5.15.21",
|
14
|
+
"@mui/material": "^5.15.21",
|
15
|
+
"@mui/styles": "^5.15.21",
|
16
|
+
"@xylabs/delay": "^3.5.2",
|
17
17
|
"@xylabs/react-async-effect": "^3.1.7",
|
18
18
|
"@xylabs/react-flexbox": "^3.1.7",
|
19
19
|
"@xylabs/react-select": "^3.1.7",
|
20
20
|
"@xylabs/react-shared": "^3.1.7",
|
21
|
-
"@xyo-network/huri": "^2.107.
|
22
|
-
"@xyo-network/payload-model": "^2.107.
|
23
|
-
"@xyo-network/react-error": "
|
24
|
-
"@xyo-network/react-payload-plugin": "
|
25
|
-
"@xyo-network/react-shared": "
|
26
|
-
"@xyo-network/schema-cache": "^2.107.
|
21
|
+
"@xyo-network/huri": "^2.107.6",
|
22
|
+
"@xyo-network/payload-model": "^2.107.6",
|
23
|
+
"@xyo-network/react-error": "^2.78.2",
|
24
|
+
"@xyo-network/react-payload-plugin": "^2.78.2",
|
25
|
+
"@xyo-network/react-shared": "^2.78.2",
|
26
|
+
"@xyo-network/schema-cache": "^2.107.6",
|
27
27
|
"react": "^18.3.1",
|
28
28
|
"react-dom": "^18.3.1"
|
29
29
|
},
|
30
30
|
"devDependencies": {
|
31
31
|
"@storybook/react": "^7.6.20",
|
32
|
-
"@xylabs/ts-scripts-yarn3": "^3.11.
|
33
|
-
"@xylabs/tsconfig-react": "^3.11.
|
34
|
-
"@xyo-network/react-aggregate-price-plugin": "
|
35
|
-
"@xyo-network/react-crypto-market-uniswap-plugin": "
|
32
|
+
"@xylabs/ts-scripts-yarn3": "^3.11.12",
|
33
|
+
"@xylabs/tsconfig-react": "^3.11.12",
|
34
|
+
"@xyo-network/react-aggregate-price-plugin": "^2.78.2",
|
35
|
+
"@xyo-network/react-crypto-market-uniswap-plugin": "^2.78.2",
|
36
36
|
"react-router-dom": "^6.24.0",
|
37
37
|
"typescript": "^5.5.2"
|
38
38
|
},
|
@@ -91,6 +91,6 @@
|
|
91
91
|
},
|
92
92
|
"sideEffects": false,
|
93
93
|
"types": "dist/browser/index.d.ts",
|
94
|
-
"version": "2.78.
|
94
|
+
"version": "2.78.2",
|
95
95
|
"type": "module"
|
96
96
|
}
|