@@ -43,6 +43,10 @@ export class ApiSummary extends AmfHelperMixin(LitElement) {
4343 * @default 2
4444 */
4545 titleLevel : { type : String } ,
46+ /**
47+ * A property to hide the table of contents list of endpoints.
48+ */
49+ hideToc : { type : Boolean } ,
4650
4751 _providerName : { type : String } ,
4852 _providerEmail : { type : String } ,
@@ -99,6 +103,7 @@ export class ApiSummary extends AmfHelperMixin(LitElement) {
99103 * @type {string[] }
100104 */
101105 this . protocols = undefined ;
106+ this . hideToc = false ;
102107 }
103108
104109 __amfChanged ( ) {
@@ -321,7 +326,7 @@ export class ApiSummary extends AmfHelperMixin(LitElement) {
321326 ${ this . _termsOfServiceTemplate ( ) }
322327 </ div >
323328
324- ${ this . _endpointsTemplate ( ) }
329+ ${ this . hideToc ? '' : this . _endpointsTemplate ( ) }
325330 ` ;
326331 }
327332
@@ -331,8 +336,8 @@ export class ApiSummary extends AmfHelperMixin(LitElement) {
331336 return '' ;
332337 }
333338 return html `
334- < div class ="api-title " role ="heading " aria-level ="${ titleLevel } ">
335- < label > API title:</ label >
339+ < div class ="api-title " role ="heading " aria-level ="${ titleLevel } " part =" api-title " >
340+ < label part =" api-title-label " > API title:</ label >
336341 < span > ${ _apiTitle } </ span >
337342 </ div > ` ;
338343 }
@@ -343,7 +348,7 @@ export class ApiSummary extends AmfHelperMixin(LitElement) {
343348 return '' ;
344349 }
345350 return html `
346- < p class ="inline-description version ">
351+ < p class ="inline-description version " part =" api-version " >
347352 < label > Version:</ label >
348353 < span > ${ _version } </ span >
349354 </ p > ` ;
@@ -355,7 +360,7 @@ export class ApiSummary extends AmfHelperMixin(LitElement) {
355360 return '' ;
356361 }
357362 return html `
358- < div role ="region " class ="marked-description ">
363+ < div role ="region " class ="marked-description " part =" marked-description " >
359364 < arc-marked .markdown ="${ _description } " sanitize >
360365 < div slot ="markdown-html " class ="markdown-body "> </ div >
361366 </ arc-marked >
@@ -427,16 +432,16 @@ export class ApiSummary extends AmfHelperMixin(LitElement) {
427432 `<a href="${ _providerUrl } " target="_blank" class="app-link provider-url">${ _providerUrl } </a>` ,
428433 ) : undefined ;
429434 return html `
430- < section role ="contentinfo " class ="docs-section ">
435+ < section role ="contentinfo " class ="docs-section " part =" info-section " >
431436 < label class ="section "> Contact information</ label >
432- < p class ="inline-description ">
437+ < p class ="inline-description " part =" info-inline-desc " >
433438 < span class ="provider-name "> ${ _providerName } </ span >
434439 ${ _providerEmail ? html `< a
435440 class ="app-link link-padding provider-email "
436441 href ="mailto: ${ _providerEmail } "> ${ _providerEmail } </ a > ` : '' }
437442 </ p >
438443 ${ _providerUrl ? html `
439- < p class ="inline-description ">
444+ < p class ="inline-description " part =" info-inline-desc " >
440445 ${ unsafeHTML ( link ) }
441446 </ p > ` : '' }
442447 </ section > ` ;
@@ -451,7 +456,7 @@ export class ApiSummary extends AmfHelperMixin(LitElement) {
451456 `<a href="${ _licenseUrl } " target="_blank" class="app-link">${ _licenseName } </a>` ,
452457 ) ;
453458 return html `
454- < section aria-labelledby ="licenseLabel " class ="docs-section ">
459+ < section aria-labelledby ="licenseLabel " class ="docs-section " part =" license-section " >
455460 < label class ="section " id ="licenseLabel "> License</ label >
456461 < p class ="inline-description ">
457462 ${ unsafeHTML ( link ) }
@@ -481,8 +486,8 @@ export class ApiSummary extends AmfHelperMixin(LitElement) {
481486 const result = _endpoints . map ( ( item ) => this . _endpointTemplate ( item ) ) ;
482487 const pathLabel = this . _isAsyncAPI ( this . amf ) ? 'channels' : 'endpoints' ;
483488 return html `
484- < div class ="separator "> </ div >
485- < div class ="toc ">
489+ < div class ="separator " part =" separator " > </ div >
490+ < div class ="toc " part =" toc " >
486491 < label class ="section endpoints-title "> API ${ pathLabel } </ label >
487492 ${ result }
488493 </ div >
0 commit comments