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AGOuhB,SAA+F,OAA1D5tB,KAAK+G,aAAY,GXxjFvC3L,UWwjFuF4E,IAAM,SAv4ErG,EAAAooB,sBAAwB,2BAGxB,EAAA7sB,MAAQA,EAGR,EAAAsyB,OAAStnB,EA0rDhB,EAAAunB,MAAQ","sources":["webpack://GridStack/webpack/universalModuleDefinition","webpack://GridStack/webpack/bootstrap","webpack://GridStack/webpack/runtime/define property getters","webpack://GridStack/webpack/runtime/hasOwnProperty shorthand","webpack://GridStack/./src/utils.ts","webpack://GridStack/./src/gridstack-engine.ts","webpack://GridStack/./src/types.ts","webpack://GridStack/./src/dd-manager.ts","webpack://GridStack/./src/dd-touch.ts","webpack://GridStack/./src/dd-resizable-handle.ts","webpack://GridStack/./src/dd-base-impl.ts","webpack://GridStack/./src/dd-resizable.ts","webpack://GridStack/./src/dd-draggable.ts","webpack://GridStack/./src/dd-droppable.ts","webpack://GridStack/./src/dd-element.ts","webpack://GridStack/./src/gridstack.ts","webpack://GridStack/./src/dd-gridstack.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"GridStack\"] = factory();\n\telse\n\t\troot[\"GridStack\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","/**\r\n * utils.ts 10.3.1\r\n * Copyright (c) 2021 Alain Dumesny - see GridStack root license\r\n */\r\n\r\nimport { GridStackElement, GridStackNode, GridStackOptions, numberOrString, GridStackPosition, GridStackWidget } from './types';\r\n\r\nexport interface HeightData {\r\n h: number;\r\n unit: string;\r\n}\r\n\r\nexport interface DragTransform {\r\n xScale: number;\r\n yScale: number;\r\n xOffset: number;\r\n yOffset: number;\r\n}\r\n\r\n/** checks for obsolete method names */\r\n// eslint-disable-next-line\r\nexport function obsolete(self, f, oldName: string, newName: string, rev: string): (...args: any[]) => any {\r\n let wrapper = (...args) => {\r\n console.warn('gridstack.js: Function `' + oldName + '` is deprecated in ' + rev + ' and has been replaced ' +\r\n 'with `' + newName + '`. It will be **removed** in a future release');\r\n return f.apply(self, args);\r\n }\r\n wrapper.prototype = f.prototype;\r\n return wrapper;\r\n}\r\n\r\n/** checks for obsolete grid options (can be used for any fields, but msg is about options) */\r\nexport function obsoleteOpts(opts: GridStackOptions, oldName: string, newName: string, rev: string): void {\r\n if (opts[oldName] !== undefined) {\r\n opts[newName] = opts[oldName];\r\n console.warn('gridstack.js: Option `' + oldName + '` is deprecated in ' + rev + ' and has been replaced with `' +\r\n newName + '`. It will be **removed** in a future release');\r\n }\r\n}\r\n\r\n/** checks for obsolete grid options which are gone */\r\nexport function obsoleteOptsDel(opts: GridStackOptions, oldName: string, rev: string, info: string): void {\r\n if (opts[oldName] !== undefined) {\r\n console.warn('gridstack.js: Option `' + oldName + '` is deprecated in ' + rev + info);\r\n }\r\n}\r\n\r\n/** checks for obsolete Jquery element attributes */\r\nexport function obsoleteAttr(el: HTMLElement, oldName: string, newName: string, rev: string): void {\r\n let oldAttr = el.getAttribute(oldName);\r\n if (oldAttr !== null) {\r\n el.setAttribute(newName, oldAttr);\r\n console.warn('gridstack.js: attribute `' + oldName + '`=' + oldAttr + ' is deprecated on this object in ' + rev + ' and has been replaced with `' +\r\n newName + '`. It will be **removed** in a future release');\r\n }\r\n}\r\n\r\n/**\r\n * Utility methods\r\n */\r\nexport class Utils {\r\n\r\n /** convert a potential selector into actual list of html elements. optional root which defaults to document (for shadow dom) */\r\n static getElements(els: GridStackElement, root: HTMLElement | Document = document): HTMLElement[] {\r\n if (typeof els === 'string') {\r\n const doc = ('getElementById' in root) ? root as Document : undefined;\r\n\r\n // Note: very common for people use to id='1,2,3' which is only legal as HTML5 id, but not CSS selectors\r\n // so if we start with a number, assume it's an id and just return that one item...\r\n // see https://github.com/gridstack/gridstack.js/issues/2234#issuecomment-1523796562\r\n if (doc && !isNaN(+els[0])) { // start with digit\r\n const el = doc.getElementById(els);\r\n return el ? [el] : [];\r\n }\r\n\r\n let list = root.querySelectorAll(els);\r\n if (!list.length && els[0] !== '.' && els[0] !== '#') {\r\n list = root.querySelectorAll('.' + els);\r\n if (!list.length) { list = root.querySelectorAll('#' + els) }\r\n }\r\n return Array.from(list) as HTMLElement[];\r\n }\r\n return [els];\r\n }\r\n\r\n /** convert a potential selector into actual single element. optional root which defaults to document (for shadow dom) */\r\n static getElement(els: GridStackElement, root: HTMLElement | Document = document): HTMLElement {\r\n if (typeof els === 'string') {\r\n const doc = ('getElementById' in root) ? root as Document : undefined;\r\n if (!els.length) return null;\r\n if (doc && els[0] === '#') {\r\n return doc.getElementById(els.substring(1));\r\n }\r\n if (els[0] === '#' || els[0] === '.' || els[0] === '[') {\r\n return root.querySelector(els);\r\n }\r\n\r\n // if we start with a digit, assume it's an id (error calling querySelector('#1')) as class are not valid CSS\r\n if (doc && !isNaN(+els[0])) { // start with digit\r\n return doc.getElementById(els);\r\n }\r\n\r\n // finally try string, then id, then class\r\n let el = root.querySelector(els);\r\n if (doc && !el) { el = doc.getElementById(els) }\r\n if (!el) { el = root.querySelector('.' + els) }\r\n return el as HTMLElement;\r\n }\r\n return els;\r\n }\r\n\r\n /** true if we should resize to content. strict=true when only 'sizeToContent:true' and not a number which lets user adjust */\r\n static shouldSizeToContent(n: GridStackNode | undefined, strict = false): boolean {\r\n return n?.grid && (strict ?\r\n (n.sizeToContent === true || (n.grid.opts.sizeToContent === true && n.sizeToContent === undefined)) :\r\n (!!n.sizeToContent || (n.grid.opts.sizeToContent && n.sizeToContent !== false)));\r\n }\r\n\r\n /** returns true if a and b overlap */\r\n static isIntercepted(a: GridStackPosition, b: GridStackPosition): boolean {\r\n return !(a.y >= b.y + b.h || a.y + a.h <= b.y || a.x + a.w <= b.x || a.x >= b.x + b.w);\r\n }\r\n\r\n /** returns true if a and b touch edges or corners */\r\n static isTouching(a: GridStackPosition, b: GridStackPosition): boolean {\r\n return Utils.isIntercepted(a, {x: b.x-0.5, y: b.y-0.5, w: b.w+1, h: b.h+1})\r\n }\r\n\r\n /** returns the area a and b overlap */\r\n static areaIntercept(a: GridStackPosition, b: GridStackPosition): number {\r\n let x0 = (a.x > b.x) ? a.x : b.x;\r\n let x1 = (a.x+a.w < b.x+b.w) ? a.x+a.w : b.x+b.w;\r\n if (x1 <= x0) return 0; // no overlap\r\n let y0 = (a.y > b.y) ? a.y : b.y;\r\n let y1 = (a.y+a.h < b.y+b.h) ? a.y+a.h : b.y+b.h;\r\n if (y1 <= y0) return 0; // no overlap\r\n return (x1-x0) * (y1-y0);\r\n }\r\n\r\n /** returns the area */\r\n static area(a: GridStackPosition): number {\r\n return a.w * a.h;\r\n }\r\n\r\n /**\r\n * Sorts array of nodes\r\n * @param nodes array to sort\r\n * @param dir 1 for ascending, -1 for descending (optional)\r\n **/\r\n static sort(nodes: GridStackNode[], dir: 1 | -1 = 1): GridStackNode[] {\r\n const und = 10000;\r\n return nodes.sort((a, b) => {\r\n let diffY = dir * ((a.y ?? und) - (b.y ?? und));\r\n if (diffY === 0) return dir * ((a.x ?? und) - (b.x ?? und));\r\n return diffY;\r\n });\r\n }\r\n\r\n /** find an item by id */\r\n static find(nodes: GridStackNode[], id: string): GridStackNode | undefined {\r\n return id ? nodes.find(n => n.id === id) : undefined;\r\n }\r\n\r\n /**\r\n * creates a style sheet with style id under given parent\r\n * @param id will set the 'gs-style-id' attribute to that id\r\n * @param parent to insert the stylesheet as first child,\r\n * if none supplied it will be appended to the document head instead.\r\n */\r\n static createStylesheet(id: string, parent?: HTMLElement, options?: { nonce?: string }): CSSStyleSheet {\r\n let style: HTMLStyleElement = document.createElement('style');\r\n const nonce = options?.nonce\r\n if (nonce) style.nonce = nonce\r\n style.setAttribute('type', 'text/css');\r\n style.setAttribute('gs-style-id', id);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n if ((style as any).styleSheet) { // TODO: only CSSImportRule have that and different beast ??\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (style as any).styleSheet.cssText = '';\r\n } else {\r\n style.appendChild(document.createTextNode('')); // WebKit hack\r\n }\r\n if (!parent) {\r\n // default to head\r\n parent = document.getElementsByTagName('head')[0];\r\n parent.appendChild(style);\r\n } else {\r\n parent.insertBefore(style, parent.firstChild);\r\n }\r\n return style.sheet as CSSStyleSheet;\r\n }\r\n\r\n /** removed the given stylesheet id */\r\n static removeStylesheet(id: string, parent?: HTMLElement): void {\r\n const target = parent || document;\r\n let el = target.querySelector('STYLE[gs-style-id=' + id + ']');\r\n if (el && el.parentNode) el.remove();\r\n }\r\n\r\n /** inserts a CSS rule */\r\n static addCSSRule(sheet: CSSStyleSheet, selector: string, rules: string): void {\r\n if (typeof sheet.addRule === 'function') {\r\n sheet.addRule(selector, rules);\r\n } else if (typeof sheet.insertRule === 'function') {\r\n sheet.insertRule(`${selector}{${rules}}`);\r\n }\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n static toBool(v: unknown): boolean {\r\n if (typeof v === 'boolean') {\r\n return v;\r\n }\r\n if (typeof v === 'string') {\r\n v = v.toLowerCase();\r\n return !(v === '' || v === 'no' || v === 'false' || v === '0');\r\n }\r\n return Boolean(v);\r\n }\r\n\r\n static toNumber(value: null | string): number {\r\n return (value === null || value.length === 0) ? undefined : Number(value);\r\n }\r\n\r\n static parseHeight(val: numberOrString): HeightData {\r\n let h: number;\r\n let unit = 'px';\r\n if (typeof val === 'string') {\r\n if (val === 'auto' || val === '') h = 0;\r\n else {\r\n let match = val.match(/^(-[0-9]+\\.[0-9]+|[0-9]*\\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);\r\n if (!match) {\r\n throw new Error(`Invalid height val = ${val}`);\r\n }\r\n unit = match[2] || 'px';\r\n h = parseFloat(match[1]);\r\n }\r\n } else {\r\n h = val;\r\n }\r\n return { h, unit };\r\n }\r\n\r\n /** copies unset fields in target to use the given default sources values */\r\n // eslint-disable-next-line\r\n static defaults(target, ...sources): {} {\r\n\r\n sources.forEach(source => {\r\n for (const key in source) {\r\n if (!source.hasOwnProperty(key)) return;\r\n if (target[key] === null || target[key] === undefined) {\r\n target[key] = source[key];\r\n } else if (typeof source[key] === 'object' && typeof target[key] === 'object') {\r\n // property is an object, recursively add it's field over... #1373\r\n this.defaults(target[key], source[key]);\r\n }\r\n }\r\n });\r\n\r\n return target;\r\n }\r\n\r\n /** given 2 objects return true if they have the same values. Checks for Object {} having same fields and values (just 1 level down) */\r\n static same(a: unknown, b: unknown): boolean {\r\n if (typeof a !== 'object') return a == b;\r\n if (typeof a !== typeof b) return false;\r\n // else we have object, check just 1 level deep for being same things...\r\n if (Object.keys(a).length !== Object.keys(b).length) return false;\r\n for (const key in a) {\r\n if (a[key] !== b[key]) return false;\r\n }\r\n return true;\r\n }\r\n\r\n /** copies over b size & position (GridStackPosition), and optionally min/max as well */\r\n static copyPos(a: GridStackWidget, b: GridStackWidget, doMinMax = false): GridStackWidget {\r\n if (b.x !== undefined) a.x = b.x;\r\n if (b.y !== undefined) a.y = b.y;\r\n if (b.w !== undefined) a.w = b.w;\r\n if (b.h !== undefined) a.h = b.h;\r\n if (doMinMax) {\r\n if (b.minW) a.minW = b.minW;\r\n if (b.minH) a.minH = b.minH;\r\n if (b.maxW) a.maxW = b.maxW;\r\n if (b.maxH) a.maxH = b.maxH;\r\n }\r\n return a;\r\n }\r\n\r\n /** true if a and b has same size & position */\r\n static samePos(a: GridStackPosition, b: GridStackPosition): boolean {\r\n return a && b && a.x === b.x && a.y === b.y && (a.w || 1) === (b.w || 1) && (a.h || 1) === (b.h || 1);\r\n }\r\n\r\n /** given a node, makes sure it's min/max are valid */\r\n static sanitizeMinMax(node: GridStackNode) {\r\n // remove 0, undefine, null\r\n if (!node.minW) { delete node.minW; }\r\n if (!node.minH) { delete node.minH; }\r\n if (!node.maxW) { delete node.maxW; }\r\n if (!node.maxH) { delete node.maxH; }\r\n }\r\n\r\n /** removes field from the first object if same as the second objects (like diffing) and internal '_' for saving */\r\n static removeInternalAndSame(a: unknown, b: unknown):void {\r\n if (typeof a !== 'object' || typeof b !== 'object') return;\r\n for (let key in a) {\r\n const aVal = a[key];\r\n const bVal = b[key];\r\n if (key[0] === '_' || aVal === bVal) {\r\n delete a[key]\r\n } else if (aVal && typeof aVal === 'object' && bVal !== undefined) {\r\n Utils.removeInternalAndSame(aVal, bVal);\r\n if (!Object.keys(aVal).length) { delete a[key] }\r\n }\r\n }\r\n }\r\n\r\n /** removes internal fields '_' and default values for saving */\r\n static removeInternalForSave(n: GridStackNode, removeEl = true): void {\r\n for (let key in n) { if (key[0] === '_' || n[key] === null || n[key] === undefined ) delete n[key]; }\r\n delete n.grid;\r\n if (removeEl) delete n.el;\r\n // delete default values (will be re-created on read)\r\n if (!n.autoPosition) delete n.autoPosition;\r\n if (!n.noResize) delete n.noResize;\r\n if (!n.noMove) delete n.noMove;\r\n if (!n.locked) delete n.locked;\r\n if (n.w === 1 || n.w === n.minW) delete n.w;\r\n if (n.h === 1 || n.h === n.minH) delete n.h;\r\n }\r\n\r\n /** return the closest parent (or itself) matching the given class */\r\n // static closestUpByClass(el: HTMLElement, name: string): HTMLElement {\r\n // while (el) {\r\n // if (el.classList.contains(name)) return el;\r\n // el = el.parentElement\r\n // }\r\n // return null;\r\n // }\r\n\r\n /** delay calling the given function for given delay, preventing new calls from happening while waiting */\r\n static throttle(func: () => void, delay: number): () => void {\r\n let isWaiting = false;\r\n return (...args) => {\r\n if (!isWaiting) {\r\n isWaiting = true;\r\n setTimeout(() => { func(...args); isWaiting = false; }, delay);\r\n }\r\n }\r\n }\r\n\r\n static removePositioningStyles(el: HTMLElement): void {\r\n let style = el.style;\r\n if (style.position) {\r\n style.removeProperty('position');\r\n }\r\n if (style.left) {\r\n style.removeProperty('left');\r\n }\r\n if (style.top) {\r\n style.removeProperty('top');\r\n }\r\n if (style.width) {\r\n style.removeProperty('width');\r\n }\r\n if (style.height) {\r\n style.removeProperty('height');\r\n }\r\n }\r\n\r\n /** @internal returns the passed element if scrollable, else the closest parent that will, up to the entire document scrolling element */\r\n static getScrollElement(el?: HTMLElement): HTMLElement {\r\n if (!el) return document.scrollingElement as HTMLElement || document.documentElement; // IE support\r\n const style = getComputedStyle(el);\r\n const overflowRegex = /(auto|scroll)/;\r\n\r\n if (overflowRegex.test(style.overflow + style.overflowY)) {\r\n return el;\r\n } else {\r\n return this.getScrollElement(el.parentElement);\r\n }\r\n }\r\n\r\n /** @internal */\r\n static updateScrollPosition(el: HTMLElement, position: {top: number}, distance: number): void {\r\n // is widget in view?\r\n let rect = el.getBoundingClientRect();\r\n let innerHeightOrClientHeight = (window.innerHeight || document.documentElement.clientHeight);\r\n if (rect.top < 0 ||\r\n rect.bottom > innerHeightOrClientHeight\r\n ) {\r\n // set scrollTop of first parent that scrolls\r\n // if parent is larger than el, set as low as possible\r\n // to get entire widget on screen\r\n let offsetDiffDown = rect.bottom - innerHeightOrClientHeight;\r\n let offsetDiffUp = rect.top;\r\n let scrollEl = this.getScrollElement(el);\r\n if (scrollEl !== null) {\r\n let prevScroll = scrollEl.scrollTop;\r\n if (rect.top < 0 && distance < 0) {\r\n // moving up\r\n if (el.offsetHeight > innerHeightOrClientHeight) {\r\n scrollEl.scrollTop += distance;\r\n } else {\r\n scrollEl.scrollTop += Math.abs(offsetDiffUp) > Math.abs(distance) ? distance : offsetDiffUp;\r\n }\r\n } else if (distance > 0) {\r\n // moving down\r\n if (el.offsetHeight > innerHeightOrClientHeight) {\r\n scrollEl.scrollTop += distance;\r\n } else {\r\n scrollEl.scrollTop += offsetDiffDown > distance ? distance : offsetDiffDown;\r\n }\r\n }\r\n // move widget y by amount scrolled\r\n position.top += scrollEl.scrollTop - prevScroll;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @internal Function used to scroll the page.\r\n *\r\n * @param event `MouseEvent` that triggers the resize\r\n * @param el `HTMLElement` that's being resized\r\n * @param distance Distance from the V edges to start scrolling\r\n */\r\n static updateScrollResize(event: MouseEvent, el: HTMLElement, distance: number): void {\r\n const scrollEl = this.getScrollElement(el);\r\n const height = scrollEl.clientHeight;\r\n // #1727 event.clientY is relative to viewport, so must compare this against position of scrollEl getBoundingClientRect().top\r\n // #1745 Special situation if scrollEl is document 'html': here browser spec states that\r\n // clientHeight is height of viewport, but getBoundingClientRect() is rectangle of html element;\r\n // this discrepancy arises because in reality scrollbar is attached to viewport, not html element itself.\r\n const offsetTop = (scrollEl === this.getScrollElement()) ? 0 : scrollEl.getBoundingClientRect().top;\r\n const pointerPosY = event.clientY - offsetTop;\r\n const top = pointerPosY < distance;\r\n const bottom = pointerPosY > height - distance;\r\n\r\n if (top) {\r\n // This also can be done with a timeout to keep scrolling while the mouse is\r\n // in the scrolling zone. (will have smoother behavior)\r\n scrollEl.scrollBy({ behavior: 'smooth', top: pointerPosY - distance});\r\n } else if (bottom) {\r\n scrollEl.scrollBy({ behavior: 'smooth', top: distance - (height - pointerPosY)});\r\n }\r\n }\r\n\r\n /** single level clone, returning a new object with same top fields. This will share sub objects and arrays */\r\n static clone(obj: T): T {\r\n if (obj === null || obj === undefined || typeof(obj) !== 'object') {\r\n return obj;\r\n }\r\n // return Object.assign({}, obj);\r\n if (obj instanceof Array) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n return [...obj] as any;\r\n }\r\n return {...obj};\r\n }\r\n\r\n /**\r\n * Recursive clone version that returns a full copy, checking for nested objects and arrays ONLY.\r\n * Note: this will use as-is any key starting with double __ (and not copy inside) some lib have circular dependencies.\r\n */\r\n static cloneDeep(obj: T): T {\r\n // list of fields we will skip during cloneDeep (nested objects, other internal)\r\n const skipFields = ['parentGrid', 'el', 'grid', 'subGrid', 'engine'];\r\n // return JSON.parse(JSON.stringify(obj)); // doesn't work with date format ?\r\n const ret = Utils.clone(obj);\r\n for (const key in ret) {\r\n // NOTE: we don't support function/circular dependencies so skip those properties for now...\r\n if (ret.hasOwnProperty(key) && typeof(ret[key]) === 'object' && key.substring(0, 2) !== '__' && !skipFields.find(k => k === key)) {\r\n ret[key] = Utils.cloneDeep(obj[key]);\r\n }\r\n }\r\n return ret;\r\n }\r\n\r\n /** deep clone the given HTML node, removing teh unique id field */\r\n public static cloneNode(el: HTMLElement): HTMLElement {\r\n const node = el.cloneNode(true) as HTMLElement;\r\n node.removeAttribute('id');\r\n return node;\r\n }\r\n\r\n public static appendTo(el: HTMLElement, parent: string | HTMLElement): void {\r\n let parentNode: HTMLElement;\r\n if (typeof parent === 'string') {\r\n parentNode = Utils.getElement(parent);\r\n } else {\r\n parentNode = parent;\r\n }\r\n if (parentNode) {\r\n parentNode.appendChild(el);\r\n }\r\n }\r\n\r\n // public static setPositionRelative(el: HTMLElement): void {\r\n // if (!(/^(?:r|a|f)/).test(getComputedStyle(el).position)) {\r\n // el.style.position = \"relative\";\r\n // }\r\n // }\r\n\r\n public static addElStyles(el: HTMLElement, styles: { [prop: string]: string | string[] }): void {\r\n if (styles instanceof Object) {\r\n for (const s in styles) {\r\n if (styles.hasOwnProperty(s)) {\r\n if (Array.isArray(styles[s])) {\r\n // support fallback value\r\n (styles[s] as string[]).forEach(val => {\r\n el.style[s] = val;\r\n });\r\n } else {\r\n el.style[s] = styles[s];\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n public static initEvent(e: DragEvent | MouseEvent, info: { type: string; target?: EventTarget }): T {\r\n const evt = { type: info.type };\r\n const obj = {\r\n button: 0,\r\n which: 0,\r\n buttons: 1,\r\n bubbles: true,\r\n cancelable: true,\r\n target: info.target ? info.target : e.target\r\n };\r\n ['altKey','ctrlKey','metaKey','shiftKey'].forEach(p => evt[p] = e[p]); // keys\r\n ['pageX','pageY','clientX','clientY','screenX','screenY'].forEach(p => evt[p] = e[p]); // point info\r\n return {...evt, ...obj} as unknown as T;\r\n }\r\n\r\n /** copies the MouseEvent properties and sends it as another event to the given target */\r\n public static simulateMouseEvent(e: MouseEvent, simulatedType: string, target?: EventTarget): void {\r\n const simulatedEvent = document.createEvent('MouseEvents');\r\n simulatedEvent.initMouseEvent(\r\n simulatedType, // type\r\n true, // bubbles\r\n true, // cancelable\r\n window, // view\r\n 1, // detail\r\n e.screenX, // screenX\r\n e.screenY, // screenY\r\n e.clientX, // clientX\r\n e.clientY, // clientY\r\n e.ctrlKey, // ctrlKey\r\n e.altKey, // altKey\r\n e.shiftKey, // shiftKey\r\n e.metaKey, // metaKey\r\n 0, // button\r\n e.target // relatedTarget\r\n );\r\n (target || e.target).dispatchEvent(simulatedEvent);\r\n }\r\n\r\n /**\r\n * defines an element that is used to get the offset and scale from grid transforms\r\n * returns the scale and offsets from said element\r\n */\r\n public static getValuesFromTransformedElement(parent: HTMLElement): DragTransform {\r\n const transformReference = document.createElement('div');\r\n Utils.addElStyles(transformReference, {\r\n opacity: '0',\r\n position: 'fixed',\r\n top: 0 + 'px',\r\n left: 0 + 'px',\r\n width: '1px',\r\n height: '1px',\r\n zIndex: '-999999',\r\n });\r\n parent.appendChild(transformReference);\r\n const transformValues = transformReference.getBoundingClientRect();\r\n parent.removeChild(transformReference);\r\n transformReference.remove();\r\n return {\r\n xScale: 1 / transformValues.width,\r\n yScale: 1 / transformValues.height,\r\n xOffset: transformValues.left,\r\n yOffset: transformValues.top,\r\n }\r\n }\r\n\r\n /** swap the given object 2 field values */\r\n public static swap(o: unknown, a: string, b: string): void {\r\n if (!o) return;\r\n const tmp = o[a]; o[a] = o[b]; o[b] = tmp;\r\n }\r\n\r\n /** returns true if event is inside the given element rectangle */\r\n // Note: Safari Mac has null event.relatedTarget which causes #1684 so check if DragEvent is inside the coordinates instead\r\n // this.el.contains(event.relatedTarget as HTMLElement)\r\n // public static inside(e: MouseEvent, el: HTMLElement): boolean {\r\n // // srcElement, toElement, target: all set to placeholder when leaving simple grid, so we can't use that (Chrome)\r\n // let target: HTMLElement = e.relatedTarget || (e as any).fromElement;\r\n // if (!target) {\r\n // const { bottom, left, right, top } = el.getBoundingClientRect();\r\n // return (e.x < right && e.x > left && e.y < bottom && e.y > top);\r\n // }\r\n // return el.contains(target);\r\n // }\r\n\r\n /** true if the item can be rotated (checking for prop, not space available) */\r\n public static canBeRotated(n: GridStackNode): boolean {\r\n return !(!n || n.w === n.h || n.locked || n.noResize || n.grid?.opts.disableResize || (n.minW && n.minW === n.maxW) || (n.minH && n.minH === n.maxH));\r\n }\r\n}","/**\n * gridstack-engine.ts 10.3.1\n * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license\n */\n\nimport { Utils } from './utils';\nimport { GridStackNode, ColumnOptions, GridStackPosition, GridStackMoveOpts, SaveFcn, CompactOptions } from './types';\n\n/** callback to update the DOM attributes since this class is generic (no HTML or other info) for items that changed - see _notify() */\ntype OnChangeCB = (nodes: GridStackNode[]) => void;\n\n/** options used during creation - similar to GridStackOptions */\nexport interface GridStackEngineOptions {\n column?: number;\n maxRow?: number;\n float?: boolean;\n nodes?: GridStackNode[];\n onChange?: OnChangeCB;\n}\n\n/**\n * Defines the GridStack engine that does most no DOM grid manipulation.\n * See GridStack methods and vars for descriptions.\n *\n * NOTE: values should not be modified directly - call the main GridStack API instead\n */\nexport class GridStackEngine {\n public column: number;\n public maxRow: number;\n public nodes: GridStackNode[];\n public addedNodes: GridStackNode[] = [];\n public removedNodes: GridStackNode[] = [];\n public batchMode: boolean;\n /** @internal callback to update the DOM attributes */\n protected onChange: OnChangeCB;\n /** @internal */\n protected _float: boolean;\n /** @internal */\n protected _prevFloat: boolean;\n /** @internal cached layouts of difference column count so we can restore back (eg 12 -> 1 -> 12) */\n protected _layouts?: GridStackNode[][]; // maps column # to array of values nodes\n /** @internal set during loading (which is sorted) so item gets added AFTER collision nodes */\n public _loading?: boolean\n /** @internal true while we are resizing widgets during column resize to skip certain parts */\n protected _inColumnResize?: boolean;\n /** @internal true if we have some items locked */\n protected _hasLocked: boolean;\n /** @internal unique global internal _id counter */\n public static _idSeq = 0;\n\n public constructor(opts: GridStackEngineOptions = {}) {\n this.column = opts.column || 12;\n this.maxRow = opts.maxRow;\n this._float = opts.float;\n this.nodes = opts.nodes || [];\n this.onChange = opts.onChange;\n }\n\n public batchUpdate(flag = true, doPack = true): GridStackEngine {\n if (!!this.batchMode === flag) return this;\n this.batchMode = flag;\n if (flag) {\n this._prevFloat = this._float;\n this._float = true; // let things go anywhere for now... will restore and possibly reposition later\n this.cleanNodes();\n this.saveInitial(); // since begin update (which is called multiple times) won't do this\n } else {\n this._float = this._prevFloat;\n delete this._prevFloat;\n if (doPack) this._packNodes();\n this._notify();\n }\n return this;\n }\n\n // use entire row for hitting area (will use bottom reverse sorted first) if we not actively moving DOWN and didn't already skip\n protected _useEntireRowArea(node: GridStackNode, nn: GridStackPosition): boolean {\n return (!this.float || this.batchMode && !this._prevFloat) && !this._hasLocked && (!node._moving || node._skipDown || nn.y <= node.y);\n }\n\n /** @internal fix collision on given 'node', going to given new location 'nn', with optional 'collide' node already found.\n * return true if we moved. */\n protected _fixCollisions(node: GridStackNode, nn = node, collide?: GridStackNode, opt: GridStackMoveOpts = {}): boolean {\n this.sortNodes(-1); // from last to first, so recursive collision move items in the right order\n\n collide = collide || this.collide(node, nn); // REAL area collide for swap and skip if none...\n if (!collide) return false;\n\n // swap check: if we're actively moving in gravity mode, see if we collide with an object the same size\n if (node._moving && !opt.nested && !this.float) {\n if (this.swap(node, collide)) return true;\n }\n\n // during while() collisions MAKE SURE to check entire row so larger items don't leap frog small ones (push them all down starting last in grid)\n let area = nn;\n if (!this._loading && this._useEntireRowArea(node, nn)) {\n area = {x: 0, w: this.column, y: nn.y, h: nn.h};\n collide = this.collide(node, area, opt.skip); // force new hit\n }\n\n let didMove = false;\n let newOpt: GridStackMoveOpts = {nested: true, pack: false};\n while (collide = collide || this.collide(node, area, opt.skip)) { // could collide with more than 1 item... so repeat for each\n let moved: boolean;\n // if colliding with a locked item OR loading (move after) OR moving down with top gravity (and collide could move up) -> skip past the collide,\n // but remember that skip down so we only do this once (and push others otherwise).\n if (collide.locked || this._loading || node._moving && !node._skipDown && nn.y > node.y && !this.float &&\n // can take space we had, or before where we're going\n (!this.collide(collide, {...collide, y: node.y}, node) || !this.collide(collide, {...collide, y: nn.y - collide.h}, node))) {\n node._skipDown = (node._skipDown || nn.y > node.y);\n moved = this.moveNode(node, {...nn, y: collide.y + collide.h, ...newOpt});\n if ((collide.locked || this._loading) && moved) {\n Utils.copyPos(nn, node); // moving after lock become our new desired location\n } else if (!collide.locked && moved && opt.pack) {\n // we moved after and will pack: do it now and keep the original drop location, but past the old collide to see what else we might push way\n this._packNodes();\n nn.y = collide.y + collide.h;\n Utils.copyPos(node, nn);\n }\n didMove = didMove || moved;\n } else {\n // move collide down *after* where we will be, ignoring where we are now (don't collide with us)\n moved = this.moveNode(collide, {...collide, y: nn.y + nn.h, skip: node, ...newOpt});\n }\n if (!moved) { return didMove; } // break inf loop if we couldn't move after all (ex: maxRow, fixed)\n collide = undefined;\n }\n return didMove;\n }\n\n /** return the nodes that intercept the given node. Optionally a different area can be used, as well as a second node to skip */\n public collide(skip: GridStackNode, area = skip, skip2?: GridStackNode): GridStackNode | undefined {\n const skipId = skip._id;\n const skip2Id = skip2?._id;\n return this.nodes.find(n => n._id !== skipId && n._id !== skip2Id && Utils.isIntercepted(n, area));\n }\n public collideAll(skip: GridStackNode, area = skip, skip2?: GridStackNode): GridStackNode[] {\n const skipId = skip._id;\n const skip2Id = skip2?._id;\n return this.nodes.filter(n => n._id !== skipId && n._id !== skip2Id && Utils.isIntercepted(n, area));\n }\n\n /** does a pixel coverage collision based on where we started, returning the node that has the most coverage that is >50% mid line */\n protected directionCollideCoverage(node: GridStackNode, o: GridStackMoveOpts, collides: GridStackNode[]): GridStackNode | undefined {\n if (!o.rect || !node._rect) return;\n let r0 = node._rect; // where started\n let r = {...o.rect}; // where we are\n\n // update dragged rect to show where it's coming from (above or below, etc...)\n if (r.y > r0.y) {\n r.h += r.y - r0.y;\n r.y = r0.y;\n } else {\n r.h += r0.y - r.y;\n }\n if (r.x > r0.x) {\n r.w += r.x - r0.x;\n r.x = r0.x;\n } else {\n r.w += r0.x - r.x;\n }\n\n let collide: GridStackNode;\n let overMax = 0.5; // need >50%\n for (let n of collides) {\n if (n.locked || !n._rect) {\n break;\n }\n let r2 = n._rect; // overlapping target\n let yOver = Number.MAX_VALUE, xOver = Number.MAX_VALUE;\n // depending on which side we started from, compute the overlap % of coverage\n // (ex: from above/below we only compute the max horizontal line coverage)\n if (r0.y < r2.y) { // from above\n yOver = ((r.y + r.h) - r2.y) / r2.h;\n } else if (r0.y + r0.h > r2.y + r2.h) { // from below\n yOver = ((r2.y + r2.h) - r.y) / r2.h;\n }\n if (r0.x < r2.x) { // from the left\n xOver = ((r.x + r.w) - r2.x) / r2.w;\n } else if (r0.x + r0.w > r2.x + r2.w) { // from the right\n xOver = ((r2.x + r2.w) - r.x) / r2.w;\n }\n let over = Math.min(xOver, yOver);\n if (over > overMax) {\n overMax = over;\n collide = n;\n }\n }\n o.collide = collide; // save it so we don't have to find it again\n return collide;\n }\n\n /** does a pixel coverage returning the node that has the most coverage by area */\n /*\n protected collideCoverage(r: GridStackPosition, collides: GridStackNode[]): {collide: GridStackNode, over: number} {\n let collide: GridStackNode;\n let overMax = 0;\n collides.forEach(n => {\n if (n.locked || !n._rect) return;\n let over = Utils.areaIntercept(r, n._rect);\n if (over > overMax) {\n overMax = over;\n collide = n;\n }\n });\n return {collide, over: overMax};\n }\n */\n\n /** called to cache the nodes pixel rectangles used for collision detection during drag */\n public cacheRects(w: number, h: number, top: number, right: number, bottom: number, left: number): GridStackEngine\n {\n this.nodes.forEach(n =>\n n._rect = {\n y: n.y * h + top,\n x: n.x * w + left,\n w: n.w * w - left - right,\n h: n.h * h - top - bottom\n }\n );\n return this;\n }\n\n /** called to possibly swap between 2 nodes (same size or column, not locked, touching), returning true if successful */\n public swap(a: GridStackNode, b: GridStackNode): boolean | undefined {\n if (!b || b.locked || !a || a.locked) return false;\n\n function _doSwap(): true { // assumes a is before b IFF they have different height (put after rather than exact swap)\n let x = b.x, y = b.y;\n b.x = a.x; b.y = a.y; // b -> a position\n if (a.h != b.h) {\n a.x = x; a.y = b.y + b.h; // a -> goes after b\n } else if (a.w != b.w) {\n a.x = b.x + b.w; a.y = y; // a -> goes after b\n } else {\n a.x = x; a.y = y; // a -> old b position\n }\n a._dirty = b._dirty = true;\n return true;\n }\n let touching: boolean; // remember if we called it (vs undefined)\n\n // same size and same row or column, and touching\n if (a.w === b.w && a.h === b.h && (a.x === b.x || a.y === b.y) && (touching = Utils.isTouching(a, b)))\n return _doSwap();\n if (touching === false) return; // IFF ran test and fail, bail out\n\n // check for taking same columns (but different height) and touching\n if (a.w === b.w && a.x === b.x && (touching || (touching = Utils.isTouching(a, b)))) {\n if (b.y < a.y) { let t = a; a = b; b = t; } // swap a <-> b vars so a is first\n return _doSwap();\n }\n if (touching === false) return;\n\n // check if taking same row (but different width) and touching\n if (a.h === b.h && a.y === b.y && (touching || (touching = Utils.isTouching(a, b)))) {\n if (b.x < a.x) { let t = a; a = b; b = t; } // swap a <-> b vars so a is first\n return _doSwap();\n }\n return false;\n }\n\n public isAreaEmpty(x: number, y: number, w: number, h: number): boolean {\n let nn: GridStackNode = {x: x || 0, y: y || 0, w: w || 1, h: h || 1};\n return !this.collide(nn);\n }\n\n /** re-layout grid items to reclaim any empty space - optionally keeping the sort order exactly the same ('list' mode) vs truly finding an empty spaces */\n public compact(layout: CompactOptions = 'compact', doSort = true): GridStackEngine {\n if (this.nodes.length === 0) return this;\n if (doSort) this.sortNodes();\n const wasBatch = this.batchMode;\n if (!wasBatch) this.batchUpdate();\n const wasColumnResize = this._inColumnResize;\n if (!wasColumnResize) this._inColumnResize = true; // faster addNode()\n let copyNodes = this.nodes;\n this.nodes = []; // pretend we have no nodes to conflict layout to start with...\n copyNodes.forEach((n, index, list) => {\n let after: GridStackNode;\n if (!n.locked) {\n n.autoPosition = true;\n if (layout === 'list' && index) after = list[index - 1];\n }\n this.addNode(n, false, after); // 'false' for add event trigger\n });\n if (!wasColumnResize) delete this._inColumnResize;\n if (!wasBatch) this.batchUpdate(false);\n return this;\n }\n\n /** enable/disable floating widgets (default: `false`) See [example](http://gridstackjs.com/demo/float.html) */\n public set float(val: boolean) {\n if (this._float === val) return;\n this._float = val || false;\n if (!val) {\n this._packNodes()._notify();\n }\n }\n\n /** float getter method */\n public get float(): boolean { return this._float || false; }\n\n /** sort the nodes array from first to last, or reverse. Called during collision/placement to force an order */\n public sortNodes(dir: 1 | -1 = 1): GridStackEngine {\n this.nodes = Utils.sort(this.nodes, dir);\n return this;\n }\n\n /** @internal called to top gravity pack the items back OR revert back to original Y positions when floating */\n protected _packNodes(): GridStackEngine {\n if (this.batchMode) { return this; }\n this.sortNodes(); // first to last\n\n if (this.float) {\n // restore original Y pos\n this.nodes.forEach(n => {\n if (n._updating || n._orig === undefined || n.y === n._orig.y) return;\n let newY = n.y;\n while (newY > n._orig.y) {\n --newY;\n let collide = this.collide(n, {x: n.x, y: newY, w: n.w, h: n.h});\n if (!collide) {\n n._dirty = true;\n n.y = newY;\n }\n }\n });\n } else {\n // top gravity pack\n this.nodes.forEach((n, i) => {\n if (n.locked) return;\n while (n.y > 0) {\n let newY = i === 0 ? 0 : n.y - 1;\n let canBeMoved = i === 0 || !this.collide(n, {x: n.x, y: newY, w: n.w, h: n.h});\n if (!canBeMoved) break;\n // Note: must be dirty (from last position) for GridStack::OnChange CB to update positions\n // and move items back. The user 'change' CB should detect changes from the original\n // starting position instead.\n n._dirty = (n.y !== newY);\n n.y = newY;\n }\n });\n }\n return this;\n }\n\n /**\n * given a random node, makes sure it's coordinates/values are valid in the current grid\n * @param node to adjust\n * @param resizing if out of bound, resize down or move into the grid to fit ?\n */\n public prepareNode(node: GridStackNode, resizing?: boolean): GridStackNode {\n node._id = node._id ?? GridStackEngine._idSeq++;\n\n // if we're missing position, have the grid position us automatically (before we set them to 0,0)\n if (node.x === undefined || node.y === undefined || node.x === null || node.y === null) {\n node.autoPosition = true;\n }\n\n // assign defaults for missing required fields\n let defaults: GridStackNode = { x: 0, y: 0, w: 1, h: 1};\n Utils.defaults(node, defaults);\n\n if (!node.autoPosition) { delete node.autoPosition; }\n if (!node.noResize) { delete node.noResize; }\n if (!node.noMove) { delete node.noMove; }\n Utils.sanitizeMinMax(node);\n\n // check for NaN (in case messed up strings were passed. can't do parseInt() || defaults.x above as 0 is valid #)\n if (typeof node.x == 'string') { node.x = Number(node.x); }\n if (typeof node.y == 'string') { node.y = Number(node.y); }\n if (typeof node.w == 'string') { node.w = Number(node.w); }\n if (typeof node.h == 'string') { node.h = Number(node.h); }\n if (isNaN(node.x)) { node.x = defaults.x; node.autoPosition = true; }\n if (isNaN(node.y)) { node.y = defaults.y; node.autoPosition = true; }\n if (isNaN(node.w)) { node.w = defaults.w; }\n if (isNaN(node.h)) { node.h = defaults.h; }\n\n this.nodeBoundFix(node, resizing);\n return node;\n }\n\n /** part2 of preparing a node to fit inside our grid - checks for x,y,w from grid dimensions */\n public nodeBoundFix(node: GridStackNode, resizing?: boolean): GridStackEngine {\n\n let before = node._orig || Utils.copyPos({}, node);\n\n if (node.maxW) { node.w = Math.min(node.w, node.maxW); }\n if (node.maxH) { node.h = Math.min(node.h, node.maxH); }\n if (node.minW && node.minW <= this.column) { node.w = Math.max(node.w, node.minW); }\n if (node.minH) { node.h = Math.max(node.h, node.minH); }\n\n // if user loaded a larger than allowed widget for current # of columns,\n // remember it's position & width so we can restore back (1 -> 12 column) #1655 #1985\n // IFF we're not in the middle of column resizing!\n const saveOrig = (node.x || 0) + (node.w || 1) > this.column;\n if (saveOrig && this.column < 12 && !this._inColumnResize && node._id && this.findCacheLayout(node, 12) === -1) {\n let copy = {...node}; // need _id + positions\n if (copy.autoPosition || copy.x === undefined) { delete copy.x; delete copy.y; }\n else copy.x = Math.min(11, copy.x);\n copy.w = Math.min(12, copy.w || 1);\n this.cacheOneLayout(copy, 12);\n }\n\n if (node.w > this.column) {\n node.w = this.column;\n } else if (node.w < 1) {\n node.w = 1;\n }\n\n if (this.maxRow && node.h > this.maxRow) {\n node.h = this.maxRow;\n } else if (node.h < 1) {\n node.h = 1;\n }\n\n if (node.x < 0) {\n node.x = 0;\n }\n if (node.y < 0) {\n node.y = 0;\n }\n\n if (node.x + node.w > this.column) {\n if (resizing) {\n node.w = this.column - node.x;\n } else {\n node.x = this.column - node.w;\n }\n }\n if (this.maxRow && node.y + node.h > this.maxRow) {\n if (resizing) {\n node.h = this.maxRow - node.y;\n } else {\n node.y = this.maxRow - node.h;\n }\n }\n\n if (!Utils.samePos(node, before)) {\n node._dirty = true;\n }\n\n return this;\n }\n\n /** returns a list of modified nodes from their original values */\n public getDirtyNodes(verify?: boolean): GridStackNode[] {\n // compare original x,y,w,h instead as _dirty can be a temporary state\n if (verify) {\n return this.nodes.filter(n => n._dirty && !Utils.samePos(n, n._orig));\n }\n return this.nodes.filter(n => n._dirty);\n }\n\n /** @internal call this to call onChange callback with dirty nodes so DOM can be updated */\n protected _notify(removedNodes?: GridStackNode[]): GridStackEngine {\n if (this.batchMode || !this.onChange) return this;\n let dirtyNodes = (removedNodes || []).concat(this.getDirtyNodes());\n this.onChange(dirtyNodes);\n return this;\n }\n\n /** @internal remove dirty and last tried info */\n public cleanNodes(): GridStackEngine {\n if (this.batchMode) return this;\n this.nodes.forEach(n => {\n delete n._dirty;\n delete n._lastTried;\n });\n return this;\n }\n\n /** @internal called to save initial position/size to track real dirty state.\n * Note: should be called right after we call change event (so next API is can detect changes)\n * as well as right before we start move/resize/enter (so we can restore items to prev values) */\n public saveInitial(): GridStackEngine {\n this.nodes.forEach(n => {\n n._orig = Utils.copyPos({}, n);\n delete n._dirty;\n });\n this._hasLocked = this.nodes.some(n => n.locked);\n return this;\n }\n\n /** @internal restore all the nodes back to initial values (called when we leave) */\n public restoreInitial(): GridStackEngine {\n this.nodes.forEach(n => {\n if (Utils.samePos(n, n._orig)) return;\n Utils.copyPos(n, n._orig);\n n._dirty = true;\n });\n this._notify();\n return this;\n }\n\n /** find the first available empty spot for the given node width/height, updating the x,y attributes. return true if found.\n * optionally you can pass your own existing node list and column count, otherwise defaults to that engine data.\n * Optionally pass a widget to start search AFTER, meaning the order will remain the same but possibly have empty slots we skipped\n */\n public findEmptyPosition(node: GridStackNode, nodeList = this.nodes, column = this.column, after?: GridStackNode): boolean {\n let start = after ? after.y * column + (after.x + after.w) : 0;\n let found = false;\n for (let i = start; !found; ++i) {\n let x = i % column;\n let y = Math.floor(i / column);\n if (x + node.w > column) {\n continue;\n }\n let box = {x, y, w: node.w, h: node.h};\n if (!nodeList.find(n => Utils.isIntercepted(box, n))) {\n if (node.x !== x || node.y !== y) node._dirty = true;\n node.x = x;\n node.y = y;\n delete node.autoPosition;\n found = true;\n }\n }\n return found;\n }\n\n /** call to add the given node to our list, fixing collision and re-packing */\n public addNode(node: GridStackNode, triggerAddEvent = false, after?: GridStackNode): GridStackNode {\n let dup = this.nodes.find(n => n._id === node._id);\n if (dup) return dup; // prevent inserting twice! return it instead.\n\n // skip prepareNode if we're in middle of column resize (not new) but do check for bounds!\n this._inColumnResize ? this.nodeBoundFix(node) : this.prepareNode(node);\n delete node._temporaryRemoved;\n delete node._removeDOM;\n\n let skipCollision: boolean;\n if (node.autoPosition && this.findEmptyPosition(node, this.nodes, this.column, after)) {\n delete node.autoPosition; // found our slot\n skipCollision = true;\n }\n\n this.nodes.push(node);\n if (triggerAddEvent) { this.addedNodes.push(node); }\n\n if (!skipCollision) this._fixCollisions(node);\n if (!this.batchMode) { this._packNodes()._notify(); }\n return node;\n }\n\n public removeNode(node: GridStackNode, removeDOM = true, triggerEvent = false): GridStackEngine {\n if (!this.nodes.find(n => n._id === node._id)) {\n // TEST console.log(`Error: GridStackEngine.removeNode() node._id=${node._id} not found!`)\n return this;\n }\n if (triggerEvent) { // we wait until final drop to manually track removed items (rather than during drag)\n this.removedNodes.push(node);\n }\n if (removeDOM) node._removeDOM = true; // let CB remove actual HTML (used to set _id to null, but then we loose layout info)\n // don't use 'faster' .splice(findIndex(),1) in case node isn't in our list, or in multiple times.\n this.nodes = this.nodes.filter(n => n._id !== node._id);\n if (!node._isAboutToRemove) this._packNodes(); // if dragged out, no need to relayout as already done...\n this._notify([node]);\n return this;\n }\n\n public removeAll(removeDOM = true, triggerEvent = true): GridStackEngine {\n delete this._layouts;\n if (!this.nodes.length) return this;\n removeDOM && this.nodes.forEach(n => n._removeDOM = true); // let CB remove actual HTML (used to set _id to null, but then we loose layout info)\n const removedNodes = this.nodes;\n this.removedNodes = triggerEvent ? removedNodes : [];\n this.nodes = [];\n return this._notify(removedNodes);\n }\n\n /** checks if item can be moved (layout constrain) vs moveNode(), returning true if was able to move.\n * In more complicated cases (maxRow) it will attempt at moving the item and fixing\n * others in a clone first, then apply those changes if still within specs. */\n public moveNodeCheck(node: GridStackNode, o: GridStackMoveOpts): boolean {\n // if (node.locked) return false;\n if (!this.changedPosConstrain(node, o)) return false;\n o.pack = true;\n\n // simpler case: move item directly...\n if (!this.maxRow) {\n return this.moveNode(node, o);\n }\n\n // complex case: create a clone with NO maxRow (will check for out of bounds at the end)\n let clonedNode: GridStackNode;\n let clone = new GridStackEngine({\n column: this.column,\n float: this.float,\n nodes: this.nodes.map(n => {\n if (n._id === node._id) {\n clonedNode = {...n};\n return clonedNode;\n }\n return {...n};\n })\n });\n if (!clonedNode) return false;\n\n // check if we're covering 50% collision and could move, while still being under maxRow or at least not making it worse\n // (case where widget was somehow added past our max #2449)\n let canMove = clone.moveNode(clonedNode, o) && clone.getRow() <= Math.max(this.getRow(), this.maxRow);\n // else check if we can force a swap (float=true, or different shapes) on non-resize\n if (!canMove && !o.resizing && o.collide) {\n let collide = o.collide.el.gridstackNode; // find the source node the clone collided with at 50%\n if (this.swap(node, collide)) { // swaps and mark dirty\n this._notify();\n return true;\n }\n }\n if (!canMove) return false;\n\n // if clone was able to move, copy those mods over to us now instead of caller trying to do this all over!\n // Note: we can't use the list directly as elements and other parts point to actual node, so copy content\n clone.nodes.filter(n => n._dirty).forEach(c => {\n let n = this.nodes.find(a => a._id === c._id);\n if (!n) return;\n Utils.copyPos(n, c);\n n._dirty = true;\n });\n this._notify();\n return true;\n }\n\n /** return true if can fit in grid height constrain only (always true if no maxRow) */\n public willItFit(node: GridStackNode): boolean {\n delete node._willFitPos;\n if (!this.maxRow) return true;\n // create a clone with NO maxRow and check if still within size\n let clone = new GridStackEngine({\n column: this.column,\n float: this.float,\n nodes: this.nodes.map(n => {return {...n}})\n });\n let n = {...node}; // clone node so we don't mod any settings on it but have full autoPosition and min/max as well! #1687\n this.cleanupNode(n);\n delete n.el; delete n._id; delete n.content; delete n.grid;\n clone.addNode(n);\n if (clone.getRow() <= this.maxRow) {\n node._willFitPos = Utils.copyPos({}, n);\n return true;\n }\n return false;\n }\n\n /** true if x,y or w,h are different after clamping to min/max */\n public changedPosConstrain(node: GridStackNode, p: GridStackPosition): boolean {\n // first make sure w,h are set for caller\n p.w = p.w || node.w;\n p.h = p.h || node.h;\n if (node.x !== p.x || node.y !== p.y) return true;\n // check constrained w,h\n if (node.maxW) { p.w = Math.min(p.w, node.maxW); }\n if (node.maxH) { p.h = Math.min(p.h, node.maxH); }\n if (node.minW) { p.w = Math.max(p.w, node.minW); }\n if (node.minH) { p.h = Math.max(p.h, node.minH); }\n return (node.w !== p.w || node.h !== p.h);\n }\n\n /** return true if the passed in node was actually moved (checks for no-op and locked) */\n public moveNode(node: GridStackNode, o: GridStackMoveOpts): boolean {\n if (!node || /*node.locked ||*/ !o) return false;\n let wasUndefinedPack: boolean;\n if (o.pack === undefined && !this.batchMode) {\n wasUndefinedPack = o.pack = true;\n }\n\n // constrain the passed in values and check if we're still changing our node\n if (typeof o.x !== 'number') { o.x = node.x; }\n if (typeof o.y !== 'number') { o.y = node.y; }\n if (typeof o.w !== 'number') { o.w = node.w; }\n if (typeof o.h !== 'number') { o.h = node.h; }\n let resizing = (node.w !== o.w || node.h !== o.h);\n let nn: GridStackNode = Utils.copyPos({}, node, true); // get min/max out first, then opt positions next\n Utils.copyPos(nn, o);\n this.nodeBoundFix(nn, resizing);\n Utils.copyPos(o, nn);\n\n if (!o.forceCollide && Utils.samePos(node, o)) return false;\n let prevPos: GridStackPosition = Utils.copyPos({}, node);\n\n // check if we will need to fix collision at our new location\n let collides = this.collideAll(node, nn, o.skip);\n let needToMove = true;\n if (collides.length) {\n let activeDrag = node._moving && !o.nested;\n // check to make sure we actually collided over 50% surface area while dragging\n let collide = activeDrag ? this.directionCollideCoverage(node, o, collides) : collides[0];\n // if we're enabling creation of sub-grids on the fly, see if we're covering 80% of either one, if we didn't already do that\n if (activeDrag && collide && node.grid?.opts?.subGridDynamic && !node.grid._isTemp) {\n let over = Utils.areaIntercept(o.rect, collide._rect);\n let a1 = Utils.area(o.rect);\n let a2 = Utils.area(collide._rect);\n let perc = over / (a1 < a2 ? a1 : a2);\n if (perc > .8) {\n collide.grid.makeSubGrid(collide.el, undefined, node);\n collide = undefined;\n }\n }\n\n if (collide) {\n needToMove = !this._fixCollisions(node, nn, collide, o); // check if already moved...\n } else {\n needToMove = false; // we didn't cover >50% for a move, skip...\n if (wasUndefinedPack) delete o.pack;\n }\n }\n\n // now move (to the original ask vs the collision version which might differ) and repack things\n if (needToMove) {\n node._dirty = true;\n Utils.copyPos(node, nn);\n }\n if (o.pack) {\n this._packNodes()\n ._notify();\n }\n return !Utils.samePos(node, prevPos); // pack might have moved things back\n }\n\n public getRow(): number {\n return this.nodes.reduce((row, n) => Math.max(row, n.y + n.h), 0);\n }\n\n public beginUpdate(node: GridStackNode): GridStackEngine {\n if (!node._updating) {\n node._updating = true;\n delete node._skipDown;\n if (!this.batchMode) this.saveInitial();\n }\n return this;\n }\n\n public endUpdate(): GridStackEngine {\n let n = this.nodes.find(n => n._updating);\n if (n) {\n delete n._updating;\n delete n._skipDown;\n }\n return this;\n }\n\n /** saves a copy of the largest column layout (eg 12 even when rendering oneColumnMode) so we don't loose orig layout,\n * returning a list of widgets for serialization */\n public save(saveElement = true, saveCB?: SaveFcn): GridStackNode[] {\n // use the highest layout for any saved info so we can have full detail on reload #1849\n let len = this._layouts?.length;\n let layout = len && this.column !== (len - 1) ? this._layouts[len - 1] : null;\n let list: GridStackNode[] = [];\n this.sortNodes();\n this.nodes.forEach(n => {\n let wl = layout?.find(l => l._id === n._id);\n // use layout info fields instead if set\n let w: GridStackNode = {...n, ...(wl || {})};\n Utils.removeInternalForSave(w, !saveElement);\n if (saveCB) saveCB(n, w);\n list.push(w);\n });\n return list;\n }\n\n /** @internal called whenever a node is added or moved - updates the cached layouts */\n public layoutsNodesChange(nodes: GridStackNode[]): GridStackEngine {\n if (!this._layouts || this._inColumnResize) return this;\n // remove smaller layouts - we will re-generate those on the fly... larger ones need to update\n this._layouts.forEach((layout, column) => {\n if (!layout || column === this.column) return this;\n if (column < this.column) {\n this._layouts[column] = undefined;\n }\n else {\n // we save the original x,y,w (h isn't cached) to see what actually changed to propagate better.\n // NOTE: we don't need to check against out of bound scaling/moving as that will be done when using those cache values. #1785\n let ratio = column / this.column;\n nodes.forEach(node => {\n if (!node._orig) return; // didn't change (newly added ?)\n let n = layout.find(l => l._id === node._id);\n if (!n) return; // no cache for new nodes. Will use those values.\n // Y changed, push down same amount\n // TODO: detect doing item 'swaps' will help instead of move (especially in 1 column mode)\n if (n.y >= 0 && node.y !== node._orig.y) {\n n.y += (node.y - node._orig.y);\n }\n // X changed, scale from new position\n if (node.x !== node._orig.x) {\n n.x = Math.round(node.x * ratio);\n }\n // width changed, scale from new width\n if (node.w !== node._orig.w) {\n n.w = Math.round(node.w * ratio);\n }\n // ...height always carries over from cache\n });\n }\n });\n return this;\n }\n\n /**\n * @internal Called to scale the widget width & position up/down based on the column change.\n * Note we store previous layouts (especially original ones) to make it possible to go\n * from say 12 -> 1 -> 12 and get back to where we were.\n *\n * @param prevColumn previous number of columns\n * @param column new column number\n * @param layout specify the type of re-layout that will happen (position, size, etc...).\n * Note: items will never be outside of the current column boundaries. default (moveScale). Ignored for 1 column\n */\n public columnChanged(prevColumn: number, column: number, layout: ColumnOptions = 'moveScale'): GridStackEngine {\n if (!this.nodes.length || !column || prevColumn === column) return this;\n\n // in this mode no layout is done whatsoever, up to the caller to handle it\n if (layout === 'none') return this;\n\n // simpler shortcuts layouts\n const doCompact = layout === 'compact' || layout === 'list';\n if (doCompact) {\n this.sortNodes(1); // sort with original layout once and only once (new column will affect order otherwise)\n }\n\n // cache the current layout in case they want to go back (like 12 -> 1 -> 12) as it requires original data IFF we're sizing down (see below)\n if (column < prevColumn) this.cacheLayout(this.nodes, prevColumn);\n this.batchUpdate(); // do this EARLY as it will call saveInitial() so we can detect where we started for _dirty and collision\n let newNodes: GridStackNode[] = [];\n let nodes = doCompact ? this.nodes : Utils.sort(this.nodes, -1); // current column reverse sorting so we can insert last to front (limit collision)\n\n // see if we have cached previous layout IFF we are going up in size (restore) otherwise always\n // generate next size down from where we are (looks more natural as you gradually size down).\n if (column > prevColumn && this._layouts) {\n const cacheNodes = this._layouts[column] || [];\n // ...if not, start with the largest layout (if not already there) as down-scaling is more accurate\n // by pretending we came from that larger column by assigning those values as starting point\n let lastIndex = this._layouts.length - 1;\n if (!cacheNodes.length && prevColumn !== lastIndex && this._layouts[lastIndex]?.length) {\n prevColumn = lastIndex;\n this._layouts[lastIndex].forEach(cacheNode => {\n let n = nodes.find(n => n._id === cacheNode._id);\n if (n) {\n // still current, use cache info positions\n if (!doCompact && !cacheNode.autoPosition) {\n n.x = cacheNode.x ?? n.x;\n n.y = cacheNode.y ?? n.y;\n }\n n.w = cacheNode.w ?? n.w;\n if (cacheNode.x == undefined || cacheNode.y === undefined) n.autoPosition = true;\n }\n });\n }\n\n // if we found cache re-use those nodes that are still current\n cacheNodes.forEach(cacheNode => {\n let j = nodes.findIndex(n => n._id === cacheNode._id);\n if (j !== -1) {\n const n = nodes[j];\n // still current, use cache info positions\n if (doCompact) {\n n.w = cacheNode.w; // only w is used, and don't trim the list\n return;\n }\n if (cacheNode.autoPosition || isNaN(cacheNode.x) || isNaN(cacheNode.y)) {\n this.findEmptyPosition(cacheNode, newNodes);\n }\n if (!cacheNode.autoPosition) {\n n.x = cacheNode.x ?? n.x;\n n.y = cacheNode.y ?? n.y;\n n.w = cacheNode.w ?? n.w;\n newNodes.push(n);\n }\n nodes.splice(j, 1);\n }\n });\n }\n\n // much simpler layout that just compacts\n if (doCompact) {\n this.compact(layout, false);\n } else {\n // ...and add any extra non-cached ones\n if (nodes.length) {\n if (typeof layout === 'function') {\n layout(column, prevColumn, newNodes, nodes);\n } else {\n let ratio = doCompact ? 1 : column / prevColumn;\n let move = (layout === 'move' || layout === 'moveScale');\n let scale = (layout === 'scale' || layout === 'moveScale');\n nodes.forEach(node => {\n // NOTE: x + w could be outside of the grid, but addNode() below will handle that\n node.x = (column === 1 ? 0 : (move ? Math.round(node.x * ratio) : Math.min(node.x, column - 1)));\n node.w = ((column === 1 || prevColumn === 1) ? 1 : scale ? (Math.round(node.w * ratio) || 1) : (Math.min(node.w, column)));\n newNodes.push(node);\n });\n nodes = [];\n }\n }\n\n // finally re-layout them in reverse order (to get correct placement)\n newNodes = Utils.sort(newNodes, -1);\n this._inColumnResize = true; // prevent cache update\n this.nodes = []; // pretend we have no nodes to start with (add() will use same structures) to simplify layout\n newNodes.forEach(node => {\n this.addNode(node, false); // 'false' for add event trigger\n delete node._orig; // make sure the commit doesn't try to restore things back to original\n });\n }\n\n this.nodes.forEach(n => delete n._orig); // clear _orig before batch=false so it doesn't handle float=true restore\n this.batchUpdate(false, !doCompact);\n delete this._inColumnResize;\n return this;\n }\n\n /**\n * call to cache the given layout internally to the given location so we can restore back when column changes size\n * @param nodes list of nodes\n * @param column corresponding column index to save it under\n * @param clear if true, will force other caches to be removed (default false)\n */\n public cacheLayout(nodes: GridStackNode[], column: number, clear = false): GridStackEngine {\n let copy: GridStackNode[] = [];\n nodes.forEach((n, i) => {\n // make sure we have an id in case this is new layout, else re-use id already set\n if (n._id === undefined) {\n const existing = n.id ? this.nodes.find(n2 => n2.id === n.id) : undefined; // find existing node using users id\n n._id = existing?._id ?? GridStackEngine._idSeq++;\n }\n copy[i] = {x: n.x, y: n.y, w: n.w, _id: n._id} // only thing we change is x,y,w and id to find it back\n });\n this._layouts = clear ? [] : this._layouts || []; // use array to find larger quick\n this._layouts[column] = copy;\n return this;\n }\n\n /**\n * call to cache the given node layout internally to the given location so we can restore back when column changes size\n * @param node single node to cache\n * @param column corresponding column index to save it under\n */\n public cacheOneLayout(n: GridStackNode, column: number): GridStackEngine {\n n._id = n._id ?? GridStackEngine._idSeq++;\n let l: GridStackNode = {x: n.x, y: n.y, w: n.w, _id: n._id}\n if (n.autoPosition || n.x === undefined) { delete l.x; delete l.y; if (n.autoPosition) l.autoPosition = true; }\n this._layouts = this._layouts || [];\n this._layouts[column] = this._layouts[column] || [];\n let index = this.findCacheLayout(n, column);\n if (index === -1)\n this._layouts[column].push(l);\n else\n this._layouts[column][index] = l;\n return this;\n }\n\n protected findCacheLayout(n: GridStackNode, column: number): number | undefined {\n return this._layouts?.[column]?.findIndex(l => l._id === n._id) ?? -1;\n }\n\n public removeNodeFromLayoutCache(n: GridStackNode) {\n if (!this._layouts) {\n return;\n }\n for (let i = 0; i < this._layouts.length; i++) {\n let index = this.findCacheLayout(n, i);\n if (index !== -1) {\n this._layouts[i].splice(index, 1);\n }\n }\n }\n\n /** called to remove all internal values but the _id */\n public cleanupNode(node: GridStackNode): GridStackEngine {\n for (let prop in node) {\n if (prop[0] === '_' && prop !== '_id') delete node[prop];\n }\n return this;\n }\n}\n","/**\r\n * types.ts 10.3.1\r\n * Copyright (c) 2021 Alain Dumesny - see GridStack root license\r\n */\r\n\r\nimport { GridStack } from './gridstack';\r\nimport { GridStackEngine } from './gridstack-engine';\r\n\r\n// default values for grid options - used during init and when saving out\r\nexport const gridDefaults: GridStackOptions = {\r\n alwaysShowResizeHandle: 'mobile',\r\n animate: true,\r\n auto: true,\r\n cellHeight: 'auto',\r\n cellHeightThrottle: 100,\r\n cellHeightUnit: 'px',\r\n column: 12,\r\n draggable: { handle: '.grid-stack-item-content', appendTo: 'body', scroll: true },\r\n handle: '.grid-stack-item-content',\r\n itemClass: 'grid-stack-item',\r\n margin: 10,\r\n marginUnit: 'px',\r\n maxRow: 0,\r\n minRow: 0,\r\n placeholderClass: 'grid-stack-placeholder',\r\n placeholderText: '',\r\n removableOptions: { accept: 'grid-stack-item', decline: 'grid-stack-non-removable'},\r\n resizable: { handles: 'se' },\r\n rtl: 'auto',\r\n\r\n // **** same as not being set ****\r\n // disableDrag: false,\r\n // disableResize: false,\r\n // float: false,\r\n // handleClass: null,\r\n // removable: false,\r\n // staticGrid: false,\r\n // styleInHead: false,\r\n //removable\r\n};\r\n\r\n/** default dragIn options */\r\nexport const dragInDefaultOptions: DDDragInOpt = {\r\n handle: '.grid-stack-item-content',\r\n appendTo: 'body',\r\n // revert: 'invalid',\r\n // scroll: false,\r\n};\r\n\r\n/**\r\n * different layout options when changing # of columns, including a custom function that takes new/old column count, and array of new/old positions\r\n * Note: new list may be partially already filled if we have a cache of the layout at that size and new items were added later.\r\n * Options are:\r\n * 'list' - treat items as sorted list, keeping items (un-sized unless too big for column count) sequentially reflowing them\r\n * 'compact' - similar to list, but using compact() method which will possibly re-order items if an empty slots are available due to a larger item needing to be pushed to next row\r\n * 'moveScale' - will scale and move items by the ratio new newColumnCount / oldColumnCount\r\n * 'move' | 'scale' - will only size or move items\r\n * 'none' will leave items unchanged, unless they don't fit in column count\r\n */\r\nexport type ColumnOptions = 'list' | 'compact' | 'moveScale' | 'move' | 'scale' | 'none' |\r\n ((column: number, oldColumn: number, nodes: GridStackNode[], oldNodes: GridStackNode[]) => void);\r\nexport type CompactOptions = 'list' | 'compact';\r\nexport type numberOrString = number | string;\r\nexport interface GridItemHTMLElement extends HTMLElement {\r\n /** pointer to grid node instance */\r\n gridstackNode?: GridStackNode;\r\n /** @internal */\r\n _gridstackNodeOrig?: GridStackNode;\r\n}\r\n\r\nexport type GridStackElement = string | HTMLElement | GridItemHTMLElement;\r\n\r\n/** specific and general event handlers for the .on() method */\r\nexport type GridStackEventHandler = (event: Event) => void;\r\nexport type GridStackElementHandler = (event: Event, el: GridItemHTMLElement) => void;\r\nexport type GridStackNodesHandler = (event: Event, nodes: GridStackNode[]) => void;\r\nexport type GridStackDroppedHandler = (event: Event, previousNode: GridStackNode, newNode: GridStackNode) => void;\r\nexport type GridStackEventHandlerCallback = GridStackEventHandler | GridStackElementHandler | GridStackNodesHandler | GridStackDroppedHandler;\r\n\r\n/** optional function called during load() to callback the user on new added/remove grid items | grids */\r\nexport type AddRemoveFcn = (parent: HTMLElement, w: GridStackWidget, add: boolean, grid: boolean) => HTMLElement | undefined;\r\n\r\n/** optional function called during save() to let the caller add additional custom data to the GridStackWidget structure that will get returned */\r\nexport type SaveFcn = (node: GridStackNode, w: GridStackWidget) => void;\r\n\r\nexport type ResizeToContentFcn = (el: GridItemHTMLElement) => void;\r\n\r\n/** describes the responsive nature of the grid. NOTE: make sure to have correct extra CSS to support this. */\r\nexport interface Responsive {\r\n /** wanted width to maintain (+-50%) to dynamically pick a column count. NOTE: make sure to have correct extra CSS to support this. */\r\n columnWidth?: number;\r\n /** maximum number of columns allowed (default: 12). NOTE: make sure to have correct extra CSS to support this. */\r\n columnMax?: number;\r\n /** explicit width:column breakpoints instead of automatic 'columnWidth'. NOTE: make sure to have correct extra CSS to support this. */\r\n breakpoints?: Breakpoint[];\r\n /** specify if breakpoints are for window size or grid size (default:false = grid) */\r\n breakpointForWindow?: boolean;\r\n /** global re-layout mode when changing columns */\r\n layout?: ColumnOptions;\r\n}\r\n\r\nexport interface Breakpoint {\r\n /** <= width for the breakpoint to trigger */\r\n w?: number;\r\n /** column count */\r\n c: number;\r\n /** re-layout mode if different from global one */\r\n layout?: ColumnOptions;\r\n /** TODO: children layout, which spells out exact locations and could omit/add some children */\r\n // children?: GridStackWidget[];\r\n}\r\n\r\n/**\r\n * Defines the options for a Grid\r\n */\r\nexport interface GridStackOptions {\r\n /**\r\n * accept widgets dragged from other grids or from outside (default: `false`). Can be:\r\n * `true` (uses `'.grid-stack-item'` class filter) or `false`,\r\n * string for explicit class name,\r\n * function returning a boolean. See [example](http://gridstack.github.io/gridstack.js/demo/two.html)\r\n */\r\n acceptWidgets?: boolean | string | ((element: Element) => boolean);\r\n\r\n /** possible values (default: `mobile`) - does not apply to non-resizable widgets\r\n * `false` the resizing handles are only shown while hovering over a widget\r\n * `true` the resizing handles are always shown\r\n * 'mobile' if running on a mobile device, default to `true` (since there is no hovering per say), else `false`.\r\n See [example](http://gridstack.github.io/gridstack.js/demo/mobile.html) */\r\n alwaysShowResizeHandle?: true | false | 'mobile';\r\n\r\n /** turns animation on (default?: true) */\r\n animate?: boolean;\r\n\r\n /** if false gridstack will not initialize existing items (default?: true) */\r\n auto?: boolean;\r\n\r\n /**\r\n * one cell height (default?: 'auto'). Can be:\r\n * an integer (px)\r\n * a string (ex: '100px', '10em', '10rem'). Note: % doesn't work right - see demo/cell-height.html\r\n * 0, in which case the library will not generate styles for rows. Everything must be defined in your own CSS files.\r\n * 'auto' - height will be calculated for square cells (width / column) and updated live as you resize the window - also see `cellHeightThrottle`\r\n * 'initial' - similar to 'auto' (start at square cells) but stay that size during window resizing.\r\n */\r\n cellHeight?: numberOrString;\r\n\r\n /** throttle time delay (in ms) used when cellHeight='auto' to improve performance vs usability (default?: 100).\r\n * A value of 0 will make it instant at a cost of re-creating the CSS file at ever window resize event!\r\n * */\r\n cellHeightThrottle?: number;\r\n\r\n /** (internal) unit for cellHeight (default? 'px') which is set when a string cellHeight with a unit is passed (ex: '10rem') */\r\n cellHeightUnit?: string;\r\n\r\n /** list of children item to create when calling load() or addGrid() */\r\n children?: GridStackWidget[];\r\n\r\n /** number of columns (default?: 12). Note: IF you change this, CSS also have to change. See https://github.com/gridstack/gridstack.js#change-grid-columns.\r\n * Note: for nested grids, it is recommended to use 'auto' which will always match the container grid-item current width (in column) to keep inside and outside\r\n * items always to same. flag is not supported for regular non-nested grids.\r\n */\r\n column?: number | 'auto';\r\n\r\n /** responsive column layout for width:column behavior */\r\n columnOpts?: Responsive;\r\n\r\n /** additional class on top of '.grid-stack' (which is required for our CSS) to differentiate this instance.\r\n Note: only used by addGrid(), else your element should have the needed class */\r\n class?: string;\r\n\r\n /** disallows dragging of widgets (default?: false) */\r\n disableDrag?: boolean;\r\n\r\n /** disallows resizing of widgets (default?: false). */\r\n disableResize?: boolean;\r\n\r\n /** allows to override UI draggable options. (default?: { handle?: '.grid-stack-item-content', appendTo?: 'body' }) */\r\n draggable?: DDDragOpt;\r\n\r\n /** let user drag nested grid items out of a parent or not (default true - not supported yet) */\r\n //dragOut?: boolean;\r\n\r\n /** the type of engine to create (so you can subclass) default to GridStackEngine */\r\n engineClass?: typeof GridStackEngine;\r\n\r\n /** enable floating widgets (default?: false) See example (http://gridstack.github.io/gridstack.js/demo/float.html) */\r\n float?: boolean;\r\n\r\n /** draggable handle selector (default?: '.grid-stack-item-content') */\r\n handle?: string;\r\n\r\n /** draggable handle class (e.g. 'grid-stack-item-content'). If set 'handle' is ignored (default?: null) */\r\n handleClass?: string;\r\n\r\n /** additional widget class (default?: 'grid-stack-item') */\r\n itemClass?: string;\r\n\r\n /**\r\n * gap between grid item and content (default?: 10). This will set all 4 sides and support the CSS formats below\r\n * an integer (px)\r\n * a string with possible units (ex: '2em', '20px', '2rem')\r\n * string with space separated values (ex: '5px 10px 0 20px' for all 4 sides, or '5em 10em' for top/bottom and left/right pairs like CSS).\r\n * Note: all sides must have same units (last one wins, default px)\r\n */\r\n margin?: numberOrString;\r\n\r\n /** OLD way to optionally set each side - use margin: '5px 10px 0 20px' instead. Used internally to store each side. */\r\n marginTop?: numberOrString;\r\n marginRight?: numberOrString;\r\n marginBottom?: numberOrString;\r\n marginLeft?: numberOrString;\r\n\r\n /** (internal) unit for margin (default? 'px') set when `margin` is set as string with unit (ex: 2rem') */\r\n marginUnit?: string;\r\n\r\n /** maximum rows amount. Default? is 0 which means no maximum rows */\r\n maxRow?: number;\r\n\r\n /** minimum rows amount. Default is `0`. You can also do this with `min-height` CSS attribute\r\n * on the grid div in pixels, which will round to the closest row.\r\n */\r\n minRow?: number;\r\n\r\n /** If you are using a nonce-based Content Security Policy, pass your nonce here and\r\n * GridStack will add it to the