@@ -121,7 +121,7 @@ export default class EccUtilsDesignForm extends LitElement {
121121
122122 return html `
123123 < div class ="switch-container " data-testid ="form-switch-parent ">
124- ${ field . fieldOptions ?. tooltip && field . fieldOptions . tooltip !== ""
124+ ${ field . fieldOptions ?. tooltip ?. trim ( )
125125 ? html `
126126 < sl-tooltip
127127 content =${ field . fieldOptions ?. tooltip }
@@ -222,7 +222,7 @@ export default class EccUtilsDesignForm extends LitElement {
222222 if ( field . type === "file" ) {
223223 return html `
224224 < div class ="file-container " data-testid ="form-input-file-parent ">
225- ${ field . fieldOptions ?. tooltip && field . fieldOptions . tooltip !== ""
225+ ${ field . fieldOptions ?. tooltip ?. trim ( )
226226 ? html `
227227 < sl-tooltip
228228 id =${ field . key }
@@ -239,43 +239,45 @@ export default class EccUtilsDesignForm extends LitElement {
239239 ${ field . label } ${ field . fieldOptions ?. required ? "*" : "" }
240240 </ label >
241241 ` }
242- ${ field . fileOptions ?. protocol === "tus" &&
243- html `
244- < input
245- type ="file "
246- class ="file-input "
247- @change =${ async ( e : Event ) => {
248- await this . handleTusFileUpload ( e , field ) ;
249- } }
250- / >
251- < div class ="progress-bar-container ">
252- < div
253- class ="progress-bar "
254- style ="width: ${ this . uploadPercentage } %; "
255- > </ div >
256- </ div >
257- < div class ="upload-percentage ">
258- ${ this . uploadPercentage . toFixed ( 2 ) } %
259- </ div >
260- ` }
261- ${ ( ! field . fileOptions ?. protocol ||
262- field . fileOptions ?. protocol === "native" ) &&
263- html `
264- < input
265- class ="file-input "
266- type ="file "
267- data-label =${ field . label }
268- data-testid ="form-input-file"
269- accept=${ field . fieldOptions ?. accept || "*" }
270- ?multiple=${ field . fieldOptions ?. multiple }
271- ?required=${ field . fieldOptions ?. required }
272- @change=${ async ( e : Event ) => {
273- const { files } = e . target as HTMLInputElement ;
274- _ . set ( this . form , path , files ) ;
275- this . requestUpdate ( ) ;
276- } }
277- />
278- ` }
242+ ${ field . fileOptions ?. protocol === "tus"
243+ ? html `
244+ < input
245+ type ="file "
246+ class ="file-input "
247+ @change =${ async ( e : Event ) => {
248+ await this . handleTusFileUpload ( e , field ) ;
249+ } }
250+ / >
251+ < div class ="progress-bar-container ">
252+ < div
253+ class ="progress-bar "
254+ style ="width: ${ this . uploadPercentage } %; "
255+ > </ div >
256+ </ div >
257+ < div class ="upload-percentage ">
258+ ${ this . uploadPercentage . toFixed ( 2 ) } %
259+ </ div >
260+ `
261+ : "" }
262+ ${ ! field . fileOptions ?. protocol ||
263+ field . fileOptions ?. protocol === "native"
264+ ? html `
265+ < input
266+ class ="file-input "
267+ type ="file "
268+ data-label =${ field . label }
269+ data-testid ="form-input-file"
270+ accept=${ field . fieldOptions ?. accept || "*" }
271+ ?multiple=${ field . fieldOptions ?. multiple }
272+ ?required=${ field . fieldOptions ?. required }
273+ @change=${ async ( e : Event ) => {
274+ const { files } = e . target as HTMLInputElement ;
275+ _ . set ( this . form , path , files ) ;
276+ this . requestUpdate ( ) ;
277+ } }
278+ />
279+ `
280+ : "" }
279281 </ div >
280282 ` ;
281283 }
@@ -292,7 +294,7 @@ export default class EccUtilsDesignForm extends LitElement {
292294 if ( field . type === "select" ) {
293295 return html `
294296 < div class ="select-container ">
295- ${ field . fieldOptions ?. tooltip && field . fieldOptions . tooltip !== ""
297+ ${ field . fieldOptions ?. tooltip ?. trim ( )
296298 ? html `
297299 < sl-tooltip
298300 id =${ field . key }
@@ -352,7 +354,7 @@ export default class EccUtilsDesignForm extends LitElement {
352354 } }
353355 >
354356 < label slot ="label ">
355- ${ field . fieldOptions ?. tooltip && field . fieldOptions . tooltip !== ""
357+ ${ field . fieldOptions ?. tooltip ?. trim ( )
356358 ? html `
357359 < sl-tooltip content =${ field . fieldOptions ?. tooltip } data-testid ="form-tooltip" >
358360 < label data-testid ="form-label " > ${ field . label } </ label >
@@ -394,7 +396,7 @@ export default class EccUtilsDesignForm extends LitElement {
394396 return html `
395397 < div class ="array-container ">
396398 < div class ="array-header ">
397- ${ field . fieldOptions ?. tooltip && field . fieldOptions . tooltip !== ""
399+ ${ field . fieldOptions ?. tooltip ?. trim ( )
398400 ? html `
399401 < sl-tooltip
400402 content =${ field . fieldOptions ?. tooltip }
@@ -509,7 +511,7 @@ export default class EccUtilsDesignForm extends LitElement {
509511 </ sl-details > `
510512 : html `
511513 < div data-testid ="form-group-non-collapsible " class ="group-header ">
512- ${ field . fieldOptions ?. tooltip && field . fieldOptions . tooltip !== ""
514+ ${ field . fieldOptions ?. tooltip ?. trim ( )
513515 ? html `
514516 < sl-tooltip
515517 content =${ field . fieldOptions ?. tooltip }
0 commit comments