New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

compose-form-up

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

compose-form-up - npm Package Compare versions

Comparing version 1.9.5 to 1.9.6

19

lib/diff.js

@@ -49,7 +49,7 @@ var toolbox = require( 'compose-toolbox' ),

var row = `<tr class='input-diff ${diff['class'] || ''}' data-diff-name='${diff.name}'>`
var row = `<tr class='input-diff ${diff['class'].join(' ')}' data-diff-name='${diff.name}'>`
// Add label and diff note
row += `<td class='input-diff-label'><span>${diff.label}</span>`
if (diff.note) row += ` <span class='diff-note'>${diff.note}</span>`
if (diff.note.length > 0) row += ` <span class='diff-note'>${diff.note.join(' ')}</span>`
row += "</td>"

@@ -65,3 +65,3 @@

row += diffCell( diff.value, 'value' )
row += `<td class='input-diff-undo'><span><button class='form-diff-button' type='button' aria-label='Reset input' data-reset-input='${diff.selector}'>✕</button></span></td>`
row += `<td class='input-diff-undo'><span><button class='form-diff-button' type='button' aria-label='Reset value' data-reset-input='${diff.selector}'>✕</button></span></td>`

@@ -96,5 +96,7 @@ return row + "</tr>"

var diff = {
initial: [],
value: [],
name: [],
initial: [],
value: [],
name: [],
class: [],
note: [],
selector: []

@@ -167,4 +169,5 @@ },

diff.note = input.dataset.diffNote
diff['class'] = input.dataset.diffClass
if(input.dataset.diffNote) diff.note.push(input.dataset.diffNote)
if(input.dataset.diffClass) diff['class'].push(input.dataset.diffClass)
diff.name.push( input.name )

@@ -171,0 +174,0 @@ diff.selector.push( input.dataset.formDiffId )

{
"name": "compose-form-up",
"version": "1.9.5",
"version": "1.9.6",
"description": "A lightweight HTML5 form utility including validation, progressive forms, and other handy tools.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -110,5 +110,10 @@ var u = require('./_utils.js')

await expect( page ).toFill( '#input-2', 'Banana' )
await expect( page ).toFill( '#multi-input-note-2', 'GB' )
await u.wait(110)
// Use the classname from data-diff-class
await u.matchText( '.kraken .input-diff-label .diff-note', '(Beware the Kraken!)' )
// This proves that setting the secondary input under a label shows the notes for all inputs
await u.matchText( '[data-diff-name*=multi-input-note-1] .diff-note', '*causes restart' )
})

@@ -115,0 +120,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc