gridstack 11.5.1 → 12.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/README.md +16 -3
  2. package/dist/angular/README.md +0 -1
  3. package/dist/angular/esm2020/lib/base-widget.mjs +2 -2
  4. package/dist/angular/esm2020/lib/gridstack-item.component.mjs +2 -2
  5. package/dist/angular/esm2020/lib/gridstack.component.mjs +2 -2
  6. package/dist/angular/esm2020/lib/gridstack.module.mjs +2 -2
  7. package/dist/angular/esm2020/lib/types.mjs +2 -2
  8. package/dist/angular/fesm2015/gridstack-angular.mjs +4 -4
  9. package/dist/angular/fesm2015/gridstack-angular.mjs.map +1 -1
  10. package/dist/angular/fesm2020/gridstack-angular.mjs +5 -5
  11. package/dist/angular/fesm2020/gridstack-angular.mjs.map +1 -1
  12. package/dist/angular/lib/gridstack-item.component.d.ts +1 -1
  13. package/dist/angular/lib/gridstack.component.d.ts +1 -1
  14. package/dist/angular/lib/types.d.ts +1 -1
  15. package/dist/angular/src/base-widget.ts +1 -1
  16. package/dist/angular/src/gridstack-item.component.ts +1 -1
  17. package/dist/angular/src/gridstack.component.ts +1 -1
  18. package/dist/angular/src/gridstack.module.ts +1 -1
  19. package/dist/dd-base-impl.d.ts +1 -1
  20. package/dist/dd-base-impl.js +1 -1
  21. package/dist/dd-base-impl.js.map +1 -1
  22. package/dist/dd-draggable.d.ts +1 -1
  23. package/dist/dd-draggable.js +1 -1
  24. package/dist/dd-draggable.js.map +1 -1
  25. package/dist/dd-droppable.d.ts +1 -1
  26. package/dist/dd-droppable.js +1 -1
  27. package/dist/dd-droppable.js.map +1 -1
  28. package/dist/dd-element.d.ts +1 -1
  29. package/dist/dd-element.js +1 -1
  30. package/dist/dd-element.js.map +1 -1
  31. package/dist/dd-gridstack.d.ts +1 -1
  32. package/dist/dd-gridstack.js +1 -1
  33. package/dist/dd-gridstack.js.map +1 -1
  34. package/dist/dd-manager.d.ts +1 -1
  35. package/dist/dd-manager.js +1 -1
  36. package/dist/dd-manager.js.map +1 -1
  37. package/dist/dd-resizable-handle.d.ts +1 -1
  38. package/dist/dd-resizable-handle.js +1 -1
  39. package/dist/dd-resizable-handle.js.map +1 -1
  40. package/dist/dd-resizable.d.ts +1 -1
  41. package/dist/dd-resizable.js +3 -2
  42. package/dist/dd-resizable.js.map +1 -1
  43. package/dist/dd-touch.d.ts +1 -1
  44. package/dist/dd-touch.js +1 -1
  45. package/dist/dd-touch.js.map +1 -1
  46. package/dist/gridstack-all.js +1 -1
  47. package/dist/gridstack-all.js.LICENSE.txt +1 -1
  48. package/dist/gridstack-all.js.map +1 -1
  49. package/dist/gridstack-engine.d.ts +1 -1
  50. package/dist/gridstack-engine.js +1 -1
  51. package/dist/gridstack-engine.js.map +1 -1
  52. package/dist/gridstack.css +25 -79
  53. package/dist/gridstack.d.ts +6 -5
  54. package/dist/gridstack.js +132 -203
  55. package/dist/gridstack.js.map +1 -1
  56. package/dist/gridstack.min.css +1 -1
  57. package/dist/src/gridstack.scss +22 -21
  58. package/dist/types.d.ts +4 -2
  59. package/dist/types.js +1 -2
  60. package/dist/types.js.map +1 -1
  61. package/dist/utils.d.ts +1 -14
  62. package/dist/utils.js +1 -45
  63. package/dist/utils.js.map +1 -1
  64. package/doc/CHANGES.md +17 -0
  65. package/doc/README.md +0 -3
  66. package/package.json +2 -4
  67. package/dist/angular/node_modules/tslib/README.md +0 -164
  68. package/dist/es5/dd-base-impl.d.ts +0 -20
  69. package/dist/es5/dd-base-impl.js +0 -41
  70. package/dist/es5/dd-base-impl.js.map +0 -1
  71. package/dist/es5/dd-draggable.d.ts +0 -20
  72. package/dist/es5/dd-draggable.js +0 -408
  73. package/dist/es5/dd-draggable.js.map +0 -1
  74. package/dist/es5/dd-droppable.d.ts +0 -26
  75. package/dist/es5/dd-droppable.js +0 -185
  76. package/dist/es5/dd-droppable.js.map +0 -1
  77. package/dist/es5/dd-element.d.ts +0 -27
  78. package/dist/es5/dd-element.js +0 -96
  79. package/dist/es5/dd-element.js.map +0 -1
  80. package/dist/es5/dd-gridstack.d.ts +0 -34
  81. package/dist/es5/dd-gridstack.js +0 -154
  82. package/dist/es5/dd-gridstack.js.map +0 -1
  83. package/dist/es5/dd-manager.d.ts +0 -22
  84. package/dist/es5/dd-manager.js +0 -17
  85. package/dist/es5/dd-manager.js.map +0 -1
  86. package/dist/es5/dd-resizable-handle.d.ts +0 -18
  87. package/dist/es5/dd-resizable-handle.js +0 -117
  88. package/dist/es5/dd-resizable-handle.js.map +0 -1
  89. package/dist/es5/dd-resizable.d.ts +0 -30
  90. package/dist/es5/dd-resizable.js +0 -330
  91. package/dist/es5/dd-resizable.js.map +0 -1
  92. package/dist/es5/dd-touch.d.ts +0 -33
  93. package/dist/es5/dd-touch.js +0 -157
  94. package/dist/es5/dd-touch.js.map +0 -1
  95. package/dist/es5/gridstack-all.js +0 -3
  96. package/dist/es5/gridstack-all.js.LICENSE.txt +0 -7
  97. package/dist/es5/gridstack-all.js.map +0 -1
  98. package/dist/es5/gridstack-engine.d.ts +0 -107
  99. package/dist/es5/gridstack-engine.js +0 -1070
  100. package/dist/es5/gridstack-engine.js.map +0 -1
  101. package/dist/es5/gridstack-poly.js +0 -356
  102. package/dist/es5/gridstack.d.ts +0 -453
  103. package/dist/es5/gridstack.js +0 -2717
  104. package/dist/es5/gridstack.js.map +0 -1
  105. package/dist/es5/types.d.ts +0 -324
  106. package/dist/es5/types.js +0 -39
  107. package/dist/es5/types.js.map +0 -1
  108. package/dist/es5/utils.d.ts +0 -117
  109. package/dist/es5/utils.js +0 -677
  110. package/dist/es5/utils.js.map +0 -1
  111. package/dist/gridstack-extra.css +0 -373
  112. package/dist/gridstack-extra.min.css +0 -1
  113. package/dist/src/gridstack-extra.scss +0 -25
@@ -1 +1 @@
1
- {"version":3,"file":"gridstack-angular.mjs","sources":["../../../angular/projects/lib/src/lib/types.ts","../../../angular/projects/lib/src/lib/base-widget.ts","../../../angular/projects/lib/src/lib/gridstack-item.component.ts","../../../angular/projects/lib/src/lib/gridstack.component.ts","../../../angular/projects/lib/src/lib/gridstack.module.ts","../../../angular/projects/lib/src/index.ts","../../../angular/projects/lib/src/gridstack-angular.ts"],"sourcesContent":["/**\r\n * gridstack-item.component.ts 11.5.1\r\n * Copyright (c) 2025 Alain Dumesny - see GridStack root license\r\n */\r\n\r\nimport { GridStackNode, GridStackOptions, GridStackWidget } from \"gridstack\";\r\n\r\n/** extends to store Ng Component selector, instead/inAddition to content */\r\nexport interface NgGridStackWidget extends GridStackWidget {\r\n /** Angular tag selector for this component to create at runtime */\r\n selector?: string;\r\n /** serialized data for the component input fields */\r\n input?: NgCompInputs;\r\n /** nested grid options */\r\n subGridOpts?: NgGridStackOptions;\r\n}\r\n\r\nexport interface NgGridStackNode extends GridStackNode {\r\n selector?: string; // component type to create as content\r\n}\r\n\r\nexport interface NgGridStackOptions extends GridStackOptions {\r\n children?: NgGridStackWidget[];\r\n subGridOpts?: NgGridStackOptions;\r\n}\r\n\r\nexport type NgCompInputs = {[key: string]: any};\r\n","/**\r\n * gridstack-item.component.ts 11.5.1\r\n * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license\r\n */\r\n\r\n/**\r\n * Base interface that all widgets need to implement in order for GridstackItemComponent to correctly save/load/delete/..\r\n */\r\n\r\nimport { Injectable } from '@angular/core';\r\nimport { NgCompInputs, NgGridStackWidget } from './types';\r\n\r\n @Injectable()\r\n export abstract class BaseWidget {\r\n\r\n /** variable that holds the complete definition of this widgets (with selector,x,y,w,h) */\r\n public widgetItem?: NgGridStackWidget;\r\n\r\n /**\r\n * REDEFINE to return an object representing the data needed to re-create yourself, other than `selector` already handled.\r\n * This should map directly to the @Input() fields of this objects on create, so a simple apply can be used on read\r\n */\r\n public serialize(): NgCompInputs | undefined { return; }\r\n\r\n /**\r\n * REDEFINE this if your widget needs to read from saved data and transform it to create itself - you do this for\r\n * things that are not mapped directly into @Input() fields for example.\r\n */\r\n public deserialize(w: NgGridStackWidget) {\r\n // save full description for meta data\r\n this.widgetItem = w;\r\n if (!w) return;\r\n\r\n if (w.input) Object.assign(this, w.input);\r\n }\r\n }\r\n","/**\n * gridstack-item.component.ts 11.5.1\n * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license\n */\n\nimport { Component, ElementRef, Input, ViewChild, ViewContainerRef, OnDestroy, ComponentRef } from '@angular/core';\nimport { GridItemHTMLElement, GridStackNode } from 'gridstack';\nimport { BaseWidget } from './base-widget';\n\n/** store element to Ng Class pointer back */\nexport interface GridItemCompHTMLElement extends GridItemHTMLElement {\n _gridItemComp?: GridstackItemComponent;\n}\n\n/**\n * HTML Component Wrapper for gridstack items, in combination with GridstackComponent for parent grid\n */\n@Component({\n selector: 'gridstack-item',\n template: `\n <div class=\"grid-stack-item-content\">\n <!-- where dynamic items go based on component selector (recommended way), or sub-grids, etc...) -->\n <ng-template #container></ng-template>\n <!-- any static (defined in DOM - not recommended) content goes here -->\n <ng-content></ng-content>\n <!-- fallback HTML content from GridStackWidget.content if used instead (not recommended) -->\n {{options.content}}\n </div>`,\n styles: [`\n :host { display: block; }\n `],\n standalone: true,\n // changeDetection: ChangeDetectionStrategy.OnPush, // IFF you want to optimize and control when ChangeDetection needs to happen...\n})\nexport class GridstackItemComponent implements OnDestroy {\n\n /** container to append items dynamically */\n @ViewChild('container', { read: ViewContainerRef, static: true}) public container?: ViewContainerRef;\n\n /** ComponentRef of ourself - used by dynamic object to correctly get removed */\n public ref: ComponentRef<GridstackItemComponent> | undefined;\n\n /** child component so we can save/restore additional data to be saved along */\n public childWidget: BaseWidget | undefined;\n\n /** list of options for creating/updating this item */\n @Input() public set options(val: GridStackNode) {\n const grid = this.el.gridstackNode?.grid;\n if (grid) {\n // already built, do an update...\n grid.update(this.el, val);\n } else {\n // store our custom element in options so we can update it and not re-create a generic div!\n this._options = {...val, el: this.el};\n }\n }\n /** return the latest grid options (from GS once built, otherwise initial values) */\n public get options(): GridStackNode {\n return this.el.gridstackNode || this._options || {el: this.el};\n }\n\n protected _options?: GridStackNode;\n\n /** return the native element that contains grid specific fields as well */\n public get el(): GridItemCompHTMLElement { return this.elementRef.nativeElement; }\n\n /** clears the initial options now that we've built */\n public clearOptions() {\n delete this._options;\n }\n\n constructor(protected readonly elementRef: ElementRef<GridItemCompHTMLElement>) {\n this.el._gridItemComp = this;\n }\n\n public ngOnDestroy(): void {\n this.clearOptions();\n delete this.childWidget\n delete this.el._gridItemComp;\n delete this.container;\n delete this.ref;\n }\n}\n","/**\n * gridstack.component.ts 11.5.1\n * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license\n */\n\nimport { AfterContentInit, Component, ContentChildren, ElementRef, EventEmitter, Input,\n OnDestroy, OnInit, Output, QueryList, Type, ViewChild, ViewContainerRef, reflectComponentType, ComponentRef } from '@angular/core';\nimport { NgIf } from '@angular/common';\nimport { Subscription } from 'rxjs';\nimport { GridHTMLElement, GridItemHTMLElement, GridStack, GridStackNode, GridStackOptions, GridStackWidget } from 'gridstack';\n\nimport { NgGridStackNode, NgGridStackWidget } from './types';\nimport { BaseWidget } from './base-widget';\nimport { GridItemCompHTMLElement, GridstackItemComponent } from './gridstack-item.component';\n\n/** events handlers emitters signature for different events */\nexport type eventCB = {event: Event};\nexport type elementCB = {event: Event, el: GridItemHTMLElement};\nexport type nodesCB = {event: Event, nodes: GridStackNode[]};\nexport type droppedCB = {event: Event, previousNode: GridStackNode, newNode: GridStackNode};\n\n/** store element to Ng Class pointer back */\nexport interface GridCompHTMLElement extends GridHTMLElement {\n _gridComp?: GridstackComponent;\n}\n\n/** selector string to runtime Type mapping */\nexport type SelectorToType = {[key: string]: Type<Object>};\n\n/**\n * HTML Component Wrapper for gridstack, in combination with GridstackItemComponent for the items\n */\n@Component({\n selector: 'gridstack',\n template: `\n <!-- content to show when when grid is empty, like instructions on how to add widgets -->\n <ng-content select=\"[empty-content]\" *ngIf=\"isEmpty\"></ng-content>\n <!-- where dynamic items go -->\n <ng-template #container></ng-template>\n <!-- where template items go -->\n <ng-content></ng-content>\n `,\n styles: [`\n :host { display: block; }\n `],\n standalone: true,\n imports: [NgIf]\n // changeDetection: ChangeDetectionStrategy.OnPush, // IFF you want to optimize and control when ChangeDetection needs to happen...\n})\nexport class GridstackComponent implements OnInit, AfterContentInit, OnDestroy {\n\n /** track list of TEMPLATE (not recommended) grid items so we can sync between DOM and GS internals */\n @ContentChildren(GridstackItemComponent) public gridstackItems?: QueryList<GridstackItemComponent>;\n /** container to append items dynamically (recommended way) */\n @ViewChild('container', { read: ViewContainerRef, static: true}) public container?: ViewContainerRef;\n\n /** initial options for creation of the grid */\n @Input() public set options(o: GridStackOptions) {\n if (this._grid) {\n this._grid.updateOptions(o);\n } else {\n this._options = o;\n }\n }\n /** return the current running options */\n public get options(): GridStackOptions { return this._grid?.opts || this._options || {}; }\n\n /** true while ng-content with 'no-item-content' should be shown when last item is removed from a grid */\n @Input() public isEmpty?: boolean;\n\n /** individual list of GridStackEvent callbacks handlers as output\n * otherwise use this.grid.on('name1 name2 name3', callback) to handle multiple at once\n * see https://github.com/gridstack/gridstack.js/blob/master/demo/events.js#L4\n *\n * Note: camel casing and 'CB' added at the end to prevent @angular-eslint/no-output-native\n * eg: 'change' would trigger the raw CustomEvent so use different name.\n */\n @Output() public addedCB = new EventEmitter<nodesCB>();\n @Output() public changeCB = new EventEmitter<nodesCB>();\n @Output() public disableCB = new EventEmitter<eventCB>();\n @Output() public dragCB = new EventEmitter<elementCB>();\n @Output() public dragStartCB = new EventEmitter<elementCB>();\n @Output() public dragStopCB = new EventEmitter<elementCB>();\n @Output() public droppedCB = new EventEmitter<droppedCB>();\n @Output() public enableCB = new EventEmitter<eventCB>();\n @Output() public removedCB = new EventEmitter<nodesCB>();\n @Output() public resizeCB = new EventEmitter<elementCB>();\n @Output() public resizeStartCB = new EventEmitter<elementCB>();\n @Output() public resizeStopCB = new EventEmitter<elementCB>();\n\n /** return the native element that contains grid specific fields as well */\n public get el(): GridCompHTMLElement { return this.elementRef.nativeElement; }\n\n /** return the GridStack class */\n public get grid(): GridStack | undefined { return this._grid; }\n\n /** ComponentRef of ourself - used by dynamic object to correctly get removed */\n public ref: ComponentRef<GridstackComponent> | undefined;\n\n /**\n * stores the selector -> Type mapping, so we can create items dynamically from a string.\n * Unfortunately Ng doesn't provide public access to that mapping.\n */\n public static selectorToType: SelectorToType = {};\n /** add a list of ng Component to be mapped to selector */\n public static addComponentToSelectorType(typeList: Array<Type<Object>>) {\n typeList.forEach(type => GridstackComponent.selectorToType[ GridstackComponent.getSelector(type) ] = type);\n }\n /** return the ng Component selector */\n public static getSelector(type: Type<Object>): string {\n return reflectComponentType(type)!.selector;\n }\n\n protected _options?: GridStackOptions;\n protected _grid?: GridStack;\n protected _sub: Subscription | undefined;\n protected loaded?: boolean;\n\n constructor(protected readonly elementRef: ElementRef<GridCompHTMLElement>) {\n // set globally our method to create the right widget type\n if (!GridStack.addRemoveCB) {\n GridStack.addRemoveCB = gsCreateNgComponents;\n }\n if (!GridStack.saveCB) {\n GridStack.saveCB = gsSaveAdditionalNgInfo;\n }\n this.el._gridComp = this;\n }\n\n public ngOnInit(): void {\n // init ourself before any template children are created since we track them below anyway - no need to double create+update widgets\n this.loaded = !!this.options?.children?.length;\n this._grid = GridStack.init(this._options, this.el);\n delete this._options; // GS has it now\n\n this.checkEmpty();\n }\n\n /** wait until after all DOM is ready to init gridstack children (after angular ngFor and sub-components run first) */\n public ngAfterContentInit(): void {\n // track whenever the children list changes and update the layout...\n this._sub = this.gridstackItems?.changes.subscribe(() => this.updateAll());\n // ...and do this once at least unless we loaded children already\n if (!this.loaded) this.updateAll();\n this.hookEvents(this.grid);\n }\n\n public ngOnDestroy(): void {\n this.unhookEvents(this._grid);\n this._sub?.unsubscribe();\n this._grid?.destroy();\n delete this._grid;\n delete this.el._gridComp;\n delete this.container;\n delete this.ref;\n }\n\n /**\n * called when the TEMPLATE (not recommended) list of items changes - get a list of nodes and\n * update the layout accordingly (which will take care of adding/removing items changed by Angular)\n */\n public updateAll() {\n if (!this.grid) return;\n const layout: GridStackWidget[] = [];\n this.gridstackItems?.forEach(item => {\n layout.push(item.options);\n item.clearOptions();\n });\n this.grid.load(layout); // efficient that does diffs only\n }\n\n /** check if the grid is empty, if so show alternative content */\n public checkEmpty() {\n if (!this.grid) return;\n this.isEmpty = !this.grid.engine.nodes.length;\n }\n\n /** get all known events as easy to use Outputs for convenience */\n protected hookEvents(grid?: GridStack) {\n if (!grid) return;\n grid\n .on('added', (event: Event, nodes: GridStackNode[]) => { this.checkEmpty(); this.addedCB.emit({event, nodes}); })\n .on('change', (event: Event, nodes: GridStackNode[]) => this.changeCB.emit({event, nodes}))\n .on('disable', (event: Event) => this.disableCB.emit({event}))\n .on('drag', (event: Event, el: GridItemHTMLElement) => this.dragCB.emit({event, el}))\n .on('dragstart', (event: Event, el: GridItemHTMLElement) => this.dragStartCB.emit({event, el}))\n .on('dragstop', (event: Event, el: GridItemHTMLElement) => this.dragStopCB.emit({event, el}))\n .on('dropped', (event: Event, previousNode: GridStackNode, newNode: GridStackNode) => this.droppedCB.emit({event, previousNode, newNode}))\n .on('enable', (event: Event) => this.enableCB.emit({event}))\n .on('removed', (event: Event, nodes: GridStackNode[]) => { this.checkEmpty(); this.removedCB.emit({event, nodes}); })\n .on('resize', (event: Event, el: GridItemHTMLElement) => this.resizeCB.emit({event, el}))\n .on('resizestart', (event: Event, el: GridItemHTMLElement) => this.resizeStartCB.emit({event, el}))\n .on('resizestop', (event: Event, el: GridItemHTMLElement) => this.resizeStopCB.emit({event, el}))\n }\n\n protected unhookEvents(grid?: GridStack) {\n if (!grid) return;\n grid.off('added change disable drag dragstart dragstop dropped enable removed resize resizestart resizestop');\n }\n}\n\n/**\n * can be used when a new item needs to be created, which we do as a Angular component, or deleted (skip)\n **/\nexport function gsCreateNgComponents(host: GridCompHTMLElement | HTMLElement, n: NgGridStackNode, add: boolean, isGrid: boolean): HTMLElement | undefined {\n if (add) {\n //\n // create the component dynamically - see https://angular.io/docs/ts/latest/cookbook/dynamic-component-loader.html\n //\n if (!host) return;\n if (isGrid) {\n // TODO: figure out how to create ng component inside regular Div. need to access app injectors...\n // if (!container) {\n // const hostElement: Element = host;\n // const environmentInjector: EnvironmentInjector;\n // grid = createComponent(GridstackComponent, {environmentInjector, hostElement})?.instance;\n // }\n\n const gridItemComp = (host.parentElement as GridItemCompHTMLElement)?._gridItemComp;\n if (!gridItemComp) return;\n // check if gridItem has a child component with 'container' exposed to create under..\n const container = (gridItemComp.childWidget as any)?.container || gridItemComp.container;\n const gridRef = container?.createComponent(GridstackComponent);\n const grid = gridRef?.instance;\n if (!grid) return;\n grid.ref = gridRef;\n grid.options = n;\n return grid.el;\n } else {\n const gridComp = (host as GridCompHTMLElement)._gridComp;\n const gridItemRef = gridComp?.container?.createComponent(GridstackItemComponent);\n const gridItem = gridItemRef?.instance;\n if (!gridItem) return;\n gridItem.ref = gridItemRef\n\n // define what type of component to create as child, OR you can do it GridstackItemComponent template, but this is more generic\n const selector = n.selector;\n const type = selector ? GridstackComponent.selectorToType[selector] : undefined;\n if (type) {\n // shared code to create our selector component\n const createComp = () => {\n const childWidget = gridItem.container?.createComponent(type)?.instance as BaseWidget;\n // if proper BaseWidget subclass, save it and load additional data\n if (childWidget && typeof childWidget.serialize === 'function' && typeof childWidget.deserialize === 'function') {\n gridItem.childWidget = childWidget;\n childWidget.deserialize(n);\n }\n }\n\n const lazyLoad = n.lazyLoad || n.grid?.opts?.lazyLoad && n.lazyLoad !== false;\n if (lazyLoad) {\n if (!n.visibleObservable) {\n n.visibleObservable = new IntersectionObserver(([entry]) => { if (entry.isIntersecting) {\n n.visibleObservable?.disconnect();\n delete n.visibleObservable;\n createComp();\n }});\n window.setTimeout(() => n.visibleObservable?.observe(gridItem.el)); // wait until callee sets position attributes\n }\n } else createComp();\n }\n\n return gridItem.el;\n }\n } else {\n //\n // REMOVE - have to call ComponentRef:destroy() for dynamic objects to correctly remove themselves\n // Note: this will destroy all children dynamic components as well: gridItem -> childWidget\n //\n if (isGrid) {\n const grid = (n.el as GridCompHTMLElement)?._gridComp;\n if (grid?.ref) grid.ref.destroy();\n else grid?.ngOnDestroy();\n } else {\n const gridItem = (n.el as GridItemCompHTMLElement)?._gridItemComp;\n if (gridItem?.ref) gridItem.ref.destroy();\n else gridItem?.ngOnDestroy();\n }\n }\n return;\n}\n\n/**\n * called for each item in the grid - check if additional information needs to be saved.\n * Note: since this is options minus gridstack protected members using Utils.removeInternalForSave(),\n * this typically doesn't need to do anything. However your custom Component @Input() are now supported\n * using BaseWidget.serialize()\n */\nexport function gsSaveAdditionalNgInfo(n: NgGridStackNode, w: NgGridStackWidget) {\n const gridItem = (n.el as GridItemCompHTMLElement)?._gridItemComp;\n if (gridItem) {\n const input = gridItem.childWidget?.serialize();\n if (input) {\n w.input = input;\n }\n return;\n }\n // else check if Grid\n const grid = (n.el as GridCompHTMLElement)?._gridComp;\n if (grid) {\n //.... save any custom data\n }\n}\n","/**\r\n * gridstack.component.ts 11.5.1\r\n * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license\r\n */\r\n\r\nimport { NgModule } from \"@angular/core\";\r\n\r\nimport { GridstackItemComponent } from \"./gridstack-item.component\";\r\nimport { GridstackComponent } from \"./gridstack.component\";\r\n\r\n// @deprecated use GridstackComponent and GridstackItemComponent as standalone components\r\n@NgModule({\r\n imports: [\r\n GridstackItemComponent,\r\n GridstackComponent,\r\n ],\r\n exports: [\r\n GridstackItemComponent,\r\n GridstackComponent,\r\n ],\r\n})\r\nexport class GridstackModule {}\r\n","/*\n * Public API Surface of gridstack-angular\n */\n\nexport * from './lib/types';\nexport * from './lib/base-widget';\nexport * from './lib/gridstack-item.component';\nexport * from './lib/gridstack.component';\nexport * from './lib/gridstack.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;;ACHH;;;AAGG;MAUoB,UAAU,CAAA;AAK/B;;;AAGG;IACI,SAAS,GAAA,EAAgC,OAAO,EAAE;AAEzD;;;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,CAAC,WAAW,EAAE,SAAS,EAAE,CAAC;AAChD,QAAA,IAAI,KAAK,EAAE;AACT,YAAA,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC;AACjB,SAAA;QACD,OAAO;AACR,KAAA;;AAED,IAAA,MAAM,IAAI,GAAI,CAAC,CAAC,EAA0B,EAAE,SAAS,CAAC;AACtD,IAAA,IAAI,IAAI,EAAE;;AAET,KAAA;AACH;;AC9SA;;;AAGG;AAOH;MAWa,eAAe,CAAA;;4GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAf,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YARxB,sBAAsB;AACtB,QAAA,kBAAkB,aAGlB,sBAAsB;QACtB,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAGT,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YARxB,sBAAsB;QACtB,kBAAkB,CAAA,EAAA,CAAA,CAAA;2FAOT,eAAe,EAAA,UAAA,EAAA,CAAA;kBAV3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,sBAAsB;wBACtB,kBAAkB;AACnB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,sBAAsB;wBACtB,kBAAkB;AACnB,qBAAA;AACF,iBAAA,CAAA;;;ACpBD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"gridstack-angular.mjs","sources":["../../../angular/projects/lib/src/lib/types.ts","../../../angular/projects/lib/src/lib/base-widget.ts","../../../angular/projects/lib/src/lib/gridstack-item.component.ts","../../../angular/projects/lib/src/lib/gridstack.component.ts","../../../angular/projects/lib/src/lib/gridstack.module.ts","../../../angular/projects/lib/src/index.ts","../../../angular/projects/lib/src/gridstack-angular.ts"],"sourcesContent":["/**\r\n * gridstack-item.component.ts 12.1.0\r\n * Copyright (c) 2025 Alain Dumesny - see GridStack root license\r\n */\r\n\r\nimport { GridStackNode, GridStackOptions, GridStackWidget } from \"gridstack\";\r\n\r\n/** extends to store Ng Component selector, instead/inAddition to content */\r\nexport interface NgGridStackWidget extends GridStackWidget {\r\n /** Angular tag selector for this component to create at runtime */\r\n selector?: string;\r\n /** serialized data for the component input fields */\r\n input?: NgCompInputs;\r\n /** nested grid options */\r\n subGridOpts?: NgGridStackOptions;\r\n}\r\n\r\nexport interface NgGridStackNode extends GridStackNode {\r\n selector?: string; // component type to create as content\r\n}\r\n\r\nexport interface NgGridStackOptions extends GridStackOptions {\r\n children?: NgGridStackWidget[];\r\n subGridOpts?: NgGridStackOptions;\r\n}\r\n\r\nexport type NgCompInputs = {[key: string]: any};\r\n","/**\r\n * gridstack-item.component.ts 12.1.0\r\n * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license\r\n */\r\n\r\n/**\r\n * Base interface that all widgets need to implement in order for GridstackItemComponent to correctly save/load/delete/..\r\n */\r\n\r\nimport { Injectable } from '@angular/core';\r\nimport { NgCompInputs, NgGridStackWidget } from './types';\r\n\r\n @Injectable()\r\n export abstract class BaseWidget {\r\n\r\n /** variable that holds the complete definition of this widgets (with selector,x,y,w,h) */\r\n public widgetItem?: NgGridStackWidget;\r\n\r\n /**\r\n * REDEFINE to return an object representing the data needed to re-create yourself, other than `selector` already handled.\r\n * This should map directly to the @Input() fields of this objects on create, so a simple apply can be used on read\r\n */\r\n public serialize(): NgCompInputs | undefined { return; }\r\n\r\n /**\r\n * REDEFINE this if your widget needs to read from saved data and transform it to create itself - you do this for\r\n * things that are not mapped directly into @Input() fields for example.\r\n */\r\n public deserialize(w: NgGridStackWidget) {\r\n // save full description for meta data\r\n this.widgetItem = w;\r\n if (!w) return;\r\n\r\n if (w.input) Object.assign(this, w.input);\r\n }\r\n }\r\n","/**\n * gridstack-item.component.ts 12.1.0\n * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license\n */\n\nimport { Component, ElementRef, Input, ViewChild, ViewContainerRef, OnDestroy, ComponentRef } from '@angular/core';\nimport { GridItemHTMLElement, GridStackNode } from 'gridstack';\nimport { BaseWidget } from './base-widget';\n\n/** store element to Ng Class pointer back */\nexport interface GridItemCompHTMLElement extends GridItemHTMLElement {\n _gridItemComp?: GridstackItemComponent;\n}\n\n/**\n * HTML Component Wrapper for gridstack items, in combination with GridstackComponent for parent grid\n */\n@Component({\n selector: 'gridstack-item',\n template: `\n <div class=\"grid-stack-item-content\">\n <!-- where dynamic items go based on component selector (recommended way), or sub-grids, etc...) -->\n <ng-template #container></ng-template>\n <!-- any static (defined in DOM - not recommended) content goes here -->\n <ng-content></ng-content>\n <!-- fallback HTML content from GridStackWidget.content if used instead (not recommended) -->\n {{options.content}}\n </div>`,\n styles: [`\n :host { display: block; }\n `],\n standalone: true,\n // changeDetection: ChangeDetectionStrategy.OnPush, // IFF you want to optimize and control when ChangeDetection needs to happen...\n})\nexport class GridstackItemComponent implements OnDestroy {\n\n /** container to append items dynamically */\n @ViewChild('container', { read: ViewContainerRef, static: true}) public container?: ViewContainerRef;\n\n /** ComponentRef of ourself - used by dynamic object to correctly get removed */\n public ref: ComponentRef<GridstackItemComponent> | undefined;\n\n /** child component so we can save/restore additional data to be saved along */\n public childWidget: BaseWidget | undefined;\n\n /** list of options for creating/updating this item */\n @Input() public set options(val: GridStackNode) {\n const grid = this.el.gridstackNode?.grid;\n if (grid) {\n // already built, do an update...\n grid.update(this.el, val);\n } else {\n // store our custom element in options so we can update it and not re-create a generic div!\n this._options = {...val, el: this.el};\n }\n }\n /** return the latest grid options (from GS once built, otherwise initial values) */\n public get options(): GridStackNode {\n return this.el.gridstackNode || this._options || {el: this.el};\n }\n\n protected _options?: GridStackNode;\n\n /** return the native element that contains grid specific fields as well */\n public get el(): GridItemCompHTMLElement { return this.elementRef.nativeElement; }\n\n /** clears the initial options now that we've built */\n public clearOptions() {\n delete this._options;\n }\n\n constructor(protected readonly elementRef: ElementRef<GridItemCompHTMLElement>) {\n this.el._gridItemComp = this;\n }\n\n public ngOnDestroy(): void {\n this.clearOptions();\n delete this.childWidget\n delete this.el._gridItemComp;\n delete this.container;\n delete this.ref;\n }\n}\n","/**\n * gridstack.component.ts 12.1.0\n * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license\n */\n\nimport { AfterContentInit, Component, ContentChildren, ElementRef, EventEmitter, Input,\n OnDestroy, OnInit, Output, QueryList, Type, ViewChild, ViewContainerRef, reflectComponentType, ComponentRef } from '@angular/core';\nimport { NgIf } from '@angular/common';\nimport { Subscription } from 'rxjs';\nimport { GridHTMLElement, GridItemHTMLElement, GridStack, GridStackNode, GridStackOptions, GridStackWidget } from 'gridstack';\n\nimport { NgGridStackNode, NgGridStackWidget } from './types';\nimport { BaseWidget } from './base-widget';\nimport { GridItemCompHTMLElement, GridstackItemComponent } from './gridstack-item.component';\n\n/** events handlers emitters signature for different events */\nexport type eventCB = {event: Event};\nexport type elementCB = {event: Event, el: GridItemHTMLElement};\nexport type nodesCB = {event: Event, nodes: GridStackNode[]};\nexport type droppedCB = {event: Event, previousNode: GridStackNode, newNode: GridStackNode};\n\n/** store element to Ng Class pointer back */\nexport interface GridCompHTMLElement extends GridHTMLElement {\n _gridComp?: GridstackComponent;\n}\n\n/** selector string to runtime Type mapping */\nexport type SelectorToType = {[key: string]: Type<Object>};\n\n/**\n * HTML Component Wrapper for gridstack, in combination with GridstackItemComponent for the items\n */\n@Component({\n selector: 'gridstack',\n template: `\n <!-- content to show when when grid is empty, like instructions on how to add widgets -->\n <ng-content select=\"[empty-content]\" *ngIf=\"isEmpty\"></ng-content>\n <!-- where dynamic items go -->\n <ng-template #container></ng-template>\n <!-- where template items go -->\n <ng-content></ng-content>\n `,\n styles: [`\n :host { display: block; }\n `],\n standalone: true,\n imports: [NgIf]\n // changeDetection: ChangeDetectionStrategy.OnPush, // IFF you want to optimize and control when ChangeDetection needs to happen...\n})\nexport class GridstackComponent implements OnInit, AfterContentInit, OnDestroy {\n\n /** track list of TEMPLATE (not recommended) grid items so we can sync between DOM and GS internals */\n @ContentChildren(GridstackItemComponent) public gridstackItems?: QueryList<GridstackItemComponent>;\n /** container to append items dynamically (recommended way) */\n @ViewChild('container', { read: ViewContainerRef, static: true}) public container?: ViewContainerRef;\n\n /** initial options for creation of the grid */\n @Input() public set options(o: GridStackOptions) {\n if (this._grid) {\n this._grid.updateOptions(o);\n } else {\n this._options = o;\n }\n }\n /** return the current running options */\n public get options(): GridStackOptions { return this._grid?.opts || this._options || {}; }\n\n /** true while ng-content with 'no-item-content' should be shown when last item is removed from a grid */\n @Input() public isEmpty?: boolean;\n\n /** individual list of GridStackEvent callbacks handlers as output\n * otherwise use this.grid.on('name1 name2 name3', callback) to handle multiple at once\n * see https://github.com/gridstack/gridstack.js/blob/master/demo/events.js#L4\n *\n * Note: camel casing and 'CB' added at the end to prevent @angular-eslint/no-output-native\n * eg: 'change' would trigger the raw CustomEvent so use different name.\n */\n @Output() public addedCB = new EventEmitter<nodesCB>();\n @Output() public changeCB = new EventEmitter<nodesCB>();\n @Output() public disableCB = new EventEmitter<eventCB>();\n @Output() public dragCB = new EventEmitter<elementCB>();\n @Output() public dragStartCB = new EventEmitter<elementCB>();\n @Output() public dragStopCB = new EventEmitter<elementCB>();\n @Output() public droppedCB = new EventEmitter<droppedCB>();\n @Output() public enableCB = new EventEmitter<eventCB>();\n @Output() public removedCB = new EventEmitter<nodesCB>();\n @Output() public resizeCB = new EventEmitter<elementCB>();\n @Output() public resizeStartCB = new EventEmitter<elementCB>();\n @Output() public resizeStopCB = new EventEmitter<elementCB>();\n\n /** return the native element that contains grid specific fields as well */\n public get el(): GridCompHTMLElement { return this.elementRef.nativeElement; }\n\n /** return the GridStack class */\n public get grid(): GridStack | undefined { return this._grid; }\n\n /** ComponentRef of ourself - used by dynamic object to correctly get removed */\n public ref: ComponentRef<GridstackComponent> | undefined;\n\n /**\n * stores the selector -> Type mapping, so we can create items dynamically from a string.\n * Unfortunately Ng doesn't provide public access to that mapping.\n */\n public static selectorToType: SelectorToType = {};\n /** add a list of ng Component to be mapped to selector */\n public static addComponentToSelectorType(typeList: Array<Type<Object>>) {\n typeList.forEach(type => GridstackComponent.selectorToType[ GridstackComponent.getSelector(type) ] = type);\n }\n /** return the ng Component selector */\n public static getSelector(type: Type<Object>): string {\n return reflectComponentType(type)!.selector;\n }\n\n protected _options?: GridStackOptions;\n protected _grid?: GridStack;\n protected _sub: Subscription | undefined;\n protected loaded?: boolean;\n\n constructor(protected readonly elementRef: ElementRef<GridCompHTMLElement>) {\n // set globally our method to create the right widget type\n if (!GridStack.addRemoveCB) {\n GridStack.addRemoveCB = gsCreateNgComponents;\n }\n if (!GridStack.saveCB) {\n GridStack.saveCB = gsSaveAdditionalNgInfo;\n }\n this.el._gridComp = this;\n }\n\n public ngOnInit(): void {\n // init ourself before any template children are created since we track them below anyway - no need to double create+update widgets\n this.loaded = !!this.options?.children?.length;\n this._grid = GridStack.init(this._options, this.el);\n delete this._options; // GS has it now\n\n this.checkEmpty();\n }\n\n /** wait until after all DOM is ready to init gridstack children (after angular ngFor and sub-components run first) */\n public ngAfterContentInit(): void {\n // track whenever the children list changes and update the layout...\n this._sub = this.gridstackItems?.changes.subscribe(() => this.updateAll());\n // ...and do this once at least unless we loaded children already\n if (!this.loaded) this.updateAll();\n this.hookEvents(this.grid);\n }\n\n public ngOnDestroy(): void {\n this.unhookEvents(this._grid);\n this._sub?.unsubscribe();\n this._grid?.destroy();\n delete this._grid;\n delete this.el._gridComp;\n delete this.container;\n delete this.ref;\n }\n\n /**\n * called when the TEMPLATE (not recommended) list of items changes - get a list of nodes and\n * update the layout accordingly (which will take care of adding/removing items changed by Angular)\n */\n public updateAll() {\n if (!this.grid) return;\n const layout: GridStackWidget[] = [];\n this.gridstackItems?.forEach(item => {\n layout.push(item.options);\n item.clearOptions();\n });\n this.grid.load(layout); // efficient that does diffs only\n }\n\n /** check if the grid is empty, if so show alternative content */\n public checkEmpty() {\n if (!this.grid) return;\n this.isEmpty = !this.grid.engine.nodes.length;\n }\n\n /** get all known events as easy to use Outputs for convenience */\n protected hookEvents(grid?: GridStack) {\n if (!grid) return;\n grid\n .on('added', (event: Event, nodes: GridStackNode[]) => { this.checkEmpty(); this.addedCB.emit({event, nodes}); })\n .on('change', (event: Event, nodes: GridStackNode[]) => this.changeCB.emit({event, nodes}))\n .on('disable', (event: Event) => this.disableCB.emit({event}))\n .on('drag', (event: Event, el: GridItemHTMLElement) => this.dragCB.emit({event, el}))\n .on('dragstart', (event: Event, el: GridItemHTMLElement) => this.dragStartCB.emit({event, el}))\n .on('dragstop', (event: Event, el: GridItemHTMLElement) => this.dragStopCB.emit({event, el}))\n .on('dropped', (event: Event, previousNode: GridStackNode, newNode: GridStackNode) => this.droppedCB.emit({event, previousNode, newNode}))\n .on('enable', (event: Event) => this.enableCB.emit({event}))\n .on('removed', (event: Event, nodes: GridStackNode[]) => { this.checkEmpty(); this.removedCB.emit({event, nodes}); })\n .on('resize', (event: Event, el: GridItemHTMLElement) => this.resizeCB.emit({event, el}))\n .on('resizestart', (event: Event, el: GridItemHTMLElement) => this.resizeStartCB.emit({event, el}))\n .on('resizestop', (event: Event, el: GridItemHTMLElement) => this.resizeStopCB.emit({event, el}))\n }\n\n protected unhookEvents(grid?: GridStack) {\n if (!grid) return;\n grid.off('added change disable drag dragstart dragstop dropped enable removed resize resizestart resizestop');\n }\n}\n\n/**\n * can be used when a new item needs to be created, which we do as a Angular component, or deleted (skip)\n **/\nexport function gsCreateNgComponents(host: GridCompHTMLElement | HTMLElement, n: NgGridStackNode, add: boolean, isGrid: boolean): HTMLElement | undefined {\n if (add) {\n //\n // create the component dynamically - see https://angular.io/docs/ts/latest/cookbook/dynamic-component-loader.html\n //\n if (!host) return;\n if (isGrid) {\n // TODO: figure out how to create ng component inside regular Div. need to access app injectors...\n // if (!container) {\n // const hostElement: Element = host;\n // const environmentInjector: EnvironmentInjector;\n // grid = createComponent(GridstackComponent, {environmentInjector, hostElement})?.instance;\n // }\n\n const gridItemComp = (host.parentElement as GridItemCompHTMLElement)?._gridItemComp;\n if (!gridItemComp) return;\n // check if gridItem has a child component with 'container' exposed to create under..\n const container = (gridItemComp.childWidget as any)?.container || gridItemComp.container;\n const gridRef = container?.createComponent(GridstackComponent);\n const grid = gridRef?.instance;\n if (!grid) return;\n grid.ref = gridRef;\n grid.options = n;\n return grid.el;\n } else {\n const gridComp = (host as GridCompHTMLElement)._gridComp;\n const gridItemRef = gridComp?.container?.createComponent(GridstackItemComponent);\n const gridItem = gridItemRef?.instance;\n if (!gridItem) return;\n gridItem.ref = gridItemRef\n\n // define what type of component to create as child, OR you can do it GridstackItemComponent template, but this is more generic\n const selector = n.selector;\n const type = selector ? GridstackComponent.selectorToType[selector] : undefined;\n if (type) {\n // shared code to create our selector component\n const createComp = () => {\n const childWidget = gridItem.container?.createComponent(type)?.instance as BaseWidget;\n // if proper BaseWidget subclass, save it and load additional data\n if (childWidget && typeof childWidget.serialize === 'function' && typeof childWidget.deserialize === 'function') {\n gridItem.childWidget = childWidget;\n childWidget.deserialize(n);\n }\n }\n\n const lazyLoad = n.lazyLoad || n.grid?.opts?.lazyLoad && n.lazyLoad !== false;\n if (lazyLoad) {\n if (!n.visibleObservable) {\n n.visibleObservable = new IntersectionObserver(([entry]) => { if (entry.isIntersecting) {\n n.visibleObservable?.disconnect();\n delete n.visibleObservable;\n createComp();\n }});\n window.setTimeout(() => n.visibleObservable?.observe(gridItem.el)); // wait until callee sets position attributes\n }\n } else createComp();\n }\n\n return gridItem.el;\n }\n } else {\n //\n // REMOVE - have to call ComponentRef:destroy() for dynamic objects to correctly remove themselves\n // Note: this will destroy all children dynamic components as well: gridItem -> childWidget\n //\n if (isGrid) {\n const grid = (n.el as GridCompHTMLElement)?._gridComp;\n if (grid?.ref) grid.ref.destroy();\n else grid?.ngOnDestroy();\n } else {\n const gridItem = (n.el as GridItemCompHTMLElement)?._gridItemComp;\n if (gridItem?.ref) gridItem.ref.destroy();\n else gridItem?.ngOnDestroy();\n }\n }\n return;\n}\n\n/**\n * called for each item in the grid - check if additional information needs to be saved.\n * Note: since this is options minus gridstack protected members using Utils.removeInternalForSave(),\n * this typically doesn't need to do anything. However your custom Component @Input() are now supported\n * using BaseWidget.serialize()\n */\nexport function gsSaveAdditionalNgInfo(n: NgGridStackNode, w: NgGridStackWidget) {\n const gridItem = (n.el as GridItemCompHTMLElement)?._gridItemComp;\n if (gridItem) {\n const input = gridItem.childWidget?.serialize();\n if (input) {\n w.input = input;\n }\n return;\n }\n // else check if Grid\n const grid = (n.el as GridCompHTMLElement)?._gridComp;\n if (grid) {\n //.... save any custom data\n }\n}\n","/**\r\n * gridstack.component.ts 12.1.0\r\n * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license\r\n */\r\n\r\nimport { NgModule } from \"@angular/core\";\r\n\r\nimport { GridstackItemComponent } from \"./gridstack-item.component\";\r\nimport { GridstackComponent } from \"./gridstack.component\";\r\n\r\n// @deprecated use GridstackComponent and GridstackItemComponent as standalone components\r\n@NgModule({\r\n imports: [\r\n GridstackItemComponent,\r\n GridstackComponent,\r\n ],\r\n exports: [\r\n GridstackItemComponent,\r\n GridstackComponent,\r\n ],\r\n})\r\nexport class GridstackModule {}\r\n","/*\n * Public API Surface of gridstack-angular\n */\n\nexport * from './lib/types';\nexport * from './lib/base-widget';\nexport * from './lib/gridstack-item.component';\nexport * from './lib/gridstack.component';\nexport * from './lib/gridstack.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;;ACHH;;;AAGG;MAUoB,UAAU,CAAA;AAK/B;;;AAGG;IACI,SAAS,GAAA,EAAgC,OAAO,EAAE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right (c) 2022-2024 Alain Dumesny - see GridStack root license
4
4
  */
5
5
  import { ElementRef, ViewContainerRef, OnDestroy, ComponentRef } from '@angular/core';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * gridstack.component.ts 11.5.1
2
+ * gridstack.component.ts 12.1.0
3
3
  * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license
4
4
  */
5
5
  import { AfterContentInit, ElementRef, EventEmitter, OnDestroy, OnInit, QueryList, Type, ViewContainerRef, ComponentRef } from '@angular/core';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * gridstack-item.component.ts 11.5.1
2
+ * gridstack-item.component.ts 12.1.0
3
3
  * Copyright (c) 2025 Alain Dumesny - see GridStack root license
4
4
  */
5
5
  import { GridStackNode, GridStackOptions, GridStackWidget } from "gridstack";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * gridstack-item.component.ts 11.5.1
2
+ * gridstack-item.component.ts 12.1.0
3
3
  * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * gridstack-item.component.ts 11.5.1
2
+ * gridstack-item.component.ts 12.1.0
3
3
  * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * gridstack.component.ts 11.5.1
2
+ * gridstack.component.ts 12.1.0
3
3
  * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * gridstack.component.ts 11.5.1
2
+ * gridstack.component.ts 12.1.0
3
3
  * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * dd-base-impl.ts 11.5.1
2
+ * dd-base-impl.ts 12.1.0
3
3
  * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license
4
4
  */
5
5
  export type EventCallback = (event: Event) => boolean | void;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * dd-base-impl.ts 11.5.1
2
+ * dd-base-impl.ts 12.1.0
3
3
  * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license
4
4
  */
5
5
  export class DDBaseImplement {
@@ -1 +1 @@
1
- {"version":3,"file":"dd-base-impl.js","sourceRoot":"","sources":["../src/dd-base-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,MAAM,OAAgB,eAAe;IAArC;QAME,gBAAgB;QACN,mBAAc,GAEpB,EAAE,CAAC;IA0BT,CAAC;IAlCC,mHAAmH;IACnH,IAAW,QAAQ,KAAgB,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IASpD,EAAE,CAAC,KAAa,EAAE,QAAuB;QAC9C,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC;IACxC,CAAC;IAEM,GAAG,CAAC,KAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAEM,MAAM;QACX,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACzB,CAAC;IAEM,OAAO;QACZ,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACxB,CAAC;IAEM,OAAO;QACZ,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAEM,YAAY,CAAC,SAAiB,EAAE,KAAY;QACjD,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC;YACzE,OAAO,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC;CACF","sourcesContent":["/**\n * dd-base-impl.ts 11.5.1\n * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license\n */\n\nexport type EventCallback = (event: Event) => boolean|void;\nexport abstract class DDBaseImplement {\n /** returns the enable state, but you have to call enable()/disable() to change (as other things need to happen) */\n public get disabled(): boolean { return this._disabled; }\n\n /** @internal */\n protected _disabled: boolean; // initial state to differentiate from false\n /** @internal */\n protected _eventRegister: {\n [eventName: string]: EventCallback;\n } = {};\n\n public on(event: string, callback: EventCallback): void {\n this._eventRegister[event] = callback;\n }\n\n public off(event: string): void {\n delete this._eventRegister[event];\n }\n\n public enable(): void {\n this._disabled = false;\n }\n\n public disable(): void {\n this._disabled = true;\n }\n\n public destroy(): void {\n delete this._eventRegister;\n }\n\n public triggerEvent(eventName: string, event: Event): boolean|void {\n if (!this.disabled && this._eventRegister && this._eventRegister[eventName])\n return this._eventRegister[eventName](event);\n }\n}\n\nexport interface HTMLElementExtendOpt<T> {\n el: HTMLElement;\n option: T;\n updateOption(T): DDBaseImplement;\n}\n"]}
1
+ {"version":3,"file":"dd-base-impl.js","sourceRoot":"","sources":["../src/dd-base-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,MAAM,OAAgB,eAAe;IAArC;QAME,gBAAgB;QACN,mBAAc,GAEpB,EAAE,CAAC;IA0BT,CAAC;IAlCC,mHAAmH;IACnH,IAAW,QAAQ,KAAgB,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IASpD,EAAE,CAAC,KAAa,EAAE,QAAuB;QAC9C,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC;IACxC,CAAC;IAEM,GAAG,CAAC,KAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAEM,MAAM;QACX,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACzB,CAAC;IAEM,OAAO;QACZ,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACxB,CAAC;IAEM,OAAO;QACZ,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAEM,YAAY,CAAC,SAAiB,EAAE,KAAY;QACjD,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC;YACzE,OAAO,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC;CACF","sourcesContent":["/**\n * dd-base-impl.ts 12.1.0\n * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license\n */\n\nexport type EventCallback = (event: Event) => boolean|void;\nexport abstract class DDBaseImplement {\n /** returns the enable state, but you have to call enable()/disable() to change (as other things need to happen) */\n public get disabled(): boolean { return this._disabled; }\n\n /** @internal */\n protected _disabled: boolean; // initial state to differentiate from false\n /** @internal */\n protected _eventRegister: {\n [eventName: string]: EventCallback;\n } = {};\n\n public on(event: string, callback: EventCallback): void {\n this._eventRegister[event] = callback;\n }\n\n public off(event: string): void {\n delete this._eventRegister[event];\n }\n\n public enable(): void {\n this._disabled = false;\n }\n\n public disable(): void {\n this._disabled = true;\n }\n\n public destroy(): void {\n delete this._eventRegister;\n }\n\n public triggerEvent(eventName: string, event: Event): boolean|void {\n if (!this.disabled && this._eventRegister && this._eventRegister[eventName])\n return this._eventRegister[eventName](event);\n }\n}\n\nexport interface HTMLElementExtendOpt<T> {\n el: HTMLElement;\n option: T;\n updateOption(T): DDBaseImplement;\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * dd-draggable.ts 11.5.1
2
+ * dd-draggable.ts 12.1.0
3
3
  * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license
4
4
  */
5
5
  import { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * dd-draggable.ts 11.5.1
2
+ * dd-draggable.ts 12.1.0
3
3
  * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license
4
4
  */
5
5
  import { DDManager } from './dd-manager';
@@ -1 +1 @@
1
- {"version":3,"file":"dd-draggable.js","sourceRoot":"","sources":["../src/dd-draggable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAA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CAA4I;SApBjK,WAAW","sourcesContent":["/**\n * dd-draggable.ts 11.5.1\n * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license\n */\n\nimport { DDManager } from './dd-manager';\nimport { DragTransform, Utils } from './utils';\nimport { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl';\nimport { GridItemHTMLElement, DDUIData, GridStackNode, GridStackPosition, DDDragOpt } from './types';\nimport { DDElementHost } from './dd-element';\nimport { isTouch, touchend, touchmove, touchstart, pointerdown } from './dd-touch';\nimport { GridHTMLElement } from './gridstack';\n\ninterface DragOffset {\n left: number;\n top: number;\n width: number;\n height: number;\n offsetLeft: number;\n offsetTop: number;\n}\n\ninterface GridStackNodeRotate extends GridStackNode {\n _origRotate?: GridStackPosition;\n}\n\ntype DDDragEvent = 'drag' | 'dragstart' | 'dragstop';\n\n// make sure we are not clicking on known object that handles mouseDown\nconst skipMouseDown = 'input,textarea,button,select,option,[contenteditable=\"true\"],.ui-resizable-handle';\n\n// let count = 0; // TEST\n\nexport class DDDraggable extends DDBaseImplement implements HTMLElementExtendOpt<DDDragOpt> {\n public helper: HTMLElement; // used by GridStackDDNative\n\n /** @internal */\n protected mouseDownEvent: MouseEvent;\n /** @internal */\n protected dragOffset: DragOffset;\n /** @internal */\n protected dragElementOriginStyle: Array<string>;\n /** @internal */\n protected dragEls: HTMLElement[];\n /** @internal true while we are dragging an item around */\n protected dragging: boolean;\n /** @internal last drag event */\n protected lastDrag: DragEvent;\n /** @internal */\n protected parentOriginStylePosition: string;\n /** @internal */\n protected helperContainment: HTMLElement;\n /** @internal properties we change during dragging, and restore back */\n protected static originStyleProp = ['width', 'height', 'transform', 'transform-origin', 'transition', 'pointerEvents', 'position', 'left', 'top', 'minWidth', 'willChange'];\n /** @internal pause before we call the actual drag hit collision code */\n protected dragTimeout: number;\n /** @internal */\n protected dragTransform: DragTransform = {\n xScale: 1,\n yScale: 1,\n xOffset: 0,\n yOffset: 0\n };\n\n constructor(public el: GridItemHTMLElement, public option: DDDragOpt = {}) {\n super();\n\n // get the element that is actually supposed to be dragged by\n const handleName = option?.handle?.substring(1);\n const n = el.gridstackNode;\n this.dragEls = !handleName || el.classList.contains(handleName) ? [el] : (n?.subGrid ? [el.querySelector(option.handle) || el] : Array.from(el.querySelectorAll(option.handle)));\n if (this.dragEls.length === 0) {\n this.dragEls = [el];\n }\n // create var event binding so we can easily remove and still look like TS methods (unlike anonymous functions)\n this._mouseDown = this._mouseDown.bind(this);\n this._mouseMove = this._mouseMove.bind(this);\n this._mouseUp = this._mouseUp.bind(this);\n this._keyEvent = this._keyEvent.bind(this);\n this.enable();\n }\n\n public on(event: DDDragEvent, callback: (event: DragEvent) => void): void {\n super.on(event, callback);\n }\n\n public off(event: DDDragEvent): void {\n super.off(event);\n }\n\n public enable(): void {\n if (this.disabled === false) return;\n super.enable();\n this.dragEls.forEach(dragEl => {\n dragEl.addEventListener('mousedown', this._mouseDown);\n if (isTouch) {\n dragEl.addEventListener('touchstart', touchstart);\n dragEl.addEventListener('pointerdown', pointerdown);\n // dragEl.style.touchAction = 'none'; // not needed unlike pointerdown doc comment\n }\n });\n this.el.classList.remove('ui-draggable-disabled');\n }\n\n public disable(forDestroy = false): void {\n if (this.disabled === true) return;\n super.disable();\n this.dragEls.forEach(dragEl => {\n dragEl.removeEventListener('mousedown', this._mouseDown);\n if (isTouch) {\n dragEl.removeEventListener('touchstart', touchstart);\n dragEl.removeEventListener('pointerdown', pointerdown);\n }\n });\n if (!forDestroy) this.el.classList.add('ui-draggable-disabled');\n }\n\n public destroy(): void {\n if (this.dragTimeout) window.clearTimeout(this.dragTimeout);\n delete this.dragTimeout;\n if (this.mouseDownEvent) this._mouseUp(this.mouseDownEvent);\n this.disable(true);\n delete this.el;\n delete this.helper;\n delete this.option;\n super.destroy();\n }\n\n public updateOption(opts: DDDragOpt): DDDraggable {\n Object.keys(opts).forEach(key => this.option[key] = opts[key]);\n return this;\n }\n\n /** @internal call when mouse goes down before a dragstart happens */\n protected _mouseDown(e: MouseEvent): boolean {\n // don't let more than one widget handle mouseStart\n if (DDManager.mouseHandled) return;\n if (e.button !== 0) return true; // only left click\n\n // make sure we are not clicking on known object that handles mouseDown, or ones supplied by the user\n if (!this.dragEls.find(el => el === e.target) && (e.target as HTMLElement).closest(skipMouseDown)) return true;\n if (this.option.cancel) {\n if ((e.target as HTMLElement).closest(this.option.cancel)) return true;\n }\n\n this.mouseDownEvent = e;\n delete this.dragging;\n delete DDManager.dragElement;\n delete DDManager.dropElement;\n // document handler so we can continue receiving moves as the item is 'fixed' position, and capture=true so WE get a first crack\n document.addEventListener('mousemove', this._mouseMove, { capture: true, passive: true }); // true=capture, not bubble\n document.addEventListener('mouseup', this._mouseUp, true);\n if (isTouch) {\n e.currentTarget.addEventListener('touchmove', touchmove);\n e.currentTarget.addEventListener('touchend', touchend);\n }\n\n e.preventDefault();\n // preventDefault() prevents blur event which occurs just after mousedown event.\n // if an editable content has focus, then blur must be call\n if (document.activeElement) (document.activeElement as HTMLElement).blur();\n\n DDManager.mouseHandled = true;\n return true;\n }\n\n /** @internal method to call actual drag event */\n protected _callDrag(e: DragEvent): void {\n if (!this.dragging) return;\n const ev = Utils.initEvent<DragEvent>(e, { target: this.el, type: 'drag' });\n if (this.option.drag) {\n this.option.drag(ev, this.ui());\n }\n this.triggerEvent('drag', ev);\n }\n\n /** @internal called when the main page (after successful mousedown) receives a move event to drag the item around the screen */\n protected _mouseMove(e: DragEvent): boolean {\n // console.log(`${count++} move ${e.x},${e.y}`)\n const s = this.mouseDownEvent;\n this.lastDrag = e;\n\n if (this.dragging) {\n this._dragFollow(e);\n // delay actual grid handling drag until we pause for a while if set\n if (DDManager.pauseDrag) {\n const pause = Number.isInteger(DDManager.pauseDrag) ? DDManager.pauseDrag as number : 100;\n if (this.dragTimeout) window.clearTimeout(this.dragTimeout);\n this.dragTimeout = window.setTimeout(() => this._callDrag(e), pause);\n } else {\n this._callDrag(e);\n }\n } else if (Math.abs(e.x - s.x) + Math.abs(e.y - s.y) > 3) {\n /**\n * don't start unless we've moved at least 3 pixels\n */\n this.dragging = true;\n DDManager.dragElement = this;\n // if we're dragging an actual grid item, set the current drop as the grid (to detect enter/leave)\n const grid = this.el.gridstackNode?.grid;\n if (grid) {\n DDManager.dropElement = (grid.el as DDElementHost).ddElement.ddDroppable;\n } else {\n delete DDManager.dropElement;\n }\n this.helper = this._createHelper();\n this._setupHelperContainmentStyle();\n this.dragTransform = Utils.getValuesFromTransformedElement(this.helperContainment);\n this.dragOffset = this._getDragOffset(e, this.el, this.helperContainment);\n this._setupHelperStyle(e);\n\n const ev = Utils.initEvent<DragEvent>(e, { target: this.el, type: 'dragstart' });\n if (this.option.start) {\n this.option.start(ev, this.ui());\n }\n this.triggerEvent('dragstart', ev);\n // now track keyboard events to cancel or rotate\n document.addEventListener('keydown', this._keyEvent);\n }\n // e.preventDefault(); // passive = true. OLD: was needed otherwise we get text sweep text selection as we drag around\n return true;\n }\n\n /** @internal call when the mouse gets released to drop the item at current location */\n protected _mouseUp(e: MouseEvent): void {\n document.removeEventListener('mousemove', this._mouseMove, true);\n document.removeEventListener('mouseup', this._mouseUp, true);\n if (isTouch && e.currentTarget) { // destroy() during nested grid call us again wit fake _mouseUp\n e.currentTarget.removeEventListener('touchmove', touchmove, true);\n e.currentTarget.removeEventListener('touchend', touchend, true);\n }\n if (this.dragging) {\n delete this.dragging;\n delete (this.el.gridstackNode as GridStackNodeRotate)?._origRotate;\n document.removeEventListener('keydown', this._keyEvent);\n\n // reset the drop target if dragging over ourself (already parented, just moving during stop callback below)\n if (DDManager.dropElement?.el === this.el.parentElement) {\n delete DDManager.dropElement;\n }\n\n this.helperContainment.style.position = this.parentOriginStylePosition || null;\n if (this.helper !== this.el) this.helper.remove(); // hide now\n this._removeHelperStyle();\n\n const ev = Utils.initEvent<DragEvent>(e, { target: this.el, type: 'dragstop' });\n if (this.option.stop) {\n this.option.stop(ev); // NOTE: destroy() will be called when removing item, so expect NULL ptr after!\n }\n this.triggerEvent('dragstop', ev);\n\n // call the droppable method to receive the item\n if (DDManager.dropElement) {\n DDManager.dropElement.drop(e);\n }\n }\n delete this.helper;\n delete this.mouseDownEvent;\n delete DDManager.dragElement;\n delete DDManager.dropElement;\n delete DDManager.mouseHandled;\n e.preventDefault();\n }\n\n /** @internal call when keys are being pressed - use Esc to cancel, R to rotate */\n protected _keyEvent(e: KeyboardEvent): void {\n const n = this.el.gridstackNode as GridStackNodeRotate;\n const grid = n?.grid || (DDManager.dropElement?.el as GridHTMLElement)?.gridstack;\n\n if (e.key === 'Escape') {\n if (n && n._origRotate) {\n n._orig = n._origRotate;\n delete n._origRotate;\n }\n grid?.cancelDrag();\n this._mouseUp(this.mouseDownEvent);\n } else if (n && grid && (e.key === 'r' || e.key === 'R')) {\n if (!Utils.canBeRotated(n)) return;\n n._origRotate = n._origRotate || { ...n._orig }; // store the real orig size in case we Esc after doing rotation\n delete n._moving; // force rotate to happen (move waits for >50% coverage otherwise)\n grid.setAnimation(false) // immediate rotate so _getDragOffset() gets the right dom size below\n .rotate(n.el, { top: -this.dragOffset.offsetTop, left: -this.dragOffset.offsetLeft })\n .setAnimation();\n n._moving = true;\n this.dragOffset = this._getDragOffset(this.lastDrag, n.el, this.helperContainment);\n this.helper.style.width = this.dragOffset.width + 'px';\n this.helper.style.height = this.dragOffset.height + 'px';\n Utils.swap(n._orig, 'w', 'h');\n delete n._rect;\n this._mouseMove(this.lastDrag);\n }\n }\n\n /** @internal create a clone copy (or user defined method) of the original drag item if set */\n protected _createHelper(): HTMLElement {\n let helper = this.el;\n if (typeof this.option.helper === 'function') {\n helper = this.option.helper(this.el);\n } else if (this.option.helper === 'clone') {\n helper = Utils.cloneNode(this.el);\n }\n if (!helper.parentElement) {\n Utils.appendTo(helper, this.option.appendTo === 'parent' ? this.el.parentElement : this.option.appendTo);\n }\n this.dragElementOriginStyle = DDDraggable.originStyleProp.map(prop => this.el.style[prop]);\n return helper;\n }\n\n /** @internal set the fix position of the dragged item */\n protected _setupHelperStyle(e: DragEvent): DDDraggable {\n this.helper.classList.add('ui-draggable-dragging');\n // TODO: set all at once with style.cssText += ... ? https://stackoverflow.com/questions/3968593\n const style = this.helper.style;\n style.pointerEvents = 'none'; // needed for over items to get enter/leave\n // style.cursor = 'move'; // TODO: can't set with pointerEvents=none ! (done in CSS as well)\n style.width = this.dragOffset.width + 'px';\n style.height = this.dragOffset.height + 'px';\n style.willChange = 'left, top';\n style.position = 'fixed'; // let us drag between grids by not clipping as parent .grid-stack is position: 'relative'\n this._dragFollow(e); // now position it\n style.transition = 'none'; // show up instantly\n setTimeout(() => {\n if (this.helper) {\n style.transition = null; // recover animation\n }\n }, 0);\n return this;\n }\n\n /** @internal restore back the original style before dragging */\n protected _removeHelperStyle(): DDDraggable {\n this.helper.classList.remove('ui-draggable-dragging');\n const node = (this.helper as GridItemHTMLElement)?.gridstackNode;\n // don't bother restoring styles if we're gonna remove anyway...\n if (!node?._isAboutToRemove && this.dragElementOriginStyle) {\n const helper = this.helper;\n // don't animate, otherwise we animate offseted when switching back to 'absolute' from 'fixed'.\n // TODO: this also removes resizing animation which doesn't have this issue, but others.\n // Ideally both would animate ('move' would immediately restore 'absolute' and adjust coordinate to match,\n // then trigger a delay (repaint) to restore to final dest with animate) but then we need to make sure 'resizestop'\n // is called AFTER 'transitionend' event is received (see https://github.com/gridstack/gridstack.js/issues/2033)\n const transition = this.dragElementOriginStyle['transition'] || null;\n helper.style.transition = this.dragElementOriginStyle['transition'] = 'none'; // can't be NULL #1973\n DDDraggable.originStyleProp.forEach(prop => helper.style[prop] = this.dragElementOriginStyle[prop] || null);\n setTimeout(() => helper.style.transition = transition, 50); // recover animation from saved vars after a pause (0 isn't enough #1973)\n }\n delete this.dragElementOriginStyle;\n return this;\n }\n\n /** @internal updates the top/left position to follow the mouse */\n protected _dragFollow(e: DragEvent): void {\n const containmentRect = { left: 0, top: 0 };\n // if (this.helper.style.position === 'absolute') { // we use 'fixed'\n // const { left, top } = this.helperContainment.getBoundingClientRect();\n // containmentRect = { left, top };\n // }\n const style = this.helper.style;\n const offset = this.dragOffset;\n style.left = (e.clientX + offset.offsetLeft - containmentRect.left) * this.dragTransform.xScale + 'px';\n style.top = (e.clientY + offset.offsetTop - containmentRect.top) * this.dragTransform.yScale + 'px';\n }\n\n /** @internal */\n protected _setupHelperContainmentStyle(): DDDraggable {\n this.helperContainment = this.helper.parentElement;\n if (this.helper.style.position !== 'fixed') {\n this.parentOriginStylePosition = this.helperContainment.style.position;\n if (getComputedStyle(this.helperContainment).position.match(/static/)) {\n this.helperContainment.style.position = 'relative';\n }\n }\n return this;\n }\n\n /** @internal */\n protected _getDragOffset(event: DragEvent, el: HTMLElement, parent: HTMLElement): DragOffset {\n\n // in case ancestor has transform/perspective css properties that change the viewpoint\n let xformOffsetX = 0;\n let xformOffsetY = 0;\n if (parent) {\n xformOffsetX = this.dragTransform.xOffset;\n xformOffsetY = this.dragTransform.yOffset;\n }\n\n const targetOffset = el.getBoundingClientRect();\n return {\n left: targetOffset.left,\n top: targetOffset.top,\n offsetLeft: - event.clientX + targetOffset.left - xformOffsetX,\n offsetTop: - event.clientY + targetOffset.top - xformOffsetY,\n width: targetOffset.width * this.dragTransform.xScale,\n height: targetOffset.height * this.dragTransform.yScale\n };\n }\n\n /** @internal TODO: set to public as called by DDDroppable! */\n public ui(): DDUIData {\n const containmentEl = this.el.parentElement;\n const containmentRect = containmentEl.getBoundingClientRect();\n const offset = this.helper.getBoundingClientRect();\n return {\n position: { //Current CSS position of the helper as { top, left } object\n top: (offset.top - containmentRect.top) * this.dragTransform.yScale,\n left: (offset.left - containmentRect.left) * this.dragTransform.xScale\n }\n /* not used by GridStack for now...\n helper: [this.helper], //The object arr representing the helper that's being dragged.\n offset: { top: offset.top, left: offset.left } // Current offset position of the helper as { top, left } object.\n */\n };\n }\n}\n"]}
1
+ {"version":3,"file":"dd-draggable.js","sourceRoot":"","sources":["../src/dd-draggable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE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A3I,CAA4I;SApBjK,WAAW","sourcesContent":["/**\n * dd-draggable.ts 12.1.0\n * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license\n */\n\nimport { DDManager } from './dd-manager';\nimport { DragTransform, Utils } from './utils';\nimport { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl';\nimport { GridItemHTMLElement, DDUIData, GridStackNode, GridStackPosition, DDDragOpt } from './types';\nimport { DDElementHost } from './dd-element';\nimport { isTouch, touchend, touchmove, touchstart, pointerdown } from './dd-touch';\nimport { GridHTMLElement } from './gridstack';\n\ninterface DragOffset {\n left: number;\n top: number;\n width: number;\n height: number;\n offsetLeft: number;\n offsetTop: number;\n}\n\ninterface GridStackNodeRotate extends GridStackNode {\n _origRotate?: GridStackPosition;\n}\n\ntype DDDragEvent = 'drag' | 'dragstart' | 'dragstop';\n\n// make sure we are not clicking on known object that handles mouseDown\nconst skipMouseDown = 'input,textarea,button,select,option,[contenteditable=\"true\"],.ui-resizable-handle';\n\n// let count = 0; // TEST\n\nexport class DDDraggable extends DDBaseImplement implements HTMLElementExtendOpt<DDDragOpt> {\n public helper: HTMLElement; // used by GridStackDDNative\n\n /** @internal */\n protected mouseDownEvent: MouseEvent;\n /** @internal */\n protected dragOffset: DragOffset;\n /** @internal */\n protected dragElementOriginStyle: Array<string>;\n /** @internal */\n protected dragEls: HTMLElement[];\n /** @internal true while we are dragging an item around */\n protected dragging: boolean;\n /** @internal last drag event */\n protected lastDrag: DragEvent;\n /** @internal */\n protected parentOriginStylePosition: string;\n /** @internal */\n protected helperContainment: HTMLElement;\n /** @internal properties we change during dragging, and restore back */\n protected static originStyleProp = ['width', 'height', 'transform', 'transform-origin', 'transition', 'pointerEvents', 'position', 'left', 'top', 'minWidth', 'willChange'];\n /** @internal pause before we call the actual drag hit collision code */\n protected dragTimeout: number;\n /** @internal */\n protected dragTransform: DragTransform = {\n xScale: 1,\n yScale: 1,\n xOffset: 0,\n yOffset: 0\n };\n\n constructor(public el: GridItemHTMLElement, public option: DDDragOpt = {}) {\n super();\n\n // get the element that is actually supposed to be dragged by\n const handleName = option?.handle?.substring(1);\n const n = el.gridstackNode;\n this.dragEls = !handleName || el.classList.contains(handleName) ? [el] : (n?.subGrid ? [el.querySelector(option.handle) || el] : Array.from(el.querySelectorAll(option.handle)));\n if (this.dragEls.length === 0) {\n this.dragEls = [el];\n }\n // create var event binding so we can easily remove and still look like TS methods (unlike anonymous functions)\n this._mouseDown = this._mouseDown.bind(this);\n this._mouseMove = this._mouseMove.bind(this);\n this._mouseUp = this._mouseUp.bind(this);\n this._keyEvent = this._keyEvent.bind(this);\n this.enable();\n }\n\n public on(event: DDDragEvent, callback: (event: DragEvent) => void): void {\n super.on(event, callback);\n }\n\n public off(event: DDDragEvent): void {\n super.off(event);\n }\n\n public enable(): void {\n if (this.disabled === false) return;\n super.enable();\n this.dragEls.forEach(dragEl => {\n dragEl.addEventListener('mousedown', this._mouseDown);\n if (isTouch) {\n dragEl.addEventListener('touchstart', touchstart);\n dragEl.addEventListener('pointerdown', pointerdown);\n // dragEl.style.touchAction = 'none'; // not needed unlike pointerdown doc comment\n }\n });\n this.el.classList.remove('ui-draggable-disabled');\n }\n\n public disable(forDestroy = false): void {\n if (this.disabled === true) return;\n super.disable();\n this.dragEls.forEach(dragEl => {\n dragEl.removeEventListener('mousedown', this._mouseDown);\n if (isTouch) {\n dragEl.removeEventListener('touchstart', touchstart);\n dragEl.removeEventListener('pointerdown', pointerdown);\n }\n });\n if (!forDestroy) this.el.classList.add('ui-draggable-disabled');\n }\n\n public destroy(): void {\n if (this.dragTimeout) window.clearTimeout(this.dragTimeout);\n delete this.dragTimeout;\n if (this.mouseDownEvent) this._mouseUp(this.mouseDownEvent);\n this.disable(true);\n delete this.el;\n delete this.helper;\n delete this.option;\n super.destroy();\n }\n\n public updateOption(opts: DDDragOpt): DDDraggable {\n Object.keys(opts).forEach(key => this.option[key] = opts[key]);\n return this;\n }\n\n /** @internal call when mouse goes down before a dragstart happens */\n protected _mouseDown(e: MouseEvent): boolean {\n // don't let more than one widget handle mouseStart\n if (DDManager.mouseHandled) return;\n if (e.button !== 0) return true; // only left click\n\n // make sure we are not clicking on known object that handles mouseDown, or ones supplied by the user\n if (!this.dragEls.find(el => el === e.target) && (e.target as HTMLElement).closest(skipMouseDown)) return true;\n if (this.option.cancel) {\n if ((e.target as HTMLElement).closest(this.option.cancel)) return true;\n }\n\n this.mouseDownEvent = e;\n delete this.dragging;\n delete DDManager.dragElement;\n delete DDManager.dropElement;\n // document handler so we can continue receiving moves as the item is 'fixed' position, and capture=true so WE get a first crack\n document.addEventListener('mousemove', this._mouseMove, { capture: true, passive: true }); // true=capture, not bubble\n document.addEventListener('mouseup', this._mouseUp, true);\n if (isTouch) {\n e.currentTarget.addEventListener('touchmove', touchmove);\n e.currentTarget.addEventListener('touchend', touchend);\n }\n\n e.preventDefault();\n // preventDefault() prevents blur event which occurs just after mousedown event.\n // if an editable content has focus, then blur must be call\n if (document.activeElement) (document.activeElement as HTMLElement).blur();\n\n DDManager.mouseHandled = true;\n return true;\n }\n\n /** @internal method to call actual drag event */\n protected _callDrag(e: DragEvent): void {\n if (!this.dragging) return;\n const ev = Utils.initEvent<DragEvent>(e, { target: this.el, type: 'drag' });\n if (this.option.drag) {\n this.option.drag(ev, this.ui());\n }\n this.triggerEvent('drag', ev);\n }\n\n /** @internal called when the main page (after successful mousedown) receives a move event to drag the item around the screen */\n protected _mouseMove(e: DragEvent): boolean {\n // console.log(`${count++} move ${e.x},${e.y}`)\n const s = this.mouseDownEvent;\n this.lastDrag = e;\n\n if (this.dragging) {\n this._dragFollow(e);\n // delay actual grid handling drag until we pause for a while if set\n if (DDManager.pauseDrag) {\n const pause = Number.isInteger(DDManager.pauseDrag) ? DDManager.pauseDrag as number : 100;\n if (this.dragTimeout) window.clearTimeout(this.dragTimeout);\n this.dragTimeout = window.setTimeout(() => this._callDrag(e), pause);\n } else {\n this._callDrag(e);\n }\n } else if (Math.abs(e.x - s.x) + Math.abs(e.y - s.y) > 3) {\n /**\n * don't start unless we've moved at least 3 pixels\n */\n this.dragging = true;\n DDManager.dragElement = this;\n // if we're dragging an actual grid item, set the current drop as the grid (to detect enter/leave)\n const grid = this.el.gridstackNode?.grid;\n if (grid) {\n DDManager.dropElement = (grid.el as DDElementHost).ddElement.ddDroppable;\n } else {\n delete DDManager.dropElement;\n }\n this.helper = this._createHelper();\n this._setupHelperContainmentStyle();\n this.dragTransform = Utils.getValuesFromTransformedElement(this.helperContainment);\n this.dragOffset = this._getDragOffset(e, this.el, this.helperContainment);\n this._setupHelperStyle(e);\n\n const ev = Utils.initEvent<DragEvent>(e, { target: this.el, type: 'dragstart' });\n if (this.option.start) {\n this.option.start(ev, this.ui());\n }\n this.triggerEvent('dragstart', ev);\n // now track keyboard events to cancel or rotate\n document.addEventListener('keydown', this._keyEvent);\n }\n // e.preventDefault(); // passive = true. OLD: was needed otherwise we get text sweep text selection as we drag around\n return true;\n }\n\n /** @internal call when the mouse gets released to drop the item at current location */\n protected _mouseUp(e: MouseEvent): void {\n document.removeEventListener('mousemove', this._mouseMove, true);\n document.removeEventListener('mouseup', this._mouseUp, true);\n if (isTouch && e.currentTarget) { // destroy() during nested grid call us again wit fake _mouseUp\n e.currentTarget.removeEventListener('touchmove', touchmove, true);\n e.currentTarget.removeEventListener('touchend', touchend, true);\n }\n if (this.dragging) {\n delete this.dragging;\n delete (this.el.gridstackNode as GridStackNodeRotate)?._origRotate;\n document.removeEventListener('keydown', this._keyEvent);\n\n // reset the drop target if dragging over ourself (already parented, just moving during stop callback below)\n if (DDManager.dropElement?.el === this.el.parentElement) {\n delete DDManager.dropElement;\n }\n\n this.helperContainment.style.position = this.parentOriginStylePosition || null;\n if (this.helper !== this.el) this.helper.remove(); // hide now\n this._removeHelperStyle();\n\n const ev = Utils.initEvent<DragEvent>(e, { target: this.el, type: 'dragstop' });\n if (this.option.stop) {\n this.option.stop(ev); // NOTE: destroy() will be called when removing item, so expect NULL ptr after!\n }\n this.triggerEvent('dragstop', ev);\n\n // call the droppable method to receive the item\n if (DDManager.dropElement) {\n DDManager.dropElement.drop(e);\n }\n }\n delete this.helper;\n delete this.mouseDownEvent;\n delete DDManager.dragElement;\n delete DDManager.dropElement;\n delete DDManager.mouseHandled;\n e.preventDefault();\n }\n\n /** @internal call when keys are being pressed - use Esc to cancel, R to rotate */\n protected _keyEvent(e: KeyboardEvent): void {\n const n = this.el.gridstackNode as GridStackNodeRotate;\n const grid = n?.grid || (DDManager.dropElement?.el as GridHTMLElement)?.gridstack;\n\n if (e.key === 'Escape') {\n if (n && n._origRotate) {\n n._orig = n._origRotate;\n delete n._origRotate;\n }\n grid?.cancelDrag();\n this._mouseUp(this.mouseDownEvent);\n } else if (n && grid && (e.key === 'r' || e.key === 'R')) {\n if (!Utils.canBeRotated(n)) return;\n n._origRotate = n._origRotate || { ...n._orig }; // store the real orig size in case we Esc after doing rotation\n delete n._moving; // force rotate to happen (move waits for >50% coverage otherwise)\n grid.setAnimation(false) // immediate rotate so _getDragOffset() gets the right dom size below\n .rotate(n.el, { top: -this.dragOffset.offsetTop, left: -this.dragOffset.offsetLeft })\n .setAnimation();\n n._moving = true;\n this.dragOffset = this._getDragOffset(this.lastDrag, n.el, this.helperContainment);\n this.helper.style.width = this.dragOffset.width + 'px';\n this.helper.style.height = this.dragOffset.height + 'px';\n Utils.swap(n._orig, 'w', 'h');\n delete n._rect;\n this._mouseMove(this.lastDrag);\n }\n }\n\n /** @internal create a clone copy (or user defined method) of the original drag item if set */\n protected _createHelper(): HTMLElement {\n let helper = this.el;\n if (typeof this.option.helper === 'function') {\n helper = this.option.helper(this.el);\n } else if (this.option.helper === 'clone') {\n helper = Utils.cloneNode(this.el);\n }\n if (!helper.parentElement) {\n Utils.appendTo(helper, this.option.appendTo === 'parent' ? this.el.parentElement : this.option.appendTo);\n }\n this.dragElementOriginStyle = DDDraggable.originStyleProp.map(prop => this.el.style[prop]);\n return helper;\n }\n\n /** @internal set the fix position of the dragged item */\n protected _setupHelperStyle(e: DragEvent): DDDraggable {\n this.helper.classList.add('ui-draggable-dragging');\n // TODO: set all at once with style.cssText += ... ? https://stackoverflow.com/questions/3968593\n const style = this.helper.style;\n style.pointerEvents = 'none'; // needed for over items to get enter/leave\n // style.cursor = 'move'; // TODO: can't set with pointerEvents=none ! (done in CSS as well)\n style.width = this.dragOffset.width + 'px';\n style.height = this.dragOffset.height + 'px';\n style.willChange = 'left, top';\n style.position = 'fixed'; // let us drag between grids by not clipping as parent .grid-stack is position: 'relative'\n this._dragFollow(e); // now position it\n style.transition = 'none'; // show up instantly\n setTimeout(() => {\n if (this.helper) {\n style.transition = null; // recover animation\n }\n }, 0);\n return this;\n }\n\n /** @internal restore back the original style before dragging */\n protected _removeHelperStyle(): DDDraggable {\n this.helper.classList.remove('ui-draggable-dragging');\n const node = (this.helper as GridItemHTMLElement)?.gridstackNode;\n // don't bother restoring styles if we're gonna remove anyway...\n if (!node?._isAboutToRemove && this.dragElementOriginStyle) {\n const helper = this.helper;\n // don't animate, otherwise we animate offseted when switching back to 'absolute' from 'fixed'.\n // TODO: this also removes resizing animation which doesn't have this issue, but others.\n // Ideally both would animate ('move' would immediately restore 'absolute' and adjust coordinate to match,\n // then trigger a delay (repaint) to restore to final dest with animate) but then we need to make sure 'resizestop'\n // is called AFTER 'transitionend' event is received (see https://github.com/gridstack/gridstack.js/issues/2033)\n const transition = this.dragElementOriginStyle['transition'] || null;\n helper.style.transition = this.dragElementOriginStyle['transition'] = 'none'; // can't be NULL #1973\n DDDraggable.originStyleProp.forEach(prop => helper.style[prop] = this.dragElementOriginStyle[prop] || null);\n setTimeout(() => helper.style.transition = transition, 50); // recover animation from saved vars after a pause (0 isn't enough #1973)\n }\n delete this.dragElementOriginStyle;\n return this;\n }\n\n /** @internal updates the top/left position to follow the mouse */\n protected _dragFollow(e: DragEvent): void {\n const containmentRect = { left: 0, top: 0 };\n // if (this.helper.style.position === 'absolute') { // we use 'fixed'\n // const { left, top } = this.helperContainment.getBoundingClientRect();\n // containmentRect = { left, top };\n // }\n const style = this.helper.style;\n const offset = this.dragOffset;\n style.left = (e.clientX + offset.offsetLeft - containmentRect.left) * this.dragTransform.xScale + 'px';\n style.top = (e.clientY + offset.offsetTop - containmentRect.top) * this.dragTransform.yScale + 'px';\n }\n\n /** @internal */\n protected _setupHelperContainmentStyle(): DDDraggable {\n this.helperContainment = this.helper.parentElement;\n if (this.helper.style.position !== 'fixed') {\n this.parentOriginStylePosition = this.helperContainment.style.position;\n if (getComputedStyle(this.helperContainment).position.match(/static/)) {\n this.helperContainment.style.position = 'relative';\n }\n }\n return this;\n }\n\n /** @internal */\n protected _getDragOffset(event: DragEvent, el: HTMLElement, parent: HTMLElement): DragOffset {\n\n // in case ancestor has transform/perspective css properties that change the viewpoint\n let xformOffsetX = 0;\n let xformOffsetY = 0;\n if (parent) {\n xformOffsetX = this.dragTransform.xOffset;\n xformOffsetY = this.dragTransform.yOffset;\n }\n\n const targetOffset = el.getBoundingClientRect();\n return {\n left: targetOffset.left,\n top: targetOffset.top,\n offsetLeft: - event.clientX + targetOffset.left - xformOffsetX,\n offsetTop: - event.clientY + targetOffset.top - xformOffsetY,\n width: targetOffset.width * this.dragTransform.xScale,\n height: targetOffset.height * this.dragTransform.yScale\n };\n }\n\n /** @internal TODO: set to public as called by DDDroppable! */\n public ui(): DDUIData {\n const containmentEl = this.el.parentElement;\n const containmentRect = containmentEl.getBoundingClientRect();\n const offset = this.helper.getBoundingClientRect();\n return {\n position: { //Current CSS position of the helper as { top, left } object\n top: (offset.top - containmentRect.top) * this.dragTransform.yScale,\n left: (offset.left - containmentRect.left) * this.dragTransform.xScale\n }\n /* not used by GridStack for now...\n helper: [this.helper], //The object arr representing the helper that's being dragged.\n offset: { top: offset.top, left: offset.left } // Current offset position of the helper as { top, left } object.\n */\n };\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * dd-droppable.ts 11.5.1
2
+ * dd-droppable.ts 12.1.0
3
3
  * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license
4
4
  */
5
5
  import { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * dd-droppable.ts 11.5.1
2
+ * dd-droppable.ts 12.1.0
3
3
  * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license
4
4
  */
5
5
  import { DDManager } from './dd-manager';
@@ -1 +1 @@
1
- {"version":3,"file":"dd-droppable.js","sourceRoot":"","sources":["../src/dd-droppable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAwB,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAUjE,yBAAyB;AAEzB,MAAM,OAAO,WAAY,SAAQ,eAAe;IAI9C,YAAmB,EAAe,EAAS,SAAyB,EAAE;QACpE,KAAK,EAAE,CAAC;QADS,OAAE,GAAF,EAAE,CAAa;QAAS,WAAM,GAAN,MAAM,CAAqB;QAEpE,+GAA+G;QAC/G,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAEM,EAAE,CAAC,KAAsC,EAAE,QAAoC;QACpF,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC5B,CAAC;IAEM,GAAG,CAAC,KAAsC;QAC/C,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAEM,MAAM;QACX,IAAI,IAAI,CAAC,QA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AG,CAAC,IAAiB;QAC7B,OAAO;YACL,SAAS,EAAE,IAAI,CAAC,EAAE;YAClB,GAAG,IAAI,CAAC,EAAE,EAAE;SACb,CAAC;IACJ,CAAC;CACF","sourcesContent":["/**\n * dd-droppable.ts 11.5.1\n * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license\n */\n\nimport { DDDraggable } from './dd-draggable';\nimport { DDManager } from './dd-manager';\nimport { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl';\nimport { Utils } from './utils';\nimport { DDElementHost } from './dd-element';\nimport { isTouch, pointerenter, pointerleave } from './dd-touch';\nimport { DDUIData } from './types';\n\nexport interface DDDroppableOpt {\n accept?: string | ((el: HTMLElement) => boolean);\n drop?: (event: DragEvent, ui: DDUIData) => void;\n over?: (event: DragEvent, ui: DDUIData) => void;\n out?: (event: DragEvent, ui: DDUIData) => void;\n}\n\n// let count = 0; // TEST\n\nexport class DDDroppable extends DDBaseImplement implements HTMLElementExtendOpt<DDDroppableOpt> {\n\n public accept: (el: HTMLElement) => boolean;\n\n constructor(public el: HTMLElement, public option: DDDroppableOpt = {}) {\n super();\n // create var event binding so we can easily remove and still look like TS methods (unlike anonymous functions)\n this._mouseEnter = this._mouseEnter.bind(this);\n this._mouseLeave = this._mouseLeave.bind(this);\n this.enable();\n this._setupAccept();\n }\n\n public on(event: 'drop' | 'dropover' | 'dropout', callback: (event: DragEvent) => void): void {\n super.on(event, callback);\n }\n\n public off(event: 'drop' | 'dropover' | 'dropout'): void {\n super.off(event);\n }\n\n public enable(): void {\n if (this.disabled === false) return;\n super.enable();\n this.el.classList.add('ui-droppable');\n this.el.classList.remove('ui-droppable-disabled');\n this.el.addEventListener('mouseenter', this._mouseEnter);\n this.el.addEventListener('mouseleave', this._mouseLeave);\n if (isTouch) {\n this.el.addEventListener('pointerenter', pointerenter);\n this.el.addEventListener('pointerleave', pointerleave);\n }\n }\n\n public disable(forDestroy = false): void {\n if (this.disabled === true) return;\n super.disable();\n this.el.classList.remove('ui-droppable');\n if (!forDestroy) this.el.classList.add('ui-droppable-disabled');\n this.el.removeEventListener('mouseenter', this._mouseEnter);\n this.el.removeEventListener('mouseleave', this._mouseLeave);\n if (isTouch) {\n this.el.removeEventListener('pointerenter', pointerenter);\n this.el.removeEventListener('pointerleave', pointerleave);\n }\n }\n\n public destroy(): void {\n this.disable(true);\n this.el.classList.remove('ui-droppable');\n this.el.classList.remove('ui-droppable-disabled');\n super.destroy();\n }\n\n public updateOption(opts: DDDroppableOpt): DDDroppable {\n Object.keys(opts).forEach(key => this.option[key] = opts[key]);\n this._setupAccept();\n return this;\n }\n\n /** @internal called when the cursor enters our area - prepare for a possible drop and track leaving */\n protected _mouseEnter(e: MouseEvent): void {\n // console.log(`${count++} Enter ${this.el.id || (this.el as GridHTMLElement).gridstack.opts.id}`); // TEST\n if (!DDManager.dragElement) return;\n if (!this._canDrop(DDManager.dragElement.el)) return;\n e.preventDefault();\n e.stopPropagation();\n\n // make sure when we enter this, that the last one gets a leave FIRST to correctly cleanup as we don't always do\n if (DDManager.dropElement && DDManager.dropElement !== this) {\n DDManager.dropElement._mouseLeave(e as DragEvent, true); // calledByEnter = true\n }\n DDManager.dropElement = this;\n\n const ev = Utils.initEvent<DragEvent>(e, { target: this.el, type: 'dropover' });\n if (this.option.over) {\n this.option.over(ev, this._ui(DDManager.dragElement))\n }\n this.triggerEvent('dropover', ev);\n this.el.classList.add('ui-droppable-over');\n // console.log('tracking'); // TEST\n }\n\n /** @internal called when the item is leaving our area, stop tracking if we had moving item */\n protected _mouseLeave(e: MouseEvent, calledByEnter = false): void {\n // console.log(`${count++} Leave ${this.el.id || (this.el as GridHTMLElement).gridstack.opts.id}`); // TEST\n if (!DDManager.dragElement || DDManager.dropElement !== this) return;\n e.preventDefault();\n e.stopPropagation();\n\n const ev = Utils.initEvent<DragEvent>(e, { target: this.el, type: 'dropout' });\n if (this.option.out) {\n this.option.out(ev, this._ui(DDManager.dragElement))\n }\n this.triggerEvent('dropout', ev);\n\n if (DDManager.dropElement === this) {\n delete DDManager.dropElement;\n // console.log('not tracking'); // TEST\n\n // if we're still over a parent droppable, send it an enter as we don't get one from leaving nested children\n if (!calledByEnter) {\n let parentDrop: DDDroppable;\n let parent: DDElementHost = this.el.parentElement;\n while (!parentDrop && parent) {\n parentDrop = parent.ddElement?.ddDroppable;\n parent = parent.parentElement;\n }\n if (parentDrop) {\n parentDrop._mouseEnter(e);\n }\n }\n }\n }\n\n /** item is being dropped on us - called by the drag mouseup handler - this calls the client drop event */\n public drop(e: MouseEvent): void {\n e.preventDefault();\n const ev = Utils.initEvent<DragEvent>(e, { target: this.el, type: 'drop' });\n if (this.option.drop) {\n this.option.drop(ev, this._ui(DDManager.dragElement))\n }\n this.triggerEvent('drop', ev);\n }\n\n /** @internal true if element matches the string/method accept option */\n protected _canDrop(el: HTMLElement): boolean {\n return el && (!this.accept || this.accept(el));\n }\n\n /** @internal */\n protected _setupAccept(): DDDroppable {\n if (!this.option.accept) return this;\n if (typeof this.option.accept === 'string') {\n this.accept = (el: HTMLElement) => el.classList.contains(this.option.accept as string) || el.matches(this.option.accept as string);\n } else {\n this.accept = this.option.accept;\n }\n return this;\n }\n\n /** @internal */\n protected _ui(drag: DDDraggable): DDUIData {\n return {\n draggable: drag.el,\n ...drag.ui()\n };\n }\n}\n\n"]}
1
+ {"version":3,"file":"dd-droppable.js","sourceRoot":"","sources":["../src/dd-droppable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAwB,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAUjE,yBAAyB;AAEzB,MAAM,OAAO,WAAY,SAAQ,eAAe;IAI9C,YAAmB,EAAe,EAAS,SAAyB,EAAE;QACpE,KAAK,EAA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IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;IACjD,CAAC;IAED,gBAAgB;IACN,YAAY;QACpB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QACrC,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,QAAQ,EAAE;YAC1C,IAAI,CAAC,MAAM,GAAG,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAgB,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,MAAgB,CAAC,CAAC;SACpI;aAAM;YACL,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;SAClC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,gBAAgB;IACN,GAAG,CAAC,IAAiB;QAC7B,OAAO;YACL,SAAS,EAAE,IAAI,CAAC,EAAE;YAClB,GAAG,IAAI,CAAC,EAAE,EAAE;SACb,CAAC;IACJ,CAAC;CACF","sourcesContent":["/**\n * dd-droppable.ts 12.1.0\n * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license\n */\n\nimport { DDDraggable } from './dd-draggable';\nimport { DDManager } from './dd-manager';\nimport { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl';\nimport { Utils } from './utils';\nimport { DDElementHost } from './dd-element';\nimport { isTouch, pointerenter, pointerleave } from './dd-touch';\nimport { DDUIData } from './types';\n\nexport interface DDDroppableOpt {\n accept?: string | ((el: HTMLElement) => boolean);\n drop?: (event: DragEvent, ui: DDUIData) => void;\n over?: (event: DragEvent, ui: DDUIData) => void;\n out?: (event: DragEvent, ui: DDUIData) => void;\n}\n\n// let count = 0; // TEST\n\nexport class DDDroppable extends DDBaseImplement implements HTMLElementExtendOpt<DDDroppableOpt> {\n\n public accept: (el: HTMLElement) => boolean;\n\n constructor(public el: HTMLElement, public option: DDDroppableOpt = {}) {\n super();\n // create var event binding so we can easily remove and still look like TS methods (unlike anonymous functions)\n this._mouseEnter = this._mouseEnter.bind(this);\n this._mouseLeave = this._mouseLeave.bind(this);\n this.enable();\n this._setupAccept();\n }\n\n public on(event: 'drop' | 'dropover' | 'dropout', callback: (event: DragEvent) => void): void {\n super.on(event, callback);\n }\n\n public off(event: 'drop' | 'dropover' | 'dropout'): void {\n super.off(event);\n }\n\n public enable(): void {\n if (this.disabled === false) return;\n super.enable();\n this.el.classList.add('ui-droppable');\n this.el.classList.remove('ui-droppable-disabled');\n this.el.addEventListener('mouseenter', this._mouseEnter);\n this.el.addEventListener('mouseleave', this._mouseLeave);\n if (isTouch) {\n this.el.addEventListener('pointerenter', pointerenter);\n this.el.addEventListener('pointerleave', pointerleave);\n }\n }\n\n public disable(forDestroy = false): void {\n if (this.disabled === true) return;\n super.disable();\n this.el.classList.remove('ui-droppable');\n if (!forDestroy) this.el.classList.add('ui-droppable-disabled');\n this.el.removeEventListener('mouseenter', this._mouseEnter);\n this.el.removeEventListener('mouseleave', this._mouseLeave);\n if (isTouch) {\n this.el.removeEventListener('pointerenter', pointerenter);\n this.el.removeEventListener('pointerleave', pointerleave);\n }\n }\n\n public destroy(): void {\n this.disable(true);\n this.el.classList.remove('ui-droppable');\n this.el.classList.remove('ui-droppable-disabled');\n super.destroy();\n }\n\n public updateOption(opts: DDDroppableOpt): DDDroppable {\n Object.keys(opts).forEach(key => this.option[key] = opts[key]);\n this._setupAccept();\n return this;\n }\n\n /** @internal called when the cursor enters our area - prepare for a possible drop and track leaving */\n protected _mouseEnter(e: MouseEvent): void {\n // console.log(`${count++} Enter ${this.el.id || (this.el as GridHTMLElement).gridstack.opts.id}`); // TEST\n if (!DDManager.dragElement) return;\n if (!this._canDrop(DDManager.dragElement.el)) return;\n e.preventDefault();\n e.stopPropagation();\n\n // make sure when we enter this, that the last one gets a leave FIRST to correctly cleanup as we don't always do\n if (DDManager.dropElement && DDManager.dropElement !== this) {\n DDManager.dropElement._mouseLeave(e as DragEvent, true); // calledByEnter = true\n }\n DDManager.dropElement = this;\n\n const ev = Utils.initEvent<DragEvent>(e, { target: this.el, type: 'dropover' });\n if (this.option.over) {\n this.option.over(ev, this._ui(DDManager.dragElement))\n }\n this.triggerEvent('dropover', ev);\n this.el.classList.add('ui-droppable-over');\n // console.log('tracking'); // TEST\n }\n\n /** @internal called when the item is leaving our area, stop tracking if we had moving item */\n protected _mouseLeave(e: MouseEvent, calledByEnter = false): void {\n // console.log(`${count++} Leave ${this.el.id || (this.el as GridHTMLElement).gridstack.opts.id}`); // TEST\n if (!DDManager.dragElement || DDManager.dropElement !== this) return;\n e.preventDefault();\n e.stopPropagation();\n\n const ev = Utils.initEvent<DragEvent>(e, { target: this.el, type: 'dropout' });\n if (this.option.out) {\n this.option.out(ev, this._ui(DDManager.dragElement))\n }\n this.triggerEvent('dropout', ev);\n\n if (DDManager.dropElement === this) {\n delete DDManager.dropElement;\n // console.log('not tracking'); // TEST\n\n // if we're still over a parent droppable, send it an enter as we don't get one from leaving nested children\n if (!calledByEnter) {\n let parentDrop: DDDroppable;\n let parent: DDElementHost = this.el.parentElement;\n while (!parentDrop && parent) {\n parentDrop = parent.ddElement?.ddDroppable;\n parent = parent.parentElement;\n }\n if (parentDrop) {\n parentDrop._mouseEnter(e);\n }\n }\n }\n }\n\n /** item is being dropped on us - called by the drag mouseup handler - this calls the client drop event */\n public drop(e: MouseEvent): void {\n e.preventDefault();\n const ev = Utils.initEvent<DragEvent>(e, { target: this.el, type: 'drop' });\n if (this.option.drop) {\n this.option.drop(ev, this._ui(DDManager.dragElement))\n }\n this.triggerEvent('drop', ev);\n }\n\n /** @internal true if element matches the string/method accept option */\n protected _canDrop(el: HTMLElement): boolean {\n return el && (!this.accept || this.accept(el));\n }\n\n /** @internal */\n protected _setupAccept(): DDDroppable {\n if (!this.option.accept) return this;\n if (typeof this.option.accept === 'string') {\n this.accept = (el: HTMLElement) => el.classList.contains(this.option.accept as string) || el.matches(this.option.accept as string);\n } else {\n this.accept = this.option.accept;\n }\n return this;\n }\n\n /** @internal */\n protected _ui(drag: DDDraggable): DDUIData {\n return {\n draggable: drag.el,\n ...drag.ui()\n };\n }\n}\n\n"]}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * dd-elements.ts 11.5.1
2
+ * dd-elements.ts 12.1.0
3
3
  * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license
4
4
  */
5
5
  import { DDResizable, DDResizableOpt } from './dd-resizable';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * dd-elements.ts 11.5.1
2
+ * dd-elements.ts 12.1.0
3
3
  * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license
4
4
  */
5
5
  import { DDResizable } from './dd-resizable';
@@ -1 +1 @@
1
- {"version":3,"file":"dd-element.js","sourceRoot":"","sources":["../src/dd-element.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAkB,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAkB,MAAM,gBAAgB,CAAC;AAM7D,MAAM,OAAO,SAAS;IAEpB,MAAM,CAAC,IAAI,CAAC,EAAiB;QAC3B,IAAI,CAAC,EAAE,CAAC,SAAS,EAAE;YAAE,EAAE,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,EAAE,CAAC,CAAC;SAAE;QACxD,OAAO,EAAE,CAAC,SAAS,CAAC;IACtB,CAAC;IAMD,YAAmB,EAAiB;QAAjB,OAAE,GAAF,EAAE,CAAe;IAAG,CAAC;IAEjC,EAAE,CAAC,SAAiB,EAAE,QAAqC;QAChE,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE;YACjF,IAAI,CAAC,WAAW,CAAC,EAAE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ACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["/**\n * dd-elements.ts 11.5.1\n * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license\n */\n\nimport { DDResizable, DDResizableOpt } from './dd-resizable';\nimport { DDDragOpt, GridItemHTMLElement } from './types';\nimport { DDDraggable } from './dd-draggable';\nimport { DDDroppable, DDDroppableOpt } from './dd-droppable';\n\nexport interface DDElementHost extends GridItemHTMLElement {\n ddElement?: DDElement;\n}\n\nexport class DDElement {\n\n static init(el: DDElementHost): DDElement {\n if (!el.ddElement) { el.ddElement = new DDElement(el); }\n return el.ddElement;\n }\n\n public ddDraggable?: DDDraggable;\n public ddDroppable?: DDDroppable;\n public ddResizable?: DDResizable;\n\n constructor(public el: DDElementHost) {}\n\n public on(eventName: string, callback: (event: MouseEvent) => void): DDElement {\n if (this.ddDraggable && ['drag', 'dragstart', 'dragstop'].indexOf(eventName) > -1) {\n this.ddDraggable.on(eventName as 'drag' | 'dragstart' | 'dragstop', callback);\n } else if (this.ddDroppable && ['drop', 'dropover', 'dropout'].indexOf(eventName) > -1) {\n this.ddDroppable.on(eventName as 'drop' | 'dropover' | 'dropout', callback);\n } else if (this.ddResizable && ['resizestart', 'resize', 'resizestop'].indexOf(eventName) > -1) {\n this.ddResizable.on(eventName as 'resizestart' | 'resize' | 'resizestop', callback);\n }\n return this;\n }\n\n public off(eventName: string): DDElement {\n if (this.ddDraggable && ['drag', 'dragstart', 'dragstop'].indexOf(eventName) > -1) {\n this.ddDraggable.off(eventName as 'drag' | 'dragstart' | 'dragstop');\n } else if (this.ddDroppable && ['drop', 'dropover', 'dropout'].indexOf(eventName) > -1) {\n this.ddDroppable.off(eventName as 'drop' | 'dropover' | 'dropout');\n } else if (this.ddResizable && ['resizestart', 'resize', 'resizestop'].indexOf(eventName) > -1) {\n this.ddResizable.off(eventName as 'resizestart' | 'resize' | 'resizestop');\n }\n return this;\n }\n\n public setupDraggable(opts: DDDragOpt): DDElement {\n if (!this.ddDraggable) {\n this.ddDraggable = new DDDraggable(this.el, opts);\n } else {\n this.ddDraggable.updateOption(opts);\n }\n return this;\n }\n\n public cleanDraggable(): DDElement {\n if (this.ddDraggable) {\n this.ddDraggable.destroy();\n delete this.ddDraggable;\n }\n return this;\n }\n\n public setupResizable(opts: DDResizableOpt): DDElement {\n if (!this.ddResizable) {\n this.ddResizable = new DDResizable(this.el, opts);\n } else {\n this.ddResizable.updateOption(opts);\n }\n return this;\n }\n\n public cleanResizable(): DDElement {\n if (this.ddResizable) {\n this.ddResizable.destroy();\n delete this.ddResizable;\n }\n return this;\n }\n\n public setupDroppable(opts: DDDroppableOpt): DDElement {\n if (!this.ddDroppable) {\n this.ddDroppable = new DDDroppable(this.el, opts);\n } else {\n this.ddDroppable.updateOption(opts);\n }\n return this;\n }\n\n public cleanDroppable(): DDElement {\n if (this.ddDroppable) {\n this.ddDroppable.destroy();\n delete this.ddDroppable;\n }\n return this;\n }\n}\n"]}
1
+ {"version":3,"file":"dd-element.js","sourceRoot":"","sources":["../src/dd-element.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAkB,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAkB,MAAM,gBAAgB,CAAC;AAM7D,MAAM,OAAO,SAAS;IAEpB,MAAM,CAAC,IAAI,CAAC,EAAiB;QAC3B,IAAI,CAAC,EAAE,CAAC,SAAS,EAAE;YAAE,EAAE,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,EAAE,CAAC,CAAC;SAAE;QACxD,OAAO,EAAE,CAAC,SAAS,CAAC;IACtB,CAAC;IAMD,YAAmB,EAAiB;QAAjB,OAAE,GAAF,EAAE,CAAe;IAAG,CAAC;IAEjC,EAAE,CAAC,SAAiB,EAAE,QAAqC;QAChE,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,UA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EAAE;YACpB,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;YAC3B,OAAO,IAAI,CAAC,WAAW,CAAC;SACzB;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["/**\n * dd-elements.ts 12.1.0\n * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license\n */\n\nimport { DDResizable, DDResizableOpt } from './dd-resizable';\nimport { DDDragOpt, GridItemHTMLElement } from './types';\nimport { DDDraggable } from './dd-draggable';\nimport { DDDroppable, DDDroppableOpt } from './dd-droppable';\n\nexport interface DDElementHost extends GridItemHTMLElement {\n ddElement?: DDElement;\n}\n\nexport class DDElement {\n\n static init(el: DDElementHost): DDElement {\n if (!el.ddElement) { el.ddElement = new DDElement(el); }\n return el.ddElement;\n }\n\n public ddDraggable?: DDDraggable;\n public ddDroppable?: DDDroppable;\n public ddResizable?: DDResizable;\n\n constructor(public el: DDElementHost) {}\n\n public on(eventName: string, callback: (event: MouseEvent) => void): DDElement {\n if (this.ddDraggable && ['drag', 'dragstart', 'dragstop'].indexOf(eventName) > -1) {\n this.ddDraggable.on(eventName as 'drag' | 'dragstart' | 'dragstop', callback);\n } else if (this.ddDroppable && ['drop', 'dropover', 'dropout'].indexOf(eventName) > -1) {\n this.ddDroppable.on(eventName as 'drop' | 'dropover' | 'dropout', callback);\n } else if (this.ddResizable && ['resizestart', 'resize', 'resizestop'].indexOf(eventName) > -1) {\n this.ddResizable.on(eventName as 'resizestart' | 'resize' | 'resizestop', callback);\n }\n return this;\n }\n\n public off(eventName: string): DDElement {\n if (this.ddDraggable && ['drag', 'dragstart', 'dragstop'].indexOf(eventName) > -1) {\n this.ddDraggable.off(eventName as 'drag' | 'dragstart' | 'dragstop');\n } else if (this.ddDroppable && ['drop', 'dropover', 'dropout'].indexOf(eventName) > -1) {\n this.ddDroppable.off(eventName as 'drop' | 'dropover' | 'dropout');\n } else if (this.ddResizable && ['resizestart', 'resize', 'resizestop'].indexOf(eventName) > -1) {\n this.ddResizable.off(eventName as 'resizestart' | 'resize' | 'resizestop');\n }\n return this;\n }\n\n public setupDraggable(opts: DDDragOpt): DDElement {\n if (!this.ddDraggable) {\n this.ddDraggable = new DDDraggable(this.el, opts);\n } else {\n this.ddDraggable.updateOption(opts);\n }\n return this;\n }\n\n public cleanDraggable(): DDElement {\n if (this.ddDraggable) {\n this.ddDraggable.destroy();\n delete this.ddDraggable;\n }\n return this;\n }\n\n public setupResizable(opts: DDResizableOpt): DDElement {\n if (!this.ddResizable) {\n this.ddResizable = new DDResizable(this.el, opts);\n } else {\n this.ddResizable.updateOption(opts);\n }\n return this;\n }\n\n public cleanResizable(): DDElement {\n if (this.ddResizable) {\n this.ddResizable.destroy();\n delete this.ddResizable;\n }\n return this;\n }\n\n public setupDroppable(opts: DDDroppableOpt): DDElement {\n if (!this.ddDroppable) {\n this.ddDroppable = new DDDroppable(this.el, opts);\n } else {\n this.ddDroppable.updateOption(opts);\n }\n return this;\n }\n\n public cleanDroppable(): DDElement {\n if (this.ddDroppable) {\n this.ddDroppable.destroy();\n delete this.ddDroppable;\n }\n return this;\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * dd-gridstack.ts 11.5.1
2
+ * dd-gridstack.ts 12.1.0
3
3
  * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license
4
4
  */
5
5
  import { GridItemHTMLElement, GridStackElement, DDDragOpt } from './types';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * dd-gridstack.ts 11.5.1
2
+ * dd-gridstack.ts 12.1.0
3
3
  * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license
4
4
  */
5
5
  import { Utils } from './utils';