@twilltac/compliance-sdk 0.1.9 → 0.1.10

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.
package/README.md CHANGED
@@ -94,7 +94,7 @@ plugin.on('session:expired', () => {
94
94
  | ----- | ---- | ----------- |
95
95
  | `flow.journey.started` | `void` | Emits when the user starts the journey and IDD document is generated. |
96
96
  | `flow.journey.section:started` | `SectionStartedEvent` | Emits when the user starts a section. |
97
- | `flow.journey.section:completed` | `SectionEndedEvent` | Emits when the user starts a completes the question set and selects their recommendations. |
97
+ | `flow.journey.section:completed` | `SectionEndedEvent` | Emits when the user completes the question set and submits their recommendations. |
98
98
  | `flow.documents:list` | `ComplianceDocument[]` | Emits when the user completes the journey and recommendations are produced. |
99
99
  | `session:expired` | `void` | Emits when the session has expired. This would typically trigger your auth flow followed by re-initialising the plugin. |
100
100
 
@@ -1 +1 @@
1
- 22873884653-1
1
+ 23333213647-1
package/index.cjs CHANGED
@@ -74,6 +74,7 @@ var CompliancePlugin = class {
74
74
  opts.iframeElement.style.minHeight = `${opts.initialisationData.documentHeight}px`;
75
75
  opts.postMessageBus.on("window:resize", (data) => opts.iframeElement.style.minHeight = `${data.height}px`);
76
76
  opts.postMessageBus.on("session:expired-token", () => this._events.emit("session:expired"));
77
+ opts.postMessageBus.on("navigation:start", () => opts.iframeElement.style.minHeight = "");
77
78
  opts.postMessageBus.on("journey:started", () => this._events.emit("flow.journey.started"));
78
79
  opts.postMessageBus.on("journey.section:started", (data) => this._events.emit("flow.journey.section:started", data));
79
80
  opts.postMessageBus.on("journey.section:completed", (data) => this._events.emit("flow.journey.section:completed", data));
package/index.js CHANGED
@@ -48,6 +48,7 @@ var CompliancePlugin = class {
48
48
  opts.iframeElement.style.minHeight = `${opts.initialisationData.documentHeight}px`;
49
49
  opts.postMessageBus.on("window:resize", (data) => opts.iframeElement.style.minHeight = `${data.height}px`);
50
50
  opts.postMessageBus.on("session:expired-token", () => this._events.emit("session:expired"));
51
+ opts.postMessageBus.on("navigation:start", () => opts.iframeElement.style.minHeight = "");
51
52
  opts.postMessageBus.on("journey:started", () => this._events.emit("flow.journey.started"));
52
53
  opts.postMessageBus.on("journey.section:started", (data) => this._events.emit("flow.journey.section:started", data));
53
54
  opts.postMessageBus.on("journey.section:completed", (data) => this._events.emit("flow.journey.section:completed", data));
@@ -22,7 +22,7 @@ export interface CompliancePluginEvents {
22
22
  ['flow.journey.started']: void;
23
23
  /** Emits when the user starts a section. */
24
24
  ['flow.journey.section:started']: SectionStartedEvent;
25
- /** Emits when the user starts a completes the question set and selects their recommendations. */
25
+ /** Emits when the user completes the question set and submits their recommendations. */
26
26
  ['flow.journey.section:completed']: SectionEndedEvent;
27
27
  /** Emits when the user completes the journey and recommendations are produced. */
28
28
  ['flow.documents:list']: ComplianceDocument[];
@@ -28,6 +28,8 @@ export interface CompliancePluginPostMessages {
28
28
  height: number;
29
29
  };
30
30
  };
31
+ ['navigation:start']: void;
32
+ ['navigation:end']: void;
31
33
  ['session:expired-token']: void;
32
34
  ['initialisation:success']: {
33
35
  payload: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twilltac/compliance-sdk",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",