@xyo-network/react-embed 2.60.12 → 2.62.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/EmbedPlugin.d.mts.map +1 -0
- package/dist/components/EmbedPlugin.d.ts +5 -0
- package/dist/components/EmbedPlugin.d.ts.map +1 -0
- package/dist/components/EmbedResolver.d.mts.map +1 -0
- package/dist/components/EmbedResolver.d.ts +4 -0
- package/dist/components/EmbedResolver.d.ts.map +1 -0
- package/dist/components/controls/EmbedFormControl.d.mts.map +1 -0
- package/dist/components/controls/EmbedFormControl.d.ts +10 -0
- package/dist/components/controls/EmbedFormControl.d.ts.map +1 -0
- package/dist/components/controls/ListModeSelect.d.mts.map +1 -0
- package/dist/components/controls/ListModeSelect.d.ts +6 -0
- package/dist/components/controls/ListModeSelect.d.ts.map +1 -0
- package/dist/components/controls/RenderSelect.d.mts.map +1 -0
- package/dist/components/controls/RenderSelect.d.ts +4 -0
- package/dist/components/controls/RenderSelect.d.ts.map +1 -0
- package/dist/components/controls/index.d.mts.map +1 -0
- package/dist/{esm/components/controls/index.js → components/controls/index.d.ts} +1 -1
- package/dist/components/controls/index.d.ts.map +1 -0
- package/dist/components/embed-card/EmbedCardResolver.d.mts.map +1 -0
- package/dist/components/embed-card/EmbedCardResolver.d.ts +5 -0
- package/dist/components/embed-card/EmbedCardResolver.d.ts.map +1 -0
- package/dist/components/embed-card/EmbedPluginCard.d.mts.map +1 -0
- package/dist/components/embed-card/EmbedPluginCard.d.ts +11 -0
- package/dist/components/embed-card/EmbedPluginCard.d.ts.map +1 -0
- package/dist/components/embed-card/card/BusyCard.d.mts.map +1 -0
- package/dist/components/embed-card/card/BusyCard.d.ts +11 -0
- package/dist/components/embed-card/card/BusyCard.d.ts.map +1 -0
- package/dist/components/embed-card/card/EmbedCardHeader.d.mts.map +1 -0
- package/dist/components/embed-card/card/EmbedCardHeader.d.ts +4 -0
- package/dist/components/embed-card/card/EmbedCardHeader.d.ts.map +1 -0
- package/dist/components/embed-card/card/EmbedPluginCard.d.mts.map +1 -0
- package/dist/components/embed-card/card/EmbedPluginCard.d.ts +4 -0
- package/dist/components/embed-card/card/EmbedPluginCard.d.ts.map +1 -0
- package/dist/components/embed-card/card/index.d.mts.map +1 -0
- package/dist/{esm/components/embed-card/card/index.js → components/embed-card/card/index.d.ts} +1 -1
- package/dist/components/embed-card/card/index.d.ts.map +1 -0
- package/dist/components/embed-card/error-handling/EmbedCardApiErrorRenderer.d.mts.map +1 -0
- package/dist/components/embed-card/error-handling/EmbedCardApiErrorRenderer.d.ts +10 -0
- package/dist/components/embed-card/error-handling/EmbedCardApiErrorRenderer.d.ts.map +1 -0
- package/dist/components/embed-card/error-handling/EmbedErrorCard.d.mts.map +1 -0
- package/dist/components/embed-card/error-handling/EmbedErrorCard.d.ts +15 -0
- package/dist/components/embed-card/error-handling/EmbedErrorCard.d.ts.map +1 -0
- package/dist/components/embed-card/error-handling/index.d.mts.map +1 -0
- package/dist/{esm/components/embed-card/error-handling/index.js → components/embed-card/error-handling/index.d.ts} +1 -1
- package/dist/components/embed-card/error-handling/index.d.ts.map +1 -0
- package/dist/components/embed-card/index.d.mts.map +1 -0
- package/dist/{esm/components/embed-card/index.js → components/embed-card/index.d.ts} +1 -1
- package/dist/components/embed-card/index.d.ts.map +1 -0
- package/dist/components/embed-card/menu/EmbedMenu.d.mts.map +1 -0
- package/dist/components/embed-card/menu/EmbedMenu.d.ts +4 -0
- package/dist/components/embed-card/menu/EmbedMenu.d.ts.map +1 -0
- package/dist/components/embed-card/menu/JsonMenuItem.d.mts.map +1 -0
- package/dist/components/embed-card/menu/JsonMenuItem.d.ts +4 -0
- package/dist/components/embed-card/menu/JsonMenuItem.d.ts.map +1 -0
- package/dist/components/embed-card/menu/index.d.mts.map +1 -0
- package/dist/components/embed-card/menu/index.d.ts +2 -0
- package/dist/components/embed-card/menu/index.d.ts.map +1 -0
- package/dist/components/embed-plugin-stories/XyoEmbedPlugin.examples.stories.d.mts +6 -0
- package/dist/components/embed-plugin-stories/XyoEmbedPlugin.examples.stories.d.mts.map +1 -0
- package/dist/components/embed-plugin-stories/XyoEmbedPlugin.examples.stories.d.ts +6 -0
- package/dist/components/embed-plugin-stories/XyoEmbedPlugin.examples.stories.d.ts.map +1 -0
- package/dist/components/embed-plugin-stories/XyoEmbedPlugin.states.stories.d.mts +11 -0
- package/dist/components/embed-plugin-stories/XyoEmbedPlugin.states.stories.d.mts.map +1 -0
- package/dist/components/embed-plugin-stories/XyoEmbedPlugin.states.stories.d.ts +11 -0
- package/dist/components/embed-plugin-stories/XyoEmbedPlugin.states.stories.d.ts.map +1 -0
- package/dist/components/embed-plugin-stories/storyPayload.d.mts.map +1 -0
- package/dist/components/embed-plugin-stories/storyPayload.d.ts +126 -0
- package/dist/components/embed-plugin-stories/storyPayload.d.ts.map +1 -0
- package/dist/components/embed-plugin-stories/storyShared.d.mts.map +1 -0
- package/dist/components/embed-plugin-stories/storyShared.d.ts +5 -0
- package/dist/components/embed-plugin-stories/storyShared.d.ts.map +1 -0
- package/dist/components/index.d.mts.map +1 -0
- package/dist/{esm/components/index.js → components/index.d.ts} +1 -1
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/validation-alerts/ValidatePayload.d.mts.map +1 -0
- package/dist/components/validation-alerts/ValidatePayload.d.ts +5 -0
- package/dist/components/validation-alerts/ValidatePayload.d.ts.map +1 -0
- package/dist/components/validation-alerts/ValidatePlugins.d.mts.map +1 -0
- package/dist/components/validation-alerts/ValidatePlugins.d.ts +5 -0
- package/dist/components/validation-alerts/ValidatePlugins.d.ts.map +1 -0
- package/dist/components/validation-alerts/index.d.mts.map +1 -0
- package/dist/{esm/components/validation-alerts/index.js → components/validation-alerts/index.d.ts} +1 -1
- package/dist/components/validation-alerts/index.d.ts.map +1 -0
- package/dist/contexts/EmbedPluginContext/Context.d.mts.map +1 -0
- package/dist/contexts/EmbedPluginContext/Context.d.ts +4 -0
- package/dist/contexts/EmbedPluginContext/Context.d.ts.map +1 -0
- package/dist/contexts/EmbedPluginContext/Provider.d.mts.map +1 -0
- package/dist/contexts/EmbedPluginContext/Provider.d.ts +7 -0
- package/dist/contexts/EmbedPluginContext/Provider.d.ts.map +1 -0
- package/dist/contexts/EmbedPluginContext/State.d.mts.map +1 -0
- package/dist/contexts/EmbedPluginContext/State.d.ts +33 -0
- package/dist/contexts/EmbedPluginContext/State.d.ts.map +1 -0
- package/dist/contexts/EmbedPluginContext/index.d.mts.map +1 -0
- package/dist/contexts/EmbedPluginContext/index.d.ts.map +1 -0
- package/dist/contexts/EmbedPluginContext/use.d.mts.map +1 -0
- package/dist/contexts/EmbedPluginContext/use.d.ts +2 -0
- package/dist/contexts/EmbedPluginContext/use.d.ts.map +1 -0
- package/dist/contexts/RefreshPayloadContext/Context.d.mts.map +1 -0
- package/dist/contexts/RefreshPayloadContext/Context.d.ts +4 -0
- package/dist/contexts/RefreshPayloadContext/Context.d.ts.map +1 -0
- package/dist/contexts/RefreshPayloadContext/Provider.d.mts.map +1 -0
- package/dist/contexts/RefreshPayloadContext/Provider.d.ts +8 -0
- package/dist/contexts/RefreshPayloadContext/Provider.d.ts.map +1 -0
- package/dist/contexts/RefreshPayloadContext/State.d.mts.map +1 -0
- package/dist/contexts/RefreshPayloadContext/State.d.ts +8 -0
- package/dist/contexts/RefreshPayloadContext/State.d.ts.map +1 -0
- package/dist/contexts/RefreshPayloadContext/index.d.mts.map +1 -0
- package/dist/contexts/RefreshPayloadContext/index.d.ts.map +1 -0
- package/dist/contexts/RefreshPayloadContext/use.d.mts.map +1 -0
- package/dist/contexts/RefreshPayloadContext/use.d.ts +2 -0
- package/dist/contexts/RefreshPayloadContext/use.d.ts.map +1 -0
- package/dist/contexts/ResolvePayloadContext/Context.d.mts.map +1 -0
- package/dist/contexts/ResolvePayloadContext/Context.d.ts +4 -0
- package/dist/contexts/ResolvePayloadContext/Context.d.ts.map +1 -0
- package/dist/contexts/ResolvePayloadContext/Provider.d.mts.map +1 -0
- package/dist/contexts/ResolvePayloadContext/Provider.d.ts +6 -0
- package/dist/contexts/ResolvePayloadContext/Provider.d.ts.map +1 -0
- package/dist/contexts/ResolvePayloadContext/State.d.mts.map +1 -0
- package/dist/contexts/ResolvePayloadContext/State.d.ts +13 -0
- package/dist/contexts/ResolvePayloadContext/State.d.ts.map +1 -0
- package/dist/{esm/contexts/EmbedPluginContext/index.js → contexts/ResolvePayloadContext/index.d.mts} +1 -1
- package/dist/contexts/ResolvePayloadContext/index.d.mts.map +1 -0
- package/dist/{esm/contexts/ResolvePayloadContext/index.js → contexts/ResolvePayloadContext/index.d.ts} +1 -1
- package/dist/{types/contexts/EmbedPluginContext → contexts/ResolvePayloadContext}/index.d.ts.map +1 -1
- package/dist/contexts/ResolvePayloadContext/use.d.mts.map +1 -0
- package/dist/contexts/ResolvePayloadContext/use.d.ts +2 -0
- package/dist/contexts/ResolvePayloadContext/use.d.ts.map +1 -0
- package/dist/contexts/ValidatePayloadContext/Context.d.mts.map +1 -0
- package/dist/contexts/ValidatePayloadContext/Context.d.ts +4 -0
- package/dist/contexts/ValidatePayloadContext/Context.d.ts.map +1 -0
- package/dist/contexts/ValidatePayloadContext/Provider.d.mts.map +1 -0
- package/dist/contexts/ValidatePayloadContext/Provider.d.ts +7 -0
- package/dist/contexts/ValidatePayloadContext/Provider.d.ts.map +1 -0
- package/dist/contexts/ValidatePayloadContext/Provider.stories.d.mts +15 -0
- package/dist/contexts/ValidatePayloadContext/Provider.stories.d.mts.map +1 -0
- package/dist/contexts/ValidatePayloadContext/Provider.stories.d.ts +15 -0
- package/dist/contexts/ValidatePayloadContext/Provider.stories.d.ts.map +1 -0
- package/dist/contexts/ValidatePayloadContext/State.d.mts.map +1 -0
- package/dist/contexts/ValidatePayloadContext/State.d.ts +7 -0
- package/dist/contexts/ValidatePayloadContext/State.d.ts.map +1 -0
- package/dist/{esm/contexts/RefreshPayloadContext/index.js → contexts/ValidatePayloadContext/index.d.mts} +1 -1
- package/dist/contexts/ValidatePayloadContext/index.d.mts.map +1 -0
- package/dist/{esm/contexts/ValidatePayloadContext/index.js → contexts/ValidatePayloadContext/index.d.ts} +1 -1
- package/dist/contexts/ValidatePayloadContext/index.d.ts.map +1 -0
- package/dist/contexts/ValidatePayloadContext/use.d.mts.map +1 -0
- package/dist/contexts/ValidatePayloadContext/use.d.ts +2 -0
- package/dist/contexts/ValidatePayloadContext/use.d.ts.map +1 -0
- package/dist/contexts/index.d.mts.map +1 -0
- package/dist/{esm/contexts/index.js → contexts/index.d.ts} +1 -1
- package/dist/contexts/index.d.ts.map +1 -0
- package/dist/docs.json +290 -426
- package/dist/{esm/index.js → index.d.mts} +1 -1
- package/dist/index.d.mts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +543 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +493 -0
- package/dist/index.mjs.map +1 -0
- package/dist/types/EmbedPluginProps.d.mts.map +1 -0
- package/dist/types/EmbedPluginProps.d.ts +10 -0
- package/dist/types/EmbedPluginProps.d.ts.map +1 -0
- package/dist/types/index.d.mts.map +1 -0
- package/dist/types/index.d.ts +1 -3
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +37 -29
- package/dist/cjs/components/EmbedPlugin.js +0 -19
- package/dist/cjs/components/EmbedPlugin.js.map +0 -1
- package/dist/cjs/components/EmbedResolver.js +0 -12
- package/dist/cjs/components/EmbedResolver.js.map +0 -1
- package/dist/cjs/components/controls/EmbedFormControl.js +0 -12
- package/dist/cjs/components/controls/EmbedFormControl.js.map +0 -1
- package/dist/cjs/components/controls/ListModeSelect.js +0 -21
- package/dist/cjs/components/controls/ListModeSelect.js.map +0 -1
- package/dist/cjs/components/controls/RenderSelect.js +0 -15
- package/dist/cjs/components/controls/RenderSelect.js.map +0 -1
- package/dist/cjs/components/controls/index.js +0 -7
- package/dist/cjs/components/controls/index.js.map +0 -1
- package/dist/cjs/components/embed-card/EmbedCardResolver.js +0 -19
- package/dist/cjs/components/embed-card/EmbedCardResolver.js.map +0 -1
- package/dist/cjs/components/embed-card/EmbedPluginCard.js +0 -35
- package/dist/cjs/components/embed-card/EmbedPluginCard.js.map +0 -1
- package/dist/cjs/components/embed-card/card/BusyCard.js +0 -15
- package/dist/cjs/components/embed-card/card/BusyCard.js.map +0 -1
- package/dist/cjs/components/embed-card/card/EmbedCardHeader.js +0 -21
- package/dist/cjs/components/embed-card/card/EmbedCardHeader.js.map +0 -1
- package/dist/cjs/components/embed-card/card/EmbedPluginCard.js +0 -23
- package/dist/cjs/components/embed-card/card/EmbedPluginCard.js.map +0 -1
- package/dist/cjs/components/embed-card/card/index.js +0 -7
- package/dist/cjs/components/embed-card/card/index.js.map +0 -1
- package/dist/cjs/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js +0 -17
- package/dist/cjs/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js.map +0 -1
- package/dist/cjs/components/embed-card/error-handling/EmbedErrorCard.js +0 -16
- package/dist/cjs/components/embed-card/error-handling/EmbedErrorCard.js.map +0 -1
- package/dist/cjs/components/embed-card/error-handling/index.js +0 -6
- package/dist/cjs/components/embed-card/error-handling/index.js.map +0 -1
- package/dist/cjs/components/embed-card/index.js +0 -6
- package/dist/cjs/components/embed-card/index.js.map +0 -1
- package/dist/cjs/components/embed-card/menu/EmbedMenu.js +0 -23
- package/dist/cjs/components/embed-card/menu/EmbedMenu.js.map +0 -1
- package/dist/cjs/components/embed-card/menu/JsonMenuItem.js +0 -14
- package/dist/cjs/components/embed-card/menu/JsonMenuItem.js.map +0 -1
- package/dist/cjs/components/embed-card/menu/index.js +0 -5
- package/dist/cjs/components/embed-card/menu/index.js.map +0 -1
- package/dist/cjs/components/embed-plugin-stories/storyPayload.js +0 -25
- package/dist/cjs/components/embed-plugin-stories/storyPayload.js.map +0 -1
- package/dist/cjs/components/embed-plugin-stories/storyShared.js +0 -20
- package/dist/cjs/components/embed-plugin-stories/storyShared.js.map +0 -1
- package/dist/cjs/components/index.js +0 -6
- package/dist/cjs/components/index.js.map +0 -1
- package/dist/cjs/components/validation-alerts/ValidatePayload.js +0 -17
- package/dist/cjs/components/validation-alerts/ValidatePayload.js.map +0 -1
- package/dist/cjs/components/validation-alerts/ValidatePlugins.js +0 -18
- package/dist/cjs/components/validation-alerts/ValidatePlugins.js.map +0 -1
- package/dist/cjs/components/validation-alerts/index.js +0 -6
- package/dist/cjs/components/validation-alerts/index.js.map +0 -1
- package/dist/cjs/contexts/EmbedPluginContext/Context.js +0 -6
- package/dist/cjs/contexts/EmbedPluginContext/Context.js.map +0 -1
- package/dist/cjs/contexts/EmbedPluginContext/Provider.js +0 -24
- package/dist/cjs/contexts/EmbedPluginContext/Provider.js.map +0 -1
- package/dist/cjs/contexts/EmbedPluginContext/State.js +0 -3
- package/dist/cjs/contexts/EmbedPluginContext/State.js.map +0 -1
- package/dist/cjs/contexts/EmbedPluginContext/index.js +0 -8
- package/dist/cjs/contexts/EmbedPluginContext/index.js.map +0 -1
- package/dist/cjs/contexts/EmbedPluginContext/use.js +0 -8
- package/dist/cjs/contexts/EmbedPluginContext/use.js.map +0 -1
- package/dist/cjs/contexts/RefreshPayloadContext/Context.js +0 -6
- package/dist/cjs/contexts/RefreshPayloadContext/Context.js.map +0 -1
- package/dist/cjs/contexts/RefreshPayloadContext/Provider.js +0 -12
- package/dist/cjs/contexts/RefreshPayloadContext/Provider.js.map +0 -1
- package/dist/cjs/contexts/RefreshPayloadContext/State.js +0 -3
- package/dist/cjs/contexts/RefreshPayloadContext/State.js.map +0 -1
- package/dist/cjs/contexts/RefreshPayloadContext/index.js +0 -7
- package/dist/cjs/contexts/RefreshPayloadContext/index.js.map +0 -1
- package/dist/cjs/contexts/RefreshPayloadContext/use.js +0 -8
- package/dist/cjs/contexts/RefreshPayloadContext/use.js.map +0 -1
- package/dist/cjs/contexts/ResolvePayloadContext/Context.js +0 -6
- package/dist/cjs/contexts/ResolvePayloadContext/Context.js.map +0 -1
- package/dist/cjs/contexts/ResolvePayloadContext/Provider.js +0 -56
- package/dist/cjs/contexts/ResolvePayloadContext/Provider.js.map +0 -1
- package/dist/cjs/contexts/ResolvePayloadContext/State.js +0 -3
- package/dist/cjs/contexts/ResolvePayloadContext/State.js.map +0 -1
- package/dist/cjs/contexts/ResolvePayloadContext/index.js +0 -8
- package/dist/cjs/contexts/ResolvePayloadContext/index.js.map +0 -1
- package/dist/cjs/contexts/ResolvePayloadContext/use.js +0 -8
- package/dist/cjs/contexts/ResolvePayloadContext/use.js.map +0 -1
- package/dist/cjs/contexts/ValidatePayloadContext/Context.js +0 -6
- package/dist/cjs/contexts/ValidatePayloadContext/Context.js.map +0 -1
- package/dist/cjs/contexts/ValidatePayloadContext/Provider.js +0 -32
- package/dist/cjs/contexts/ValidatePayloadContext/Provider.js.map +0 -1
- package/dist/cjs/contexts/ValidatePayloadContext/State.js +0 -3
- package/dist/cjs/contexts/ValidatePayloadContext/State.js.map +0 -1
- package/dist/cjs/contexts/ValidatePayloadContext/index.js +0 -7
- package/dist/cjs/contexts/ValidatePayloadContext/index.js.map +0 -1
- package/dist/cjs/contexts/ValidatePayloadContext/use.js +0 -8
- package/dist/cjs/contexts/ValidatePayloadContext/use.js.map +0 -1
- package/dist/cjs/contexts/index.js +0 -8
- package/dist/cjs/contexts/index.js.map +0 -1
- package/dist/cjs/index.js +0 -7
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/types/EmbedPluginProps.js +0 -3
- package/dist/cjs/types/EmbedPluginProps.js.map +0 -1
- package/dist/cjs/types/index.js +0 -5
- package/dist/cjs/types/index.js.map +0 -1
- package/dist/esm/components/EmbedPlugin.js +0 -15
- package/dist/esm/components/EmbedPlugin.js.map +0 -1
- package/dist/esm/components/EmbedResolver.js +0 -8
- package/dist/esm/components/EmbedResolver.js.map +0 -1
- package/dist/esm/components/controls/EmbedFormControl.js +0 -6
- package/dist/esm/components/controls/EmbedFormControl.js.map +0 -1
- package/dist/esm/components/controls/ListModeSelect.js +0 -16
- package/dist/esm/components/controls/ListModeSelect.js.map +0 -1
- package/dist/esm/components/controls/RenderSelect.js +0 -11
- package/dist/esm/components/controls/RenderSelect.js.map +0 -1
- package/dist/esm/components/controls/index.js.map +0 -1
- package/dist/esm/components/embed-card/EmbedCardResolver.js +0 -13
- package/dist/esm/components/embed-card/EmbedCardResolver.js.map +0 -1
- package/dist/esm/components/embed-card/EmbedPluginCard.js +0 -28
- package/dist/esm/components/embed-card/EmbedPluginCard.js.map +0 -1
- package/dist/esm/components/embed-card/card/BusyCard.js +0 -9
- package/dist/esm/components/embed-card/card/BusyCard.js.map +0 -1
- package/dist/esm/components/embed-card/card/EmbedCardHeader.js +0 -15
- package/dist/esm/components/embed-card/card/EmbedCardHeader.js.map +0 -1
- package/dist/esm/components/embed-card/card/EmbedPluginCard.js +0 -16
- package/dist/esm/components/embed-card/card/EmbedPluginCard.js.map +0 -1
- package/dist/esm/components/embed-card/card/index.js.map +0 -1
- package/dist/esm/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js +0 -10
- package/dist/esm/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js.map +0 -1
- package/dist/esm/components/embed-card/error-handling/EmbedErrorCard.js +0 -11
- package/dist/esm/components/embed-card/error-handling/EmbedErrorCard.js.map +0 -1
- package/dist/esm/components/embed-card/error-handling/index.js.map +0 -1
- package/dist/esm/components/embed-card/index.js.map +0 -1
- package/dist/esm/components/embed-card/menu/EmbedMenu.js +0 -18
- package/dist/esm/components/embed-card/menu/EmbedMenu.js.map +0 -1
- package/dist/esm/components/embed-card/menu/JsonMenuItem.js +0 -9
- package/dist/esm/components/embed-card/menu/JsonMenuItem.js.map +0 -1
- package/dist/esm/components/embed-card/menu/index.js +0 -2
- package/dist/esm/components/embed-card/menu/index.js.map +0 -1
- package/dist/esm/components/embed-plugin-stories/storyPayload.js +0 -22
- package/dist/esm/components/embed-plugin-stories/storyPayload.js.map +0 -1
- package/dist/esm/components/embed-plugin-stories/storyShared.js +0 -16
- package/dist/esm/components/embed-plugin-stories/storyShared.js.map +0 -1
- package/dist/esm/components/index.js.map +0 -1
- package/dist/esm/components/validation-alerts/ValidatePayload.js +0 -11
- package/dist/esm/components/validation-alerts/ValidatePayload.js.map +0 -1
- package/dist/esm/components/validation-alerts/ValidatePlugins.js +0 -12
- package/dist/esm/components/validation-alerts/ValidatePlugins.js.map +0 -1
- package/dist/esm/components/validation-alerts/index.js.map +0 -1
- package/dist/esm/contexts/EmbedPluginContext/Context.js +0 -3
- package/dist/esm/contexts/EmbedPluginContext/Context.js.map +0 -1
- package/dist/esm/contexts/EmbedPluginContext/Provider.js +0 -20
- package/dist/esm/contexts/EmbedPluginContext/Provider.js.map +0 -1
- package/dist/esm/contexts/EmbedPluginContext/State.js +0 -2
- package/dist/esm/contexts/EmbedPluginContext/State.js.map +0 -1
- package/dist/esm/contexts/EmbedPluginContext/index.js.map +0 -1
- package/dist/esm/contexts/EmbedPluginContext/use.js +0 -4
- package/dist/esm/contexts/EmbedPluginContext/use.js.map +0 -1
- package/dist/esm/contexts/RefreshPayloadContext/Context.js +0 -3
- package/dist/esm/contexts/RefreshPayloadContext/Context.js.map +0 -1
- package/dist/esm/contexts/RefreshPayloadContext/Provider.js +0 -8
- package/dist/esm/contexts/RefreshPayloadContext/Provider.js.map +0 -1
- package/dist/esm/contexts/RefreshPayloadContext/State.js +0 -2
- package/dist/esm/contexts/RefreshPayloadContext/State.js.map +0 -1
- package/dist/esm/contexts/RefreshPayloadContext/index.js.map +0 -1
- package/dist/esm/contexts/RefreshPayloadContext/use.js +0 -4
- package/dist/esm/contexts/RefreshPayloadContext/use.js.map +0 -1
- package/dist/esm/contexts/ResolvePayloadContext/Context.js +0 -3
- package/dist/esm/contexts/ResolvePayloadContext/Context.js.map +0 -1
- package/dist/esm/contexts/ResolvePayloadContext/Provider.js +0 -51
- package/dist/esm/contexts/ResolvePayloadContext/Provider.js.map +0 -1
- package/dist/esm/contexts/ResolvePayloadContext/State.js +0 -2
- package/dist/esm/contexts/ResolvePayloadContext/State.js.map +0 -1
- package/dist/esm/contexts/ResolvePayloadContext/index.js.map +0 -1
- package/dist/esm/contexts/ResolvePayloadContext/use.js +0 -4
- package/dist/esm/contexts/ResolvePayloadContext/use.js.map +0 -1
- package/dist/esm/contexts/ValidatePayloadContext/Context.js +0 -3
- package/dist/esm/contexts/ValidatePayloadContext/Context.js.map +0 -1
- package/dist/esm/contexts/ValidatePayloadContext/Provider.js +0 -27
- package/dist/esm/contexts/ValidatePayloadContext/Provider.js.map +0 -1
- package/dist/esm/contexts/ValidatePayloadContext/State.js +0 -2
- package/dist/esm/contexts/ValidatePayloadContext/State.js.map +0 -1
- package/dist/esm/contexts/ValidatePayloadContext/index.js.map +0 -1
- package/dist/esm/contexts/ValidatePayloadContext/use.js +0 -4
- package/dist/esm/contexts/ValidatePayloadContext/use.js.map +0 -1
- package/dist/esm/contexts/index.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/types/EmbedPluginProps.js +0 -2
- package/dist/esm/types/EmbedPluginProps.js.map +0 -1
- package/dist/esm/types/index.js +0 -2
- package/dist/esm/types/index.js.map +0 -1
- package/dist/types/components/EmbedPlugin.d.ts.map +0 -1
- package/dist/types/components/EmbedResolver.d.ts.map +0 -1
- package/dist/types/components/controls/EmbedFormControl.d.ts.map +0 -1
- package/dist/types/components/controls/ListModeSelect.d.ts.map +0 -1
- package/dist/types/components/controls/RenderSelect.d.ts.map +0 -1
- package/dist/types/components/controls/index.d.ts.map +0 -1
- package/dist/types/components/embed-card/EmbedCardResolver.d.ts.map +0 -1
- package/dist/types/components/embed-card/EmbedPluginCard.d.ts.map +0 -1
- package/dist/types/components/embed-card/card/BusyCard.d.ts.map +0 -1
- package/dist/types/components/embed-card/card/EmbedCardHeader.d.ts.map +0 -1
- package/dist/types/components/embed-card/card/EmbedPluginCard.d.ts.map +0 -1
- package/dist/types/components/embed-card/card/index.d.ts.map +0 -1
- package/dist/types/components/embed-card/error-handling/EmbedCardApiErrorRenderer.d.ts.map +0 -1
- package/dist/types/components/embed-card/error-handling/EmbedErrorCard.d.ts.map +0 -1
- package/dist/types/components/embed-card/error-handling/index.d.ts.map +0 -1
- package/dist/types/components/embed-card/index.d.ts.map +0 -1
- package/dist/types/components/embed-card/menu/EmbedMenu.d.ts.map +0 -1
- package/dist/types/components/embed-card/menu/JsonMenuItem.d.ts.map +0 -1
- package/dist/types/components/embed-card/menu/index.d.ts.map +0 -1
- package/dist/types/components/embed-plugin-stories/storyPayload.d.ts.map +0 -1
- package/dist/types/components/embed-plugin-stories/storyShared.d.ts.map +0 -1
- package/dist/types/components/index.d.ts.map +0 -1
- package/dist/types/components/validation-alerts/ValidatePayload.d.ts.map +0 -1
- package/dist/types/components/validation-alerts/ValidatePlugins.d.ts.map +0 -1
- package/dist/types/components/validation-alerts/index.d.ts.map +0 -1
- package/dist/types/contexts/EmbedPluginContext/Context.d.ts.map +0 -1
- package/dist/types/contexts/EmbedPluginContext/Provider.d.ts.map +0 -1
- package/dist/types/contexts/EmbedPluginContext/State.d.ts.map +0 -1
- package/dist/types/contexts/EmbedPluginContext/use.d.ts.map +0 -1
- package/dist/types/contexts/RefreshPayloadContext/Context.d.ts.map +0 -1
- package/dist/types/contexts/RefreshPayloadContext/Provider.d.ts.map +0 -1
- package/dist/types/contexts/RefreshPayloadContext/State.d.ts.map +0 -1
- package/dist/types/contexts/RefreshPayloadContext/index.d.ts.map +0 -1
- package/dist/types/contexts/RefreshPayloadContext/use.d.ts.map +0 -1
- package/dist/types/contexts/ResolvePayloadContext/Context.d.ts.map +0 -1
- package/dist/types/contexts/ResolvePayloadContext/Provider.d.ts.map +0 -1
- package/dist/types/contexts/ResolvePayloadContext/State.d.ts.map +0 -1
- package/dist/types/contexts/ResolvePayloadContext/index.d.ts.map +0 -1
- package/dist/types/contexts/ResolvePayloadContext/use.d.ts.map +0 -1
- package/dist/types/contexts/ValidatePayloadContext/Context.d.ts.map +0 -1
- package/dist/types/contexts/ValidatePayloadContext/Provider.d.ts.map +0 -1
- package/dist/types/contexts/ValidatePayloadContext/State.d.ts.map +0 -1
- package/dist/types/contexts/ValidatePayloadContext/index.d.ts.map +0 -1
- package/dist/types/contexts/ValidatePayloadContext/use.d.ts.map +0 -1
- package/dist/types/contexts/index.d.ts.map +0 -1
- package/dist/types/types/EmbedPluginProps.d.ts.map +0 -1
- package/dist/types/types/index.d.ts.map +0 -1
- /package/dist/{types/components/EmbedPlugin.d.ts → components/EmbedPlugin.d.mts} +0 -0
- /package/dist/{types/components/EmbedResolver.d.ts → components/EmbedResolver.d.mts} +0 -0
- /package/dist/{types/components/controls/EmbedFormControl.d.ts → components/controls/EmbedFormControl.d.mts} +0 -0
- /package/dist/{types/components/controls/ListModeSelect.d.ts → components/controls/ListModeSelect.d.mts} +0 -0
- /package/dist/{types/components/controls/RenderSelect.d.ts → components/controls/RenderSelect.d.mts} +0 -0
- /package/dist/{types/components/controls/index.d.ts → components/controls/index.d.mts} +0 -0
- /package/dist/{types/components/embed-card/EmbedCardResolver.d.ts → components/embed-card/EmbedCardResolver.d.mts} +0 -0
- /package/dist/{types/components/embed-card/EmbedPluginCard.d.ts → components/embed-card/EmbedPluginCard.d.mts} +0 -0
- /package/dist/{types/components/embed-card/card/BusyCard.d.ts → components/embed-card/card/BusyCard.d.mts} +0 -0
- /package/dist/{types/components/embed-card/card/EmbedCardHeader.d.ts → components/embed-card/card/EmbedCardHeader.d.mts} +0 -0
- /package/dist/{types/components/embed-card/card/EmbedPluginCard.d.ts → components/embed-card/card/EmbedPluginCard.d.mts} +0 -0
- /package/dist/{types/components/embed-card/card/index.d.ts → components/embed-card/card/index.d.mts} +0 -0
- /package/dist/{types/components/embed-card/error-handling/EmbedCardApiErrorRenderer.d.ts → components/embed-card/error-handling/EmbedCardApiErrorRenderer.d.mts} +0 -0
- /package/dist/{types/components/embed-card/error-handling/EmbedErrorCard.d.ts → components/embed-card/error-handling/EmbedErrorCard.d.mts} +0 -0
- /package/dist/{types/components/embed-card/error-handling/index.d.ts → components/embed-card/error-handling/index.d.mts} +0 -0
- /package/dist/{types/components/embed-card/index.d.ts → components/embed-card/index.d.mts} +0 -0
- /package/dist/{types/components/embed-card/menu/EmbedMenu.d.ts → components/embed-card/menu/EmbedMenu.d.mts} +0 -0
- /package/dist/{types/components/embed-card/menu/JsonMenuItem.d.ts → components/embed-card/menu/JsonMenuItem.d.mts} +0 -0
- /package/dist/{types/components/embed-card/menu/index.d.ts → components/embed-card/menu/index.d.mts} +0 -0
- /package/dist/{types/components/embed-plugin-stories/storyPayload.d.ts → components/embed-plugin-stories/storyPayload.d.mts} +0 -0
- /package/dist/{types/components/embed-plugin-stories/storyShared.d.ts → components/embed-plugin-stories/storyShared.d.mts} +0 -0
- /package/dist/{types/components/index.d.ts → components/index.d.mts} +0 -0
- /package/dist/{types/components/validation-alerts/ValidatePayload.d.ts → components/validation-alerts/ValidatePayload.d.mts} +0 -0
- /package/dist/{types/components/validation-alerts/ValidatePlugins.d.ts → components/validation-alerts/ValidatePlugins.d.mts} +0 -0
- /package/dist/{types/components/validation-alerts/index.d.ts → components/validation-alerts/index.d.mts} +0 -0
- /package/dist/{types/contexts/EmbedPluginContext/Context.d.ts → contexts/EmbedPluginContext/Context.d.mts} +0 -0
- /package/dist/{types/contexts/EmbedPluginContext/Provider.d.ts → contexts/EmbedPluginContext/Provider.d.mts} +0 -0
- /package/dist/{types/contexts/EmbedPluginContext/State.d.ts → contexts/EmbedPluginContext/State.d.mts} +0 -0
- /package/dist/{types/contexts/EmbedPluginContext/index.d.ts → contexts/EmbedPluginContext/index.d.mts} +0 -0
- /package/dist/{types/contexts/ResolvePayloadContext → contexts/EmbedPluginContext}/index.d.ts +0 -0
- /package/dist/{types/contexts/EmbedPluginContext/use.d.ts → contexts/EmbedPluginContext/use.d.mts} +0 -0
- /package/dist/{types/contexts/RefreshPayloadContext/Context.d.ts → contexts/RefreshPayloadContext/Context.d.mts} +0 -0
- /package/dist/{types/contexts/RefreshPayloadContext/Provider.d.ts → contexts/RefreshPayloadContext/Provider.d.mts} +0 -0
- /package/dist/{types/contexts/RefreshPayloadContext/State.d.ts → contexts/RefreshPayloadContext/State.d.mts} +0 -0
- /package/dist/{types/contexts/RefreshPayloadContext/index.d.ts → contexts/RefreshPayloadContext/index.d.mts} +0 -0
- /package/dist/{types/contexts/ValidatePayloadContext → contexts/RefreshPayloadContext}/index.d.ts +0 -0
- /package/dist/{types/contexts/RefreshPayloadContext/use.d.ts → contexts/RefreshPayloadContext/use.d.mts} +0 -0
- /package/dist/{types/contexts/ResolvePayloadContext/Context.d.ts → contexts/ResolvePayloadContext/Context.d.mts} +0 -0
- /package/dist/{types/contexts/ResolvePayloadContext/Provider.d.ts → contexts/ResolvePayloadContext/Provider.d.mts} +0 -0
- /package/dist/{types/contexts/ResolvePayloadContext/State.d.ts → contexts/ResolvePayloadContext/State.d.mts} +0 -0
- /package/dist/{types/contexts/ResolvePayloadContext/use.d.ts → contexts/ResolvePayloadContext/use.d.mts} +0 -0
- /package/dist/{types/contexts/ValidatePayloadContext/Context.d.ts → contexts/ValidatePayloadContext/Context.d.mts} +0 -0
- /package/dist/{types/contexts/ValidatePayloadContext/Provider.d.ts → contexts/ValidatePayloadContext/Provider.d.mts} +0 -0
- /package/dist/{types/contexts/ValidatePayloadContext/State.d.ts → contexts/ValidatePayloadContext/State.d.mts} +0 -0
- /package/dist/{types/contexts/ValidatePayloadContext/use.d.ts → contexts/ValidatePayloadContext/use.d.mts} +0 -0
- /package/dist/{types/contexts/index.d.ts → contexts/index.d.mts} +0 -0
- /package/dist/types/{types/EmbedPluginProps.d.ts → EmbedPluginProps.d.mts} +0 -0
- /package/dist/types/{types/index.d.ts → index.d.mts} +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA"}
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA"}
|
package/dist/index.js
ADDED
@@ -0,0 +1,543 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __create = Object.create;
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
+
var __export = (target, all) => {
|
9
|
+
for (var name in all)
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
11
|
+
};
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
14
|
+
for (let key of __getOwnPropNames(from))
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
|
+
}
|
18
|
+
return to;
|
19
|
+
};
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
26
|
+
mod
|
27
|
+
));
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
+
|
30
|
+
// src/index.ts
|
31
|
+
var src_exports = {};
|
32
|
+
__export(src_exports, {
|
33
|
+
ApiEmbedPluginCard: () => ApiEmbedPluginCard,
|
34
|
+
BusyCard: () => BusyCard,
|
35
|
+
EmbedCardHeader: () => EmbedCardHeader,
|
36
|
+
EmbedPlugin: () => EmbedPlugin,
|
37
|
+
EmbedPluginCard: () => EmbedPluginCard,
|
38
|
+
EmbedPluginCardInner: () => EmbedPluginCardInner,
|
39
|
+
EmbedPluginContext: () => EmbedPluginContext,
|
40
|
+
EmbedPluginInner: () => EmbedPluginInner,
|
41
|
+
EmbedPluginProvider: () => EmbedPluginProvider,
|
42
|
+
RefreshPayloadProvider: () => RefreshPayloadProvider,
|
43
|
+
ResolvePayloadContext: () => ResolvePayloadContext,
|
44
|
+
ResolvePayloadProvider: () => ResolvePayloadProvider,
|
45
|
+
ValidatePayloadProvider: () => ValidatePayloadProvider,
|
46
|
+
useEmbedPluginState: () => useEmbedPluginState,
|
47
|
+
useRefreshPayload: () => useRefreshPayload,
|
48
|
+
useResolvePayload: () => useResolvePayload,
|
49
|
+
useValidatePayload: () => useValidatePayload
|
50
|
+
});
|
51
|
+
module.exports = __toCommonJS(src_exports);
|
52
|
+
|
53
|
+
// src/components/embed-card/card/BusyCard.tsx
|
54
|
+
var import_material = require("@mui/material");
|
55
|
+
var import_react_flexbox = require("@xylabs/react-flexbox");
|
56
|
+
var import_react_shared = require("@xylabs/react-shared");
|
57
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
58
|
+
var BusyCard = ({
|
59
|
+
busy,
|
60
|
+
busyMinimum = 500,
|
61
|
+
busyVariant = "circular",
|
62
|
+
busyVariantProps,
|
63
|
+
children,
|
64
|
+
...props
|
65
|
+
}) => {
|
66
|
+
const internalBusy = (0, import_react_flexbox.useBusyTiming)(busy, busyMinimum);
|
67
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Card, { ...props, children: [
|
68
|
+
children,
|
69
|
+
busyVariant === "circular" && internalBusy ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_shared.BusyCircularProgress, { ...busyVariantProps }) : null,
|
70
|
+
busyVariant === "linear" && internalBusy ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_shared.BusyLinearProgress, { ...busyVariantProps }) : null
|
71
|
+
] });
|
72
|
+
};
|
73
|
+
|
74
|
+
// src/components/embed-card/card/EmbedCardHeader.tsx
|
75
|
+
var import_Refresh = __toESM(require("@mui/icons-material/Refresh"));
|
76
|
+
var import_material5 = require("@mui/material");
|
77
|
+
var import_react_flexbox2 = require("@xylabs/react-flexbox");
|
78
|
+
|
79
|
+
// src/contexts/EmbedPluginContext/Context.tsx
|
80
|
+
var import_react_shared2 = require("@xyo-network/react-shared");
|
81
|
+
var EmbedPluginContext = (0, import_react_shared2.createContextEx)();
|
82
|
+
|
83
|
+
// src/contexts/EmbedPluginContext/Provider.tsx
|
84
|
+
var import_react = require("react");
|
85
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
86
|
+
var EmbedPluginProvider = ({
|
87
|
+
children,
|
88
|
+
refreshTitle,
|
89
|
+
timestampLabel,
|
90
|
+
hideElementsConfig,
|
91
|
+
plugins,
|
92
|
+
embedPluginConfig
|
93
|
+
}) => {
|
94
|
+
const [activePlugin, setActivePlugin] = (0, import_react.useState)(plugins ? plugins[0] : void 0);
|
95
|
+
(0, import_react.useEffect)(() => {
|
96
|
+
setActivePlugin(plugins ? plugins[0] : void 0);
|
97
|
+
}, [plugins]);
|
98
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
99
|
+
EmbedPluginContext.Provider,
|
100
|
+
{
|
101
|
+
value: {
|
102
|
+
activePlugin,
|
103
|
+
embedPluginConfig,
|
104
|
+
hideElementsConfig,
|
105
|
+
provided: true,
|
106
|
+
refreshTitle,
|
107
|
+
setActivePlugin,
|
108
|
+
timestampLabel
|
109
|
+
},
|
110
|
+
children
|
111
|
+
}
|
112
|
+
);
|
113
|
+
};
|
114
|
+
|
115
|
+
// src/contexts/EmbedPluginContext/use.tsx
|
116
|
+
var import_react_shared3 = require("@xyo-network/react-shared");
|
117
|
+
var useEmbedPluginState = () => (0, import_react_shared3.useContextEx)(EmbedPluginContext, "EmbedPlugin", true);
|
118
|
+
|
119
|
+
// src/contexts/RefreshPayloadContext/Provider.tsx
|
120
|
+
var import_react2 = require("react");
|
121
|
+
|
122
|
+
// src/contexts/RefreshPayloadContext/Context.tsx
|
123
|
+
var import_react_shared4 = require("@xyo-network/react-shared");
|
124
|
+
var RefreshPayloadContext = (0, import_react_shared4.createContextEx)();
|
125
|
+
|
126
|
+
// src/contexts/RefreshPayloadContext/Provider.tsx
|
127
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
128
|
+
var RefreshPayloadProvider = ({ children, onRefresh, refreshPayload }) => {
|
129
|
+
const [localRefreshPayload, setRefreshPayload] = (0, import_react2.useState)(refreshPayload);
|
130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RefreshPayloadContext.Provider, { value: { onRefresh, provided: true, refreshPayload: localRefreshPayload, setRefreshPayload }, children });
|
131
|
+
};
|
132
|
+
|
133
|
+
// src/contexts/RefreshPayloadContext/use.tsx
|
134
|
+
var import_react_shared5 = require("@xyo-network/react-shared");
|
135
|
+
var useRefreshPayload = () => (0, import_react_shared5.useContextEx)(RefreshPayloadContext, "RefreshPayload", true);
|
136
|
+
|
137
|
+
// src/contexts/ResolvePayloadContext/Context.ts
|
138
|
+
var import_react_shared6 = require("@xyo-network/react-shared");
|
139
|
+
var ResolvePayloadContext = (0, import_react_shared6.createContextEx)();
|
140
|
+
|
141
|
+
// src/contexts/ResolvePayloadContext/Provider.tsx
|
142
|
+
var import_delay = require("@xylabs/delay");
|
143
|
+
var import_react_async_effect = require("@xylabs/react-async-effect");
|
144
|
+
var import_huri = require("@xyo-network/huri");
|
145
|
+
var import_payload_model = require("@xyo-network/payload-model");
|
146
|
+
var import_react3 = require("react");
|
147
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
148
|
+
var ResolvePayloadProvider = ({ children, huriPayload }) => {
|
149
|
+
const [payload, setPayload] = (0, import_react3.useState)();
|
150
|
+
const [huri, setHuri] = (0, import_react3.useState)();
|
151
|
+
const { refreshPayload, setRefreshPayload, onRefresh } = useRefreshPayload();
|
152
|
+
(0, import_react3.useEffect)(() => {
|
153
|
+
typeof huriPayload === "string" ? setHuri(huriPayload) : void 0;
|
154
|
+
if (typeof huriPayload === "object") {
|
155
|
+
setPayload(huriPayload);
|
156
|
+
setRefreshPayload?.(true);
|
157
|
+
}
|
158
|
+
}, [huriPayload, setRefreshPayload]);
|
159
|
+
const [notFound, setNotFound] = (0, import_react3.useState)();
|
160
|
+
const [huriError, setHuriError] = (0, import_react3.useState)();
|
161
|
+
(0, import_react_async_effect.useAsyncEffect)(
|
162
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
163
|
+
async (mounted) => {
|
164
|
+
if (huri && !refreshPayload) {
|
165
|
+
try {
|
166
|
+
const huriInstance = new import_huri.Huri(huri);
|
167
|
+
const result = await huriInstance.fetch();
|
168
|
+
await (0, import_delay.delay)(500);
|
169
|
+
if (mounted()) {
|
170
|
+
setNotFound(result === null);
|
171
|
+
setPayload(result);
|
172
|
+
setRefreshPayload?.(true);
|
173
|
+
}
|
174
|
+
} catch (e) {
|
175
|
+
const error = e;
|
176
|
+
setHuriError({ message: error.message, schema: import_payload_model.ModuleErrorSchema, sources: [] });
|
177
|
+
}
|
178
|
+
}
|
179
|
+
},
|
180
|
+
[huri, payload, refreshPayload, setRefreshPayload]
|
181
|
+
);
|
182
|
+
const refreshHuri = () => {
|
183
|
+
onRefresh?.();
|
184
|
+
if (huri) {
|
185
|
+
setRefreshPayload?.(false);
|
186
|
+
}
|
187
|
+
};
|
188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ResolvePayloadContext.Provider, { value: { huri, huriError, notFound, payload, provided: true, refreshHuri, setPayload }, children });
|
189
|
+
};
|
190
|
+
|
191
|
+
// src/contexts/ResolvePayloadContext/use.tsx
|
192
|
+
var import_react_shared7 = require("@xyo-network/react-shared");
|
193
|
+
var useResolvePayload = () => (0, import_react_shared7.useContextEx)(ResolvePayloadContext, "ResolvePayload", true);
|
194
|
+
|
195
|
+
// src/contexts/ValidatePayloadContext/Provider.tsx
|
196
|
+
var import_material2 = require("@mui/material");
|
197
|
+
var import_react_async_effect2 = require("@xylabs/react-async-effect");
|
198
|
+
var import_schema_cache = require("@xyo-network/schema-cache");
|
199
|
+
var import_react4 = require("react");
|
200
|
+
|
201
|
+
// src/contexts/ValidatePayloadContext/Context.ts
|
202
|
+
var import_react_shared8 = require("@xyo-network/react-shared");
|
203
|
+
var ValidatePayloadContext = (0, import_react_shared8.createContextEx)();
|
204
|
+
|
205
|
+
// src/contexts/ValidatePayloadContext/Provider.tsx
|
206
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
207
|
+
var ValidatePayloadProvider = ({ children, enabled = false }) => {
|
208
|
+
const { payload } = useResolvePayload();
|
209
|
+
const [initialized, setInitialized] = (0, import_react4.useState)(false);
|
210
|
+
const [valid, setValid] = (0, import_react4.useState)();
|
211
|
+
(0, import_react_async_effect2.useAsyncEffect)(
|
212
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
213
|
+
async () => {
|
214
|
+
if (payload && enabled) {
|
215
|
+
await import_schema_cache.SchemaCache.instance.get(payload.schema);
|
216
|
+
const possibleKnownSchema = payload.schema;
|
217
|
+
if (import_schema_cache.SchemaCache.instance.validators[possibleKnownSchema]) {
|
218
|
+
const validator = import_schema_cache.SchemaCache.instance.validators[possibleKnownSchema];
|
219
|
+
setValid(validator?.(payload));
|
220
|
+
}
|
221
|
+
setInitialized(true);
|
222
|
+
}
|
223
|
+
},
|
224
|
+
[payload, enabled]
|
225
|
+
);
|
226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ValidatePayloadContext.Provider, { value: { enabled, provided: true, schema: payload?.schema, validPayload: valid }, children: enabled ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children: initialized ? children : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material2.Chip, { label: "Validating Payload..." }) }) : children });
|
227
|
+
};
|
228
|
+
|
229
|
+
// src/contexts/ValidatePayloadContext/use.tsx
|
230
|
+
var import_react_shared9 = require("@xyo-network/react-shared");
|
231
|
+
var useValidatePayload = () => (0, import_react_shared9.useContextEx)(ValidatePayloadContext, "ValidateSchema", true);
|
232
|
+
|
233
|
+
// src/components/embed-card/menu/EmbedMenu.tsx
|
234
|
+
var import_MoreVert = __toESM(require("@mui/icons-material/MoreVert"));
|
235
|
+
var import_material4 = require("@mui/material");
|
236
|
+
var import_react5 = require("react");
|
237
|
+
|
238
|
+
// src/components/embed-card/menu/JsonMenuItem.tsx
|
239
|
+
var import_OpenInNew = __toESM(require("@mui/icons-material/OpenInNew"));
|
240
|
+
var import_material3 = require("@mui/material");
|
241
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
242
|
+
var JsonMenuItem = (props) => {
|
243
|
+
const { huri } = useResolvePayload();
|
244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: huri ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_material3.MenuItem, { title: "Source Payload JSON", onClick: () => window.open(huri, "_blank"), ...props, children: [
|
245
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material3.ListItemText, { sx: { mr: 1 }, children: "JSON" }),
|
246
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material3.ListItemIcon, { sx: { justifyContent: "end" }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_OpenInNew.default, { fontSize: "small" }) })
|
247
|
+
] }) : null });
|
248
|
+
};
|
249
|
+
|
250
|
+
// src/components/embed-card/menu/EmbedMenu.tsx
|
251
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
252
|
+
var EmbedMenu = (props) => {
|
253
|
+
const [anchorEl, setAnchorEl] = (0, import_react5.useState)(null);
|
254
|
+
const open = Boolean(anchorEl);
|
255
|
+
const handleClick = (event) => {
|
256
|
+
setAnchorEl(event.currentTarget);
|
257
|
+
};
|
258
|
+
const handleClose = () => {
|
259
|
+
setAnchorEl(null);
|
260
|
+
};
|
261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
262
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material4.IconButton, { onClick: handleClick, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_MoreVert.default, {}) }),
|
263
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material4.Menu, { anchorEl, open, onClose: handleClose, PaperProps: { variant: "elevation" }, MenuListProps: { dense: true }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(JsonMenuItem, {}) })
|
264
|
+
] });
|
265
|
+
};
|
266
|
+
|
267
|
+
// src/components/embed-card/card/EmbedCardHeader.tsx
|
268
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
269
|
+
var EmbedCardHeader = () => {
|
270
|
+
const { refreshHuri, huri } = useResolvePayload();
|
271
|
+
const { activePlugin, timestampLabel, hideElementsConfig } = useEmbedPluginState();
|
272
|
+
const { hideAvatar, hideTitle, hideRefreshButton, hideTimestamp, hideCardActions } = hideElementsConfig ?? {};
|
273
|
+
const timestamp = Date.now();
|
274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
275
|
+
import_material5.CardHeader,
|
276
|
+
{
|
277
|
+
sx: { flexWrap: "wrap", rowGap: 1 },
|
278
|
+
avatar: hideAvatar ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, {}) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material5.Avatar, { sx: { bgcolor: (theme) => theme.palette.primary.main }, "aria-label": activePlugin?.name, children: activePlugin?.name?.charAt(0) }),
|
279
|
+
action: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_flexbox2.FlexRow, { flexWrap: "wrap", columnGap: 0.5, children: [
|
280
|
+
timestamp ? hideTimestamp && hideRefreshButton ? "" : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
281
|
+
import_material5.Chip,
|
282
|
+
{
|
283
|
+
avatar: hideRefreshButton ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, {}) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_Refresh.default, {}),
|
284
|
+
clickable: hideRefreshButton ? false : true,
|
285
|
+
onClick: refreshHuri,
|
286
|
+
label: hideTimestamp ? "" : `${timestampLabel} ${new Date(timestamp).toLocaleString()}`
|
287
|
+
}
|
288
|
+
) : null,
|
289
|
+
hideCardActions || huri === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(EmbedMenu, {})
|
290
|
+
] }),
|
291
|
+
title: hideTitle ? "" : activePlugin?.name
|
292
|
+
}
|
293
|
+
);
|
294
|
+
};
|
295
|
+
|
296
|
+
// src/components/embed-card/card/EmbedPluginCard.tsx
|
297
|
+
var import_material9 = require("@mui/material");
|
298
|
+
var import_react_flexbox3 = require("@xylabs/react-flexbox");
|
299
|
+
var import_react_shared11 = require("@xyo-network/react-shared");
|
300
|
+
|
301
|
+
// src/components/controls/EmbedFormControl.tsx
|
302
|
+
var import_material6 = require("@mui/material");
|
303
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
304
|
+
var EmbedFormControl = ({ formId, formLabel, children, ...props }) => {
|
305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_material6.FormControl, { ...props, children: [
|
306
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_material6.InputLabel, { id: formId, children: formLabel }),
|
307
|
+
children
|
308
|
+
] });
|
309
|
+
};
|
310
|
+
|
311
|
+
// src/components/controls/ListModeSelect.tsx
|
312
|
+
var import_material7 = require("@mui/material");
|
313
|
+
var import_react_shared10 = require("@xyo-network/react-shared");
|
314
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
315
|
+
var listModeSelectId = "listmode-select-id";
|
316
|
+
var listModeSelectLabel = "List Mode";
|
317
|
+
var ListModeSelect = (props) => {
|
318
|
+
const { listMode, setListMode } = (0, import_react_shared10.useListMode)();
|
319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
320
|
+
import_material7.Select,
|
321
|
+
{
|
322
|
+
value: listMode ?? "default",
|
323
|
+
onChange: (event) => {
|
324
|
+
setListMode?.(event.target.value);
|
325
|
+
},
|
326
|
+
...props,
|
327
|
+
children: [
|
328
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material7.MenuItem, { value: "default", children: "Default" }, "default"),
|
329
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material7.MenuItem, { value: "table", children: "Table" }, "table"),
|
330
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material7.MenuItem, { value: "grid", children: "Grid" }, "grid")
|
331
|
+
]
|
332
|
+
}
|
333
|
+
);
|
334
|
+
};
|
335
|
+
var ListModeSelectFormControl = (props) => {
|
336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(EmbedFormControl, { formId: listModeSelectId, formLabel: listModeSelectLabel, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ListModeSelect, { size: "small", label: listModeSelectLabel, labelId: listModeSelectId, ...props }) });
|
337
|
+
};
|
338
|
+
|
339
|
+
// src/components/controls/RenderSelect.tsx
|
340
|
+
var import_material8 = require("@mui/material");
|
341
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
342
|
+
var renderSelectId = "render-select-id";
|
343
|
+
var renderSelectLabel = "Renderer";
|
344
|
+
var EmbedRenderSelect = (props) => {
|
345
|
+
const { activePlugin, setActivePlugin, plugins } = useEmbedPluginState();
|
346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(EmbedFormControl, { formId: renderSelectId, formLabel: renderSelectLabel, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material8.Select, { size: "small", value: activePlugin?.name, ...props, children: plugins?.map((plugin) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material8.MenuItem, { value: plugin.name, onClick: () => setActivePlugin?.(plugin), children: plugin.name }, plugin.name)) }) });
|
347
|
+
};
|
348
|
+
|
349
|
+
// src/components/embed-card/card/EmbedPluginCard.tsx
|
350
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
351
|
+
var EmbedPluginCard = ({ ...props }) => {
|
352
|
+
const { payload } = useResolvePayload();
|
353
|
+
const { activePlugin: ActivePlugin, plugins, hideElementsConfig } = useEmbedPluginState();
|
354
|
+
const { listMode } = (0, import_react_shared11.useListMode)();
|
355
|
+
const supportsListMode = ActivePlugin?.components?.box?.listModes?.length ?? 0 > 1;
|
356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(BusyCard, { ...props, children: [
|
357
|
+
hideElementsConfig?.hideCardHeader ? null : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(EmbedCardHeader, {}),
|
358
|
+
plugins && plugins.length || supportsListMode ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_flexbox3.FlexGrowRow, { columnGap: 2, rowGap: 2, flexWrap: "wrap", pb: 1, children: [
|
359
|
+
plugins && plugins.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(EmbedRenderSelect, {}) : null,
|
360
|
+
supportsListMode ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ListModeSelectFormControl, {}) : null
|
361
|
+
] }) : null,
|
362
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material9.CardContent, { sx: { height: "100%" }, children: ActivePlugin ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ActivePlugin.components.box.detailsBox, { payload, ...supportsListMode && { listMode } }) : null })
|
363
|
+
] });
|
364
|
+
};
|
365
|
+
|
366
|
+
// src/components/embed-card/EmbedPluginCard.tsx
|
367
|
+
var import_material13 = require("@mui/material");
|
368
|
+
|
369
|
+
// src/components/EmbedPlugin.tsx
|
370
|
+
var import_react_shared13 = require("@xyo-network/react-shared");
|
371
|
+
|
372
|
+
// src/components/EmbedResolver.tsx
|
373
|
+
var import_react_shared12 = require("@xyo-network/react-shared");
|
374
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
375
|
+
var EmbedResolver = ({ children }) => {
|
376
|
+
const { payload, notFound, huriError } = useResolvePayload();
|
377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_shared12.LoadResult, { searchResult: payload, notFound: !!notFound, error: !!huriError, children });
|
378
|
+
};
|
379
|
+
|
380
|
+
// src/components/validation-alerts/ValidatePayload.tsx
|
381
|
+
var import_material10 = require("@mui/material");
|
382
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
383
|
+
var ValidatePayloadAlert = ({ children, ...props }) => {
|
384
|
+
const { validPayload, enabled, schema } = useValidatePayload();
|
385
|
+
if (enabled && validPayload === false) {
|
386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material10.Alert, { severity: "error", title: "Invalid Payload!", ...props, children: [
|
387
|
+
"Payload schema claimed to be ",
|
388
|
+
schema,
|
389
|
+
" but failed to validate."
|
390
|
+
] });
|
391
|
+
}
|
392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jsx_runtime14.Fragment, { children });
|
393
|
+
};
|
394
|
+
|
395
|
+
// src/components/validation-alerts/ValidatePlugins.tsx
|
396
|
+
var import_material11 = require("@mui/material");
|
397
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
398
|
+
var ValidatePluginsAlert = ({ children, ...props }) => {
|
399
|
+
const { payload } = useResolvePayload();
|
400
|
+
const { plugins } = useEmbedPluginState();
|
401
|
+
if (payload && plugins?.length === 0) {
|
402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_material11.Alert, { severity: "warning", ...props, children: [
|
403
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_material11.AlertTitle, { children: "Missing plugins!" }),
|
404
|
+
"Payload found but no plugins were present."
|
405
|
+
] });
|
406
|
+
}
|
407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children });
|
408
|
+
};
|
409
|
+
|
410
|
+
// src/components/EmbedPlugin.tsx
|
411
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
412
|
+
var EmbedPluginInner = ({
|
413
|
+
validateSchema,
|
414
|
+
plugins = [],
|
415
|
+
huriPayload,
|
416
|
+
refreshTitle = "",
|
417
|
+
timestampLabel = "Data From",
|
418
|
+
hideElementsConfig,
|
419
|
+
embedPluginConfig,
|
420
|
+
onRefresh,
|
421
|
+
children
|
422
|
+
}) => {
|
423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_shared13.ErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
424
|
+
EmbedPluginProvider,
|
425
|
+
{
|
426
|
+
refreshTitle,
|
427
|
+
timestampLabel,
|
428
|
+
hideElementsConfig,
|
429
|
+
plugins,
|
430
|
+
embedPluginConfig,
|
431
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(WithResolvers, { onRefresh, huriPayload, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(WithValidators, { validateSchema, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_shared13.ListModeProvider, { defaultListMode: embedPluginConfig?.listMode, children }) }) })
|
432
|
+
}
|
433
|
+
) });
|
434
|
+
};
|
435
|
+
var WithResolvers = ({ children, onRefresh, huriPayload }) => {
|
436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(RefreshPayloadProvider, { onRefresh, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ResolvePayloadProvider, { huriPayload, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(EmbedResolver, { children }) }) });
|
437
|
+
};
|
438
|
+
var WithValidators = ({ children, validateSchema }) => {
|
439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ValidatePayloadProvider, { enabled: validateSchema, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ValidatePluginsAlert, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ValidatePayloadAlert, { children }) }) });
|
440
|
+
};
|
441
|
+
|
442
|
+
// src/components/embed-card/error-handling/EmbedCardApiErrorRenderer.tsx
|
443
|
+
var import_react_error = require("@xyo-network/react-error");
|
444
|
+
|
445
|
+
// src/components/embed-card/error-handling/EmbedErrorCard.tsx
|
446
|
+
var import_material12 = require("@mui/material");
|
447
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
448
|
+
var EmbedErrorCard = (props) => {
|
449
|
+
const { alertProps, error, hideErrorDetails = true, children, ...cardProps } = props;
|
450
|
+
const errorProps = { alertProps, error, hideErrorDetails };
|
451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material12.Card, { ...cardProps, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material12.CardContent, { children: children ?? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DefaultErrorAlert, { ...errorProps }) }) });
|
452
|
+
};
|
453
|
+
var DefaultErrorAlert = ({ alertProps, hideErrorDetails, error }) => {
|
454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material12.Alert, { severity: "error", ...alertProps, children: [
|
455
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material12.AlertTitle, { children: "Whoops! Something went wrong" }),
|
456
|
+
!hideErrorDetails && error ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
457
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material12.Typography, { variant: "caption", children: "Error: " }),
|
458
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material12.Typography, { variant: "caption", children: error?.message })
|
459
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material12.Typography, { variant: "caption", fontSize: "small", children: "Error Loading Plugin" })
|
460
|
+
] });
|
461
|
+
};
|
462
|
+
|
463
|
+
// src/components/embed-card/error-handling/EmbedCardApiErrorRenderer.tsx
|
464
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
465
|
+
var EmbedCardApiErrorRenderer = ({ xyoError, children, ...props }) => {
|
466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_error.ErrorRender, { error: xyoError, noReAuth: true, noErrorDisplay: true, customError: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CustomApiErrorCard, { xyoError, ...props }), children });
|
467
|
+
};
|
468
|
+
var CustomApiErrorCard = ({ xyoError, ...props }) => {
|
469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(EmbedErrorCard, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_error.ErrorAlert, { error: xyoError }) });
|
470
|
+
};
|
471
|
+
|
472
|
+
// src/components/embed-card/EmbedPluginCard.tsx
|
473
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
474
|
+
var ApiEmbedPluginCard = ({ children, ...props }) => {
|
475
|
+
const {
|
476
|
+
validateSchema,
|
477
|
+
plugins = [],
|
478
|
+
huriPayload,
|
479
|
+
refreshTitle = "",
|
480
|
+
timestampLabel = "Data From",
|
481
|
+
hideElementsConfig,
|
482
|
+
embedPluginConfig,
|
483
|
+
onRefresh,
|
484
|
+
...busyCardProps
|
485
|
+
} = props;
|
486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
487
|
+
EmbedPluginInner,
|
488
|
+
{
|
489
|
+
...{
|
490
|
+
embedPluginConfig,
|
491
|
+
hideElementsConfig,
|
492
|
+
huriPayload,
|
493
|
+
onRefresh,
|
494
|
+
plugins,
|
495
|
+
refreshTitle,
|
496
|
+
timestampLabel,
|
497
|
+
validateSchema
|
498
|
+
},
|
499
|
+
children: [
|
500
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(EmbedPluginCardInner, { ...busyCardProps }),
|
501
|
+
children
|
502
|
+
]
|
503
|
+
}
|
504
|
+
);
|
505
|
+
};
|
506
|
+
var EmbedPluginCardInner = (props) => {
|
507
|
+
const { payload, huriError } = useResolvePayload();
|
508
|
+
const { refreshPayload } = useRefreshPayload();
|
509
|
+
const theme = (0, import_material13.useTheme)();
|
510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(EmbedCardApiErrorRenderer, { xyoError: huriError, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
511
|
+
EmbedPluginCard,
|
512
|
+
{
|
513
|
+
elevation: 3,
|
514
|
+
variant: "elevation",
|
515
|
+
busy: Boolean(!refreshPayload && payload),
|
516
|
+
busyVariantProps: { style: { alignItems: "start", paddingTop: theme.spacing(2), zIndex: 2 } },
|
517
|
+
sx: { position: "relative" },
|
518
|
+
...props
|
519
|
+
}
|
520
|
+
) });
|
521
|
+
};
|
522
|
+
var EmbedPlugin = EmbedPluginCard;
|
523
|
+
// Annotate the CommonJS export names for ESM import in node:
|
524
|
+
0 && (module.exports = {
|
525
|
+
ApiEmbedPluginCard,
|
526
|
+
BusyCard,
|
527
|
+
EmbedCardHeader,
|
528
|
+
EmbedPlugin,
|
529
|
+
EmbedPluginCard,
|
530
|
+
EmbedPluginCardInner,
|
531
|
+
EmbedPluginContext,
|
532
|
+
EmbedPluginInner,
|
533
|
+
EmbedPluginProvider,
|
534
|
+
RefreshPayloadProvider,
|
535
|
+
ResolvePayloadContext,
|
536
|
+
ResolvePayloadProvider,
|
537
|
+
ValidatePayloadProvider,
|
538
|
+
useEmbedPluginState,
|
539
|
+
useRefreshPayload,
|
540
|
+
useResolvePayload,
|
541
|
+
useValidatePayload
|
542
|
+
});
|
543
|
+
//# sourceMappingURL=index.js.map
|