@xyo-network/react-embed 2.62.3 → 2.63.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/components/EmbedPlugin.js +19 -0
- package/dist/cjs/components/EmbedPlugin.js.map +1 -0
- package/dist/cjs/components/EmbedResolver.js +12 -0
- package/dist/cjs/components/EmbedResolver.js.map +1 -0
- package/dist/cjs/components/controls/EmbedFormControl.js +12 -0
- package/dist/cjs/components/controls/EmbedFormControl.js.map +1 -0
- package/dist/cjs/components/controls/ListModeSelect.js +21 -0
- package/dist/cjs/components/controls/ListModeSelect.js.map +1 -0
- package/dist/cjs/components/controls/RenderSelect.js +15 -0
- package/dist/cjs/components/controls/RenderSelect.js.map +1 -0
- package/dist/cjs/components/controls/index.js +7 -0
- package/dist/cjs/components/controls/index.js.map +1 -0
- package/dist/cjs/components/embed-card/EmbedCardResolver.js +19 -0
- package/dist/cjs/components/embed-card/EmbedCardResolver.js.map +1 -0
- package/dist/cjs/components/embed-card/EmbedPluginCard.js +35 -0
- package/dist/cjs/components/embed-card/EmbedPluginCard.js.map +1 -0
- package/dist/cjs/components/embed-card/card/BusyCard.js +15 -0
- package/dist/cjs/components/embed-card/card/BusyCard.js.map +1 -0
- package/dist/cjs/components/embed-card/card/EmbedCardHeader.js +21 -0
- package/dist/cjs/components/embed-card/card/EmbedCardHeader.js.map +1 -0
- package/dist/cjs/components/embed-card/card/EmbedPluginCard.js +23 -0
- package/dist/cjs/components/embed-card/card/EmbedPluginCard.js.map +1 -0
- package/dist/cjs/components/embed-card/card/index.js +7 -0
- package/dist/cjs/components/embed-card/card/index.js.map +1 -0
- package/dist/cjs/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js +17 -0
- package/dist/cjs/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js.map +1 -0
- package/dist/cjs/components/embed-card/error-handling/EmbedErrorCard.js +16 -0
- package/dist/cjs/components/embed-card/error-handling/EmbedErrorCard.js.map +1 -0
- package/dist/cjs/components/embed-card/error-handling/index.js +6 -0
- package/dist/cjs/components/embed-card/error-handling/index.js.map +1 -0
- package/dist/cjs/components/embed-card/index.js +6 -0
- package/dist/cjs/components/embed-card/index.js.map +1 -0
- package/dist/cjs/components/embed-card/menu/EmbedMenu.js +23 -0
- package/dist/cjs/components/embed-card/menu/EmbedMenu.js.map +1 -0
- package/dist/cjs/components/embed-card/menu/JsonMenuItem.js +14 -0
- package/dist/cjs/components/embed-card/menu/JsonMenuItem.js.map +1 -0
- package/dist/cjs/components/embed-card/menu/index.js +5 -0
- package/dist/cjs/components/embed-card/menu/index.js.map +1 -0
- package/dist/cjs/components/embed-plugin-stories/storyPayload.js +25 -0
- package/dist/cjs/components/embed-plugin-stories/storyPayload.js.map +1 -0
- package/dist/cjs/components/embed-plugin-stories/storyShared.js +20 -0
- package/dist/cjs/components/embed-plugin-stories/storyShared.js.map +1 -0
- package/dist/cjs/components/index.js +6 -0
- package/dist/cjs/components/index.js.map +1 -0
- package/dist/cjs/components/validation-alerts/ValidatePayload.js +17 -0
- package/dist/cjs/components/validation-alerts/ValidatePayload.js.map +1 -0
- package/dist/cjs/components/validation-alerts/ValidatePlugins.js +18 -0
- package/dist/cjs/components/validation-alerts/ValidatePlugins.js.map +1 -0
- package/dist/cjs/components/validation-alerts/index.js +6 -0
- package/dist/cjs/components/validation-alerts/index.js.map +1 -0
- package/dist/cjs/contexts/EmbedPluginContext/Context.js +6 -0
- package/dist/cjs/contexts/EmbedPluginContext/Context.js.map +1 -0
- package/dist/cjs/contexts/EmbedPluginContext/Provider.js +24 -0
- package/dist/cjs/contexts/EmbedPluginContext/Provider.js.map +1 -0
- package/dist/cjs/contexts/EmbedPluginContext/State.js +3 -0
- package/dist/cjs/contexts/EmbedPluginContext/State.js.map +1 -0
- package/dist/cjs/contexts/EmbedPluginContext/index.js +8 -0
- package/dist/cjs/contexts/EmbedPluginContext/index.js.map +1 -0
- package/dist/cjs/contexts/EmbedPluginContext/use.js +8 -0
- package/dist/cjs/contexts/EmbedPluginContext/use.js.map +1 -0
- package/dist/cjs/contexts/RefreshPayloadContext/Context.js +6 -0
- package/dist/cjs/contexts/RefreshPayloadContext/Context.js.map +1 -0
- package/dist/cjs/contexts/RefreshPayloadContext/Provider.js +12 -0
- package/dist/cjs/contexts/RefreshPayloadContext/Provider.js.map +1 -0
- package/dist/cjs/contexts/RefreshPayloadContext/State.js +3 -0
- package/dist/cjs/contexts/RefreshPayloadContext/State.js.map +1 -0
- package/dist/cjs/contexts/RefreshPayloadContext/index.js +7 -0
- package/dist/cjs/contexts/RefreshPayloadContext/index.js.map +1 -0
- package/dist/cjs/contexts/RefreshPayloadContext/use.js +8 -0
- package/dist/cjs/contexts/RefreshPayloadContext/use.js.map +1 -0
- package/dist/cjs/contexts/ResolvePayloadContext/Context.js +6 -0
- package/dist/cjs/contexts/ResolvePayloadContext/Context.js.map +1 -0
- package/dist/cjs/contexts/ResolvePayloadContext/Provider.js +56 -0
- package/dist/cjs/contexts/ResolvePayloadContext/Provider.js.map +1 -0
- package/dist/cjs/contexts/ResolvePayloadContext/State.js +3 -0
- package/dist/cjs/contexts/ResolvePayloadContext/State.js.map +1 -0
- package/dist/cjs/contexts/ResolvePayloadContext/index.js +8 -0
- package/dist/cjs/contexts/ResolvePayloadContext/index.js.map +1 -0
- package/dist/cjs/contexts/ResolvePayloadContext/use.js +8 -0
- package/dist/cjs/contexts/ResolvePayloadContext/use.js.map +1 -0
- package/dist/cjs/contexts/ValidatePayloadContext/Context.js +6 -0
- package/dist/cjs/contexts/ValidatePayloadContext/Context.js.map +1 -0
- package/dist/cjs/contexts/ValidatePayloadContext/Provider.js +32 -0
- package/dist/cjs/contexts/ValidatePayloadContext/Provider.js.map +1 -0
- package/dist/cjs/contexts/ValidatePayloadContext/State.js +3 -0
- package/dist/cjs/contexts/ValidatePayloadContext/State.js.map +1 -0
- package/dist/cjs/contexts/ValidatePayloadContext/index.js +7 -0
- package/dist/cjs/contexts/ValidatePayloadContext/index.js.map +1 -0
- package/dist/cjs/contexts/ValidatePayloadContext/use.js +8 -0
- package/dist/cjs/contexts/ValidatePayloadContext/use.js.map +1 -0
- package/dist/cjs/contexts/index.js +8 -0
- package/dist/cjs/contexts/index.js.map +1 -0
- package/dist/cjs/index.js +7 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/types/EmbedPluginProps.js +3 -0
- package/dist/cjs/types/EmbedPluginProps.js.map +1 -0
- package/dist/cjs/types/index.js +5 -0
- package/dist/cjs/types/index.js.map +1 -0
- package/dist/docs.json +113 -113
- package/dist/esm/components/EmbedPlugin.js +15 -0
- package/dist/esm/components/EmbedPlugin.js.map +1 -0
- package/dist/esm/components/EmbedResolver.js +8 -0
- package/dist/esm/components/EmbedResolver.js.map +1 -0
- package/dist/esm/components/controls/EmbedFormControl.js +6 -0
- package/dist/esm/components/controls/EmbedFormControl.js.map +1 -0
- package/dist/esm/components/controls/ListModeSelect.js +16 -0
- package/dist/esm/components/controls/ListModeSelect.js.map +1 -0
- package/dist/esm/components/controls/RenderSelect.js +11 -0
- package/dist/esm/components/controls/RenderSelect.js.map +1 -0
- package/dist/{components/controls/index.d.mts → esm/components/controls/index.js} +1 -1
- package/dist/esm/components/controls/index.js.map +1 -0
- package/dist/esm/components/embed-card/EmbedCardResolver.js +13 -0
- package/dist/esm/components/embed-card/EmbedCardResolver.js.map +1 -0
- package/dist/esm/components/embed-card/EmbedPluginCard.js +28 -0
- package/dist/esm/components/embed-card/EmbedPluginCard.js.map +1 -0
- package/dist/esm/components/embed-card/card/BusyCard.js +9 -0
- package/dist/esm/components/embed-card/card/BusyCard.js.map +1 -0
- package/dist/esm/components/embed-card/card/EmbedCardHeader.js +15 -0
- package/dist/esm/components/embed-card/card/EmbedCardHeader.js.map +1 -0
- package/dist/esm/components/embed-card/card/EmbedPluginCard.js +16 -0
- package/dist/esm/components/embed-card/card/EmbedPluginCard.js.map +1 -0
- package/dist/{components/embed-card/card/index.d.mts → esm/components/embed-card/card/index.js} +1 -1
- package/dist/esm/components/embed-card/card/index.js.map +1 -0
- package/dist/esm/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js +10 -0
- package/dist/esm/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js.map +1 -0
- package/dist/esm/components/embed-card/error-handling/EmbedErrorCard.js +11 -0
- package/dist/esm/components/embed-card/error-handling/EmbedErrorCard.js.map +1 -0
- package/dist/{components/embed-card/error-handling/index.d.mts → esm/components/embed-card/error-handling/index.js} +1 -1
- package/dist/esm/components/embed-card/error-handling/index.js.map +1 -0
- package/dist/{components/embed-card/index.d.mts → esm/components/embed-card/index.js} +1 -1
- package/dist/esm/components/embed-card/index.js.map +1 -0
- package/dist/esm/components/embed-card/menu/EmbedMenu.js +18 -0
- package/dist/esm/components/embed-card/menu/EmbedMenu.js.map +1 -0
- package/dist/esm/components/embed-card/menu/JsonMenuItem.js +9 -0
- package/dist/esm/components/embed-card/menu/JsonMenuItem.js.map +1 -0
- package/dist/esm/components/embed-card/menu/index.js +2 -0
- package/dist/esm/components/embed-card/menu/index.js.map +1 -0
- package/dist/esm/components/embed-plugin-stories/storyPayload.js +22 -0
- package/dist/esm/components/embed-plugin-stories/storyPayload.js.map +1 -0
- package/dist/esm/components/embed-plugin-stories/storyShared.js +16 -0
- package/dist/esm/components/embed-plugin-stories/storyShared.js.map +1 -0
- package/dist/{components/index.d.mts → esm/components/index.js} +1 -1
- package/dist/esm/components/index.js.map +1 -0
- package/dist/esm/components/validation-alerts/ValidatePayload.js +11 -0
- package/dist/esm/components/validation-alerts/ValidatePayload.js.map +1 -0
- package/dist/esm/components/validation-alerts/ValidatePlugins.js +12 -0
- package/dist/esm/components/validation-alerts/ValidatePlugins.js.map +1 -0
- package/dist/{components/validation-alerts/index.d.mts → esm/components/validation-alerts/index.js} +1 -1
- package/dist/esm/components/validation-alerts/index.js.map +1 -0
- package/dist/esm/contexts/EmbedPluginContext/Context.js +3 -0
- package/dist/esm/contexts/EmbedPluginContext/Context.js.map +1 -0
- package/dist/esm/contexts/EmbedPluginContext/Provider.js +20 -0
- package/dist/esm/contexts/EmbedPluginContext/Provider.js.map +1 -0
- package/dist/esm/contexts/EmbedPluginContext/State.js +2 -0
- package/dist/esm/contexts/EmbedPluginContext/State.js.map +1 -0
- package/dist/{contexts/EmbedPluginContext/index.d.mts → esm/contexts/EmbedPluginContext/index.js} +1 -1
- package/dist/esm/contexts/EmbedPluginContext/index.js.map +1 -0
- package/dist/esm/contexts/EmbedPluginContext/use.js +4 -0
- package/dist/esm/contexts/EmbedPluginContext/use.js.map +1 -0
- package/dist/esm/contexts/RefreshPayloadContext/Context.js +3 -0
- package/dist/esm/contexts/RefreshPayloadContext/Context.js.map +1 -0
- package/dist/esm/contexts/RefreshPayloadContext/Provider.js +8 -0
- package/dist/esm/contexts/RefreshPayloadContext/Provider.js.map +1 -0
- package/dist/esm/contexts/RefreshPayloadContext/State.js +2 -0
- package/dist/esm/contexts/RefreshPayloadContext/State.js.map +1 -0
- package/dist/{contexts/ValidatePayloadContext/index.d.mts → esm/contexts/RefreshPayloadContext/index.js} +1 -1
- package/dist/esm/contexts/RefreshPayloadContext/index.js.map +1 -0
- package/dist/esm/contexts/RefreshPayloadContext/use.js +4 -0
- package/dist/esm/contexts/RefreshPayloadContext/use.js.map +1 -0
- package/dist/esm/contexts/ResolvePayloadContext/Context.js +3 -0
- package/dist/esm/contexts/ResolvePayloadContext/Context.js.map +1 -0
- package/dist/esm/contexts/ResolvePayloadContext/Provider.js +51 -0
- package/dist/esm/contexts/ResolvePayloadContext/Provider.js.map +1 -0
- package/dist/esm/contexts/ResolvePayloadContext/State.js +2 -0
- package/dist/esm/contexts/ResolvePayloadContext/State.js.map +1 -0
- package/dist/{contexts/ResolvePayloadContext/index.d.mts → esm/contexts/ResolvePayloadContext/index.js} +1 -1
- package/dist/esm/contexts/ResolvePayloadContext/index.js.map +1 -0
- package/dist/esm/contexts/ResolvePayloadContext/use.js +4 -0
- package/dist/esm/contexts/ResolvePayloadContext/use.js.map +1 -0
- package/dist/esm/contexts/ValidatePayloadContext/Context.js +3 -0
- package/dist/esm/contexts/ValidatePayloadContext/Context.js.map +1 -0
- package/dist/esm/contexts/ValidatePayloadContext/Provider.js +27 -0
- package/dist/esm/contexts/ValidatePayloadContext/Provider.js.map +1 -0
- package/dist/esm/contexts/ValidatePayloadContext/State.js +2 -0
- package/dist/esm/contexts/ValidatePayloadContext/State.js.map +1 -0
- package/dist/{contexts/RefreshPayloadContext/index.d.mts → esm/contexts/ValidatePayloadContext/index.js} +1 -1
- package/dist/esm/contexts/ValidatePayloadContext/index.js.map +1 -0
- package/dist/esm/contexts/ValidatePayloadContext/use.js +4 -0
- package/dist/esm/contexts/ValidatePayloadContext/use.js.map +1 -0
- package/dist/{contexts/index.d.mts → esm/contexts/index.js} +1 -1
- package/dist/esm/contexts/index.js.map +1 -0
- package/dist/{index.d.mts → esm/index.js} +1 -1
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/types/EmbedPluginProps.js +2 -0
- package/dist/esm/types/EmbedPluginProps.js.map +1 -0
- package/dist/esm/types/index.js +2 -0
- package/dist/esm/types/index.js.map +1 -0
- package/dist/types/components/EmbedPlugin.d.ts.map +1 -0
- package/dist/types/components/EmbedResolver.d.ts.map +1 -0
- package/dist/types/components/controls/EmbedFormControl.d.ts.map +1 -0
- package/dist/types/components/controls/ListModeSelect.d.ts.map +1 -0
- package/dist/types/components/controls/RenderSelect.d.ts.map +1 -0
- package/dist/types/components/controls/index.d.ts.map +1 -0
- package/dist/types/components/embed-card/EmbedCardResolver.d.ts.map +1 -0
- package/dist/types/components/embed-card/EmbedPluginCard.d.ts.map +1 -0
- package/dist/types/components/embed-card/card/BusyCard.d.ts.map +1 -0
- package/dist/types/components/embed-card/card/EmbedCardHeader.d.ts.map +1 -0
- package/dist/types/components/embed-card/card/EmbedPluginCard.d.ts.map +1 -0
- package/dist/types/components/embed-card/card/index.d.ts.map +1 -0
- package/dist/types/components/embed-card/error-handling/EmbedCardApiErrorRenderer.d.ts.map +1 -0
- package/dist/types/components/embed-card/error-handling/EmbedErrorCard.d.ts.map +1 -0
- package/dist/types/components/embed-card/error-handling/index.d.ts.map +1 -0
- package/dist/types/components/embed-card/index.d.ts.map +1 -0
- package/dist/types/components/embed-card/menu/EmbedMenu.d.ts.map +1 -0
- package/dist/types/components/embed-card/menu/JsonMenuItem.d.ts.map +1 -0
- package/dist/types/components/embed-card/menu/index.d.ts.map +1 -0
- package/dist/types/components/embed-plugin-stories/storyPayload.d.ts.map +1 -0
- package/dist/types/components/embed-plugin-stories/storyShared.d.ts.map +1 -0
- package/dist/types/components/index.d.ts.map +1 -0
- package/dist/types/components/validation-alerts/ValidatePayload.d.ts.map +1 -0
- package/dist/types/components/validation-alerts/ValidatePlugins.d.ts.map +1 -0
- package/dist/types/components/validation-alerts/index.d.ts.map +1 -0
- package/dist/types/contexts/EmbedPluginContext/Context.d.ts.map +1 -0
- package/dist/types/contexts/EmbedPluginContext/Provider.d.ts.map +1 -0
- package/dist/types/contexts/EmbedPluginContext/State.d.ts.map +1 -0
- package/dist/{contexts/ResolvePayloadContext → types/contexts/EmbedPluginContext}/index.d.ts.map +1 -1
- package/dist/types/contexts/EmbedPluginContext/use.d.ts.map +1 -0
- package/dist/types/contexts/RefreshPayloadContext/Context.d.ts.map +1 -0
- package/dist/types/contexts/RefreshPayloadContext/Provider.d.ts.map +1 -0
- package/dist/types/contexts/RefreshPayloadContext/State.d.ts.map +1 -0
- package/dist/types/contexts/RefreshPayloadContext/index.d.ts.map +1 -0
- package/dist/types/contexts/RefreshPayloadContext/use.d.ts.map +1 -0
- package/dist/types/contexts/ResolvePayloadContext/Context.d.ts.map +1 -0
- package/dist/types/contexts/ResolvePayloadContext/Provider.d.ts.map +1 -0
- package/dist/types/contexts/ResolvePayloadContext/State.d.ts.map +1 -0
- package/dist/types/contexts/ResolvePayloadContext/index.d.ts.map +1 -0
- package/dist/types/contexts/ResolvePayloadContext/use.d.ts.map +1 -0
- package/dist/types/contexts/ValidatePayloadContext/Context.d.ts.map +1 -0
- package/dist/types/contexts/ValidatePayloadContext/Provider.d.ts.map +1 -0
- package/dist/types/contexts/ValidatePayloadContext/State.d.ts.map +1 -0
- package/dist/types/contexts/ValidatePayloadContext/index.d.ts.map +1 -0
- package/dist/types/contexts/ValidatePayloadContext/use.d.ts.map +1 -0
- package/dist/types/contexts/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types/EmbedPluginProps.d.ts.map +1 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/package.json +26 -34
- package/dist/components/EmbedPlugin.d.mts +0 -5
- package/dist/components/EmbedPlugin.d.mts.map +0 -1
- package/dist/components/EmbedPlugin.d.ts.map +0 -1
- package/dist/components/EmbedResolver.d.mts +0 -4
- package/dist/components/EmbedResolver.d.mts.map +0 -1
- package/dist/components/EmbedResolver.d.ts.map +0 -1
- package/dist/components/controls/EmbedFormControl.d.mts +0 -10
- package/dist/components/controls/EmbedFormControl.d.mts.map +0 -1
- package/dist/components/controls/EmbedFormControl.d.ts.map +0 -1
- package/dist/components/controls/ListModeSelect.d.mts +0 -6
- package/dist/components/controls/ListModeSelect.d.mts.map +0 -1
- package/dist/components/controls/ListModeSelect.d.ts.map +0 -1
- package/dist/components/controls/RenderSelect.d.mts +0 -4
- package/dist/components/controls/RenderSelect.d.mts.map +0 -1
- package/dist/components/controls/RenderSelect.d.ts.map +0 -1
- package/dist/components/controls/index.d.mts.map +0 -1
- package/dist/components/controls/index.d.ts.map +0 -1
- package/dist/components/embed-card/EmbedCardResolver.d.mts +0 -5
- package/dist/components/embed-card/EmbedCardResolver.d.mts.map +0 -1
- package/dist/components/embed-card/EmbedCardResolver.d.ts.map +0 -1
- package/dist/components/embed-card/EmbedPluginCard.d.mts +0 -11
- package/dist/components/embed-card/EmbedPluginCard.d.mts.map +0 -1
- package/dist/components/embed-card/EmbedPluginCard.d.ts.map +0 -1
- package/dist/components/embed-card/card/BusyCard.d.mts +0 -11
- package/dist/components/embed-card/card/BusyCard.d.mts.map +0 -1
- package/dist/components/embed-card/card/BusyCard.d.ts.map +0 -1
- package/dist/components/embed-card/card/EmbedCardHeader.d.mts +0 -4
- package/dist/components/embed-card/card/EmbedCardHeader.d.mts.map +0 -1
- package/dist/components/embed-card/card/EmbedCardHeader.d.ts.map +0 -1
- package/dist/components/embed-card/card/EmbedPluginCard.d.mts +0 -4
- package/dist/components/embed-card/card/EmbedPluginCard.d.mts.map +0 -1
- package/dist/components/embed-card/card/EmbedPluginCard.d.ts.map +0 -1
- package/dist/components/embed-card/card/index.d.mts.map +0 -1
- package/dist/components/embed-card/card/index.d.ts.map +0 -1
- package/dist/components/embed-card/error-handling/EmbedCardApiErrorRenderer.d.mts +0 -10
- package/dist/components/embed-card/error-handling/EmbedCardApiErrorRenderer.d.mts.map +0 -1
- package/dist/components/embed-card/error-handling/EmbedCardApiErrorRenderer.d.ts.map +0 -1
- package/dist/components/embed-card/error-handling/EmbedErrorCard.d.mts +0 -15
- package/dist/components/embed-card/error-handling/EmbedErrorCard.d.mts.map +0 -1
- package/dist/components/embed-card/error-handling/EmbedErrorCard.d.ts.map +0 -1
- package/dist/components/embed-card/error-handling/index.d.mts.map +0 -1
- package/dist/components/embed-card/error-handling/index.d.ts.map +0 -1
- package/dist/components/embed-card/index.d.mts.map +0 -1
- package/dist/components/embed-card/index.d.ts.map +0 -1
- package/dist/components/embed-card/menu/EmbedMenu.d.mts +0 -4
- package/dist/components/embed-card/menu/EmbedMenu.d.mts.map +0 -1
- package/dist/components/embed-card/menu/EmbedMenu.d.ts.map +0 -1
- package/dist/components/embed-card/menu/JsonMenuItem.d.mts +0 -4
- package/dist/components/embed-card/menu/JsonMenuItem.d.mts.map +0 -1
- package/dist/components/embed-card/menu/JsonMenuItem.d.ts.map +0 -1
- package/dist/components/embed-card/menu/index.d.mts +0 -2
- package/dist/components/embed-card/menu/index.d.mts.map +0 -1
- package/dist/components/embed-card/menu/index.d.ts.map +0 -1
- package/dist/components/embed-plugin-stories/XyoEmbedPlugin.examples.stories.d.mts +0 -6
- package/dist/components/embed-plugin-stories/XyoEmbedPlugin.examples.stories.d.mts.map +0 -1
- package/dist/components/embed-plugin-stories/XyoEmbedPlugin.examples.stories.d.ts +0 -6
- package/dist/components/embed-plugin-stories/XyoEmbedPlugin.examples.stories.d.ts.map +0 -1
- package/dist/components/embed-plugin-stories/XyoEmbedPlugin.states.stories.d.mts +0 -11
- package/dist/components/embed-plugin-stories/XyoEmbedPlugin.states.stories.d.mts.map +0 -1
- package/dist/components/embed-plugin-stories/XyoEmbedPlugin.states.stories.d.ts +0 -11
- package/dist/components/embed-plugin-stories/XyoEmbedPlugin.states.stories.d.ts.map +0 -1
- package/dist/components/embed-plugin-stories/storyPayload.d.mts +0 -126
- package/dist/components/embed-plugin-stories/storyPayload.d.mts.map +0 -1
- package/dist/components/embed-plugin-stories/storyPayload.d.ts.map +0 -1
- package/dist/components/embed-plugin-stories/storyShared.d.mts +0 -5
- package/dist/components/embed-plugin-stories/storyShared.d.mts.map +0 -1
- package/dist/components/embed-plugin-stories/storyShared.d.ts.map +0 -1
- package/dist/components/index.d.mts.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/validation-alerts/ValidatePayload.d.mts +0 -5
- package/dist/components/validation-alerts/ValidatePayload.d.mts.map +0 -1
- package/dist/components/validation-alerts/ValidatePayload.d.ts.map +0 -1
- package/dist/components/validation-alerts/ValidatePlugins.d.mts +0 -5
- package/dist/components/validation-alerts/ValidatePlugins.d.mts.map +0 -1
- package/dist/components/validation-alerts/ValidatePlugins.d.ts.map +0 -1
- package/dist/components/validation-alerts/index.d.mts.map +0 -1
- package/dist/components/validation-alerts/index.d.ts.map +0 -1
- package/dist/contexts/EmbedPluginContext/Context.d.mts +0 -4
- package/dist/contexts/EmbedPluginContext/Context.d.mts.map +0 -1
- package/dist/contexts/EmbedPluginContext/Context.d.ts.map +0 -1
- package/dist/contexts/EmbedPluginContext/Provider.d.mts +0 -7
- package/dist/contexts/EmbedPluginContext/Provider.d.mts.map +0 -1
- package/dist/contexts/EmbedPluginContext/Provider.d.ts.map +0 -1
- package/dist/contexts/EmbedPluginContext/State.d.mts +0 -33
- package/dist/contexts/EmbedPluginContext/State.d.mts.map +0 -1
- package/dist/contexts/EmbedPluginContext/State.d.ts.map +0 -1
- package/dist/contexts/EmbedPluginContext/index.d.mts.map +0 -1
- package/dist/contexts/EmbedPluginContext/index.d.ts.map +0 -1
- package/dist/contexts/EmbedPluginContext/use.d.mts +0 -2
- package/dist/contexts/EmbedPluginContext/use.d.mts.map +0 -1
- package/dist/contexts/EmbedPluginContext/use.d.ts.map +0 -1
- package/dist/contexts/RefreshPayloadContext/Context.d.mts +0 -4
- package/dist/contexts/RefreshPayloadContext/Context.d.mts.map +0 -1
- package/dist/contexts/RefreshPayloadContext/Context.d.ts.map +0 -1
- package/dist/contexts/RefreshPayloadContext/Provider.d.mts +0 -8
- package/dist/contexts/RefreshPayloadContext/Provider.d.mts.map +0 -1
- package/dist/contexts/RefreshPayloadContext/Provider.d.ts.map +0 -1
- package/dist/contexts/RefreshPayloadContext/State.d.mts +0 -8
- package/dist/contexts/RefreshPayloadContext/State.d.mts.map +0 -1
- package/dist/contexts/RefreshPayloadContext/State.d.ts.map +0 -1
- package/dist/contexts/RefreshPayloadContext/index.d.mts.map +0 -1
- package/dist/contexts/RefreshPayloadContext/index.d.ts.map +0 -1
- package/dist/contexts/RefreshPayloadContext/use.d.mts +0 -2
- package/dist/contexts/RefreshPayloadContext/use.d.mts.map +0 -1
- package/dist/contexts/RefreshPayloadContext/use.d.ts.map +0 -1
- package/dist/contexts/ResolvePayloadContext/Context.d.mts +0 -4
- package/dist/contexts/ResolvePayloadContext/Context.d.mts.map +0 -1
- package/dist/contexts/ResolvePayloadContext/Context.d.ts.map +0 -1
- package/dist/contexts/ResolvePayloadContext/Provider.d.mts +0 -6
- package/dist/contexts/ResolvePayloadContext/Provider.d.mts.map +0 -1
- package/dist/contexts/ResolvePayloadContext/Provider.d.ts.map +0 -1
- package/dist/contexts/ResolvePayloadContext/State.d.mts +0 -13
- package/dist/contexts/ResolvePayloadContext/State.d.mts.map +0 -1
- package/dist/contexts/ResolvePayloadContext/State.d.ts.map +0 -1
- package/dist/contexts/ResolvePayloadContext/index.d.mts.map +0 -1
- package/dist/contexts/ResolvePayloadContext/use.d.mts +0 -2
- package/dist/contexts/ResolvePayloadContext/use.d.mts.map +0 -1
- package/dist/contexts/ResolvePayloadContext/use.d.ts.map +0 -1
- package/dist/contexts/ValidatePayloadContext/Context.d.mts +0 -4
- package/dist/contexts/ValidatePayloadContext/Context.d.mts.map +0 -1
- package/dist/contexts/ValidatePayloadContext/Context.d.ts.map +0 -1
- package/dist/contexts/ValidatePayloadContext/Provider.d.mts +0 -7
- package/dist/contexts/ValidatePayloadContext/Provider.d.mts.map +0 -1
- package/dist/contexts/ValidatePayloadContext/Provider.d.ts.map +0 -1
- package/dist/contexts/ValidatePayloadContext/Provider.stories.d.mts +0 -15
- package/dist/contexts/ValidatePayloadContext/Provider.stories.d.mts.map +0 -1
- package/dist/contexts/ValidatePayloadContext/Provider.stories.d.ts +0 -15
- package/dist/contexts/ValidatePayloadContext/Provider.stories.d.ts.map +0 -1
- package/dist/contexts/ValidatePayloadContext/State.d.mts +0 -7
- package/dist/contexts/ValidatePayloadContext/State.d.mts.map +0 -1
- package/dist/contexts/ValidatePayloadContext/State.d.ts.map +0 -1
- package/dist/contexts/ValidatePayloadContext/index.d.mts.map +0 -1
- package/dist/contexts/ValidatePayloadContext/index.d.ts.map +0 -1
- package/dist/contexts/ValidatePayloadContext/use.d.mts +0 -2
- package/dist/contexts/ValidatePayloadContext/use.d.mts.map +0 -1
- package/dist/contexts/ValidatePayloadContext/use.d.ts.map +0 -1
- package/dist/contexts/index.d.mts.map +0 -1
- package/dist/contexts/index.d.ts.map +0 -1
- package/dist/index.d.mts.map +0 -1
- package/dist/index.d.ts +0 -4
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -543
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -493
- package/dist/index.mjs.map +0 -1
- package/dist/types/EmbedPluginProps.d.mts +0 -10
- package/dist/types/EmbedPluginProps.d.mts.map +0 -1
- package/dist/types/EmbedPluginProps.d.ts.map +0 -1
- package/dist/types/index.d.mts.map +0 -1
- /package/dist/{components → types/components}/EmbedPlugin.d.ts +0 -0
- /package/dist/{components → types/components}/EmbedResolver.d.ts +0 -0
- /package/dist/{components → types/components}/controls/EmbedFormControl.d.ts +0 -0
- /package/dist/{components → types/components}/controls/ListModeSelect.d.ts +0 -0
- /package/dist/{components → types/components}/controls/RenderSelect.d.ts +0 -0
- /package/dist/{components → types/components}/controls/index.d.ts +0 -0
- /package/dist/{components → types/components}/embed-card/EmbedCardResolver.d.ts +0 -0
- /package/dist/{components → types/components}/embed-card/EmbedPluginCard.d.ts +0 -0
- /package/dist/{components → types/components}/embed-card/card/BusyCard.d.ts +0 -0
- /package/dist/{components → types/components}/embed-card/card/EmbedCardHeader.d.ts +0 -0
- /package/dist/{components → types/components}/embed-card/card/EmbedPluginCard.d.ts +0 -0
- /package/dist/{components → types/components}/embed-card/card/index.d.ts +0 -0
- /package/dist/{components → types/components}/embed-card/error-handling/EmbedCardApiErrorRenderer.d.ts +0 -0
- /package/dist/{components → types/components}/embed-card/error-handling/EmbedErrorCard.d.ts +0 -0
- /package/dist/{components → types/components}/embed-card/error-handling/index.d.ts +0 -0
- /package/dist/{components → types/components}/embed-card/index.d.ts +0 -0
- /package/dist/{components → types/components}/embed-card/menu/EmbedMenu.d.ts +0 -0
- /package/dist/{components → types/components}/embed-card/menu/JsonMenuItem.d.ts +0 -0
- /package/dist/{components → types/components}/embed-card/menu/index.d.ts +0 -0
- /package/dist/{components → types/components}/embed-plugin-stories/storyPayload.d.ts +0 -0
- /package/dist/{components → types/components}/embed-plugin-stories/storyShared.d.ts +0 -0
- /package/dist/{components → types/components}/index.d.ts +0 -0
- /package/dist/{components → types/components}/validation-alerts/ValidatePayload.d.ts +0 -0
- /package/dist/{components → types/components}/validation-alerts/ValidatePlugins.d.ts +0 -0
- /package/dist/{components → types/components}/validation-alerts/index.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/EmbedPluginContext/Context.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/EmbedPluginContext/Provider.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/EmbedPluginContext/State.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/EmbedPluginContext/index.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/EmbedPluginContext/use.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/RefreshPayloadContext/Context.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/RefreshPayloadContext/Provider.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/RefreshPayloadContext/State.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/RefreshPayloadContext/index.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/RefreshPayloadContext/use.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/ResolvePayloadContext/Context.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/ResolvePayloadContext/Provider.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/ResolvePayloadContext/State.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/ResolvePayloadContext/index.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/ResolvePayloadContext/use.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/ValidatePayloadContext/Context.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/ValidatePayloadContext/Provider.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/ValidatePayloadContext/State.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/ValidatePayloadContext/index.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/ValidatePayloadContext/use.d.ts +0 -0
- /package/dist/{contexts → types/contexts}/index.d.ts +0 -0
- /package/dist/types/{EmbedPluginProps.d.ts → types/EmbedPluginProps.d.ts} +0 -0
- /package/dist/types/{index.d.mts → types/index.d.ts} +0 -0
@@ -0,0 +1,15 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { ErrorBoundary, ListModeProvider } from '@xyo-network/react-shared';
|
3
|
+
import { EmbedPluginProvider, RefreshPayloadProvider, ResolvePayloadProvider, ValidatePayloadProvider } from '../contexts';
|
4
|
+
import { EmbedResolver } from './EmbedResolver';
|
5
|
+
import { ValidatePayloadAlert, ValidatePluginsAlert } from './validation-alerts';
|
6
|
+
export const EmbedPluginInner = ({ validateSchema, plugins = [], huriPayload, refreshTitle = '', timestampLabel = 'Data From', hideElementsConfig, embedPluginConfig, onRefresh, children, }) => {
|
7
|
+
return (_jsx(ErrorBoundary, { children: _jsx(EmbedPluginProvider, { refreshTitle: refreshTitle, timestampLabel: timestampLabel, hideElementsConfig: hideElementsConfig, plugins: plugins, embedPluginConfig: embedPluginConfig, children: _jsx(WithResolvers, { onRefresh: onRefresh, huriPayload: huriPayload, children: _jsx(WithValidators, { validateSchema: validateSchema, children: _jsx(ListModeProvider, { defaultListMode: embedPluginConfig?.listMode, children: children }) }) }) }) }));
|
8
|
+
};
|
9
|
+
const WithResolvers = ({ children, onRefresh, huriPayload }) => {
|
10
|
+
return (_jsx(RefreshPayloadProvider, { onRefresh: onRefresh, children: _jsx(ResolvePayloadProvider, { huriPayload: huriPayload, children: _jsx(EmbedResolver, { children: children }) }) }));
|
11
|
+
};
|
12
|
+
const WithValidators = ({ children, validateSchema }) => {
|
13
|
+
return (_jsx(ValidatePayloadProvider, { enabled: validateSchema, children: _jsx(ValidatePluginsAlert, { children: _jsx(ValidatePayloadAlert, { children: children }) }) }));
|
14
|
+
};
|
15
|
+
//# sourceMappingURL=EmbedPlugin.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"EmbedPlugin.js","sourceRoot":"","sources":["../../../src/components/EmbedPlugin.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAE3E,OAAO,EAAE,m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C,KAAC,oBAAoB,cACnB,KAAC,oBAAoB,cAAE,QAAQ,GAAwB,GAClC,GACC,CAC3B,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { LoadResult } from '@xyo-network/react-shared';
|
3
|
+
import { useResolvePayload } from '../contexts';
|
4
|
+
export const EmbedResolver = ({ children }) => {
|
5
|
+
const { payload, notFound, huriError } = useResolvePayload();
|
6
|
+
return (_jsx(LoadResult, { searchResult: payload, notFound: !!notFound, error: !!huriError, children: children }));
|
7
|
+
};
|
8
|
+
//# sourceMappingURL=EmbedResolver.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"EmbedResolver.js","sourceRoot":"","sources":["../../../src/components/EmbedResolver.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAEtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAE/C,MAAM,CAAC,MAAM,aAAa,GAA2B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACpE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAE5D,OAAO,CACL,KAAC,UAAU,IAAC,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,SAAS,YACxE,QAAQ,GACE,CACd,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { FormControl, InputLabel } from '@mui/material';
|
3
|
+
export const EmbedFormControl = ({ formId, formLabel, children, ...props }) => {
|
4
|
+
return (_jsxs(FormControl, { ...props, children: [_jsx(InputLabel, { id: formId, children: formLabel }), children] }));
|
5
|
+
};
|
6
|
+
//# sourceMappingURL=EmbedFormControl.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"EmbedFormControl.js","sourceRoot":"","sources":["../../../../src/components/controls/EmbedFormControl.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAoB,UAAU,EAAE,MAAM,eAAe,CAAA;AAQzE,MAAM,CAAC,MAAM,gBAAgB,GAAkD,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC3H,OAAO,CACL,MAAC,WAAW,OAAK,KAAK,aACpB,KAAC,UAAU,IAAC,EAAE,EAAE,MAAM,YAAG,SAAS,GAAc,EAC/C,QAAQ,IACG,CACf,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { MenuItem, Select } from '@mui/material';
|
3
|
+
import { useListMode } from '@xyo-network/react-shared';
|
4
|
+
import { EmbedFormControl } from './EmbedFormControl';
|
5
|
+
const listModeSelectId = 'listmode-select-id';
|
6
|
+
const listModeSelectLabel = 'List Mode';
|
7
|
+
export const ListModeSelect = (props) => {
|
8
|
+
const { listMode, setListMode } = useListMode();
|
9
|
+
return (_jsxs(Select, { value: (listMode ?? 'default'), onChange: (event) => {
|
10
|
+
setListMode?.(event.target.value);
|
11
|
+
}, ...props, children: [_jsx(MenuItem, { value: "default", children: "Default" }, "default"), _jsx(MenuItem, { value: "table", children: "Table" }, "table"), _jsx(MenuItem, { value: "grid", children: "Grid" }, "grid")] }));
|
12
|
+
};
|
13
|
+
export const ListModeSelectFormControl = (props) => {
|
14
|
+
return (_jsx(EmbedFormControl, { formId: listModeSelectId, formLabel: listModeSelectLabel, children: _jsx(ListModeSelect, { size: "small", label: listModeSelectLabel, labelId: listModeSelectId, ...props }) }));
|
15
|
+
};
|
16
|
+
//# sourceMappingURL=ListModeSelect.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ListModeSelect.js","sourceRoot":"","sources":["../../../../src/components/controls/ListModeSelect.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAe,MAAM,eAAe,CAAA;AAC7D,OAAO,EAAY,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAEjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,MAAM,gBAAgB,GAAG,oBAAoB,CAAA;AAC7C,MAAM,mBAAmB,GAAG,WAAW,CAAA;AAEvC,MAAM,CAAC,MAAM,cAAc,GAAoC,CAAC,KAAK,EAAE,EAAE;IACvE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE,CAAA;IAE/C,OAAO,CACL,MAAC,MAAM,IACL,KAAK,EAAE,CAAC,QAAQ,IAAI,SAAS,CAAa,EAC1C,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;YAClB,WAAW,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,KAAiB,CAAC,CAAA;QAC/C,CAAC,KACG,KAAK,aAET,KAAC,QAAQ,IAAe,KAAK,EAAC,SAAS,yBAAzB,SAAS,CAEZ,EACX,KAAC,QAAQ,IAAa,KAAK,EAAC,OAAO,uBAArB,OAAO,CAEV,EACX,KAAC,QAAQ,IAAY,KAAK,EAAC,MAAM,sBAAnB,MAAM,CAET,IACJ,CACV,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAoC,CAAC,KAAK,EAAE,EAAE;IAClF,OAAO,CACL,KAAC,gBAAgB,IAAC,MAAM,EAAE,gBAAgB,EAAE,SAAS,EAAE,mBAAmB,YACxE,KAAC,cAAc,IAAC,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,gBAAgB,KAAM,KAAK,GAAI,GAChF,CACpB,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { MenuItem, Select } from '@mui/material';
|
3
|
+
import { useEmbedPluginState } from '../../contexts';
|
4
|
+
import { EmbedFormControl } from './EmbedFormControl';
|
5
|
+
const renderSelectId = 'render-select-id';
|
6
|
+
const renderSelectLabel = 'Renderer';
|
7
|
+
export const EmbedRenderSelect = (props) => {
|
8
|
+
const { activePlugin, setActivePlugin, plugins } = useEmbedPluginState();
|
9
|
+
return (_jsx(EmbedFormControl, { formId: renderSelectId, formLabel: renderSelectLabel, children: _jsx(Select, { size: "small", value: activePlugin?.name, ...props, children: plugins?.map((plugin) => (_jsx(MenuItem, { value: plugin.name, onClick: () => setActivePlugin?.(plugin), children: plugin.name }, plugin.name))) }) }));
|
10
|
+
};
|
11
|
+
//# sourceMappingURL=RenderSelect.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RenderSelect.js","sourceRoot":"","sources":["../../../../src/components/controls/RenderSelect.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAe,MAAM,eAAe,CAAA;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,MAAM,cAAc,GAAG,kBAAkB,CAAA;AACzC,MAAM,iBAAiB,GAAG,UAAU,CAAA;AAEpC,MAAM,CAAC,MAAM,iBAAiB,GAA0B,CAAC,KAAK,EAAE,EAAE;IAChE,MAAM,EAAE,YAAY,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,mBAAmB,EAAE,CAAA;IACxE,OAAO,CACL,KAAC,gBAAgB,IAAC,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,iBAAiB,YACpE,KAAC,MAAM,IAAC,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,YAAY,EAAE,IAAI,KAAM,KAAK,YACtD,OAAO,EAAE,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACxB,KAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,EAAoB,OAAO,EAAE,GAAG,EAAE,CAAC,eAAe,EAAE,CAAC,MAAM,CAAC,YACrF,MAAM,CAAC,IAAI,IADqB,MAAM,CAAC,IAAI,CAEnC,CACZ,CAAC,GACK,GACQ,CACpB,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/controls/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { useTheme } from '@mui/material';
|
3
|
+
import { FlexCol } from '@xylabs/react-flexbox';
|
4
|
+
import { LoadResult } from '@xyo-network/react-shared';
|
5
|
+
import { useRefreshPayload, useResolvePayload } from '../../contexts';
|
6
|
+
import { EmbedCardApiErrorRenderer } from './error-handling';
|
7
|
+
export const EmbedCardResolverFlexBox = ({ children, ...props }) => {
|
8
|
+
const { payload, notFound, huriError } = useResolvePayload();
|
9
|
+
const { refreshPayload } = useRefreshPayload();
|
10
|
+
const theme = useTheme();
|
11
|
+
return (_jsx(LoadResult, { searchResult: payload, notFound: !!notFound, error: !!huriError, children: _jsx(EmbedCardApiErrorRenderer, { xyoError: huriError, children: _jsx(FlexCol, { id: "embed-outer-wrap", alignItems: "stretch", justifyContent: "start", busy: Boolean(!refreshPayload && payload), busyCircularProps: { style: { alignItems: 'start', paddingTop: theme.spacing(2), zIndex: 2 } }, ...props, children: children }) }) }));
|
12
|
+
};
|
13
|
+
//# sourceMappingURL=EmbedCardResolver.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"EmbedCardResolver.js","sourceRoot":"","sources":["../../../../src/components/embed-card/EmbedCardResolver.tsx"],"names":[],"mappings":";AAA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olvePayload } from '../../contexts';
|
4
|
+
import { EmbedPluginInner } from '../EmbedPlugin';
|
5
|
+
import { EmbedPluginCard } from './card';
|
6
|
+
import { EmbedCardApiErrorRenderer } from './error-handling';
|
7
|
+
export const ApiEmbedPluginCard = ({ children, ...props }) => {
|
8
|
+
const { validateSchema, plugins = [], huriPayload, refreshTitle = '', timestampLabel = 'Data From', hideElementsConfig, embedPluginConfig, onRefresh, ...busyCardProps } = props;
|
9
|
+
return (_jsxs(EmbedPluginInner, { ...{
|
10
|
+
embedPluginConfig,
|
11
|
+
hideElementsConfig,
|
12
|
+
huriPayload,
|
13
|
+
onRefresh,
|
14
|
+
plugins,
|
15
|
+
refreshTitle,
|
16
|
+
timestampLabel,
|
17
|
+
validateSchema,
|
18
|
+
}, children: [_jsx(EmbedPluginCardInner, { ...busyCardProps }), children] }));
|
19
|
+
};
|
20
|
+
export const EmbedPluginCardInner = (props) => {
|
21
|
+
const { payload, huriError } = useResolvePayload();
|
22
|
+
const { refreshPayload } = useRefreshPayload();
|
23
|
+
const theme = useTheme();
|
24
|
+
return (_jsx(EmbedCardApiErrorRenderer, { xyoError: huriError, children: _jsx(EmbedPluginCard, { elevation: 3, variant: "elevation", busy: Boolean(!refreshPayload && payload), busyVariantProps: { style: { alignItems: 'start', paddingTop: theme.spacing(2), zIndex: 2 } }, sx: { position: 'relative' }, ...props }) }));
|
25
|
+
};
|
26
|
+
/** @deprecated - use EmbedPluginCard and use CardProps instead of FlexBoxProps */
|
27
|
+
export const EmbedPlugin = EmbedPluginCard;
|
28
|
+
//# sourceMappingURL=EmbedPluginCard.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"EmbedPluginCard.js","sourceRoot":"","sources":["../../../../src/components/embed-card/EmbedPluginCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAGxC,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAEr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7F,EAAE,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,KACxB,KAAK,GACT,GACwB,CAC7B,CAAA;AACH,CAAC,CAAA;AAED,kFAAkF;AAClF,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { Card } from '@mui/material';
|
3
|
+
import { useBusyTiming } from '@xylabs/react-flexbox';
|
4
|
+
import { BusyCircularProgress, BusyLinearProgress, } from '@xylabs/react-shared';
|
5
|
+
export const BusyCard = ({ busy, busyMinimum = 500, busyVariant = 'circular', busyVariantProps, children, ...props }) => {
|
6
|
+
const internalBusy = useBusyTiming(busy, busyMinimum);
|
7
|
+
return (_jsxs(Card, { ...props, children: [children, busyVariant === 'circular' && internalBusy ? _jsx(BusyCircularProgress, { ...busyVariantProps }) : null, busyVariant === 'linear' && internalBusy ? _jsx(BusyLinearProgress, { ...busyVariantProps }) : null] }));
|
8
|
+
};
|
9
|
+
//# sourceMappingURL=BusyCard.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"BusyCard.js","sourceRoot":"","sources":["../../../../../src/components/embed-card/card/BusyCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAa,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EACL,oBAAoB,EAEpB,kBAAkB,GAInB,MAAM,sBAAsB,CAAA;AAS7B,MAAM,CAAC,MAAM,QAAQ,GAA0C,CAAC,EAC9D,IAAI,EACJ,WAAW,GAAG,GAAG,EACjB,WAAW,GAAG,UAAU,EACxB,gBAAgB,EAChB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,YAAY,GAAG,aAAa,CAAC,IAAI,EAAE,WAAW,CAAC,CAAA;IACrD,OAAO,CACL,MAAC,IAAI,OAAK,KAAK,aACZ,QAAQ,EACR,WAAW,KAAK,UAAU,IAAI,YAAY,CAAC,CAAC,CAAC,KAAC,oBAAoB,OAAM,gBAA8C,GAAI,CAAC,CAAC,CAAC,IAAI,EACjI,WAAW,KAAK,QAAQ,IAAI,YAAY,CAAC,CAAC,CAAC,KAAC,kBAAkB,OAAM,gBAA4C,GAAI,CAAC,CAAC,CAAC,IAAI,IACvH,CACR,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import RefreshIcon from '@mui/icons-material/Refresh';
|
3
|
+
import { Avatar, CardHeader, Chip } from '@mui/material';
|
4
|
+
import { FlexRow } from '@xylabs/react-flexbox';
|
5
|
+
import { useEmbedPluginState, useResolvePayload } from '../../../contexts';
|
6
|
+
import { EmbedMenu } from '../menu';
|
7
|
+
export const EmbedCardHeader = () => {
|
8
|
+
const { refreshHuri, huri } = useResolvePayload();
|
9
|
+
const { activePlugin, timestampLabel, hideElementsConfig } = useEmbedPluginState();
|
10
|
+
const { hideAvatar, hideTitle, hideRefreshButton, hideTimestamp, hideCardActions } = hideElementsConfig ?? {};
|
11
|
+
//this is temporary so that we can add the ability to get a timestamp via diviner later
|
12
|
+
const timestamp = Date.now();
|
13
|
+
return (_jsx(CardHeader, { sx: { flexWrap: 'wrap', rowGap: 1 }, avatar: hideAvatar ? (_jsx(_Fragment, {})) : (_jsx(Avatar, { sx: { bgcolor: (theme) => theme.palette.primary.main }, "aria-label": activePlugin?.name, children: activePlugin?.name?.charAt(0) })), action: _jsxs(FlexRow, { flexWrap: "wrap", columnGap: 0.5, children: [timestamp ? (hideTimestamp && hideRefreshButton ? ('') : (_jsx(Chip, { avatar: hideRefreshButton ? _jsx(_Fragment, {}) : _jsx(RefreshIcon, {}), clickable: hideRefreshButton ? false : true, onClick: refreshHuri, label: hideTimestamp ? '' : `${timestampLabel} ${new Date(timestamp).toLocaleString()}` }))) : null, hideCardActions || huri === undefined ? null : _jsx(EmbedMenu, {})] }), title: hideTitle ? '' : activePlugin?.name }));
|
14
|
+
};
|
15
|
+
//# sourceMappingURL=EmbedCardHeader.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"EmbedCardHeader.js","sourceRoot":"","sources":["../../../../../src/components/embed-card/card/EmbedCardHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,WAAW,MAAM,6BAA6B,CAAA;AACrD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAmB,IAAI,EAAS,MAAM,eAAe,CAAA;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAE/C,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC,MAAM,CAAC,MAAM,eAAe,GAA8B,GAAG,EAAE;IAC7D,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,iBAAiB,EAAE,CAAA;IACjD,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,GAAG,mBAAmB,EAAE,CAAA;IAClF,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,iBAAiB,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,kBAAkB,IAAI,EAAE,CAAA;IAC7G,uFAAuF;IACvF,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IAC5B,OAAO,CACL,KAAC,UAAU,IACT,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,EACnC,MAAM,EACJ,UAAU,CAAC,CAAC,CAAC,CACX,mBAAK,CACN,CAAC,CAAC,CAAC,CACF,KAAC,MAAM,IAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,KAAY,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,gBAAc,YAAY,EAAE,IAAI,YAClG,YAAY,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,GACvB,CACV,EAEH,MAAM,EACJ,MAAC,OAAO,IAAC,QAAQ,EAAC,MAAM,EAAC,SAAS,EAAE,GAAG,aACpC,SAAS,CAAC,CAAC,CAAC,CACX,aAAa,IAAI,iBAAiB,CAAC,CAAC,CAAC,CACnC,EAAE,CACH,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IACH,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,mBAAK,CAAC,CAAC,CAAC,KAAC,WAAW,KAAG,EACnD,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAC3C,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,cAAc,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,cAAc,EAAE,EAAE,GACvF,CACH,CACF,CAAC,CAAC,CAAC,IAAI,EAEP,eAAe,IAAI,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAC,SAAS,KAAG,IACrD,EAEZ,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,EAAE,IAAI,GAC1C,CACH,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { CardContent } from '@mui/material';
|
3
|
+
import { FlexGrowRow } from '@xylabs/react-flexbox';
|
4
|
+
import { useListMode } from '@xyo-network/react-shared';
|
5
|
+
import { useEmbedPluginState, useResolvePayload } from '../../../contexts';
|
6
|
+
import { EmbedRenderSelect, ListModeSelectFormControl } from '../../controls';
|
7
|
+
import { BusyCard } from './BusyCard';
|
8
|
+
import { EmbedCardHeader } from './EmbedCardHeader';
|
9
|
+
export const EmbedPluginCard = ({ ...props }) => {
|
10
|
+
const { payload } = useResolvePayload();
|
11
|
+
const { activePlugin: ActivePlugin, plugins, hideElementsConfig } = useEmbedPluginState();
|
12
|
+
const { listMode } = useListMode();
|
13
|
+
const supportsListMode = ActivePlugin?.components?.box?.listModes?.length ?? 0 > 1;
|
14
|
+
return (_jsxs(BusyCard, { ...props, children: [hideElementsConfig?.hideCardHeader ? null : _jsx(EmbedCardHeader, {}), (plugins && plugins.length) || supportsListMode ? (_jsxs(FlexGrowRow, { columnGap: 2, rowGap: 2, flexWrap: "wrap", pb: 1, children: [plugins && plugins.length > 1 ? _jsx(EmbedRenderSelect, {}) : null, supportsListMode ? _jsx(ListModeSelectFormControl, {}) : null] })) : null, _jsx(CardContent, { sx: { height: '100%' }, children: ActivePlugin ? _jsx(ActivePlugin.components.box.detailsBox, { payload: payload, ...(supportsListMode && { listMode }) }) : null })] }));
|
15
|
+
};
|
16
|
+
//# sourceMappingURL=EmbedPluginCard.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"EmbedPluginCard.js","sourceRoot":"","sources":["../../../../../src/components/embed-card/card/EmbedPluginCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAEvD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1E,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAA;AAC7E,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD,MAAM,CAAC,MAAM,eAAe,GAA4B,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACvE,MAAM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/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { ErrorAlert, ErrorRender } from '@xyo-network/react-error';
|
3
|
+
import { EmbedErrorCard } from './EmbedErrorCard';
|
4
|
+
export const EmbedCardApiErrorRenderer = ({ xyoError, children, ...props }) => {
|
5
|
+
return (_jsx(ErrorRender, { error: xyoError, noReAuth: true, noErrorDisplay: true, customError: _jsx(CustomApiErrorCard, { xyoError: xyoError, ...props }), children: children }));
|
6
|
+
};
|
7
|
+
const CustomApiErrorCard = ({ xyoError, ...props }) => {
|
8
|
+
return (_jsx(EmbedErrorCard, { ...props, children: _jsx(ErrorAlert, { error: xyoError }) }));
|
9
|
+
};
|
10
|
+
//# sourceMappingURL=EmbedCardApiErrorRenderer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"EmbedCardApiErrorRenderer.js","sourceRoot":"","sources":["../../../../../src/components/embed-card/error-handling/EmbedCardApiErrorRenderer.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAElE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAMjD,MAAM,CAAC,MAAM,yBAAyB,GAA2D,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACpI,OAAO,CACL,KAAC,WAAW,IAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,QAAC,cAAc,QAAC,WAAW,EAAE,KAAC,kBAAkB,IAAC,QAAQ,EAAE,QAAQ,KAAM,KAAK,GAAI,YACrH,QAAQ,GACG,CACf,CAAA;AACH,CAAC,CAAA;AAED,MAAM,kBAAkB,GAA6C,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC9F,OAAO,CACL,KAAC,cAAc,OAAK,KAAK,YACvB,KAAC,UAAU,IAAC,KAAK,EAAE,QAAQ,GAAI,GAChB,CAClB,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { Alert, AlertTitle, Card, CardContent, Typography } from '@mui/material';
|
3
|
+
export const EmbedErrorCard = (props) => {
|
4
|
+
const { alertProps, error, hideErrorDetails = true, children, ...cardProps } = props;
|
5
|
+
const errorProps = { alertProps, error, hideErrorDetails };
|
6
|
+
return (_jsx(Card, { ...cardProps, children: _jsx(CardContent, { children: children ?? _jsx(DefaultErrorAlert, { ...errorProps }) }) }));
|
7
|
+
};
|
8
|
+
const DefaultErrorAlert = ({ alertProps, hideErrorDetails, error }) => {
|
9
|
+
return (_jsxs(Alert, { severity: "error", ...alertProps, children: [_jsx(AlertTitle, { children: "Whoops! Something went wrong" }), !hideErrorDetails && error ? (_jsxs(_Fragment, { children: [_jsx(Typography, { variant: "caption", children: "Error: " }), _jsx(Typography, { variant: "caption", children: error?.message })] })) : (_jsx(Typography, { variant: "caption", fontSize: "small", children: "Error Loading Plugin" }))] }));
|
10
|
+
};
|
11
|
+
//# sourceMappingURL=EmbedErrorCard.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"EmbedErrorCard.js","sourceRoot":"","sources":["../../../../../src/components/embed-card/error-handling/EmbedErrorCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAc,UAAU,EAAE,IAAI,EAAE,WAAW,EAAa,UAAU,EAAE,MAAM,eAAe,CAAA;AAcvG,MAAM,CAAC,MAAM,cAAc,GAAgD,CAAC,KAAK,EAAE,EAAE;IACnF,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,gBAAgB,GAAG,IAAI,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAA;IACpF,MAAM,UAAU,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,gBAAgB,EAAE,CAAA;IAC1D,OAAO,CACL,KAAC,IAAI,OAAK,SAAS,YACjB,KAAC,WAAW,cAAE,QAAQ,IAAI,KAAC,iBAAiB,OAAK,UAAU,GAAI,GAAe,GACzE,CACR,CAAA;AACH,CAAC,CAAA;AAED,MAAM,iBAAiB,GAAsC,CAAC,EAAE,UAAU,EAAE,gBAAgB,EAAE,KAAK,EAAE,EAAE,EAAE;IACvG,OAAO,CACL,MAAC,KAAK,IAAC,QAAQ,EAAC,OAAO,KAAK,UAAU,aACpC,KAAC,UAAU,+CAA0C,EACpD,CAAC,gBAAgB,IAAI,KAAK,CAAC,CAAC,CAAC,CAC5B,8BACE,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,wBAAqB,EAClD,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,YAAE,KAAK,EAAE,OAAO,GAAc,IAC1D,CACJ,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,EAAC,QAAQ,EAAC,OAAO,qCAEjC,CACd,IACK,CACT,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/embed-card/error-handling/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kBAAkB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/embed-card/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA;AACtB,cAAc,mBAAmB,CAAA"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import MoreVertIcon from '@mui/icons-material/MoreVert';
|
3
|
+
import { IconButton, Menu } from '@mui/material';
|
4
|
+
import { useState } from 'react';
|
5
|
+
import { JsonMenuItem } from './JsonMenuItem';
|
6
|
+
export const EmbedMenu = (props) => {
|
7
|
+
// TODO - link to explore website
|
8
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
9
|
+
const open = Boolean(anchorEl);
|
10
|
+
const handleClick = (event) => {
|
11
|
+
setAnchorEl(event.currentTarget);
|
12
|
+
};
|
13
|
+
const handleClose = () => {
|
14
|
+
setAnchorEl(null);
|
15
|
+
};
|
16
|
+
return (_jsxs(_Fragment, { children: [_jsx(IconButton, { onClick: handleClick, ...props, children: _jsx(MoreVertIcon, {}) }), _jsx(Menu, { anchorEl: anchorEl, open: open, onClose: handleClose, PaperProps: { variant: 'elevation' }, MenuListProps: { dense: true }, children: _jsx(JsonMenuItem, {}) })] }));
|
17
|
+
};
|
18
|
+
//# sourceMappingURL=EmbedMenu.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"EmbedMenu.js","sourceRoot":"","sources":["../../../../../src/components/embed-card/menu/EmbedMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,8BAA8B,CAAA;AACvD,OAAO,EAAE,UAAU,EAAmB,IAAI,EAAE,MAAM,eAAe,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,MAAM,CAAC,MAAM,SAAS,GAA8B,CAAC,KAAK,EAAE,EAAE;IAC5D,iCAAiC;IACjC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAqB,IAAI,CAAC,CAAA;IAClE,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;IAE9B,MAAM,WAAW,GAAG,CAAC,KAA0C,EAAE,EAAE;QACjE,WAAW,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;IAClC,CAAC,CAAA;IACD,MAAM,WAAW,GAAG,GAAG,EAAE;QACvB,WAAW,CAAC,IAAI,CAAC,CAAA;IACnB,CAAC,CAAA;IAED,OAAO,CACL,8BACE,KAAC,UAAU,IAAC,OAAO,EAAE,WAAW,KAAM,KAAK,YACzC,KAAC,YAAY,KAAG,GACL,EACb,KAAC,IAAI,IAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,YAC9H,KAAC,YAAY,KAAG,GACX,IACN,CACJ,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
2
|
+
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
|
3
|
+
import { ListItemIcon, ListItemText, MenuItem } from '@mui/material';
|
4
|
+
import { useResolvePayload } from '../../../contexts';
|
5
|
+
export const JsonMenuItem = (props) => {
|
6
|
+
const { huri } = useResolvePayload();
|
7
|
+
return (_jsx(_Fragment, { children: huri ? (_jsxs(MenuItem, { title: "Source Payload JSON", onClick: () => window.open(huri, '_blank'), ...props, children: [_jsx(ListItemText, { sx: { mr: 1 }, children: "JSON" }), _jsx(ListItemIcon, { sx: { justifyContent: 'end' }, children: _jsx(OpenInNewIcon, { fontSize: "small" }) })] })) : null }));
|
8
|
+
};
|
9
|
+
//# sourceMappingURL=JsonMenuItem.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"JsonMenuItem.js","sourceRoot":"","sources":["../../../../../src/components/embed-card/menu/JsonMenuItem.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,MAAM,+BAA+B,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAiB,MAAM,eAAe,CAAA;AAEnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAErD,MAAM,CAAC,MAAM,YAAY,GAA4B,CAAC,KAAK,EAAE,EAAE;IAC7D,MAAM,EAAE,IAAI,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAEpC,OAAO,CACL,4BACG,IAAI,CAAC,CAAC,CAAC,CACN,MAAC,QAAQ,IAAC,KAAK,EAAC,qBAAqB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,KAAM,KAAK,aACzF,KAAC,YAAY,IAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,qBAAqB,EAChD,KAAC,YAAY,IAAC,EAAE,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,YACzC,KAAC,aAAa,IAAC,QAAQ,EAAC,OAAO,GAAG,GACrB,IACN,CACZ,CAAC,CAAC,CAAC,IAAI,GACP,CACJ,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/embed-card/menu/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
export const payloadData = {
|
2
|
+
assets: {
|
3
|
+
ada: { value: { btc: '0.00002192', eth: '0.00031141', eur: '0.491867', usd: '0.502045' } },
|
4
|
+
btc: { value: { btc: '1', eth: '14.213346', eur: '22450', usd: '22914' } },
|
5
|
+
busd: { value: { btc: '0.00004369', eth: '0.00062074', eur: '0.980451', usd: '1.001' } },
|
6
|
+
dai: { value: { usdc: '1.00004', xyo: '114.394' } },
|
7
|
+
doge: { value: { btc: '0.00000293', eth: '0.00004157', eur: '0.065655', usd: '0.067013' } },
|
8
|
+
dot: { value: { btc: '0.00035508', eth: '0.00504454', eur: '7.97', usd: '8.13' } },
|
9
|
+
eth: { value: { btc: '0.0703878', eth: '1', eur: '1579.47', usd: '1612.16' } },
|
10
|
+
frax: { value: { usdc: '0.999738' } },
|
11
|
+
link: { value: { xyo: '837.731' } },
|
12
|
+
sol: { value: { btc: '0.00169369', eth: '0.02406215', eur: '38.01', usd: '38.79' } },
|
13
|
+
usdc: { value: { btc: '0.0000436965', dai: '0.999963', eth: '0.0006204464999999999', eur: '0.979419', frax: '1.00026', usd: '0.999732' } },
|
14
|
+
usdt: { value: { btc: '0.00004367', eth: '0.0006204', eur: '0.979881', usd: '1.001', usdc: '1.00022', xyo: '113.28' } },
|
15
|
+
wbtc: { value: { btc: '0.99903669', eth: '14.2015745', eur: '22418', usd: '22882', usdc: '22860.8', xyo: '2617950' } },
|
16
|
+
weth: { value: { btc: '0.0703735', usdc: '1610.82', xyo: '186652' } },
|
17
|
+
xyo: { value: { btc: '3.79226e-7', dai: '0.00874169', eth: '0.000005353785', eur: '0.00844792', link: '0.0011937', usd: '0.00872519' } },
|
18
|
+
},
|
19
|
+
schema: 'network.xyo.crypto.asset',
|
20
|
+
timestamp: 1659625815232,
|
21
|
+
};
|
22
|
+
//# sourceMappingURL=storyPayload.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"storyPayload.js","sourceRoot":"","sources":["../../../../src/components/embed-plugin-stories/storyPayload.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM,EAAE;QACN,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,EAAE;QAC1F,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE;QAC1E,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,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I,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE;QACtH,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE;QACrE,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAE,EAAE;KACzI;IACD,MAAM,EAAE,0BAA0B;IAClC,SAAS,EAAE,aAAa;CACzB,CAAA"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { BrowserRouter } from 'react-router-dom';
|
3
|
+
import { ApiEmbedPluginCard } from '../embed-card';
|
4
|
+
export const xyoEmbedStoryBase = {
|
5
|
+
argTypes: {},
|
6
|
+
component: ApiEmbedPluginCard,
|
7
|
+
parameters: {
|
8
|
+
docs: {
|
9
|
+
page: null,
|
10
|
+
},
|
11
|
+
},
|
12
|
+
};
|
13
|
+
export const Template = (args) => {
|
14
|
+
return (_jsx(BrowserRouter, { children: _jsx(ApiEmbedPluginCard, { ...args }) }));
|
15
|
+
};
|
16
|
+
//# sourceMappingURL=storyShared.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"storyShared.js","sourceRoot":"","sources":["../../../../src/components/embed-plugin-stories/storyShared.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAElD,MAAM,CAAC,MAAM,iBAAiB,GAAS;IACrC,QAAQ,EAAE,EAAE;IACZ,SAAS,EAAE,kBAAkB;IAC7B,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,IAAI,EAAE,IAAI;SACX;KACF;CACF,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAuC,CAAC,IAAI,EAAE,EAAE;IACnE,OAAO,CACL,KAAC,aAAa,cACZ,KAAC,kBAAkB,OAAK,IAAI,GAAI,GAClB,CACjB,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { jsxs as _jsxs, Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { Alert } from '@mui/material';
|
3
|
+
import { useValidatePayload } from '../../contexts';
|
4
|
+
export const ValidatePayloadAlert = ({ children, ...props }) => {
|
5
|
+
const { validPayload, enabled, schema } = useValidatePayload();
|
6
|
+
if (enabled && validPayload === false) {
|
7
|
+
return (_jsxs(Alert, { severity: "error", title: "Invalid Payload!", ...props, children: ["Payload schema claimed to be ", schema, " but failed to validate."] }));
|
8
|
+
}
|
9
|
+
return _jsx(_Fragment, { children: children });
|
10
|
+
};
|
11
|
+
//# sourceMappingURL=ValidatePayload.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ValidatePayload.js","sourceRoot":"","sources":["../../../../src/components/validation-alerts/ValidatePayload.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAc,MAAM,eAAe,CAAA;AAGjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAEnD,MAAM,CAAC,MAAM,oBAAoB,GAAuC,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACjG,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAE9D,IAAI,OAAO,IAAI,YAAY,KAAK,KAAK,EAAE;QACrC,OAAO,CACL,MAAC,KAAK,IAAC,QAAQ,EAAC,OAAO,EAAC,KAAK,EAAC,kBAAkB,KAAK,KAAK,8CAC1B,MAAM,gCAC9B,CACT,CAAA;KACF;IAED,OAAO,4BAAG,QAAQ,GAAI,CAAA;AACxB,CAAC,CAAA"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
2
|
+
import { Alert, AlertTitle } from '@mui/material';
|
3
|
+
import { useEmbedPluginState, useResolvePayload } from '../../contexts';
|
4
|
+
export const ValidatePluginsAlert = ({ children, ...props }) => {
|
5
|
+
const { payload } = useResolvePayload();
|
6
|
+
const { plugins } = useEmbedPluginState();
|
7
|
+
if (payload && plugins?.length === 0) {
|
8
|
+
return (_jsxs(Alert, { severity: "warning", ...props, children: [_jsx(AlertTitle, { children: "Missing plugins!" }), "Payload found but no plugins were present."] }));
|
9
|
+
}
|
10
|
+
return _jsx(_Fragment, { children: children });
|
11
|
+
};
|
12
|
+
//# sourceMappingURL=ValidatePlugins.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ValidatePlugins.js","sourceRoot":"","sources":["../../../../src/components/validation-alerts/ValidatePlugins.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAc,UAAU,EAAE,MAAM,eAAe,CAAA;AAG7D,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAEvE,MAAM,CAAC,MAAM,oBAAoB,GAAuC,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACjG,MAAM,EAAE,OAAO,EAAE,GAAG,iBAAiB,EAAE,CAAA;IACvC,MAAM,EAAE,OAAO,EAAE,GAAG,mBAAmB,EAAE,CAAA;IAEzC,IAAI,OAAO,IAAI,OAAO,EAAE,MAAM,KAAK,CAAC,EAAE;QACpC,OAAO,CACL,MAAC,KAAK,IAAC,QAAQ,EAAC,SAAS,KAAK,KAAK,aACjC,KAAC,UAAU,mCAA8B,kDACnC,CACT,CAAA;KACF;IAED,OAAO,4BAAG,QAAQ,GAAI,CAAA;AACxB,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/validation-alerts/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Context.js","sourceRoot":"","sources":["../../../../src/contexts/EmbedPluginContext/Context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAI3D,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,EAAoB,CAAA"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { useEffect, useState } from 'react';
|
3
|
+
import { EmbedPluginContext } from './Context';
|
4
|
+
/** Expose passed embed plugin props via context */
|
5
|
+
export const EmbedPluginProvider = ({ children, refreshTitle, timestampLabel, hideElementsConfig, plugins, embedPluginConfig, }) => {
|
6
|
+
const [activePlugin, setActivePlugin] = useState(plugins ? plugins[0] : undefined);
|
7
|
+
useEffect(() => {
|
8
|
+
setActivePlugin(plugins ? plugins[0] : undefined);
|
9
|
+
}, [plugins]);
|
10
|
+
return (_jsx(EmbedPluginContext.Provider, { value: {
|
11
|
+
activePlugin,
|
12
|
+
embedPluginConfig,
|
13
|
+
hideElementsConfig,
|
14
|
+
provided: true,
|
15
|
+
refreshTitle,
|
16
|
+
setActivePlugin,
|
17
|
+
timestampLabel,
|
18
|
+
}, children: children }));
|
19
|
+
};
|
20
|
+
//# sourceMappingURL=Provider.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../../src/contexts/EmbedPluginContext/Provider.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAK9C,mDAAmD;AACnD,MAAM,CAAC,MAAM,mBAAmB,GAAqD,CAAC,EACpF,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,OAAO,EACP,iBAAiB,GAClB,EAAE,EAAE;IACH,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAkC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;IAEnH,SAAS,CAAC,GAAG,EAAE;QACb,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;IACnD,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IAEb,OAAO,CACL,KAAC,kBAAkB,CAAC,QAAQ,IAC1B,KAAK,EAAE;YACL,YAAY;YACZ,iBAAiB;YACjB,kBAAkB;YAClB,QAAQ,EAAE,IAAI;YACd,YAAY;YACZ,eAAe;YACf,cAAc;SACf,YAEA,QAAQ,GACmB,CAC/B,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"State.js","sourceRoot":"","sources":["../../../../src/contexts/EmbedPluginContext/State.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/contexts/EmbedPluginContext/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,OAAO,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"use.js","sourceRoot":"","sources":["../../../../src/contexts/EmbedPluginContext/use.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAE9C,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,kBAAkB,EAAE,aAAa,EAAE,IAAI,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Context.js","sourceRoot":"","sources":["../../../../src/contexts/RefreshPayloadContext/Context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAI3D,MAAM,CAAC,MAAM,qBAAqB,GAAG,eAAe,EAAuB,CAAA"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { useState } from 'react';
|
3
|
+
import { RefreshPayloadContext } from './Context';
|
4
|
+
export const RefreshPayloadProvider = ({ children, onRefresh, refreshPayload }) => {
|
5
|
+
const [localRefreshPayload, setRefreshPayload] = useState(refreshPayload);
|
6
|
+
return (_jsx(RefreshPayloadContext.Provider, { value: { onRefresh, provided: true, refreshPayload: localRefreshPayload, setRefreshPayload }, children: children }));
|
7
|
+
};
|
8
|
+
//# sourceMappingURL=Provider.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../../src/contexts/RefreshPayloadContext/Provider.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAOjD,MAAM,CAAC,MAAM,sBAAsB,GAAgD,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,EAAE,EAAE;IAC7H,MAAM,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAA;IAEzE,OAAO,CACL,KAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,YACzH,QAAQ,GACsB,CAClC,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"State.js","sourceRoot":"","sources":["../../../../src/contexts/RefreshPayloadContext/State.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/contexts/RefreshPayloadContext/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,OAAO,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"use.js","sourceRoot":"","sources":["../../../../src/contexts/RefreshPayloadContext/use.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAExD,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAEjD,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,qBAAqB,EAAE,gBAAgB,EAAE,IAAI,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Context.js","sourceRoot":"","sources":["../../../../src/contexts/ResolvePayloadContext/Context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAI3D,MAAM,CAAC,MAAM,qBAAqB,GAAG,eAAe,EAAuB,CAAA"}
|