openapi-explorer 0.9.331 → 0.9.333

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.
@@ -133,9 +133,9 @@ export default class OpenApiExplorer extends LitElement {
133
133
  type: String,
134
134
  attribute: 'show-server-selection'
135
135
  },
136
- showComponents: {
137
- type: String,
138
- attribute: 'show-components'
136
+ hideComponents: {
137
+ type: Boolean,
138
+ attribute: 'hide-components'
139
139
  },
140
140
  // Main Colors and Font
141
141
  primaryColor: {
@@ -317,10 +317,6 @@ export default class OpenApiExplorer extends LitElement {
317
317
  this.allowAuthentication = 'true';
318
318
  }
319
319
 
320
- if (!this.showComponents || !'true false'.includes(this.showComponents)) {
321
- this.showComponents = 'true';
322
- }
323
-
324
320
  if (!this.fetchCredentials || !'omit, same-origin, include,'.includes(`${this.fetchCredentials},`)) {
325
321
  this.fetchCredentials = '';
326
322
  }
@@ -47,7 +47,7 @@ export default function focusedEndpointTemplate() {
47
47
  focusedTemplate = serverTemplate.call(this);
48
48
  } else if (focusElId === 'section') {
49
49
  focusedTemplate = html` <section id="section" class="observe-me"> <slot name="custom-section"></slot> </section>`;
50
- } else if (focusElId.startsWith('cmp--') && this.showComponents === 'true') {
50
+ } else if (focusElId.startsWith('cmp--') && !this.hideComponents) {
51
51
  focusedTemplate = componentsTemplate.call(this);
52
52
  } else if (focusElId.startsWith('tag--')) {
53
53
  const idToFocus = focusElId.indexOf('--', 4) > 0 ? focusElId.substring(0, focusElId.indexOf('--', 5)) : focusElId;
@@ -41,6 +41,6 @@ export default function navbarTemplate() {
41
41
  return true;
42
42
  }).map(p => html` <div class="nav-bar-path ${this.usePathInNavBar === 'true' ? 'small-font' : ''}" data-content-id="${p.elementId}" id="link-${p.elementId}" @click="${e => {
43
43
  this.scrollToEventTarget(e, false);
44
- }}"> <span style="line-break:anywhere;${p.deprecated ? 'filter:opacity(0.5)' : ''}"> ${this.usePathInNavBar === 'true' ? html`<span class="mono-font">${p.method.toUpperCase()} ${p.path}</span>` : p.summary || p.shortSummary} ${p.isWebhook ? '(Webhook)' : ''} </span> </div>`)} </div> </div> </slot> `)} ${this.resolvedSpec.components && this.showComponents === 'true' ? html` <div class="sticky-scroll-element"> <div id="link-components" class="nav-bar-section"> <div class="nav-bar-section-title">COMPONENTS</div> </div> </div> ${this.resolvedSpec.components.map(component => component.subComponents.filter(s => s.expanded).length ? html` <div class="nav-bar-tag" data-content-id="cmp--${component.name.toLowerCase()}" id="link-cmp--${component.name.toLowerCase()}" @click="${e => this.scrollToEventTarget(e, false)}"> ${component.name} </div> ${component.subComponents.filter(s => s.expanded).map(p => html` <div class="nav-bar-path" data-content-id="cmp--${p.id}" id="link-cmp--${p.id}" @click="${e => this.scrollToEventTarget(e, false)}"> <span> ${p.name} </span> </div>`)}` : '')}` : ''} </nav>`} </nav> `;
44
+ }}"> <span style="line-break:anywhere;${p.deprecated ? 'filter:opacity(0.5)' : ''}"> ${this.usePathInNavBar === 'true' ? html`<span class="mono-font">${p.method.toUpperCase()} ${p.path}</span>` : p.summary || p.shortSummary} ${p.isWebhook ? '(Webhook)' : ''} </span> </div>`)} </div> </div> </slot> `)} ${this.resolvedSpec.components && !this.hideComponents ? html` <div class="sticky-scroll-element"> <div id="link-components" class="nav-bar-section"> <div class="nav-bar-section-title">COMPONENTS</div> </div> </div> ${this.resolvedSpec.components.map(component => component.subComponents.filter(s => s.expanded).length ? html` <div class="nav-bar-tag" data-content-id="cmp--${component.name.toLowerCase()}" id="link-cmp--${component.name.toLowerCase()}" @click="${e => this.scrollToEventTarget(e, false)}"> ${component.name} </div> ${component.subComponents.filter(s => s.expanded).map(p => html` <div class="nav-bar-path" data-content-id="cmp--${p.id}" id="link-cmp--${p.id}" @click="${e => this.scrollToEventTarget(e, false)}"> <span> ${p.name} </span> </div>`)}` : '')}` : ''} </nav>`} </nav> `;
45
45
  }
46
46
  /* eslint-enable indent */
@@ -169,9 +169,9 @@ class OpenApiExplorer extends _litElement.LitElement {
169
169
  type: String,
170
170
  attribute: 'show-server-selection'
171
171
  },
172
- showComponents: {
173
- type: String,
174
- attribute: 'show-components'
172
+ hideComponents: {
173
+ type: Boolean,
174
+ attribute: 'hide-components'
175
175
  },
176
176
  // Main Colors and Font
177
177
  primaryColor: {
@@ -353,10 +353,6 @@ class OpenApiExplorer extends _litElement.LitElement {
353
353
  this.allowAuthentication = 'true';
354
354
  }
355
355
 
356
- if (!this.showComponents || !'true false'.includes(this.showComponents)) {
357
- this.showComponents = 'true';
358
- }
359
-
360
356
  if (!this.fetchCredentials || !'omit, same-origin, include,'.includes(`${this.fetchCredentials},`)) {
361
357
  this.fetchCredentials = '';
362
358
  }
@@ -61,7 +61,7 @@ function focusedEndpointTemplate() {
61
61
  focusedTemplate = _serverTemplate.default.call(this);
62
62
  } else if (focusElId === 'section') {
63
63
  focusedTemplate = (0, _litElement.html)` <section id="section" class="observe-me"> <slot name="custom-section"></slot> </section>`;
64
- } else if (focusElId.startsWith('cmp--') && this.showComponents === 'true') {
64
+ } else if (focusElId.startsWith('cmp--') && !this.hideComponents) {
65
65
  focusedTemplate = _componentsTemplate.default.call(this);
66
66
  } else if (focusElId.startsWith('tag--')) {
67
67
  const idToFocus = focusElId.indexOf('--', 4) > 0 ? focusElId.substring(0, focusElId.indexOf('--', 5)) : focusElId;
@@ -49,6 +49,6 @@ function navbarTemplate() {
49
49
  return true;
50
50
  }).map(p => (0, _litElement.html)` <div class="nav-bar-path ${this.usePathInNavBar === 'true' ? 'small-font' : ''}" data-content-id="${p.elementId}" id="link-${p.elementId}" @click="${e => {
51
51
  this.scrollToEventTarget(e, false);
52
- }}"> <span style="line-break:anywhere;${p.deprecated ? 'filter:opacity(0.5)' : ''}"> ${this.usePathInNavBar === 'true' ? (0, _litElement.html)`<span class="mono-font">${p.method.toUpperCase()} ${p.path}</span>` : p.summary || p.shortSummary} ${p.isWebhook ? '(Webhook)' : ''} </span> </div>`)} </div> </div> </slot> `)} ${this.resolvedSpec.components && this.showComponents === 'true' ? (0, _litElement.html)` <div class="sticky-scroll-element"> <div id="link-components" class="nav-bar-section"> <div class="nav-bar-section-title">COMPONENTS</div> </div> </div> ${this.resolvedSpec.components.map(component => component.subComponents.filter(s => s.expanded).length ? (0, _litElement.html)` <div class="nav-bar-tag" data-content-id="cmp--${component.name.toLowerCase()}" id="link-cmp--${component.name.toLowerCase()}" @click="${e => this.scrollToEventTarget(e, false)}"> ${component.name} </div> ${component.subComponents.filter(s => s.expanded).map(p => (0, _litElement.html)` <div class="nav-bar-path" data-content-id="cmp--${p.id}" id="link-cmp--${p.id}" @click="${e => this.scrollToEventTarget(e, false)}"> <span> ${p.name} </span> </div>`)}` : '')}` : ''} </nav>`} </nav> `;
52
+ }}"> <span style="line-break:anywhere;${p.deprecated ? 'filter:opacity(0.5)' : ''}"> ${this.usePathInNavBar === 'true' ? (0, _litElement.html)`<span class="mono-font">${p.method.toUpperCase()} ${p.path}</span>` : p.summary || p.shortSummary} ${p.isWebhook ? '(Webhook)' : ''} </span> </div>`)} </div> </div> </slot> `)} ${this.resolvedSpec.components && !this.hideComponents ? (0, _litElement.html)` <div class="sticky-scroll-element"> <div id="link-components" class="nav-bar-section"> <div class="nav-bar-section-title">COMPONENTS</div> </div> </div> ${this.resolvedSpec.components.map(component => component.subComponents.filter(s => s.expanded).length ? (0, _litElement.html)` <div class="nav-bar-tag" data-content-id="cmp--${component.name.toLowerCase()}" id="link-cmp--${component.name.toLowerCase()}" @click="${e => this.scrollToEventTarget(e, false)}"> ${component.name} </div> ${component.subComponents.filter(s => s.expanded).map(p => (0, _litElement.html)` <div class="nav-bar-path" data-content-id="cmp--${p.id}" id="link-cmp--${p.id}" @click="${e => this.scrollToEventTarget(e, false)}"> <span> ${p.name} </span> </div>`)}` : '')}` : ''} </nav>`} </nav> `;
53
53
  }
54
54
  /* eslint-enable indent */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openapi-explorer",
3
- "version": "0.9.331",
3
+ "version": "0.9.333",
4
4
  "description": "OpenAPI Explorer - API viewer with dynamically generated components, documentation, and interaction console",
5
5
  "author": "Rhosys Developers <developers@rhosys.ch>",
6
6
  "repository": {