diff --git a/examples/test-app/CHANGELOG.md b/examples/test-app/CHANGELOG.md index 103e472..def9745 100644 --- a/examples/test-app/CHANGELOG.md +++ b/examples/test-app/CHANGELOG.md @@ -1,5 +1,13 @@ # test-app +## 1.0.19 + +### Patch Changes + +- Updated dependencies + - @parcnet-js/app-connector@1.1.7 + - @parcnet-js/app-connector-react@1.0.2 + ## 1.0.18 ### Patch Changes diff --git a/examples/test-app/package.json b/examples/test-app/package.json index 46ebf54..d13d55f 100644 --- a/examples/test-app/package.json +++ b/examples/test-app/package.json @@ -1,6 +1,6 @@ { "name": "test-app", - "version": "1.0.18", + "version": "1.0.19", "private": true, "type": "module", "scripts": { diff --git a/packages/app-connector-react/CHANGELOG.md b/packages/app-connector-react/CHANGELOG.md index ec9b1c7..d6a501f 100644 --- a/packages/app-connector-react/CHANGELOG.md +++ b/packages/app-connector-react/CHANGELOG.md @@ -1,5 +1,12 @@ # @parcnet-js/app-connector-react +## 1.0.2 + +### Patch Changes + +- Updated dependencies + - @parcnet-js/app-connector@1.1.7 + ## 1.0.1 ### Patch Changes diff --git a/packages/app-connector-react/package.json b/packages/app-connector-react/package.json index 74fec69..1ccf485 100644 --- a/packages/app-connector-react/package.json +++ b/packages/app-connector-react/package.json @@ -1,6 +1,6 @@ { "name": "@parcnet-js/app-connector-react", - "version": "1.0.1", + "version": "1.0.2", "license": "GPL-3.0-or-later", "type": "module", "main": "dist/index.cjs", diff --git a/packages/app-connector/CHANGELOG.md b/packages/app-connector/CHANGELOG.md index caaa9e5..8ee91d4 100644 --- a/packages/app-connector/CHANGELOG.md +++ b/packages/app-connector/CHANGELOG.md @@ -1,5 +1,11 @@ # @parcnet-js/app-connector +## 1.1.7 + +### Patch Changes + +- Distinguish between dialog closed by client and by user interaction + ## 1.1.6 ### Patch Changes diff --git a/packages/app-connector/package.json b/packages/app-connector/package.json index 89145fd..62be797 100644 --- a/packages/app-connector/package.json +++ b/packages/app-connector/package.json @@ -1,6 +1,6 @@ { "name": "@parcnet-js/app-connector", - "version": "1.1.6", + "version": "1.1.7", "license": "GPL-3.0-or-later", "type": "module", "main": "dist/index.cjs", diff --git a/packages/app-connector/src/adapters/iframe.ts b/packages/app-connector/src/adapters/iframe.ts index 0d92582..939847a 100644 --- a/packages/app-connector/src/adapters/iframe.ts +++ b/packages/app-connector/src/adapters/iframe.ts @@ -27,7 +27,7 @@ class DialogControllerImpl implements DialogController { } public close(): void { - this.#dialog.close(); + this.#dialog.close("REMOTELY_CLOSED"); } } @@ -77,8 +77,10 @@ export function connect( } }); - dialog.addEventListener("close", () => { - emitter.emit("close"); + dialog.addEventListener("close", (ev: Event) => { + if ((ev.target as HTMLDialogElement)?.returnValue !== "REMOTELY_CLOSED") { + emitter.emit("close"); + } }); // Add a backdrop to the dialog