gridstack 7.3.0 → 8.0.1
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 +9 -2
- package/dist/dd-base-impl.d.ts +20 -20
- package/dist/dd-base-impl.js +31 -35
- package/dist/dd-base-impl.js.map +1 -1
- package/dist/dd-draggable.d.ts +28 -28
- package/dist/dd-draggable.js +336 -344
- package/dist/dd-draggable.js.map +1 -1
- package/dist/dd-droppable.d.ts +26 -26
- package/dist/dd-droppable.js +146 -148
- package/dist/dd-droppable.js.map +1 -1
- package/dist/dd-element.d.ts +27 -27
- package/dist/dd-element.js +90 -94
- package/dist/dd-element.js.map +1 -1
- package/dist/dd-gridstack.d.ts +34 -34
- package/dist/dd-gridstack.js +127 -124
- package/dist/dd-gridstack.js.map +1 -1
- package/dist/dd-manager.d.ts +22 -22
- package/dist/dd-manager.js +9 -13
- package/dist/dd-manager.js.map +1 -1
- package/dist/dd-resizable-handle.d.ts +14 -14
- package/dist/dd-resizable-handle.js +102 -105
- package/dist/dd-resizable-handle.js.map +1 -1
- package/dist/dd-resizable.d.ts +28 -28
- package/dist/dd-resizable.js +290 -296
- package/dist/dd-resizable.js.map +1 -1
- package/dist/dd-touch.d.ts +33 -33
- package/dist/dd-touch.js +173 -182
- package/dist/dd-touch.js.map +1 -1
- package/dist/es5/dd-base-impl.d.ts +20 -20
- package/dist/es5/dd-base-impl.js +40 -40
- package/dist/es5/dd-base-impl.js.map +1 -1
- package/dist/es5/dd-draggable.d.ts +28 -28
- package/dist/es5/dd-draggable.js +366 -367
- package/dist/es5/dd-draggable.js.map +1 -1
- package/dist/es5/dd-droppable.d.ts +26 -26
- package/dist/es5/dd-droppable.js +181 -179
- package/dist/es5/dd-droppable.js.map +1 -1
- package/dist/es5/dd-element.d.ts +27 -27
- package/dist/es5/dd-element.js +95 -95
- package/dist/es5/dd-element.js.map +1 -1
- package/dist/es5/dd-gridstack.d.ts +34 -34
- package/dist/es5/dd-gridstack.js +144 -144
- package/dist/es5/dd-gridstack.js.map +1 -1
- package/dist/es5/dd-manager.d.ts +22 -22
- package/dist/es5/dd-manager.js +16 -16
- package/dist/es5/dd-manager.js.map +1 -1
- package/dist/es5/dd-resizable-handle.d.ts +14 -14
- package/dist/es5/dd-resizable-handle.js +105 -106
- package/dist/es5/dd-resizable-handle.js.map +1 -1
- package/dist/es5/dd-resizable.d.ts +28 -28
- package/dist/es5/dd-resizable.js +317 -318
- package/dist/es5/dd-resizable.js.map +1 -1
- package/dist/es5/dd-touch.d.ts +33 -33
- package/dist/es5/dd-touch.js +185 -185
- package/dist/es5/dd-touch.js.map +1 -1
- package/dist/es5/gridstack-all.js +1 -1
- package/dist/es5/gridstack-all.js.LICENSE.txt +1 -1
- package/dist/es5/gridstack-all.js.map +1 -1
- package/dist/es5/gridstack-engine.d.ts +102 -102
- package/dist/es5/gridstack-engine.js +1000 -995
- package/dist/es5/gridstack-engine.js.map +1 -1
- package/dist/es5/gridstack-poly.js +1 -1
- package/dist/es5/gridstack.d.ts +392 -376
- package/dist/es5/gridstack.js +2254 -2233
- package/dist/es5/gridstack.js.map +1 -1
- package/dist/es5/types.d.ts +279 -284
- package/dist/es5/types.js +47 -35
- package/dist/es5/types.js.map +1 -1
- package/dist/es5/utils.d.ts +95 -93
- package/dist/es5/utils.js +600 -569
- package/dist/es5/utils.js.map +1 -1
- package/dist/gridstack-all.js +1 -1
- package/dist/gridstack-all.js.LICENSE.txt +1 -1
- package/dist/gridstack-all.js.map +1 -1
- package/dist/gridstack-engine.d.ts +102 -102
- package/dist/gridstack-engine.js +950 -954
- package/dist/gridstack-engine.js.map +1 -1
- package/dist/gridstack-extra.css +0 -390
- package/dist/gridstack-extra.min.css +1 -1
- package/dist/gridstack.css +19 -97
- package/dist/gridstack.d.ts +392 -376
- package/dist/gridstack.js +2155 -2157
- package/dist/gridstack.js.map +1 -1
- package/dist/gridstack.min.css +1 -1
- package/dist/ng/README.md +154 -0
- package/dist/ng/gridstack-item.component.d.ts +29 -0
- package/dist/ng/gridstack-item.component.js +65 -0
- package/dist/ng/gridstack-item.component.js.map +1 -0
- package/dist/ng/gridstack.component.d.ts +118 -0
- package/dist/ng/gridstack.component.js +245 -0
- package/dist/ng/gridstack.component.js.map +1 -0
- package/dist/src/gridstack-extra.scss +0 -2
- package/dist/src/gridstack.scss +14 -9
- package/dist/types.d.ts +279 -284
- package/dist/types.js +44 -35
- package/dist/types.js.map +1 -1
- package/dist/utils.d.ts +95 -93
- package/dist/utils.js +546 -527
- package/dist/utils.js.map +1 -1
- package/{dist → dist_save}/angular/gridstack-item.component.ts +5 -3
- package/{dist → dist_save}/angular/gridstack.component.ts +32 -18
- package/dist_save/dd-base-impl.d.ts +20 -0
- package/dist_save/dd-base-impl.js +36 -0
- package/dist_save/dd-base-impl.js.map +1 -0
- package/dist_save/dd-draggable.d.ts +28 -0
- package/dist_save/dd-draggable.js +343 -0
- package/dist_save/dd-draggable.js.map +1 -0
- package/dist_save/dd-droppable.d.ts +26 -0
- package/dist_save/dd-droppable.js +149 -0
- package/dist_save/dd-droppable.js.map +1 -0
- package/dist_save/dd-element.d.ts +27 -0
- package/dist_save/dd-element.js +95 -0
- package/dist_save/dd-element.js.map +1 -0
- package/dist_save/dd-gridstack.d.ts +34 -0
- package/dist_save/dd-gridstack.js +125 -0
- package/dist_save/dd-gridstack.js.map +1 -0
- package/dist_save/dd-manager.d.ts +22 -0
- package/dist_save/dd-manager.js +14 -0
- package/dist_save/dd-manager.js.map +1 -0
- package/dist_save/dd-resizable-handle.d.ts +14 -0
- package/dist_save/dd-resizable-handle.js +106 -0
- package/dist_save/dd-resizable-handle.js.map +1 -0
- package/dist_save/dd-resizable.d.ts +28 -0
- package/dist_save/dd-resizable.js +294 -0
- package/dist_save/dd-resizable.js.map +1 -0
- package/dist_save/dd-touch.d.ts +33 -0
- package/dist_save/dd-touch.js +183 -0
- package/dist_save/dd-touch.js.map +1 -0
- package/dist_save/es5/dd-base-impl.d.ts +20 -0
- package/dist_save/es5/dd-base-impl.js +41 -0
- package/dist_save/es5/dd-base-impl.js.map +1 -0
- package/dist_save/es5/dd-draggable.d.ts +28 -0
- package/dist_save/es5/dd-draggable.js +366 -0
- package/dist_save/es5/dd-draggable.js.map +1 -0
- package/dist_save/es5/dd-droppable.d.ts +26 -0
- package/dist_save/es5/dd-droppable.js +180 -0
- package/dist_save/es5/dd-droppable.js.map +1 -0
- package/dist_save/es5/dd-element.d.ts +27 -0
- package/dist_save/es5/dd-element.js +96 -0
- package/dist_save/es5/dd-element.js.map +1 -0
- package/dist_save/es5/dd-gridstack.d.ts +34 -0
- package/dist_save/es5/dd-gridstack.js +145 -0
- package/dist_save/es5/dd-gridstack.js.map +1 -0
- package/dist_save/es5/dd-manager.d.ts +22 -0
- package/dist_save/es5/dd-manager.js +17 -0
- package/dist_save/es5/dd-manager.js.map +1 -0
- package/dist_save/es5/dd-resizable-handle.d.ts +14 -0
- package/dist_save/es5/dd-resizable-handle.js +107 -0
- package/dist_save/es5/dd-resizable-handle.js.map +1 -0
- package/dist_save/es5/dd-resizable.d.ts +28 -0
- package/dist_save/es5/dd-resizable.js +316 -0
- package/dist_save/es5/dd-resizable.js.map +1 -0
- package/dist_save/es5/dd-touch.d.ts +33 -0
- package/dist_save/es5/dd-touch.js +186 -0
- package/dist_save/es5/dd-touch.js.map +1 -0
- package/dist_save/es5/gridstack-all.js +3 -0
- package/dist_save/es5/gridstack-all.js.LICENSE.txt +7 -0
- package/dist_save/es5/gridstack-all.js.map +1 -0
- package/dist_save/es5/gridstack-engine.d.ts +102 -0
- package/dist_save/es5/gridstack-engine.js +997 -0
- package/dist_save/es5/gridstack-engine.js.map +1 -0
- package/dist_save/es5/gridstack-poly.js +356 -0
- package/dist_save/es5/gridstack.d.ts +376 -0
- package/dist_save/es5/gridstack.js +2238 -0
- package/dist_save/es5/gridstack.js.map +1 -0
- package/dist_save/es5/types.d.ts +284 -0
- package/dist_save/es5/types.js +36 -0
- package/dist_save/es5/types.js.map +1 -0
- package/dist_save/es5/utils.d.ts +95 -0
- package/dist_save/es5/utils.js +590 -0
- package/dist_save/es5/utils.js.map +1 -0
- package/dist_save/gridstack-all.js +3 -0
- package/dist_save/gridstack-all.js.LICENSE.txt +7 -0
- package/dist_save/gridstack-all.js.map +1 -0
- package/dist_save/gridstack-engine.d.ts +102 -0
- package/dist_save/gridstack-engine.js +956 -0
- package/dist_save/gridstack-engine.js.map +1 -0
- package/dist_save/gridstack-extra.css +433 -0
- package/dist_save/gridstack-extra.min.css +1 -0
- package/dist_save/gridstack.css +226 -0
- package/dist_save/gridstack.d.ts +376 -0
- package/dist_save/gridstack.js +2162 -0
- package/dist_save/gridstack.js.map +1 -0
- package/dist_save/gridstack.min.css +1 -0
- package/dist_save/src/gridstack-extra.scss +27 -0
- package/dist_save/src/gridstack.scss +131 -0
- package/dist_save/types.d.ts +284 -0
- package/dist_save/types.js +36 -0
- package/dist_save/types.js.map +1 -0
- package/dist_save/utils.d.ts +95 -0
- package/dist_save/utils.js +548 -0
- package/dist_save/utils.js.map +1 -0
- package/doc/CHANGES.md +20 -0
- package/doc/README.md +21 -14
- package/package.json +25 -24
- /package/{dist → dist_save}/angular/README.md +0 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gridstack SASS styles 7.3.0-dev
|
|
3
|
+
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
|
|
4
|
+
*/
|
|
5
|
+
:root .grid-stack-item > .ui-resizable-handle {
|
|
6
|
+
filter: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.grid-stack {
|
|
10
|
+
position: relative;
|
|
11
|
+
}
|
|
12
|
+
.grid-stack.grid-stack-rtl {
|
|
13
|
+
direction: ltr;
|
|
14
|
+
}
|
|
15
|
+
.grid-stack.grid-stack-rtl > .grid-stack-item {
|
|
16
|
+
direction: rtl;
|
|
17
|
+
}
|
|
18
|
+
.grid-stack .grid-stack-placeholder > .placeholder-content {
|
|
19
|
+
background-color: rgba(0, 0, 0, 0.1);
|
|
20
|
+
margin: 0;
|
|
21
|
+
position: absolute;
|
|
22
|
+
width: auto;
|
|
23
|
+
z-index: 0 !important;
|
|
24
|
+
text-align: center;
|
|
25
|
+
}
|
|
26
|
+
.grid-stack > .grid-stack-item {
|
|
27
|
+
min-width: 8.3333333333%;
|
|
28
|
+
position: absolute;
|
|
29
|
+
padding: 0;
|
|
30
|
+
}
|
|
31
|
+
.grid-stack > .grid-stack-item > .grid-stack-item-content {
|
|
32
|
+
margin: 0;
|
|
33
|
+
position: absolute;
|
|
34
|
+
width: auto;
|
|
35
|
+
overflow-x: hidden;
|
|
36
|
+
overflow-y: auto;
|
|
37
|
+
}
|
|
38
|
+
.grid-stack > .grid-stack-item > .ui-resizable-handle {
|
|
39
|
+
position: absolute;
|
|
40
|
+
font-size: 0.1px;
|
|
41
|
+
display: block;
|
|
42
|
+
-ms-touch-action: none;
|
|
43
|
+
touch-action: none;
|
|
44
|
+
}
|
|
45
|
+
.grid-stack > .grid-stack-item.ui-resizable-disabled > .ui-resizable-handle, .grid-stack > .grid-stack-item.ui-resizable-autohide > .ui-resizable-handle {
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
.grid-stack > .grid-stack-item > .ui-resizable-se,
|
|
49
|
+
.grid-stack > .grid-stack-item > .ui-resizable-sw {
|
|
50
|
+
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iMCAwIDUxMS42MjYgNTExLjYyNyIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTExLjYyNiA1MTEuNjI3OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggZD0iTTMyOC45MDYsNDAxLjk5NGgtMzYuNTUzVjEwOS42MzZoMzYuNTUzYzQuOTQ4LDAsOS4yMzYtMS44MDksMTIuODQ3LTUuNDI2YzMuNjEzLTMuNjE1LDUuNDIxLTcuODk4LDUuNDIxLTEyLjg0NSAgIGMwLTQuOTQ5LTEuODAxLTkuMjMxLTUuNDI4LTEyLjg1MWwtNzMuMDg3LTczLjA5QzI2NS4wNDQsMS44MDksMjYwLjc2LDAsMjU1LjgxMywwYy00Ljk0OCwwLTkuMjI5LDEuODA5LTEyLjg0Nyw1LjQyNCAgIGwtNzMuMDg4LDczLjA5Yy0zLjYxOCwzLjYxOS01LjQyNCw3LjkwMi01LjQyNCwxMi44NTFjMCw0Ljk0NiwxLjgwNyw5LjIyOSw1LjQyNCwxMi44NDVjMy42MTksMy42MTcsNy45MDEsNS40MjYsMTIuODUsNS40MjYgICBoMzYuNTQ1djI5Mi4zNThoLTM2LjU0MmMtNC45NTIsMC05LjIzNSwxLjgwOC0xMi44NSw1LjQyMWMtMy42MTcsMy42MjEtNS40MjQsNy45MDUtNS40MjQsMTIuODU0ICAgYzAsNC45NDUsMS44MDcsOS4yMjcsNS40MjQsMTIuODQ3bDczLjA4OSw3My4wODhjMy42MTcsMy42MTcsNy44OTgsNS40MjQsMTIuODQ3LDUuNDI0YzQuOTUsMCw5LjIzNC0xLjgwNywxMi44NDktNS40MjQgICBsNzMuMDg3LTczLjA4OGMzLjYxMy0zLjYyLDUuNDIxLTcuOTAxLDUuNDIxLTEyLjg0N2MwLTQuOTQ4LTEuODA4LTkuMjMyLTUuNDIxLTEyLjg1NCAgIEMzMzguMTQyLDQwMy44MDIsMzMzLjg1Nyw0MDEuOTk0LDMyOC45MDYsNDAxLjk5NHoiIGZpbGw9IiM2NjY2NjYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K);
|
|
51
|
+
background-repeat: no-repeat;
|
|
52
|
+
background-position: center;
|
|
53
|
+
}
|
|
54
|
+
.grid-stack > .grid-stack-item > .ui-resizable-sw {
|
|
55
|
+
-webkit-transform: rotate(45deg);
|
|
56
|
+
-moz-transform: rotate(45deg);
|
|
57
|
+
-ms-transform: rotate(45deg);
|
|
58
|
+
-o-transform: rotate(45deg);
|
|
59
|
+
transform: rotate(45deg);
|
|
60
|
+
}
|
|
61
|
+
.grid-stack > .grid-stack-item > .ui-resizable-se {
|
|
62
|
+
-webkit-transform: rotate(-45deg);
|
|
63
|
+
-moz-transform: rotate(-45deg);
|
|
64
|
+
-ms-transform: rotate(-45deg);
|
|
65
|
+
-o-transform: rotate(-45deg);
|
|
66
|
+
transform: rotate(-45deg);
|
|
67
|
+
}
|
|
68
|
+
.grid-stack > .grid-stack-item > .ui-resizable-nw {
|
|
69
|
+
cursor: nw-resize;
|
|
70
|
+
width: 20px;
|
|
71
|
+
height: 20px;
|
|
72
|
+
top: 0;
|
|
73
|
+
}
|
|
74
|
+
.grid-stack > .grid-stack-item > .ui-resizable-n {
|
|
75
|
+
cursor: n-resize;
|
|
76
|
+
height: 10px;
|
|
77
|
+
top: 0;
|
|
78
|
+
left: 25px;
|
|
79
|
+
right: 25px;
|
|
80
|
+
}
|
|
81
|
+
.grid-stack > .grid-stack-item > .ui-resizable-ne {
|
|
82
|
+
cursor: ne-resize;
|
|
83
|
+
width: 20px;
|
|
84
|
+
height: 20px;
|
|
85
|
+
top: 0;
|
|
86
|
+
}
|
|
87
|
+
.grid-stack > .grid-stack-item > .ui-resizable-e {
|
|
88
|
+
cursor: e-resize;
|
|
89
|
+
width: 10px;
|
|
90
|
+
top: 15px;
|
|
91
|
+
bottom: 15px;
|
|
92
|
+
}
|
|
93
|
+
.grid-stack > .grid-stack-item > .ui-resizable-se {
|
|
94
|
+
cursor: se-resize;
|
|
95
|
+
width: 20px;
|
|
96
|
+
height: 20px;
|
|
97
|
+
}
|
|
98
|
+
.grid-stack > .grid-stack-item > .ui-resizable-s {
|
|
99
|
+
cursor: s-resize;
|
|
100
|
+
height: 10px;
|
|
101
|
+
left: 25px;
|
|
102
|
+
bottom: 0;
|
|
103
|
+
right: 25px;
|
|
104
|
+
}
|
|
105
|
+
.grid-stack > .grid-stack-item > .ui-resizable-sw {
|
|
106
|
+
cursor: sw-resize;
|
|
107
|
+
width: 20px;
|
|
108
|
+
height: 20px;
|
|
109
|
+
}
|
|
110
|
+
.grid-stack > .grid-stack-item > .ui-resizable-w {
|
|
111
|
+
cursor: w-resize;
|
|
112
|
+
width: 10px;
|
|
113
|
+
top: 15px;
|
|
114
|
+
bottom: 15px;
|
|
115
|
+
}
|
|
116
|
+
.grid-stack > .grid-stack-item.ui-draggable-dragging > .ui-resizable-handle {
|
|
117
|
+
display: none !important;
|
|
118
|
+
}
|
|
119
|
+
.grid-stack > .grid-stack-item[gs-x="0"] {
|
|
120
|
+
left: 0%;
|
|
121
|
+
}
|
|
122
|
+
.grid-stack > .grid-stack-item[gs-w="1"] {
|
|
123
|
+
width: 8.3333333333%;
|
|
124
|
+
}
|
|
125
|
+
.grid-stack > .grid-stack-item[gs-x="1"] {
|
|
126
|
+
left: 8.3333333333%;
|
|
127
|
+
}
|
|
128
|
+
.grid-stack > .grid-stack-item[gs-w="2"] {
|
|
129
|
+
width: 16.6666666667%;
|
|
130
|
+
}
|
|
131
|
+
.grid-stack > .grid-stack-item[gs-x="2"] {
|
|
132
|
+
left: 16.6666666667%;
|
|
133
|
+
}
|
|
134
|
+
.grid-stack > .grid-stack-item[gs-w="3"] {
|
|
135
|
+
width: 25%;
|
|
136
|
+
}
|
|
137
|
+
.grid-stack > .grid-stack-item[gs-x="3"] {
|
|
138
|
+
left: 25%;
|
|
139
|
+
}
|
|
140
|
+
.grid-stack > .grid-stack-item[gs-w="4"] {
|
|
141
|
+
width: 33.3333333333%;
|
|
142
|
+
}
|
|
143
|
+
.grid-stack > .grid-stack-item[gs-x="4"] {
|
|
144
|
+
left: 33.3333333333%;
|
|
145
|
+
}
|
|
146
|
+
.grid-stack > .grid-stack-item[gs-w="5"] {
|
|
147
|
+
width: 41.6666666667%;
|
|
148
|
+
}
|
|
149
|
+
.grid-stack > .grid-stack-item[gs-x="5"] {
|
|
150
|
+
left: 41.6666666667%;
|
|
151
|
+
}
|
|
152
|
+
.grid-stack > .grid-stack-item[gs-w="6"] {
|
|
153
|
+
width: 50%;
|
|
154
|
+
}
|
|
155
|
+
.grid-stack > .grid-stack-item[gs-x="6"] {
|
|
156
|
+
left: 50%;
|
|
157
|
+
}
|
|
158
|
+
.grid-stack > .grid-stack-item[gs-w="7"] {
|
|
159
|
+
width: 58.3333333333%;
|
|
160
|
+
}
|
|
161
|
+
.grid-stack > .grid-stack-item[gs-x="7"] {
|
|
162
|
+
left: 58.3333333333%;
|
|
163
|
+
}
|
|
164
|
+
.grid-stack > .grid-stack-item[gs-w="8"] {
|
|
165
|
+
width: 66.6666666667%;
|
|
166
|
+
}
|
|
167
|
+
.grid-stack > .grid-stack-item[gs-x="8"] {
|
|
168
|
+
left: 66.6666666667%;
|
|
169
|
+
}
|
|
170
|
+
.grid-stack > .grid-stack-item[gs-w="9"] {
|
|
171
|
+
width: 75%;
|
|
172
|
+
}
|
|
173
|
+
.grid-stack > .grid-stack-item[gs-x="9"] {
|
|
174
|
+
left: 75%;
|
|
175
|
+
}
|
|
176
|
+
.grid-stack > .grid-stack-item[gs-w="10"] {
|
|
177
|
+
width: 83.3333333333%;
|
|
178
|
+
}
|
|
179
|
+
.grid-stack > .grid-stack-item[gs-x="10"] {
|
|
180
|
+
left: 83.3333333333%;
|
|
181
|
+
}
|
|
182
|
+
.grid-stack > .grid-stack-item[gs-w="11"] {
|
|
183
|
+
width: 91.6666666667%;
|
|
184
|
+
}
|
|
185
|
+
.grid-stack > .grid-stack-item[gs-x="11"] {
|
|
186
|
+
left: 91.6666666667%;
|
|
187
|
+
}
|
|
188
|
+
.grid-stack > .grid-stack-item[gs-w="12"] {
|
|
189
|
+
width: 100%;
|
|
190
|
+
}
|
|
191
|
+
.grid-stack.grid-stack-1 > .grid-stack-item {
|
|
192
|
+
min-width: 100%;
|
|
193
|
+
}
|
|
194
|
+
.grid-stack.grid-stack-animate, .grid-stack.grid-stack-animate .grid-stack-item {
|
|
195
|
+
-webkit-transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s;
|
|
196
|
+
-moz-transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s;
|
|
197
|
+
-ms-transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s;
|
|
198
|
+
-o-transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s;
|
|
199
|
+
transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s;
|
|
200
|
+
}
|
|
201
|
+
.grid-stack.grid-stack-animate .grid-stack-item.ui-draggable-dragging, .grid-stack.grid-stack-animate .grid-stack-item.ui-resizable-resizing, .grid-stack.grid-stack-animate .grid-stack-item.grid-stack-placeholder {
|
|
202
|
+
-webkit-transition: left 0s, top 0s, height 0s, width 0s;
|
|
203
|
+
-moz-transition: left 0s, top 0s, height 0s, width 0s;
|
|
204
|
+
-ms-transition: left 0s, top 0s, height 0s, width 0s;
|
|
205
|
+
-o-transition: left 0s, top 0s, height 0s, width 0s;
|
|
206
|
+
transition: left 0s, top 0s, height 0s, width 0s;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.ui-draggable-dragging,
|
|
210
|
+
.ui-resizable-resizing {
|
|
211
|
+
z-index: 100;
|
|
212
|
+
}
|
|
213
|
+
.ui-draggable-dragging > .grid-stack-item-content,
|
|
214
|
+
.ui-resizable-resizing > .grid-stack-item-content {
|
|
215
|
+
box-shadow: 1px 4px 6px rgba(0, 0, 0, 0.2);
|
|
216
|
+
opacity: 0.8;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.ui-draggable-dragging {
|
|
220
|
+
will-change: left, top;
|
|
221
|
+
cursor: move;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.ui-resizable-resizing {
|
|
225
|
+
will-change: width, height;
|
|
226
|
+
}
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* GridStack 7.3.0-dev
|
|
3
|
+
* https://gridstackjs.com/
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2021-2022 Alain Dumesny
|
|
6
|
+
* see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
|
|
7
|
+
*/
|
|
8
|
+
import { GridStackEngine } from './gridstack-engine';
|
|
9
|
+
import { Utils } from './utils';
|
|
10
|
+
import { ColumnOptions, GridItemHTMLElement, GridStackElement, GridStackEventHandlerCallback, GridStackNode, GridStackWidget, numberOrString, DDDragInOpt, GridStackOptions, AddRemoveFcn } from './types';
|
|
11
|
+
import { DDGridStack } from './dd-gridstack';
|
|
12
|
+
export * from './types';
|
|
13
|
+
export * from './utils';
|
|
14
|
+
export * from './gridstack-engine';
|
|
15
|
+
export * from './dd-gridstack';
|
|
16
|
+
export interface GridHTMLElement extends HTMLElement {
|
|
17
|
+
gridstack?: GridStack;
|
|
18
|
+
}
|
|
19
|
+
/** list of possible events, or space separated list of them */
|
|
20
|
+
export declare type GridStackEvent = 'added' | 'change' | 'disable' | 'drag' | 'dragstart' | 'dragstop' | 'dropped' | 'enable' | 'removed' | 'resize' | 'resizestart' | 'resizestop' | string;
|
|
21
|
+
/** Defines the coordinates of an object */
|
|
22
|
+
export interface MousePosition {
|
|
23
|
+
top: number;
|
|
24
|
+
left: number;
|
|
25
|
+
}
|
|
26
|
+
/** Defines the position of a cell inside the grid*/
|
|
27
|
+
export interface CellPosition {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Main gridstack class - you will need to call `GridStack.init()` first to initialize your grid.
|
|
33
|
+
* Note: your grid elements MUST have the following classes for the CSS layout to work:
|
|
34
|
+
* @example
|
|
35
|
+
* <div class="grid-stack">
|
|
36
|
+
* <div class="grid-stack-item">
|
|
37
|
+
* <div class="grid-stack-item-content">Item 1</div>
|
|
38
|
+
* </div>
|
|
39
|
+
* </div>
|
|
40
|
+
*/
|
|
41
|
+
export declare class GridStack {
|
|
42
|
+
/**
|
|
43
|
+
* initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
|
|
44
|
+
* simply return the existing instance (ignore any passed options). There is also an initAll() version that support
|
|
45
|
+
* multiple grids initialization at once. Or you can use addGrid() to create the entire grid from JSON.
|
|
46
|
+
* @param options grid options (optional)
|
|
47
|
+
* @param elOrString element or CSS selector (first one used) to convert to a grid (default to '.grid-stack' class selector)
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* let grid = GridStack.init();
|
|
51
|
+
*
|
|
52
|
+
* Note: the HTMLElement (of type GridHTMLElement) will store a `gridstack: GridStack` value that can be retrieve later
|
|
53
|
+
* let grid = document.querySelector('.grid-stack').gridstack;
|
|
54
|
+
*/
|
|
55
|
+
static init(options?: GridStackOptions, elOrString?: GridStackElement): GridStack;
|
|
56
|
+
/**
|
|
57
|
+
* Will initialize a list of elements (given a selector) and return an array of grids.
|
|
58
|
+
* @param options grid options (optional)
|
|
59
|
+
* @param selector elements selector to convert to grids (default to '.grid-stack' class selector)
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* let grids = GridStack.initAll();
|
|
63
|
+
* grids.forEach(...)
|
|
64
|
+
*/
|
|
65
|
+
static initAll(options?: GridStackOptions, selector?: string): GridStack[];
|
|
66
|
+
/**
|
|
67
|
+
* call to create a grid with the given options, including loading any children from JSON structure. This will call GridStack.init(), then
|
|
68
|
+
* grid.load() on any passed children (recursively). Great alternative to calling init() if you want entire grid to come from
|
|
69
|
+
* JSON serialized data, including options.
|
|
70
|
+
* @param parent HTML element parent to the grid
|
|
71
|
+
* @param opt grids options used to initialize the grid, and list of children
|
|
72
|
+
*/
|
|
73
|
+
static addGrid(parent: HTMLElement, opt?: GridStackOptions): GridStack;
|
|
74
|
+
/** call this method to register your engine instead of the default one.
|
|
75
|
+
* See instead `GridStackOptions.engineClass` if you only need to
|
|
76
|
+
* replace just one instance.
|
|
77
|
+
*/
|
|
78
|
+
static registerEngine(engineClass: typeof GridStackEngine): void;
|
|
79
|
+
/** scoping so users can call GridStack.Utils.sort() for example */
|
|
80
|
+
static Utils: typeof Utils;
|
|
81
|
+
/** scoping so users can call new GridStack.Engine(12) for example */
|
|
82
|
+
static Engine: typeof GridStackEngine;
|
|
83
|
+
/** the HTML element tied to this grid after it's been initialized */
|
|
84
|
+
el: GridHTMLElement;
|
|
85
|
+
/** engine used to implement non DOM grid functionality */
|
|
86
|
+
engine: GridStackEngine;
|
|
87
|
+
/** grid options - public for classes to access, but use methods to modify! */
|
|
88
|
+
opts: GridStackOptions;
|
|
89
|
+
/** point to a parent grid item if we're nested (inside a grid-item in between 2 Grids) */
|
|
90
|
+
parentGridItem?: GridStackNode;
|
|
91
|
+
protected static engineClass: typeof GridStackEngine;
|
|
92
|
+
/**
|
|
93
|
+
* Construct a grid item from the given element and options
|
|
94
|
+
* @param el
|
|
95
|
+
* @param opts
|
|
96
|
+
*/
|
|
97
|
+
constructor(el: GridHTMLElement, opts?: GridStackOptions);
|
|
98
|
+
/**
|
|
99
|
+
* add a new widget and returns it.
|
|
100
|
+
*
|
|
101
|
+
* Widget will be always placed even if result height is more than actual grid height.
|
|
102
|
+
* You need to use `willItFit()` before calling addWidget for additional check.
|
|
103
|
+
* See also `makeWidget()`.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* let grid = GridStack.init();
|
|
107
|
+
* grid.addWidget({w: 3, content: 'hello'});
|
|
108
|
+
* grid.addWidget('<div class="grid-stack-item"><div class="grid-stack-item-content">hello</div></div>', {w: 3});
|
|
109
|
+
*
|
|
110
|
+
* @param el GridStackWidget (which can have content string as well), html element, or string definition to add
|
|
111
|
+
* @param options widget position/size options (optional, and ignore if first param is already option) - see GridStackWidget
|
|
112
|
+
*/
|
|
113
|
+
addWidget(els?: GridStackWidget | GridStackElement, options?: GridStackWidget): GridItemHTMLElement;
|
|
114
|
+
/**
|
|
115
|
+
* Convert an existing gridItem element into a sub-grid with the given (optional) options, else inherit them
|
|
116
|
+
* from the parent's subGrid options.
|
|
117
|
+
* @param el gridItem element to convert
|
|
118
|
+
* @param ops (optional) sub-grid options, else default to node, then parent settings, else defaults
|
|
119
|
+
* @param nodeToAdd (optional) node to add to the newly created sub grid (used when dragging over existing regular item)
|
|
120
|
+
* @returns newly created grid
|
|
121
|
+
*/
|
|
122
|
+
makeSubGrid(el: GridItemHTMLElement, ops?: GridStackOptions, nodeToAdd?: GridStackNode, saveContent?: boolean): GridStack;
|
|
123
|
+
/**
|
|
124
|
+
* called when an item was converted into a nested grid to accommodate a dragged over item, but then item leaves - return back
|
|
125
|
+
* to the original grid-item. Also called to remove empty sub-grids when last item is dragged out (since re-creating is simple)
|
|
126
|
+
*/
|
|
127
|
+
removeAsSubGrid(nodeThatRemoved?: GridStackNode): void;
|
|
128
|
+
/**
|
|
129
|
+
/**
|
|
130
|
+
* saves the current layout returning a list of widgets for serialization which might include any nested grids.
|
|
131
|
+
* @param saveContent if true (default) the latest html inside .grid-stack-content will be saved to GridStackWidget.content field, else it will
|
|
132
|
+
* be removed.
|
|
133
|
+
* @param saveGridOpt if true (default false), save the grid options itself, so you can call the new GridStack.addGrid()
|
|
134
|
+
* to recreate everything from scratch. GridStackOptions.children would then contain the widget list instead.
|
|
135
|
+
* @returns list of widgets or full grid option, including .children list of widgets
|
|
136
|
+
*/
|
|
137
|
+
save(saveContent?: boolean, saveGridOpt?: boolean): GridStackWidget[] | GridStackOptions;
|
|
138
|
+
/**
|
|
139
|
+
* load the widgets from a list. This will call update() on each (matching by id) or add/remove widgets that are not there.
|
|
140
|
+
*
|
|
141
|
+
* @param layout list of widgets definition to update/create
|
|
142
|
+
* @param addAndRemove boolean (default true) or callback method can be passed to control if and how missing widgets can be added/removed, giving
|
|
143
|
+
* the user control of insertion.
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* see http://gridstackjs.com/demo/serialization.html
|
|
147
|
+
**/
|
|
148
|
+
load(layout: GridStackWidget[], addRemove?: boolean | AddRemoveFcn): GridStack;
|
|
149
|
+
/**
|
|
150
|
+
* use before calling a bunch of `addWidget()` to prevent un-necessary relayouts in between (more efficient)
|
|
151
|
+
* and get a single event callback. You will see no changes until `batchUpdate(false)` is called.
|
|
152
|
+
*/
|
|
153
|
+
batchUpdate(flag?: boolean): GridStack;
|
|
154
|
+
/**
|
|
155
|
+
* Gets current cell height.
|
|
156
|
+
*/
|
|
157
|
+
getCellHeight(forcePixel?: boolean): number;
|
|
158
|
+
/**
|
|
159
|
+
* Update current cell height - see `GridStackOptions.cellHeight` for format.
|
|
160
|
+
* This method rebuilds an internal CSS style sheet.
|
|
161
|
+
* Note: You can expect performance issues if call this method too often.
|
|
162
|
+
*
|
|
163
|
+
* @param val the cell height. If not passed (undefined), cells content will be made square (match width minus margin),
|
|
164
|
+
* if pass 0 the CSS will be generated by the application instead.
|
|
165
|
+
* @param update (Optional) if false, styles will not be updated
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* grid.cellHeight(100); // same as 100px
|
|
169
|
+
* grid.cellHeight('70px');
|
|
170
|
+
* grid.cellHeight(grid.cellWidth() * 1.2);
|
|
171
|
+
*/
|
|
172
|
+
cellHeight(val?: numberOrString, update?: boolean): GridStack;
|
|
173
|
+
/** Gets current cell width. */
|
|
174
|
+
cellWidth(): number;
|
|
175
|
+
/** return our expected width (or parent) for 1 column check */
|
|
176
|
+
protected _widthOrContainer(): number;
|
|
177
|
+
/** re-layout grid items to reclaim any empty space */
|
|
178
|
+
compact(): GridStack;
|
|
179
|
+
/**
|
|
180
|
+
* set the number of columns in the grid. Will update existing widgets to conform to new number of columns,
|
|
181
|
+
* as well as cache the original layout so you can revert back to previous positions without loss.
|
|
182
|
+
* Requires `gridstack-extra.css` or `gridstack-extra.min.css` for [2-11],
|
|
183
|
+
* else you will need to generate correct CSS (see https://github.com/gridstack/gridstack.js#change-grid-columns)
|
|
184
|
+
* @param column - Integer > 0 (default 12).
|
|
185
|
+
* @param layout specify the type of re-layout that will happen (position, size, etc...).
|
|
186
|
+
* Note: items will never be outside of the current column boundaries. default (moveScale). Ignored for 1 column
|
|
187
|
+
*/
|
|
188
|
+
column(column: number, layout?: ColumnOptions): GridStack;
|
|
189
|
+
/**
|
|
190
|
+
* get the number of columns in the grid (default 12)
|
|
191
|
+
*/
|
|
192
|
+
getColumn(): number;
|
|
193
|
+
/** returns an array of grid HTML elements (no placeholder) - used to iterate through our children in DOM order */
|
|
194
|
+
getGridItems(): GridItemHTMLElement[];
|
|
195
|
+
/**
|
|
196
|
+
* Destroys a grid instance. DO NOT CALL any methods or access any vars after this as it will free up members.
|
|
197
|
+
* @param removeDOM if `false` grid and items HTML elements will not be removed from the DOM (Optional. Default `true`).
|
|
198
|
+
*/
|
|
199
|
+
destroy(removeDOM?: boolean): GridStack;
|
|
200
|
+
/**
|
|
201
|
+
* enable/disable floating widgets (default: `false`) See [example](http://gridstackjs.com/demo/float.html)
|
|
202
|
+
*/
|
|
203
|
+
float(val: boolean): GridStack;
|
|
204
|
+
/**
|
|
205
|
+
* get the current float mode
|
|
206
|
+
*/
|
|
207
|
+
getFloat(): boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Get the position of the cell under a pixel on screen.
|
|
210
|
+
* @param position the position of the pixel to resolve in
|
|
211
|
+
* absolute coordinates, as an object with top and left properties
|
|
212
|
+
* @param useDocRelative if true, value will be based on document position vs parent position (Optional. Default false).
|
|
213
|
+
* Useful when grid is within `position: relative` element
|
|
214
|
+
*
|
|
215
|
+
* Returns an object with properties `x` and `y` i.e. the column and row in the grid.
|
|
216
|
+
*/
|
|
217
|
+
getCellFromPixel(position: MousePosition, useDocRelative?: boolean): CellPosition;
|
|
218
|
+
/** returns the current number of rows, which will be at least `minRow` if set */
|
|
219
|
+
getRow(): number;
|
|
220
|
+
/**
|
|
221
|
+
* Checks if specified area is empty.
|
|
222
|
+
* @param x the position x.
|
|
223
|
+
* @param y the position y.
|
|
224
|
+
* @param w the width of to check
|
|
225
|
+
* @param h the height of to check
|
|
226
|
+
*/
|
|
227
|
+
isAreaEmpty(x: number, y: number, w: number, h: number): boolean;
|
|
228
|
+
/**
|
|
229
|
+
* If you add elements to your grid by hand, you have to tell gridstack afterwards to make them widgets.
|
|
230
|
+
* If you want gridstack to add the elements for you, use `addWidget()` instead.
|
|
231
|
+
* Makes the given element a widget and returns it.
|
|
232
|
+
* @param els widget or single selector to convert.
|
|
233
|
+
*
|
|
234
|
+
* @example
|
|
235
|
+
* let grid = GridStack.init();
|
|
236
|
+
* grid.el.appendChild('<div id="gsi-1" gs-w="3"></div>');
|
|
237
|
+
* grid.makeWidget('#gsi-1');
|
|
238
|
+
*/
|
|
239
|
+
makeWidget(els: GridStackElement): GridItemHTMLElement;
|
|
240
|
+
/**
|
|
241
|
+
* Event handler that extracts our CustomEvent data out automatically for receiving custom
|
|
242
|
+
* notifications (see doc for supported events)
|
|
243
|
+
* @param name of the event (see possible values) or list of names space separated
|
|
244
|
+
* @param callback function called with event and optional second/third param
|
|
245
|
+
* (see README documentation for each signature).
|
|
246
|
+
*
|
|
247
|
+
* @example
|
|
248
|
+
* grid.on('added', function(e, items) { log('added ', items)} );
|
|
249
|
+
* or
|
|
250
|
+
* grid.on('added removed change', function(e, items) { log(e.type, items)} );
|
|
251
|
+
*
|
|
252
|
+
* Note: in some cases it is the same as calling native handler and parsing the event.
|
|
253
|
+
* grid.el.addEventListener('added', function(event) { log('added ', event.detail)} );
|
|
254
|
+
*
|
|
255
|
+
*/
|
|
256
|
+
on(name: GridStackEvent, callback: GridStackEventHandlerCallback): GridStack;
|
|
257
|
+
/**
|
|
258
|
+
* unsubscribe from the 'on' event below
|
|
259
|
+
* @param name of the event (see possible values)
|
|
260
|
+
*/
|
|
261
|
+
off(name: GridStackEvent): GridStack;
|
|
262
|
+
/**
|
|
263
|
+
* Removes widget from the grid.
|
|
264
|
+
* @param el widget or selector to modify
|
|
265
|
+
* @param removeDOM if `false` DOM element won't be removed from the tree (Default? true).
|
|
266
|
+
* @param triggerEvent if `false` (quiet mode) element will not be added to removed list and no 'removed' callbacks will be called (Default? true).
|
|
267
|
+
*/
|
|
268
|
+
removeWidget(els: GridStackElement, removeDOM?: boolean, triggerEvent?: boolean): GridStack;
|
|
269
|
+
/**
|
|
270
|
+
* Removes all widgets from the grid.
|
|
271
|
+
* @param removeDOM if `false` DOM elements won't be removed from the tree (Default? `true`).
|
|
272
|
+
*/
|
|
273
|
+
removeAll(removeDOM?: boolean): GridStack;
|
|
274
|
+
/**
|
|
275
|
+
* Toggle the grid animation state. Toggles the `grid-stack-animate` class.
|
|
276
|
+
* @param doAnimate if true the grid will animate.
|
|
277
|
+
*/
|
|
278
|
+
setAnimation(doAnimate: boolean): GridStack;
|
|
279
|
+
/**
|
|
280
|
+
* Toggle the grid static state, which permanently removes/add Drag&Drop support, unlike disable()/enable() that just turns it off/on.
|
|
281
|
+
* Also toggle the grid-stack-static class.
|
|
282
|
+
* @param val if true the grid become static.
|
|
283
|
+
* @param updateClass true (default) if css class gets updated
|
|
284
|
+
* @param recurse true (default) if sub-grids also get updated
|
|
285
|
+
*/
|
|
286
|
+
setStatic(val: boolean, updateClass?: boolean, recurse?: boolean): GridStack;
|
|
287
|
+
/**
|
|
288
|
+
* Updates widget position/size and other info. Note: if you need to call this on all nodes, use load() instead which will update what changed.
|
|
289
|
+
* @param els widget or selector of objects to modify (note: setting the same x,y for multiple items will be indeterministic and likely unwanted)
|
|
290
|
+
* @param opt new widget options (x,y,w,h, etc..). Only those set will be updated.
|
|
291
|
+
*/
|
|
292
|
+
update(els: GridStackElement, opt: GridStackWidget): GridStack;
|
|
293
|
+
/**
|
|
294
|
+
* Updates the margins which will set all 4 sides at once - see `GridStackOptions.margin` for format options (CSS string format of 1,2,4 values or single number).
|
|
295
|
+
* @param value margin value
|
|
296
|
+
*/
|
|
297
|
+
margin(value: numberOrString): GridStack;
|
|
298
|
+
/** returns current margin number value (undefined if 4 sides don't match) */
|
|
299
|
+
getMargin(): number;
|
|
300
|
+
/**
|
|
301
|
+
* Returns true if the height of the grid will be less than the vertical
|
|
302
|
+
* constraint. Always returns true if grid doesn't have height constraint.
|
|
303
|
+
* @param node contains x,y,w,h,auto-position options
|
|
304
|
+
*
|
|
305
|
+
* @example
|
|
306
|
+
* if (grid.willItFit(newWidget)) {
|
|
307
|
+
* grid.addWidget(newWidget);
|
|
308
|
+
* } else {
|
|
309
|
+
* alert('Not enough free space to place the widget');
|
|
310
|
+
* }
|
|
311
|
+
*/
|
|
312
|
+
willItFit(node: GridStackWidget): boolean;
|
|
313
|
+
/**
|
|
314
|
+
* called when we are being resized by the window - check if the one Column Mode needs to be turned on/off
|
|
315
|
+
* and remember the prev columns we used, or get our count from parent, as well as check for auto cell height (square)
|
|
316
|
+
*/
|
|
317
|
+
onParentResize(): GridStack;
|
|
318
|
+
/** add or remove the window size event handler */
|
|
319
|
+
protected _updateWindowResizeEvent(forceRemove?: boolean): GridStack;
|
|
320
|
+
static GDRev: string;
|
|
321
|
+
/** get the global (but static to this code) DD implementation */
|
|
322
|
+
static getDD(): DDGridStack;
|
|
323
|
+
/**
|
|
324
|
+
* call to setup dragging in from the outside (say toolbar), by specifying the class selection and options.
|
|
325
|
+
* Called during GridStack.init() as options, but can also be called directly (last param are used) in case the toolbar
|
|
326
|
+
* is dynamically create and needs to be set later.
|
|
327
|
+
* @param dragIn string selector (ex: '.sidebar .grid-stack-item')
|
|
328
|
+
* @param dragInOptions options - see DDDragInOpt. (default: {handle: '.grid-stack-item-content', appendTo: 'body'}
|
|
329
|
+
**/
|
|
330
|
+
static setupDragIn(dragIn?: string, dragInOptions?: DDDragInOpt): void;
|
|
331
|
+
/**
|
|
332
|
+
* Enables/Disables dragging by the user of specific grid element. If you want all items, and have it affect future items, use enableMove() instead. No-op for static grids.
|
|
333
|
+
* IF you are looking to prevent an item from moving (due to being pushed around by another during collision) use locked property instead.
|
|
334
|
+
* @param els widget or selector to modify.
|
|
335
|
+
* @param val if true widget will be draggable.
|
|
336
|
+
*/
|
|
337
|
+
movable(els: GridStackElement, val: boolean): GridStack;
|
|
338
|
+
/**
|
|
339
|
+
* Enables/Disables user resizing of specific grid element. If you want all items, and have it affect future items, use enableResize() instead. No-op for static grids.
|
|
340
|
+
* @param els widget or selector to modify
|
|
341
|
+
* @param val if true widget will be resizable.
|
|
342
|
+
*/
|
|
343
|
+
resizable(els: GridStackElement, val: boolean): GridStack;
|
|
344
|
+
/**
|
|
345
|
+
* Temporarily disables widgets moving/resizing.
|
|
346
|
+
* If you want a more permanent way (which freezes up resources) use `setStatic(true)` instead.
|
|
347
|
+
* Note: no-op for static grid
|
|
348
|
+
* This is a shortcut for:
|
|
349
|
+
* @example
|
|
350
|
+
* grid.enableMove(false);
|
|
351
|
+
* grid.enableResize(false);
|
|
352
|
+
* @param recurse true (default) if sub-grids also get updated
|
|
353
|
+
*/
|
|
354
|
+
disable(recurse?: boolean): GridStack;
|
|
355
|
+
/**
|
|
356
|
+
* Re-enables widgets moving/resizing - see disable().
|
|
357
|
+
* Note: no-op for static grid.
|
|
358
|
+
* This is a shortcut for:
|
|
359
|
+
* @example
|
|
360
|
+
* grid.enableMove(true);
|
|
361
|
+
* grid.enableResize(true);
|
|
362
|
+
* @param recurse true (default) if sub-grids also get updated
|
|
363
|
+
*/
|
|
364
|
+
enable(recurse?: boolean): GridStack;
|
|
365
|
+
/**
|
|
366
|
+
* Enables/disables widget moving. No-op for static grids.
|
|
367
|
+
* @param recurse true (default) if sub-grids also get updated
|
|
368
|
+
*/
|
|
369
|
+
enableMove(doEnable: boolean, recurse?: boolean): GridStack;
|
|
370
|
+
/**
|
|
371
|
+
* Enables/disables widget resizing. No-op for static grids.
|
|
372
|
+
* @param recurse true (default) if sub-grids also get updated
|
|
373
|
+
*/
|
|
374
|
+
enableResize(doEnable: boolean, recurse?: boolean): GridStack;
|
|
375
|
+
commit(): GridStack;
|
|
376
|
+
}
|