@get-set/gs-sortable 0.0.36 → 0.0.37
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/README.md +99 -1
- package/actions/afterAllImagesLoad.ts +36 -0
- package/actions/calculate.ts +155 -0
- package/actions/calculateOnSort.ts +270 -0
- package/actions/checkItemInContainer.ts +22 -0
- package/actions/destroy.ts +30 -0
- package/actions/general.ts +72 -0
- package/actions/getCurrentParams.ts +32 -0
- package/actions/init.ts +31 -0
- package/actions/initDraggable.ts +85 -0
- package/actions/initMouseMove.ts +120 -0
- package/actions/initScroll.ts +21 -0
- package/actions/initSortEnd.ts +87 -0
- package/components/GSSortable.tsx +160 -0
- package/components/styles/GSSortable.css +39 -0
- package/components/styles/GSSortable.scss +38 -0
- package/components/styles/GSSortableCSS.ts +41 -0
- package/constants/constParams.ts +5 -0
- package/constants/defaultParams.ts +20 -0
- package/constants/types.ts +7 -0
- package/dist/GSSortable.d.ts +2 -0
- package/dist/actions/afterAllImagesLoad.d.ts +4 -0
- package/dist/actions/afterAllImagesLoad.d.ts.map +1 -0
- package/dist/actions/afterAllImagesLoad.js +35 -0
- package/dist/actions/afterAllImagesLoad.js.map +1 -0
- package/dist/actions/calculate.d.ts +3 -2
- package/dist/actions/calculate.d.ts.map +1 -0
- package/dist/actions/calculate.js +13 -18
- package/dist/actions/calculate.js.map +1 -1
- package/dist/actions/calculateOnSort.d.ts +3 -2
- package/dist/actions/calculateOnSort.d.ts.map +1 -0
- package/dist/actions/calculateOnSort.js +51 -70
- package/dist/actions/calculateOnSort.js.map +1 -1
- package/dist/actions/checkItemInContainer.d.ts +1 -0
- package/dist/actions/checkItemInContainer.d.ts.map +1 -0
- package/dist/actions/checkItemInContainer.js +8 -17
- package/dist/actions/checkItemInContainer.js.map +1 -1
- package/dist/actions/destroy.d.ts +3 -8
- package/dist/actions/destroy.d.ts.map +1 -0
- package/dist/actions/destroy.js +7 -9
- package/dist/actions/destroy.js.map +1 -1
- package/dist/actions/general.d.ts +1 -0
- package/dist/actions/general.d.ts.map +1 -0
- package/dist/actions/general.js +5 -12
- package/dist/actions/general.js.map +1 -1
- package/dist/actions/getCurrentParams.d.ts +4 -9
- package/dist/actions/getCurrentParams.d.ts.map +1 -0
- package/dist/actions/getCurrentParams.js +15 -18
- package/dist/actions/getCurrentParams.js.map +1 -1
- package/dist/actions/init.d.ts +3 -2
- package/dist/actions/init.d.ts.map +1 -0
- package/dist/actions/init.js +13 -16
- package/dist/actions/init.js.map +1 -1
- package/dist/actions/initDraggable.d.ts +3 -2
- package/dist/actions/initDraggable.d.ts.map +1 -0
- package/dist/actions/initDraggable.js +14 -22
- package/dist/actions/initDraggable.js.map +1 -1
- package/dist/actions/initMouseMove.d.ts +1 -0
- package/dist/actions/initMouseMove.d.ts.map +1 -0
- package/dist/actions/initMouseMove.js +40 -53
- package/dist/actions/initMouseMove.js.map +1 -1
- package/dist/actions/initScroll.d.ts +1 -0
- package/dist/actions/initScroll.d.ts.map +1 -0
- package/dist/actions/initScroll.js +7 -15
- package/dist/actions/initScroll.js.map +1 -1
- package/dist/actions/initSortEnd.d.ts +2 -1
- package/dist/actions/initSortEnd.d.ts.map +1 -0
- package/dist/actions/initSortEnd.js +62 -71
- package/dist/actions/initSortEnd.js.map +1 -1
- package/dist/components/GSSortable.d.ts +4 -19
- package/dist/components/GSSortable.d.ts.map +1 -0
- package/dist/components/GSSortable.js +72 -105
- package/dist/components/GSSortable.js.map +1 -1
- package/dist/components/styles/GSSortableCSS.d.ts +2 -1
- package/dist/components/styles/GSSortableCSS.d.ts.map +1 -0
- package/dist/components/styles/GSSortableCSS.js +3 -4
- package/dist/components/styles/GSSortableCSS.js.map +1 -1
- package/dist/constants/constParams.d.ts +4 -3
- package/dist/constants/constParams.d.ts.map +1 -0
- package/dist/constants/constParams.js +2 -4
- package/dist/constants/constParams.js.map +1 -1
- package/dist/constants/defaultParams.d.ts +3 -2
- package/dist/constants/defaultParams.d.ts.map +1 -0
- package/dist/constants/defaultParams.js +3 -8
- package/dist/constants/defaultParams.js.map +1 -1
- package/dist/constants/types.d.ts +1 -0
- package/dist/constants/types.d.ts.map +1 -0
- package/dist/constants/types.js +1 -3
- package/dist/constants/types.js.map +1 -1
- package/dist/helpers/uihelpers.d.ts +2 -1
- package/dist/helpers/uihelpers.d.ts.map +1 -0
- package/dist/helpers/uihelpers.js +9 -23
- package/dist/helpers/uihelpers.js.map +1 -1
- package/dist/types/params.d.ts +23 -0
- package/dist/types/params.d.ts.map +1 -0
- package/dist/types/params.js +2 -0
- package/dist/types/params.js.map +1 -0
- package/dist/types/ref.d.ts +41 -0
- package/dist/types/ref.d.ts.map +1 -0
- package/dist/types/ref.js +2 -0
- package/dist/types/ref.js.map +1 -0
- package/dist-js/bundle.js +1181 -0
- package/helpers/uihelpers.ts +44 -0
- package/package.json +71 -43
- package/styles/GSSortable.css +39 -0
- package/styles/GSSortable.scss +38 -0
- package/types/global.d.ts +19 -0
- package/types/params.ts +24 -0
- package/types/ref.ts +41 -0
- package/index.js +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"afterAllImagesLoad.d.ts","sourceRoot":"","sources":["../../actions/afterAllImagesLoad.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,QAAA,MAAM,kBAAkB,GAAI,KAAK,GAAG,KAAG,IA8BtC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import calculate from './calculate';
|
|
2
|
+
const afterAllImagesLoad = (ref) => {
|
|
3
|
+
const $images = [...ref.grid.querySelectorAll('img')];
|
|
4
|
+
const count = $images.length;
|
|
5
|
+
if (count > 0) {
|
|
6
|
+
let alreadyLoaded = 0;
|
|
7
|
+
$images.forEach((img) => {
|
|
8
|
+
if (img.complete) {
|
|
9
|
+
alreadyLoaded++;
|
|
10
|
+
if (alreadyLoaded === count) {
|
|
11
|
+
setTimeout(() => calculate(ref), 500);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
img.onload = () => {
|
|
16
|
+
alreadyLoaded++;
|
|
17
|
+
if (alreadyLoaded === count) {
|
|
18
|
+
setTimeout(() => calculate(ref), 500);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
img.onerror = () => {
|
|
22
|
+
alreadyLoaded++;
|
|
23
|
+
if (alreadyLoaded === count) {
|
|
24
|
+
setTimeout(() => calculate(ref), 500);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
setTimeout(() => calculate(ref), 500);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
export default afterAllImagesLoad;
|
|
35
|
+
//# sourceMappingURL=afterAllImagesLoad.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"afterAllImagesLoad.js","sourceRoot":"","sources":["../../actions/afterAllImagesLoad.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AAGpC,MAAM,kBAAkB,GAAG,CAAC,GAAQ,EAAQ,EAAE;IAC5C,MAAM,OAAO,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAmB,KAAK,CAAC,CAAC,CAAC;IACxE,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;IAE7B,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QACd,IAAI,aAAa,GAAG,CAAC,CAAC;QACtB,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACtB,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;gBACjB,aAAa,EAAE,CAAC;gBAChB,IAAI,aAAa,KAAK,KAAK,EAAE,CAAC;oBAC5B,UAAU,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;gBACxC,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,GAAG,CAAC,MAAM,GAAG,GAAG,EAAE;oBAChB,aAAa,EAAE,CAAC;oBAChB,IAAI,aAAa,KAAK,KAAK,EAAE,CAAC;wBAC5B,UAAU,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;oBACxC,CAAC;gBACH,CAAC,CAAC;gBACF,GAAG,CAAC,OAAO,GAAG,GAAG,EAAE;oBACjB,aAAa,EAAE,CAAC;oBAChB,IAAI,aAAa,KAAK,KAAK,EAAE,CAAC;wBAC5B,UAAU,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;oBACxC,CAAC;gBACH,CAAC,CAAC;YACJ,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,UAAU,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;IACxC,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculate.d.ts","sourceRoot":"","sources":["../../actions/calculate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,QAAA,MAAM,SAAS,GAAI,KAAK,GAAG,KAAG,IAqJ7B,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const types_1 = __importDefault(require("../constants/types"));
|
|
1
|
+
import types from '../constants/types';
|
|
7
2
|
const calculate = (ref) => {
|
|
8
3
|
const params = ref.currentParams;
|
|
9
|
-
if (typeof
|
|
10
|
-
|
|
4
|
+
if (typeof params.beforeInit === 'function') {
|
|
5
|
+
params.beforeInit();
|
|
11
6
|
}
|
|
12
|
-
const $items = Array.from(ref.grid.children).filter(x => !x.classList.contains('gs-sortable-item-inmove'));
|
|
7
|
+
const $items = Array.from(ref.grid.children).filter((x) => !x.classList.contains('gs-sortable-item-inmove'));
|
|
13
8
|
const itemsCount = $items.length;
|
|
14
9
|
ref.grid.style.position = 'relative';
|
|
15
10
|
if (params.gap !== '') {
|
|
@@ -41,11 +36,11 @@ const calculate = (ref) => {
|
|
|
41
36
|
const containerWidth = ref.grid.clientWidth - containerPR - containerPL;
|
|
42
37
|
let itemWidth = 0;
|
|
43
38
|
let strItemWidth = 'max-content';
|
|
44
|
-
if (params.type ===
|
|
39
|
+
if (params.type === types.grid) {
|
|
45
40
|
itemWidth = (containerWidth - (params.count - 1) * gapX) / params.count;
|
|
46
41
|
strItemWidth = `${itemWidth}px`;
|
|
47
42
|
}
|
|
48
|
-
else if (params.type ===
|
|
43
|
+
else if (params.type === types.column) {
|
|
49
44
|
itemWidth = containerWidth;
|
|
50
45
|
strItemWidth = `${itemWidth}px`;
|
|
51
46
|
}
|
|
@@ -55,8 +50,8 @@ const calculate = (ref) => {
|
|
|
55
50
|
let currentHeight = containerPT + containerPB + borderBottomWidth + borderTopWidth;
|
|
56
51
|
let currentWidth = containerPL + containerPR + borderLeftWidth + borderRightWidth;
|
|
57
52
|
let maxHeight = 0;
|
|
58
|
-
$items.forEach(el => {
|
|
59
|
-
if (params.type !==
|
|
53
|
+
$items.forEach((el) => {
|
|
54
|
+
if (params.type !== types.row ||
|
|
60
55
|
!el.classList.contains('gs-sortable-placeholder')) {
|
|
61
56
|
el.style.width = strItemWidth;
|
|
62
57
|
}
|
|
@@ -77,7 +72,7 @@ const calculate = (ref) => {
|
|
|
77
72
|
$items.forEach((el, index) => {
|
|
78
73
|
const height = el.offsetHeight;
|
|
79
74
|
const width = el.offsetWidth;
|
|
80
|
-
if (params.type ===
|
|
75
|
+
if (params.type === types.column) {
|
|
81
76
|
el.style.left = `${containerPL}px`;
|
|
82
77
|
if (currentTop === containerPT) {
|
|
83
78
|
el.style.top = `${containerPT}px`;
|
|
@@ -90,7 +85,7 @@ const calculate = (ref) => {
|
|
|
90
85
|
currentHeight += height + gapY;
|
|
91
86
|
}
|
|
92
87
|
}
|
|
93
|
-
else if (params.type ===
|
|
88
|
+
else if (params.type === types.row) {
|
|
94
89
|
el.style.top = `${containerPT}px`;
|
|
95
90
|
if (currentLeft === containerPL) {
|
|
96
91
|
el.style.left = `${containerPL}px`;
|
|
@@ -106,7 +101,7 @@ const calculate = (ref) => {
|
|
|
106
101
|
maxHeight = height;
|
|
107
102
|
}
|
|
108
103
|
}
|
|
109
|
-
else if (params.type ===
|
|
104
|
+
else if (params.type === types.grid) {
|
|
110
105
|
const left = index % params.count === 0
|
|
111
106
|
? containerPL
|
|
112
107
|
: containerPL + (index % params.count) * (itemWidth + gapX);
|
|
@@ -130,10 +125,10 @@ const calculate = (ref) => {
|
|
|
130
125
|
}
|
|
131
126
|
});
|
|
132
127
|
ref.grid.style.height = `${currentHeight}px`;
|
|
133
|
-
if (params.type ===
|
|
128
|
+
if (params.type === types.row) {
|
|
134
129
|
ref.grid.style.height = `${currentHeight + maxHeight}px`;
|
|
135
130
|
ref.grid.style.width = `${currentWidth}px`;
|
|
136
131
|
}
|
|
137
132
|
};
|
|
138
|
-
|
|
133
|
+
export default calculate;
|
|
139
134
|
//# sourceMappingURL=calculate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calculate.js","sourceRoot":"","sources":["../../
|
|
1
|
+
{"version":3,"file":"calculate.js","sourceRoot":"","sources":["../../actions/calculate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,oBAAoB,CAAC;AAGvC,MAAM,SAAS,GAAG,CAAC,GAAQ,EAAQ,EAAE;IACnC,MAAM,MAAM,GAAG,GAAG,CAAC,aAAa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KAAK,UAAU,GAAG,CAAC,EACxB,CAAC;gBACD,IAAI,GAAG,KAAK,WAAW,EAAE,CAAC;oBACxB,aAAa,IAAI,SAAS,CAAC;gBAC7B,CAAC;qBAAM,CAAC;oBACN,aAAa,IAAI,SAAS,GAAG,IAAI,CAAC;gBACpC,CAAC;gBACD,UAAU,IAAI,SAAS,GAAG,IAAI,CAAC;gBAC/B,SAAS,GAAG,CAAC,CAAC;YAChB,CAAC;YAED,EAAE,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,IAAI,IAAI,CAAC;YAC5B,EAAE,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;QAC5B,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,aAAa,IAAI,CAAC;IAC7C,IAAI,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC,GAAG,EAAE,CAAC;QAC9B,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,aAAa,GAAG,SAAS,IAAI,CAAC;QACzD,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,YAAY,IAAI,CAAC;IAC7C,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const calculateOnSort: (ref:
|
|
1
|
+
import { Ref } from '../types/ref';
|
|
2
|
+
declare const calculateOnSort: (ref: Ref) => void;
|
|
3
3
|
export default calculateOnSort;
|
|
4
|
+
//# sourceMappingURL=calculateOnSort.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculateOnSort.d.ts","sourceRoot":"","sources":["../../actions/calculateOnSort.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAiB,MAAM,cAAc,CAAC;AAElD,QAAA,MAAM,eAAe,GAAI,KAAK,GAAG,KAAG,IAuQnC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,27 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const types_1 = __importDefault(require("../constants/types"));
|
|
7
|
-
const general_1 = require("./general");
|
|
1
|
+
import types from '../constants/types';
|
|
2
|
+
import { getOffsetFromWindow } from './general';
|
|
8
3
|
const calculateOnSort = (ref) => {
|
|
9
|
-
var _a, _b;
|
|
10
4
|
const params = ref.currentParams;
|
|
11
5
|
if (!params.takeClone) {
|
|
12
6
|
const $items = Array.from(ref.grid.children);
|
|
13
|
-
const itemsCount = $items.filter(x => !x.classList.contains('gs-sortable-item-inmove')).length;
|
|
14
|
-
const info =
|
|
7
|
+
const itemsCount = $items.filter((x) => !x.classList.contains('gs-sortable-item-inmove')).length;
|
|
8
|
+
const info = window.GSSortableConfigue.draggableInfo;
|
|
15
9
|
let { containerPT, containerPL, currentHeight, currentWidth, itemWidth, gapX, gapY, } = ref.uiData;
|
|
16
10
|
let currentLeft = containerPL;
|
|
17
11
|
let currentTop = containerPT;
|
|
18
12
|
let maxHeight = 0;
|
|
19
13
|
let placeholderSeted = info === undefined;
|
|
20
14
|
let inProcessEl;
|
|
21
|
-
const containerCoord =
|
|
15
|
+
const containerCoord = getOffsetFromWindow(info?.ref.grid);
|
|
22
16
|
if (info !== undefined) {
|
|
23
17
|
const $el = info.$el;
|
|
24
|
-
const elCoord =
|
|
18
|
+
const elCoord = getOffsetFromWindow($el);
|
|
25
19
|
inProcessEl = {
|
|
26
20
|
height: $el.offsetHeight,
|
|
27
21
|
width: $el.offsetWidth,
|
|
@@ -29,21 +23,20 @@ const calculateOnSort = (ref) => {
|
|
|
29
23
|
left: elCoord.left - containerCoord.left,
|
|
30
24
|
};
|
|
31
25
|
}
|
|
32
|
-
let plIndex =
|
|
26
|
+
let plIndex = info?.index ?? 0;
|
|
33
27
|
let colHeight = 0;
|
|
34
28
|
let itIndex = 0;
|
|
35
|
-
|
|
29
|
+
// Pass 1 — find where the placeholder should land
|
|
30
|
+
$items.forEach((el) => {
|
|
36
31
|
if (!el.classList.contains('gs-sortable-item-inmove')) {
|
|
37
32
|
const height = el.offsetHeight;
|
|
38
33
|
const width = el.offsetWidth;
|
|
39
|
-
if (params.type ===
|
|
34
|
+
if (params.type === types.column) {
|
|
40
35
|
if (!placeholderSeted) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (Math.abs(placeholderTop - inProcessEl.top) <
|
|
44
|
-
inProcessEl.
|
|
45
|
-
Math.abs(placeholderLeft - inProcessEl.left) <
|
|
46
|
-
inProcessEl.width / 2) {
|
|
36
|
+
const placeholderTop = currentTop === containerPT ? containerPT : currentTop + gapY;
|
|
37
|
+
const placeholderLeft = containerPL;
|
|
38
|
+
if (Math.abs(placeholderTop - inProcessEl.top) < inProcessEl.height / 2 &&
|
|
39
|
+
Math.abs(placeholderLeft - inProcessEl.left) < inProcessEl.width / 2) {
|
|
47
40
|
info.newTop = placeholderTop;
|
|
48
41
|
info.newLeft = placeholderLeft;
|
|
49
42
|
placeholderSeted = true;
|
|
@@ -53,22 +46,20 @@ const calculateOnSort = (ref) => {
|
|
|
53
46
|
if (!el.classList.contains('gs-sortable-placeholder')) {
|
|
54
47
|
if (currentTop === containerPT) {
|
|
55
48
|
currentTop = containerPT + height;
|
|
56
|
-
currentHeight
|
|
49
|
+
currentHeight += height;
|
|
57
50
|
}
|
|
58
51
|
else {
|
|
59
52
|
currentTop = currentTop + gapY + height;
|
|
60
|
-
currentHeight
|
|
53
|
+
currentHeight += height + gapY;
|
|
61
54
|
}
|
|
62
55
|
}
|
|
63
56
|
}
|
|
64
|
-
else if (params.type ===
|
|
57
|
+
else if (params.type === types.row) {
|
|
65
58
|
if (!placeholderSeted) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if (Math.abs(placeholderTop - inProcessEl.top) <
|
|
69
|
-
inProcessEl.
|
|
70
|
-
Math.abs(placeholderLeft - inProcessEl.left) <
|
|
71
|
-
inProcessEl.width / 2) {
|
|
59
|
+
const placeholderLeft = currentLeft === containerPL ? containerPL : currentLeft + gapX;
|
|
60
|
+
const placeholderTop = containerPT;
|
|
61
|
+
if (Math.abs(placeholderTop - inProcessEl.top) < inProcessEl.height / 2 &&
|
|
62
|
+
Math.abs(placeholderLeft - inProcessEl.left) < inProcessEl.width / 2) {
|
|
72
63
|
info.newTop = placeholderTop;
|
|
73
64
|
info.newLeft = placeholderLeft;
|
|
74
65
|
placeholderSeted = true;
|
|
@@ -78,26 +69,23 @@ const calculateOnSort = (ref) => {
|
|
|
78
69
|
if (!el.classList.contains('gs-sortable-placeholder')) {
|
|
79
70
|
if (currentLeft === containerPL) {
|
|
80
71
|
currentLeft = containerPL + width;
|
|
81
|
-
currentWidth
|
|
72
|
+
currentWidth += width;
|
|
82
73
|
}
|
|
83
74
|
else {
|
|
84
75
|
currentLeft = currentLeft + gapX + width;
|
|
85
|
-
currentWidth
|
|
76
|
+
currentWidth += width + gapX;
|
|
86
77
|
}
|
|
87
|
-
if (height > maxHeight)
|
|
78
|
+
if (height > maxHeight)
|
|
88
79
|
maxHeight = height;
|
|
89
|
-
}
|
|
90
80
|
}
|
|
91
81
|
}
|
|
92
|
-
else if (params.type ===
|
|
82
|
+
else if (params.type === types.grid) {
|
|
93
83
|
const placeholderLeft = itIndex % params.count === 0
|
|
94
84
|
? containerPL
|
|
95
85
|
: containerPL + (itIndex % params.count) * (itemWidth + gapX);
|
|
96
86
|
const placeholderTop = currentTop;
|
|
97
|
-
if (Math.abs(placeholderTop - inProcessEl.top) <
|
|
98
|
-
inProcessEl.
|
|
99
|
-
Math.abs(placeholderLeft - inProcessEl.left) <
|
|
100
|
-
inProcessEl.width / 2) {
|
|
87
|
+
if (Math.abs(placeholderTop - inProcessEl.top) < inProcessEl.height / 2 &&
|
|
88
|
+
Math.abs(placeholderLeft - inProcessEl.left) < inProcessEl.width / 2) {
|
|
101
89
|
info.newTop = placeholderTop;
|
|
102
90
|
info.newLeft = placeholderLeft;
|
|
103
91
|
placeholderSeted = true;
|
|
@@ -105,18 +93,17 @@ const calculateOnSort = (ref) => {
|
|
|
105
93
|
}
|
|
106
94
|
if (!el.classList.contains('gs-sortable-placeholder')) {
|
|
107
95
|
const top = currentTop;
|
|
108
|
-
if (height > colHeight)
|
|
96
|
+
if (height > colHeight)
|
|
109
97
|
colHeight = height;
|
|
110
|
-
}
|
|
111
98
|
if (itIndex % params.count === params.count - 1 ||
|
|
112
99
|
itIndex === itemsCount - 1) {
|
|
113
100
|
if (top === containerPT) {
|
|
114
|
-
currentHeight
|
|
101
|
+
currentHeight += colHeight;
|
|
115
102
|
}
|
|
116
103
|
else {
|
|
117
|
-
currentHeight
|
|
104
|
+
currentHeight += colHeight + gapY;
|
|
118
105
|
}
|
|
119
|
-
currentTop
|
|
106
|
+
currentTop += colHeight + gapY;
|
|
120
107
|
colHeight = 0;
|
|
121
108
|
}
|
|
122
109
|
}
|
|
@@ -124,6 +111,7 @@ const calculateOnSort = (ref) => {
|
|
|
124
111
|
itIndex += 1;
|
|
125
112
|
}
|
|
126
113
|
});
|
|
114
|
+
// Pass 2 — reposition everything including the placeholder
|
|
127
115
|
{
|
|
128
116
|
info.index = plIndex;
|
|
129
117
|
({
|
|
@@ -138,11 +126,11 @@ const calculateOnSort = (ref) => {
|
|
|
138
126
|
currentLeft = containerPL;
|
|
139
127
|
currentTop = containerPT;
|
|
140
128
|
itIndex = 0;
|
|
141
|
-
$items.
|
|
129
|
+
$items.forEach((el) => {
|
|
142
130
|
if (!el.classList.contains('gs-sortable-item-inmove')) {
|
|
143
131
|
const height = el.offsetHeight;
|
|
144
132
|
const width = el.offsetWidth;
|
|
145
|
-
if (params.type ===
|
|
133
|
+
if (params.type === types.column) {
|
|
146
134
|
if (itIndex === plIndex) {
|
|
147
135
|
info.placeholder.style.left = `${containerPL}px`;
|
|
148
136
|
info.newLeft = containerPL;
|
|
@@ -162,16 +150,16 @@ const calculateOnSort = (ref) => {
|
|
|
162
150
|
if (currentTop === containerPT) {
|
|
163
151
|
el.style.top = `${containerPT}px`;
|
|
164
152
|
currentTop = containerPT + height;
|
|
165
|
-
currentHeight
|
|
153
|
+
currentHeight += height;
|
|
166
154
|
}
|
|
167
155
|
else {
|
|
168
156
|
el.style.top = `${currentTop + gapY}px`;
|
|
169
157
|
currentTop = currentTop + gapY + height;
|
|
170
|
-
currentHeight
|
|
158
|
+
currentHeight += height + gapY;
|
|
171
159
|
}
|
|
172
160
|
}
|
|
173
161
|
}
|
|
174
|
-
else if (params.type ===
|
|
162
|
+
else if (params.type === types.row) {
|
|
175
163
|
if (itIndex === plIndex) {
|
|
176
164
|
info.placeholder.style.top = `${containerPT}px`;
|
|
177
165
|
info.newTop = containerPT;
|
|
@@ -191,37 +179,32 @@ const calculateOnSort = (ref) => {
|
|
|
191
179
|
if (currentLeft === containerPL) {
|
|
192
180
|
el.style.left = `${containerPL}px`;
|
|
193
181
|
currentLeft = containerPL + width;
|
|
194
|
-
currentWidth
|
|
182
|
+
currentWidth += width;
|
|
195
183
|
}
|
|
196
184
|
else {
|
|
197
185
|
el.style.left = `${currentLeft + gapX}px`;
|
|
198
186
|
currentLeft = currentLeft + gapX + width;
|
|
199
|
-
currentWidth
|
|
187
|
+
currentWidth += width + gapX;
|
|
200
188
|
}
|
|
201
189
|
}
|
|
202
|
-
if (height > maxHeight) {
|
|
203
|
-
maxHeight = height;
|
|
204
|
-
}
|
|
205
190
|
}
|
|
206
|
-
else if (params.type ===
|
|
191
|
+
else if (params.type === types.grid) {
|
|
207
192
|
if (itIndex === plIndex) {
|
|
208
193
|
const left = itIndex % params.count === 0
|
|
209
194
|
? containerPL
|
|
210
|
-
: containerPL +
|
|
211
|
-
(itIndex % params.count) * (itemWidth + gapX);
|
|
195
|
+
: containerPL + (itIndex % params.count) * (itemWidth + gapX);
|
|
212
196
|
const top = currentTop;
|
|
213
|
-
if (inProcessEl.height > colHeight)
|
|
197
|
+
if (inProcessEl.height > colHeight)
|
|
214
198
|
colHeight = inProcessEl.height;
|
|
215
|
-
}
|
|
216
199
|
if (itIndex % params.count === params.count - 1 ||
|
|
217
200
|
itIndex === itemsCount - 1) {
|
|
218
201
|
if (top === containerPT) {
|
|
219
|
-
currentHeight
|
|
202
|
+
currentHeight += colHeight;
|
|
220
203
|
}
|
|
221
204
|
else {
|
|
222
|
-
currentHeight
|
|
205
|
+
currentHeight += colHeight + gapY;
|
|
223
206
|
}
|
|
224
|
-
currentTop
|
|
207
|
+
currentTop += colHeight + gapY;
|
|
225
208
|
colHeight = 0;
|
|
226
209
|
ref.grid.style.height = `${currentHeight}px`;
|
|
227
210
|
}
|
|
@@ -234,21 +217,19 @@ const calculateOnSort = (ref) => {
|
|
|
234
217
|
if (!el.classList.contains('gs-sortable-placeholder')) {
|
|
235
218
|
const left = itIndex % params.count === 0
|
|
236
219
|
? containerPL
|
|
237
|
-
: containerPL +
|
|
238
|
-
(itIndex % params.count) * (itemWidth + gapX);
|
|
220
|
+
: containerPL + (itIndex % params.count) * (itemWidth + gapX);
|
|
239
221
|
const top = currentTop;
|
|
240
|
-
if (height > colHeight)
|
|
222
|
+
if (height > colHeight)
|
|
241
223
|
colHeight = height;
|
|
242
|
-
}
|
|
243
224
|
if (itIndex % params.count === params.count - 1 ||
|
|
244
225
|
itIndex === itemsCount - 1) {
|
|
245
226
|
if (top === containerPT) {
|
|
246
|
-
currentHeight
|
|
227
|
+
currentHeight += colHeight;
|
|
247
228
|
}
|
|
248
229
|
else {
|
|
249
|
-
currentHeight
|
|
230
|
+
currentHeight += colHeight + gapY;
|
|
250
231
|
}
|
|
251
|
-
currentTop
|
|
232
|
+
currentTop += colHeight + gapY;
|
|
252
233
|
colHeight = 0;
|
|
253
234
|
ref.grid.style.height = `${currentHeight}px`;
|
|
254
235
|
}
|
|
@@ -262,5 +243,5 @@ const calculateOnSort = (ref) => {
|
|
|
262
243
|
}
|
|
263
244
|
}
|
|
264
245
|
};
|
|
265
|
-
|
|
246
|
+
export default calculateOnSort;
|
|
266
247
|
//# sourceMappingURL=calculateOnSort.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calculateOnSort.js","sourceRoot":"","sources":["../../
|
|
1
|
+
{"version":3,"file":"calculateOnSort.js","sourceRoot":"","sources":["../../actions/calculateOnSort.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGhD,MAAM,eAAe,GAAG,CAAC,GAAQ,EAAQ,EAAE;IACzC,MAAM,MAAM,GAAG,GAAG,CAAC,aAAa,CAAC;IACjC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;QACtB,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAkB,CAAC;QAC9D,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAC9B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CACxD,CAAC,MAAM,CAAC;QAET,MAAM,IAAI,GAAG,MAAM,CAAC,kBAAmB,CAAC,aAA8B,CAAC;QACvE,IAAI,EACF,WAAW,EACX,WAAW,EACX,aAAa,EACb,YAAY,EACZ,SAAS,EACT,IAAI,EACJ,IAAI,GACL,GAAG,GAAG,CAAC,MAAO,CAAC;QAEhB,IAAI,WAAW,GAAG,WAAW,CAAC;QAC9B,IAAI,UAAU,GAAG,WAAW,CAAC;QAC7B,IAAI,SAAS,GAAG,CAAC,CAAC;QAElB,IAAI,gBAAgB,GAAG,IAAI,KAAK,SAAS,CAAC;QAC1C,IAAI,WAAqF,CAAC;QAE1F,MAAM,cAAc,GAAG,mBAAmB,CAAC,IAAI,EAAE,GAAG,CAAC,IAAK,CAAC,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,WAAW,KAAG,OAiBlE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,26 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const general_1 = require("./general");
|
|
1
|
+
import { getOffsetFromWindow } from './general';
|
|
4
2
|
const checkItemInContainer = (grid, el) => {
|
|
5
|
-
const gridOffset =
|
|
6
|
-
const elOffset =
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const elTop = elOffset.top;
|
|
10
|
-
const elLeft = elOffset.left;
|
|
11
|
-
const offsetTopFromGrid = elTop - gridTop;
|
|
12
|
-
const offsetLeftFromGrid = elLeft - gridLeft;
|
|
3
|
+
const gridOffset = getOffsetFromWindow(grid);
|
|
4
|
+
const elOffset = getOffsetFromWindow(el);
|
|
5
|
+
const offsetTopFromGrid = elOffset.top - gridOffset.top;
|
|
6
|
+
const offsetLeftFromGrid = elOffset.left - gridOffset.left;
|
|
13
7
|
const elHeight = el.offsetHeight;
|
|
14
8
|
const elWidth = el.offsetWidth;
|
|
15
9
|
const gridHeight = grid.offsetHeight;
|
|
16
10
|
const gridWidth = grid.offsetWidth;
|
|
17
|
-
|
|
11
|
+
return (offsetTopFromGrid >= (-1 * elHeight) / 2 &&
|
|
18
12
|
offsetLeftFromGrid >= (-1 * elWidth) / 2 &&
|
|
19
13
|
offsetTopFromGrid <= gridHeight - elHeight / 2 &&
|
|
20
|
-
offsetLeftFromGrid <= gridWidth - elWidth / 2)
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
return false;
|
|
14
|
+
offsetLeftFromGrid <= gridWidth - elWidth / 2);
|
|
24
15
|
};
|
|
25
|
-
|
|
16
|
+
export default checkItemInContainer;
|
|
26
17
|
//# sourceMappingURL=checkItemInContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkItemInContainer.js","sourceRoot":"","sources":["../../
|
|
1
|
+
{"version":3,"file":"checkItemInContainer.js","sourceRoot":"","sources":["../../actions/checkItemInContainer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEhD,MAAM,oBAAoB,GAAG,CAAC,IAAiB,EAAE,EAAe,EAAW,EAAE;IAC3E,MAAM,UAAU,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,QAAQ,GAAG,mBAAmB,CAAC,EAAE,CAAC,CAAC;IAEzC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC;IACxD,MAAM,kBAAkB,GAAG,QAAQ,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;IAC3D,MAAM,QAAQ,GAAG,EAAE,CAAC,YAAY,CAAC;IACjC,MAAM,OAAO,GAAG,EAAE,CAAC,WAAW,CAAC;IAC/B,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC;IACrC,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC;IAEnC,OAAO,CACL,iBAAiB,IAAI,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC;QACxC,kBAAkB,IAAI,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;QACxC,iBAAiB,IAAI,UAAU,GAAG,QAAQ,GAAG,CAAC;QAC9C,kBAAkB,IAAI,SAAS,GAAG,OAAO,GAAG,CAAC,CAC9C,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
grid: HTMLDivElement;
|
|
4
|
-
currentParams: GSSortableProps & {
|
|
5
|
-
reference: string;
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
declare const destroy: (ref: GSSortableRef) => void;
|
|
1
|
+
import { Ref } from '../types/ref';
|
|
2
|
+
declare const destroy: (ref: Ref) => void;
|
|
9
3
|
export default destroy;
|
|
4
|
+
//# sourceMappingURL=destroy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"destroy.d.ts","sourceRoot":"","sources":["../../actions/destroy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,QAAA,MAAM,OAAO,GAAI,KAAK,GAAG,KAAG,IAwB3B,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
package/dist/actions/destroy.js
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const types_1 = __importDefault(require("../constants/types"));
|
|
1
|
+
import types from '../constants/types';
|
|
7
2
|
const destroy = (ref) => {
|
|
3
|
+
// Disconnect per-item resize observers to prevent leaks
|
|
4
|
+
ref.itemResizeObservers?.forEach((obs) => obs.disconnect());
|
|
5
|
+
ref.itemResizeObservers = [];
|
|
8
6
|
ref.grid.classList.remove('gs-sortable-instance');
|
|
9
7
|
ref.grid.classList.remove(`gs-sortable-${ref.currentParams.type}`);
|
|
10
8
|
ref.grid.style.removeProperty('position');
|
|
11
9
|
ref.grid.style.removeProperty('gap');
|
|
12
10
|
ref.grid.style.removeProperty('height');
|
|
13
|
-
if (ref.currentParams.type ===
|
|
11
|
+
if (ref.currentParams.type === types.row) {
|
|
14
12
|
ref.grid.style.removeProperty('width');
|
|
15
13
|
}
|
|
16
|
-
Array.from(ref.grid.children).forEach(el => {
|
|
14
|
+
Array.from(ref.grid.children).forEach((el) => {
|
|
17
15
|
const element = el;
|
|
18
16
|
element.classList.remove('gs-sortable-item');
|
|
19
17
|
element.style.removeProperty('position');
|
|
@@ -23,5 +21,5 @@ const destroy = (ref) => {
|
|
|
23
21
|
element.style.removeProperty('transition');
|
|
24
22
|
});
|
|
25
23
|
};
|
|
26
|
-
|
|
24
|
+
export default destroy;
|
|
27
25
|
//# sourceMappingURL=destroy.js.map
|