@xyo-network/react-embed 2.53.0 → 2.54.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/components/{XyoEmbedPlugin.js → EmbedPlugin.js} +5 -5
- package/dist/cjs/components/EmbedPlugin.js.map +1 -0
- package/dist/cjs/components/controls/RenderSelect.js +1 -1
- package/dist/cjs/components/controls/RenderSelect.js.map +1 -1
- package/dist/cjs/components/embed-card/{XyoEmbedPluginCard.js → EmbedPluginCard.js} +11 -11
- package/dist/cjs/components/embed-card/EmbedPluginCard.js.map +1 -0
- package/dist/cjs/components/embed-card/card/EmbedCardHeader.js +1 -1
- package/dist/cjs/components/embed-card/card/EmbedCardHeader.js.map +1 -1
- package/dist/cjs/components/embed-card/card/EmbedPluginCard.js +1 -1
- package/dist/cjs/components/embed-card/card/EmbedPluginCard.js.map +1 -1
- package/dist/cjs/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js +2 -2
- package/dist/cjs/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js.map +1 -1
- package/dist/cjs/components/embed-card/index.js +1 -1
- package/dist/cjs/components/embed-card/index.js.map +1 -1
- package/dist/cjs/components/embed-plugin-stories/storyShared.js +2 -2
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/validation-alerts/ValidatePlugins.js +1 -1
- package/dist/cjs/components/validation-alerts/ValidatePlugins.js.map +1 -1
- package/dist/cjs/contexts/EmbedPluginContext/Context.js +6 -0
- package/dist/cjs/contexts/EmbedPluginContext/Context.js.map +1 -0
- package/dist/cjs/contexts/{XyoEmbedPluginContext → EmbedPluginContext}/Provider.js +4 -4
- package/dist/cjs/contexts/EmbedPluginContext/Provider.js.map +1 -0
- package/dist/cjs/contexts/EmbedPluginContext/State.js.map +1 -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/index.js +1 -1
- package/dist/cjs/contexts/index.js.map +1 -1
- package/dist/cjs/types/{XyoEmbedPluginProps.js → EmbedPluginProps.js} +1 -1
- package/dist/cjs/types/EmbedPluginProps.js.map +1 -0
- package/dist/cjs/types/index.js +1 -1
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/docs.json +2837 -1781
- package/dist/esm/components/EmbedPlugin.js +15 -0
- package/dist/esm/components/EmbedPlugin.js.map +1 -0
- package/dist/esm/components/controls/RenderSelect.js +2 -2
- package/dist/esm/components/controls/RenderSelect.js.map +1 -1
- package/dist/esm/components/embed-card/{XyoEmbedPluginCard.js → EmbedPluginCard.js} +8 -8
- package/dist/esm/components/embed-card/EmbedPluginCard.js.map +1 -0
- package/dist/esm/components/embed-card/card/EmbedCardHeader.js +2 -2
- package/dist/esm/components/embed-card/card/EmbedCardHeader.js.map +1 -1
- package/dist/esm/components/embed-card/card/EmbedPluginCard.js +2 -2
- package/dist/esm/components/embed-card/card/EmbedPluginCard.js.map +1 -1
- package/dist/esm/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js +3 -3
- package/dist/esm/components/embed-card/error-handling/EmbedCardApiErrorRenderer.js.map +1 -1
- package/dist/esm/components/embed-card/index.js +1 -1
- package/dist/esm/components/embed-card/index.js.map +1 -1
- package/dist/esm/components/embed-plugin-stories/storyShared.js +3 -3
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/components/validation-alerts/ValidatePlugins.js +2 -2
- package/dist/esm/components/validation-alerts/ValidatePlugins.js.map +1 -1
- package/dist/esm/contexts/EmbedPluginContext/Context.js +3 -0
- package/dist/esm/contexts/EmbedPluginContext/Context.js.map +1 -0
- package/dist/esm/contexts/{XyoEmbedPluginContext → EmbedPluginContext}/Provider.js +3 -3
- package/dist/esm/contexts/EmbedPluginContext/Provider.js.map +1 -0
- package/dist/esm/contexts/EmbedPluginContext/State.js.map +1 -0
- 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/index.js +1 -1
- package/dist/esm/contexts/index.js.map +1 -1
- package/dist/esm/types/EmbedPluginProps.js +2 -0
- package/dist/esm/types/EmbedPluginProps.js.map +1 -0
- package/dist/esm/types/index.js +1 -1
- package/dist/esm/types/index.js.map +1 -1
- package/dist/types/components/EmbedPlugin.d.ts +5 -0
- package/dist/types/components/EmbedPlugin.d.ts.map +1 -0
- package/dist/types/components/embed-card/EmbedPluginCard.d.ts +11 -0
- package/dist/types/components/embed-card/EmbedPluginCard.d.ts.map +1 -0
- package/dist/types/components/embed-card/index.d.ts +1 -1
- package/dist/types/components/embed-card/index.d.ts.map +1 -1
- package/dist/types/components/embed-plugin-stories/storyShared.d.ts +2 -2
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/contexts/EmbedPluginContext/Context.d.ts +4 -0
- package/dist/types/contexts/EmbedPluginContext/Context.d.ts.map +1 -0
- package/dist/types/contexts/EmbedPluginContext/Provider.d.ts +7 -0
- package/dist/types/contexts/EmbedPluginContext/Provider.d.ts.map +1 -0
- package/dist/types/contexts/{XyoEmbedPluginContext → EmbedPluginContext}/State.d.ts +3 -3
- package/dist/types/contexts/EmbedPluginContext/State.d.ts.map +1 -0
- package/dist/types/contexts/EmbedPluginContext/index.d.ts.map +1 -0
- package/dist/types/contexts/EmbedPluginContext/use.d.ts +2 -0
- package/dist/types/contexts/EmbedPluginContext/use.d.ts.map +1 -0
- package/dist/types/contexts/index.d.ts +1 -1
- package/dist/types/contexts/index.d.ts.map +1 -1
- package/dist/types/types/{XyoEmbedPluginProps.d.ts → EmbedPluginProps.d.ts} +3 -3
- package/dist/types/types/EmbedPluginProps.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/types/index.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/components/{XyoEmbedPlugin.tsx → EmbedPlugin.tsx} +6 -6
- package/src/components/controls/RenderSelect.tsx +2 -2
- package/src/components/embed-card/{XyoEmbedPluginCard.tsx → EmbedPluginCard.tsx} +10 -10
- package/src/components/embed-card/card/EmbedCardHeader.tsx +2 -2
- package/src/components/embed-card/card/EmbedPluginCard.tsx +2 -2
- package/src/components/embed-card/error-handling/EmbedCardApiErrorRenderer.tsx +4 -4
- package/src/components/embed-card/index.ts +1 -1
- package/src/components/embed-plugin-stories/XyoEmbedPlugin.examples.stories.tsx +1 -1
- package/src/components/embed-plugin-stories/XyoEmbedPlugin.states.stories.tsx +1 -1
- package/src/components/embed-plugin-stories/storyShared.tsx +4 -4
- package/src/components/index.ts +1 -1
- package/src/components/validation-alerts/ValidatePlugins.tsx +2 -2
- package/src/contexts/EmbedPluginContext/Context.tsx +5 -0
- package/src/contexts/{XyoEmbedPluginContext → EmbedPluginContext}/Provider.tsx +6 -6
- package/src/contexts/{XyoEmbedPluginContext → EmbedPluginContext}/State.ts +3 -3
- package/src/contexts/EmbedPluginContext/use.tsx +5 -0
- package/src/contexts/ValidatePayloadContext/Provider.stories.tsx +4 -4
- package/src/contexts/index.ts +1 -1
- package/src/types/{XyoEmbedPluginProps.ts → EmbedPluginProps.ts} +2 -2
- package/src/types/index.ts +1 -1
- package/dist/cjs/components/XyoEmbedPlugin.js.map +0 -1
- package/dist/cjs/components/embed-card/XyoEmbedPluginCard.js.map +0 -1
- package/dist/cjs/contexts/XyoEmbedPluginContext/Context.js +0 -6
- package/dist/cjs/contexts/XyoEmbedPluginContext/Context.js.map +0 -1
- package/dist/cjs/contexts/XyoEmbedPluginContext/Provider.js.map +0 -1
- package/dist/cjs/contexts/XyoEmbedPluginContext/State.js.map +0 -1
- package/dist/cjs/contexts/XyoEmbedPluginContext/index.js.map +0 -1
- package/dist/cjs/contexts/XyoEmbedPluginContext/use.js +0 -8
- package/dist/cjs/contexts/XyoEmbedPluginContext/use.js.map +0 -1
- package/dist/cjs/types/XyoEmbedPluginProps.js.map +0 -1
- package/dist/esm/components/XyoEmbedPlugin.js +0 -15
- package/dist/esm/components/XyoEmbedPlugin.js.map +0 -1
- package/dist/esm/components/embed-card/XyoEmbedPluginCard.js.map +0 -1
- package/dist/esm/contexts/XyoEmbedPluginContext/Context.js +0 -3
- package/dist/esm/contexts/XyoEmbedPluginContext/Context.js.map +0 -1
- package/dist/esm/contexts/XyoEmbedPluginContext/Provider.js.map +0 -1
- package/dist/esm/contexts/XyoEmbedPluginContext/State.js.map +0 -1
- package/dist/esm/contexts/XyoEmbedPluginContext/index.js.map +0 -1
- package/dist/esm/contexts/XyoEmbedPluginContext/use.js +0 -4
- package/dist/esm/contexts/XyoEmbedPluginContext/use.js.map +0 -1
- package/dist/esm/types/XyoEmbedPluginProps.js +0 -2
- package/dist/esm/types/XyoEmbedPluginProps.js.map +0 -1
- package/dist/types/components/XyoEmbedPlugin.d.ts +0 -5
- package/dist/types/components/XyoEmbedPlugin.d.ts.map +0 -1
- package/dist/types/components/embed-card/XyoEmbedPluginCard.d.ts +0 -11
- package/dist/types/components/embed-card/XyoEmbedPluginCard.d.ts.map +0 -1
- package/dist/types/contexts/XyoEmbedPluginContext/Context.d.ts +0 -4
- package/dist/types/contexts/XyoEmbedPluginContext/Context.d.ts.map +0 -1
- package/dist/types/contexts/XyoEmbedPluginContext/Provider.d.ts +0 -7
- package/dist/types/contexts/XyoEmbedPluginContext/Provider.d.ts.map +0 -1
- package/dist/types/contexts/XyoEmbedPluginContext/State.d.ts.map +0 -1
- package/dist/types/contexts/XyoEmbedPluginContext/index.d.ts.map +0 -1
- package/dist/types/contexts/XyoEmbedPluginContext/use.d.ts +0 -2
- package/dist/types/contexts/XyoEmbedPluginContext/use.d.ts.map +0 -1
- package/dist/types/types/XyoEmbedPluginProps.d.ts.map +0 -1
- package/src/contexts/XyoEmbedPluginContext/Context.tsx +0 -5
- package/src/contexts/XyoEmbedPluginContext/use.tsx +0 -5
- /package/dist/cjs/contexts/{XyoEmbedPluginContext → EmbedPluginContext}/State.js +0 -0
- /package/dist/cjs/contexts/{XyoEmbedPluginContext → EmbedPluginContext}/index.js +0 -0
- /package/dist/esm/contexts/{XyoEmbedPluginContext → EmbedPluginContext}/State.js +0 -0
- /package/dist/esm/contexts/{XyoEmbedPluginContext → EmbedPluginContext}/index.js +0 -0
- /package/dist/types/contexts/{XyoEmbedPluginContext → EmbedPluginContext}/index.d.ts +0 -0
- /package/src/contexts/{XyoEmbedPluginContext → EmbedPluginContext}/index.ts +0 -0
@@ -1,19 +1,19 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.EmbedPluginInner = void 0;
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
5
5
|
const react_shared_1 = require("@xyo-network/react-shared");
|
6
6
|
const contexts_1 = require("../contexts");
|
7
7
|
const EmbedResolver_1 = require("./EmbedResolver");
|
8
8
|
const validation_alerts_1 = require("./validation-alerts");
|
9
|
-
const
|
10
|
-
return ((0, jsx_runtime_1.jsx)(react_shared_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(contexts_1.
|
9
|
+
const EmbedPluginInner = ({ validateSchema, plugins = [], huriPayload, refreshTitle = '', timestampLabel = 'Data From', hideElementsConfig, embedPluginConfig, onRefresh, children, }) => {
|
10
|
+
return ((0, jsx_runtime_1.jsx)(react_shared_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(contexts_1.EmbedPluginProvider, Object.assign({ refreshTitle: refreshTitle, timestampLabel: timestampLabel, hideElementsConfig: hideElementsConfig, plugins: plugins, embedPluginConfig: embedPluginConfig }, { children: (0, jsx_runtime_1.jsx)(WithResolvers, Object.assign({ onRefresh: onRefresh, huriPayload: huriPayload }, { children: (0, jsx_runtime_1.jsx)(WithValidators, Object.assign({ validateSchema: validateSchema }, { children: (0, jsx_runtime_1.jsx)(react_shared_1.ListModeProvider, Object.assign({ defaultListMode: embedPluginConfig === null || embedPluginConfig === void 0 ? void 0 : embedPluginConfig.listMode }, { children: children })) })) })) })) }));
|
11
11
|
};
|
12
|
-
exports.
|
12
|
+
exports.EmbedPluginInner = EmbedPluginInner;
|
13
13
|
const WithResolvers = ({ children, onRefresh, huriPayload }) => {
|
14
14
|
return ((0, jsx_runtime_1.jsx)(contexts_1.RefreshPayloadProvider, Object.assign({ onRefresh: onRefresh }, { children: (0, jsx_runtime_1.jsx)(contexts_1.ResolvePayloadProvider, Object.assign({ huriPayload: huriPayload }, { children: (0, jsx_runtime_1.jsx)(EmbedResolver_1.EmbedResolver, { children: children }) })) })));
|
15
15
|
};
|
16
16
|
const WithValidators = ({ children, validateSchema }) => {
|
17
17
|
return ((0, jsx_runtime_1.jsx)(contexts_1.ValidatePayloadProvider, Object.assign({ enabled: validateSchema }, { children: (0, jsx_runtime_1.jsx)(validation_alerts_1.ValidatePluginsAlert, { children: (0, jsx_runtime_1.jsx)(validation_alerts_1.ValidatePayloadAlert, { children: children }) }) })));
|
18
18
|
};
|
19
|
-
//# sourceMappingURL=
|
19
|
+
//# sourceMappingURL=EmbedPlugin.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"EmbedPlugin.js","sourceRoot":"","sources":["../../../src/components/EmbedPlugin.tsx"],"names":[],"mappings":";;;;AAEA,4DAA2E;AAE3E,0CAA0H;AAE1H,mDAA+C;AAC/C,2DAAgF;AAEzE,MAAM,gBAAgB,GAA6C,CAAC,EACzE,cAAc,EACd,OAAO,GAAG,EAAE,EACZ,WAAW,EACX,YAAY,GAAG,EAAE,EACjB,cAAc,GAAG,WAAW,EAC5B,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,QAAQ,GACT,EAAE,EAAE;IACH,OAAO,CACL,uBAAC,4BAAa,cACZ,uBAAC,8BAAmB,kBAClB,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,kBAAkB,EAAE,kBAAkB,EACtC,OAAO,EAAE,OAAO,EAChB,iBAAiB,EAAE,iBAAiB,gBAEpC,uBAAC,aAAa,kBAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,gBAC3D,uBAAC,cAAc,kBAAC,cAAc,EAAE,cAAc,gBAC5C,uBAAC,+BAAgB,kBAAC,eAAe,EAAE,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,QAAQ,gBAAG,QAAQ,IAAoB,IAC9E,IACH,IACI,GACR,CACjB,CAAA;AACH,CAAC,CAAA;AA5BY,QAAA,gBAAgB,oBA4B5B;AAID,MAAM,aAAa,GAA+C,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,EAAE;IACzG,OAAO,CACL,uBAAC,iCAAsB,kBAAC,SAAS,EAAE,SAAS,gBAC1C,uBAAC,iCAAsB,kBAAC,WAAW,EAAE,WAAW,gBAC9C,uBAAC,6BAAa,cAAE,QAAQ,GAAiB,IAClB,IACF,CAC1B,CAAA;AACH,CAAC,CAAA;AAED,MAAM,cAAc,GAAyD,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,EAAE;IAC5G,OAAO,CACL,uBAAC,kCAAuB,kBAAC,OAAO,EAAE,cAAc,gBAC9C,uBAAC,wCAAoB,cACnB,uBAAC,wCAAoB,cAAE,QAAQ,GAAwB,GAClC,IACC,CAC3B,CAAA;AACH,CAAC,CAAA"}
|
@@ -8,7 +8,7 @@ const EmbedFormControl_1 = require("./EmbedFormControl");
|
|
8
8
|
const renderSelectId = 'render-select-id';
|
9
9
|
const renderSelectLabel = 'Renderer';
|
10
10
|
const EmbedRenderSelect = (props) => {
|
11
|
-
const { activePlugin, setActivePlugin, plugins } = (0, contexts_1.
|
11
|
+
const { activePlugin, setActivePlugin, plugins } = (0, contexts_1.useEmbedPluginState)();
|
12
12
|
return ((0, jsx_runtime_1.jsx)(EmbedFormControl_1.EmbedFormControl, Object.assign({ formId: renderSelectId, formLabel: renderSelectLabel }, { children: (0, jsx_runtime_1.jsx)(material_1.Select, Object.assign({ size: "small", value: activePlugin === null || activePlugin === void 0 ? void 0 : activePlugin.name }, props, { children: plugins === null || plugins === void 0 ? void 0 : plugins.map((plugin) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, Object.assign({ value: plugin.name, onClick: () => setActivePlugin === null || setActivePlugin === void 0 ? void 0 : setActivePlugin(plugin) }, { children: plugin.name }), plugin.name))) })) })));
|
13
13
|
};
|
14
14
|
exports.EmbedRenderSelect = EmbedRenderSelect;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RenderSelect.js","sourceRoot":"","sources":["../../../../src/components/controls/RenderSelect.tsx"],"names":[],"mappings":";;;;AAAA,4CAA6D;AAE7D,
|
1
|
+
{"version":3,"file":"RenderSelect.js","sourceRoot":"","sources":["../../../../src/components/controls/RenderSelect.tsx"],"names":[],"mappings":";;;;AAAA,4CAA6D;AAE7D,6CAAoD;AACpD,yDAAqD;AAErD,MAAM,cAAc,GAAG,kBAAkB,CAAA;AACzC,MAAM,iBAAiB,GAAG,UAAU,CAAA;AAE7B,MAAM,iBAAiB,GAA0B,CAAC,KAAK,EAAE,EAAE;IAChE,MAAM,EAAE,YAAY,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,IAAA,8BAAmB,GAAE,CAAA;IACxE,OAAO,CACL,uBAAC,mCAAgB,kBAAC,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,iBAAiB,gBACpE,uBAAC,iBAAM,kBAAC,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,IAAM,KAAK,cACtD,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACxB,uBAAC,mBAAQ,kBAAC,KAAK,EAAE,MAAM,CAAC,IAAI,EAAoB,OAAO,EAAE,GAAG,EAAE,CAAC,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAG,MAAM,CAAC,gBACrF,MAAM,CAAC,IAAI,KADqB,MAAM,CAAC,IAAI,CAEnC,CACZ,CAAC,IACK,IACQ,CACpB,CAAA;AACH,CAAC,CAAA;AAbY,QAAA,iBAAiB,qBAa7B"}
|
@@ -1,17 +1,17 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.EmbedPlugin = exports.EmbedPluginCardInner = exports.ApiEmbedPluginCard = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
6
6
|
const material_1 = require("@mui/material");
|
7
7
|
const contexts_1 = require("../../contexts");
|
8
|
-
const
|
8
|
+
const EmbedPlugin_1 = require("../EmbedPlugin");
|
9
9
|
const card_1 = require("./card");
|
10
10
|
const error_handling_1 = require("./error-handling");
|
11
|
-
const
|
11
|
+
const ApiEmbedPluginCard = (_a) => {
|
12
12
|
var { children } = _a, props = tslib_1.__rest(_a, ["children"]);
|
13
13
|
const { validateSchema, plugins = [], huriPayload, refreshTitle = '', timestampLabel = 'Data From', hideElementsConfig, embedPluginConfig, onRefresh } = props, busyCardProps = tslib_1.__rest(props, ["validateSchema", "plugins", "huriPayload", "refreshTitle", "timestampLabel", "hideElementsConfig", "embedPluginConfig", "onRefresh"]);
|
14
|
-
return ((0, jsx_runtime_1.jsxs)(
|
14
|
+
return ((0, jsx_runtime_1.jsxs)(EmbedPlugin_1.EmbedPluginInner, Object.assign({}, {
|
15
15
|
embedPluginConfig,
|
16
16
|
hideElementsConfig,
|
17
17
|
huriPayload,
|
@@ -20,16 +20,16 @@ const XyoEmbedPluginCard = (_a) => {
|
|
20
20
|
refreshTitle,
|
21
21
|
timestampLabel,
|
22
22
|
validateSchema,
|
23
|
-
}, { children: [(0, jsx_runtime_1.jsx)(exports.
|
23
|
+
}, { children: [(0, jsx_runtime_1.jsx)(exports.EmbedPluginCardInner, Object.assign({}, busyCardProps)), children] })));
|
24
24
|
};
|
25
|
-
exports.
|
26
|
-
const
|
25
|
+
exports.ApiEmbedPluginCard = ApiEmbedPluginCard;
|
26
|
+
const EmbedPluginCardInner = (props) => {
|
27
27
|
const { payload, huriError } = (0, contexts_1.useResolvePayload)();
|
28
28
|
const { refreshPayload } = (0, contexts_1.useRefreshPayload)();
|
29
29
|
const theme = (0, material_1.useTheme)();
|
30
30
|
return ((0, jsx_runtime_1.jsx)(error_handling_1.EmbedCardApiErrorRenderer, Object.assign({ xyoError: huriError }, { children: (0, jsx_runtime_1.jsx)(card_1.EmbedPluginCard, Object.assign({ elevation: 3, variant: "elevation", busy: Boolean(!refreshPayload && payload), busyVariantProps: { style: { alignItems: 'start', paddingTop: theme.spacing(2), zIndex: 2 } }, sx: { position: 'relative' } }, props)) })));
|
31
31
|
};
|
32
|
-
exports.
|
33
|
-
/** @deprecated - use
|
34
|
-
exports.
|
35
|
-
//# sourceMappingURL=
|
32
|
+
exports.EmbedPluginCardInner = EmbedPluginCardInner;
|
33
|
+
/** @deprecated - use EmbedPluginCard and use CardProps instead of FlexBoxProps */
|
34
|
+
exports.EmbedPlugin = card_1.EmbedPluginCard;
|
35
|
+
//# sourceMappingURL=EmbedPluginCard.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"EmbedPluginCard.js","sourceRoot":"","sources":["../../../../src/components/embed-card/EmbedPluginCard.tsx"],"names":[],"mappings":";;;;;AAAA,4CAAwC;AAGxC,6CAAqE;AAErE,gDAAiD;AACjD,iCAAuD;AACvD,qDAA4D;AAIrD,MAAM,kBAAkB,GAAmC,CAAC,EAAsB,EAAE,EAAE;QAA1B,EAAE,QAAQ,OAAY,EAAP,KAAK,sBAApB,YAAsB,CAAF;IACrF,MAAM,EACJ,cAAc,EACd,OAAO,GAAG,EAAE,EACZ,WAAW,EACX,YAAY,GAAG,EAAE,EACjB,cAAc,GAAG,WAAW,EAC5B,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,KAEP,KAAK,EADJ,aAAa,kBACd,KAAK,EAVH,sIAUL,CAAQ,CAAA;IAET,OAAO,CACL,wBAAC,8BAAgB,oBACX;QACF,iBAAiB;QACjB,kBAAkB;QAClB,WAAW;QACX,SAAS;QACT,OAAO;QACP,YAAY;QACZ,cAAc;QACd,cAAc;KACf,eAED,uBAAC,4BAAoB,oBAAK,aAAa,EAAI,EAC1C,QAAQ,KACQ,CACpB,CAAA;AACH,CAAC,CAAA;AA9BY,QAAA,kBAAkB,sBA8B9B;AAEM,MAAM,oBAAoB,GAA4B,CAAC,KAAK,EAAE,EAAE;IACrE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAA,4BAAiB,GAAE,CAAA;IAClD,MAAM,EAAE,cAAc,EAAE,GAAG,IAAA,4BAAiB,GAAE,CAAA;IAC9C,MAAM,KAAK,GAAG,IAAA,mBAAQ,GAAE,CAAA;IAExB,OAAO,CACL,uBAAC,0CAAyB,kBAAC,QAAQ,EAAE,SAAS,gBAC5C,uBAAC,sBAAe,kBACd,SAAS,EAAE,CAAC,EACZ,OAAO,EAAC,WAAW,EACnB,IAAI,EAAE,OAAO,CAAC,CAAC,cAAc,IAAI,OAAO,CAAC,EACzC,gBAAgB,EAAE,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,EAC7F,EAAE,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,IACxB,KAAK,EACT,IACwB,CAC7B,CAAA;AACH,CAAC,CAAA;AAjBY,QAAA,oBAAoB,wBAiBhC;AAED,kFAAkF;AACrE,QAAA,WAAW,GAAG,sBAAe,CAAA"}
|
@@ -11,7 +11,7 @@ const menu_1 = require("../menu");
|
|
11
11
|
const EmbedCardHeader = () => {
|
12
12
|
var _a;
|
13
13
|
const { payload, refreshHuri, huri } = (0, contexts_1.useResolvePayload)();
|
14
|
-
const { activePlugin, timestampLabel, hideElementsConfig } = (0, contexts_1.
|
14
|
+
const { activePlugin, timestampLabel, hideElementsConfig } = (0, contexts_1.useEmbedPluginState)();
|
15
15
|
const { hideAvatar, hideTitle, hideRefreshButton, hideTimestamp, hideCardActions } = hideElementsConfig !== null && hideElementsConfig !== void 0 ? hideElementsConfig : {};
|
16
16
|
return ((0, jsx_runtime_1.jsx)(material_1.CardHeader, { sx: { flexWrap: 'wrap', rowGap: 1 }, avatar: hideAvatar ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})) : ((0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ sx: { bgcolor: (theme) => theme.palette.primary.main }, "aria-label": activePlugin === null || activePlugin === void 0 ? void 0 : activePlugin.name }, { children: (_a = activePlugin === null || activePlugin === void 0 ? void 0 : activePlugin.name) === null || _a === void 0 ? void 0 : _a.charAt(0) }))), action: (0, jsx_runtime_1.jsxs)(react_flexbox_1.FlexRow, Object.assign({ flexWrap: "wrap", columnGap: 0.5 }, { children: [(payload === null || payload === void 0 ? void 0 : payload.timestamp) ? (hideTimestamp && hideRefreshButton ? ('') : ((0, jsx_runtime_1.jsx)(material_1.Chip, { avatar: hideRefreshButton ? (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}) : (0, jsx_runtime_1.jsx)(Refresh_1.default, {}), clickable: hideRefreshButton ? false : true, onClick: refreshHuri, label: hideTimestamp ? '' : `${timestampLabel} ${new Date(payload.timestamp).toLocaleString()}` }))) : null, hideCardActions || huri === undefined ? null : (0, jsx_runtime_1.jsx)(menu_1.EmbedMenu, {})] })), title: hideTitle ? '' : activePlugin === null || activePlugin === void 0 ? void 0 : activePlugin.name }));
|
17
17
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"EmbedCardHeader.js","sourceRoot":"","sources":["../../../../../src/components/embed-card/card/EmbedCardHeader.tsx"],"names":[],"mappings":";;;;;AAAA,kFAAqD;AACrD,4CAAgF;AAChF,yDAA+C;AAE/C,
|
1
|
+
{"version":3,"file":"EmbedCardHeader.js","sourceRoot":"","sources":["../../../../../src/components/embed-card/card/EmbedCardHeader.tsx"],"names":[],"mappings":";;;;;AAAA,kFAAqD;AACrD,4CAAgF;AAChF,yDAA+C;AAE/C,gDAA0E;AAC1E,kCAAmC;AAE5B,MAAM,eAAe,GAA8B,GAAG,EAAE;;IAC7D,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,IAAA,4BAAiB,GAAE,CAAA;IAC1D,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,GAAG,IAAA,8BAAmB,GAAE,CAAA;IAClF,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,iBAAiB,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,EAAE,CAAA;IAC7G,OAAO,CACL,uBAAC,qBAAU,IACT,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,EACnC,MAAM,EACJ,UAAU,CAAC,CAAC,CAAC,CACX,kDAAK,CACN,CAAC,CAAC,CAAC,CACF,uBAAC,iBAAM,kBAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,KAAY,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,gBAAc,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,gBAClG,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,0CAAE,MAAM,CAAC,CAAC,CAAC,IACvB,CACV,EAEH,MAAM,EACJ,wBAAC,uBAAO,kBAAC,QAAQ,EAAC,MAAM,EAAC,SAAS,EAAE,GAAG,iBACpC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,EAAC,CAAC,CAAC,CACpB,aAAa,IAAI,iBAAiB,CAAC,CAAC,CAAC,CACnC,EAAE,CACH,CAAC,CAAC,CAAC,CACF,uBAAC,eAAI,IACH,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,kDAAK,CAAC,CAAC,CAAC,uBAAC,iBAAW,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,OAAO,CAAC,SAAS,CAAC,CAAC,cAAc,EAAE,EAAE,GAC/F,CACH,CACF,CAAC,CAAC,CAAC,IAAI,EAEP,eAAe,IAAI,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,uBAAC,gBAAS,KAAG,KACrD,EAEZ,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,GAC1C,CACH,CAAA;AACH,CAAC,CAAA;AArCY,QAAA,eAAe,mBAqC3B"}
|
@@ -14,7 +14,7 @@ const EmbedPluginCard = (_a) => {
|
|
14
14
|
var _b, _c, _d, _e;
|
15
15
|
var props = tslib_1.__rest(_a, []);
|
16
16
|
const { payload } = (0, contexts_1.useResolvePayload)();
|
17
|
-
const { activePlugin: ActivePlugin, plugins, hideElementsConfig } = (0, contexts_1.
|
17
|
+
const { activePlugin: ActivePlugin, plugins, hideElementsConfig } = (0, contexts_1.useEmbedPluginState)();
|
18
18
|
const { listMode } = (0, react_shared_1.useListMode)();
|
19
19
|
const supportsListMode = (_e = (_d = (_c = (_b = ActivePlugin === null || ActivePlugin === void 0 ? void 0 : ActivePlugin.components) === null || _b === void 0 ? void 0 : _b.box) === null || _c === void 0 ? void 0 : _c.listModes) === null || _d === void 0 ? void 0 : _d.length) !== null && _e !== void 0 ? _e : 0 > 1;
|
20
20
|
return ((0, jsx_runtime_1.jsxs)(BusyCard_1.BusyCard, Object.assign({}, props, { children: [(hideElementsConfig === null || hideElementsConfig === void 0 ? void 0 : hideElementsConfig.hideCardHeader) ? null : (0, jsx_runtime_1.jsx)(EmbedCardHeader_1.EmbedCardHeader, {}), (plugins && plugins.length) || supportsListMode ? ((0, jsx_runtime_1.jsxs)(react_flexbox_1.FlexGrowRow, Object.assign({ columnGap: 2, rowGap: 2, flexWrap: "wrap", pb: 1 }, { children: [plugins && plugins.length > 1 ? (0, jsx_runtime_1.jsx)(controls_1.EmbedRenderSelect, {}) : null, supportsListMode ? (0, jsx_runtime_1.jsx)(controls_1.ListModeSelectFormControl, {}) : null] }))) : null, (0, jsx_runtime_1.jsx)(material_1.CardContent, Object.assign({ sx: { height: '100%' } }, { children: ActivePlugin ? (0, jsx_runtime_1.jsx)(ActivePlugin.components.box.detailsBox, Object.assign({ payload: payload }, (supportsListMode && { listMode }))) : null }))] })));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"EmbedPluginCard.js","sourceRoot":"","sources":["../../../../../src/components/embed-card/card/EmbedPluginCard.tsx"],"names":[],"mappings":";;;;;AAAA,4CAA2C;AAC3C,yDAAmD;AACnD,4DAAuD;AAEvD,
|
1
|
+
{"version":3,"file":"EmbedPluginCard.js","sourceRoot":"","sources":["../../../../../src/components/embed-card/card/EmbedPluginCard.tsx"],"names":[],"mappings":";;;;;AAAA,4CAA2C;AAC3C,yDAAmD;AACnD,4DAAuD;AAEvD,gDAA0E;AAC1E,6CAA6E;AAC7E,yCAAoD;AACpD,uDAAmD;AAE5C,MAAM,eAAe,GAA4B,CAAC,EAAY,EAAE,EAAE;;QAAX,KAAK,sBAAV,EAAY,CAAF;IACjE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,4BAAiB,GAAE,CAAA;IACvC,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,IAAA,8BAAmB,GAAE,CAAA;IACzF,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,0BAAW,GAAE,CAAA;IAClC,MAAM,gBAAgB,GAAG,MAAA,MAAA,MAAA,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,UAAU,0CAAE,GAAG,0CAAE,SAAS,0CAAE,MAAM,mCAAI,CAAC,GAAG,CAAC,CAAA;IAElF,OAAO,CACL,wBAAC,mBAAQ,oBAAK,KAAK,eAChB,CAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,cAAc,EAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,uBAAC,iCAAe,KAAG,EAE/D,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,CACjD,wBAAC,2BAAW,kBAAC,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAC,MAAM,EAAC,EAAE,EAAE,CAAC,iBACxD,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,uBAAC,4BAAiB,KAAG,CAAC,CAAC,CAAC,IAAI,EAC5D,gBAAgB,CAAC,CAAC,CAAC,uBAAC,oCAAyB,KAAG,CAAC,CAAC,CAAC,IAAI,KAC5C,CACf,CAAC,CAAC,CAAC,IAAI,EACR,uBAAC,sBAAW,kBAAC,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,gBAChC,YAAY,CAAC,CAAC,CAAC,uBAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,UAAU,kBAAC,OAAO,EAAE,OAAO,IAAM,CAAC,gBAAgB,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAI,CAAC,CAAC,CAAC,IAAI,IAC/G,KACL,CACZ,CAAA;AACH,CAAC,CAAA;AArBY,QAAA,eAAe,mBAqB3B"}
|
@@ -7,11 +7,11 @@ const react_error_1 = require("@xyo-network/react-error");
|
|
7
7
|
const EmbedErrorCard_1 = require("./EmbedErrorCard");
|
8
8
|
const EmbedCardApiErrorRenderer = (_a) => {
|
9
9
|
var { xyoError, children } = _a, props = tslib_1.__rest(_a, ["xyoError", "children"]);
|
10
|
-
return ((0, jsx_runtime_1.jsx)(react_error_1.
|
10
|
+
return ((0, jsx_runtime_1.jsx)(react_error_1.ErrorRender, Object.assign({ error: xyoError, noReAuth: true, noErrorDisplay: true, customError: (0, jsx_runtime_1.jsx)(CustomApiErrorCard, Object.assign({ xyoError: xyoError }, props)) }, { children: children })));
|
11
11
|
};
|
12
12
|
exports.EmbedCardApiErrorRenderer = EmbedCardApiErrorRenderer;
|
13
13
|
const CustomApiErrorCard = (_a) => {
|
14
14
|
var { xyoError } = _a, props = tslib_1.__rest(_a, ["xyoError"]);
|
15
|
-
return ((0, jsx_runtime_1.jsx)(EmbedErrorCard_1.EmbedErrorCard, Object.assign({}, props, { children: (0, jsx_runtime_1.jsx)(react_error_1.
|
15
|
+
return ((0, jsx_runtime_1.jsx)(EmbedErrorCard_1.EmbedErrorCard, Object.assign({}, props, { children: (0, jsx_runtime_1.jsx)(react_error_1.ErrorAlert, { error: xyoError }) })));
|
16
16
|
};
|
17
17
|
//# sourceMappingURL=EmbedCardApiErrorRenderer.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"EmbedCardApiErrorRenderer.js","sourceRoot":"","sources":["../../../../../src/components/embed-card/error-handling/EmbedCardApiErrorRenderer.tsx"],"names":[],"mappings":";;;;;AAGA,
|
1
|
+
{"version":3,"file":"EmbedCardApiErrorRenderer.js","sourceRoot":"","sources":["../../../../../src/components/embed-card/error-handling/EmbedCardApiErrorRenderer.tsx"],"names":[],"mappings":";;;;;AAGA,0DAAkE;AAElE,qDAAiD;AAM1C,MAAM,yBAAyB,GAA2D,CAAC,EAAgC,EAAE,EAAE;QAApC,EAAE,QAAQ,EAAE,QAAQ,OAAY,EAAP,KAAK,sBAA9B,wBAAgC,CAAF;IAC9H,OAAO,CACL,uBAAC,yBAAW,kBAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,QAAC,cAAc,QAAC,WAAW,EAAE,uBAAC,kBAAkB,kBAAC,QAAQ,EAAE,QAAQ,IAAM,KAAK,EAAI,gBACrH,QAAQ,IACG,CACf,CAAA;AACH,CAAC,CAAA;AANY,QAAA,yBAAyB,6BAMrC;AAED,MAAM,kBAAkB,GAA6C,CAAC,EAAsB,EAAE,EAAE;QAA1B,EAAE,QAAQ,OAAY,EAAP,KAAK,sBAApB,YAAsB,CAAF;IACxF,OAAO,CACL,uBAAC,+BAAc,oBAAK,KAAK,cACvB,uBAAC,wBAAU,IAAC,KAAK,EAAE,QAAQ,GAAI,IAChB,CAClB,CAAA;AACH,CAAC,CAAA"}
|
@@ -2,5 +2,5 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const tslib_1 = require("tslib");
|
4
4
|
tslib_1.__exportStar(require("./card"), exports);
|
5
|
-
tslib_1.__exportStar(require("./
|
5
|
+
tslib_1.__exportStar(require("./EmbedPluginCard"), exports);
|
6
6
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/embed-card/index.ts"],"names":[],"mappings":";;;AAAA,iDAAsB;AACtB
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/embed-card/index.ts"],"names":[],"mappings":";;;AAAA,iDAAsB;AACtB,4DAAiC"}
|
@@ -6,7 +6,7 @@ const react_router_dom_1 = require("react-router-dom");
|
|
6
6
|
const embed_card_1 = require("../embed-card");
|
7
7
|
exports.xyoEmbedStoryBase = {
|
8
8
|
argTypes: {},
|
9
|
-
component: embed_card_1.
|
9
|
+
component: embed_card_1.ApiEmbedPluginCard,
|
10
10
|
parameters: {
|
11
11
|
docs: {
|
12
12
|
page: null,
|
@@ -14,7 +14,7 @@ exports.xyoEmbedStoryBase = {
|
|
14
14
|
},
|
15
15
|
};
|
16
16
|
const Template = (args) => {
|
17
|
-
return ((0, jsx_runtime_1.jsx)(react_router_dom_1.BrowserRouter, { children: (0, jsx_runtime_1.jsx)(embed_card_1.
|
17
|
+
return ((0, jsx_runtime_1.jsx)(react_router_dom_1.BrowserRouter, { children: (0, jsx_runtime_1.jsx)(embed_card_1.ApiEmbedPluginCard, Object.assign({}, args)) }));
|
18
18
|
};
|
19
19
|
exports.Template = Template;
|
20
20
|
//# sourceMappingURL=storyShared.js.map
|
@@ -2,5 +2,5 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const tslib_1 = require("tslib");
|
4
4
|
tslib_1.__exportStar(require("./embed-card"), exports);
|
5
|
-
tslib_1.__exportStar(require("./
|
5
|
+
tslib_1.__exportStar(require("./EmbedPlugin"), exports);
|
6
6
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B;AAC5B,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B;AAC5B,wDAA6B"}
|
@@ -8,7 +8,7 @@ const contexts_1 = require("../../contexts");
|
|
8
8
|
const ValidatePluginsAlert = (_a) => {
|
9
9
|
var { children } = _a, props = tslib_1.__rest(_a, ["children"]);
|
10
10
|
const { payload } = (0, contexts_1.useResolvePayload)();
|
11
|
-
const { plugins } = (0, contexts_1.
|
11
|
+
const { plugins } = (0, contexts_1.useEmbedPluginState)();
|
12
12
|
if (payload && (plugins === null || plugins === void 0 ? void 0 : plugins.length) === 0) {
|
13
13
|
return ((0, jsx_runtime_1.jsxs)(material_1.Alert, Object.assign({ severity: "warning" }, props, { children: [(0, jsx_runtime_1.jsx)(material_1.AlertTitle, { children: "Missing plugins!" }), "Payload found but no plugins were present."] })));
|
14
14
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ValidatePlugins.js","sourceRoot":"","sources":["../../../../src/components/validation-alerts/ValidatePlugins.tsx"],"names":[],"mappings":";;;;;AAAA,4CAA6D;AAG7D,
|
1
|
+
{"version":3,"file":"ValidatePlugins.js","sourceRoot":"","sources":["../../../../src/components/validation-alerts/ValidatePlugins.tsx"],"names":[],"mappings":";;;;;AAAA,4CAA6D;AAG7D,6CAAuE;AAEhE,MAAM,oBAAoB,GAAuC,CAAC,EAAsB,EAAE,EAAE;QAA1B,EAAE,QAAQ,OAAY,EAAP,KAAK,sBAApB,YAAsB,CAAF;IAC3F,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,4BAAiB,GAAE,CAAA;IACvC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,8BAAmB,GAAE,CAAA;IAEzC,IAAI,OAAO,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,MAAK,CAAC,EAAE;QACpC,OAAO,CACL,wBAAC,gBAAK,kBAAC,QAAQ,EAAC,SAAS,IAAK,KAAK,eACjC,uBAAC,qBAAU,mCAA8B,mDACnC,CACT,CAAA;KACF;IAED,OAAO,2DAAG,QAAQ,GAAI,CAAA;AACxB,CAAC,CAAA;AAbY,QAAA,oBAAoB,wBAahC"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.EmbedPluginContext = void 0;
|
4
|
+
const react_shared_1 = require("@xyo-network/react-shared");
|
5
|
+
exports.EmbedPluginContext = (0, react_shared_1.createContextEx)();
|
6
|
+
//# sourceMappingURL=Context.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Context.js","sourceRoot":"","sources":["../../../../src/contexts/EmbedPluginContext/Context.tsx"],"names":[],"mappings":";;;AAAA,4DAA2D;AAI9C,QAAA,kBAAkB,GAAG,IAAA,8BAAe,GAAoB,CAAA"}
|
@@ -1,16 +1,16 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.EmbedPluginProvider = void 0;
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
5
5
|
const react_1 = require("react");
|
6
6
|
const Context_1 = require("./Context");
|
7
7
|
/** Expose passed embed plugin props via context */
|
8
|
-
const
|
8
|
+
const EmbedPluginProvider = ({ children, refreshTitle, timestampLabel, hideElementsConfig, plugins, embedPluginConfig, }) => {
|
9
9
|
const [activePlugin, setActivePlugin] = (0, react_1.useState)(plugins ? plugins[0] : undefined);
|
10
10
|
(0, react_1.useEffect)(() => {
|
11
11
|
setActivePlugin(plugins ? plugins[0] : undefined);
|
12
12
|
}, [plugins]);
|
13
|
-
return ((0, jsx_runtime_1.jsx)(Context_1.
|
13
|
+
return ((0, jsx_runtime_1.jsx)(Context_1.EmbedPluginContext.Provider, Object.assign({ value: {
|
14
14
|
activePlugin,
|
15
15
|
embedPluginConfig,
|
16
16
|
hideElementsConfig,
|
@@ -20,5 +20,5 @@ const XyoEmbedPluginProvider = ({ children, refreshTitle, timestampLabel, hideEl
|
|
20
20
|
timestampLabel,
|
21
21
|
} }, { children: children })));
|
22
22
|
};
|
23
|
-
exports.
|
23
|
+
exports.EmbedPluginProvider = EmbedPluginProvider;
|
24
24
|
//# sourceMappingURL=Provider.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../../src/contexts/EmbedPluginContext/Provider.tsx"],"names":[],"mappings":";;;;AAEA,iCAA2C;AAE3C,uCAA8C;AAK9C,mDAAmD;AAC5C,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,IAAA,gBAAQ,EAAkC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;IAEnH,IAAA,iBAAS,EAAC,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,uBAAC,4BAAkB,CAAC,QAAQ,kBAC1B,KAAK,EAAE;YACL,YAAY;YACZ,iBAAiB;YACjB,kBAAkB;YAClB,QAAQ,EAAE,IAAI;YACd,YAAY;YACZ,eAAe;YACf,cAAc;SACf,gBAEA,QAAQ,IACmB,CAC/B,CAAA;AACH,CAAC,CAAA;AA7BY,QAAA,mBAAmB,uBA6B/B"}
|
@@ -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,oDAAyB;AACzB,qDAA0B;AAC1B,kDAAuB;AACvB,gDAAqB"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.useEmbedPluginState = void 0;
|
4
|
+
const react_shared_1 = require("@xyo-network/react-shared");
|
5
|
+
const Context_1 = require("./Context");
|
6
|
+
const useEmbedPluginState = () => (0, react_shared_1.useContextEx)(Context_1.EmbedPluginContext, 'EmbedPlugin', true);
|
7
|
+
exports.useEmbedPluginState = useEmbedPluginState;
|
8
|
+
//# sourceMappingURL=use.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"use.js","sourceRoot":"","sources":["../../../../src/contexts/EmbedPluginContext/use.tsx"],"names":[],"mappings":";;;AAAA,4DAAwD;AAExD,uCAA8C;AAEvC,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,IAAA,2BAAY,EAAC,4BAAkB,EAAE,aAAa,EAAE,IAAI,CAAC,CAAA;AAAjF,QAAA,mBAAmB,uBAA8D"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const tslib_1 = require("tslib");
|
4
|
+
tslib_1.__exportStar(require("./EmbedPluginContext"), exports);
|
4
5
|
tslib_1.__exportStar(require("./RefreshPayloadContext"), exports);
|
5
6
|
tslib_1.__exportStar(require("./ResolvePayloadContext"), exports);
|
6
7
|
tslib_1.__exportStar(require("./ValidatePayloadContext"), exports);
|
7
|
-
tslib_1.__exportStar(require("./XyoEmbedPluginContext"), exports);
|
8
8
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contexts/index.ts"],"names":[],"mappings":";;;AAAA,kEAAuC;AACvC,kEAAuC;AACvC,mEAAwC
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contexts/index.ts"],"names":[],"mappings":";;;AAAA,+DAAoC;AACpC,kEAAuC;AACvC,kEAAuC;AACvC,mEAAwC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"EmbedPluginProps.js","sourceRoot":"","sources":["../../../src/types/EmbedPluginProps.ts"],"names":[],"mappings":""}
|
package/dist/cjs/types/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const tslib_1 = require("tslib");
|
4
|
-
tslib_1.__exportStar(require("./
|
4
|
+
tslib_1.__exportStar(require("./EmbedPluginProps"), exports);
|
5
5
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;AAAA,6DAAkC"}
|