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