@get-set/gs-sortable 0.0.21 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/calculate.d.ts +3 -0
- package/dist/actions/calculate.js +132 -133
- package/dist/actions/calculate.js.map +1 -0
- package/dist/actions/calculateOnSort.d.ts +3 -0
- package/dist/actions/calculateOnSort.js +141 -239
- package/dist/actions/calculateOnSort.js.map +1 -0
- package/dist/actions/checkItemInContainer.d.ts +2 -0
- package/dist/actions/checkItemInContainer.js +24 -24
- package/dist/actions/checkItemInContainer.js.map +1 -0
- package/dist/actions/destroy.d.ts +9 -0
- package/dist/actions/destroy.js +25 -31
- package/dist/actions/destroy.js.map +1 -0
- package/dist/actions/general.d.ts +13 -0
- package/dist/actions/general.js +56 -83
- package/dist/actions/general.js.map +1 -0
- package/dist/actions/getCurrentParams.d.ts +9 -0
- package/dist/actions/getCurrentParams.js +25 -33
- package/dist/actions/getCurrentParams.js.map +1 -0
- package/dist/actions/init.d.ts +3 -0
- package/dist/actions/init.js +24 -30
- package/dist/actions/init.js.map +1 -0
- package/dist/actions/initDraggable.d.ts +3 -0
- package/dist/actions/initDraggable.js +80 -85
- package/dist/actions/initDraggable.js.map +1 -0
- package/dist/actions/initMouseMove.d.ts +2 -0
- package/dist/actions/initMouseMove.js +104 -97
- package/dist/actions/initMouseMove.js.map +1 -0
- package/dist/actions/initScroll.d.ts +2 -0
- package/dist/actions/initScroll.js +22 -24
- package/dist/actions/initScroll.js.map +1 -0
- package/dist/actions/initSortEnd.d.ts +2 -0
- package/dist/actions/initSortEnd.js +71 -68
- package/dist/actions/initSortEnd.js.map +1 -0
- package/dist/components/GSSortable.d.ts +24 -0
- package/dist/components/GSSortable.js +127 -164
- package/dist/components/GSSortable.js.map +1 -0
- package/dist/constants/constParams.d.ts +4 -0
- package/dist/constants/constParams.js +5 -8
- package/dist/constants/constParams.js.map +1 -0
- package/dist/constants/defaultParams.d.ts +3 -0
- package/dist/constants/defaultParams.js +21 -22
- package/dist/constants/defaultParams.js.map +1 -0
- package/dist/constants/types.d.ts +6 -0
- package/dist/constants/types.js +7 -10
- package/dist/constants/types.js.map +1 -0
- package/dist/helpers/uihelpers.d.ts +4 -0
- package/dist/helpers/uihelpers.js +47 -51
- package/dist/helpers/uihelpers.js.map +1 -0
- package/package.json +3 -2
- package/dist/actions/afterAllImagesLoad.js +0 -53
- package/dist/components/styles/GSSortable.css +0 -39
- package/dist/components/styles/GSSortable.css.map +0 -1
- package/dist/components/styles/GSSortable.scss +0 -37
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _calculate = _interopRequireDefault(require("./calculate"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
-
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
10
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
11
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
12
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
13
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
14
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
|
-
var afterAllImagesLoad = function afterAllImagesLoad(ref) {
|
|
16
|
-
var $images = _toConsumableArray(ref.grid.querySelectorAll("img"));
|
|
17
|
-
var count = $images.length;
|
|
18
|
-
if (count > 0) {
|
|
19
|
-
var alreadyLoaded = 0;
|
|
20
|
-
$images.map(function (img) {
|
|
21
|
-
if (img.complete) {
|
|
22
|
-
alreadyLoaded++;
|
|
23
|
-
if (alreadyLoaded === count) {
|
|
24
|
-
setTimeout(function () {
|
|
25
|
-
(0, _calculate["default"])(ref);
|
|
26
|
-
}, 500);
|
|
27
|
-
}
|
|
28
|
-
} else {
|
|
29
|
-
img.onload = function () {
|
|
30
|
-
alreadyLoaded++;
|
|
31
|
-
if (alreadyLoaded === count) {
|
|
32
|
-
setTimeout(function () {
|
|
33
|
-
(0, _calculate["default"])(ref);
|
|
34
|
-
}, 500);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
img.onerror = function () {
|
|
38
|
-
alreadyLoaded++;
|
|
39
|
-
if (alreadyLoaded === count) {
|
|
40
|
-
setTimeout(function () {
|
|
41
|
-
(0, _calculate["default"])(ref);
|
|
42
|
-
}, 500);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
} else {
|
|
48
|
-
setTimeout(function () {
|
|
49
|
-
(0, _calculate["default"])(ref);
|
|
50
|
-
}, 500);
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
var _default = exports["default"] = afterAllImagesLoad;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
.gs-sortable-instance {
|
|
2
|
-
box-sizing: border-box;
|
|
3
|
-
-webkit-user-select: none !important;
|
|
4
|
-
-moz-user-select: none !important;
|
|
5
|
-
user-select: none !important;
|
|
6
|
-
transition: 0.4s;
|
|
7
|
-
z-index: 1;
|
|
8
|
-
}
|
|
9
|
-
.gs-sortable-instance.gs-sortable-active {
|
|
10
|
-
z-index: 2;
|
|
11
|
-
}
|
|
12
|
-
.gs-sortable-instance * {
|
|
13
|
-
-webkit-user-select: none !important;
|
|
14
|
-
-moz-user-select: none !important;
|
|
15
|
-
user-select: none !important;
|
|
16
|
-
}
|
|
17
|
-
.gs-sortable-instance .gs-sortable-placeholder {
|
|
18
|
-
position: absolute;
|
|
19
|
-
background-color: #f1f1f1;
|
|
20
|
-
border: 1px solid;
|
|
21
|
-
z-index: 1;
|
|
22
|
-
}
|
|
23
|
-
.gs-sortable-instance .gs-sortable-item {
|
|
24
|
-
z-index: 2;
|
|
25
|
-
}
|
|
26
|
-
.gs-sortable-instance .gs-sortable-item.gs-sortable-item-active-parent {
|
|
27
|
-
z-index: 3;
|
|
28
|
-
}
|
|
29
|
-
.gs-sortable-instance .gs-sortable-item-inmove {
|
|
30
|
-
transition: none !important;
|
|
31
|
-
z-index: 99999;
|
|
32
|
-
}
|
|
33
|
-
.gs-sortable-instance .gs-sortable-item-addjusting {
|
|
34
|
-
z-index: 99999;
|
|
35
|
-
}
|
|
36
|
-
.gs-sortable-instance.gs-sortable-row .gs-sortable-item {
|
|
37
|
-
width: -moz-max-content;
|
|
38
|
-
width: max-content;
|
|
39
|
-
}/*# sourceMappingURL=GSSortable.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["GSSortable.scss","GSSortable.css"],"names":[],"mappings":"AAAA;EACE,sBAAA;EACA,oCAAA;KAAA,iCAAA;UAAA,4BAAA;EACA,gBAAA;EACA,UAAA;ACCF;ADAE;EACE,UAAA;ACEJ;ADCE;EACE,oCAAA;KAAA,iCAAA;UAAA,4BAAA;ACCJ;ADCE;EACE,kBAAA;EACA,yBAAA;EACA,iBAAA;EACA,UAAA;ACCJ;ADCE;EACE,UAAA;ACCJ;ADAI;EACE,UAAA;ACEN;ADCE;EACE,2BAAA;EACA,cAAA;ACCJ;ADCE;EACE,cAAA;ACCJ;ADEI;EACE,uBAAA;EAAA,kBAAA;ACAN","file":"GSSortable.css"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
.gs-sortable-instance {
|
|
2
|
-
box-sizing: border-box;
|
|
3
|
-
user-select: none !important;
|
|
4
|
-
transition: 0.4s;
|
|
5
|
-
z-index: 1;
|
|
6
|
-
&.gs-sortable-active {
|
|
7
|
-
z-index: 2;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
* {
|
|
11
|
-
user-select: none !important;
|
|
12
|
-
}
|
|
13
|
-
.gs-sortable-placeholder {
|
|
14
|
-
position: absolute;
|
|
15
|
-
background-color: #f1f1f1;
|
|
16
|
-
border: 1px solid;
|
|
17
|
-
z-index: 1;
|
|
18
|
-
}
|
|
19
|
-
.gs-sortable-item {
|
|
20
|
-
z-index: 2;
|
|
21
|
-
&.gs-sortable-item-active-parent {
|
|
22
|
-
z-index: 3;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
.gs-sortable-item-inmove {
|
|
26
|
-
transition: none !important;
|
|
27
|
-
z-index: 99999;
|
|
28
|
-
}
|
|
29
|
-
.gs-sortable-item-addjusting {
|
|
30
|
-
z-index: 99999;
|
|
31
|
-
}
|
|
32
|
-
&.gs-sortable-row {
|
|
33
|
-
.gs-sortable-item {
|
|
34
|
-
width: max-content;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|