Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

material

Package Overview
Dependencies
Maintainers
3
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

material - npm Package Compare versions

Comparing version 0.5.3 to 0.6.1

src/list/virtual.new.js

6

package.json
{
"name": "material",
"version": "0.5.3",
"version": "0.6.1",
"description": "A lightweight implementation of Material Design Components - ES6",

@@ -8,3 +8,3 @@ "main": "index.js",

"type": "git",
"url": "git@gitlab.com:alkaloid/material.git"
"url": "git+ssh://git@gitlab.com/alkaloid/material.git"
},

@@ -18,3 +18,3 @@ "author": "Jérôme Vial <jerome.vial@gmail.com>",

"keywords": [
"lightweight material design component es6 es2015 vanilla javascript"
"lightweight material design ui component es6 vanilla javascript"
],

@@ -21,0 +21,0 @@ "devDependencies": {

@@ -38,3 +38,3 @@ 'use strict'

if (this.options.target) {
if (this.options.target !== 'blank') {
this.root.target = this.options.target

@@ -58,3 +58,11 @@ }

this.root.href = link
if (this.options.target === 'blank') {
this.root.href = '#'
this.root.addEventListener('click', () => {
window.open(link)
return false
})
} else {
this.root.href = link
}
}

@@ -61,0 +69,0 @@ }

@@ -112,3 +112,3 @@

onClick (ev) {
console.log('click')
// console.log('click')
this.emit('click', ev)

@@ -115,0 +115,0 @@ }

@@ -1,15 +0,5 @@

import { is as isObject } from './module/object'
import css from './module/css'
/**
*
*/
class Layout {
/**
* [constructor description]
* @param {?} schema [description]
* @param {?} container [description]
* @return {?} [description]
*/
constructor (schema, container) {

@@ -19,14 +9,5 @@ this.components = []

// console.log('this', this)
return this
}
/**
* [create description]
* @param {?} schema [description]
* @param {?} container [description]
* @param {?} structure [description]
* @return {?} [description]
*/
create (schema, container, structure, level) {

@@ -83,2 +64,6 @@ level = level || 0

wrapper.appendChild(element)
if (component.onInserted) {
component.onInserted(wrapper)
}
}

@@ -99,7 +84,2 @@ component._container = container

/**
* [_initFlexDirection description]
* @param {Element} container Init direction for the given container
* @param {string} direction (horizontal,vertical)
*/
display (element, options) {

@@ -118,7 +98,2 @@ var display = options.display

/**
* [style description]
* @param {?} component [description]
* @return {?} [description]
*/
style (component) {

@@ -173,12 +148,5 @@ var options = component.options || {}

// console.log('--- field', field)
return field
}
/**
* [get description]
* @param {?} name [description]
* @return {?} [description]
*/
get (name) {

@@ -185,0 +153,0 @@ if (name) return this.component[name]

@@ -82,6 +82,3 @@ import scrollbar from '../module/scrollbar'

}
})
// console.log('dynamic')
this.virtual.on('next', (total) => {
}).on('next', (total) => {
// console.log('next', total)

@@ -117,2 +114,3 @@ if (this.stop) return

// })
//
},

@@ -119,0 +117,0 @@

@@ -44,2 +44,10 @@ export default {

getInfoById (id) {
return this.dataStore[id]
},
getSelectedInfo () {
return this.dataStore[this.id]
},
getItemById (id, silent) {

@@ -106,2 +114,3 @@ // console.log('selectItemById', id)

if (this.options.updatePosition === true) {
// console.log('selectPosition', item)
this.selectPosition(item, direction)

@@ -186,2 +195,11 @@ }

scrollIntoView (item) {
// console.log('selectPrevious', this.id)
item = item || this.item
if (item) {
item.scrollIntoView({ behavior: 'instant', block: 'end', inline: 'nearest' })
}
},
highlight (item) {

@@ -188,0 +206,0 @@ if (this.item) {

@@ -44,3 +44,2 @@ import extract from './extract'

} else {
// console.trace('can\'t attach', def[0])
// console.log('can\'t attach', def[0])

@@ -47,0 +46,0 @@ }

@@ -0,13 +1,18 @@

function passiveEvents () {
let supportsPassive = false
function passive () {
var supportsPassive = false
try {
var opts = Object.defineProperty({}, 'passive', {
get: function () {
const opts = Object.defineProperty({}, 'passive', {
get () {
supportsPassive = true
}
})
// Test if the browser supports passive event listeners
window.addEventListener('testPassive', null, opts)
window.removeEventListener('testPassive', null, opts)
} catch (e) {}
} catch (e) {
// If there was an error, it's safe to assume that passive event listeners are not supported
supportsPassive = false
}

@@ -17,2 +22,2 @@ return supportsPassive

export default passive
export default passiveEvents
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