Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Package Dependency versions to the latest #565

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dist/muuri.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Muuri v0.9.5
* Muuri v0.9.6
* https://muuri.dev/
* Copyright (c) 2015-present, Haltu Oy
* Released under the MIT license
Expand All @@ -23,7 +23,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Muuri = factory());
}(this, (function () { 'use strict';
})(this, (function () { 'use strict';

var GRID_INSTANCES = {};
var ITEM_ELEMENT_MAP = typeof Map === 'function' ? new Map() : null;
Expand Down Expand Up @@ -8998,4 +8998,4 @@

return Grid;

})));
}));
4 changes: 2 additions & 2 deletions dist/muuri.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/muuri.module.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Muuri v0.9.5
* Muuri v0.9.6
* https://muuri.dev/
* Copyright (c) 2015-present, Haltu Oy
* Released under the MIT license
Expand Down Expand Up @@ -8990,4 +8990,4 @@ function compareIndexMap(indexMap, itemA, itemB) {
return indexA - indexB;
}

export default Grid;
export { Grid as default };
5,407 changes: 3,388 additions & 2,019 deletions package-lock.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "muuri",
"version": "0.9.5",
"version": "0.9.6",
"description": "Responsive, sortable, filterable and draggable layouts",
"keywords": [
"grid",
Expand Down Expand Up @@ -58,25 +58,25 @@
}
},
"devDependencies": {
"dotenv": "10.0.0",
"dotenv": "16.4.5",
"gulp": "4.0.2",
"gulp-eslint": "6.0.0",
"gulp-size": "4.0.1",
"husky": "4.3.8",
"karma": "6.3.4",
"karma-chrome-launcher": "3.1.0",
"karma-qunit": "4.1.2",
"karma": "6.4.2",
"karma-chrome-launcher": "3.2.0",
"karma-qunit": "4.2.0",
"karma-sauce-launcher": "4.3.6",
"karma-story-reporter": "0.3.1",
"mezr": "0.6.2",
"prettier": "2.3.2",
"prosthetic-hand": "1.3.1",
"qunit": "2.16.0",
"prettier": "2.8.8",
"prosthetic-hand": "1.4.0",
"qunit": "2.20.1",
"rimraf": "3.0.2",
"rollup": "2.52.8",
"terser": "5.7.1",
"rollup": "4.12.0",
"terser": "5.27.2",
"web-animations-js": "2.3.2",
"vitepress": "1.0.0-alpha.14",
"vue": "3.2.39"
"vitepress": "1.0.0-rc.44",
"vue": "3.4.19"
}
}
53 changes: 29 additions & 24 deletions tests/grid-events/dragReleaseEnd.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,36 @@

QUnit.module('Grid events');

QUnit.test('dragReleaseEnd: should be triggered when item has positioned after drag', function (
assert
) {
assert.expect(2);
QUnit.test(
'dragReleaseEnd: should be triggered when item has positioned after drag',
function (assert) {
assert.expect(2);

var done = assert.async();
var container = utils.createGridElements();
var grid = new Muuri(container, { dragEnabled: true });
var item = grid.getItems()[0];
var teardown = function () {
grid.destroy();
container.parentNode.removeChild(container);
done();
};
var done = assert.async();
var container = utils.createGridElements();
var grid = new Muuri(container, { dragEnabled: true });
var item = grid.getItems()[0];
var teardown = function () {
grid.destroy();
container.parentNode.removeChild(container);
done();
};

grid.on('dragReleaseEnd', function (draggedItem) {
assert.strictEqual(arguments.length, 1, 'callback: should have receive one argument');
assert.strictEqual(draggedItem, item, 'callback: first argument should be the released item');
teardown();
});
grid.on('dragReleaseEnd', function (draggedItem) {
assert.strictEqual(arguments.length, 1, 'callback: should have receive one argument');
assert.strictEqual(
draggedItem,
item,
'callback: first argument should be the released item'
);
teardown();
});

utils.dragElement({
element: item.getElement(),
x: 100,
y: 100,
});
});
utils.dragElement({
element: item.getElement(),
x: 100,
y: 100,
});
}
);
})(this);
57 changes: 31 additions & 26 deletions tests/grid-events/dragReleaseStart.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,39 @@

QUnit.module('Grid events');

QUnit.test('dragReleaseStart: should be triggered when item is released after drag', function (
assert
) {
assert.expect(2);
QUnit.test(
'dragReleaseStart: should be triggered when item is released after drag',
function (assert) {
assert.expect(2);

var done = assert.async();
var container = utils.createGridElements();
var grid = new Muuri(container, { dragEnabled: true });
var item = grid.getItems()[0];
var teardown = function () {
grid.destroy();
container.parentNode.removeChild(container);
done();
};
var done = assert.async();
var container = utils.createGridElements();
var grid = new Muuri(container, { dragEnabled: true });
var item = grid.getItems()[0];
var teardown = function () {
grid.destroy();
container.parentNode.removeChild(container);
done();
};

grid.on('dragReleaseStart', function (draggedItem) {
assert.strictEqual(arguments.length, 1, 'callback: should have receive one argument');
assert.strictEqual(draggedItem, item, 'callback: first argument should be the released item');
});
grid.on('dragReleaseStart', function (draggedItem) {
assert.strictEqual(arguments.length, 1, 'callback: should have receive one argument');
assert.strictEqual(
draggedItem,
item,
'callback: first argument should be the released item'
);
});

grid.on('dragReleaseEnd', function () {
teardown();
});
grid.on('dragReleaseEnd', function () {
teardown();
});

utils.dragElement({
element: item.getElement(),
x: 100,
y: 100,
});
});
utils.dragElement({
element: item.getElement(),
x: 100,
y: 100,
});
}
);
})(this);
105 changes: 55 additions & 50 deletions tests/grid-events/dragScroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,59 +3,64 @@

QUnit.module('Grid events');

QUnit.test('dragScroll: should be triggered when scroll occurs during drag process', function (
assert
) {
assert.expect(4);
QUnit.test(
'dragScroll: should be triggered when scroll occurs during drag process',
function (assert) {
assert.expect(4);

var done = assert.async();
var docElem = document.documentElement;
var body = document.body;
var container = utils.createGridElements();
var grid = new Muuri(container, {
dragEnabled: true,
dragSortInterval: 100,
dragSortPredicate: {
threshold: 50,
action: 'move',
},
});
var item = grid.getItems()[0];
var calls = 0;
var teardown = function () {
grid.destroy();
container.parentNode.removeChild(container);
utils.setStyles(docElem, { height: '' });
body.scrollTop = 0;
done();
};
var done = assert.async();
var docElem = document.documentElement;
var body = document.body;
var container = utils.createGridElements();
var grid = new Muuri(container, {
dragEnabled: true,
dragSortInterval: 100,
dragSortPredicate: {
threshold: 50,
action: 'move',
},
});
var item = grid.getItems()[0];
var calls = 0;
var teardown = function () {
grid.destroy();
container.parentNode.removeChild(container);
utils.setStyles(docElem, { height: '' });
body.scrollTop = 0;
done();
};

utils.setStyles(docElem, { height: '1000%' });
utils.setStyles(docElem, { height: '1000%' });

grid.on('dragStart', function () {
body.scrollTop = 100;
docElem.scrollTop = 100;
});
grid.on('dragStart', function () {
body.scrollTop = 100;
docElem.scrollTop = 100;
});

grid.on('dragScroll', function (draggedItem, ev) {
assert.strictEqual(arguments.length, 2, 'callback: should have receive two arguments');
assert.strictEqual(draggedItem, item, 'callback: first argument should be the dragged item');
assert.strictEqual(
utils.isScrollEvent(ev),
true,
'callback: second argument should be a scroll event object'
);
++calls;
});
grid.on('dragScroll', function (draggedItem, ev) {
assert.strictEqual(arguments.length, 2, 'callback: should have receive two arguments');
assert.strictEqual(
draggedItem,
item,
'callback: first argument should be the dragged item'
);
assert.strictEqual(
utils.isScrollEvent(ev),
true,
'callback: second argument should be a scroll event object'
);
++calls;
});

utils.dragElement({
element: item.getElement(),
x: 0,
y: 100,
onFinished: function () {
assert.strictEqual(calls, 1, 'should be called only once');
teardown();
},
});
});
utils.dragElement({
element: item.getElement(),
x: 0,
y: 100,
onFinished: function () {
assert.strictEqual(calls, 1, 'should be called only once');
teardown();
},
});
}
);
})(this);
Loading