From 92cd2811d922112b91b4267f1c90ddfe5388ecf5 Mon Sep 17 00:00:00 2001 From: alexperez Date: Thu, 26 Oct 2023 02:46:09 -0300 Subject: [PATCH 1/2] chore: Editing code while Console is opened changes the MS URL --- src/ApiConsole.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ApiConsole.js b/src/ApiConsole.js index fc3cc73e7..9a7141b75 100644 --- a/src/ApiConsole.js +++ b/src/ApiConsole.js @@ -1,4 +1,3 @@ -/* eslint-disable lit-a11y/click-events-have-key-events */ /** @license Copyright 2018 The Advanced REST client authors @@ -370,6 +369,7 @@ export class ApiConsole extends AmfHelperMixin(LitElement) { super(); this._tryitHandler = this._tryitHandler.bind(this); this._handleServerChange = this._handleServerChange.bind(this); + this._handleSelectionChange = this._handleSelectionChange.bind(this); this.page = 'docs'; this.compatibility = false; @@ -659,6 +659,15 @@ export class ApiConsole extends AmfHelperMixin(LitElement) { this.serverValue = value; } + /** + * Handler for the `apiselectionchange` event dispatched from the components. + * @param {CustomEvent} e + */ + _handleSelectionChange(e) { + const { value } = e.detail; + this.selectedShape = value; + } + render() { return html` ${this._mainContentTemplate()} @@ -769,6 +778,7 @@ export class ApiConsole extends AmfHelperMixin(LitElement) { .eventsTarget="${eventsTarget}" .credentialsSource="${credentialsSource}" ?persistCache="${persistCache}" + @api-request-panel-selection-changed="${this._handleSelectionChange}" > `; From 399f29d2998f8a50248bed40a40d448e44f647c8 Mon Sep 17 00:00:00 2001 From: alexperez Date: Fri, 27 Oct 2023 13:29:01 -0300 Subject: [PATCH 2/2] chore: update api-request --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 68018f615..442ea0b19 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1182,9 +1182,9 @@ } }, "node_modules/@api-components/api-request": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/@api-components/api-request/-/api-request-0.3.7.tgz", - "integrity": "sha512-I/XGWQR8tFVEamfQhz3JOXTYyYGTXOWsxe+AuqLSuGTFn1czlf1Mti5gi6vpmH8pDVkH7zDX1fih3NOWQSXI8w==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@api-components/api-request/-/api-request-0.3.8.tgz", + "integrity": "sha512-HN2YcvnqywFR7+W7SxoDZ6u0tB6Fee9nafIhbgdaUoxvIToXxPpDUEP1iNbpT0+DfXxggG583hSseZPExTwGYw==", "dependencies": { "@advanced-rest-client/arc-events": "^0.2.13", "@advanced-rest-client/arc-headers": "^0.1.7", @@ -24893,9 +24893,9 @@ } }, "@api-components/api-request": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/@api-components/api-request/-/api-request-0.3.7.tgz", - "integrity": "sha512-I/XGWQR8tFVEamfQhz3JOXTYyYGTXOWsxe+AuqLSuGTFn1czlf1Mti5gi6vpmH8pDVkH7zDX1fih3NOWQSXI8w==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@api-components/api-request/-/api-request-0.3.8.tgz", + "integrity": "sha512-HN2YcvnqywFR7+W7SxoDZ6u0tB6Fee9nafIhbgdaUoxvIToXxPpDUEP1iNbpT0+DfXxggG583hSseZPExTwGYw==", "requires": { "@advanced-rest-client/arc-events": "^0.2.13", "@advanced-rest-client/arc-headers": "^0.1.7",