@@ -438,19 +438,19 @@ export default class ApiRequest extends LitElement {
438
438
</ tag-input > `
439
439
: paramSchema . type === 'object'
440
440
? html `
441
- < div class ="tab-panel col " style ="border-width:0 0 1px 0; ">
442
- < div class ="tab-buttons row " @click ="${ ( e ) => {
441
+ < div part =" tab-panel " class ="tab-panel col " style ="border-width:0 0 1px 0; ">
442
+ < div part =" tab-btn-row " class ="tab-buttons row " @click ="${ ( e ) => {
443
443
if ( e . target . tagName . toLowerCase ( ) === 'button' ) {
444
444
const newState = { ...this . activeParameterSchemaTabs } ;
445
445
newState [ param . name ] = e . target . dataset . tab ;
446
446
this . activeParameterSchemaTabs = newState ;
447
447
}
448
448
} } ">
449
- < button class ="tab-btn ${ this . activeParameterSchemaTabs [ param . name ] === 'example' ? 'active' : '' } " data-tab = 'example '> EXAMPLE </ button >
450
- < button class ="tab-btn ${ this . activeParameterSchemaTabs [ param . name ] !== 'example' ? 'active' : '' } " data-tab = 'schema '> SCHEMA</ button >
449
+ < button part =" tab-btn " class ="tab-btn ${ this . activeParameterSchemaTabs [ param . name ] === 'example' ? 'active' : '' } " data-tab = 'example '> EXAMPLE </ button >
450
+ < button part =" tab-btn " class ="tab-btn ${ this . activeParameterSchemaTabs [ param . name ] !== 'example' ? 'active' : '' } " data-tab = 'schema '> SCHEMA</ button >
451
451
</ div >
452
452
453
- ${ html `< div class ="tab-content col " data-tab = 'example ' style ="display:${ this . activeParameterSchemaTabs [ param . name ] === 'example' ? 'block' : 'none' } ; padding-left:5px; width:100% ">
453
+ ${ html `< div part =" tab-content " class ="tab-content col " data-tab = 'example ' style ="display:${ this . activeParameterSchemaTabs [ param . name ] === 'example' ? 'block' : 'none' } ; padding-left:5px; width:100% ">
454
454
< textarea
455
455
id = "textarea-request-param- ${ param . name } "
456
456
class = "textarea request-param "
@@ -472,7 +472,7 @@ export default class ApiRequest extends LitElement {
472
472
> </ textarea >
473
473
</ div > `
474
474
}
475
- ${ html `< div class ="tab-content col " data-tab = 'schema ' style ="display:${ this . activeParameterSchemaTabs [ param . name ] !== 'example' ? 'block' : 'none' } ; padding-left:5px; width:100%; ">
475
+ ${ html `< div part =" tab-content " class ="tab-content col " data-tab = 'schema ' style ="display:${ this . activeParameterSchemaTabs [ param . name ] !== 'example' ? 'block' : 'none' } ; padding-left:5px; width:100%; ">
476
476
< schema-tree
477
477
class = 'json '
478
478
style = 'display: block '
@@ -790,13 +790,13 @@ export default class ApiRequest extends LitElement {
790
790
791
791
${ ( this . selectedRequestBodyType . includes ( 'json' ) || this . selectedRequestBodyType . includes ( 'xml' ) || this . selectedRequestBodyType . includes ( 'text' ) || this . selectedRequestBodyType . includes ( 'jose' ) )
792
792
? html `
793
- < div class ="tab-panel col " style ="border-width:0 0 1px 0; ">
794
- < div class ="tab-buttons row " @click ="${ ( e ) => { if ( e . target . tagName . toLowerCase ( ) === 'button' ) { this . activeSchemaTab = e . target . dataset . tab ; } } } ">
795
- < button class ="tab-btn ${ this . activeSchemaTab === 'example' ? 'active' : '' } " data-tab = 'example '> EXAMPLE</ button >
796
- < button class ="tab-btn ${ this . activeSchemaTab !== 'example' ? 'active' : '' } " data-tab = 'schema '> SCHEMA</ button >
793
+ < div part =" tab-panel " class ="tab-panel col " style ="border-width:0 0 1px 0; ">
794
+ < div part =" tab-btn-row " class ="tab-buttons row " @click ="${ ( e ) => { if ( e . target . tagName . toLowerCase ( ) === 'button' ) { this . activeSchemaTab = e . target . dataset . tab ; } } } ">
795
+ < button part =" tab-btn " class ="tab-btn ${ this . activeSchemaTab === 'example' ? 'active' : '' } " data-tab = 'example '> EXAMPLE</ button >
796
+ < button part =" tab-btn " class ="tab-btn ${ this . activeSchemaTab !== 'example' ? 'active' : '' } " data-tab = 'schema '> SCHEMA</ button >
797
797
</ div >
798
- ${ html `< div class ="tab-content col " style ="display:${ this . activeSchemaTab === 'example' ? 'block' : 'none' } ; "> ${ reqBodyExampleHtml } </ div > ` }
799
- ${ html `< div class ="tab-content col " style ="display:${ this . activeSchemaTab === 'example' ? 'none' : 'block' } ; "> ${ reqBodySchemaHtml } </ div > ` }
798
+ ${ html `< div part =" tab-content " class ="tab-content col " style ="display:${ this . activeSchemaTab === 'example' ? 'block' : 'none' } ; "> ${ reqBodyExampleHtml } </ div > ` }
799
+ ${ html `< div part =" tab-content " class ="tab-content col " style ="display:${ this . activeSchemaTab === 'example' ? 'none' : 'block' } ; "> ${ reqBodySchemaHtml } </ div > ` }
800
800
</ div > `
801
801
: html `
802
802
${ reqBodyFileInputHtml }
@@ -821,7 +821,7 @@ export default class ApiRequest extends LitElement {
821
821
) ;
822
822
823
823
return html `
824
- < div class ="tab-panel row " style ="min-height:220px; border-left: 6px solid var(--light-border-color); align-items: stretch; ">
824
+ < div part =" tab-panel " class ="tab-panel row " style ="min-height:220px; border-left: 6px solid var(--light-border-color); align-items: stretch; ">
825
825
< div style ="width:24px; background-color:var(--light-border-color) ">
826
826
< div class ="row " style ="flex-direction:row-reverse; width:160px; height:24px; transform:rotate(270deg) translateX(-160px); transform-origin:top left; display:block; " @click ="${ ( e ) => {
827
827
if ( e . target . classList . contains ( 'v-tab-btn' ) ) {
@@ -1055,20 +1055,20 @@ export default class ApiRequest extends LitElement {
1055
1055
< div style ="flex:1 "> </ div >
1056
1056
< button class ="m-btn " part ="btn btn-outline btn-clear-response " @click ="${ this . clearResponseData } "> CLEAR RESPONSE</ button >
1057
1057
</ div >
1058
- < div class ="tab-panel col " style ="border-width:0 0 1px 0; ">
1059
- < div id ="tab_buttons " class ="tab-buttons row " @click ="${ ( e ) => {
1058
+ < div part =" tab-panel " class ="tab-panel col " style ="border-width:0 0 1px 0; ">
1059
+ < div id ="tab_buttons " part =" tab-btn-row " class ="tab-buttons row " @click ="${ ( e ) => {
1060
1060
if ( e . target . classList . contains ( 'tab-btn' ) === false ) { return ; }
1061
1061
this . activeResponseTab = e . target . dataset . tab ;
1062
1062
} } ">
1063
- < button class ="tab-btn ${ this . activeResponseTab === 'response' ? 'active' : '' } " data-tab = 'response ' > RESPONSE</ button >
1064
- < button class ="tab-btn ${ this . activeResponseTab === 'headers' ? 'active' : '' } " data-tab = 'headers ' > RESPONSE HEADERS</ button >
1063
+ < button part =" tab-btn " class ="tab-btn ${ this . activeResponseTab === 'response' ? 'active' : '' } " data-tab = 'response ' > RESPONSE</ button >
1064
+ < button part =" tab-btn " class ="tab-btn ${ this . activeResponseTab === 'headers' ? 'active' : '' } " data-tab = 'headers ' > RESPONSE HEADERS</ button >
1065
1065
${ this . showCurlBeforeTry === 'true'
1066
1066
? ''
1067
- : html `< button class ="tab-btn ${ this . activeResponseTab === 'curl' ? 'active' : '' } " data-tab = 'curl '> CURL</ button > ` }
1067
+ : html `< button part =" tab-btn " class ="tab-btn ${ this . activeResponseTab === 'curl' ? 'active' : '' } " data-tab = 'curl '> CURL</ button > ` }
1068
1068
</ div >
1069
1069
${ this . responseIsBlob
1070
1070
? html `
1071
- < div class ="tab-content col " style ="flex:1; display:${ this . activeResponseTab === 'response' ? 'flex' : 'none' } ; ">
1071
+ < div part =" tab-content " class ="tab-content col " style ="flex:1; display:${ this . activeResponseTab === 'response' ? 'flex' : 'none' } ; ">
1072
1072
${ this . responseBlobType === 'image'
1073
1073
? html `< img style ="max-height:var(--resp-area-height, 400px); object-fit:contain; " class ="mar-top-8 " src ="${ ifDefined ( this . responseBlobUrl ) } "> </ img > `
1074
1074
: ''
@@ -1082,12 +1082,12 @@ export default class ApiRequest extends LitElement {
1082
1082
}
1083
1083
</ div > `
1084
1084
: html `
1085
- < div class ="tab-content col m-markdown " style ="flex:1; display:${ this . activeResponseTab === 'response' ? 'flex' : 'none' } ; " >
1085
+ < div part =" tab-content " class ="tab-content col m-markdown " style ="flex:1; display:${ this . activeResponseTab === 'response' ? 'flex' : 'none' } ; " >
1086
1086
< button class ="toolbar-btn " style ="position:absolute; top:12px; right:8px " @click ='${ ( e ) => { copyToClipboard ( this . responseText , e ) ; } } ' part ="btn btn-fill "> Copy </ button >
1087
1087
< pre style ="white-space:pre; min-height:50px; height:var(--resp-area-height, 400px); resize:vertical; overflow:auto "> ${ responseContent } </ pre >
1088
1088
</ div > `
1089
1089
}
1090
- < div class ="tab-content col m-markdown " style ="flex:1; display:${ this . activeResponseTab === 'headers' ? 'flex' : 'none' } ; " >
1090
+ < div part =" tab-content " class ="tab-content col m-markdown " style ="flex:1; display:${ this . activeResponseTab === 'headers' ? 'flex' : 'none' } ; " >
1091
1091
< button class ="toolbar-btn " style = "position:absolute; top:12px; right:8px " @click ='${ ( e ) => { copyToClipboard ( this . responseHeaders , e ) ; } } ' part ="btn btn-fill "> Copy </ button >
1092
1092
< pre style ="white-space:pre "> < code > ${ unsafeHTML ( Prism . highlight ( this . responseHeaders , Prism . languages . css , 'css' ) ) } </ code > </ pre >
1093
1093
</ div >
0 commit comments