@servicensw/navigation
Advanced tools
Comparing version 2.0.0-dev.39 to 2.0.0-dev.40
{ | ||
"name": "@servicensw/navigation", | ||
"version": "2.0.0-dev.39", | ||
"version": "2.0.0-dev.40", | ||
"description": "Navigation", | ||
@@ -18,8 +18,8 @@ "repository": { | ||
"build:css": "NODE_ENV=production ./node_modules/.bin/postcss src/navigation.css --dir dist/css --config ./node_modules/@servicensw/builder/postcss.config.js", | ||
"build:js": "NODE_ENV=production ./node_modules/.bin/rollup src/secondary-nav.es6.js --o dist/js/secondary-nav.js --f cjs --name SecondaryNav --config ./node_modules/@servicensw/builder/rollup.config.js && NODE_ENV=production ./node_modules/.bin/rollup src/smooth-scrolling.es6.js --o dist/js/smooth-scrolling.js --f cjs --name SmoothScrolling --config ./node_modules/@servicensw/builder/rollup.config.js && NODE_ENV=production ./node_modules/.bin/rollup src/sticky-nav.es6.js --o dist/js/sticky-nav.js --f cjs --name StickyNav --config ./node_modules/@servicensw/builder/rollup.config.js", | ||
"build:js": "NODE_ENV=production ./node_modules/.bin/rollup src/smooth-scrolling.es6.js --o dist/js/smooth-scrolling.js --f cjs --name SmoothScrolling --config ./node_modules/@servicensw/builder/rollup.config.js && NODE_ENV=production ./node_modules/.bin/rollup src/sticky-nav.es6.js --o dist/js/sticky-nav.js --f cjs --name StickyNav --config ./node_modules/@servicensw/builder/rollup.config.js", | ||
"build": "npm run build:css && npm run build:js" | ||
}, | ||
"devDependencies": { | ||
"@servicensw/base": "^2.0.0-dev.34", | ||
"@servicensw/builder": "^2.0.0-dev.26", | ||
"@servicensw/base": "^2.0.0-dev.39", | ||
"@servicensw/builder": "^2.0.0-dev.27", | ||
"postcss-cli": "^5.0.0", | ||
@@ -26,0 +26,0 @@ "rollup": "^0.58.2" |
@@ -11,4 +11,2 @@ /** | ||
} | ||
this.expandTree = this.expandTree.bind(this); | ||
this.collapseTree = this.collapseTree.bind(this); | ||
this.toggleTree = this.toggleTree.bind(this); | ||
@@ -24,3 +22,3 @@ this.addToggle = this.addToggle.bind(this); | ||
*/ | ||
expandTree(menu, toggle) { // eslint-disable-line class-methods-use-this | ||
static expandTree(menu, toggle) { | ||
toggle.setAttribute('aria-expanded', 'true'); | ||
@@ -35,3 +33,3 @@ menu.setAttribute('aria-hidden', 'false'); | ||
*/ | ||
collapseTree(menu, toggle) { // eslint-disable-line class-methods-use-this | ||
static collapseTree(menu, toggle) { | ||
toggle.setAttribute('aria-expanded', 'false'); | ||
@@ -48,6 +46,6 @@ menu.setAttribute('aria-hidden', 'true'); | ||
if (toggle.getAttribute('aria-expanded') === 'false') { | ||
this.expandTree(menu, toggle); | ||
this.constructor.expandTree(menu, toggle); | ||
} | ||
else { | ||
this.collapseTree(menu, toggle); | ||
this.constructor.collapseTree(menu, toggle); | ||
} | ||
@@ -72,3 +70,3 @@ } | ||
// Default state for toggle is closed. | ||
this.collapseTree(menu, toggle); | ||
this.constructor.collapseTree(menu, toggle); | ||
// Add click handler for toggle. | ||
@@ -135,3 +133,3 @@ toggle.addEventListener('click', () => { | ||
if (item.getElementsByClassName('is-active').length !== 0 || item.classList.contains('is-active')) { | ||
this.expandTree(childMenu, toggle); | ||
this.constructor.expandTree(childMenu, toggle); | ||
} | ||
@@ -138,0 +136,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
61410
18