gridstack 8.0.0 → 8.1.0

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.
Files changed (193) hide show
  1. package/README.md +14 -11
  2. package/dist/dd-base-impl.d.ts +1 -1
  3. package/dist/dd-base-impl.js +1 -1
  4. package/dist/dd-base-impl.js.map +1 -1
  5. package/dist/dd-draggable.d.ts +3 -2
  6. package/dist/dd-draggable.js +10 -9
  7. package/dist/dd-draggable.js.map +1 -1
  8. package/dist/dd-droppable.d.ts +1 -1
  9. package/dist/dd-droppable.js +1 -1
  10. package/dist/dd-droppable.js.map +1 -1
  11. package/dist/dd-element.d.ts +1 -1
  12. package/dist/dd-element.js +1 -1
  13. package/dist/dd-element.js.map +1 -1
  14. package/dist/dd-gridstack.d.ts +1 -1
  15. package/dist/dd-gridstack.js +1 -1
  16. package/dist/dd-gridstack.js.map +1 -1
  17. package/dist/dd-manager.d.ts +1 -1
  18. package/dist/dd-manager.js +1 -1
  19. package/dist/dd-manager.js.map +1 -1
  20. package/dist/dd-resizable-handle.d.ts +1 -1
  21. package/dist/dd-resizable-handle.js +1 -1
  22. package/dist/dd-resizable-handle.js.map +1 -1
  23. package/dist/dd-resizable.d.ts +1 -1
  24. package/dist/dd-resizable.js +1 -1
  25. package/dist/dd-resizable.js.map +1 -1
  26. package/dist/dd-touch.d.ts +1 -1
  27. package/dist/dd-touch.js +1 -1
  28. package/dist/dd-touch.js.map +1 -1
  29. package/dist/es5/dd-base-impl.d.ts +1 -1
  30. package/dist/es5/dd-base-impl.js +1 -1
  31. package/dist/es5/dd-base-impl.js.map +1 -1
  32. package/dist/es5/dd-draggable.d.ts +3 -2
  33. package/dist/es5/dd-draggable.js +10 -9
  34. package/dist/es5/dd-draggable.js.map +1 -1
  35. package/dist/es5/dd-droppable.d.ts +1 -1
  36. package/dist/es5/dd-droppable.js +1 -1
  37. package/dist/es5/dd-droppable.js.map +1 -1
  38. package/dist/es5/dd-element.d.ts +1 -1
  39. package/dist/es5/dd-element.js +1 -1
  40. package/dist/es5/dd-element.js.map +1 -1
  41. package/dist/es5/dd-gridstack.d.ts +1 -1
  42. package/dist/es5/dd-gridstack.js +1 -1
  43. package/dist/es5/dd-gridstack.js.map +1 -1
  44. package/dist/es5/dd-manager.d.ts +1 -1
  45. package/dist/es5/dd-manager.js +1 -1
  46. package/dist/es5/dd-manager.js.map +1 -1
  47. package/dist/es5/dd-resizable-handle.d.ts +1 -1
  48. package/dist/es5/dd-resizable-handle.js +1 -1
  49. package/dist/es5/dd-resizable-handle.js.map +1 -1
  50. package/dist/es5/dd-resizable.d.ts +1 -1
  51. package/dist/es5/dd-resizable.js +1 -1
  52. package/dist/es5/dd-resizable.js.map +1 -1
  53. package/dist/es5/dd-touch.d.ts +1 -1
  54. package/dist/es5/dd-touch.js +1 -1
  55. package/dist/es5/dd-touch.js.map +1 -1
  56. package/dist/es5/gridstack-all.js +1 -1
  57. package/dist/es5/gridstack-all.js.LICENSE.txt +1 -1
  58. package/dist/es5/gridstack-all.js.map +1 -1
  59. package/dist/es5/gridstack-engine.d.ts +1 -1
  60. package/dist/es5/gridstack-engine.js +1 -1
  61. package/dist/es5/gridstack-engine.js.map +1 -1
  62. package/dist/es5/gridstack-poly.js +1 -1
  63. package/dist/es5/gridstack.d.ts +6 -3
  64. package/dist/es5/gridstack.js +18 -25
  65. package/dist/es5/gridstack.js.map +1 -1
  66. package/dist/es5/types.d.ts +5 -3
  67. package/dist/es5/types.js +1 -1
  68. package/dist/es5/types.js.map +1 -1
  69. package/dist/es5/utils.d.ts +6 -6
  70. package/dist/es5/utils.js +31 -20
  71. package/dist/es5/utils.js.map +1 -1
  72. package/dist/gridstack-all.js +1 -1
  73. package/dist/gridstack-all.js.LICENSE.txt +1 -1
  74. package/dist/gridstack-all.js.map +1 -1
  75. package/dist/gridstack-engine.d.ts +1 -1
  76. package/dist/gridstack-engine.js +1 -1
  77. package/dist/gridstack-engine.js.map +1 -1
  78. package/dist/gridstack-extra.css +180 -240
  79. package/dist/gridstack-extra.min.css +1 -1
  80. package/dist/gridstack.css +99 -106
  81. package/dist/gridstack.d.ts +6 -3
  82. package/dist/gridstack.js +16 -25
  83. package/dist/gridstack.js.map +1 -1
  84. package/dist/gridstack.min.css +1 -1
  85. package/dist/ng/gridstack-item.component.d.ts +1 -1
  86. package/dist/ng/gridstack-item.component.js +1 -1
  87. package/dist/ng/gridstack.component.d.ts +1 -1
  88. package/dist/ng/gridstack.component.js +1 -1
  89. package/dist/src/gridstack-extra.scss +9 -11
  90. package/dist/src/gridstack.scss +108 -89
  91. package/dist/types.d.ts +5 -3
  92. package/dist/types.js +1 -1
  93. package/dist/types.js.map +1 -1
  94. package/dist/utils.d.ts +6 -6
  95. package/dist/utils.js +29 -20
  96. package/dist/utils.js.map +1 -1
  97. package/doc/CHANGES.md +15 -0
  98. package/doc/README.md +8 -14
  99. package/package.json +1 -1
  100. package/dist_save/angular/README.md +0 -94
  101. package/dist_save/angular/gridstack-item.component.ts +0 -72
  102. package/dist_save/angular/gridstack.component.ts +0 -199
  103. package/dist_save/dd-base-impl.d.ts +0 -20
  104. package/dist_save/dd-base-impl.js +0 -36
  105. package/dist_save/dd-base-impl.js.map +0 -1
  106. package/dist_save/dd-draggable.d.ts +0 -28
  107. package/dist_save/dd-draggable.js +0 -343
  108. package/dist_save/dd-draggable.js.map +0 -1
  109. package/dist_save/dd-droppable.d.ts +0 -26
  110. package/dist_save/dd-droppable.js +0 -149
  111. package/dist_save/dd-droppable.js.map +0 -1
  112. package/dist_save/dd-element.d.ts +0 -27
  113. package/dist_save/dd-element.js +0 -95
  114. package/dist_save/dd-element.js.map +0 -1
  115. package/dist_save/dd-gridstack.d.ts +0 -34
  116. package/dist_save/dd-gridstack.js +0 -125
  117. package/dist_save/dd-gridstack.js.map +0 -1
  118. package/dist_save/dd-manager.d.ts +0 -22
  119. package/dist_save/dd-manager.js +0 -14
  120. package/dist_save/dd-manager.js.map +0 -1
  121. package/dist_save/dd-resizable-handle.d.ts +0 -14
  122. package/dist_save/dd-resizable-handle.js +0 -106
  123. package/dist_save/dd-resizable-handle.js.map +0 -1
  124. package/dist_save/dd-resizable.d.ts +0 -28
  125. package/dist_save/dd-resizable.js +0 -294
  126. package/dist_save/dd-resizable.js.map +0 -1
  127. package/dist_save/dd-touch.d.ts +0 -33
  128. package/dist_save/dd-touch.js +0 -183
  129. package/dist_save/dd-touch.js.map +0 -1
  130. package/dist_save/es5/dd-base-impl.d.ts +0 -20
  131. package/dist_save/es5/dd-base-impl.js +0 -41
  132. package/dist_save/es5/dd-base-impl.js.map +0 -1
  133. package/dist_save/es5/dd-draggable.d.ts +0 -28
  134. package/dist_save/es5/dd-draggable.js +0 -366
  135. package/dist_save/es5/dd-draggable.js.map +0 -1
  136. package/dist_save/es5/dd-droppable.d.ts +0 -26
  137. package/dist_save/es5/dd-droppable.js +0 -180
  138. package/dist_save/es5/dd-droppable.js.map +0 -1
  139. package/dist_save/es5/dd-element.d.ts +0 -27
  140. package/dist_save/es5/dd-element.js +0 -96
  141. package/dist_save/es5/dd-element.js.map +0 -1
  142. package/dist_save/es5/dd-gridstack.d.ts +0 -34
  143. package/dist_save/es5/dd-gridstack.js +0 -145
  144. package/dist_save/es5/dd-gridstack.js.map +0 -1
  145. package/dist_save/es5/dd-manager.d.ts +0 -22
  146. package/dist_save/es5/dd-manager.js +0 -17
  147. package/dist_save/es5/dd-manager.js.map +0 -1
  148. package/dist_save/es5/dd-resizable-handle.d.ts +0 -14
  149. package/dist_save/es5/dd-resizable-handle.js +0 -107
  150. package/dist_save/es5/dd-resizable-handle.js.map +0 -1
  151. package/dist_save/es5/dd-resizable.d.ts +0 -28
  152. package/dist_save/es5/dd-resizable.js +0 -316
  153. package/dist_save/es5/dd-resizable.js.map +0 -1
  154. package/dist_save/es5/dd-touch.d.ts +0 -33
  155. package/dist_save/es5/dd-touch.js +0 -186
  156. package/dist_save/es5/dd-touch.js.map +0 -1
  157. package/dist_save/es5/gridstack-all.js +0 -3
  158. package/dist_save/es5/gridstack-all.js.LICENSE.txt +0 -7
  159. package/dist_save/es5/gridstack-all.js.map +0 -1
  160. package/dist_save/es5/gridstack-engine.d.ts +0 -102
  161. package/dist_save/es5/gridstack-engine.js +0 -997
  162. package/dist_save/es5/gridstack-engine.js.map +0 -1
  163. package/dist_save/es5/gridstack-poly.js +0 -356
  164. package/dist_save/es5/gridstack.d.ts +0 -376
  165. package/dist_save/es5/gridstack.js +0 -2238
  166. package/dist_save/es5/gridstack.js.map +0 -1
  167. package/dist_save/es5/types.d.ts +0 -284
  168. package/dist_save/es5/types.js +0 -36
  169. package/dist_save/es5/types.js.map +0 -1
  170. package/dist_save/es5/utils.d.ts +0 -95
  171. package/dist_save/es5/utils.js +0 -590
  172. package/dist_save/es5/utils.js.map +0 -1
  173. package/dist_save/gridstack-all.js +0 -3
  174. package/dist_save/gridstack-all.js.LICENSE.txt +0 -7
  175. package/dist_save/gridstack-all.js.map +0 -1
  176. package/dist_save/gridstack-engine.d.ts +0 -102
  177. package/dist_save/gridstack-engine.js +0 -956
  178. package/dist_save/gridstack-engine.js.map +0 -1
  179. package/dist_save/gridstack-extra.css +0 -433
  180. package/dist_save/gridstack-extra.min.css +0 -1
  181. package/dist_save/gridstack.css +0 -226
  182. package/dist_save/gridstack.d.ts +0 -376
  183. package/dist_save/gridstack.js +0 -2162
  184. package/dist_save/gridstack.js.map +0 -1
  185. package/dist_save/gridstack.min.css +0 -1
  186. package/dist_save/src/gridstack-extra.scss +0 -27
  187. package/dist_save/src/gridstack.scss +0 -131
  188. package/dist_save/types.d.ts +0 -284
  189. package/dist_save/types.js +0 -36
  190. package/dist_save/types.js.map +0 -1
  191. package/dist_save/utils.d.ts +0 -95
  192. package/dist_save/utils.js +0 -548
  193. package/dist_save/utils.js.map +0 -1
@@ -1,30 +1,27 @@
1
1
  /**
2
- * gridstack SASS styles 8.0.0
2
+ * gridstack SASS styles 8.1.0
3
3
  * Copyright (c) 2021 Alain Dumesny - see GridStack root license
4
4
  */
5
- :root .grid-stack-item > .ui-resizable-handle {
6
- filter: none;
7
- }
8
-
9
5
  .grid-stack {
10
6
  position: relative;
11
7
  }
12
- .grid-stack.grid-stack-rtl {
8
+
9
+ .grid-stack-rtl {
13
10
  direction: ltr;
14
11
  }
15
- .grid-stack.grid-stack-rtl > .grid-stack-item {
12
+ .grid-stack-rtl > .grid-stack-item {
16
13
  direction: rtl;
17
14
  }
18
- .grid-stack .grid-stack-placeholder > .placeholder-content {
15
+
16
+ .grid-stack-placeholder > .placeholder-content {
19
17
  background-color: rgba(0, 0, 0, 0.1);
20
18
  margin: 0;
21
19
  position: absolute;
22
20
  width: auto;
23
21
  z-index: 0 !important;
24
- text-align: center;
25
22
  }
23
+
26
24
  .grid-stack > .grid-stack-item {
27
- min-width: 8.3333333333%;
28
25
  position: absolute;
29
26
  padding: 0;
30
27
  }
@@ -35,192 +32,188 @@
35
32
  overflow-x: hidden;
36
33
  overflow-y: auto;
37
34
  }
38
- .grid-stack > .grid-stack-item > .ui-resizable-handle {
35
+
36
+ .grid-stack-item > .ui-resizable-handle {
39
37
  position: absolute;
40
38
  font-size: 0.1px;
41
39
  display: block;
42
40
  -ms-touch-action: none;
43
41
  touch-action: none;
44
42
  }
45
- .grid-stack > .grid-stack-item.ui-resizable-disabled > .ui-resizable-handle, .grid-stack > .grid-stack-item.ui-resizable-autohide > .ui-resizable-handle {
43
+ .grid-stack-item.ui-resizable-disabled > .ui-resizable-handle, .grid-stack-item.ui-resizable-autohide > .ui-resizable-handle {
46
44
  display: none;
47
45
  }
48
- .grid-stack > .grid-stack-item > .ui-resizable-se,
49
- .grid-stack > .grid-stack-item > .ui-resizable-sw {
46
+ .grid-stack-item > .ui-resizable-ne,
47
+ .grid-stack-item > .ui-resizable-nw,
48
+ .grid-stack-item > .ui-resizable-se,
49
+ .grid-stack-item > .ui-resizable-sw {
50
50
  background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iMCAwIDUxMS42MjYgNTExLjYyNyIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTExLjYyNiA1MTEuNjI3OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggZD0iTTMyOC45MDYsNDAxLjk5NGgtMzYuNTUzVjEwOS42MzZoMzYuNTUzYzQuOTQ4LDAsOS4yMzYtMS44MDksMTIuODQ3LTUuNDI2YzMuNjEzLTMuNjE1LDUuNDIxLTcuODk4LDUuNDIxLTEyLjg0NSAgIGMwLTQuOTQ5LTEuODAxLTkuMjMxLTUuNDI4LTEyLjg1MWwtNzMuMDg3LTczLjA5QzI2NS4wNDQsMS44MDksMjYwLjc2LDAsMjU1LjgxMywwYy00Ljk0OCwwLTkuMjI5LDEuODA5LTEyLjg0Nyw1LjQyNCAgIGwtNzMuMDg4LDczLjA5Yy0zLjYxOCwzLjYxOS01LjQyNCw3LjkwMi01LjQyNCwxMi44NTFjMCw0Ljk0NiwxLjgwNyw5LjIyOSw1LjQyNCwxMi44NDVjMy42MTksMy42MTcsNy45MDEsNS40MjYsMTIuODUsNS40MjYgICBoMzYuNTQ1djI5Mi4zNThoLTM2LjU0MmMtNC45NTIsMC05LjIzNSwxLjgwOC0xMi44NSw1LjQyMWMtMy42MTcsMy42MjEtNS40MjQsNy45MDUtNS40MjQsMTIuODU0ICAgYzAsNC45NDUsMS44MDcsOS4yMjcsNS40MjQsMTIuODQ3bDczLjA4OSw3My4wODhjMy42MTcsMy42MTcsNy44OTgsNS40MjQsMTIuODQ3LDUuNDI0YzQuOTUsMCw5LjIzNC0xLjgwNywxMi44NDktNS40MjQgICBsNzMuMDg3LTczLjA4OGMzLjYxMy0zLjYyLDUuNDIxLTcuOTAxLDUuNDIxLTEyLjg0N2MwLTQuOTQ4LTEuODA4LTkuMjMyLTUuNDIxLTEyLjg1NCAgIEMzMzguMTQyLDQwMy44MDIsMzMzLjg1Nyw0MDEuOTk0LDMyOC45MDYsNDAxLjk5NHoiIGZpbGw9IiM2NjY2NjYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K);
51
51
  background-repeat: no-repeat;
52
52
  background-position: center;
53
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);
54
+ .grid-stack-item > .ui-resizable-ne {
55
+ transform: translate(0, 10px) rotate(45deg);
56
+ }
57
+ .grid-stack-item > .ui-resizable-sw {
59
58
  transform: rotate(45deg);
60
59
  }
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);
60
+ .grid-stack-item > .ui-resizable-nw {
61
+ transform: translate(0, 10px) rotate(-45deg);
62
+ }
63
+ .grid-stack-item > .ui-resizable-se {
66
64
  transform: rotate(-45deg);
67
65
  }
68
- .grid-stack > .grid-stack-item > .ui-resizable-nw {
66
+ .grid-stack-item > .ui-resizable-nw {
69
67
  cursor: nw-resize;
70
68
  width: 20px;
71
69
  height: 20px;
72
70
  top: 0;
73
71
  }
74
- .grid-stack > .grid-stack-item > .ui-resizable-n {
72
+ .grid-stack-item > .ui-resizable-n {
75
73
  cursor: n-resize;
76
74
  height: 10px;
77
75
  top: 0;
78
76
  left: 25px;
79
77
  right: 25px;
80
78
  }
81
- .grid-stack > .grid-stack-item > .ui-resizable-ne {
79
+ .grid-stack-item > .ui-resizable-ne {
82
80
  cursor: ne-resize;
83
81
  width: 20px;
84
82
  height: 20px;
85
83
  top: 0;
86
84
  }
87
- .grid-stack > .grid-stack-item > .ui-resizable-e {
85
+ .grid-stack-item > .ui-resizable-e {
88
86
  cursor: e-resize;
89
87
  width: 10px;
90
88
  top: 15px;
91
89
  bottom: 15px;
92
90
  }
93
- .grid-stack > .grid-stack-item > .ui-resizable-se {
91
+ .grid-stack-item > .ui-resizable-se {
94
92
  cursor: se-resize;
95
93
  width: 20px;
96
94
  height: 20px;
97
95
  }
98
- .grid-stack > .grid-stack-item > .ui-resizable-s {
96
+ .grid-stack-item > .ui-resizable-s {
99
97
  cursor: s-resize;
100
98
  height: 10px;
101
99
  left: 25px;
102
100
  bottom: 0;
103
101
  right: 25px;
104
102
  }
105
- .grid-stack > .grid-stack-item > .ui-resizable-sw {
103
+ .grid-stack-item > .ui-resizable-sw {
106
104
  cursor: sw-resize;
107
105
  width: 20px;
108
106
  height: 20px;
109
107
  }
110
- .grid-stack > .grid-stack-item > .ui-resizable-w {
108
+ .grid-stack-item > .ui-resizable-w {
111
109
  cursor: w-resize;
112
110
  width: 10px;
113
111
  top: 15px;
114
112
  bottom: 15px;
115
113
  }
116
- .grid-stack > .grid-stack-item.ui-draggable-dragging > .ui-resizable-handle {
114
+ .grid-stack-item.ui-draggable-dragging > .ui-resizable-handle {
117
115
  display: none !important;
118
116
  }
117
+ .grid-stack-item.ui-draggable-dragging, .grid-stack-item.ui-resizable-resizing {
118
+ z-index: 100;
119
+ }
120
+ .grid-stack-item.ui-draggable-dragging > .grid-stack-item-content, .grid-stack-item.ui-resizable-resizing > .grid-stack-item-content {
121
+ box-shadow: 1px 4px 6px rgba(0, 0, 0, 0.2);
122
+ opacity: 0.8;
123
+ }
124
+ .grid-stack-item.ui-draggable-dragging {
125
+ will-change: left, top;
126
+ cursor: move;
127
+ }
128
+ .grid-stack-item.ui-resizable-resizing {
129
+ will-change: width, height;
130
+ }
131
+
132
+ .grid-stack-animate,
133
+ .grid-stack-animate .grid-stack-item {
134
+ transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s;
135
+ }
136
+
137
+ .grid-stack-animate .grid-stack-item.ui-draggable-dragging,
138
+ .grid-stack-animate .grid-stack-item.ui-resizable-resizing,
139
+ .grid-stack-animate .grid-stack-item.grid-stack-placeholder {
140
+ transition: left 0s, top 0s, height 0s, width 0s;
141
+ }
142
+
119
143
  .grid-stack > .grid-stack-item[gs-x="0"] {
120
144
  left: 0%;
121
145
  }
122
- .grid-stack > .grid-stack-item[gs-w="1"] {
123
- width: 8.3333333333%;
146
+
147
+ .grid-stack-12 > .grid-stack-item {
148
+ min-width: 8.333%;
124
149
  }
125
- .grid-stack > .grid-stack-item[gs-x="1"] {
126
- left: 8.3333333333%;
150
+ .grid-stack-12 > .grid-stack-item[gs-x="1"] {
151
+ left: 8.333%;
127
152
  }
128
- .grid-stack > .grid-stack-item[gs-w="2"] {
129
- width: 16.6666666667%;
153
+ .grid-stack-12 > .grid-stack-item[gs-w="2"] {
154
+ width: 16.667%;
130
155
  }
131
- .grid-stack > .grid-stack-item[gs-x="2"] {
132
- left: 16.6666666667%;
156
+ .grid-stack-12 > .grid-stack-item[gs-x="2"] {
157
+ left: 16.667%;
133
158
  }
134
- .grid-stack > .grid-stack-item[gs-w="3"] {
159
+ .grid-stack-12 > .grid-stack-item[gs-w="3"] {
135
160
  width: 25%;
136
161
  }
137
- .grid-stack > .grid-stack-item[gs-x="3"] {
162
+ .grid-stack-12 > .grid-stack-item[gs-x="3"] {
138
163
  left: 25%;
139
164
  }
140
- .grid-stack > .grid-stack-item[gs-w="4"] {
141
- width: 33.3333333333%;
165
+ .grid-stack-12 > .grid-stack-item[gs-w="4"] {
166
+ width: 33.333%;
142
167
  }
143
- .grid-stack > .grid-stack-item[gs-x="4"] {
144
- left: 33.3333333333%;
168
+ .grid-stack-12 > .grid-stack-item[gs-x="4"] {
169
+ left: 33.333%;
145
170
  }
146
- .grid-stack > .grid-stack-item[gs-w="5"] {
147
- width: 41.6666666667%;
171
+ .grid-stack-12 > .grid-stack-item[gs-w="5"] {
172
+ width: 41.667%;
148
173
  }
149
- .grid-stack > .grid-stack-item[gs-x="5"] {
150
- left: 41.6666666667%;
174
+ .grid-stack-12 > .grid-stack-item[gs-x="5"] {
175
+ left: 41.667%;
151
176
  }
152
- .grid-stack > .grid-stack-item[gs-w="6"] {
177
+ .grid-stack-12 > .grid-stack-item[gs-w="6"] {
153
178
  width: 50%;
154
179
  }
155
- .grid-stack > .grid-stack-item[gs-x="6"] {
180
+ .grid-stack-12 > .grid-stack-item[gs-x="6"] {
156
181
  left: 50%;
157
182
  }
158
- .grid-stack > .grid-stack-item[gs-w="7"] {
159
- width: 58.3333333333%;
183
+ .grid-stack-12 > .grid-stack-item[gs-w="7"] {
184
+ width: 58.333%;
160
185
  }
161
- .grid-stack > .grid-stack-item[gs-x="7"] {
162
- left: 58.3333333333%;
186
+ .grid-stack-12 > .grid-stack-item[gs-x="7"] {
187
+ left: 58.333%;
163
188
  }
164
- .grid-stack > .grid-stack-item[gs-w="8"] {
165
- width: 66.6666666667%;
189
+ .grid-stack-12 > .grid-stack-item[gs-w="8"] {
190
+ width: 66.667%;
166
191
  }
167
- .grid-stack > .grid-stack-item[gs-x="8"] {
168
- left: 66.6666666667%;
192
+ .grid-stack-12 > .grid-stack-item[gs-x="8"] {
193
+ left: 66.667%;
169
194
  }
170
- .grid-stack > .grid-stack-item[gs-w="9"] {
195
+ .grid-stack-12 > .grid-stack-item[gs-w="9"] {
171
196
  width: 75%;
172
197
  }
173
- .grid-stack > .grid-stack-item[gs-x="9"] {
198
+ .grid-stack-12 > .grid-stack-item[gs-x="9"] {
174
199
  left: 75%;
175
200
  }
176
- .grid-stack > .grid-stack-item[gs-w="10"] {
177
- width: 83.3333333333%;
201
+ .grid-stack-12 > .grid-stack-item[gs-w="10"] {
202
+ width: 83.333%;
178
203
  }
179
- .grid-stack > .grid-stack-item[gs-x="10"] {
180
- left: 83.3333333333%;
204
+ .grid-stack-12 > .grid-stack-item[gs-x="10"] {
205
+ left: 83.333%;
181
206
  }
182
- .grid-stack > .grid-stack-item[gs-w="11"] {
183
- width: 91.6666666667%;
207
+ .grid-stack-12 > .grid-stack-item[gs-w="11"] {
208
+ width: 91.667%;
184
209
  }
185
- .grid-stack > .grid-stack-item[gs-x="11"] {
186
- left: 91.6666666667%;
210
+ .grid-stack-12 > .grid-stack-item[gs-x="11"] {
211
+ left: 91.667%;
187
212
  }
188
- .grid-stack > .grid-stack-item[gs-w="12"] {
213
+ .grid-stack-12 > .grid-stack-item[gs-w="12"] {
189
214
  width: 100%;
190
215
  }
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
216
 
219
- .ui-draggable-dragging {
220
- will-change: left, top;
221
- cursor: move;
222
- }
223
-
224
- .ui-resizable-resizing {
225
- will-change: width, height;
217
+ .grid-stack-1 > .grid-stack-item {
218
+ min-width: 100%;
226
219
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * GridStack 8.0.0
2
+ * GridStack 8.1.0
3
3
  * https://gridstackjs.com/
4
4
  *
5
5
  * Copyright (c) 2021-2022 Alain Dumesny
@@ -272,6 +272,8 @@ export declare class GridStack {
272
272
  * @param name of the event (see possible values)
273
273
  */
274
274
  off(name: GridStackEvent): GridStack;
275
+ /** remove all event handlers */
276
+ offAll(): GridStack;
275
277
  /**
276
278
  * Removes widget from the grid.
277
279
  * @param el widget or selector to modify
@@ -337,10 +339,11 @@ export declare class GridStack {
337
339
  * call to setup dragging in from the outside (say toolbar), by specifying the class selection and options.
338
340
  * Called during GridStack.init() as options, but can also be called directly (last param are used) in case the toolbar
339
341
  * is dynamically create and needs to be set later.
340
- * @param dragIn string selector (ex: '.sidebar .grid-stack-item')
342
+ * @param dragIn string selector (ex: '.sidebar .grid-stack-item') or list of dom elements
341
343
  * @param dragInOptions options - see DDDragInOpt. (default: {handle: '.grid-stack-item-content', appendTo: 'body'}
344
+ * @param root optional root which defaults to document (for shadow dom pas the parent HTMLDocument)
342
345
  **/
343
- static setupDragIn(dragIn?: string, dragInOptions?: DDDragInOpt): void;
346
+ static setupDragIn(dragIn?: string | HTMLElement[], dragInOptions?: DDDragInOpt, root?: HTMLElement | Document): void;
344
347
  /**
345
348
  * 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.
346
349
  * IF you are looking to prevent an item from moving (due to being pushed around by another during collision) use locked property instead.
package/dist/gridstack.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * GridStack 8.0.0
2
+ * GridStack 8.1.0
3
3
  * https://gridstackjs.com/
4
4
  *
5
5
  * Copyright (c) 2021-2022 Alain Dumesny
@@ -79,8 +79,6 @@ class GridStack {
79
79
  GridStack.getGridElements(selector).forEach(el => {
80
80
  if (!el.gridstack) {
81
81
  el.gridstack = new GridStack(el, Utils.cloneDeep(options));
82
- delete options.dragIn;
83
- delete options.dragInOptions; // only need to be done once (really a static global thing, not per grid)
84
82
  }
85
83
  grids.push(el.gridstack);
86
84
  });
@@ -173,13 +171,6 @@ class GridStack {
173
171
  if (opts.column === 'auto') {
174
172
  delete opts.column;
175
173
  }
176
- // 'minWidth' legacy support in 5.1
177
- /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
178
- let anyOpts = opts;
179
- if (anyOpts.minWidth !== undefined) {
180
- opts.oneColumnSize = opts.oneColumnSize || anyOpts.minWidth;
181
- delete anyOpts.minWidth;
182
- }
183
174
  // save original setting so we can restore on save
184
175
  if (opts.alwaysShowResizeHandle !== undefined) {
185
176
  opts._alwaysShowResizeHandle = opts.alwaysShowResizeHandle;
@@ -280,14 +271,7 @@ class GridStack {
280
271
  }
281
272
  this.setAnimation(this.opts.animate);
282
273
  this._updateStyles();
283
- if (this.opts.column != 12) {
284
- this.el.classList.add('grid-stack-' + this.opts.column);
285
- }
286
- // legacy support to appear 'per grid` options when really global.
287
- if (this.opts.dragIn)
288
- GridStack.setupDragIn(this.opts.dragIn, this.opts.dragInOptions);
289
- delete this.opts.dragIn;
290
- delete this.opts.dragInOptions;
274
+ this.el.classList.add('grid-stack-' + this.opts.column);
291
275
  // dynamic grids require pausing during drag to detect over to nest vs push
292
276
  if (this.opts.subGridDynamic && !DDManager.pauseDrag)
293
277
  DDManager.pauseDrag = true;
@@ -772,6 +756,7 @@ class GridStack {
772
756
  destroy(removeDOM = true) {
773
757
  if (!this.el)
774
758
  return; // prevent multiple calls
759
+ this.offAll();
775
760
  this._updateWindowResizeEvent(true);
776
761
  this.setStatic(true, false); // permanently removes DD but don't set CSS class (we're going away)
777
762
  this.setAnimation(false);
@@ -934,6 +919,11 @@ class GridStack {
934
919
  delete this._gsEventHandler[name];
935
920
  return this;
936
921
  }
922
+ /** remove all event handlers */
923
+ offAll() {
924
+ Object.keys(this._gsEventHandler).forEach(key => this.off(key));
925
+ return this;
926
+ }
937
927
  /**
938
928
  * Removes widget from the grid.
939
929
  * @param el widget or selector to modify
@@ -1516,20 +1506,21 @@ class GridStack {
1516
1506
  * call to setup dragging in from the outside (say toolbar), by specifying the class selection and options.
1517
1507
  * Called during GridStack.init() as options, but can also be called directly (last param are used) in case the toolbar
1518
1508
  * is dynamically create and needs to be set later.
1519
- * @param dragIn string selector (ex: '.sidebar .grid-stack-item')
1509
+ * @param dragIn string selector (ex: '.sidebar .grid-stack-item') or list of dom elements
1520
1510
  * @param dragInOptions options - see DDDragInOpt. (default: {handle: '.grid-stack-item-content', appendTo: 'body'}
1511
+ * @param root optional root which defaults to document (for shadow dom pas the parent HTMLDocument)
1521
1512
  **/
1522
- static setupDragIn(dragIn, dragInOptions) {
1513
+ static setupDragIn(dragIn, dragInOptions, root = document) {
1523
1514
  if (dragInOptions?.pause !== undefined) {
1524
1515
  DDManager.pauseDrag = dragInOptions.pause;
1525
1516
  }
1526
- if (typeof dragIn === 'string') {
1527
- dragInOptions = { ...dragInDefaultOptions, ...(dragInOptions || {}) };
1528
- Utils.getElements(dragIn).forEach(el => {
1517
+ dragInOptions = { ...dragInDefaultOptions, ...(dragInOptions || {}) };
1518
+ let els = (typeof dragIn === 'string') ? Utils.getElements(dragIn, root) : dragIn;
1519
+ if (els.length)
1520
+ els?.forEach(el => {
1529
1521
  if (!dd.isDraggable(el))
1530
1522
  dd.dragIn(el, dragInOptions);
1531
1523
  });
1532
- }
1533
1524
  }
1534
1525
  /**
1535
1526
  * 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.
@@ -2151,6 +2142,6 @@ class GridStack {
2151
2142
  GridStack.Utils = Utils;
2152
2143
  /** scoping so users can call new GridStack.Engine(12) for example */
2153
2144
  GridStack.Engine = GridStackEngine;
2154
- GridStack.GDRev = '8.0.0';
2145
+ GridStack.GDRev = '8.1.0';
2155
2146
  export { GridStack };
2156
2147
  //# sourceMappingURL=gridstack.js.map