@@ -24,6 +24,7 @@ export function fieldLabel (dom: HTMLDocument, property: NamedNode | undefined,
2424 return dom . createTextNode ( '@@Internal error: undefined property' )
2525 }
2626 const anchor = dom . createElement ( 'a' )
27+ /* istanbul ignore next */
2728 if ( property . uri ) anchor . setAttribute ( 'href' , property . uri )
2829 anchor . setAttribute ( 'style' , 'color: #3B5998; text-decoration: none;' ) // Not too blue and no underline
2930 anchor . textContent = lab
@@ -103,7 +104,7 @@ export function basicField (
103104 const uri = mostSpecificClassURI ( form )
104105 let params = fieldParams [ uri ]
105106 if ( params === undefined ) params = { } // non-bottom field types can do this
106- const style = params . style || textInputStyle || 'font-size: 100%; margin: 0.1em; padding: 0.1em;'
107+ const style = params . style || textInputStyle
107108 // box.appendChild(dom.createTextNode(' uri='+uri+', pattern='+ params.pattern))
108109 const field = dom . createElement ( 'input' )
109110 ; ( field as any ) . style = textInputStyle // Do we have to override length etc?
@@ -129,6 +130,7 @@ export function basicField (
129130 field . value = decodeURIComponent ( obj . uri . replace ( params . uriPrefix , '' ) ) // should have no spaces but in case
130131 . replace ( / / g, '' )
131132 } else if ( obj ) {
133+ /* istanbul ignore next */
132134 field . value = obj . value || obj . uri || ''
133135 }
134136 field . setAttribute ( 'style' , style )
@@ -178,7 +180,7 @@ export function basicField (
178180 result = new Literal ( field . value )
179181 }
180182 }
181- let is = ds . map ( st => st ( st . subject , st . predicate , result , st . why ) ) // can include >1 doc
183+ let is = ds . map ( statement => st ( statement . subject , statement . predicate , result , statement . why ) ) // can include >1 doc
182184 if ( is . length === 0 ) {
183185 // or none
184186 is = [ st ( subject , property , result , doc as Node ) ]
@@ -190,8 +192,10 @@ export function basicField (
190192 if ( ! docs . includes ( st . why . uri ) ) docs . push ( st . why . uri )
191193 } )
192194 ds . forEach ( st => {
195+ /* istanbul ignore next */
193196 if ( ! docs . includes ( st . why . uri ) ) docs . push ( st . why . uri )
194197 } )
198+ /* istanbul ignore next */
195199 if ( docs . length === 0 ) {
196200 throw new Error ( 'updateMany has no docs to patch' )
197201 }
@@ -209,7 +213,6 @@ export function basicField (
209213 if ( ok ) {
210214 updateMany ( ds2 , is2 , callback )
211215 } else {
212- console . log ( 'Update many failed on: ' + doc )
213216 callback ( uri , ok , body )
214217 }
215218 } )
0 commit comments