@xyo-network/react-embed 2.64.9 → 2.64.10
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/docs.json +109 -109
- package/package.json +15 -15
- package/dist/browser/components/EmbedPlugin.cjs +0 -251
- package/dist/browser/components/EmbedPlugin.cjs.map +0 -1
- package/dist/browser/components/EmbedPlugin.js +0 -230
- package/dist/browser/components/EmbedPlugin.js.map +0 -1
- package/dist/browser/components/EmbedResolver.cjs +0 -42
- package/dist/browser/components/EmbedResolver.cjs.map +0 -1
- package/dist/browser/components/EmbedResolver.js +0 -21
- package/dist/browser/components/EmbedResolver.js.map +0 -1
- package/dist/browser/components/controls/EmbedFormControl.cjs +0 -34
- package/dist/browser/components/controls/EmbedFormControl.cjs.map +0 -1
- package/dist/browser/components/controls/EmbedFormControl.js +0 -13
- package/dist/browser/components/controls/EmbedFormControl.js.map +0 -1
- package/dist/browser/components/controls/ListModeSelect.cjs +0 -65
- package/dist/browser/components/controls/ListModeSelect.cjs.map +0 -1
- package/dist/browser/components/controls/ListModeSelect.js +0 -44
- package/dist/browser/components/controls/ListModeSelect.js.map +0 -1
- package/dist/browser/components/controls/RenderSelect.cjs +0 -54
- package/dist/browser/components/controls/RenderSelect.cjs.map +0 -1
- package/dist/browser/components/controls/RenderSelect.js +0 -33
- package/dist/browser/components/controls/RenderSelect.js.map +0 -1
- package/dist/browser/components/controls/index.cjs +0 -87
- package/dist/browser/components/controls/index.cjs.map +0 -1
- package/dist/browser/components/controls/index.js +0 -64
- package/dist/browser/components/controls/index.js.map +0 -1
- package/dist/browser/components/embed-card/EmbedCardResolver.cjs +0 -95
- package/dist/browser/components/embed-card/EmbedCardResolver.cjs.map +0 -1
- package/dist/browser/components/embed-card/EmbedCardResolver.js +0 -74
- package/dist/browser/components/embed-card/EmbedCardResolver.js.map +0 -1
- package/dist/browser/components/embed-card/EmbedPluginCard.cjs +0 -497
- package/dist/browser/components/embed-card/EmbedPluginCard.cjs.map +0 -1
- package/dist/browser/components/embed-card/EmbedPluginCard.js +0 -479
- package/dist/browser/components/embed-card/EmbedPluginCard.js.map +0 -1
- package/dist/browser/components/embed-card/card/BusyCard.cjs +0 -45
- package/dist/browser/components/embed-card/card/BusyCard.cjs.map +0 -1
- package/dist/browser/components/embed-card/card/BusyCard.js +0 -27
- package/dist/browser/components/embed-card/card/BusyCard.js.map +0 -1
- package/dist/browser/components/embed-card/card/EmbedCardHeader.cjs +0 -108
- package/dist/browser/components/embed-card/card/EmbedCardHeader.cjs.map +0 -1
- package/dist/browser/components/embed-card/card/EmbedCardHeader.js +0 -87
- package/dist/browser/components/embed-card/card/EmbedCardHeader.js.map +0 -1
- package/dist/browser/components/embed-card/card/EmbedPluginCard.cjs +0 -199
- package/dist/browser/components/embed-card/card/EmbedPluginCard.cjs.map +0 -1
- package/dist/browser/components/embed-card/card/EmbedPluginCard.js +0 -181
- package/dist/browser/components/embed-card/card/EmbedPluginCard.js.map +0 -1
- package/dist/browser/components/embed-card/card/index.cjs +0 -203
- package/dist/browser/components/embed-card/card/index.cjs.map +0 -1
- package/dist/browser/components/embed-card/card/index.js +0 -183
- package/dist/browser/components/embed-card/card/index.js.map +0 -1
- package/dist/browser/components/embed-card/error-handling/EmbedCardApiErrorRenderer.cjs +0 -54
- package/dist/browser/components/embed-card/error-handling/EmbedCardApiErrorRenderer.cjs.map +0 -1
- package/dist/browser/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js +0 -33
- package/dist/browser/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js.map +0 -1
- package/dist/browser/components/embed-card/error-handling/EmbedErrorCard.cjs +0 -42
- package/dist/browser/components/embed-card/error-handling/EmbedErrorCard.cjs.map +0 -1
- package/dist/browser/components/embed-card/error-handling/EmbedErrorCard.js +0 -21
- package/dist/browser/components/embed-card/error-handling/EmbedErrorCard.js.map +0 -1
- package/dist/browser/components/embed-card/error-handling/index.cjs +0 -57
- package/dist/browser/components/embed-card/error-handling/index.cjs.map +0 -1
- package/dist/browser/components/embed-card/error-handling/index.js +0 -34
- package/dist/browser/components/embed-card/error-handling/index.js.map +0 -1
- package/dist/browser/components/embed-card/index.cjs +0 -502
- package/dist/browser/components/embed-card/index.cjs.map +0 -1
- package/dist/browser/components/embed-card/index.js +0 -482
- package/dist/browser/components/embed-card/index.js.map +0 -1
- package/dist/browser/components/embed-card/menu/EmbedMenu.cjs +0 -68
- package/dist/browser/components/embed-card/menu/EmbedMenu.cjs.map +0 -1
- package/dist/browser/components/embed-card/menu/EmbedMenu.js +0 -47
- package/dist/browser/components/embed-card/menu/EmbedMenu.js.map +0 -1
- package/dist/browser/components/embed-card/menu/JsonMenuItem.cjs +0 -46
- package/dist/browser/components/embed-card/menu/JsonMenuItem.cjs.map +0 -1
- package/dist/browser/components/embed-card/menu/JsonMenuItem.js +0 -25
- package/dist/browser/components/embed-card/menu/JsonMenuItem.js.map +0 -1
- package/dist/browser/components/embed-card/menu/index.cjs +0 -70
- package/dist/browser/components/embed-card/menu/index.cjs.map +0 -1
- package/dist/browser/components/embed-card/menu/index.js +0 -47
- package/dist/browser/components/embed-card/menu/index.js.map +0 -1
- package/dist/browser/components/embed-plugin-stories/storyPayload.cjs +0 -47
- package/dist/browser/components/embed-plugin-stories/storyPayload.cjs.map +0 -1
- package/dist/browser/components/embed-plugin-stories/storyPayload.js +0 -26
- package/dist/browser/components/embed-plugin-stories/storyPayload.js.map +0 -1
- package/dist/browser/components/embed-plugin-stories/storyShared.cjs +0 -513
- package/dist/browser/components/embed-plugin-stories/storyShared.cjs.map +0 -1
- package/dist/browser/components/embed-plugin-stories/storyShared.js +0 -495
- package/dist/browser/components/embed-plugin-stories/storyShared.js.map +0 -1
- package/dist/browser/components/index.cjs +0 -503
- package/dist/browser/components/index.cjs.map +0 -1
- package/dist/browser/components/index.js +0 -483
- package/dist/browser/components/index.js.map +0 -1
- package/dist/browser/components/validation-alerts/ValidatePayload.cjs +0 -49
- package/dist/browser/components/validation-alerts/ValidatePayload.cjs.map +0 -1
- package/dist/browser/components/validation-alerts/ValidatePayload.js +0 -28
- package/dist/browser/components/validation-alerts/ValidatePayload.js.map +0 -1
- package/dist/browser/components/validation-alerts/ValidatePlugins.cjs +0 -57
- package/dist/browser/components/validation-alerts/ValidatePlugins.cjs.map +0 -1
- package/dist/browser/components/validation-alerts/ValidatePlugins.js +0 -36
- package/dist/browser/components/validation-alerts/ValidatePlugins.js.map +0 -1
- package/dist/browser/components/validation-alerts/index.cjs +0 -83
- package/dist/browser/components/validation-alerts/index.cjs.map +0 -1
- package/dist/browser/components/validation-alerts/index.js +0 -60
- package/dist/browser/components/validation-alerts/index.js.map +0 -1
- package/dist/browser/contexts/EmbedPluginContext/Context.cjs +0 -28
- package/dist/browser/contexts/EmbedPluginContext/Context.cjs.map +0 -1
- package/dist/browser/contexts/EmbedPluginContext/Context.js +0 -7
- package/dist/browser/contexts/EmbedPluginContext/Context.js.map +0 -1
- package/dist/browser/contexts/EmbedPluginContext/Provider.cjs +0 -62
- package/dist/browser/contexts/EmbedPluginContext/Provider.cjs.map +0 -1
- package/dist/browser/contexts/EmbedPluginContext/Provider.js +0 -41
- package/dist/browser/contexts/EmbedPluginContext/Provider.js.map +0 -1
- package/dist/browser/contexts/EmbedPluginContext/State.cjs +0 -19
- package/dist/browser/contexts/EmbedPluginContext/State.cjs.map +0 -1
- package/dist/browser/contexts/EmbedPluginContext/State.js +0 -1
- package/dist/browser/contexts/EmbedPluginContext/State.js.map +0 -1
- package/dist/browser/contexts/EmbedPluginContext/index.cjs +0 -68
- package/dist/browser/contexts/EmbedPluginContext/index.cjs.map +0 -1
- package/dist/browser/contexts/EmbedPluginContext/index.js +0 -45
- package/dist/browser/contexts/EmbedPluginContext/index.js.map +0 -1
- package/dist/browser/contexts/EmbedPluginContext/use.cjs +0 -34
- package/dist/browser/contexts/EmbedPluginContext/use.cjs.map +0 -1
- package/dist/browser/contexts/EmbedPluginContext/use.js +0 -13
- package/dist/browser/contexts/EmbedPluginContext/use.js.map +0 -1
- package/dist/browser/contexts/RefreshPayloadContext/Context.cjs +0 -28
- package/dist/browser/contexts/RefreshPayloadContext/Context.cjs.map +0 -1
- package/dist/browser/contexts/RefreshPayloadContext/Context.js +0 -7
- package/dist/browser/contexts/RefreshPayloadContext/Context.js.map +0 -1
- package/dist/browser/contexts/RefreshPayloadContext/Provider.cjs +0 -38
- package/dist/browser/contexts/RefreshPayloadContext/Provider.cjs.map +0 -1
- package/dist/browser/contexts/RefreshPayloadContext/Provider.js +0 -17
- package/dist/browser/contexts/RefreshPayloadContext/Provider.js.map +0 -1
- package/dist/browser/contexts/RefreshPayloadContext/State.cjs +0 -19
- package/dist/browser/contexts/RefreshPayloadContext/State.cjs.map +0 -1
- package/dist/browser/contexts/RefreshPayloadContext/State.js +0 -1
- package/dist/browser/contexts/RefreshPayloadContext/State.js.map +0 -1
- package/dist/browser/contexts/RefreshPayloadContext/index.cjs +0 -45
- package/dist/browser/contexts/RefreshPayloadContext/index.cjs.map +0 -1
- package/dist/browser/contexts/RefreshPayloadContext/index.js +0 -22
- package/dist/browser/contexts/RefreshPayloadContext/index.js.map +0 -1
- package/dist/browser/contexts/RefreshPayloadContext/use.cjs +0 -34
- package/dist/browser/contexts/RefreshPayloadContext/use.cjs.map +0 -1
- package/dist/browser/contexts/RefreshPayloadContext/use.js +0 -13
- package/dist/browser/contexts/RefreshPayloadContext/use.js.map +0 -1
- package/dist/browser/contexts/ResolvePayloadContext/Context.cjs +0 -28
- package/dist/browser/contexts/ResolvePayloadContext/Context.cjs.map +0 -1
- package/dist/browser/contexts/ResolvePayloadContext/Context.js +0 -7
- package/dist/browser/contexts/ResolvePayloadContext/Context.js.map +0 -1
- package/dist/browser/contexts/ResolvePayloadContext/Provider.cjs +0 -88
- package/dist/browser/contexts/ResolvePayloadContext/Provider.cjs.map +0 -1
- package/dist/browser/contexts/ResolvePayloadContext/Provider.js +0 -67
- package/dist/browser/contexts/ResolvePayloadContext/Provider.js.map +0 -1
- package/dist/browser/contexts/ResolvePayloadContext/State.cjs +0 -19
- package/dist/browser/contexts/ResolvePayloadContext/State.cjs.map +0 -1
- package/dist/browser/contexts/ResolvePayloadContext/State.js +0 -1
- package/dist/browser/contexts/ResolvePayloadContext/State.js.map +0 -1
- package/dist/browser/contexts/ResolvePayloadContext/index.cjs +0 -96
- package/dist/browser/contexts/ResolvePayloadContext/index.cjs.map +0 -1
- package/dist/browser/contexts/ResolvePayloadContext/index.js +0 -73
- package/dist/browser/contexts/ResolvePayloadContext/index.js.map +0 -1
- package/dist/browser/contexts/ResolvePayloadContext/use.cjs +0 -34
- package/dist/browser/contexts/ResolvePayloadContext/use.cjs.map +0 -1
- package/dist/browser/contexts/ResolvePayloadContext/use.js +0 -13
- package/dist/browser/contexts/ResolvePayloadContext/use.js.map +0 -1
- package/dist/browser/contexts/ValidatePayloadContext/Context.cjs +0 -28
- package/dist/browser/contexts/ValidatePayloadContext/Context.cjs.map +0 -1
- package/dist/browser/contexts/ValidatePayloadContext/Context.js +0 -7
- package/dist/browser/contexts/ValidatePayloadContext/Context.js.map +0 -1
- package/dist/browser/contexts/ValidatePayloadContext/Provider.cjs +0 -66
- package/dist/browser/contexts/ValidatePayloadContext/Provider.cjs.map +0 -1
- package/dist/browser/contexts/ValidatePayloadContext/Provider.js +0 -45
- package/dist/browser/contexts/ValidatePayloadContext/Provider.js.map +0 -1
- package/dist/browser/contexts/ValidatePayloadContext/State.cjs +0 -19
- package/dist/browser/contexts/ValidatePayloadContext/State.cjs.map +0 -1
- package/dist/browser/contexts/ValidatePayloadContext/State.js +0 -1
- package/dist/browser/contexts/ValidatePayloadContext/State.js.map +0 -1
- package/dist/browser/contexts/ValidatePayloadContext/index.cjs +0 -73
- package/dist/browser/contexts/ValidatePayloadContext/index.cjs.map +0 -1
- package/dist/browser/contexts/ValidatePayloadContext/index.js +0 -50
- package/dist/browser/contexts/ValidatePayloadContext/index.js.map +0 -1
- package/dist/browser/contexts/ValidatePayloadContext/use.cjs +0 -34
- package/dist/browser/contexts/ValidatePayloadContext/use.cjs.map +0 -1
- package/dist/browser/contexts/ValidatePayloadContext/use.js +0 -13
- package/dist/browser/contexts/ValidatePayloadContext/use.js.map +0 -1
- package/dist/browser/contexts/index.cjs +0 -189
- package/dist/browser/contexts/index.cjs.map +0 -1
- package/dist/browser/contexts/index.js +0 -166
- package/dist/browser/contexts/index.js.map +0 -1
- package/dist/browser/types/EmbedPluginProps.cjs +0 -19
- package/dist/browser/types/EmbedPluginProps.cjs.map +0 -1
- package/dist/browser/types/EmbedPluginProps.js +0 -1
- package/dist/browser/types/EmbedPluginProps.js.map +0 -1
- package/dist/browser/types/index.cjs +0 -19
- package/dist/browser/types/index.cjs.map +0 -1
- package/dist/browser/types/index.js +0 -1
- package/dist/browser/types/index.js.map +0 -1
- package/dist/node/components/EmbedPlugin.cjs +0 -255
- package/dist/node/components/EmbedPlugin.cjs.map +0 -1
- package/dist/node/components/EmbedPlugin.js +0 -230
- package/dist/node/components/EmbedPlugin.js.map +0 -1
- package/dist/node/components/EmbedResolver.cjs +0 -46
- package/dist/node/components/EmbedResolver.cjs.map +0 -1
- package/dist/node/components/EmbedResolver.js +0 -21
- package/dist/node/components/EmbedResolver.js.map +0 -1
- package/dist/node/components/controls/EmbedFormControl.cjs +0 -38
- package/dist/node/components/controls/EmbedFormControl.cjs.map +0 -1
- package/dist/node/components/controls/EmbedFormControl.js +0 -13
- package/dist/node/components/controls/EmbedFormControl.js.map +0 -1
- package/dist/node/components/controls/ListModeSelect.cjs +0 -70
- package/dist/node/components/controls/ListModeSelect.cjs.map +0 -1
- package/dist/node/components/controls/ListModeSelect.js +0 -44
- package/dist/node/components/controls/ListModeSelect.js.map +0 -1
- package/dist/node/components/controls/RenderSelect.cjs +0 -58
- package/dist/node/components/controls/RenderSelect.cjs.map +0 -1
- package/dist/node/components/controls/RenderSelect.js +0 -33
- package/dist/node/components/controls/RenderSelect.js.map +0 -1
- package/dist/node/components/controls/index.cjs +0 -94
- package/dist/node/components/controls/index.cjs.map +0 -1
- package/dist/node/components/controls/index.js +0 -64
- package/dist/node/components/controls/index.js.map +0 -1
- package/dist/node/components/embed-card/EmbedCardResolver.cjs +0 -99
- package/dist/node/components/embed-card/EmbedCardResolver.cjs.map +0 -1
- package/dist/node/components/embed-card/EmbedCardResolver.js +0 -74
- package/dist/node/components/embed-card/EmbedCardResolver.js.map +0 -1
- package/dist/node/components/embed-card/EmbedPluginCard.cjs +0 -505
- package/dist/node/components/embed-card/EmbedPluginCard.cjs.map +0 -1
- package/dist/node/components/embed-card/EmbedPluginCard.js +0 -481
- package/dist/node/components/embed-card/EmbedPluginCard.js.map +0 -1
- package/dist/node/components/embed-card/card/BusyCard.cjs +0 -49
- package/dist/node/components/embed-card/card/BusyCard.cjs.map +0 -1
- package/dist/node/components/embed-card/card/BusyCard.js +0 -27
- package/dist/node/components/embed-card/card/BusyCard.js.map +0 -1
- package/dist/node/components/embed-card/card/EmbedCardHeader.cjs +0 -113
- package/dist/node/components/embed-card/card/EmbedCardHeader.cjs.map +0 -1
- package/dist/node/components/embed-card/card/EmbedCardHeader.js +0 -88
- package/dist/node/components/embed-card/card/EmbedCardHeader.js.map +0 -1
- package/dist/node/components/embed-card/card/EmbedPluginCard.cjs +0 -205
- package/dist/node/components/embed-card/card/EmbedPluginCard.cjs.map +0 -1
- package/dist/node/components/embed-card/card/EmbedPluginCard.js +0 -183
- package/dist/node/components/embed-card/card/EmbedPluginCard.js.map +0 -1
- package/dist/node/components/embed-card/card/index.cjs +0 -211
- package/dist/node/components/embed-card/card/index.cjs.map +0 -1
- package/dist/node/components/embed-card/card/index.js +0 -185
- package/dist/node/components/embed-card/card/index.js.map +0 -1
- package/dist/node/components/embed-card/error-handling/EmbedCardApiErrorRenderer.cjs +0 -58
- package/dist/node/components/embed-card/error-handling/EmbedCardApiErrorRenderer.cjs.map +0 -1
- package/dist/node/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js +0 -33
- package/dist/node/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js.map +0 -1
- package/dist/node/components/embed-card/error-handling/EmbedErrorCard.cjs +0 -46
- package/dist/node/components/embed-card/error-handling/EmbedErrorCard.cjs.map +0 -1
- package/dist/node/components/embed-card/error-handling/EmbedErrorCard.js +0 -21
- package/dist/node/components/embed-card/error-handling/EmbedErrorCard.js.map +0 -1
- package/dist/node/components/embed-card/error-handling/index.cjs +0 -62
- package/dist/node/components/embed-card/error-handling/index.cjs.map +0 -1
- package/dist/node/components/embed-card/error-handling/index.js +0 -34
- package/dist/node/components/embed-card/error-handling/index.js.map +0 -1
- package/dist/node/components/embed-card/index.cjs +0 -513
- package/dist/node/components/embed-card/index.cjs.map +0 -1
- package/dist/node/components/embed-card/index.js +0 -484
- package/dist/node/components/embed-card/index.js.map +0 -1
- package/dist/node/components/embed-card/menu/EmbedMenu.cjs +0 -72
- package/dist/node/components/embed-card/menu/EmbedMenu.cjs.map +0 -1
- package/dist/node/components/embed-card/menu/EmbedMenu.js +0 -47
- package/dist/node/components/embed-card/menu/EmbedMenu.js.map +0 -1
- package/dist/node/components/embed-card/menu/JsonMenuItem.cjs +0 -50
- package/dist/node/components/embed-card/menu/JsonMenuItem.cjs.map +0 -1
- package/dist/node/components/embed-card/menu/JsonMenuItem.js +0 -25
- package/dist/node/components/embed-card/menu/JsonMenuItem.js.map +0 -1
- package/dist/node/components/embed-card/menu/index.cjs +0 -74
- package/dist/node/components/embed-card/menu/index.cjs.map +0 -1
- package/dist/node/components/embed-card/menu/index.js +0 -47
- package/dist/node/components/embed-card/menu/index.js.map +0 -1
- package/dist/node/components/embed-plugin-stories/storyPayload.cjs +0 -51
- package/dist/node/components/embed-plugin-stories/storyPayload.cjs.map +0 -1
- package/dist/node/components/embed-plugin-stories/storyPayload.js +0 -26
- package/dist/node/components/embed-plugin-stories/storyPayload.js.map +0 -1
- package/dist/node/components/embed-plugin-stories/storyShared.cjs +0 -520
- package/dist/node/components/embed-plugin-stories/storyShared.cjs.map +0 -1
- package/dist/node/components/embed-plugin-stories/storyShared.js +0 -497
- package/dist/node/components/embed-plugin-stories/storyShared.js.map +0 -1
- package/dist/node/components/index.cjs +0 -515
- package/dist/node/components/index.cjs.map +0 -1
- package/dist/node/components/index.js +0 -485
- package/dist/node/components/index.js.map +0 -1
- package/dist/node/components/validation-alerts/ValidatePayload.cjs +0 -53
- package/dist/node/components/validation-alerts/ValidatePayload.cjs.map +0 -1
- package/dist/node/components/validation-alerts/ValidatePayload.js +0 -28
- package/dist/node/components/validation-alerts/ValidatePayload.js.map +0 -1
- package/dist/node/components/validation-alerts/ValidatePlugins.cjs +0 -61
- package/dist/node/components/validation-alerts/ValidatePlugins.cjs.map +0 -1
- package/dist/node/components/validation-alerts/ValidatePlugins.js +0 -36
- package/dist/node/components/validation-alerts/ValidatePlugins.js.map +0 -1
- package/dist/node/components/validation-alerts/index.cjs +0 -88
- package/dist/node/components/validation-alerts/index.cjs.map +0 -1
- package/dist/node/components/validation-alerts/index.js +0 -60
- package/dist/node/components/validation-alerts/index.js.map +0 -1
- package/dist/node/contexts/EmbedPluginContext/Context.cjs +0 -32
- package/dist/node/contexts/EmbedPluginContext/Context.cjs.map +0 -1
- package/dist/node/contexts/EmbedPluginContext/Context.js +0 -7
- package/dist/node/contexts/EmbedPluginContext/Context.js.map +0 -1
- package/dist/node/contexts/EmbedPluginContext/Provider.cjs +0 -66
- package/dist/node/contexts/EmbedPluginContext/Provider.cjs.map +0 -1
- package/dist/node/contexts/EmbedPluginContext/Provider.js +0 -41
- package/dist/node/contexts/EmbedPluginContext/Provider.js.map +0 -1
- package/dist/node/contexts/EmbedPluginContext/State.cjs +0 -19
- package/dist/node/contexts/EmbedPluginContext/State.cjs.map +0 -1
- package/dist/node/contexts/EmbedPluginContext/State.js +0 -1
- package/dist/node/contexts/EmbedPluginContext/State.js.map +0 -1
- package/dist/node/contexts/EmbedPluginContext/index.cjs +0 -74
- package/dist/node/contexts/EmbedPluginContext/index.cjs.map +0 -1
- package/dist/node/contexts/EmbedPluginContext/index.js +0 -45
- package/dist/node/contexts/EmbedPluginContext/index.js.map +0 -1
- package/dist/node/contexts/EmbedPluginContext/use.cjs +0 -38
- package/dist/node/contexts/EmbedPluginContext/use.cjs.map +0 -1
- package/dist/node/contexts/EmbedPluginContext/use.js +0 -13
- package/dist/node/contexts/EmbedPluginContext/use.js.map +0 -1
- package/dist/node/contexts/RefreshPayloadContext/Context.cjs +0 -32
- package/dist/node/contexts/RefreshPayloadContext/Context.cjs.map +0 -1
- package/dist/node/contexts/RefreshPayloadContext/Context.js +0 -7
- package/dist/node/contexts/RefreshPayloadContext/Context.js.map +0 -1
- package/dist/node/contexts/RefreshPayloadContext/Provider.cjs +0 -42
- package/dist/node/contexts/RefreshPayloadContext/Provider.cjs.map +0 -1
- package/dist/node/contexts/RefreshPayloadContext/Provider.js +0 -17
- package/dist/node/contexts/RefreshPayloadContext/Provider.js.map +0 -1
- package/dist/node/contexts/RefreshPayloadContext/State.cjs +0 -19
- package/dist/node/contexts/RefreshPayloadContext/State.cjs.map +0 -1
- package/dist/node/contexts/RefreshPayloadContext/State.js +0 -1
- package/dist/node/contexts/RefreshPayloadContext/State.js.map +0 -1
- package/dist/node/contexts/RefreshPayloadContext/index.cjs +0 -50
- package/dist/node/contexts/RefreshPayloadContext/index.cjs.map +0 -1
- package/dist/node/contexts/RefreshPayloadContext/index.js +0 -22
- package/dist/node/contexts/RefreshPayloadContext/index.js.map +0 -1
- package/dist/node/contexts/RefreshPayloadContext/use.cjs +0 -38
- package/dist/node/contexts/RefreshPayloadContext/use.cjs.map +0 -1
- package/dist/node/contexts/RefreshPayloadContext/use.js +0 -13
- package/dist/node/contexts/RefreshPayloadContext/use.js.map +0 -1
- package/dist/node/contexts/ResolvePayloadContext/Context.cjs +0 -32
- package/dist/node/contexts/ResolvePayloadContext/Context.cjs.map +0 -1
- package/dist/node/contexts/ResolvePayloadContext/Context.js +0 -7
- package/dist/node/contexts/ResolvePayloadContext/Context.js.map +0 -1
- package/dist/node/contexts/ResolvePayloadContext/Provider.cjs +0 -92
- package/dist/node/contexts/ResolvePayloadContext/Provider.cjs.map +0 -1
- package/dist/node/contexts/ResolvePayloadContext/Provider.js +0 -67
- package/dist/node/contexts/ResolvePayloadContext/Provider.js.map +0 -1
- package/dist/node/contexts/ResolvePayloadContext/State.cjs +0 -19
- package/dist/node/contexts/ResolvePayloadContext/State.cjs.map +0 -1
- package/dist/node/contexts/ResolvePayloadContext/State.js +0 -1
- package/dist/node/contexts/ResolvePayloadContext/State.js.map +0 -1
- package/dist/node/contexts/ResolvePayloadContext/index.cjs +0 -102
- package/dist/node/contexts/ResolvePayloadContext/index.cjs.map +0 -1
- package/dist/node/contexts/ResolvePayloadContext/index.js +0 -73
- package/dist/node/contexts/ResolvePayloadContext/index.js.map +0 -1
- package/dist/node/contexts/ResolvePayloadContext/use.cjs +0 -38
- package/dist/node/contexts/ResolvePayloadContext/use.cjs.map +0 -1
- package/dist/node/contexts/ResolvePayloadContext/use.js +0 -13
- package/dist/node/contexts/ResolvePayloadContext/use.js.map +0 -1
- package/dist/node/contexts/ValidatePayloadContext/Context.cjs +0 -32
- package/dist/node/contexts/ValidatePayloadContext/Context.cjs.map +0 -1
- package/dist/node/contexts/ValidatePayloadContext/Context.js +0 -7
- package/dist/node/contexts/ValidatePayloadContext/Context.js.map +0 -1
- package/dist/node/contexts/ValidatePayloadContext/Provider.cjs +0 -70
- package/dist/node/contexts/ValidatePayloadContext/Provider.cjs.map +0 -1
- package/dist/node/contexts/ValidatePayloadContext/Provider.js +0 -45
- package/dist/node/contexts/ValidatePayloadContext/Provider.js.map +0 -1
- package/dist/node/contexts/ValidatePayloadContext/State.cjs +0 -19
- package/dist/node/contexts/ValidatePayloadContext/State.cjs.map +0 -1
- package/dist/node/contexts/ValidatePayloadContext/State.js +0 -1
- package/dist/node/contexts/ValidatePayloadContext/State.js.map +0 -1
- package/dist/node/contexts/ValidatePayloadContext/index.cjs +0 -78
- package/dist/node/contexts/ValidatePayloadContext/index.cjs.map +0 -1
- package/dist/node/contexts/ValidatePayloadContext/index.js +0 -50
- package/dist/node/contexts/ValidatePayloadContext/index.js.map +0 -1
- package/dist/node/contexts/ValidatePayloadContext/use.cjs +0 -38
- package/dist/node/contexts/ValidatePayloadContext/use.cjs.map +0 -1
- package/dist/node/contexts/ValidatePayloadContext/use.js +0 -13
- package/dist/node/contexts/ValidatePayloadContext/use.js.map +0 -1
- package/dist/node/contexts/index.cjs +0 -202
- package/dist/node/contexts/index.cjs.map +0 -1
- package/dist/node/contexts/index.js +0 -166
- package/dist/node/contexts/index.js.map +0 -1
- package/dist/node/types/EmbedPluginProps.cjs +0 -19
- package/dist/node/types/EmbedPluginProps.cjs.map +0 -1
- package/dist/node/types/EmbedPluginProps.js +0 -1
- package/dist/node/types/EmbedPluginProps.js.map +0 -1
- package/dist/node/types/index.cjs +0 -19
- package/dist/node/types/index.cjs.map +0 -1
- package/dist/node/types/index.js +0 -1
- package/dist/node/types/index.js.map +0 -1
@@ -1,74 +0,0 @@
|
|
1
|
-
// src/components/embed-card/EmbedCardResolver.tsx
|
2
|
-
import { useTheme } from "@mui/material";
|
3
|
-
import { FlexCol } from "@xylabs/react-flexbox";
|
4
|
-
import { LoadResult } from "@xyo-network/react-shared";
|
5
|
-
|
6
|
-
// src/contexts/RefreshPayloadContext/Context.tsx
|
7
|
-
import { createContextEx } from "@xyo-network/react-shared";
|
8
|
-
var RefreshPayloadContext = createContextEx();
|
9
|
-
|
10
|
-
// src/contexts/RefreshPayloadContext/use.tsx
|
11
|
-
import { useContextEx } from "@xyo-network/react-shared";
|
12
|
-
var useRefreshPayload = () => useContextEx(RefreshPayloadContext, "RefreshPayload", true);
|
13
|
-
|
14
|
-
// src/contexts/ResolvePayloadContext/Context.ts
|
15
|
-
import { createContextEx as createContextEx2 } from "@xyo-network/react-shared";
|
16
|
-
var ResolvePayloadContext = createContextEx2();
|
17
|
-
|
18
|
-
// src/contexts/ResolvePayloadContext/use.tsx
|
19
|
-
import { useContextEx as useContextEx2 } from "@xyo-network/react-shared";
|
20
|
-
var useResolvePayload = () => useContextEx2(ResolvePayloadContext, "ResolvePayload", true);
|
21
|
-
|
22
|
-
// src/components/embed-card/error-handling/EmbedCardApiErrorRenderer.tsx
|
23
|
-
import { ErrorAlert, ErrorRender } from "@xyo-network/react-error";
|
24
|
-
|
25
|
-
// src/components/embed-card/error-handling/EmbedErrorCard.tsx
|
26
|
-
import { Alert, AlertTitle, Card, CardContent, Typography } from "@mui/material";
|
27
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
28
|
-
var EmbedErrorCard = (props) => {
|
29
|
-
const { alertProps, error, hideErrorDetails = true, children, ...cardProps } = props;
|
30
|
-
const errorProps = { alertProps, error, hideErrorDetails };
|
31
|
-
return /* @__PURE__ */ jsx(Card, { ...cardProps, children: /* @__PURE__ */ jsx(CardContent, { children: children ?? /* @__PURE__ */ jsx(DefaultErrorAlert, { ...errorProps }) }) });
|
32
|
-
};
|
33
|
-
var DefaultErrorAlert = ({ alertProps, hideErrorDetails, error }) => {
|
34
|
-
return /* @__PURE__ */ jsxs(Alert, { severity: "error", ...alertProps, children: [
|
35
|
-
/* @__PURE__ */ jsx(AlertTitle, { children: "Whoops! Something went wrong" }),
|
36
|
-
!hideErrorDetails && error ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
37
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: "Error: " }),
|
38
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: error == null ? void 0 : error.message })
|
39
|
-
] }) : /* @__PURE__ */ jsx(Typography, { variant: "caption", fontSize: "small", children: "Error Loading Plugin" })
|
40
|
-
] });
|
41
|
-
};
|
42
|
-
|
43
|
-
// src/components/embed-card/error-handling/EmbedCardApiErrorRenderer.tsx
|
44
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
45
|
-
var EmbedCardApiErrorRenderer = ({ xyoError, children, ...props }) => {
|
46
|
-
return /* @__PURE__ */ jsx2(ErrorRender, { error: xyoError, noReAuth: true, noErrorDisplay: true, customError: /* @__PURE__ */ jsx2(CustomApiErrorCard, { xyoError, ...props }), children });
|
47
|
-
};
|
48
|
-
var CustomApiErrorCard = ({ xyoError, ...props }) => {
|
49
|
-
return /* @__PURE__ */ jsx2(EmbedErrorCard, { ...props, children: /* @__PURE__ */ jsx2(ErrorAlert, { error: xyoError }) });
|
50
|
-
};
|
51
|
-
|
52
|
-
// src/components/embed-card/EmbedCardResolver.tsx
|
53
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
54
|
-
var EmbedCardResolverFlexBox = ({ children, ...props }) => {
|
55
|
-
const { payload, notFound, huriError } = useResolvePayload();
|
56
|
-
const { refreshPayload } = useRefreshPayload();
|
57
|
-
const theme = useTheme();
|
58
|
-
return /* @__PURE__ */ jsx3(LoadResult, { searchResult: payload, notFound: !!notFound, error: !!huriError, children: /* @__PURE__ */ jsx3(EmbedCardApiErrorRenderer, { xyoError: huriError, children: /* @__PURE__ */ jsx3(
|
59
|
-
FlexCol,
|
60
|
-
{
|
61
|
-
id: "embed-outer-wrap",
|
62
|
-
alignItems: "stretch",
|
63
|
-
justifyContent: "start",
|
64
|
-
busy: Boolean(!refreshPayload && payload),
|
65
|
-
busyCircularProps: { style: { alignItems: "start", paddingTop: theme.spacing(2), zIndex: 2 } },
|
66
|
-
...props,
|
67
|
-
children
|
68
|
-
}
|
69
|
-
) }) });
|
70
|
-
};
|
71
|
-
export {
|
72
|
-
EmbedCardResolverFlexBox
|
73
|
-
};
|
74
|
-
//# sourceMappingURL=EmbedCardResolver.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/embed-card/EmbedCardResolver.tsx","../../../../src/contexts/RefreshPayloadContext/Context.tsx","../../../../src/contexts/RefreshPayloadContext/use.tsx","../../../../src/contexts/ResolvePayloadContext/Context.ts","../../../../src/contexts/ResolvePayloadContext/use.tsx","../../../../src/components/embed-card/error-handling/EmbedCardApiErrorRenderer.tsx","../../../../src/components/embed-card/error-handling/EmbedErrorCard.tsx"],"sourcesContent":["import { useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { LoadResult } from '@xyo-network/react-shared'\n\nimport { useRefreshPayload, useResolvePayload } from '../../contexts'\nimport { EmbedCardApiErrorRenderer } from './error-handling'\n\nexport const EmbedCardResolverFlexBox: React.FC<WithChildren<FlexBoxProps>> = ({ children, ...props }) => {\n const { payload, notFound, huriError } = useResolvePayload()\n const { refreshPayload } = useRefreshPayload()\n const theme = useTheme()\n\n return (\n <LoadResult searchResult={payload} notFound={!!notFound} error={!!huriError}>\n <EmbedCardApiErrorRenderer xyoError={huriError}>\n <FlexCol\n id=\"embed-outer-wrap\"\n alignItems=\"stretch\"\n justifyContent=\"start\"\n busy={Boolean(!refreshPayload && payload)}\n busyCircularProps={{ style: { alignItems: 'start', paddingTop: theme.spacing(2), zIndex: 2 } }}\n {...props}\n >\n {children}\n </FlexCol>\n </EmbedCardApiErrorRenderer>\n </LoadResult>\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { RefreshPayloadState } from './State'\n\nexport const RefreshPayloadContext = createContextEx<RefreshPayloadState>()\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { RefreshPayloadContext } from './Context'\n\nexport const useRefreshPayload = () => useContextEx(RefreshPayloadContext, 'RefreshPayload', true)\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadState } from './State'\n\nexport const ResolvePayloadContext = createContextEx<ResolvePayloadState>()\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadContext } from './Context'\n\nexport const useResolvePayload = () => useContextEx(ResolvePayloadContext, 'ResolvePayload', true)\n","import { CardProps } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { ModuleError } from '@xyo-network/payload-model'\nimport { ErrorAlert, ErrorRender } from '@xyo-network/react-error'\n\nimport { EmbedErrorCard } from './EmbedErrorCard'\n\ninterface EmbedCardApiErrorRendererProps extends CardProps {\n xyoError?: ModuleError\n}\n\nexport const EmbedCardApiErrorRenderer: React.FC<WithChildren<EmbedCardApiErrorRendererProps>> = ({ xyoError, children, ...props }) => {\n return (\n <ErrorRender error={xyoError} noReAuth noErrorDisplay customError={<CustomApiErrorCard xyoError={xyoError} {...props} />}>\n {children}\n </ErrorRender>\n )\n}\n\nconst CustomApiErrorCard: React.FC<EmbedCardApiErrorRendererProps> = ({ xyoError, ...props }) => {\n return (\n <EmbedErrorCard {...props}>\n <ErrorAlert error={xyoError} />\n </EmbedErrorCard>\n )\n}\n","import { Alert, AlertProps, AlertTitle, Card, CardContent, CardProps, Typography } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\ninterface EmbedErrorCardBaseProps {\n alertProps?: AlertProps\n error?: Error\n hideErrorDetails?: boolean\n}\n\ninterface EmbedErrorCardProps extends EmbedErrorCardBaseProps, CardProps {\n alertProps?: AlertProps\n error?: Error\n}\n\nexport const EmbedErrorCard: React.FC<WithChildren<EmbedErrorCardProps>> = (props) => {\n const { alertProps, error, hideErrorDetails = true, children, ...cardProps } = props\n const errorProps = { alertProps, error, hideErrorDetails }\n return (\n <Card {...cardProps}>\n <CardContent>{children ?? <DefaultErrorAlert {...errorProps} />}</CardContent>\n </Card>\n )\n}\n\nconst DefaultErrorAlert: React.FC<EmbedErrorCardBaseProps> = ({ alertProps, hideErrorDetails, error }) => {\n return (\n <Alert severity=\"error\" {...alertProps}>\n <AlertTitle>Whoops! Something went wrong</AlertTitle>\n {!hideErrorDetails && error ? (\n <>\n <Typography variant=\"caption\">Error: </Typography>\n <Typography variant=\"caption\">{error?.message}</Typography>\n </>\n ) : (\n <Typography variant=\"caption\" fontSize=\"small\">\n Error Loading Plugin\n </Typography>\n )}\n </Alert>\n )\n}\n"],"mappings":";AAAA,SAAS,gBAAgB;AACzB,SAAuB,eAAe;AAEtC,SAAS,kBAAkB;;;ACH3B,SAAS,uBAAuB;AAIzB,IAAM,wBAAwB,gBAAqC;;;ACJ1E,SAAS,oBAAoB;AAItB,IAAM,oBAAoB,MAAM,aAAa,uBAAuB,kBAAkB,IAAI;;;ACJjG,SAAS,mBAAAA,wBAAuB;AAIzB,IAAM,wBAAwBA,iBAAqC;;;ACJ1E,SAAS,gBAAAC,qBAAoB;AAItB,IAAM,oBAAoB,MAAMC,cAAa,uBAAuB,kBAAkB,IAAI;;;ACDjG,SAAS,YAAY,mBAAmB;;;ACHxC,SAAS,OAAmB,YAAY,MAAM,aAAwB,kBAAkB;AAmBxD,SAUxB,UAVwB,KAUxB,YAVwB;AALzB,IAAM,iBAA8D,CAAC,UAAU;AACpF,QAAM,EAAE,YAAY,OAAO,mBAAmB,MAAM,UAAU,GAAG,UAAU,IAAI;AAC/E,QAAM,aAAa,EAAE,YAAY,OAAO,iBAAiB;AACzD,SACE,oBAAC,QAAM,GAAG,WACR,8BAAC,eAAa,sBAAY,oBAAC,qBAAmB,GAAG,YAAY,GAAG,GAClE;AAEJ;AAEA,IAAM,oBAAuD,CAAC,EAAE,YAAY,kBAAkB,MAAM,MAAM;AACxG,SACE,qBAAC,SAAM,UAAS,SAAS,GAAG,YAC1B;AAAA,wBAAC,cAAW,0CAA4B;AAAA,IACvC,CAAC,oBAAoB,QACpB,iCACE;AAAA,0BAAC,cAAW,SAAQ,WAAU,qBAAO;AAAA,MACrC,oBAAC,cAAW,SAAQ,WAAW,yCAAO,SAAQ;AAAA,OAChD,IAEA,oBAAC,cAAW,SAAQ,WAAU,UAAS,SAAQ,kCAE/C;AAAA,KAEJ;AAEJ;;;AD3BuE,gBAAAC,YAAA;AAFhE,IAAM,4BAAoF,CAAC,EAAE,UAAU,UAAU,GAAG,MAAM,MAAM;AACrI,SACE,gBAAAA,KAAC,eAAY,OAAO,UAAU,UAAQ,MAAC,gBAAc,MAAC,aAAa,gBAAAA,KAAC,sBAAmB,UAAqB,GAAG,OAAO,GACnH,UACH;AAEJ;AAEA,IAAM,qBAA+D,CAAC,EAAE,UAAU,GAAG,MAAM,MAAM;AAC/F,SACE,gBAAAA,KAAC,kBAAgB,GAAG,OAClB,0BAAAA,KAAC,cAAW,OAAO,UAAU,GAC/B;AAEJ;;;ALTQ,gBAAAC,YAAA;AARD,IAAM,2BAAiE,CAAC,EAAE,UAAU,GAAG,MAAM,MAAM;AACxG,QAAM,EAAE,SAAS,UAAU,UAAU,IAAI,kBAAkB;AAC3D,QAAM,EAAE,eAAe,IAAI,kBAAkB;AAC7C,QAAM,QAAQ,SAAS;AAEvB,SACE,gBAAAA,KAAC,cAAW,cAAc,SAAS,UAAU,CAAC,CAAC,UAAU,OAAO,CAAC,CAAC,WAChE,0BAAAA,KAAC,6BAA0B,UAAU,WACnC,0BAAAA;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,YAAW;AAAA,MACX,gBAAe;AAAA,MACf,MAAM,QAAQ,CAAC,kBAAkB,OAAO;AAAA,MACxC,mBAAmB,EAAE,OAAO,EAAE,YAAY,SAAS,YAAY,MAAM,QAAQ,CAAC,GAAG,QAAQ,EAAE,EAAE;AAAA,MAC5F,GAAG;AAAA,MAEH;AAAA;AAAA,EACH,GACF,GACF;AAEJ;","names":["createContextEx","useContextEx","useContextEx","jsx","jsx"]}
|
@@ -1,505 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __defProp = Object.defineProperty;
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
-
var __export = (target, all) => {
|
7
|
-
for (var name in all)
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
-
};
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
12
|
-
for (let key of __getOwnPropNames(from))
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
15
|
-
}
|
16
|
-
return to;
|
17
|
-
};
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
-
|
20
|
-
// src/components/embed-card/EmbedPluginCard.tsx
|
21
|
-
var EmbedPluginCard_exports = {};
|
22
|
-
__export(EmbedPluginCard_exports, {
|
23
|
-
ApiEmbedPluginCard: () => ApiEmbedPluginCard,
|
24
|
-
EmbedPlugin: () => EmbedPlugin,
|
25
|
-
EmbedPluginCardInner: () => EmbedPluginCardInner
|
26
|
-
});
|
27
|
-
module.exports = __toCommonJS(EmbedPluginCard_exports);
|
28
|
-
var import_material13 = require("@mui/material");
|
29
|
-
|
30
|
-
// src/contexts/EmbedPluginContext/Context.tsx
|
31
|
-
var import_react_shared = require("@xyo-network/react-shared");
|
32
|
-
var EmbedPluginContext = (0, import_react_shared.createContextEx)();
|
33
|
-
|
34
|
-
// src/contexts/EmbedPluginContext/Provider.tsx
|
35
|
-
var import_react = require("react");
|
36
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
37
|
-
var EmbedPluginProvider = ({
|
38
|
-
children,
|
39
|
-
refreshTitle,
|
40
|
-
timestampLabel,
|
41
|
-
hideElementsConfig,
|
42
|
-
plugins,
|
43
|
-
embedPluginConfig
|
44
|
-
}) => {
|
45
|
-
const [activePlugin, setActivePlugin] = (0, import_react.useState)(plugins ? plugins[0] : void 0);
|
46
|
-
(0, import_react.useEffect)(() => {
|
47
|
-
setActivePlugin(plugins ? plugins[0] : void 0);
|
48
|
-
}, [plugins]);
|
49
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
50
|
-
EmbedPluginContext.Provider,
|
51
|
-
{
|
52
|
-
value: {
|
53
|
-
activePlugin,
|
54
|
-
embedPluginConfig,
|
55
|
-
hideElementsConfig,
|
56
|
-
provided: true,
|
57
|
-
refreshTitle,
|
58
|
-
setActivePlugin,
|
59
|
-
timestampLabel
|
60
|
-
},
|
61
|
-
children
|
62
|
-
}
|
63
|
-
);
|
64
|
-
};
|
65
|
-
|
66
|
-
// src/contexts/EmbedPluginContext/use.tsx
|
67
|
-
var import_react_shared2 = require("@xyo-network/react-shared");
|
68
|
-
var useEmbedPluginState = () => (0, import_react_shared2.useContextEx)(EmbedPluginContext, "EmbedPlugin", true);
|
69
|
-
|
70
|
-
// src/contexts/RefreshPayloadContext/Provider.tsx
|
71
|
-
var import_react2 = require("react");
|
72
|
-
|
73
|
-
// src/contexts/RefreshPayloadContext/Context.tsx
|
74
|
-
var import_react_shared3 = require("@xyo-network/react-shared");
|
75
|
-
var RefreshPayloadContext = (0, import_react_shared3.createContextEx)();
|
76
|
-
|
77
|
-
// src/contexts/RefreshPayloadContext/Provider.tsx
|
78
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
79
|
-
var RefreshPayloadProvider = ({ children, onRefresh, refreshPayload }) => {
|
80
|
-
const [localRefreshPayload, setRefreshPayload] = (0, import_react2.useState)(refreshPayload);
|
81
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RefreshPayloadContext.Provider, { value: { onRefresh, provided: true, refreshPayload: localRefreshPayload, setRefreshPayload }, children });
|
82
|
-
};
|
83
|
-
|
84
|
-
// src/contexts/RefreshPayloadContext/use.tsx
|
85
|
-
var import_react_shared4 = require("@xyo-network/react-shared");
|
86
|
-
var useRefreshPayload = () => (0, import_react_shared4.useContextEx)(RefreshPayloadContext, "RefreshPayload", true);
|
87
|
-
|
88
|
-
// src/contexts/ResolvePayloadContext/Context.ts
|
89
|
-
var import_react_shared5 = require("@xyo-network/react-shared");
|
90
|
-
var ResolvePayloadContext = (0, import_react_shared5.createContextEx)();
|
91
|
-
|
92
|
-
// src/contexts/ResolvePayloadContext/Provider.tsx
|
93
|
-
var import_delay = require("@xylabs/delay");
|
94
|
-
var import_react_async_effect = require("@xylabs/react-async-effect");
|
95
|
-
var import_huri = require("@xyo-network/huri");
|
96
|
-
var import_payload_model = require("@xyo-network/payload-model");
|
97
|
-
var import_react3 = require("react");
|
98
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
99
|
-
var ResolvePayloadProvider = ({ children, huriPayload }) => {
|
100
|
-
const [payload, setPayload] = (0, import_react3.useState)();
|
101
|
-
const [huri, setHuri] = (0, import_react3.useState)();
|
102
|
-
const { refreshPayload, setRefreshPayload, onRefresh } = useRefreshPayload();
|
103
|
-
(0, import_react3.useEffect)(() => {
|
104
|
-
typeof huriPayload === "string" ? setHuri(huriPayload) : void 0;
|
105
|
-
if (typeof huriPayload === "object") {
|
106
|
-
setPayload(huriPayload);
|
107
|
-
setRefreshPayload == null ? void 0 : setRefreshPayload(true);
|
108
|
-
}
|
109
|
-
}, [huriPayload, setRefreshPayload]);
|
110
|
-
const [notFound, setNotFound] = (0, import_react3.useState)();
|
111
|
-
const [huriError, setHuriError] = (0, import_react3.useState)();
|
112
|
-
(0, import_react_async_effect.useAsyncEffect)(
|
113
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
114
|
-
async (mounted) => {
|
115
|
-
if (huri && !refreshPayload) {
|
116
|
-
try {
|
117
|
-
const huriInstance = new import_huri.Huri(huri);
|
118
|
-
const result = await huriInstance.fetch();
|
119
|
-
await (0, import_delay.delay)(500);
|
120
|
-
if (mounted()) {
|
121
|
-
setNotFound(result === null);
|
122
|
-
setPayload(result);
|
123
|
-
setRefreshPayload == null ? void 0 : setRefreshPayload(true);
|
124
|
-
}
|
125
|
-
} catch (e) {
|
126
|
-
const error = e;
|
127
|
-
setHuriError({ message: error.message, schema: import_payload_model.ModuleErrorSchema, sources: [] });
|
128
|
-
}
|
129
|
-
}
|
130
|
-
},
|
131
|
-
[huri, payload, refreshPayload, setRefreshPayload]
|
132
|
-
);
|
133
|
-
const refreshHuri = () => {
|
134
|
-
onRefresh == null ? void 0 : onRefresh();
|
135
|
-
if (huri) {
|
136
|
-
setRefreshPayload == null ? void 0 : setRefreshPayload(false);
|
137
|
-
}
|
138
|
-
};
|
139
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ResolvePayloadContext.Provider, { value: { huri, huriError, notFound, payload, provided: true, refreshHuri, setPayload }, children });
|
140
|
-
};
|
141
|
-
|
142
|
-
// src/contexts/ResolvePayloadContext/use.tsx
|
143
|
-
var import_react_shared6 = require("@xyo-network/react-shared");
|
144
|
-
var useResolvePayload = () => (0, import_react_shared6.useContextEx)(ResolvePayloadContext, "ResolvePayload", true);
|
145
|
-
|
146
|
-
// src/contexts/ValidatePayloadContext/Provider.tsx
|
147
|
-
var import_material = require("@mui/material");
|
148
|
-
var import_react_async_effect2 = require("@xylabs/react-async-effect");
|
149
|
-
var import_schema_cache = require("@xyo-network/schema-cache");
|
150
|
-
var import_react4 = require("react");
|
151
|
-
|
152
|
-
// src/contexts/ValidatePayloadContext/Context.ts
|
153
|
-
var import_react_shared7 = require("@xyo-network/react-shared");
|
154
|
-
var ValidatePayloadContext = (0, import_react_shared7.createContextEx)();
|
155
|
-
|
156
|
-
// src/contexts/ValidatePayloadContext/Provider.tsx
|
157
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
158
|
-
var ValidatePayloadProvider = ({ children, enabled = false }) => {
|
159
|
-
const { payload } = useResolvePayload();
|
160
|
-
const [initialized, setInitialized] = (0, import_react4.useState)(false);
|
161
|
-
const [valid, setValid] = (0, import_react4.useState)();
|
162
|
-
(0, import_react_async_effect2.useAsyncEffect)(
|
163
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
164
|
-
async () => {
|
165
|
-
if (payload && enabled) {
|
166
|
-
await import_schema_cache.SchemaCache.instance.get(payload.schema);
|
167
|
-
const possibleKnownSchema = payload.schema;
|
168
|
-
if (import_schema_cache.SchemaCache.instance.validators[possibleKnownSchema]) {
|
169
|
-
const validator = import_schema_cache.SchemaCache.instance.validators[possibleKnownSchema];
|
170
|
-
setValid(validator == null ? void 0 : validator(payload));
|
171
|
-
}
|
172
|
-
setInitialized(true);
|
173
|
-
}
|
174
|
-
},
|
175
|
-
[payload, enabled]
|
176
|
-
);
|
177
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ValidatePayloadContext.Provider, { value: { enabled, provided: true, schema: payload == null ? void 0 : payload.schema, validPayload: valid }, children: enabled ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children: initialized ? children : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_material.Chip, { label: "Validating Payload..." }) }) : children });
|
178
|
-
};
|
179
|
-
|
180
|
-
// src/contexts/ValidatePayloadContext/use.tsx
|
181
|
-
var import_react_shared8 = require("@xyo-network/react-shared");
|
182
|
-
var useValidatePayload = () => (0, import_react_shared8.useContextEx)(ValidatePayloadContext, "ValidateSchema", true);
|
183
|
-
|
184
|
-
// src/components/EmbedPlugin.tsx
|
185
|
-
var import_react_shared10 = require("@xyo-network/react-shared");
|
186
|
-
|
187
|
-
// src/components/EmbedResolver.tsx
|
188
|
-
var import_react_shared9 = require("@xyo-network/react-shared");
|
189
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
190
|
-
var EmbedResolver = ({ children }) => {
|
191
|
-
const { payload, notFound, huriError } = useResolvePayload();
|
192
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_shared9.LoadResult, { searchResult: payload, notFound: !!notFound, error: !!huriError, children });
|
193
|
-
};
|
194
|
-
|
195
|
-
// src/components/validation-alerts/ValidatePayload.tsx
|
196
|
-
var import_material2 = require("@mui/material");
|
197
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
198
|
-
var ValidatePayloadAlert = ({ children, ...props }) => {
|
199
|
-
const { validPayload, enabled, schema } = useValidatePayload();
|
200
|
-
if (enabled && validPayload === false) {
|
201
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_material2.Alert, { severity: "error", title: "Invalid Payload!", ...props, children: [
|
202
|
-
"Payload schema claimed to be ",
|
203
|
-
schema,
|
204
|
-
" but failed to validate."
|
205
|
-
] });
|
206
|
-
}
|
207
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children });
|
208
|
-
};
|
209
|
-
|
210
|
-
// src/components/validation-alerts/ValidatePlugins.tsx
|
211
|
-
var import_material3 = require("@mui/material");
|
212
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
213
|
-
var ValidatePluginsAlert = ({ children, ...props }) => {
|
214
|
-
const { payload } = useResolvePayload();
|
215
|
-
const { plugins } = useEmbedPluginState();
|
216
|
-
if (payload && (plugins == null ? void 0 : plugins.length) === 0) {
|
217
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_material3.Alert, { severity: "warning", ...props, children: [
|
218
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material3.AlertTitle, { children: "Missing plugins!" }),
|
219
|
-
"Payload found but no plugins were present."
|
220
|
-
] });
|
221
|
-
}
|
222
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children });
|
223
|
-
};
|
224
|
-
|
225
|
-
// src/components/EmbedPlugin.tsx
|
226
|
-
var import_jsx_runtime8 = require("react/jsx-runtime");
|
227
|
-
var EmbedPluginInner = ({
|
228
|
-
validateSchema,
|
229
|
-
plugins = [],
|
230
|
-
huriPayload,
|
231
|
-
refreshTitle = "",
|
232
|
-
timestampLabel = "Data From",
|
233
|
-
hideElementsConfig,
|
234
|
-
embedPluginConfig,
|
235
|
-
onRefresh,
|
236
|
-
children
|
237
|
-
}) => {
|
238
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_shared10.ErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
239
|
-
EmbedPluginProvider,
|
240
|
-
{
|
241
|
-
refreshTitle,
|
242
|
-
timestampLabel,
|
243
|
-
hideElementsConfig,
|
244
|
-
plugins,
|
245
|
-
embedPluginConfig,
|
246
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(WithResolvers, { onRefresh, huriPayload, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(WithValidators, { validateSchema, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_shared10.ListModeProvider, { defaultListMode: embedPluginConfig == null ? void 0 : embedPluginConfig.listMode, children }) }) })
|
247
|
-
}
|
248
|
-
) });
|
249
|
-
};
|
250
|
-
var WithResolvers = ({ children, onRefresh, huriPayload }) => {
|
251
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RefreshPayloadProvider, { onRefresh, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ResolvePayloadProvider, { huriPayload, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(EmbedResolver, { children }) }) });
|
252
|
-
};
|
253
|
-
var WithValidators = ({ children, validateSchema }) => {
|
254
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ValidatePayloadProvider, { enabled: validateSchema, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ValidatePluginsAlert, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ValidatePayloadAlert, { children }) }) });
|
255
|
-
};
|
256
|
-
|
257
|
-
// src/components/embed-card/card/BusyCard.tsx
|
258
|
-
var import_material4 = require("@mui/material");
|
259
|
-
var import_react_flexbox = require("@xylabs/react-flexbox");
|
260
|
-
var import_react_shared11 = require("@xylabs/react-shared");
|
261
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
262
|
-
var BusyCard = ({
|
263
|
-
busy,
|
264
|
-
busyMinimum = 500,
|
265
|
-
busyVariant = "circular",
|
266
|
-
busyVariantProps,
|
267
|
-
children,
|
268
|
-
...props
|
269
|
-
}) => {
|
270
|
-
const internalBusy = (0, import_react_flexbox.useBusyTiming)(busy, busyMinimum);
|
271
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_material4.Card, { ...props, children: [
|
272
|
-
children,
|
273
|
-
busyVariant === "circular" && internalBusy ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_shared11.BusyCircularProgress, { ...busyVariantProps }) : null,
|
274
|
-
busyVariant === "linear" && internalBusy ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_shared11.BusyLinearProgress, { ...busyVariantProps }) : null
|
275
|
-
] });
|
276
|
-
};
|
277
|
-
|
278
|
-
// src/components/embed-card/card/EmbedCardHeader.tsx
|
279
|
-
var import_icons_material3 = require("@mui/icons-material");
|
280
|
-
var import_material7 = require("@mui/material");
|
281
|
-
var import_react_flexbox2 = require("@xylabs/react-flexbox");
|
282
|
-
|
283
|
-
// src/components/embed-card/menu/EmbedMenu.tsx
|
284
|
-
var import_icons_material2 = require("@mui/icons-material");
|
285
|
-
var import_material6 = require("@mui/material");
|
286
|
-
var import_react5 = require("react");
|
287
|
-
|
288
|
-
// src/components/embed-card/menu/JsonMenuItem.tsx
|
289
|
-
var import_icons_material = require("@mui/icons-material");
|
290
|
-
var import_material5 = require("@mui/material");
|
291
|
-
var import_jsx_runtime10 = require("react/jsx-runtime");
|
292
|
-
var JsonMenuItem = (props) => {
|
293
|
-
const { huri } = useResolvePayload();
|
294
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: huri ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_material5.MenuItem, { title: "Source Payload JSON", onClick: () => window.open(huri, "_blank"), ...props, children: [
|
295
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material5.ListItemText, { sx: { mr: 1 }, children: "JSON" }),
|
296
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material5.ListItemIcon, { sx: { justifyContent: "end" }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_icons_material.OpenInNew, { fontSize: "small" }) })
|
297
|
-
] }) : null });
|
298
|
-
};
|
299
|
-
|
300
|
-
// src/components/embed-card/menu/EmbedMenu.tsx
|
301
|
-
var import_jsx_runtime11 = require("react/jsx-runtime");
|
302
|
-
var EmbedMenu = (props) => {
|
303
|
-
const [anchorEl, setAnchorEl] = (0, import_react5.useState)(null);
|
304
|
-
const open = Boolean(anchorEl);
|
305
|
-
const handleClick = (event) => {
|
306
|
-
setAnchorEl(event.currentTarget);
|
307
|
-
};
|
308
|
-
const handleClose = () => {
|
309
|
-
setAnchorEl(null);
|
310
|
-
};
|
311
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
312
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material6.IconButton, { onClick: handleClick, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_icons_material2.MoreVert, {}) }),
|
313
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_material6.Menu, { anchorEl, open, onClose: handleClose, PaperProps: { variant: "elevation" }, MenuListProps: { dense: true }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(JsonMenuItem, {}) })
|
314
|
-
] });
|
315
|
-
};
|
316
|
-
|
317
|
-
// src/components/embed-card/card/EmbedCardHeader.tsx
|
318
|
-
var import_jsx_runtime12 = require("react/jsx-runtime");
|
319
|
-
var EmbedCardHeader = () => {
|
320
|
-
var _a;
|
321
|
-
const { refreshHuri, huri } = useResolvePayload();
|
322
|
-
const { activePlugin, timestampLabel, hideElementsConfig } = useEmbedPluginState();
|
323
|
-
const { hideAvatar, hideTitle, hideRefreshButton, hideTimestamp, hideCardActions } = hideElementsConfig ?? {};
|
324
|
-
const timestamp = Date.now();
|
325
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
326
|
-
import_material7.CardHeader,
|
327
|
-
{
|
328
|
-
sx: { flexWrap: "wrap", rowGap: 1 },
|
329
|
-
avatar: hideAvatar ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_jsx_runtime12.Fragment, {}) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material7.Avatar, { sx: { bgcolor: (theme) => theme.palette.primary.main }, "aria-label": activePlugin == null ? void 0 : activePlugin.name, children: (_a = activePlugin == null ? void 0 : activePlugin.name) == null ? void 0 : _a.charAt(0) }),
|
330
|
-
action: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_flexbox2.FlexRow, { flexWrap: "wrap", columnGap: 0.5, children: [
|
331
|
-
timestamp ? hideTimestamp && hideRefreshButton ? "" : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
332
|
-
import_material7.Chip,
|
333
|
-
{
|
334
|
-
avatar: hideRefreshButton ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_jsx_runtime12.Fragment, {}) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons_material3.Refresh, {}),
|
335
|
-
clickable: hideRefreshButton ? false : true,
|
336
|
-
onClick: refreshHuri,
|
337
|
-
label: hideTimestamp ? "" : `${timestampLabel} ${new Date(timestamp).toLocaleString()}`
|
338
|
-
}
|
339
|
-
) : null,
|
340
|
-
hideCardActions || huri === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(EmbedMenu, {})
|
341
|
-
] }),
|
342
|
-
title: hideTitle ? "" : activePlugin == null ? void 0 : activePlugin.name
|
343
|
-
}
|
344
|
-
);
|
345
|
-
};
|
346
|
-
|
347
|
-
// src/components/embed-card/card/EmbedPluginCard.tsx
|
348
|
-
var import_material11 = require("@mui/material");
|
349
|
-
var import_react_flexbox3 = require("@xylabs/react-flexbox");
|
350
|
-
var import_react_shared13 = require("@xyo-network/react-shared");
|
351
|
-
|
352
|
-
// src/components/controls/EmbedFormControl.tsx
|
353
|
-
var import_material8 = require("@mui/material");
|
354
|
-
var import_jsx_runtime13 = require("react/jsx-runtime");
|
355
|
-
var EmbedFormControl = ({ formId, formLabel, children, ...props }) => {
|
356
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_material8.FormControl, { ...props, children: [
|
357
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_material8.InputLabel, { id: formId, children: formLabel }),
|
358
|
-
children
|
359
|
-
] });
|
360
|
-
};
|
361
|
-
|
362
|
-
// src/components/controls/ListModeSelect.tsx
|
363
|
-
var import_material9 = require("@mui/material");
|
364
|
-
var import_react_shared12 = require("@xyo-network/react-shared");
|
365
|
-
var import_jsx_runtime14 = require("react/jsx-runtime");
|
366
|
-
var listModeSelectId = "listmode-select-id";
|
367
|
-
var listModeSelectLabel = "List Mode";
|
368
|
-
var ListModeSelect = (props) => {
|
369
|
-
const { listMode, setListMode } = (0, import_react_shared12.useListMode)();
|
370
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
371
|
-
import_material9.Select,
|
372
|
-
{
|
373
|
-
value: listMode ?? "default",
|
374
|
-
onChange: (event) => {
|
375
|
-
setListMode == null ? void 0 : setListMode(event.target.value);
|
376
|
-
},
|
377
|
-
...props,
|
378
|
-
children: [
|
379
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material9.MenuItem, { value: "default", children: "Default" }, "default"),
|
380
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material9.MenuItem, { value: "table", children: "Table" }, "table"),
|
381
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material9.MenuItem, { value: "grid", children: "Grid" }, "grid")
|
382
|
-
]
|
383
|
-
}
|
384
|
-
);
|
385
|
-
};
|
386
|
-
var ListModeSelectFormControl = (props) => {
|
387
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(EmbedFormControl, { formId: listModeSelectId, formLabel: listModeSelectLabel, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ListModeSelect, { size: "small", label: listModeSelectLabel, labelId: listModeSelectId, ...props }) });
|
388
|
-
};
|
389
|
-
|
390
|
-
// src/components/controls/RenderSelect.tsx
|
391
|
-
var import_material10 = require("@mui/material");
|
392
|
-
var import_jsx_runtime15 = require("react/jsx-runtime");
|
393
|
-
var renderSelectId = "render-select-id";
|
394
|
-
var renderSelectLabel = "Renderer";
|
395
|
-
var EmbedRenderSelect = (props) => {
|
396
|
-
const { activePlugin, setActivePlugin, plugins } = useEmbedPluginState();
|
397
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(EmbedFormControl, { formId: renderSelectId, formLabel: renderSelectLabel, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_material10.Select, { size: "small", value: activePlugin == null ? void 0 : activePlugin.name, ...props, children: plugins == null ? void 0 : plugins.map((plugin) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_material10.MenuItem, { value: plugin.name, onClick: () => setActivePlugin == null ? void 0 : setActivePlugin(plugin), children: plugin.name }, plugin.name)) }) });
|
398
|
-
};
|
399
|
-
|
400
|
-
// src/components/embed-card/card/EmbedPluginCard.tsx
|
401
|
-
var import_jsx_runtime16 = require("react/jsx-runtime");
|
402
|
-
var EmbedPluginCard = ({ ...props }) => {
|
403
|
-
var _a, _b, _c;
|
404
|
-
const { payload } = useResolvePayload();
|
405
|
-
const { activePlugin: ActivePlugin, plugins, hideElementsConfig } = useEmbedPluginState();
|
406
|
-
const { listMode } = (0, import_react_shared13.useListMode)();
|
407
|
-
const supportsListMode = ((_c = (_b = (_a = ActivePlugin == null ? void 0 : ActivePlugin.components) == null ? void 0 : _a.box) == null ? void 0 : _b.listModes) == null ? void 0 : _c.length) ?? 0 > 1;
|
408
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(BusyCard, { ...props, children: [
|
409
|
-
(hideElementsConfig == null ? void 0 : hideElementsConfig.hideCardHeader) ? null : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(EmbedCardHeader, {}),
|
410
|
-
plugins && plugins.length || supportsListMode ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_flexbox3.FlexGrowRow, { columnGap: 2, rowGap: 2, flexWrap: "wrap", pb: 1, children: [
|
411
|
-
plugins && plugins.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(EmbedRenderSelect, {}) : null,
|
412
|
-
supportsListMode ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ListModeSelectFormControl, {}) : null
|
413
|
-
] }) : null,
|
414
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_material11.CardContent, { sx: { height: "100%" }, children: ActivePlugin ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ActivePlugin.components.box.detailsBox, { payload, ...supportsListMode && { listMode } }) : null })
|
415
|
-
] });
|
416
|
-
};
|
417
|
-
|
418
|
-
// src/components/embed-card/error-handling/EmbedCardApiErrorRenderer.tsx
|
419
|
-
var import_react_error = require("@xyo-network/react-error");
|
420
|
-
|
421
|
-
// src/components/embed-card/error-handling/EmbedErrorCard.tsx
|
422
|
-
var import_material12 = require("@mui/material");
|
423
|
-
var import_jsx_runtime17 = require("react/jsx-runtime");
|
424
|
-
var EmbedErrorCard = (props) => {
|
425
|
-
const { alertProps, error, hideErrorDetails = true, children, ...cardProps } = props;
|
426
|
-
const errorProps = { alertProps, error, hideErrorDetails };
|
427
|
-
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 }) }) });
|
428
|
-
};
|
429
|
-
var DefaultErrorAlert = ({ alertProps, hideErrorDetails, error }) => {
|
430
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material12.Alert, { severity: "error", ...alertProps, children: [
|
431
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material12.AlertTitle, { children: "Whoops! Something went wrong" }),
|
432
|
-
!hideErrorDetails && error ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
433
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material12.Typography, { variant: "caption", children: "Error: " }),
|
434
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material12.Typography, { variant: "caption", children: error == null ? void 0 : error.message })
|
435
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material12.Typography, { variant: "caption", fontSize: "small", children: "Error Loading Plugin" })
|
436
|
-
] });
|
437
|
-
};
|
438
|
-
|
439
|
-
// src/components/embed-card/error-handling/EmbedCardApiErrorRenderer.tsx
|
440
|
-
var import_jsx_runtime18 = require("react/jsx-runtime");
|
441
|
-
var EmbedCardApiErrorRenderer = ({ xyoError, children, ...props }) => {
|
442
|
-
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 });
|
443
|
-
};
|
444
|
-
var CustomApiErrorCard = ({ xyoError, ...props }) => {
|
445
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(EmbedErrorCard, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_error.ErrorAlert, { error: xyoError }) });
|
446
|
-
};
|
447
|
-
|
448
|
-
// src/components/embed-card/EmbedPluginCard.tsx
|
449
|
-
var import_jsx_runtime19 = require("react/jsx-runtime");
|
450
|
-
var ApiEmbedPluginCard = ({ children, ...props }) => {
|
451
|
-
const {
|
452
|
-
validateSchema,
|
453
|
-
plugins = [],
|
454
|
-
huriPayload,
|
455
|
-
refreshTitle = "",
|
456
|
-
timestampLabel = "Data From",
|
457
|
-
hideElementsConfig,
|
458
|
-
embedPluginConfig,
|
459
|
-
onRefresh,
|
460
|
-
...busyCardProps
|
461
|
-
} = props;
|
462
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
463
|
-
EmbedPluginInner,
|
464
|
-
{
|
465
|
-
...{
|
466
|
-
embedPluginConfig,
|
467
|
-
hideElementsConfig,
|
468
|
-
huriPayload,
|
469
|
-
onRefresh,
|
470
|
-
plugins,
|
471
|
-
refreshTitle,
|
472
|
-
timestampLabel,
|
473
|
-
validateSchema
|
474
|
-
},
|
475
|
-
children: [
|
476
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(EmbedPluginCardInner, { ...busyCardProps }),
|
477
|
-
children
|
478
|
-
]
|
479
|
-
}
|
480
|
-
);
|
481
|
-
};
|
482
|
-
var EmbedPluginCardInner = (props) => {
|
483
|
-
const { payload, huriError } = useResolvePayload();
|
484
|
-
const { refreshPayload } = useRefreshPayload();
|
485
|
-
const theme = (0, import_material13.useTheme)();
|
486
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(EmbedCardApiErrorRenderer, { xyoError: huriError, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
487
|
-
EmbedPluginCard,
|
488
|
-
{
|
489
|
-
elevation: 3,
|
490
|
-
variant: "elevation",
|
491
|
-
busy: Boolean(!refreshPayload && payload),
|
492
|
-
busyVariantProps: { style: { alignItems: "start", paddingTop: theme.spacing(2), zIndex: 2 } },
|
493
|
-
sx: { position: "relative" },
|
494
|
-
...props
|
495
|
-
}
|
496
|
-
) });
|
497
|
-
};
|
498
|
-
var EmbedPlugin = EmbedPluginCard;
|
499
|
-
// Annotate the CommonJS export names for ESM import in node:
|
500
|
-
0 && (module.exports = {
|
501
|
-
ApiEmbedPluginCard,
|
502
|
-
EmbedPlugin,
|
503
|
-
EmbedPluginCardInner
|
504
|
-
});
|
505
|
-
//# sourceMappingURL=EmbedPluginCard.cjs.map
|