Socket
Socket
Sign inDemoInstall

mmenu-js

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mmenu-js - npm Package Compare versions

Comparing version 8.5.7 to 8.5.8

2

composer.json
{
"name": "frdh/mmenu.js",
"version": "8.5.7",
"version": "8.5.8",
"authors": [

@@ -5,0 +5,0 @@ {

@@ -38,3 +38,5 @@ /**

var children = Array.prototype.slice.call(element.children);
return filter ? children.filter(function (child) { return child.matches(filter); }) : children;
return filter
? children.filter(function (child) { return child.matches(filter); })
: children;
}

@@ -69,3 +71,5 @@ /**

}
return filter ? parents.filter(function (parent) { return parent.matches(filter); }) : parents;
return filter
? parents.filter(function (parent) { return parent.matches(filter); })
: parents;
}

@@ -72,0 +76,0 @@ /**

@@ -0,1 +1,8 @@

var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
import Mmenu from '../../core/oncanvas/mmenu.oncanvas';

@@ -283,4 +290,4 @@ import options from './_options';

Mmenu.prototype.search = function (input, query) {
var _a;
var _this = this;
var _a;
var options = this.opts.searchfield, configs = this.conf.searchfield;

@@ -410,3 +417,3 @@ query = query || '' + input.value;

// .reverse() mutates the original array, therefor we "clone" it first using [...panels].
panels.slice().reverse().forEach(function (panel, p) {
__spreadArrays(panels).reverse().forEach(function (panel, p) {
var parent = panel['mmParent'];

@@ -413,0 +420,0 @@ if (parent) {

@@ -44,2 +44,5 @@ import Mmenu from './../oncanvas/mmenu.oncanvas';

var wrapper = evnt.target.closest('.mm-panel, .mm-iconbar__top, .mm-iconbar__bottom');
if (wrapper.closest('.mm-listitem_vertical')) {
wrapper = DOM.parents(wrapper, '.mm-panel').pop();
}
if (wrapper) {

@@ -46,0 +49,0 @@ // When dragging a non-scrollable panel,

{
"name": "mmenu-js",
"version": "8.5.7",
"version": "8.5.8",
"main": "dist/mmenu.js",

@@ -34,9 +34,9 @@ "module": "src/mmenu.js",

"gulp-autoprefixer": "^6.1.0",
"gulp-clean-css": "^4.2.0",
"gulp-clean-css": "^4.3.0",
"gulp-concat": "^2.6.1",
"gulp-sass": "^4.0.2",
"gulp-sass": "^4.1.0",
"gulp-typescript": "^5.0.1",
"typescript": "^3.4.5",
"typescript": "^3.8.3",
"webpack-stream": "^5.2.1"
}
}

@@ -8,7 +8,7 @@ /**

export function create(selector: string): HTMLElement {
var args = selector.split('.');
var elem = document.createElement(args.shift());
const args = selector.split('.');
const elem = document.createElement(args.shift());
// IE11:
args.forEach(classname => {
args.forEach((classname) => {
elem.classList.add(classname);

@@ -46,4 +46,8 @@ });

export function children(element: HTMLElement, filter?: string): HTMLElement[] {
var children: HTMLElement[] = Array.prototype.slice.call(element.children);
return filter ? children.filter(child => child.matches(filter)) : children;
const children: HTMLElement[] = Array.prototype.slice.call(
element.children
);
return filter
? children.filter((child) => child.matches(filter))
: children;
}

@@ -59,4 +63,4 @@

.call(element.childNodes)
.filter(child => child.nodeType == 3)
.map(child => child.textContent)
.filter((child) => child.nodeType == 3)
.map((child) => child.textContent)
.join(' ');

@@ -74,6 +78,6 @@ }

/** Array of preceding elements that match the selector. */
var parents: HTMLElement[] = [];
let parents: HTMLElement[] = [];
/** Array of preceding elements that match the selector. */
var parent = element.parentElement;
let parent = element.parentElement;
while (parent) {

@@ -84,3 +88,5 @@ parents.push(parent);

return filter ? parents.filter(parent => parent.matches(filter)) : parents;
return filter
? parents.filter((parent) => parent.matches(filter))
: parents;
}

@@ -97,6 +103,6 @@

/** Array of previous siblings that match the selector. */
var previous: HTMLElement[] = [];
let previous: HTMLElement[] = [];
/** Current element in the loop */
var current = element.previousElementSibling as HTMLElement;
let current = element.previousElementSibling as HTMLElement;

@@ -133,3 +139,3 @@ while (current) {

export function filterLI(listitems: HTMLElement[]): HTMLElement[] {
return listitems.filter(listitem => !listitem.matches('.mm-hidden'));
return listitems.filter((listitem) => !listitem.matches('.mm-hidden'));
}

@@ -143,7 +149,7 @@

export function filterLIA(listitems: HTMLElement[]): HTMLElement[] {
var anchors = [];
filterLI(listitems).forEach(listitem => {
let anchors = [];
filterLI(listitems).forEach((listitem) => {
anchors.push(...children(listitem, 'a.mm-listitem__text'));
});
return anchors.filter(anchor => !anchor.matches('.mm-btn_next'));
return anchors.filter((anchor) => !anchor.matches('.mm-btn_next'));
}

@@ -150,0 +156,0 @@

@@ -1,1 +0,1 @@

export default '8.5.7';
export default '8.5.8';

@@ -57,2 +57,6 @@ import Mmenu from './../oncanvas/mmenu.oncanvas';

if (wrapper.closest('.mm-listitem_vertical')) {
wrapper = DOM.parents(wrapper, '.mm-panel').pop();
}
if (wrapper) {

@@ -59,0 +63,0 @@ // When dragging a non-scrollable panel,

Sorry, the diff of this file is too big to display

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