@cola1900/dsh-ppt 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/client.js +7 -3
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -458,8 +458,12 @@ window.__ModuleLoader__.load({
458
458
  })))));
459
459
  }
460
460
  function OfficePptComposer(props) {
461
- const session = props.useSession(current => ({ blank: current.blank, agentPreset: current.agentPreset }));
462
- if (!session.blank || session.agentPreset !== "ppt") return null;
461
+ const blank = props.useSession(current => current.blank);
462
+ const agentPreset = props.useSessions(current => {
463
+ const summary = current.byId[props.sessionId];
464
+ return summary?.projectionValues?.agentPreset ?? summary?.agentPreset;
465
+ });
466
+ if (!blank || agentPreset !== "ppt") return null;
463
467
  return react_jsx_runtime.jsx(OfficePptChooser, {
464
468
  client: props.client, mode: props.mode, sessionId: props.sessionId, t: props.t
465
469
  }, props.sessionId);
@@ -652,7 +656,7 @@ window.__ModuleLoader__.load({
652
656
  name, id: "dsh-ppt", order: 20, locale: NS, inject: injectHero
653
657
  }, props => react_jsx_runtime.jsx(OfficePptComposer, {
654
658
  client: props.client, mode: props.mode, sessionId: props.sessionId,
655
- useSession: props.useSession, t: props.t
659
+ useSession: props.useSession, useSessions: props.useSessions, t: props.t
656
660
  }, props.sessionId)));
657
661
  }
658
662
  //#endregion
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cola1900/dsh-ppt",
3
3
  "description": "Standalone DSH plugin for PPT authoring, template selection, validation and editable PPTX export",
4
- "version": "0.2.0",
4
+ "version": "0.2.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/boe1900/dsh-ppt.git"