gridstack 7.3.0 → 8.0.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.
- package/README.md +8 -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 +389 -376
- package/dist/es5/gridstack.js +2252 -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 +591 -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 +3 -97
- package/dist/gridstack.d.ts +389 -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 +6 -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 +539 -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 +12 -0
- package/doc/README.md +15 -1
- package/package.json +25 -24
- /package/{dist → dist_save}/angular/README.md +0 -0
package/dist/gridstack.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root .grid-stack-item>.ui-resizable-handle{filter:none}.grid-stack{position:relative}.grid-stack.grid-stack-rtl{direction:ltr}.grid-stack.grid-stack-rtl>.grid-stack-item{direction:rtl}.grid-stack .grid-stack-placeholder>.placeholder-content{background-color:rgba(0,0,0,.1);margin:0;position:absolute;width:auto;z-index:0!important;text-align:center}.grid-stack>.grid-stack-item{min-width:8.3333333333%;position:absolute;padding:0}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;width:auto;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none}.grid-stack>.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle,.grid-stack>.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle{display:none}.grid-stack>.grid-stack-item>.ui-resizable-se,.grid-stack>.grid-stack-item>.ui-resizable-sw{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iMCAwIDUxMS42MjYgNTExLjYyNyIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTExLjYyNiA1MTEuNjI3OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggZD0iTTMyOC45MDYsNDAxLjk5NGgtMzYuNTUzVjEwOS42MzZoMzYuNTUzYzQuOTQ4LDAsOS4yMzYtMS44MDksMTIuODQ3LTUuNDI2YzMuNjEzLTMuNjE1LDUuNDIxLTcuODk4LDUuNDIxLTEyLjg0NSAgIGMwLTQuOTQ5LTEuODAxLTkuMjMxLTUuNDI4LTEyLjg1MWwtNzMuMDg3LTczLjA5QzI2NS4wNDQsMS44MDksMjYwLjc2LDAsMjU1LjgxMywwYy00Ljk0OCwwLTkuMjI5LDEuODA5LTEyLjg0Nyw1LjQyNCAgIGwtNzMuMDg4LDczLjA5Yy0zLjYxOCwzLjYxOS01LjQyNCw3LjkwMi01LjQyNCwxMi44NTFjMCw0Ljk0NiwxLjgwNyw5LjIyOSw1LjQyNCwxMi44NDVjMy42MTksMy42MTcsNy45MDEsNS40MjYsMTIuODUsNS40MjYgICBoMzYuNTQ1djI5Mi4zNThoLTM2LjU0MmMtNC45NTIsMC05LjIzNSwxLjgwOC0xMi44NSw1LjQyMWMtMy42MTcsMy42MjEtNS40MjQsNy45MDUtNS40MjQsMTIuODU0ICAgYzAsNC45NDUsMS44MDcsOS4yMjcsNS40MjQsMTIuODQ3bDczLjA4OSw3My4wODhjMy42MTcsMy42MTcsNy44OTgsNS40MjQsMTIuODQ3LDUuNDI0YzQuOTUsMCw5LjIzNC0xLjgwNywxMi44NDktNS40MjQgICBsNzMuMDg3LTczLjA4OGMzLjYxMy0zLjYyLDUuNDIxLTcuOTAxLDUuNDIxLTEyLjg0N2MwLTQuOTQ4LTEuODA4LTkuMjMyLTUuNDIxLTEyLjg1NCAgIEMzMzguMTQyLDQwMy44MDIsMzMzLjg1Nyw0MDEuOTk0LDMyOC45MDYsNDAxLjk5NHoiIGZpbGw9IiM2NjY2NjYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K);background-repeat:no-repeat;background-position:center
|
|
1
|
+
:root .grid-stack-item>.ui-resizable-handle{filter:none}.grid-stack{position:relative}.grid-stack.grid-stack-rtl{direction:ltr}.grid-stack.grid-stack-rtl>.grid-stack-item{direction:rtl}.grid-stack .grid-stack-placeholder>.placeholder-content{background-color:rgba(0,0,0,.1);margin:0;position:absolute;width:auto;z-index:0!important;text-align:center}.grid-stack>.grid-stack-item{min-width:8.3333333333%;position:absolute;padding:0}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;width:auto;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none}.grid-stack>.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle,.grid-stack>.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle{display:none}.grid-stack>.grid-stack-item>.ui-resizable-se,.grid-stack>.grid-stack-item>.ui-resizable-sw{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iMCAwIDUxMS42MjYgNTExLjYyNyIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTExLjYyNiA1MTEuNjI3OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggZD0iTTMyOC45MDY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KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K);background-repeat:no-repeat;background-position:center}.grid-stack>.grid-stack-item>.ui-resizable-sw{-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.grid-stack>.grid-stack-item>.ui-resizable-se{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.grid-stack>.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:0}.grid-stack>.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:0;left:25px;right:25px}.grid-stack>.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:0}.grid-stack>.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px}.grid-stack>.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px}.grid-stack>.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:0;right:25px}.grid-stack>.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px}.grid-stack>.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px}.grid-stack>.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack>.grid-stack-item[gs-x="0"]{left:0}.grid-stack>.grid-stack-item[gs-w="1"]{width:8.3333333333%}.grid-stack>.grid-stack-item[gs-x="1"]{left:8.3333333333%}.grid-stack>.grid-stack-item[gs-w="2"]{width:16.6666666667%}.grid-stack>.grid-stack-item[gs-x="2"]{left:16.6666666667%}.grid-stack>.grid-stack-item[gs-w="3"]{width:25%}.grid-stack>.grid-stack-item[gs-x="3"]{left:25%}.grid-stack>.grid-stack-item[gs-w="4"]{width:33.3333333333%}.grid-stack>.grid-stack-item[gs-x="4"]{left:33.3333333333%}.grid-stack>.grid-stack-item[gs-w="5"]{width:41.6666666667%}.grid-stack>.grid-stack-item[gs-x="5"]{left:41.6666666667%}.grid-stack>.grid-stack-item[gs-w="6"]{width:50%}.grid-stack>.grid-stack-item[gs-x="6"]{left:50%}.grid-stack>.grid-stack-item[gs-w="7"]{width:58.3333333333%}.grid-stack>.grid-stack-item[gs-x="7"]{left:58.3333333333%}.grid-stack>.grid-stack-item[gs-w="8"]{width:66.6666666667%}.grid-stack>.grid-stack-item[gs-x="8"]{left:66.6666666667%}.grid-stack>.grid-stack-item[gs-w="9"]{width:75%}.grid-stack>.grid-stack-item[gs-x="9"]{left:75%}.grid-stack>.grid-stack-item[gs-w="10"]{width:83.3333333333%}.grid-stack>.grid-stack-item[gs-x="10"]{left:83.3333333333%}.grid-stack>.grid-stack-item[gs-w="11"]{width:91.6666666667%}.grid-stack>.grid-stack-item[gs-x="11"]{left:91.6666666667%}.grid-stack>.grid-stack-item[gs-w="12"]{width:100%}.grid-stack.grid-stack-1>.grid-stack-item{min-width:100%}.grid-stack.grid-stack-animate,.grid-stack.grid-stack-animate .grid-stack-item{-webkit-transition:left .3s,top .3s,height .3s,width .3s;-moz-transition:left .3s,top .3s,height .3s,width .3s;-ms-transition:left .3s,top .3s,height .3s,width .3s;-o-transition:left .3s,top .3s,height .3s,width .3s;transition:left .3s,top .3s,height .3s,width .3s}.grid-stack.grid-stack-animate .grid-stack-item.grid-stack-placeholder,.grid-stack.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack.grid-stack-animate .grid-stack-item.ui-resizable-resizing{-webkit-transition:left 0s,top 0s,height 0s,width 0s;-moz-transition:left 0s,top 0s,height 0s,width 0s;-ms-transition:left 0s,top 0s,height 0s,width 0s;-o-transition:left 0s,top 0s,height 0s,width 0s;transition:left 0s,top 0s,height 0s,width 0s}.ui-draggable-dragging,.ui-resizable-resizing{z-index:100}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{box-shadow:1px 4px 6px rgba(0,0,0,.2);opacity:.8}.ui-draggable-dragging{will-change:left,top;cursor:move}.ui-resizable-resizing{will-change:width,height}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Angular wrapper
|
|
2
|
+
|
|
3
|
+
The Angular [wrapper component](./gridstack.component.ts) <gridstack> is a better way to use Gridstack, but alternative raw [ngFor](./ngFor.ts) or [simple](./simple.ts) demos are also given.
|
|
4
|
+
|
|
5
|
+
# Dynamic grid items
|
|
6
|
+
this is the recommended way if you are going to have multiple grids (alow drag&drop between) or drag from toolbar to create items, or drag to remove items, etc...
|
|
7
|
+
|
|
8
|
+
I.E. don't use Angular templating to create grid items as that is harder to sync when gridstack will also add/remove items.
|
|
9
|
+
|
|
10
|
+
HTML
|
|
11
|
+
```html
|
|
12
|
+
<gridstack [options]="gridOptions">
|
|
13
|
+
</gridstack>
|
|
14
|
+
```
|
|
15
|
+
Code
|
|
16
|
+
```ts
|
|
17
|
+
import { GridStack, GridStackOptions } from 'gridstack';
|
|
18
|
+
import { gsCreateNgComponents } from 'gridstack/dist/ng/gridstack.component';
|
|
19
|
+
|
|
20
|
+
constructor() {
|
|
21
|
+
// use the built in component creation code
|
|
22
|
+
GridStack.addRemoveCB = gsCreateNgComponents;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// sample grid options and items to load...
|
|
26
|
+
public gridOptions: GridStackOptions = {
|
|
27
|
+
margin: 5,
|
|
28
|
+
float: true,
|
|
29
|
+
children: [ // or call load()/addWidget() with same data
|
|
30
|
+
{x:0, y:0, minW:2, content:'Item 1'},
|
|
31
|
+
{x:1, y:1, content:'Item 2'},
|
|
32
|
+
{x:2, y:2, content:'Item 3'},
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
# More Complete example
|
|
38
|
+
In this example will your actual custom angular components inside each grid item (instead of dummy html content)
|
|
39
|
+
|
|
40
|
+
HTML
|
|
41
|
+
```html
|
|
42
|
+
<gridstack [options]="gridOptions" (changeCB)="onChange($event)">
|
|
43
|
+
<div empty-content>message when grid is empty</div>
|
|
44
|
+
</gridstack>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Code
|
|
48
|
+
```ts
|
|
49
|
+
import { Component } from '@angular/core';
|
|
50
|
+
import { GridStack, GridStackOptions } from 'gridstack';
|
|
51
|
+
import { GridstackComponent, gsCreateNgComponents, NgGridStackWidget, nodesCB } from 'gridstack/dist/ng/gridstack.component';
|
|
52
|
+
|
|
53
|
+
// some custom components
|
|
54
|
+
@Component({
|
|
55
|
+
selector: 'app-a',
|
|
56
|
+
template: 'Comp A', // your real ng content goes in each component instead...
|
|
57
|
+
})
|
|
58
|
+
export class AComponent {
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@Component({
|
|
62
|
+
selector: 'app-b',
|
|
63
|
+
template: 'Comp B',
|
|
64
|
+
})
|
|
65
|
+
export class BComponent {
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// .... in your module for example
|
|
69
|
+
constructor() {
|
|
70
|
+
// register all our dynamic components created in the grid
|
|
71
|
+
GridstackComponent.addComponentToSelectorType([AComponent, BComponent]);
|
|
72
|
+
// set globally our method to create the right widget type
|
|
73
|
+
GridStack.addRemoveCB = gsCreateNgComponents;
|
|
74
|
+
GridStack.saveCB = gsSaveAdditionalNgInfo;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// and now our content will look like instead of dummy html content
|
|
78
|
+
public gridOptions: NgGridStackOptions = {
|
|
79
|
+
margin: 5,
|
|
80
|
+
float: true,
|
|
81
|
+
minRow: 1, // make space for empty message
|
|
82
|
+
children: [ // or call load()/addWidget() with same data
|
|
83
|
+
{x:0, y:0, minW:2, type:'app-a'},
|
|
84
|
+
{x:1, y:1, type:'app-b'},
|
|
85
|
+
{x:2, y:2, content:'plain html content'},
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// called whenever items change size/position/etc.. see other events
|
|
90
|
+
public onChange(data: nodesCB) {
|
|
91
|
+
console.log('change ', data.nodes.length > 1 ? data.nodes : data.nodes[0]);
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
# ngFor with wrapper
|
|
96
|
+
For simple case where you control the children creation (gridstack doesn't do create or re-parenting)
|
|
97
|
+
|
|
98
|
+
HTML
|
|
99
|
+
```html
|
|
100
|
+
<gridstack [options]="gridOptions" (changeCB)="onChange($event)">
|
|
101
|
+
<gridstack-item *ngFor="let n of items; trackBy: identify" [options]="n">
|
|
102
|
+
Item {{n.id}}
|
|
103
|
+
</gridstack-item>
|
|
104
|
+
</gridstack>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Code
|
|
108
|
+
```javascript
|
|
109
|
+
import { GridStackOptions, GridStackWidget } from 'gridstack';
|
|
110
|
+
import { nodesCB } from 'gridstack/dist/ng/gridstack.component';
|
|
111
|
+
|
|
112
|
+
/** sample grid options and items to load... */
|
|
113
|
+
public gridOptions: GridStackOptions = {
|
|
114
|
+
margin: 5,
|
|
115
|
+
float: true,
|
|
116
|
+
}
|
|
117
|
+
public items: GridStackWidget[] = [
|
|
118
|
+
{x:0, y:0, minW:2, id:'1'}, // must have unique id used for trackBy
|
|
119
|
+
{x:1, y:1, id:'2'},
|
|
120
|
+
{x:2, y:2, id:'3'},
|
|
121
|
+
];
|
|
122
|
+
|
|
123
|
+
// called whenever items change size/position/etc..
|
|
124
|
+
public onChange(data: nodesCB) {
|
|
125
|
+
console.log('change ', data.nodes.length > 1 ? data.nodes : data.nodes[0]);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// ngFor unique node id to have correct match between our items used and GS
|
|
129
|
+
public identify(index: number, w: GridStackWidget) {
|
|
130
|
+
return w.id; // or use index if no id is set and you only modify at the end...
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Demo
|
|
135
|
+
You can see a fuller example at [app.component.ts](https://github.com/gridstack/gridstack.js/blob/master/demo/angular/src/app/app.component.ts)
|
|
136
|
+
|
|
137
|
+
to build the demo, go to demo/angular and run `yarn` + `yarn start` and Navigate to `http://localhost:4200/`
|
|
138
|
+
|
|
139
|
+
## Caveats
|
|
140
|
+
|
|
141
|
+
- This wrapper needs:
|
|
142
|
+
- gridstack v8.0+ to run as it needs the latest changes (use older version to match gs versions)
|
|
143
|
+
- Angular 13+ for dynamic createComponent() API
|
|
144
|
+
- Code in now shipped starting with v8.0+ in dist/ng for people to use directly!
|
|
145
|
+
|
|
146
|
+
## *ngFor Caveats
|
|
147
|
+
- This wrapper handles well ngFor loops, but if you're using a trackBy function (as I would recommend) and no element id change after an update,
|
|
148
|
+
you must manually update the `GridstackItemComponent.option` directly - see [modifyNgFor()](./app.component.ts#L174) example.
|
|
149
|
+
- The original client list of items is not updated to match **content** changes made by gridstack (TBD later), but adding new item or removing (as shown in demo) will update those new items. Client could use change/added/removed events to sync that list if they wish to do so.
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
Would appreciate getting help doing the same for React and Vue (2 other popular frameworks)
|
|
153
|
+
|
|
154
|
+
-Alain
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gridstack-item.component.ts 8.0.0
|
|
3
|
+
* Copyright (c) 2022 Alain Dumesny - see GridStack root license
|
|
4
|
+
*/
|
|
5
|
+
import { ElementRef, ViewContainerRef, OnDestroy } from '@angular/core';
|
|
6
|
+
import { GridItemHTMLElement, GridStackNode } from 'gridstack';
|
|
7
|
+
/** store element to Ng Class pointer back */
|
|
8
|
+
export interface GridItemCompHTMLElement extends GridItemHTMLElement {
|
|
9
|
+
_gridItemComp?: GridstackItemComponent;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* HTML Component Wrapper for gridstack items, in combination with GridstackComponent for parent grid
|
|
13
|
+
*/
|
|
14
|
+
export declare class GridstackItemComponent implements OnDestroy {
|
|
15
|
+
private readonly elementRef;
|
|
16
|
+
/** container to append items dynamically */
|
|
17
|
+
container?: ViewContainerRef;
|
|
18
|
+
/** list of options for creating/updating this item */
|
|
19
|
+
set options(val: GridStackNode);
|
|
20
|
+
/** return the latest grid options (from GS once built, otherwise initial values) */
|
|
21
|
+
get options(): GridStackNode;
|
|
22
|
+
private _options?;
|
|
23
|
+
/** return the native element that contains grid specific fields as well */
|
|
24
|
+
get el(): GridItemCompHTMLElement;
|
|
25
|
+
/** clears the initial options now that we've built */
|
|
26
|
+
clearOptions(): void;
|
|
27
|
+
constructor(elementRef: ElementRef<GridItemHTMLElement>);
|
|
28
|
+
ngOnDestroy(): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gridstack-item.component.ts 8.0.0
|
|
3
|
+
* Copyright (c) 2022 Alain Dumesny - see GridStack root license
|
|
4
|
+
*/
|
|
5
|
+
import { __decorate } from "tslib";
|
|
6
|
+
import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';
|
|
7
|
+
/**
|
|
8
|
+
* HTML Component Wrapper for gridstack items, in combination with GridstackComponent for parent grid
|
|
9
|
+
*/
|
|
10
|
+
let GridstackItemComponent = class GridstackItemComponent {
|
|
11
|
+
/** list of options for creating/updating this item */
|
|
12
|
+
set options(val) {
|
|
13
|
+
if (this.el.gridstackNode?.grid) {
|
|
14
|
+
// already built, do an update...
|
|
15
|
+
this.el.gridstackNode.grid.update(this.el, val);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
// store our custom element in options so we can update it and not re-create a generic div!
|
|
19
|
+
this._options = { ...val, el: this.el };
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/** return the latest grid options (from GS once built, otherwise initial values) */
|
|
23
|
+
get options() {
|
|
24
|
+
return this.el.gridstackNode || this._options || { el: this.el };
|
|
25
|
+
}
|
|
26
|
+
/** return the native element that contains grid specific fields as well */
|
|
27
|
+
get el() { return this.elementRef.nativeElement; }
|
|
28
|
+
/** clears the initial options now that we've built */
|
|
29
|
+
clearOptions() {
|
|
30
|
+
delete this._options;
|
|
31
|
+
}
|
|
32
|
+
constructor(elementRef) {
|
|
33
|
+
this.elementRef = elementRef;
|
|
34
|
+
this.el._gridItemComp = this;
|
|
35
|
+
}
|
|
36
|
+
ngOnDestroy() {
|
|
37
|
+
delete this.el._gridItemComp;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
__decorate([
|
|
41
|
+
ViewChild('container', { read: ViewContainerRef, static: true })
|
|
42
|
+
], GridstackItemComponent.prototype, "container", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
Input()
|
|
45
|
+
], GridstackItemComponent.prototype, "options", null);
|
|
46
|
+
GridstackItemComponent = __decorate([
|
|
47
|
+
Component({
|
|
48
|
+
selector: 'gridstack-item',
|
|
49
|
+
template: `
|
|
50
|
+
<div class="grid-stack-item-content">
|
|
51
|
+
<!-- where dynamic items go based on component types, or sub-grids, etc...) -->
|
|
52
|
+
<ng-template #container></ng-template>
|
|
53
|
+
<!-- any static (defined in dom) content goes here -->
|
|
54
|
+
<ng-content></ng-content>
|
|
55
|
+
<!-- fallback HTML content from GridStackWidget content field if used instead -->
|
|
56
|
+
{{options.content}}
|
|
57
|
+
</div>`,
|
|
58
|
+
styles: [`
|
|
59
|
+
:host { display: block; }
|
|
60
|
+
`],
|
|
61
|
+
// changeDetection: ChangeDetectionStrategy.OnPush, // IFF you want to optimize and control when ChangeDetection needs to happen...
|
|
62
|
+
})
|
|
63
|
+
], GridstackItemComponent);
|
|
64
|
+
export { GridstackItemComponent };
|
|
65
|
+
//# sourceMappingURL=gridstack-item.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gridstack-item.component.js","sourceRoot":"","sources":["../../demo/angular/src/app/gridstack-item.component.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,SAAS,EAAc,KAAK,EAAE,SAAS,EAAE,gBAAgB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QD;QACT,MAAM,EAAE,CAAC;;GAER,CAAC;QACF,mIAAmI;KACpI,CAAC;GACW,sBAAsB,CAqClC;SArCY,sBAAsB"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gridstack.component.ts 8.0.0
|
|
3
|
+
* Copyright (c) 2022 Alain Dumesny - see GridStack root license
|
|
4
|
+
*/
|
|
5
|
+
import { AfterContentInit, ElementRef, EventEmitter, OnDestroy, OnInit, QueryList, Type, ViewContainerRef } from '@angular/core';
|
|
6
|
+
import { GridHTMLElement, GridItemHTMLElement, GridStack, GridStackNode, GridStackOptions, GridStackWidget } from 'gridstack';
|
|
7
|
+
import { GridstackItemComponent } from './gridstack-item.component';
|
|
8
|
+
/** events handlers emitters signature for different events */
|
|
9
|
+
export type eventCB = {
|
|
10
|
+
event: Event;
|
|
11
|
+
};
|
|
12
|
+
export type elementCB = {
|
|
13
|
+
event: Event;
|
|
14
|
+
el: GridItemHTMLElement;
|
|
15
|
+
};
|
|
16
|
+
export type nodesCB = {
|
|
17
|
+
event: Event;
|
|
18
|
+
nodes: GridStackNode[];
|
|
19
|
+
};
|
|
20
|
+
export type droppedCB = {
|
|
21
|
+
event: Event;
|
|
22
|
+
previousNode: GridStackNode;
|
|
23
|
+
newNode: GridStackNode;
|
|
24
|
+
};
|
|
25
|
+
/** extends to store Ng Component selector, instead/inAddition to content */
|
|
26
|
+
export interface NgGridStackWidget extends GridStackWidget {
|
|
27
|
+
type?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface NgGridStackNode extends GridStackNode {
|
|
30
|
+
type?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface NgGridStackOptions extends GridStackOptions {
|
|
33
|
+
children?: NgGridStackWidget[];
|
|
34
|
+
subGridOpts?: NgGridStackOptions;
|
|
35
|
+
}
|
|
36
|
+
/** store element to Ng Class pointer back */
|
|
37
|
+
export interface GridCompHTMLElement extends GridHTMLElement {
|
|
38
|
+
_gridComp?: GridstackComponent;
|
|
39
|
+
}
|
|
40
|
+
/** selector string to runtime Type mapping */
|
|
41
|
+
export type SelectorToType = {
|
|
42
|
+
[key: string]: Type<Object>;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* HTML Component Wrapper for gridstack, in combination with GridstackItemComponent for the items
|
|
46
|
+
*/
|
|
47
|
+
export declare class GridstackComponent implements OnInit, AfterContentInit, OnDestroy {
|
|
48
|
+
private readonly elementRef;
|
|
49
|
+
/** track list of TEMPLATE grid items so we can sync between DOM and GS internals */
|
|
50
|
+
gridstackItems?: QueryList<GridstackItemComponent>;
|
|
51
|
+
/** container to append items dynamically */
|
|
52
|
+
container?: ViewContainerRef;
|
|
53
|
+
/** initial options for creation of the grid */
|
|
54
|
+
set options(val: GridStackOptions);
|
|
55
|
+
/** return the current running options */
|
|
56
|
+
get options(): GridStackOptions;
|
|
57
|
+
/** true while ng-content with 'no-item-content' should be shown when last item is removed from a grid */
|
|
58
|
+
isEmpty?: boolean;
|
|
59
|
+
/** individual list of GridStackEvent callbacks handlers as output
|
|
60
|
+
* otherwise use this.grid.on('name1 name2 name3', callback) to handle multiple at once
|
|
61
|
+
* see https://github.com/gridstack/gridstack.js/blob/master/demo/events.js#L4
|
|
62
|
+
*
|
|
63
|
+
* Note: camel casing and 'CB' added at the end to prevent @angular-eslint/no-output-native
|
|
64
|
+
* eg: 'change' would trigger the raw CustomEvent so use different name.
|
|
65
|
+
*/
|
|
66
|
+
addedCB: EventEmitter<nodesCB>;
|
|
67
|
+
changeCB: EventEmitter<nodesCB>;
|
|
68
|
+
disableCB: EventEmitter<eventCB>;
|
|
69
|
+
dragCB: EventEmitter<elementCB>;
|
|
70
|
+
dragStartCB: EventEmitter<elementCB>;
|
|
71
|
+
dragStopCB: EventEmitter<elementCB>;
|
|
72
|
+
droppedCB: EventEmitter<droppedCB>;
|
|
73
|
+
enableCB: EventEmitter<eventCB>;
|
|
74
|
+
removedCB: EventEmitter<nodesCB>;
|
|
75
|
+
resizeCB: EventEmitter<elementCB>;
|
|
76
|
+
resizeStartCB: EventEmitter<elementCB>;
|
|
77
|
+
resizeStopCB: EventEmitter<elementCB>;
|
|
78
|
+
/** return the native element that contains grid specific fields as well */
|
|
79
|
+
get el(): GridCompHTMLElement;
|
|
80
|
+
/** return the GridStack class */
|
|
81
|
+
get grid(): GridStack | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* stores the selector -> Type mapping, so we can create items dynamically from a string.
|
|
84
|
+
* Unfortunately Ng doesn't provide public access to that mapping.
|
|
85
|
+
*/
|
|
86
|
+
static selectorToType: SelectorToType;
|
|
87
|
+
/** add a list of ng Component to be mapped to selector */
|
|
88
|
+
static addComponentToSelectorType(typeList: Array<Type<Object>>): void;
|
|
89
|
+
/** return the ng Component selector */
|
|
90
|
+
static getSelector(type: Type<Object>): string;
|
|
91
|
+
private _options?;
|
|
92
|
+
private _grid?;
|
|
93
|
+
private loaded?;
|
|
94
|
+
private ngUnsubscribe;
|
|
95
|
+
constructor(elementRef: ElementRef<GridCompHTMLElement>);
|
|
96
|
+
ngOnInit(): void;
|
|
97
|
+
/** wait until after all DOM is ready to init gridstack children (after angular ngFor and sub-components run first) */
|
|
98
|
+
ngAfterContentInit(): void;
|
|
99
|
+
ngOnDestroy(): void;
|
|
100
|
+
/**
|
|
101
|
+
* called when the TEMPLATE list of items changes - get a list of nodes and
|
|
102
|
+
* update the layout accordingly (which will take care of adding/removing items changed by Angular)
|
|
103
|
+
*/
|
|
104
|
+
updateAll(): void;
|
|
105
|
+
/** check if the grid is empty, if so show alternative content */
|
|
106
|
+
checkEmpty(): void;
|
|
107
|
+
/** get all known events as easy to use Outputs for convenience */
|
|
108
|
+
private hookEvents;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* can be used when a new item needs to be created, which we do as a Angular component, or deleted (skip)
|
|
112
|
+
**/
|
|
113
|
+
export declare function gsCreateNgComponents(host: GridCompHTMLElement | HTMLElement, w: NgGridStackWidget | GridStackOptions, add: boolean, isGrid: boolean): HTMLElement | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* can be used when saving the grid - make sure we save the content from the field (not HTML as we get ng markups)
|
|
116
|
+
* and can put the extra info of type, otherwise content
|
|
117
|
+
*/
|
|
118
|
+
export declare function gsSaveAdditionalNgInfo(n: NgGridStackNode, w: NgGridStackWidget): void;
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gridstack.component.ts 8.0.0
|
|
3
|
+
* Copyright (c) 2022 Alain Dumesny - see GridStack root license
|
|
4
|
+
*/
|
|
5
|
+
var GridstackComponent_1;
|
|
6
|
+
import { __decorate } from "tslib";
|
|
7
|
+
import { Component, ContentChildren, EventEmitter, Input, Output, ViewChild, ViewContainerRef, reflectComponentType } from '@angular/core';
|
|
8
|
+
import { Subject } from 'rxjs';
|
|
9
|
+
import { takeUntil } from 'rxjs/operators';
|
|
10
|
+
import { GridStack } from 'gridstack';
|
|
11
|
+
import { GridstackItemComponent } from './gridstack-item.component';
|
|
12
|
+
/**
|
|
13
|
+
* HTML Component Wrapper for gridstack, in combination with GridstackItemComponent for the items
|
|
14
|
+
*/
|
|
15
|
+
let GridstackComponent = GridstackComponent_1 = class GridstackComponent {
|
|
16
|
+
/** initial options for creation of the grid */
|
|
17
|
+
set options(val) { this._options = val; }
|
|
18
|
+
/** return the current running options */
|
|
19
|
+
get options() { return this._grid?.opts || this._options || {}; }
|
|
20
|
+
/** return the native element that contains grid specific fields as well */
|
|
21
|
+
get el() { return this.elementRef.nativeElement; }
|
|
22
|
+
/** return the GridStack class */
|
|
23
|
+
get grid() { return this._grid; }
|
|
24
|
+
/**
|
|
25
|
+
* stores the selector -> Type mapping, so we can create items dynamically from a string.
|
|
26
|
+
* Unfortunately Ng doesn't provide public access to that mapping.
|
|
27
|
+
*/
|
|
28
|
+
static { this.selectorToType = {}; }
|
|
29
|
+
/** add a list of ng Component to be mapped to selector */
|
|
30
|
+
static addComponentToSelectorType(typeList) {
|
|
31
|
+
typeList.forEach(type => GridstackComponent_1.selectorToType[GridstackComponent_1.getSelector(type)] = type);
|
|
32
|
+
}
|
|
33
|
+
/** return the ng Component selector */
|
|
34
|
+
static getSelector(type) {
|
|
35
|
+
const mirror = reflectComponentType(type);
|
|
36
|
+
return mirror.selector;
|
|
37
|
+
}
|
|
38
|
+
constructor(
|
|
39
|
+
// private readonly zone: NgZone,
|
|
40
|
+
// private readonly cd: ChangeDetectorRef,
|
|
41
|
+
elementRef) {
|
|
42
|
+
this.elementRef = elementRef;
|
|
43
|
+
/** individual list of GridStackEvent callbacks handlers as output
|
|
44
|
+
* otherwise use this.grid.on('name1 name2 name3', callback) to handle multiple at once
|
|
45
|
+
* see https://github.com/gridstack/gridstack.js/blob/master/demo/events.js#L4
|
|
46
|
+
*
|
|
47
|
+
* Note: camel casing and 'CB' added at the end to prevent @angular-eslint/no-output-native
|
|
48
|
+
* eg: 'change' would trigger the raw CustomEvent so use different name.
|
|
49
|
+
*/
|
|
50
|
+
this.addedCB = new EventEmitter();
|
|
51
|
+
this.changeCB = new EventEmitter();
|
|
52
|
+
this.disableCB = new EventEmitter();
|
|
53
|
+
this.dragCB = new EventEmitter();
|
|
54
|
+
this.dragStartCB = new EventEmitter();
|
|
55
|
+
this.dragStopCB = new EventEmitter();
|
|
56
|
+
this.droppedCB = new EventEmitter();
|
|
57
|
+
this.enableCB = new EventEmitter();
|
|
58
|
+
this.removedCB = new EventEmitter();
|
|
59
|
+
this.resizeCB = new EventEmitter();
|
|
60
|
+
this.resizeStartCB = new EventEmitter();
|
|
61
|
+
this.resizeStopCB = new EventEmitter();
|
|
62
|
+
this.ngUnsubscribe = new Subject();
|
|
63
|
+
this.el._gridComp = this;
|
|
64
|
+
}
|
|
65
|
+
ngOnInit() {
|
|
66
|
+
// init ourself before any template children are created since we track them below anyway - no need to double create+update widgets
|
|
67
|
+
this.loaded = !!this.options?.children?.length;
|
|
68
|
+
this._grid = GridStack.init(this._options, this.el);
|
|
69
|
+
delete this._options; // GS has it now
|
|
70
|
+
this.checkEmpty();
|
|
71
|
+
}
|
|
72
|
+
/** wait until after all DOM is ready to init gridstack children (after angular ngFor and sub-components run first) */
|
|
73
|
+
ngAfterContentInit() {
|
|
74
|
+
// track whenever the children list changes and update the layout...
|
|
75
|
+
this.gridstackItems?.changes
|
|
76
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
77
|
+
.subscribe(() => this.updateAll());
|
|
78
|
+
// ...and do this once at least unless we loaded children already
|
|
79
|
+
if (!this.loaded)
|
|
80
|
+
this.updateAll();
|
|
81
|
+
this.hookEvents(this.grid);
|
|
82
|
+
}
|
|
83
|
+
ngOnDestroy() {
|
|
84
|
+
this.ngUnsubscribe.next();
|
|
85
|
+
this.ngUnsubscribe.complete();
|
|
86
|
+
this.grid?.destroy();
|
|
87
|
+
delete this._grid;
|
|
88
|
+
delete this.el._gridComp;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* called when the TEMPLATE list of items changes - get a list of nodes and
|
|
92
|
+
* update the layout accordingly (which will take care of adding/removing items changed by Angular)
|
|
93
|
+
*/
|
|
94
|
+
updateAll() {
|
|
95
|
+
if (!this.grid)
|
|
96
|
+
return;
|
|
97
|
+
const layout = [];
|
|
98
|
+
this.gridstackItems?.forEach(item => {
|
|
99
|
+
layout.push(item.options);
|
|
100
|
+
item.clearOptions();
|
|
101
|
+
});
|
|
102
|
+
this.grid.load(layout); // efficient that does diffs only
|
|
103
|
+
}
|
|
104
|
+
/** check if the grid is empty, if so show alternative content */
|
|
105
|
+
checkEmpty() {
|
|
106
|
+
if (!this.grid)
|
|
107
|
+
return;
|
|
108
|
+
const isEmpty = !this.grid.engine.nodes.length;
|
|
109
|
+
if (isEmpty === this.isEmpty)
|
|
110
|
+
return;
|
|
111
|
+
this.isEmpty = isEmpty;
|
|
112
|
+
// this.cd.detectChanges();
|
|
113
|
+
}
|
|
114
|
+
/** get all known events as easy to use Outputs for convenience */
|
|
115
|
+
hookEvents(grid) {
|
|
116
|
+
if (!grid)
|
|
117
|
+
return;
|
|
118
|
+
grid
|
|
119
|
+
.on('added', (event, nodes) => { this.checkEmpty(); this.addedCB.emit({ event, nodes }); })
|
|
120
|
+
.on('change', (event, nodes) => this.changeCB.emit({ event, nodes }))
|
|
121
|
+
.on('disable', (event) => this.disableCB.emit({ event }))
|
|
122
|
+
.on('drag', (event, el) => this.dragCB.emit({ event, el }))
|
|
123
|
+
.on('dragstart', (event, el) => this.dragStartCB.emit({ event, el }))
|
|
124
|
+
.on('dragstop', (event, el) => this.dragStopCB.emit({ event, el }))
|
|
125
|
+
.on('dropped', (event, previousNode, newNode) => this.droppedCB.emit({ event, previousNode, newNode }))
|
|
126
|
+
.on('enable', (event) => this.enableCB.emit({ event }))
|
|
127
|
+
.on('removed', (event, nodes) => { this.checkEmpty(); this.removedCB.emit({ event, nodes }); })
|
|
128
|
+
.on('resize', (event, el) => this.resizeCB.emit({ event, el }))
|
|
129
|
+
.on('resizestart', (event, el) => this.resizeStartCB.emit({ event, el }))
|
|
130
|
+
.on('resizestop', (event, el) => this.resizeStopCB.emit({ event, el }));
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
__decorate([
|
|
134
|
+
ContentChildren(GridstackItemComponent)
|
|
135
|
+
], GridstackComponent.prototype, "gridstackItems", void 0);
|
|
136
|
+
__decorate([
|
|
137
|
+
ViewChild('container', { read: ViewContainerRef, static: true })
|
|
138
|
+
], GridstackComponent.prototype, "container", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
Input()
|
|
141
|
+
], GridstackComponent.prototype, "options", null);
|
|
142
|
+
__decorate([
|
|
143
|
+
Input()
|
|
144
|
+
], GridstackComponent.prototype, "isEmpty", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
Output()
|
|
147
|
+
], GridstackComponent.prototype, "addedCB", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
Output()
|
|
150
|
+
], GridstackComponent.prototype, "changeCB", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
Output()
|
|
153
|
+
], GridstackComponent.prototype, "disableCB", void 0);
|
|
154
|
+
__decorate([
|
|
155
|
+
Output()
|
|
156
|
+
], GridstackComponent.prototype, "dragCB", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
Output()
|
|
159
|
+
], GridstackComponent.prototype, "dragStartCB", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
Output()
|
|
162
|
+
], GridstackComponent.prototype, "dragStopCB", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
Output()
|
|
165
|
+
], GridstackComponent.prototype, "droppedCB", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
Output()
|
|
168
|
+
], GridstackComponent.prototype, "enableCB", void 0);
|
|
169
|
+
__decorate([
|
|
170
|
+
Output()
|
|
171
|
+
], GridstackComponent.prototype, "removedCB", void 0);
|
|
172
|
+
__decorate([
|
|
173
|
+
Output()
|
|
174
|
+
], GridstackComponent.prototype, "resizeCB", void 0);
|
|
175
|
+
__decorate([
|
|
176
|
+
Output()
|
|
177
|
+
], GridstackComponent.prototype, "resizeStartCB", void 0);
|
|
178
|
+
__decorate([
|
|
179
|
+
Output()
|
|
180
|
+
], GridstackComponent.prototype, "resizeStopCB", void 0);
|
|
181
|
+
GridstackComponent = GridstackComponent_1 = __decorate([
|
|
182
|
+
Component({
|
|
183
|
+
selector: 'gridstack',
|
|
184
|
+
template: `
|
|
185
|
+
<!-- content to show when when grid is empty, like instructions on how to add widgets -->
|
|
186
|
+
<ng-content select="[empty-content]" *ngIf="isEmpty"></ng-content>
|
|
187
|
+
<!-- where dynamic items go -->
|
|
188
|
+
<ng-template #container></ng-template>
|
|
189
|
+
<!-- where template items go -->
|
|
190
|
+
<ng-content></ng-content>
|
|
191
|
+
`,
|
|
192
|
+
styles: [`
|
|
193
|
+
:host { display: block; }
|
|
194
|
+
`],
|
|
195
|
+
// changeDetection: ChangeDetectionStrategy.OnPush, // IFF you want to optimize and control when ChangeDetection needs to happen...
|
|
196
|
+
})
|
|
197
|
+
], GridstackComponent);
|
|
198
|
+
export { GridstackComponent };
|
|
199
|
+
/**
|
|
200
|
+
* can be used when a new item needs to be created, which we do as a Angular component, or deleted (skip)
|
|
201
|
+
**/
|
|
202
|
+
export function gsCreateNgComponents(host, w, add, isGrid) {
|
|
203
|
+
// only care about creating ng components here...
|
|
204
|
+
if (!add || !host)
|
|
205
|
+
return;
|
|
206
|
+
// create the component dynamically - see https://angular.io/docs/ts/latest/cookbook/dynamic-component-loader.html
|
|
207
|
+
if (isGrid) {
|
|
208
|
+
let grid;
|
|
209
|
+
const gridItemComp = host.parentElement?._gridItemComp;
|
|
210
|
+
if (gridItemComp) {
|
|
211
|
+
grid = gridItemComp.container?.createComponent(GridstackComponent)?.instance;
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
// TODO: figure out how to create ng component inside regular Div. need to access app injectors...
|
|
215
|
+
// const hostElement: Element = host;
|
|
216
|
+
// const environmentInjector: EnvironmentInjector;
|
|
217
|
+
// grid = createComponent(GridstackComponent, {environmentInjector, hostElement})?.instance;
|
|
218
|
+
}
|
|
219
|
+
if (grid)
|
|
220
|
+
grid.options = w;
|
|
221
|
+
return grid?.el;
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
const gridComp = host._gridComp;
|
|
225
|
+
const gridItem = gridComp?.container?.createComponent(GridstackItemComponent)?.instance;
|
|
226
|
+
// IFF we're not a subGrid, define what type of component to create as child, OR you can do it GridstackItemComponent template, but this is more generic
|
|
227
|
+
const selector = w.type;
|
|
228
|
+
const type = selector ? GridstackComponent.selectorToType[selector] : undefined;
|
|
229
|
+
if (!w.subGridOpts && type) {
|
|
230
|
+
gridItem?.container?.createComponent(type);
|
|
231
|
+
}
|
|
232
|
+
return gridItem?.el;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* can be used when saving the grid - make sure we save the content from the field (not HTML as we get ng markups)
|
|
237
|
+
* and can put the extra info of type, otherwise content
|
|
238
|
+
*/
|
|
239
|
+
export function gsSaveAdditionalNgInfo(n, w) {
|
|
240
|
+
if (n.type)
|
|
241
|
+
w.type = n.type;
|
|
242
|
+
else if (n.content)
|
|
243
|
+
w.content = n.content;
|
|
244
|
+
}
|
|
245
|
+
//# sourceMappingURL=gridstack.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gridstack.component.js","sourceRoot":"","sources":["../../demo/angular/src/app/gridstack.component.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;AAEH,OAAO,EAAoB,SAAS,EAAE,eAAe,EAAc,YAAY,EAAE,KAAK,EACjE,MAAM,EAAmB,SAAS,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACvH,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAwC,SAAS,EAAoD,MAAM,WAAW,CAAC;AAE9H,OAAO,EAA2B,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AA4B7F;;GAEG;AAgBH,IAAa,kBAAkB,0BAA/B,MAAa,kBAAkB;IAO7B,+CAA+C;IACtC,IAAW,OAAO,CAAC,GAAqB,IAAI,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,CAAC,CAAC;IAC3E,yCAAyC;IACzC,IAAW,OAAO,KAAuB,OAAO,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,CAAC;IAyB1F,2EAA2E;IAC3E,IAAW,EAAE,KAA0B,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;IAE9E,iCAAiC;IACjC,IAAW,IAAI,KAA4B,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAE/D;;;OAGG;aACW,mBAAc,GAAmB,EAAE,AAArB,CAAsB;IAClD,0DAA0D;IACnD,MAAM,CAAC,0BAA0B,CAAC,QA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