openapi-explorer 2.2.737 → 2.2.739

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.
@@ -3,7 +3,7 @@ import { unsafeHTML } from 'lit/directives/unsafe-html.js';
3
3
  import { toMarkdown } from '../utils/common-utils.js';
4
4
  import base64url from 'base64url';
5
5
  import { getI18nText } from '../languages/index.js';
6
- function onApiKeyChange(apiKeyId, e) {
6
+ function onUserEnteredNewApiKeyValue(apiKeyId, e) {
7
7
  e.preventDefault();
8
8
  let apiKeyValue = '';
9
9
  const securityObj = this.resolvedSpec.securitySchemes.find(v => v.apiKeyId === apiKeyId);
@@ -263,7 +263,7 @@ function renderSecurityScheme(v) {
263
263
  if (v.type.toLowerCase() === 'apikey' || v.type.toLowerCase() === 'http' && v.scheme && v.scheme.toLowerCase() === 'bearer') {
264
264
  var _v$bearerFormat, _v$bearerFormat2;
265
265
  return html` <style>code{font-weight:700}</style> <div style="padding-top:1rem"> ${v.type.toLowerCase() === 'apikey' ? html`Sends <code>${v.name || 'API key'}</code> in <code>${v.in || 'the request'}</code> with the given value:` : html`Sends the <code>Authorization header</code> containing the token type <code style="text-transform:capitalize">${v.scheme || 'bearer'}</code> followed by the <code>${(_v$bearerFormat = v.bearerFormat) !== null && _v$bearerFormat !== void 0 ? _v$bearerFormat : 'Token'}</code> string.`} </div> <form style="height:50px;margin-top:1rem;padding:10px 0;margin-bottom:10px"> ${v.in === 'cookie' ? html` <div style="display:block"> <input type="text" value="${getCookieValue(v.apiKeyId)}" disabled="disabled" class="api-key-input" placeholder="IygRVGf54B59e0GAkKmigGfuiVlp/uhFfk2ifA+jMMJzau2F1jPldc09gPTfnMw13BFBxqUZIFDm55DPfwkb0A==" spellcheck="false" style="resize:horizontal;width:100%"> <br> <small> <strong>Cookies</strong>&nbsp;are set and configured by the remote service, therefore it is not possible to configure them from the browser. </small> </div>` : !v.finalKeyValue ? html` <input autocomplete="on" name="api-key" type="text" value="${v.value}" placeholder="${(_v$bearerFormat2 = v.bearerFormat) !== null && _v$bearerFormat2 !== void 0 ? _v$bearerFormat2 : 'api-token'}" spellcheck="false" class="api-key-input fs-exclude ph-no-capture" data-hj-suppress data-sl="mask"> <button type="submit" class="m-btn thin-border" style="margin-left:5px" part="btn btn-outline" @click="${e => {
266
- onApiKeyChange.call(this, v.apiKeyId, e);
266
+ onUserEnteredNewApiKeyValue.call(this, v.apiKeyId, e);
267
267
  }}"> ${getI18nText('authentication.set')} </button>` : html`<span class="blue-text" style="margin-right:1rem">Key Applied</span> <button class="m-btn thin-border small" part="btn btn-outline" @click="${() => {
268
268
  v.finalKeyValue = '';
269
269
  this.requestUpdate();
@@ -277,7 +277,7 @@ function renderSecurityScheme(v) {
277
277
  }}">REMOVE</button> </div>`;
278
278
  }
279
279
  return html` <style>code{font-weight:700}</style> <div style="padding-top:1rem">${unsafeHTML(getI18nText('authentication.http-basic-desc'))}</div> <div style="height:50px;margin-top:1rem;padding:10px 0;margin-bottom:10px"> <form style="display:flex"> <input autocomplete="on" name="api-key-user" type="text" value="${v.user}" placeholder="${getI18nText('authentication.username')}" spellcheck="false" class="api-key-user" style="width:100px"> <input autocomplete="on" name="api-key-password" class="api-key-password fs-exclude ph-no-capture" data-hj-suppress data-sl="mask" type="password" value="${v.password}" placeholder="${getI18nText('authentication.password')}" spellcheck="false" style="width:100px;margin:0 5px"> <button type="submit" class="m-btn thin-border" @click="${e => {
280
- onApiKeyChange.call(this, v.apiKeyId, e);
280
+ onUserEnteredNewApiKeyValue.call(this, v.apiKeyId, e);
281
281
  }}" part="btn btn-outline"> ${v.finalKeyValue ? 'UPDATE' : getI18nText('authentication.set')} </button> </form> </div>`;
282
282
  }
283
283
  if (v.type.toLowerCase() === 'oauth2' && Object.keys(v.flows).length) {
@@ -10,7 +10,7 @@ var _commonUtils = require("../utils/common-utils.js");
10
10
  var _base64url = _interopRequireDefault(require("base64url"));
11
11
  var _index = require("../languages/index.js");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
- function onApiKeyChange(apiKeyId, e) {
13
+ function onUserEnteredNewApiKeyValue(apiKeyId, e) {
14
14
  e.preventDefault();
15
15
  let apiKeyValue = '';
16
16
  const securityObj = this.resolvedSpec.securitySchemes.find(v => v.apiKeyId === apiKeyId);
@@ -270,7 +270,7 @@ function renderSecurityScheme(v) {
270
270
  if (v.type.toLowerCase() === 'apikey' || v.type.toLowerCase() === 'http' && v.scheme && v.scheme.toLowerCase() === 'bearer') {
271
271
  var _v$bearerFormat, _v$bearerFormat2;
272
272
  return (0, _lit.html)` <style>code{font-weight:700}</style> <div style="padding-top:1rem"> ${v.type.toLowerCase() === 'apikey' ? (0, _lit.html)`Sends <code>${v.name || 'API key'}</code> in <code>${v.in || 'the request'}</code> with the given value:` : (0, _lit.html)`Sends the <code>Authorization header</code> containing the token type <code style="text-transform:capitalize">${v.scheme || 'bearer'}</code> followed by the <code>${(_v$bearerFormat = v.bearerFormat) !== null && _v$bearerFormat !== void 0 ? _v$bearerFormat : 'Token'}</code> string.`} </div> <form style="height:50px;margin-top:1rem;padding:10px 0;margin-bottom:10px"> ${v.in === 'cookie' ? (0, _lit.html)` <div style="display:block"> <input type="text" value="${getCookieValue(v.apiKeyId)}" disabled="disabled" class="api-key-input" placeholder="IygRVGf54B59e0GAkKmigGfuiVlp/uhFfk2ifA+jMMJzau2F1jPldc09gPTfnMw13BFBxqUZIFDm55DPfwkb0A==" spellcheck="false" style="resize:horizontal;width:100%"> <br> <small> <strong>Cookies</strong>&nbsp;are set and configured by the remote service, therefore it is not possible to configure them from the browser. </small> </div>` : !v.finalKeyValue ? (0, _lit.html)` <input autocomplete="on" name="api-key" type="text" value="${v.value}" placeholder="${(_v$bearerFormat2 = v.bearerFormat) !== null && _v$bearerFormat2 !== void 0 ? _v$bearerFormat2 : 'api-token'}" spellcheck="false" class="api-key-input fs-exclude ph-no-capture" data-hj-suppress data-sl="mask"> <button type="submit" class="m-btn thin-border" style="margin-left:5px" part="btn btn-outline" @click="${e => {
273
- onApiKeyChange.call(this, v.apiKeyId, e);
273
+ onUserEnteredNewApiKeyValue.call(this, v.apiKeyId, e);
274
274
  }}"> ${(0, _index.getI18nText)('authentication.set')} </button>` : (0, _lit.html)`<span class="blue-text" style="margin-right:1rem">Key Applied</span> <button class="m-btn thin-border small" part="btn btn-outline" @click="${() => {
275
275
  v.finalKeyValue = '';
276
276
  this.requestUpdate();
@@ -284,7 +284,7 @@ function renderSecurityScheme(v) {
284
284
  }}">REMOVE</button> </div>`;
285
285
  }
286
286
  return (0, _lit.html)` <style>code{font-weight:700}</style> <div style="padding-top:1rem">${(0, _unsafeHtml.unsafeHTML)((0, _index.getI18nText)('authentication.http-basic-desc'))}</div> <div style="height:50px;margin-top:1rem;padding:10px 0;margin-bottom:10px"> <form style="display:flex"> <input autocomplete="on" name="api-key-user" type="text" value="${v.user}" placeholder="${(0, _index.getI18nText)('authentication.username')}" spellcheck="false" class="api-key-user" style="width:100px"> <input autocomplete="on" name="api-key-password" class="api-key-password fs-exclude ph-no-capture" data-hj-suppress data-sl="mask" type="password" value="${v.password}" placeholder="${(0, _index.getI18nText)('authentication.password')}" spellcheck="false" style="width:100px;margin:0 5px"> <button type="submit" class="m-btn thin-border" @click="${e => {
287
- onApiKeyChange.call(this, v.apiKeyId, e);
287
+ onUserEnteredNewApiKeyValue.call(this, v.apiKeyId, e);
288
288
  }}" part="btn btn-outline"> ${v.finalKeyValue ? 'UPDATE' : (0, _index.getI18nText)('authentication.set')} </button> </form> </div>`;
289
289
  }
290
290
  if (v.type.toLowerCase() === 'oauth2' && Object.keys(v.flows).length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openapi-explorer",
3
- "version": "2.2.737",
3
+ "version": "2.2.739",
4
4
  "description": "OpenAPI Explorer - API viewer with dynamically generated components, documentation, and interaction console",
5
5
  "author": "Authress Developers <developers@authress.io>",
6
6
  "type": "module",