From a713e1b56e8af921bda0c3104e3c8127b2a34653 Mon Sep 17 00:00:00 2001 From: Stephen Abello Date: Tue, 6 Jan 2026 15:23:51 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B08641=20-=20Dashboard=20editor=20front-en?= =?UTF-8?q?d=20first=20commit=20for=20Form=20SDK=20integration.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * No dashlet edition * Dashboard are not persisted * Unable to load a dashboard from an endpoint (refresh) * Grid library need proper npm integration --- application/dashboard.class.inc.php | 23 +- application/dashboardlayout.class.inc.php | 14 +- application/dashlet.class.inc.php | 28 + application/menunode.class.inc.php | 6 +- .../components/dashlet/_dashlet.scss | 22 +- css/backoffice/layout/_all.scss | 1 + .../layout/dashboard/_dashboard.scss | 67 + css/backoffice/layout/dashlet-panel/_all.scss | 2 + .../layout/dashlet-panel/_dashlet-entry.scss | 51 + .../layout/dashlet-panel/_dashlet-panel.scss | 38 + js/layouts/dashboard/dashboard-grid-slot.js | 80 + js/layouts/dashboard/dashboard-grid.js | 113 + js/layouts/dashboard/dashboard.js | 274 + js/layouts/dashboard/dashlet.js | 59 + lib/composer/autoload_classmap.php | 341 +- lib/composer/autoload_static.php | 494 +- node_modules/gridstack/LICENSE | 21 + node_modules/gridstack/README.md | 565 ++ node_modules/gridstack/dist/angular/README.md | 211 + .../angular/esm2020/gridstack-angular.mjs | 5 + .../gridstack/dist/angular/esm2020/index.mjs | 9 + .../dist/angular/esm2020/lib/base-widget.mjs | 90 + .../esm2020/lib/gridstack-item.component.mjs | 101 + .../esm2020/lib/gridstack.component.mjs | 414 ++ .../angular/esm2020/lib/gridstack.module.mjs | 53 + .../dist/angular/esm2020/lib/types.mjs | 6 + .../angular/fesm2015/gridstack-angular.mjs | 647 ++ .../fesm2015/gridstack-angular.mjs.map | 1 + .../angular/fesm2020/gridstack-angular.mjs | 640 ++ .../fesm2020/gridstack-angular.mjs.map | 1 + .../gridstack/dist/angular/index.d.ts | 5 + .../dist/angular/lib/base-widget.d.ts | 55 + .../angular/lib/gridstack-item.component.d.ts | 79 + .../dist/angular/lib/gridstack.component.d.ts | 236 + .../dist/angular/lib/gridstack.module.d.ts | 31 + .../gridstack/dist/angular/lib/types.d.ts | 51 + .../gridstack/dist/angular/package.json | 31 + .../gridstack/dist/angular/src/base-widget.ts | 95 + .../angular/src/gridstack-item.component.ts | 125 + .../dist/angular/src/gridstack.component.ts | 460 ++ .../dist/angular/src/gridstack.module.ts | 44 + .../gridstack/dist/angular/src/types.ts | 54 + node_modules/gridstack/dist/dd-base-impl.d.ts | 69 + node_modules/gridstack/dist/dd-base-impl.js | 70 + .../gridstack/dist/dd-base-impl.js.map | 1 + node_modules/gridstack/dist/dd-draggable.d.ts | 20 + node_modules/gridstack/dist/dd-draggable.js | 364 + .../gridstack/dist/dd-draggable.js.map | 1 + node_modules/gridstack/dist/dd-droppable.d.ts | 26 + node_modules/gridstack/dist/dd-droppable.js | 149 + .../gridstack/dist/dd-droppable.js.map | 1 + node_modules/gridstack/dist/dd-element.d.ts | 27 + node_modules/gridstack/dist/dd-element.js | 91 + node_modules/gridstack/dist/dd-element.js.map | 1 + node_modules/gridstack/dist/dd-gridstack.d.ts | 82 + node_modules/gridstack/dist/dd-gridstack.js | 165 + .../gridstack/dist/dd-gridstack.js.map | 1 + node_modules/gridstack/dist/dd-manager.d.ts | 43 + node_modules/gridstack/dist/dd-manager.js | 14 + node_modules/gridstack/dist/dd-manager.js.map | 1 + .../gridstack/dist/dd-resizable-handle.d.ts | 18 + .../gridstack/dist/dd-resizable-handle.js | 113 + .../gridstack/dist/dd-resizable-handle.js.map | 1 + node_modules/gridstack/dist/dd-resizable.d.ts | 30 + node_modules/gridstack/dist/dd-resizable.js | 304 + .../gridstack/dist/dd-resizable.js.map | 1 + node_modules/gridstack/dist/dd-touch.d.ts | 33 + node_modules/gridstack/dist/dd-touch.js | 145 + node_modules/gridstack/dist/dd-touch.js.map | 1 + node_modules/gridstack/dist/gridstack-all.js | 3 + .../dist/gridstack-all.js.LICENSE.txt | 7 + .../gridstack/dist/gridstack-all.js.map | 1 + .../gridstack/dist/gridstack-engine.d.ts | 321 + .../gridstack/dist/gridstack-engine.js | 1272 ++++ .../gridstack/dist/gridstack-engine.js.map | 1 + node_modules/gridstack/dist/gridstack.css | 174 + node_modules/gridstack/dist/gridstack.d.ts | 802 +++ node_modules/gridstack/dist/gridstack.js | 2872 ++++++++ node_modules/gridstack/dist/gridstack.js.map | 1 + node_modules/gridstack/dist/gridstack.min.css | 1 + .../dist/spec/gridstack-engine-spec.d.ts | 1 + .../dist/spec/gridstack-engine-spec.js | 358 + .../dist/spec/gridstack-engine-spec.js.map | 1 + .../gridstack/dist/spec/gridstack-spec.d.ts | 1 + .../gridstack/dist/spec/gridstack-spec.js | 1780 +++++ .../gridstack/dist/spec/gridstack-spec.js.map | 1 + .../gridstack-integration.spec.d.ts | 1 + .../integration/gridstack-integration.spec.js | 171 + .../gridstack-integration.spec.js.map | 1 + .../gridstack/dist/spec/regression-spec.d.ts | 1 + .../gridstack/dist/spec/regression-spec.js | 100 + .../dist/spec/regression-spec.js.map | 1 + .../gridstack/dist/spec/utils-spec.d.ts | 1 + .../gridstack/dist/spec/utils-spec.js | 243 + .../gridstack/dist/spec/utils-spec.js.map | 1 + .../gridstack/dist/src/dd-base-impl.d.ts | 69 + .../gridstack/dist/src/dd-base-impl.js | 70 + .../gridstack/dist/src/dd-base-impl.js.map | 1 + .../gridstack/dist/src/dd-draggable.d.ts | 20 + .../gridstack/dist/src/dd-draggable.js | 364 + .../gridstack/dist/src/dd-draggable.js.map | 1 + .../gridstack/dist/src/dd-droppable.d.ts | 26 + .../gridstack/dist/src/dd-droppable.js | 149 + .../gridstack/dist/src/dd-droppable.js.map | 1 + .../gridstack/dist/src/dd-element.d.ts | 27 + node_modules/gridstack/dist/src/dd-element.js | 91 + .../gridstack/dist/src/dd-element.js.map | 1 + .../gridstack/dist/src/dd-gridstack.d.ts | 82 + .../gridstack/dist/src/dd-gridstack.js | 165 + .../gridstack/dist/src/dd-gridstack.js.map | 1 + .../gridstack/dist/src/dd-manager.d.ts | 43 + node_modules/gridstack/dist/src/dd-manager.js | 14 + .../gridstack/dist/src/dd-manager.js.map | 1 + .../dist/src/dd-resizable-handle.d.ts | 18 + .../gridstack/dist/src/dd-resizable-handle.js | 113 + .../dist/src/dd-resizable-handle.js.map | 1 + .../gridstack/dist/src/dd-resizable.d.ts | 30 + .../gridstack/dist/src/dd-resizable.js | 304 + .../gridstack/dist/src/dd-resizable.js.map | 1 + node_modules/gridstack/dist/src/dd-touch.d.ts | 33 + node_modules/gridstack/dist/src/dd-touch.js | 145 + .../gridstack/dist/src/dd-touch.js.map | 1 + .../gridstack/dist/src/gridstack-engine.d.ts | 321 + .../gridstack/dist/src/gridstack-engine.js | 1272 ++++ .../dist/src/gridstack-engine.js.map | 1 + .../gridstack/dist/src/gridstack.d.ts | 802 +++ node_modules/gridstack/dist/src/gridstack.js | 2872 ++++++++ .../gridstack/dist/src/gridstack.js.map | 1 + .../gridstack/dist/src/gridstack.scss | 157 + node_modules/gridstack/dist/src/types.d.ts | 427 ++ node_modules/gridstack/dist/src/types.js | 38 + node_modules/gridstack/dist/src/types.js.map | 1 + node_modules/gridstack/dist/src/utils.d.ts | 283 + node_modules/gridstack/dist/src/utils.js | 790 +++ node_modules/gridstack/dist/src/utils.js.map | 1 + node_modules/gridstack/dist/types.d.ts | 427 ++ node_modules/gridstack/dist/types.js | 38 + node_modules/gridstack/dist/types.js.map | 1 + node_modules/gridstack/dist/utils.d.ts | 283 + node_modules/gridstack/dist/utils.js | 787 +++ node_modules/gridstack/dist/utils.js.map | 1 + .../gridstack/dist/vitest.config.d.ts | 2 + node_modules/gridstack/dist/vitest.config.js | 74 + .../gridstack/dist/vitest.config.js.map | 1 + node_modules/gridstack/dist/vitest.setup.d.ts | 1 + node_modules/gridstack/dist/vitest.setup.js | 90 + .../gridstack/dist/vitest.setup.js.map | 1 + node_modules/gridstack/doc/API.md | 6198 +++++++++++++++++ node_modules/gridstack/package.json | 114 + .../Base/Component/Dashlet/DashletWrapper.php | 51 + .../Base/Layout/Dashboard/DashboardGrid.php | 63 + .../Layout/Dashboard/DashboardGridSlot.php | 104 + .../Base/Layout/Dashboard/DashboardLayout.php | 87 +- .../Base/Layout/DashletPanel/DashletEntry.php | 163 + .../Base/Layout/DashletPanel/DashletPanel.php | 42 + .../DashletPanel/DashletPanelFactory.php | 36 + .../Layout/PageContent/PageContentFactory.php | 12 + sources/Application/WebPage/iTopWebPage.php | 3 + .../Base/Layout/DashboardController.php | 56 + sources/Service/Dashboard/DashletService.php | 29 + .../dashlet/dashlet-wrapper.html.twig | 23 + .../layouts/dashboard/grid/layout.html.twig | 5 + .../layouts/dashboard/grid/slot.html.twig | 9 + .../base/layouts/dashboard/layout.html.twig | 21 +- .../dashlet-panel/dashlet-entry.html.twig | 13 + .../layouts/dashlet-panel/layout.html.twig | 11 + .../base/layouts/dashlet-panel/layout.js.twig | 13 + 167 files changed, 32266 insertions(+), 763 deletions(-) create mode 100644 css/backoffice/layout/dashlet-panel/_all.scss create mode 100644 css/backoffice/layout/dashlet-panel/_dashlet-entry.scss create mode 100644 css/backoffice/layout/dashlet-panel/_dashlet-panel.scss create mode 100644 js/layouts/dashboard/dashboard-grid-slot.js create mode 100644 js/layouts/dashboard/dashboard-grid.js create mode 100644 js/layouts/dashboard/dashboard.js create mode 100644 js/layouts/dashboard/dashlet.js create mode 100644 node_modules/gridstack/LICENSE create mode 100644 node_modules/gridstack/README.md create mode 100644 node_modules/gridstack/dist/angular/README.md create mode 100644 node_modules/gridstack/dist/angular/esm2020/gridstack-angular.mjs create mode 100644 node_modules/gridstack/dist/angular/esm2020/index.mjs create mode 100644 node_modules/gridstack/dist/angular/esm2020/lib/base-widget.mjs create mode 100644 node_modules/gridstack/dist/angular/esm2020/lib/gridstack-item.component.mjs create mode 100644 node_modules/gridstack/dist/angular/esm2020/lib/gridstack.component.mjs create mode 100644 node_modules/gridstack/dist/angular/esm2020/lib/gridstack.module.mjs create mode 100644 node_modules/gridstack/dist/angular/esm2020/lib/types.mjs create mode 100644 node_modules/gridstack/dist/angular/fesm2015/gridstack-angular.mjs create mode 100644 node_modules/gridstack/dist/angular/fesm2015/gridstack-angular.mjs.map create mode 100644 node_modules/gridstack/dist/angular/fesm2020/gridstack-angular.mjs create mode 100644 node_modules/gridstack/dist/angular/fesm2020/gridstack-angular.mjs.map create mode 100644 node_modules/gridstack/dist/angular/index.d.ts create mode 100644 node_modules/gridstack/dist/angular/lib/base-widget.d.ts create mode 100644 node_modules/gridstack/dist/angular/lib/gridstack-item.component.d.ts create mode 100644 node_modules/gridstack/dist/angular/lib/gridstack.component.d.ts create mode 100644 node_modules/gridstack/dist/angular/lib/gridstack.module.d.ts create mode 100644 node_modules/gridstack/dist/angular/lib/types.d.ts create mode 100644 node_modules/gridstack/dist/angular/package.json create mode 100644 node_modules/gridstack/dist/angular/src/base-widget.ts create mode 100644 node_modules/gridstack/dist/angular/src/gridstack-item.component.ts create mode 100644 node_modules/gridstack/dist/angular/src/gridstack.component.ts create mode 100644 node_modules/gridstack/dist/angular/src/gridstack.module.ts create mode 100644 node_modules/gridstack/dist/angular/src/types.ts create mode 100644 node_modules/gridstack/dist/dd-base-impl.d.ts create mode 100644 node_modules/gridstack/dist/dd-base-impl.js create mode 100644 node_modules/gridstack/dist/dd-base-impl.js.map create mode 100644 node_modules/gridstack/dist/dd-draggable.d.ts create mode 100644 node_modules/gridstack/dist/dd-draggable.js create mode 100644 node_modules/gridstack/dist/dd-draggable.js.map create mode 100644 node_modules/gridstack/dist/dd-droppable.d.ts create mode 100644 node_modules/gridstack/dist/dd-droppable.js create mode 100644 node_modules/gridstack/dist/dd-droppable.js.map create mode 100644 node_modules/gridstack/dist/dd-element.d.ts create mode 100644 node_modules/gridstack/dist/dd-element.js create mode 100644 node_modules/gridstack/dist/dd-element.js.map create mode 100644 node_modules/gridstack/dist/dd-gridstack.d.ts create mode 100644 node_modules/gridstack/dist/dd-gridstack.js create mode 100644 node_modules/gridstack/dist/dd-gridstack.js.map create mode 100644 node_modules/gridstack/dist/dd-manager.d.ts create mode 100644 node_modules/gridstack/dist/dd-manager.js create mode 100644 node_modules/gridstack/dist/dd-manager.js.map create mode 100644 node_modules/gridstack/dist/dd-resizable-handle.d.ts create mode 100644 node_modules/gridstack/dist/dd-resizable-handle.js create mode 100644 node_modules/gridstack/dist/dd-resizable-handle.js.map create mode 100644 node_modules/gridstack/dist/dd-resizable.d.ts create mode 100644 node_modules/gridstack/dist/dd-resizable.js create mode 100644 node_modules/gridstack/dist/dd-resizable.js.map create mode 100644 node_modules/gridstack/dist/dd-touch.d.ts create mode 100644 node_modules/gridstack/dist/dd-touch.js create mode 100644 node_modules/gridstack/dist/dd-touch.js.map create mode 100644 node_modules/gridstack/dist/gridstack-all.js create mode 100644 node_modules/gridstack/dist/gridstack-all.js.LICENSE.txt create mode 100644 node_modules/gridstack/dist/gridstack-all.js.map create mode 100644 node_modules/gridstack/dist/gridstack-engine.d.ts create mode 100644 node_modules/gridstack/dist/gridstack-engine.js create mode 100644 node_modules/gridstack/dist/gridstack-engine.js.map create mode 100644 node_modules/gridstack/dist/gridstack.css create mode 100644 node_modules/gridstack/dist/gridstack.d.ts create mode 100644 node_modules/gridstack/dist/gridstack.js create mode 100644 node_modules/gridstack/dist/gridstack.js.map create mode 100644 node_modules/gridstack/dist/gridstack.min.css create mode 100644 node_modules/gridstack/dist/spec/gridstack-engine-spec.d.ts create mode 100644 node_modules/gridstack/dist/spec/gridstack-engine-spec.js create mode 100644 node_modules/gridstack/dist/spec/gridstack-engine-spec.js.map create mode 100644 node_modules/gridstack/dist/spec/gridstack-spec.d.ts create mode 100644 node_modules/gridstack/dist/spec/gridstack-spec.js create mode 100644 node_modules/gridstack/dist/spec/gridstack-spec.js.map create mode 100644 node_modules/gridstack/dist/spec/integration/gridstack-integration.spec.d.ts create mode 100644 node_modules/gridstack/dist/spec/integration/gridstack-integration.spec.js create mode 100644 node_modules/gridstack/dist/spec/integration/gridstack-integration.spec.js.map create mode 100644 node_modules/gridstack/dist/spec/regression-spec.d.ts create mode 100644 node_modules/gridstack/dist/spec/regression-spec.js create mode 100644 node_modules/gridstack/dist/spec/regression-spec.js.map create mode 100644 node_modules/gridstack/dist/spec/utils-spec.d.ts create mode 100644 node_modules/gridstack/dist/spec/utils-spec.js create mode 100644 node_modules/gridstack/dist/spec/utils-spec.js.map create mode 100644 node_modules/gridstack/dist/src/dd-base-impl.d.ts create mode 100644 node_modules/gridstack/dist/src/dd-base-impl.js create mode 100644 node_modules/gridstack/dist/src/dd-base-impl.js.map create mode 100644 node_modules/gridstack/dist/src/dd-draggable.d.ts create mode 100644 node_modules/gridstack/dist/src/dd-draggable.js create mode 100644 node_modules/gridstack/dist/src/dd-draggable.js.map create mode 100644 node_modules/gridstack/dist/src/dd-droppable.d.ts create mode 100644 node_modules/gridstack/dist/src/dd-droppable.js create mode 100644 node_modules/gridstack/dist/src/dd-droppable.js.map create mode 100644 node_modules/gridstack/dist/src/dd-element.d.ts create mode 100644 node_modules/gridstack/dist/src/dd-element.js create mode 100644 node_modules/gridstack/dist/src/dd-element.js.map create mode 100644 node_modules/gridstack/dist/src/dd-gridstack.d.ts create mode 100644 node_modules/gridstack/dist/src/dd-gridstack.js create mode 100644 node_modules/gridstack/dist/src/dd-gridstack.js.map create mode 100644 node_modules/gridstack/dist/src/dd-manager.d.ts create mode 100644 node_modules/gridstack/dist/src/dd-manager.js create mode 100644 node_modules/gridstack/dist/src/dd-manager.js.map create mode 100644 node_modules/gridstack/dist/src/dd-resizable-handle.d.ts create mode 100644 node_modules/gridstack/dist/src/dd-resizable-handle.js create mode 100644 node_modules/gridstack/dist/src/dd-resizable-handle.js.map create mode 100644 node_modules/gridstack/dist/src/dd-resizable.d.ts create mode 100644 node_modules/gridstack/dist/src/dd-resizable.js create mode 100644 node_modules/gridstack/dist/src/dd-resizable.js.map create mode 100644 node_modules/gridstack/dist/src/dd-touch.d.ts create mode 100644 node_modules/gridstack/dist/src/dd-touch.js create mode 100644 node_modules/gridstack/dist/src/dd-touch.js.map create mode 100644 node_modules/gridstack/dist/src/gridstack-engine.d.ts create mode 100644 node_modules/gridstack/dist/src/gridstack-engine.js create mode 100644 node_modules/gridstack/dist/src/gridstack-engine.js.map create mode 100644 node_modules/gridstack/dist/src/gridstack.d.ts create mode 100644 node_modules/gridstack/dist/src/gridstack.js create mode 100644 node_modules/gridstack/dist/src/gridstack.js.map create mode 100644 node_modules/gridstack/dist/src/gridstack.scss create mode 100644 node_modules/gridstack/dist/src/types.d.ts create mode 100644 node_modules/gridstack/dist/src/types.js create mode 100644 node_modules/gridstack/dist/src/types.js.map create mode 100644 node_modules/gridstack/dist/src/utils.d.ts create mode 100644 node_modules/gridstack/dist/src/utils.js create mode 100644 node_modules/gridstack/dist/src/utils.js.map create mode 100644 node_modules/gridstack/dist/types.d.ts create mode 100644 node_modules/gridstack/dist/types.js create mode 100644 node_modules/gridstack/dist/types.js.map create mode 100644 node_modules/gridstack/dist/utils.d.ts create mode 100644 node_modules/gridstack/dist/utils.js create mode 100644 node_modules/gridstack/dist/utils.js.map create mode 100644 node_modules/gridstack/dist/vitest.config.d.ts create mode 100644 node_modules/gridstack/dist/vitest.config.js create mode 100644 node_modules/gridstack/dist/vitest.config.js.map create mode 100644 node_modules/gridstack/dist/vitest.setup.d.ts create mode 100644 node_modules/gridstack/dist/vitest.setup.js create mode 100644 node_modules/gridstack/dist/vitest.setup.js.map create mode 100644 node_modules/gridstack/doc/API.md create mode 100644 node_modules/gridstack/package.json create mode 100644 sources/Application/UI/Base/Component/Dashlet/DashletWrapper.php create mode 100644 sources/Application/UI/Base/Layout/Dashboard/DashboardGrid.php create mode 100644 sources/Application/UI/Base/Layout/Dashboard/DashboardGridSlot.php create mode 100644 sources/Application/UI/Base/Layout/DashletPanel/DashletEntry.php create mode 100644 sources/Application/UI/Base/Layout/DashletPanel/DashletPanel.php create mode 100644 sources/Application/UI/Base/Layout/DashletPanel/DashletPanelFactory.php create mode 100644 sources/Controller/Base/Layout/DashboardController.php create mode 100644 sources/Service/Dashboard/DashletService.php create mode 100644 templates/base/components/dashlet/dashlet-wrapper.html.twig create mode 100644 templates/base/layouts/dashboard/grid/layout.html.twig create mode 100644 templates/base/layouts/dashboard/grid/slot.html.twig create mode 100644 templates/base/layouts/dashlet-panel/dashlet-entry.html.twig create mode 100644 templates/base/layouts/dashlet-panel/layout.html.twig create mode 100644 templates/base/layouts/dashlet-panel/layout.js.twig diff --git a/application/dashboard.class.inc.php b/application/dashboard.class.inc.php index 115e4ff8b..3613a6502 100644 --- a/application/dashboard.class.inc.php +++ b/application/dashboard.class.inc.php @@ -1077,6 +1077,7 @@ JS $sId = utils::Sanitize($this->GetId(), '', 'element_identifier'); $sMenuTogglerId = "ibo-dashboard-menu-toggler-{$sId}"; + $sActionEditId = "ibo-dashboard-menu-edit-{$sId}"; $sPopoverMenuId = "ibo-dashboard-menu-popover-{$sId}"; $sName = 'UI:Dashboard:Actions'; @@ -1090,6 +1091,20 @@ JS } else { $oToolbar = $oDashboard->GetToolbar(); } + + // TODO 3.3 Check if we need different action for custom dashboard creation / edition + $oActionEditButton = ButtonUIBlockFactory::MakeIconAction('fas fa-pen', + $this->HasCustomDashboard() ? Dict::S('UI:Dashboard:EditCustom') : Dict::S('UI:Dashboard:CreateCustom'), + $sActionEditId, + '', + false, + $sActionEditId + ) + ->AddCSSClass('ibo-top-bar--toolbar-dashboard-edit-button') + ->AddCSSClass('ibo-action-button'); + + $oToolbar->AddSubBlock($oActionEditButton); + $oActionButton = ButtonUIBlockFactory::MakeIconAction('fas fa-ellipsis-v', Dict::S($sName), $sName, '', false, $sMenuTogglerId) ->AddCSSClass('ibo-top-bar--toolbar-dashboard-menu-toggler') ->AddCSSClass('ibo-action-button'); @@ -1099,8 +1114,8 @@ JS $sFile = addslashes(utils::LocalPath($this->sDefinitionFile)); $sJSExtraParams = json_encode($aExtraParams); if ($this->HasCustomDashboard()) { - $oEdit = new JSPopupMenuItem('UI:Dashboard:Edit', Dict::S('UI:Dashboard:EditCustom'), "return EditDashboard('{$this->sId}', '$sFile', $sJSExtraParams)"); - $aActions[$oEdit->GetUID()] = $oEdit->GetMenuItem(); +// $oEdit = new JSPopupMenuItem('UI:Dashboard:Edit', Dict::S('UI:Dashboard:EditCustom'), "return EditDashboard('{$this->sId}', '$sFile', $sJSExtraParams)"); +// $aActions[$oEdit->GetUID()] = $oEdit->GetMenuItem(); $oRevert = new JSPopupMenuItem( 'UI:Dashboard:RevertConfirm', Dict::S('UI:Dashboard:DeleteCustom'), @@ -1108,8 +1123,8 @@ JS ); $aActions[$oRevert->GetUID()] = $oRevert->GetMenuItem(); } else { - $oEdit = new JSPopupMenuItem('UI:Dashboard:Edit', Dict::S('UI:Dashboard:CreateCustom'), "return EditDashboard('{$this->sId}', '$sFile', $sJSExtraParams)"); - $aActions[$oEdit->GetUID()] = $oEdit->GetMenuItem(); +// $oEdit = new JSPopupMenuItem('UI:Dashboard:Edit', Dict::S('UI:Dashboard:CreateCustom'), "return EditDashboard('{$this->sId}', '$sFile', $sJSExtraParams)"); +// $aActions[$oEdit->GetUID()] = $oEdit->GetMenuItem(); } utils::GetPopupMenuItems($oPage, iPopupMenuExtension::MENU_DASHBOARD_ACTIONS, $this, $aActions); diff --git a/application/dashboardlayout.class.inc.php b/application/dashboardlayout.class.inc.php index ec8601797..d6cb290c0 100644 --- a/application/dashboardlayout.class.inc.php +++ b/application/dashboardlayout.class.inc.php @@ -109,7 +109,8 @@ abstract class DashboardLayoutMultiCol extends DashboardLayout // Trim the list of cells to remove the invisible/empty ones at the end of the array $aCells = $this->TrimCellsArray($aCells); - $oDashboardLayout = new DashboardLayoutUIBlock(); + // TODO 3.3 Handle dashboard new format, convert old format if needed + $oDashboardLayout = new DashboardLayoutUIBlock($aExtraParams['dashboard_div_id']); //$oPage->AddUiBlock($oDashboardLayout); $iCellIdx = 0; @@ -117,15 +118,16 @@ abstract class DashboardLayoutMultiCol extends DashboardLayout //Js given by each dashlet to reload $sJSReload = ""; - + $oDashboardGrid = new \Combodo\iTop\Application\UI\Base\Layout\Dashboard\DashboardGrid(); + $oDashboardLayout->SetGrid($oDashboardGrid); for ($iRows = 0; $iRows < $iNbRows; $iRows++) { $oDashboardRow = new DashboardRow(); - $oDashboardLayout->AddDashboardRow($oDashboardRow); + //$oDashboardLayout->AddDashboardRow($oDashboardRow); for ($iCols = 0; $iCols < $this->iNbCols; $iCols++) { $oDashboardColumn = new DashboardColumn($bEditMode); $oDashboardColumn->SetCellIndex($iCellIdx); - $oDashboardRow->AddDashboardColumn($oDashboardColumn); + //$oDashboardRow->AddDashboardColumn($oDashboardColumn); if (array_key_exists($iCellIdx, $aCells)) { $aDashlets = $aCells[$iCellIdx]; @@ -133,7 +135,8 @@ abstract class DashboardLayoutMultiCol extends DashboardLayout /** @var \Dashlet $oDashlet */ foreach ($aDashlets as $oDashlet) { if ($oDashlet::IsVisible()) { - $oDashboardColumn->AddUIBlock($oDashlet->DoRender($oPage, $bEditMode, true /* bEnclosingDiv */, $aExtraParams)); + $oDashboardGrid->AddDashlet($oDashlet->DoRender($oPage, $bEditMode, true /* bEnclosingDiv */, $aExtraParams), $oDashlet->GetID(), get_class($oDashlet)); + //$oDashboardColumn->AddUIBlock($oDashlet->DoRender($oPage, $bEditMode, true /* bEnclosingDiv */, $aExtraParams)); } } } else { @@ -147,6 +150,7 @@ abstract class DashboardLayoutMultiCol extends DashboardLayout $sJSReload .= $oDashboardRow->GetJSRefreshCallback()." "; } + // TODO 3.3 We can probably do better with the new dashboard $oPage->add_script("function updateDashboard".$aExtraParams['dashboard_div_id']."(){".$sJSReload."}"); if ($bEditMode) { // Add one row for extensibility diff --git a/application/dashlet.class.inc.php b/application/dashlet.class.inc.php index a94c3e55a..b4f7637e2 100644 --- a/application/dashlet.class.inc.php +++ b/application/dashlet.class.inc.php @@ -992,6 +992,10 @@ HTML; 'label' => Dict::S('UI:DashletObjectList:Label'), 'icon' => 'images/dashlets/icons8-list-48.png', 'description' => Dict::S('UI:DashletObjectList:Description'), + 'min_height' => 1, + 'min_width' => 2, + 'preferred_width' => 4, + 'preferred_height' => 3 ]; } @@ -1603,6 +1607,10 @@ class DashletGroupByPie extends DashletGroupBy 'label' => Dict::S('UI:DashletGroupByPie:Label'), 'icon' => 'images/dashlets/icons8-pie-chart-48.png', 'description' => Dict::S('UI:DashletGroupByPie:Description'), + 'min_height' => 2, + 'min_width' => 2, + 'preferred_width' => 3, + 'preferred_height' => 3 ]; } @@ -1699,6 +1707,10 @@ class DashletGroupByBars extends DashletGroupBy 'label' => Dict::S('UI:DashletGroupByBars:Label'), 'icon' => 'images/dashlets/icons8-bar-chart-48.png', 'description' => Dict::S('UI:DashletGroupByBars:Description'), + 'min_height' => 2, + 'min_width' => 2, + 'preferred_width' => 3, + 'preferred_height' => 3 ]; } @@ -1799,6 +1811,10 @@ class DashletGroupByTable extends DashletGroupBy 'label' => Dict::S('UI:DashletGroupByTable:Label'), 'description' => Dict::S('UI:DashletGroupByTable:Description'), 'icon' => 'images/dashlets/icons8-transaction-list-48.png', + 'min_height' => 2, + 'min_width' => 2, + 'preferred_width' => 3, + 'preferred_height' => 3 ]; } @@ -1925,6 +1941,10 @@ class DashletHeaderStatic extends Dashlet 'label' => Dict::S('UI:DashletHeaderStatic:Label'), 'icon' => 'images/dashlets/icons8-header-48.png', 'description' => Dict::S('UI:DashletHeaderStatic:Description'), + 'min_height' => 1, + 'min_width' => 3, + 'preferred_width' => 3, + 'preferred_height' => 1 ]; } } @@ -2223,6 +2243,10 @@ class DashletHeaderDynamic extends Dashlet 'label' => Dict::S('UI:DashletHeaderDynamic:Label'), 'icon' => 'images/dashlets/icons8-header-altered-48.png', 'description' => Dict::S('UI:DashletHeaderDynamic:Description'), + 'min_height' => 1, + 'min_width' => 2, + 'preferred_width' => 4, + 'preferred_height' => 3 ]; } } @@ -2332,6 +2356,10 @@ HTML; 'label' => Dict::S('UI:DashletBadge:Label'), 'icon' => 'images/dashlets/icons8-badge-48.png', 'description' => Dict::S('UI:DashletBadge:Description'), + 'min_height' => 1, + 'min_width' => 2, + 'preferred_width' => 2, + 'preferred_height' => 2 ]; } } diff --git a/application/menunode.class.inc.php b/application/menunode.class.inc.php index eef87d461..b8c53a83d 100644 --- a/application/menunode.class.inc.php +++ b/application/menunode.class.inc.php @@ -6,6 +6,7 @@ */ use Combodo\iTop\Application\Helper\WebResourcesHelper; +use Combodo\iTop\Application\UI\Base\Layout\PageContent\PageContentFactory; use Combodo\iTop\Application\WebPage\ErrorPage; use Combodo\iTop\Application\WebPage\iTopWebPage; use Combodo\iTop\Application\WebPage\WebPage; @@ -1279,13 +1280,14 @@ class DashboardMenuNode extends MenuNode if ($oDashboard != null) { WebResourcesHelper::EnableC3JSToWebPage($oPage); + // TODO 3.3 this works for dashboard menu, what about other places ? + $oPageLayout = PageContentFactory::MakeForDashboard(); + $oPage->SetContentLayout($oPageLayout, $oPage); $sDivId = utils::Sanitize($this->sMenuId, '', 'element_identifier'); - $oPage->add('
'); $aExtraParams['dashboard_div_id'] = $sDivId; $aExtraParams['from_dashboard_page'] = true; $oDashboard->SetReloadURL($this->GetHyperlink($aExtraParams)); $oDashboard->Render($oPage, false, $aExtraParams); - $oPage->add('
'); $bEdit = utils::ReadParam('edit', false); if ($bEdit) { diff --git a/css/backoffice/components/dashlet/_dashlet.scss b/css/backoffice/components/dashlet/_dashlet.scss index 51b301b3a..3dd15e37c 100644 --- a/css/backoffice/components/dashlet/_dashlet.scss +++ b/css/backoffice/components/dashlet/_dashlet.scss @@ -19,7 +19,10 @@ $ibo-dashlet-blocker--height: 100% !default; .ibo-dashlet { position: relative; width: calc(#{$ibo-dashlet--width} - #{$ibo-dashlet--elements-spacing-x}); - margin: calc(#{$ibo-dashlet--elements-spacing-y} / 2) calc(#{$ibo-dashlet--elements-spacing-x} / 2); + //margin: calc(#{$ibo-dashlet--elements-spacing-y} / 2) calc(#{$ibo-dashlet--elements-spacing-x} / 2); + + height: 100% !important; + width: 100% !important; &.dashlet-selected { position: relative; @@ -38,4 +41,21 @@ $ibo-dashlet-blocker--height: 100% !default; width: $ibo-dashlet-blocker--width; height: $ibo-dashlet-blocker--height; cursor: not-allowed; +} + +.ibo-dashlet--actions { + position: absolute; + z-index: 1000; + top: 0px; + right: 0px; + display: none; + padding: 4px; + border-radius: 4px; + + background-color: $ibo-color-white-100; + @extend %ibo-elevation-100; +} + +ibo-dashlet[data-edit-mode="edit"] { + z-index: 3; } \ No newline at end of file diff --git a/css/backoffice/layout/_all.scss b/css/backoffice/layout/_all.scss index 584fa15c6..209fdf317 100644 --- a/css/backoffice/layout/_all.scss +++ b/css/backoffice/layout/_all.scss @@ -15,3 +15,4 @@ @import "wizard-container/wizard-container"; @import "object/all"; @import "activity-panel/all"; +@import "dashlet-panel/all"; diff --git a/css/backoffice/layout/dashboard/_dashboard.scss b/css/backoffice/layout/dashboard/_dashboard.scss index 74404cc38..a58d18f51 100644 --- a/css/backoffice/layout/dashboard/_dashboard.scss +++ b/css/backoffice/layout/dashboard/_dashboard.scss @@ -175,3 +175,70 @@ input:checked + .ibo-dashboard--slider:before { input:checked + .ibo-dashboard--slider:after { content: $ibo-dashboard--slider--before--content; } + +// TODO 3.3 Cleanup variables +// TODO 3.3 Move to vendor what's from gridstack + + +.grid-stack { + display: block; +} + +.ibo-dashboard[data-edit-mode="edit"] .grid-stack{ + background-size: calc(100% / 12) var(--gs-cell-height); + background-color: $ibo-color-white-100; + background-image: linear-gradient(to right, $ibo-color-white-200 8px, transparent 8px), linear-gradient(to bottom, $ibo-color-white-200 8px, transparent 8px); + --gs-item-margin-top: 8px; + --gs-item-margin-bottom: 0; + --gs-item-margin-right: 0; + --gs-item-margin-left: 8px; +} + +ibo-dashboard[data-edit-mode="view"] { + .ibo-dashboard--form { + display: none; + } +} + +.ibo-dashboard--form { + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; + + height: 55px; + background-color: $ibo-color-blue-200; + margin: -16px -36px 24px -36px; + padding: 0 36px; +} + +.ibo-dashboard--form--inputs { + display: flex; + flex-direction: row; + align-items: center; + gap: 12px; + + @extend %common-font-ral-med-250; +} + +.ibo-dashboard[data-edit-mode="edit"] ibo-dashlet:not([data-edit-mode="edit"]):hover .ibo-dashlet--actions { + display: block; +} + +.ibo-dashboard[data-edit-mode="error"] .grid-stack{ + background-image: url($approot-relative + '/images/alpha-fatal-error.gif'); +} + +// Our edit mode dashboard already has its own header, so we hide the standard one +#ibo-page-header:has(+ ibo-dashboard[data-edit-mode="edit"]) { + display: none; +} + +.ibo-dashboard[data-edit-mode="edit"] .ibo-dashboard--grid:has(ibo-dashboard-grid-slot > ibo-dashlet[data-edit-mode="edit"]) .ibo-dashboard--grid--backdrop { + position: absolute; + height: 100%; + width: 100%; + background-color: $ibo-color-grey-900; + z-index: 2; + opacity: 50%; +} \ No newline at end of file diff --git a/css/backoffice/layout/dashlet-panel/_all.scss b/css/backoffice/layout/dashlet-panel/_all.scss new file mode 100644 index 000000000..1f8cbf4b5 --- /dev/null +++ b/css/backoffice/layout/dashlet-panel/_all.scss @@ -0,0 +1,2 @@ +@import "dashlet-entry"; +@import "dashlet-panel"; \ No newline at end of file diff --git a/css/backoffice/layout/dashlet-panel/_dashlet-entry.scss b/css/backoffice/layout/dashlet-panel/_dashlet-entry.scss new file mode 100644 index 000000000..1dfce63f8 --- /dev/null +++ b/css/backoffice/layout/dashlet-panel/_dashlet-entry.scss @@ -0,0 +1,51 @@ +// TODO 3.3 Cleanup variables + +.ibo-dashlet-entry { + display: flex; + flex-direction: row; + gap: 10px; + + + border: 1px solid $ibo-color-grey-300; + border-radius: 5px; + padding: 12px; + background-color: $ibo-color-grey-100; + + cursor: pointer; + text-align: left; + + &:hover { + background-color: $ibo-color-grey-200; + border-color: $ibo-color-grey-400; + } + &:active { + background-color: $ibo-color-grey-50; + border-color: $ibo-color-grey-500; + } +} + +.ibo-dashlet-entry--icon { + flex-shrink: 0; + height: 36px; + width: 36px; +} + +.ibo-dashlet-entry--content { + display: flex; + flex-direction: column; + justify-content: center; + overflow-x: hidden; + gap: 4px; +} + +.ibo-dashlet-entry--title { + font-size: 14px; + font-weight: 600; + color: $ibo-color-grey-900; +} + +.ibo-dashlet-entry--description { + font-size: 12px; + color: $ibo-color-grey-700; + +} \ No newline at end of file diff --git a/css/backoffice/layout/dashlet-panel/_dashlet-panel.scss b/css/backoffice/layout/dashlet-panel/_dashlet-panel.scss new file mode 100644 index 000000000..73f76fc96 --- /dev/null +++ b/css/backoffice/layout/dashlet-panel/_dashlet-panel.scss @@ -0,0 +1,38 @@ +// TODO 3.3 Cleanup variables + +.ibo-dashlet-panel { + height: 100%; + display: flex; + flex-direction: column; + width: 326px; + background-color: $ibo-color-white-100; +} + +.ibo-dashlet-panel--title { + display: flex; + flex-direction: column; + justify-content: center; + + height: 55px; + background-color: $ibo-color-white-200; + padding: 0 16px; + flex-grow: 0; + @extend %common-font-ral-med-300; +} + +.ibo-dashlet-panel--entries, .ibo-dashlet-panel--form-container { + flex-grow: 1; + display: flex; + flex-direction: column; + overflow: auto; + + padding: 16px; + gap: 12px; + &.ibo-is-hidden { + display: none; + } +} + +.ibo-center-container:has(ibo-dashboard[data-edit-mode="view"]) .ibo-dashlet-panel{ + display: none; +} \ No newline at end of file diff --git a/js/layouts/dashboard/dashboard-grid-slot.js b/js/layouts/dashboard/dashboard-grid-slot.js new file mode 100644 index 000000000..76f1ef067 --- /dev/null +++ b/js/layouts/dashboard/dashboard-grid-slot.js @@ -0,0 +1,80 @@ +class IboGridSlot extends HTMLElement { + constructor() { + super(); + } + connectedCallback() { + + /** @type {string} unique cell id */ + this.id = ''; + + /** @type {number} */ + this.iPosX = this.getAttribute('gs-x') ? parseInt(this.getAttribute('gs-x'), 10) : 0; + + /** @type {number} */ + this.iPostY = this.getAttribute('gs-y') ? parseInt(this.getAttribute('gs-y'), 10) : 0; + + /** @type {number} */ + this.iWidth = this.getAttribute('gs-w') ? parseInt(this.getAttribute('gs-w'), 10) : 1; + + /** @type {number} */ + this.iHeight = this.getAttribute('gs-h') ? parseInt(this.getAttribute('gs-h'), 10) : 1; + + /** @type {IboDashlet|null} contained dashlet id */ + this.sDashletId = null; + /** @type {IboDashlet|null} contained dashlet element */ + this.oDashlet = this.querySelector('ibo-dashlet') || null; + + /** @type {Object} freeform metadata */ + this.meta = {}; + } + + static MakeNew(oDashletElem, aOptions = {}) { + const oSlot = document.createElement('ibo-dashboard-grid-slot'); + oDashletElem.classList.add("grid-stack-item-content"); + + oSlot.appendChild(oDashletElem); + oSlot.classList.add("grid-stack-item"); + oSlot.oDashlet = oDashletElem; + + return oSlot; + } + + Serialize() { + const oDashlet = this.oDashlet; + + const aSlotData = { + x: this.iPosX, + y: this.iPostY, + w: this.iWidth, + h: this.iHeight + }; + + const aDashletData = oDashlet ? oDashlet.Serialize() : {}; + + return {...aSlotData, ...aDashletData}; + } + + static observedAttributes = ['gs-x', 'gs-y', 'gs-w', 'gs-h']; + + + + + attributeChangedCallback(name, oldValue, newValue) { + switch (name) { + case 'gs-x': + this.iPosX = parseInt(newValue, 10) || 0; + break; + case 'gs-y': + this.iPostY = parseInt(newValue, 10) || 0; + break; + case 'gs-w': + this.iWidth = parseInt(newValue, 10) || 1; + break; + case 'gs-h': + this.iHeight = parseInt(newValue, 10) || 1; + break; + } + } +} + +customElements.define('ibo-dashboard-grid-slot', IboGridSlot); diff --git a/js/layouts/dashboard/dashboard-grid.js b/js/layouts/dashboard/dashboard-grid.js new file mode 100644 index 000000000..694f79035 --- /dev/null +++ b/js/layouts/dashboard/dashboard-grid.js @@ -0,0 +1,113 @@ +class IboGrid extends HTMLElement { + constructor() { + super(); + } + + connectedCallback() { + + /** @type {number} */ + this.columnsCount = 12; + /** @type {boolean} unused yet*/ + this.bEditable = false; + /** @type {GridStack|null} GridStack instance */ + this.oGrid = null; + /** @type {Array} */ + this.aSlots = []; + + + this.SetupGrid(); + } + + SetupGrid() { + let aCandidateSlots = Array.from(this.querySelectorAll('ibo-dashboard-grid-slot')); + aCandidateSlots.forEach(oSlot => { + const aAttrs = ['gs-x', 'gs-y', 'gs-w', 'gs-h', 'id']; + aAttrs.forEach(sAttr => { + const sVal = oSlot.getAttribute(sAttr) || oSlot.getAttribute('data-'+sAttr); + if (sVal !== null) { + oSlot.setAttribute(sAttr, sVal); + } + }); + }); + + this.oGrid = GridStack.init({ + column: this.columnsCount, + marginTop: 8, + marginLeft: 8, + marginRight: 0, + marginBottom: 0, + resizable: {handles: 'all'}, + disableDrag: true, + disableResize: true, + float: true + }, this); + } + + getSlots() { + return this.oGrid.getGridItems(); + } + + SetEditable(bIsEditable) { + this.bEditable = bIsEditable; + if (this.oGrid !== null) { + this.oGrid.enableMove(bIsEditable); + this.oGrid.enableResize(bIsEditable); + } + } + + AddDashlet(sDashlet, aOptions = {}) { + // Get the dashlet as an object + const oParser = new DOMParser(); + const oDocument = oParser.parseFromString(sDashlet, 'text/html'); + const oDashlet = oDocument.body.firstChild; + + const oSlot = IboGridSlot.MakeNew(oDashlet); + + this.append(oSlot); + + let aDefaultOptions = { + autoPosition: !(aOptions.hasOwnProperty('x') || aOptions.hasOwnProperty('y')), + } + this.oGrid.makeWidget(oSlot, Object.assign(aDefaultOptions, aOptions)); + + return oDashlet.sDashletId; + } + + CloneDashlet(sDashletId) { + const aSlots = this.getSlots(); + for (let oSlot of aSlots) { + + if (oSlot.oDashlet && oSlot.oDashlet.sDashletId === sDashletId) { + const sWidth = oSlot.iWidth; + const sHeight = oSlot.iHeight; + + // TODO 3.3: Should ask a rendered dashlet for its content to avoid duplicating IDs + // Still we'll position it automatically and take care of height/width + + const sDashletContent = oSlot.oDashlet.innerHTML; + this.AddDashlet(sDashletContent, { + 'w': sWidth, + 'h': sHeight + }); + break; + } + } + } + RemoveDashlet(sDashletId) { + const aSlots = this.getSlots(); + for (let oSlot of aSlots) { + if (oSlot.oDashlet && oSlot.oDashlet.sDashletId === sDashletId) { + this.oGrid.removeWidget(oSlot); + break; + } + } + } + Serialize() { + const aSlots = this.getSlots(); + return aSlots.map(oSlot => { + return oSlot.Serialize(); + }); + } +} + +customElements.define('ibo-dashboard-grid', IboGrid); diff --git a/js/layouts/dashboard/dashboard.js b/js/layouts/dashboard/dashboard.js new file mode 100644 index 000000000..696b686fb --- /dev/null +++ b/js/layouts/dashboard/dashboard.js @@ -0,0 +1,274 @@ +class IboDashboard extends HTMLElement { + constructor() { + super(); + + /** @type {string} */ + this.sId = ""; + /** @type {string} */ + this.sTitle = ""; + /** @type {boolean} unused yet */ + this.isEditable = false; + /** @type {boolean} */ + this.bEditMode = false; + /** @type {boolean} unused yet */ + this.bAutoRefresh = false; + /** @type {number} unused yet */ + this.iRefreshRate = 0; + /** @type {IboGrid|null} */ + this.oGrid = null; + /** @type {string|null} unused yet */ + this.refreshUrl = null; + /** @type {string|null} unused yet */ + this.csrfToken = null; + /** @type {number} Payload schema version */ + this.schemaVersion = 2; + + /** @type {object|null} Last saved state for cancel functionality, unused yet */ + this.aLastSavedState = null; + } + + connectedCallback() { + this.sId = this.getAttribute("id"); + this.bEditMode = (this.getAttribute("data-edit-mode") === "edit"); + this.SetupGrid(); + + this.BindEvents(); + } + + BindEvents() { + document.getElementById('ibo-dashboard-menu-edit-'+this.sId)?.addEventListener('click', (e) => { + e.preventDefault(); + this.ToggleEditMode(); + document.getElementById('ibo-dashboard-menu-edit-'+this.sId)?.classList.toggle('active', this.GetEditMode()); + }); + + this.querySelector('[data-role="ibo-button"][name="save"]')?.addEventListener('click', (e) => { + e.preventDefault(); + this.Save() + }); + + this.querySelector('[data-role="ibo-button"][name="cancel"]')?.addEventListener('click', (e) => { + e.preventDefault(); + // TODO 3.3: Implement cancel functionality (reload last saved state) + this.SetEditMode(false) + }); + } + SetupGrid() { + if(this.oGrid !== null){ + return; + } + + this.oGrid = this.querySelector('ibo-dashboard-grid'); + } + + + GetEditMode() { + return this.bEditMode; + } + + ToggleEditMode(){ + this.SetEditMode(!this.bEditMode); + } + + SetEditMode(bEditMode) { + this.bEditMode = bEditMode; + + this.oGrid.SetEditable(this.bEditMode); + if(this.bEditMode){ + this.aLastSavedState = this.Serialize(); + this.setAttribute("data-edit-mode", "edit"); + } + else{ + this.setAttribute("data-edit-mode", "view"); + } + } + + AddNewDashlet(sDashletClass, aDashletOptions = {}) { + const sNewDashletUrl = GetAbsoluteUrlAppRoot() + '/pages/UI.php?route=dashboard.new_dashlet&dashlet_class='+encodeURIComponent(sDashletClass); + fetch(sNewDashletUrl) + .then(async data => { + const sDashletId = this.oGrid.AddDashlet(await data.text(), aDashletOptions); + + // TODO 3.3 Either open the dashlet form right away, or just enter edit mode + this.EditDashlet(sDashletId); + + const sGetashletFormUrl = GetAbsoluteUrlAppRoot() + '/pages/UI.php?route=dashboard.get_dashlet_form&dashlet_class='+encodeURIComponent(sDashletClass); + fetch(sGetashletFormUrl) + .then(async formData => { + const sFormData = await formData.text(); + + this.HideDashletTogglers(); + this.SetDashletForm(sFormData); + }); + }) + + } + + HideDashletTogglers() { + const aTogglers = document.querySelector('.ibo-dashlet-panel--entries'); + aTogglers.classList.add('ibo-is-hidden'); + } + + SetDashletForm(sFormData) { + const oFormContainer = document.querySelector('.ibo-dashlet-panel--form-container'); + oFormContainer.innerHTML = sFormData; + oFormContainer.classList.remove('ibo-is-hidden'); + } + + EditDashlet(sDashletId) { + // TODO 3.3: Implement dashlet editing when forms are ready + console.log("Edit dashlet: "+sDashletId); + + // Create backdrop to block interactions with other dashlets + if(this.oGrid.querySelector('.ibo-dashboard--grid--backdrop') === null) { + const oBackdrop = document.createElement("div"); + oBackdrop.classList.add('ibo-dashboard--grid--backdrop'); + this.oGrid.append(oBackdrop); + } + + this.querySelector('ibo-dashlet[data-dashlet-id="'+sDashletId+'"]').setAttribute('data-edit-mode', 'edit'); + + // Disable dashboard buttons so we need to finish this edition first + } + + CloneDashlet(sDashletId) { + this.oGrid.CloneDashlet(sDashletId); + } + + RemoveDashlet(sDashletId) { + this.oGrid.RemoveDashlet(sDashletId); + } + + Serialize() { + const sDashboardTitle = this.querySelector('.ibo-dashboard--form--inputs input[name="dashboard_title"]').value; + const sDashboardRefreshRate = this.querySelector('.ibo-dashboard--form--inputs select[name="refresh_interval"]').value; + + const aSerializedGrid = this.oGrid.Serialize(); + return { + schema_version: this.schemaVersion, + id: this.sId, + title: sDashboardTitle, + refresh_rate: sDashboardRefreshRate, + dashlets: aSerializedGrid + }; + } + + Save() { + const aPayload = this.Serialize(); + // TODO 3.3: Implement saving dashboard state to server when backend is ready + // May try to save as serialized PHP if XML format is not yet decided + console.log(aPayload); + + this.SetEditMode(false); + this.aLastSavedState = aPayload; + } + + + async Load(aSaveState) { + // TODO 3.3: Implement loading dashboard state either from server or local payload + // aSaveState expected shape (example): + // { schema_version: 1, id: "...", title: "...", refresh_rate: "...", dashlets: [ { x, y, w, h, id, type, formData, content? }, ... ] } + + if (!aSaveState || typeof aSaveState !== 'object') { + this.DisplayError('Invalid dashboard save state payload'); + return; + } + + if (aSaveState.schema_version !== this.schemaVersion) { + this.DisplayError('Load schema version mismatch'); + } + + // set basic props + if (aSaveState.id) { + this.sId = aSaveState.id; + // keep element id attribute in sync + this.setAttribute('id', this.sId); + } + if (typeof aSaveState.title !== 'undefined') { + this.sTitle = aSaveState.title; + const titleInput = this.querySelector('.ibo-dashboard--form--inputs input[name="dashboard_title"]'); + if (titleInput) titleInput.value = this.sTitle; + } + if (typeof aSaveState.refresh_rate !== 'undefined') { + this.iRefreshRate = Number(aSaveState.refresh_rate) || 0; + const sel = this.querySelector('.ibo-dashboard--form--inputs select[name="refresh_interval"]'); + if (sel) sel.value = aSaveState.refresh_rate; + } + + // -- clear existing grid -- + this.SetupGrid(); + if (this.oGrid) { + this.oGrid.Clear(); + } + + // -- iterate dashlets and re-create them -- + const aDashlets = Array.isArray(aSaveState.dashlets) ? aSaveState.dashlets : []; + for (const slotPayload of aDashlets) { + // ensure minimal shape + const x = Number(slotPayload.x) || undefined; + const y = Number(slotPayload.y) || undefined; + const w = Number(slotPayload.w) || undefined; + const h = Number(slotPayload.h) || undefined; + + // If the payload includes the full HTML markup for the dashlet, use it. + // Otherwise, attempt to fetch markup from server based on dashlet type. + let sDashletHtml = null; + if (slotPayload.content) { + sDashletHtml = slotPayload.content; + } else if (slotPayload.type) { + try { + // Use the same endpoint you use for new dashlet creation as a fallback. + // Your server may provide an endpoint that accepts type and returns pre-rendered HTML. + const sUrl = GetAbsoluteUrlAppRoot() + '/pages/UI.php?route=dashboard.new_dashlet&dashlet_class=' + encodeURIComponent(slotPayload.type); + const res = await fetch(sUrl); + if (res.ok) { + sDashletHtml = await res.text(); + } else { + console.warn('Failed to fetch dashlet HTML for type', slotPayload.type, res.status); + } + } catch (e) { + console.warn('Error fetching dashlet HTML for type', slotPayload.type, e); + } + } + + // if still missing markup, use a placeholder + if (!sDashletHtml) { + sDashletHtml = `
Missing dashlet content for type: ${slotPayload.type || 'unknown'}
`; + } + + // Add dashlet at requested position/size + const aOptions = {}; + if (typeof x !== 'undefined') aOptions.x = x; + if (typeof y !== 'undefined') aOptions.y = y; + if (typeof w !== 'undefined') aOptions.w = w; + if (typeof h !== 'undefined') aOptions.h = h; + + const oSlot = this.oGrid.AddDashlet(sDashletHtml, aOptions); + + // If payload contains dashlet metadata (id/type/formData) — apply it + if (slotPayload.id || slotPayload.type) { + const dashletElem = oSlot.oDashlet || oSlot.querySelector('ibo-dashlet'); + if (dashletElem) { + if (slotPayload.id) dashletElem.sDashletId = slotPayload.id; + if (slotPayload.type) dashletElem.type = slotPayload.type; + if (slotPayload.formData) { + dashletElem.ApplyFormData(slotPayload.formData); + } + } + } + } + + // Save loaded state as last saved so cancel can restore it + this.aLastSavedState = aSaveState; + + // Exit edit-mode: loading a previous state implies not being in edit mode by default + this.SetEditMode(false); + } + + DisplayError(sMessage, sSeverity = 'error') { + // TODO 3.3: Make this real + this.setAttribute("data-edit-mode", "error"); + } +} + +customElements.define('ibo-dashboard', IboDashboard); diff --git a/js/layouts/dashboard/dashlet.js b/js/layouts/dashboard/dashlet.js new file mode 100644 index 000000000..de0870540 --- /dev/null +++ b/js/layouts/dashboard/dashlet.js @@ -0,0 +1,59 @@ +class IboDashlet extends HTMLElement { + constructor() { + super(); + } + + connectedCallback() { + /** @type {string} */ + this.sDashletId = this.GetDashletId(); + /** @type {string} */ + this.type = this.GetDashletType(); + /** @type {Object} */ + this.formData = {}; + /** @type {Object} unused yet */ + this.meta = {}; + + this.BindEvents(); + } + BindEvents() { + // Bind any dashlet-specific events here + this.querySelector('.ibo-dashlet--actions [data-role="ibo-dashlet-edit"]')?.addEventListener('click', (e) => { + this.closest('ibo-dashboard')?.EditDashlet(this.sDashletId); + }); + + this.querySelector('.ibo-dashlet--actions [data-role="ibo-dashlet-clone"]')?.addEventListener('click', (e) => { + this.closest('ibo-dashboard')?.CloneDashlet(this.sDashletId); + }); + + this.querySelector('.ibo-dashlet--actions [data-role="ibo-dashlet-remove"]')?.addEventListener('click', (e) => { + this.closest('ibo-dashboard')?.RemoveDashlet(this.sDashletId); + }); + } + + GetDashletId() { + return this.getAttribute('data-dashlet-id'); + } + + GetDashletType() { + return this.getAttribute("data-dashlet-type") || ""; + } + + static MakeNew(sDashlet) { + const oDashlet = document.createElement('ibo-dashlet'); + oDashlet.innerHTML = sDashlet; + + return oDashlet; + } + + Serialize() { + const aDashletData = { + id: this.sDashletId, + type: this.type, + formData: this.formData, + }; + + return aDashletData; + } +} + +customElements.define('ibo-dashlet', IboDashlet); diff --git a/lib/composer/autoload_classmap.php b/lib/composer/autoload_classmap.php index 6bc2e551d..52e3b49db 100644 --- a/lib/composer/autoload_classmap.php +++ b/lib/composer/autoload_classmap.php @@ -170,6 +170,7 @@ return array( 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Dashlet\\DashletFactory' => $baseDir . '/sources/Application/UI/Base/Component/Dashlet/DashletFactory.php', 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Dashlet\\DashletHeaderStatic' => $baseDir . '/sources/Application/UI/Base/Component/Dashlet/DashletHeaderStatic.php', 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Dashlet\\DashletPlainText' => $baseDir . '/sources/Application/UI/Base/Component/Dashlet/DashletPlainText.php', + 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Dashlet\\DashletWrapper' => $baseDir . '/sources/Application/UI/Base/Component/Dashlet/DashletWrapper.php', 'Combodo\\iTop\\Application\\UI\\Base\\Component\\DataTable\\DataTable' => $baseDir . '/sources/Application/UI/Base/Component/DataTable/DataTable.php', 'Combodo\\iTop\\Application\\UI\\Base\\Component\\DataTable\\DataTableConfig\\DataTableConfig' => $baseDir . '/sources/Application/UI/Base/Component/DataTable/DataTableConfig/DataTableConfig.php', 'Combodo\\iTop\\Application\\UI\\Base\\Component\\DataTable\\DataTableSettings' => $baseDir . '/sources/Application/UI/Base/Component/DataTable/DataTableSettings.php', @@ -244,10 +245,6 @@ return array( 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\ToolbarSpacer\\ToolbarSpacer' => $baseDir . '/sources/Application/UI/Base/Component/Toolbar/ToolbarSpacer/ToolbarSpacer.php', 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\ToolbarSpacer\\ToolbarSpacerUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/Toolbar/ToolbarSpacer/ToolbarSpacerUIBlockFactory.php', 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\ToolbarUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/Toolbar/ToolbarUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\TurboForm\\TurboForm' => $baseDir . '/sources/Application/UI/Base/Component/TurboForm/TurboForm.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\TurboForm\\TurboFormUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/TurboForm/TurboFormUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\TurboUpdate\\TurboStream' => $baseDir . '/sources/Application/UI/Base/Component/TurboStream/TurboStream.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\TurboUpdate\\TurboStreamUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/TurboStream/TurboStreamUIBlockFactory.php', 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\ActivityEntry' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/ActivityEntry.php', 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\ActivityEntryFactory' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/ActivityEntryFactory.php', 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\CMDBChangeOp\\CMDBChangeOpAttachmentAddedFactory' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/CMDBChangeOp/CMDBChangeOpAttachmentAddedFactory.php', @@ -270,8 +267,13 @@ return array( 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\CaseLogEntryForm\\CaseLogEntryForm' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/CaseLogEntryForm/CaseLogEntryForm.php', 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\CaseLogEntryForm\\CaseLogEntryFormFactory' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/CaseLogEntryForm/CaseLogEntryFormFactory.php', 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Dashboard\\DashboardColumn' => $baseDir . '/sources/Application/UI/Base/Layout/Dashboard/DashboardColumn.php', + 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Dashboard\\DashboardGrid' => $baseDir . '/sources/Application/UI/Base/Layout/Dashboard/DashboardGrid.php', + 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Dashboard\\DashboardGridSlot' => $baseDir . '/sources/Application/UI/Base/Layout/Dashboard/DashboardGridSlot.php', 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Dashboard\\DashboardLayout' => $baseDir . '/sources/Application/UI/Base/Layout/Dashboard/DashboardLayout.php', 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Dashboard\\DashboardRow' => $baseDir . '/sources/Application/UI/Base/Layout/Dashboard/DashboardRow.php', + 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\DashletPanel\\DashletEntry' => $baseDir . '/sources/Application/UI/Base/Layout/DashletPanel/DashletEntry.php', + 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\DashletPanel\\DashletPanel' => $baseDir . '/sources/Application/UI/Base/Layout/DashletPanel/DashletPanel.php', + 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\DashletPanel\\DashletPanelFactory' => $baseDir . '/sources/Application/UI/Base/Layout/DashletPanel/DashletPanelFactory.php', 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\MultiColumn\\Column\\Column' => $baseDir . '/sources/Application/UI/Base/Layout/MultiColumn/Column/Column.php', 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\MultiColumn\\Column\\ColumnUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Layout/MultiColumn/Column/ColumnUIBlockFactory.php', 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\MultiColumn\\MultiColumn' => $baseDir . '/sources/Application/UI/Base/Layout/MultiColumn/MultiColumn.php', @@ -344,8 +346,8 @@ return array( 'Combodo\\iTop\\Controller\\AbstractController' => $baseDir . '/sources/Controller/AbstractController.php', 'Combodo\\iTop\\Controller\\AjaxRenderController' => $baseDir . '/sources/Controller/AjaxRenderController.php', 'Combodo\\iTop\\Controller\\Base\\Layout\\ActivityPanelController' => $baseDir . '/sources/Controller/Base/Layout/ActivityPanelController.php', + 'Combodo\\iTop\\Controller\\Base\\Layout\\DashboardController' => $baseDir . '/sources/Controller/Base/Layout/DashboardController.php', 'Combodo\\iTop\\Controller\\Base\\Layout\\ObjectController' => $baseDir . '/sources/Controller/Base/Layout/ObjectController.php', - 'Combodo\\iTop\\Controller\\Base\\Layout\\OqlController' => $baseDir . '/sources/Controller/Base/Layout/OqlController.php', 'Combodo\\iTop\\Controller\\Links\\LinkSetController' => $baseDir . '/sources/Controller/Links/LinkSetController.php', 'Combodo\\iTop\\Controller\\Newsroom\\iTopNewsroomController' => $baseDir . '/sources/Controller/Newsroom/iTopNewsroomController.php', 'Combodo\\iTop\\Controller\\Notifications\\ActionController' => $baseDir . '/sources/Controller/Notifications/ActionController.php', @@ -478,113 +480,8 @@ return array( 'Combodo\\iTop\\Form\\Validator\\MultipleChoicesValidator' => $baseDir . '/sources/Form/Validator/MultipleChoicesValidator.php', 'Combodo\\iTop\\Form\\Validator\\NotEmptyExtKeyValidator' => $baseDir . '/sources/Form/Validator/NotEmptyExtKeyValidator.php', 'Combodo\\iTop\\Form\\Validator\\SelectObjectValidator' => $baseDir . '/sources/Form/Validator/SelectObjectValidator.php', - 'Combodo\\iTop\\Forms\\Block\\AbstractFormBlock' => $baseDir . '/sources/Forms/Block/AbstractFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\AbstractTypeFormBlock' => $baseDir . '/sources/Forms/Block/AbstractTypeFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\CheckboxFormBlock' => $baseDir . '/sources/Forms/Block/Base/CheckboxFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\ChoiceFormBlock' => $baseDir . '/sources/Forms/Block/Base/ChoiceFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\ChoiceFromInputsBlock' => $baseDir . '/sources/Forms/Block/Base/ChoiceFromInputsBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\CollectionBlock' => $baseDir . '/sources/Forms/Block/Base/CollectionBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\DateFormBlock' => $baseDir . '/sources/Forms/Block/Base/DateFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\DateTimeFormBlock' => $baseDir . '/sources/Forms/Block/Base/DateTimeFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\FormBlock' => $baseDir . '/sources/Forms/Block/Base/FormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\HiddenFormBlock' => $baseDir . '/sources/Forms/Block/Base/HiddenFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\IntegerFormBlock' => $baseDir . '/sources/Forms/Block/Base/IntegerFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\NumberFormBlock' => $baseDir . '/sources/Forms/Block/Base/NumberFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\TextAreaFormBlock' => $baseDir . '/sources/Forms/Block/Base/TextAreaFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\TextFormBlock' => $baseDir . '/sources/Forms/Block/Base/TextFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\DataModel\\AttributeChoiceFormBlock' => $baseDir . '/sources/Forms/Block/DataModel/AttributeChoiceFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\DataModel\\AttributeTypeChoiceFormBlock' => $baseDir . '/sources/Forms/Block/DataModel/AttributeTypeChoiceFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\DataModel\\AttributeValueChoiceFormBlock' => $baseDir . '/sources/Forms/Block/DataModel/AttributeValueChoiceFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\DataModel\\Dashlet\\AggregateFunctionFormBlock' => $baseDir . '/sources/Forms/Block/DataModel/Dashlet/AggregateFunctionFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\DataModel\\Dashlet\\ClassAttributeGroupByFormBlock' => $baseDir . '/sources/Forms/Block/DataModel/Dashlet/ClassAttributeGroupByFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\DataModel\\LabelFormBlock' => $baseDir . '/sources/Forms/Block/DataModel/LabelFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\DataModel\\OqlFormBlock' => $baseDir . '/sources/Forms/Block/DataModel/OqlFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Expression\\AbstractExpressionFormBlock' => $baseDir . '/sources/Forms/Block/Expression/AbstractExpressionFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Expression\\BooleanExpressionFormBlock' => $baseDir . '/sources/Forms/Block/Expression/BooleanExpressionFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Expression\\NumberExpressionFormBlock' => $baseDir . '/sources/Forms/Block/Expression/NumberExpressionFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Expression\\StringExpressionFormBlock' => $baseDir . '/sources/Forms/Block/Expression/StringExpressionFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\FormBlockException' => $baseDir . '/sources/Forms/Block/FormBlockException.php', - 'Combodo\\iTop\\Forms\\Block\\FormBlockHelper' => $baseDir . '/sources/Forms/Block/FormBlockHelper.php', - 'Combodo\\iTop\\Forms\\Block\\FormBlockService' => $baseDir . '/sources/Forms/Block/FormBlockService.php', - 'Combodo\\iTop\\Forms\\Block\\IFormBlock' => $baseDir . '/sources/Forms/Block/IFormBlock.php', - 'Combodo\\iTop\\Forms\\Controller\\FormsController' => $baseDir . '/sources/Forms/Controller/FormsController.php', - 'Combodo\\iTop\\Forms\\FormBuilder\\DependencyHandler' => $baseDir . '/sources/Forms/FormBuilder/DependencyHandler.php', - 'Combodo\\iTop\\Forms\\FormBuilder\\DependencyMap' => $baseDir . '/sources/Forms/FormBuilder/DependencyMap.php', - 'Combodo\\iTop\\Forms\\FormBuilder\\FormBuilder' => $baseDir . '/sources/Forms/FormBuilder/FormBuilder.php', - 'Combodo\\iTop\\Forms\\FormBuilder\\FormBuilderException' => $baseDir . '/sources/Forms/FormBuilder/FormBuilderException.php', - 'Combodo\\iTop\\Forms\\FormBuilder\\FormHelper' => $baseDir . '/sources/Forms/FormBuilder/FormHelper.php', - 'Combodo\\iTop\\Forms\\FormBuilder\\FormTypeExtension' => $baseDir . '/sources/Forms/FormBuilder/FormTypeExtension.php', - 'Combodo\\iTop\\Forms\\FormBuilder\\ResolvedFormType' => $baseDir . '/sources/Forms/FormBuilder/ResolvedFormType.php', - 'Combodo\\iTop\\Forms\\FormBuilder\\ResolvedFormTypeFactory' => $baseDir . '/sources/Forms/FormBuilder/ResolvedFormTypeFactory.php', - 'Combodo\\iTop\\Forms\\FormType\\Base\\ChoiceFormType' => $baseDir . '/sources/Forms/FormType/Base/ChoiceFormType.php', - 'Combodo\\iTop\\Forms\\FormType\\Base\\CollectionFormType' => $baseDir . '/sources/Forms/FormType/Base/CollectionFormType.php', - 'Combodo\\iTop\\Forms\\FormType\\Base\\FormType' => $baseDir . '/sources/Forms/FormType/Base/FormType.php', - 'Combodo\\iTop\\Forms\\FormType\\DataModel\\OqlFormType' => $baseDir . '/sources/Forms/FormType/DataModel/OqlFormType.php', - 'Combodo\\iTop\\Forms\\FormType\\FormTypeHelper' => $baseDir . '/sources/Forms/FormType/FormTypeHelper.php', - 'Combodo\\iTop\\Forms\\Forms' => $baseDir . '/sources/Forms/Forms.php', - 'Combodo\\iTop\\Forms\\FormsException' => $baseDir . '/sources/Forms/FormsException.php', - 'Combodo\\iTop\\Forms\\IO\\AbstractFormIO' => $baseDir . '/sources/Forms/IO/AbstractFormIO.php', - 'Combodo\\iTop\\Forms\\IO\\Converter\\AbstractConverter' => $baseDir . '/sources/Forms/IO/Converter/AbstractConverter.php', - 'Combodo\\iTop\\Forms\\IO\\Converter\\ChoiceValueToLabelConverter' => $baseDir . '/sources/Forms/IO/Converter/ChoiceValueToLabelConverter.php', - 'Combodo\\iTop\\Forms\\IO\\Converter\\CollectionToCountConverter' => $baseDir . '/sources/Forms/IO/Converter/CollectionToCountConverter.php', - 'Combodo\\iTop\\Forms\\IO\\Converter\\OqlToClassConverter' => $baseDir . '/sources/Forms/IO/Converter/OqlToClassConverter.php', - 'Combodo\\iTop\\Forms\\IO\\FormBinding' => $baseDir . '/sources/Forms/IO/FormBinding.php', - 'Combodo\\iTop\\Forms\\IO\\FormBlockIOException' => $baseDir . '/sources/Forms/IO/FormBlockIOException.php', - 'Combodo\\iTop\\Forms\\IO\\FormInput' => $baseDir . '/sources/Forms/IO/FormInput.php', - 'Combodo\\iTop\\Forms\\IO\\FormOutput' => $baseDir . '/sources/Forms/IO/FormOutput.php', - 'Combodo\\iTop\\Forms\\IO\\Format\\AbstractIOFormat' => $baseDir . '/sources/Forms/IO/Format/AbstractIOFormat.php', - 'Combodo\\iTop\\Forms\\IO\\Format\\AttributeIOFormat' => $baseDir . '/sources/Forms/IO/Format/AttributeIOFormat.php', - 'Combodo\\iTop\\Forms\\IO\\Format\\AttributeTypeArrayIOFormat' => $baseDir . '/sources/Forms/IO/Format/AttributeTypeArrayIOFormat.php', - 'Combodo\\iTop\\Forms\\IO\\Format\\AttributeTypeIOFormat' => $baseDir . '/sources/Forms/IO/Format/AttributeTypeIOFormat.php', - 'Combodo\\iTop\\Forms\\IO\\Format\\BooleanIOFormat' => $baseDir . '/sources/Forms/IO/Format/BooleanIOFormat.php', - 'Combodo\\iTop\\Forms\\IO\\Format\\ClassIOFormat' => $baseDir . '/sources/Forms/IO/Format/ClassIOFormat.php', - 'Combodo\\iTop\\Forms\\IO\\Format\\IntegerIOFormat' => $baseDir . '/sources/Forms/IO/Format/IntegerIOFormat.php', - 'Combodo\\iTop\\Forms\\IO\\Format\\NumberIOFormat' => $baseDir . '/sources/Forms/IO/Format/NumberIOFormat.php', - 'Combodo\\iTop\\Forms\\IO\\Format\\StringIOFormat' => $baseDir . '/sources/Forms/IO/Format/StringIOFormat.php', - 'Combodo\\iTop\\Forms\\Register\\IORegister' => $baseDir . '/sources/Forms/Register/IORegister.php', - 'Combodo\\iTop\\Forms\\Register\\Option' => $baseDir . '/sources/Forms/Register/Option.php', - 'Combodo\\iTop\\Forms\\Register\\OptionsRegister' => $baseDir . '/sources/Forms/Register/OptionsRegister.php', - 'Combodo\\iTop\\Forms\\Register\\RegisterException' => $baseDir . '/sources/Forms/Register/RegisterException.php', 'Combodo\\iTop\\Forms\\Twig\\Extension\\FormCompatibilityExtension' => $baseDir . '/sources/Forms/Twig/Extension/FormCompatibilityExtension.php', - 'Combodo\\iTop\\Forms\\Validator\\AttributeExist' => $baseDir . '/sources/Forms/Validator/AttributeExist.php', - 'Combodo\\iTop\\Forms\\Validator\\AttributeExistValidator' => $baseDir . '/sources/Forms/Validator/AttributeExistValidator.php', 'Combodo\\iTop\\PhpParser\\Evaluation\\PhpExpressionEvaluator' => $baseDir . '/sources/PhpParser/Evaluation/PhpExpressionEvaluator.php', - 'Combodo\\iTop\\PropertyType\\Compiler\\PropertyTypeCompiler' => $baseDir . '/sources/PropertyType/Compiler/PropertyTypeCompiler.php', - 'Combodo\\iTop\\PropertyType\\Compiler\\PropertyTypeCompilerException' => $baseDir . '/sources/PropertyType/Compiler/PropertyTypeCompilerException.php', - 'Combodo\\iTop\\PropertyType\\PropertyType' => $baseDir . '/sources/PropertyType/PropertyType.php', - 'Combodo\\iTop\\PropertyType\\PropertyTypeDesign' => $baseDir . '/sources/PropertyType/PropertyTypeDesign.php', - 'Combodo\\iTop\\PropertyType\\PropertyTypeException' => $baseDir . '/sources/PropertyType/PropertyTypeException.php', - 'Combodo\\iTop\\PropertyType\\PropertyTypeFactory' => $baseDir . '/sources/PropertyType/PropertyTypeFactory.php', - 'Combodo\\iTop\\PropertyType\\PropertyTypeService' => $baseDir . '/sources/PropertyType/PropertyTypeService.php', - 'Combodo\\iTop\\PropertyType\\Serializer\\SerializerException' => $baseDir . '/sources/PropertyType/Serializer/SerializerException.php', - 'Combodo\\iTop\\PropertyType\\Serializer\\XMLFormat\\AbstractXMLFormat' => $baseDir . '/sources/PropertyType/Serializer/XMLFormat/AbstractXMLFormat.php', - 'Combodo\\iTop\\PropertyType\\Serializer\\XMLFormat\\XMLFormatCSV' => $baseDir . '/sources/PropertyType/Serializer/XMLFormat/XMLFormatCSV.php', - 'Combodo\\iTop\\PropertyType\\Serializer\\XMLFormat\\XMLFormatFactory' => $baseDir . '/sources/PropertyType/Serializer/XMLFormat/XMLFormatFactory.php', - 'Combodo\\iTop\\PropertyType\\Serializer\\XMLFormat\\XMLFormatFlatArray' => $baseDir . '/sources/PropertyType/Serializer/XMLFormat/XMLFormatFlatArray.php', - 'Combodo\\iTop\\PropertyType\\Serializer\\XMLFormat\\XMLFormatValueAsId' => $baseDir . '/sources/PropertyType/Serializer/XMLFormat/XMLFormatValueAsId.php', - 'Combodo\\iTop\\PropertyType\\Serializer\\XMLSerializer' => $baseDir . '/sources/PropertyType/Serializer/XMLSerializer.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\AbstractValueType' => $baseDir . '/sources/PropertyType/ValueType/AbstractValueType.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Branch\\AbstractBranchValueType' => $baseDir . '/sources/PropertyType/ValueType/Branch/AbstractBranchValueType.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Branch\\ValueTypeCollection' => $baseDir . '/sources/PropertyType/ValueType/Branch/ValueTypeCollection.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Branch\\ValueTypePropertyTree' => $baseDir . '/sources/PropertyType/ValueType/Branch/ValueTypePropertyTree.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\AbstractLeafValueType' => $baseDir . '/sources/PropertyType/ValueType/Leaf/AbstractLeafValueType.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeAggregateFunction' => $baseDir . '/sources/PropertyType/ValueType/Leaf/ValueTypeAggregateFunction.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeBoolean' => $baseDir . '/sources/PropertyType/ValueType/Leaf/ValueTypeBoolean.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeChoice' => $baseDir . '/sources/PropertyType/ValueType/Leaf/ValueTypeChoice.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeChoiceFromInput' => $baseDir . '/sources/PropertyType/ValueType/Leaf/ValueTypeChoiceFromInput.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeClass' => $baseDir . '/sources/PropertyType/ValueType/Leaf/ValueTypeClass.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeClassAttribute' => $baseDir . '/sources/PropertyType/ValueType/Leaf/ValueTypeClassAttribute.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeClassAttributeGroupBy' => $baseDir . '/sources/PropertyType/ValueType/Leaf/ValueTypeClassAttributeGroupBy.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeClassAttributeValue' => $baseDir . '/sources/PropertyType/ValueType/Leaf/ValueTypeClassAttributeValue.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeCollectionOfValues' => $baseDir . '/sources/PropertyType/ValueType/Leaf/ValueTypeCollectionOfValues.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeIcon' => $baseDir . '/sources/PropertyType/ValueType/Leaf/ValueTypeIcon.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeInteger' => $baseDir . '/sources/PropertyType/ValueType/Leaf/ValueTypeInteger.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeLabel' => $baseDir . '/sources/PropertyType/ValueType/Leaf/ValueTypeLabel.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeOQL' => $baseDir . '/sources/PropertyType/ValueType/Leaf/ValueTypeOQL.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeProfileName' => $baseDir . '/sources/PropertyType/ValueType/Leaf/ValueTypeProfileName.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeString' => $baseDir . '/sources/PropertyType/ValueType/Leaf/ValueTypeString.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeText' => $baseDir . '/sources/PropertyType/ValueType/Leaf/ValueTypeText.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\ValueTypeFactory' => $baseDir . '/sources/PropertyType/ValueType/ValueTypeFactory.php', 'Combodo\\iTop\\Renderer\\BlockRenderer' => $baseDir . '/sources/Renderer/BlockRenderer.php', 'Combodo\\iTop\\Renderer\\Bootstrap\\BsFieldRendererMappings' => $baseDir . '/sources/Renderer/Bootstrap/BsFieldRendererMappings.php', 'Combodo\\iTop\\Renderer\\Bootstrap\\BsFormRenderer' => $baseDir . '/sources/Renderer/Bootstrap/BsFormRenderer.php', @@ -607,8 +504,7 @@ return array( 'Combodo\\iTop\\Service\\Base\\ObjectRepository' => $baseDir . '/sources/Service/Base/ObjectRepository.php', 'Combodo\\iTop\\Service\\Base\\iDataPostProcessor' => $baseDir . '/sources/Service/Base/iDataPostProcessor.php', 'Combodo\\iTop\\Service\\Cache\\DataModelDependantCache' => $baseDir . '/sources/Service/Cache/DataModelDependantCache.php', - 'Combodo\\iTop\\Service\\DependencyInjection\\DIException' => $baseDir . '/sources/Service/DependencyInjection/DIException.php', - 'Combodo\\iTop\\Service\\DependencyInjection\\ServiceLocator' => $baseDir . '/sources/Service/DependencyInjection/ServiceLocator.php', + 'Combodo\\iTop\\Service\\Dashboard\\DashletService' => $baseDir . '/sources/Service/Dashboard/DashletService.php', 'Combodo\\iTop\\Service\\Events\\Description\\EventDataDescription' => $baseDir . '/sources/Service/Events/Description/EventDataDescription.php', 'Combodo\\iTop\\Service\\Events\\Description\\EventDescription' => $baseDir . '/sources/Service/Events/Description/EventDescription.php', 'Combodo\\iTop\\Service\\Events\\EventData' => $baseDir . '/sources/Service/Events/EventData.php', @@ -3183,227 +3079,6 @@ return array( 'Symfony\\Component\\String\\Slugger\\AsciiSlugger' => $vendorDir . '/symfony/string/Slugger/AsciiSlugger.php', 'Symfony\\Component\\String\\Slugger\\SluggerInterface' => $vendorDir . '/symfony/string/Slugger/SluggerInterface.php', 'Symfony\\Component\\String\\UnicodeString' => $vendorDir . '/symfony/string/UnicodeString.php', - 'Symfony\\Component\\Validator\\Attribute\\HasNamedArguments' => $vendorDir . '/symfony/validator/Attribute/HasNamedArguments.php', - 'Symfony\\Component\\Validator\\Command\\DebugCommand' => $vendorDir . '/symfony/validator/Command/DebugCommand.php', - 'Symfony\\Component\\Validator\\Constraint' => $vendorDir . '/symfony/validator/Constraint.php', - 'Symfony\\Component\\Validator\\ConstraintValidator' => $vendorDir . '/symfony/validator/ConstraintValidator.php', - 'Symfony\\Component\\Validator\\ConstraintValidatorFactory' => $vendorDir . '/symfony/validator/ConstraintValidatorFactory.php', - 'Symfony\\Component\\Validator\\ConstraintValidatorFactoryInterface' => $vendorDir . '/symfony/validator/ConstraintValidatorFactoryInterface.php', - 'Symfony\\Component\\Validator\\ConstraintValidatorInterface' => $vendorDir . '/symfony/validator/ConstraintValidatorInterface.php', - 'Symfony\\Component\\Validator\\ConstraintViolation' => $vendorDir . '/symfony/validator/ConstraintViolation.php', - 'Symfony\\Component\\Validator\\ConstraintViolationInterface' => $vendorDir . '/symfony/validator/ConstraintViolationInterface.php', - 'Symfony\\Component\\Validator\\ConstraintViolationList' => $vendorDir . '/symfony/validator/ConstraintViolationList.php', - 'Symfony\\Component\\Validator\\ConstraintViolationListInterface' => $vendorDir . '/symfony/validator/ConstraintViolationListInterface.php', - 'Symfony\\Component\\Validator\\Constraints\\AbstractComparison' => $vendorDir . '/symfony/validator/Constraints/AbstractComparison.php', - 'Symfony\\Component\\Validator\\Constraints\\AbstractComparisonValidator' => $vendorDir . '/symfony/validator/Constraints/AbstractComparisonValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\All' => $vendorDir . '/symfony/validator/Constraints/All.php', - 'Symfony\\Component\\Validator\\Constraints\\AllValidator' => $vendorDir . '/symfony/validator/Constraints/AllValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\AtLeastOneOf' => $vendorDir . '/symfony/validator/Constraints/AtLeastOneOf.php', - 'Symfony\\Component\\Validator\\Constraints\\AtLeastOneOfValidator' => $vendorDir . '/symfony/validator/Constraints/AtLeastOneOfValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Bic' => $vendorDir . '/symfony/validator/Constraints/Bic.php', - 'Symfony\\Component\\Validator\\Constraints\\BicValidator' => $vendorDir . '/symfony/validator/Constraints/BicValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Blank' => $vendorDir . '/symfony/validator/Constraints/Blank.php', - 'Symfony\\Component\\Validator\\Constraints\\BlankValidator' => $vendorDir . '/symfony/validator/Constraints/BlankValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Callback' => $vendorDir . '/symfony/validator/Constraints/Callback.php', - 'Symfony\\Component\\Validator\\Constraints\\CallbackValidator' => $vendorDir . '/symfony/validator/Constraints/CallbackValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\CardScheme' => $vendorDir . '/symfony/validator/Constraints/CardScheme.php', - 'Symfony\\Component\\Validator\\Constraints\\CardSchemeValidator' => $vendorDir . '/symfony/validator/Constraints/CardSchemeValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Cascade' => $vendorDir . '/symfony/validator/Constraints/Cascade.php', - 'Symfony\\Component\\Validator\\Constraints\\Choice' => $vendorDir . '/symfony/validator/Constraints/Choice.php', - 'Symfony\\Component\\Validator\\Constraints\\ChoiceValidator' => $vendorDir . '/symfony/validator/Constraints/ChoiceValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Cidr' => $vendorDir . '/symfony/validator/Constraints/Cidr.php', - 'Symfony\\Component\\Validator\\Constraints\\CidrValidator' => $vendorDir . '/symfony/validator/Constraints/CidrValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Collection' => $vendorDir . '/symfony/validator/Constraints/Collection.php', - 'Symfony\\Component\\Validator\\Constraints\\CollectionValidator' => $vendorDir . '/symfony/validator/Constraints/CollectionValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Composite' => $vendorDir . '/symfony/validator/Constraints/Composite.php', - 'Symfony\\Component\\Validator\\Constraints\\Compound' => $vendorDir . '/symfony/validator/Constraints/Compound.php', - 'Symfony\\Component\\Validator\\Constraints\\CompoundValidator' => $vendorDir . '/symfony/validator/Constraints/CompoundValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Count' => $vendorDir . '/symfony/validator/Constraints/Count.php', - 'Symfony\\Component\\Validator\\Constraints\\CountValidator' => $vendorDir . '/symfony/validator/Constraints/CountValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Country' => $vendorDir . '/symfony/validator/Constraints/Country.php', - 'Symfony\\Component\\Validator\\Constraints\\CountryValidator' => $vendorDir . '/symfony/validator/Constraints/CountryValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\CssColor' => $vendorDir . '/symfony/validator/Constraints/CssColor.php', - 'Symfony\\Component\\Validator\\Constraints\\CssColorValidator' => $vendorDir . '/symfony/validator/Constraints/CssColorValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Currency' => $vendorDir . '/symfony/validator/Constraints/Currency.php', - 'Symfony\\Component\\Validator\\Constraints\\CurrencyValidator' => $vendorDir . '/symfony/validator/Constraints/CurrencyValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Date' => $vendorDir . '/symfony/validator/Constraints/Date.php', - 'Symfony\\Component\\Validator\\Constraints\\DateTime' => $vendorDir . '/symfony/validator/Constraints/DateTime.php', - 'Symfony\\Component\\Validator\\Constraints\\DateTimeValidator' => $vendorDir . '/symfony/validator/Constraints/DateTimeValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\DateValidator' => $vendorDir . '/symfony/validator/Constraints/DateValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\DisableAutoMapping' => $vendorDir . '/symfony/validator/Constraints/DisableAutoMapping.php', - 'Symfony\\Component\\Validator\\Constraints\\DivisibleBy' => $vendorDir . '/symfony/validator/Constraints/DivisibleBy.php', - 'Symfony\\Component\\Validator\\Constraints\\DivisibleByValidator' => $vendorDir . '/symfony/validator/Constraints/DivisibleByValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Email' => $vendorDir . '/symfony/validator/Constraints/Email.php', - 'Symfony\\Component\\Validator\\Constraints\\EmailValidator' => $vendorDir . '/symfony/validator/Constraints/EmailValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\EnableAutoMapping' => $vendorDir . '/symfony/validator/Constraints/EnableAutoMapping.php', - 'Symfony\\Component\\Validator\\Constraints\\EqualTo' => $vendorDir . '/symfony/validator/Constraints/EqualTo.php', - 'Symfony\\Component\\Validator\\Constraints\\EqualToValidator' => $vendorDir . '/symfony/validator/Constraints/EqualToValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Existence' => $vendorDir . '/symfony/validator/Constraints/Existence.php', - 'Symfony\\Component\\Validator\\Constraints\\Expression' => $vendorDir . '/symfony/validator/Constraints/Expression.php', - 'Symfony\\Component\\Validator\\Constraints\\ExpressionLanguageProvider' => $vendorDir . '/symfony/validator/Constraints/ExpressionLanguageProvider.php', - 'Symfony\\Component\\Validator\\Constraints\\ExpressionLanguageSyntax' => $vendorDir . '/symfony/validator/Constraints/ExpressionLanguageSyntax.php', - 'Symfony\\Component\\Validator\\Constraints\\ExpressionLanguageSyntaxValidator' => $vendorDir . '/symfony/validator/Constraints/ExpressionLanguageSyntaxValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\ExpressionSyntax' => $vendorDir . '/symfony/validator/Constraints/ExpressionSyntax.php', - 'Symfony\\Component\\Validator\\Constraints\\ExpressionSyntaxValidator' => $vendorDir . '/symfony/validator/Constraints/ExpressionSyntaxValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\ExpressionValidator' => $vendorDir . '/symfony/validator/Constraints/ExpressionValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\File' => $vendorDir . '/symfony/validator/Constraints/File.php', - 'Symfony\\Component\\Validator\\Constraints\\FileValidator' => $vendorDir . '/symfony/validator/Constraints/FileValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\GreaterThan' => $vendorDir . '/symfony/validator/Constraints/GreaterThan.php', - 'Symfony\\Component\\Validator\\Constraints\\GreaterThanOrEqual' => $vendorDir . '/symfony/validator/Constraints/GreaterThanOrEqual.php', - 'Symfony\\Component\\Validator\\Constraints\\GreaterThanOrEqualValidator' => $vendorDir . '/symfony/validator/Constraints/GreaterThanOrEqualValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\GreaterThanValidator' => $vendorDir . '/symfony/validator/Constraints/GreaterThanValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\GroupSequence' => $vendorDir . '/symfony/validator/Constraints/GroupSequence.php', - 'Symfony\\Component\\Validator\\Constraints\\GroupSequenceProvider' => $vendorDir . '/symfony/validator/Constraints/GroupSequenceProvider.php', - 'Symfony\\Component\\Validator\\Constraints\\Hostname' => $vendorDir . '/symfony/validator/Constraints/Hostname.php', - 'Symfony\\Component\\Validator\\Constraints\\HostnameValidator' => $vendorDir . '/symfony/validator/Constraints/HostnameValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Iban' => $vendorDir . '/symfony/validator/Constraints/Iban.php', - 'Symfony\\Component\\Validator\\Constraints\\IbanValidator' => $vendorDir . '/symfony/validator/Constraints/IbanValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\IdenticalTo' => $vendorDir . '/symfony/validator/Constraints/IdenticalTo.php', - 'Symfony\\Component\\Validator\\Constraints\\IdenticalToValidator' => $vendorDir . '/symfony/validator/Constraints/IdenticalToValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Image' => $vendorDir . '/symfony/validator/Constraints/Image.php', - 'Symfony\\Component\\Validator\\Constraints\\ImageValidator' => $vendorDir . '/symfony/validator/Constraints/ImageValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Ip' => $vendorDir . '/symfony/validator/Constraints/Ip.php', - 'Symfony\\Component\\Validator\\Constraints\\IpValidator' => $vendorDir . '/symfony/validator/Constraints/IpValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\IsFalse' => $vendorDir . '/symfony/validator/Constraints/IsFalse.php', - 'Symfony\\Component\\Validator\\Constraints\\IsFalseValidator' => $vendorDir . '/symfony/validator/Constraints/IsFalseValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\IsNull' => $vendorDir . '/symfony/validator/Constraints/IsNull.php', - 'Symfony\\Component\\Validator\\Constraints\\IsNullValidator' => $vendorDir . '/symfony/validator/Constraints/IsNullValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\IsTrue' => $vendorDir . '/symfony/validator/Constraints/IsTrue.php', - 'Symfony\\Component\\Validator\\Constraints\\IsTrueValidator' => $vendorDir . '/symfony/validator/Constraints/IsTrueValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Isbn' => $vendorDir . '/symfony/validator/Constraints/Isbn.php', - 'Symfony\\Component\\Validator\\Constraints\\IsbnValidator' => $vendorDir . '/symfony/validator/Constraints/IsbnValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Isin' => $vendorDir . '/symfony/validator/Constraints/Isin.php', - 'Symfony\\Component\\Validator\\Constraints\\IsinValidator' => $vendorDir . '/symfony/validator/Constraints/IsinValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Issn' => $vendorDir . '/symfony/validator/Constraints/Issn.php', - 'Symfony\\Component\\Validator\\Constraints\\IssnValidator' => $vendorDir . '/symfony/validator/Constraints/IssnValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Json' => $vendorDir . '/symfony/validator/Constraints/Json.php', - 'Symfony\\Component\\Validator\\Constraints\\JsonValidator' => $vendorDir . '/symfony/validator/Constraints/JsonValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Language' => $vendorDir . '/symfony/validator/Constraints/Language.php', - 'Symfony\\Component\\Validator\\Constraints\\LanguageValidator' => $vendorDir . '/symfony/validator/Constraints/LanguageValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Length' => $vendorDir . '/symfony/validator/Constraints/Length.php', - 'Symfony\\Component\\Validator\\Constraints\\LengthValidator' => $vendorDir . '/symfony/validator/Constraints/LengthValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\LessThan' => $vendorDir . '/symfony/validator/Constraints/LessThan.php', - 'Symfony\\Component\\Validator\\Constraints\\LessThanOrEqual' => $vendorDir . '/symfony/validator/Constraints/LessThanOrEqual.php', - 'Symfony\\Component\\Validator\\Constraints\\LessThanOrEqualValidator' => $vendorDir . '/symfony/validator/Constraints/LessThanOrEqualValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\LessThanValidator' => $vendorDir . '/symfony/validator/Constraints/LessThanValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Locale' => $vendorDir . '/symfony/validator/Constraints/Locale.php', - 'Symfony\\Component\\Validator\\Constraints\\LocaleValidator' => $vendorDir . '/symfony/validator/Constraints/LocaleValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Luhn' => $vendorDir . '/symfony/validator/Constraints/Luhn.php', - 'Symfony\\Component\\Validator\\Constraints\\LuhnValidator' => $vendorDir . '/symfony/validator/Constraints/LuhnValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Negative' => $vendorDir . '/symfony/validator/Constraints/Negative.php', - 'Symfony\\Component\\Validator\\Constraints\\NegativeOrZero' => $vendorDir . '/symfony/validator/Constraints/NegativeOrZero.php', - 'Symfony\\Component\\Validator\\Constraints\\NoSuspiciousCharacters' => $vendorDir . '/symfony/validator/Constraints/NoSuspiciousCharacters.php', - 'Symfony\\Component\\Validator\\Constraints\\NoSuspiciousCharactersValidator' => $vendorDir . '/symfony/validator/Constraints/NoSuspiciousCharactersValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\NotBlank' => $vendorDir . '/symfony/validator/Constraints/NotBlank.php', - 'Symfony\\Component\\Validator\\Constraints\\NotBlankValidator' => $vendorDir . '/symfony/validator/Constraints/NotBlankValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\NotCompromisedPassword' => $vendorDir . '/symfony/validator/Constraints/NotCompromisedPassword.php', - 'Symfony\\Component\\Validator\\Constraints\\NotCompromisedPasswordValidator' => $vendorDir . '/symfony/validator/Constraints/NotCompromisedPasswordValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\NotEqualTo' => $vendorDir . '/symfony/validator/Constraints/NotEqualTo.php', - 'Symfony\\Component\\Validator\\Constraints\\NotEqualToValidator' => $vendorDir . '/symfony/validator/Constraints/NotEqualToValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\NotIdenticalTo' => $vendorDir . '/symfony/validator/Constraints/NotIdenticalTo.php', - 'Symfony\\Component\\Validator\\Constraints\\NotIdenticalToValidator' => $vendorDir . '/symfony/validator/Constraints/NotIdenticalToValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\NotNull' => $vendorDir . '/symfony/validator/Constraints/NotNull.php', - 'Symfony\\Component\\Validator\\Constraints\\NotNullValidator' => $vendorDir . '/symfony/validator/Constraints/NotNullValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Optional' => $vendorDir . '/symfony/validator/Constraints/Optional.php', - 'Symfony\\Component\\Validator\\Constraints\\PasswordStrength' => $vendorDir . '/symfony/validator/Constraints/PasswordStrength.php', - 'Symfony\\Component\\Validator\\Constraints\\PasswordStrengthValidator' => $vendorDir . '/symfony/validator/Constraints/PasswordStrengthValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Positive' => $vendorDir . '/symfony/validator/Constraints/Positive.php', - 'Symfony\\Component\\Validator\\Constraints\\PositiveOrZero' => $vendorDir . '/symfony/validator/Constraints/PositiveOrZero.php', - 'Symfony\\Component\\Validator\\Constraints\\Range' => $vendorDir . '/symfony/validator/Constraints/Range.php', - 'Symfony\\Component\\Validator\\Constraints\\RangeValidator' => $vendorDir . '/symfony/validator/Constraints/RangeValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Regex' => $vendorDir . '/symfony/validator/Constraints/Regex.php', - 'Symfony\\Component\\Validator\\Constraints\\RegexValidator' => $vendorDir . '/symfony/validator/Constraints/RegexValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Required' => $vendorDir . '/symfony/validator/Constraints/Required.php', - 'Symfony\\Component\\Validator\\Constraints\\Sequentially' => $vendorDir . '/symfony/validator/Constraints/Sequentially.php', - 'Symfony\\Component\\Validator\\Constraints\\SequentiallyValidator' => $vendorDir . '/symfony/validator/Constraints/SequentiallyValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Time' => $vendorDir . '/symfony/validator/Constraints/Time.php', - 'Symfony\\Component\\Validator\\Constraints\\TimeValidator' => $vendorDir . '/symfony/validator/Constraints/TimeValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Timezone' => $vendorDir . '/symfony/validator/Constraints/Timezone.php', - 'Symfony\\Component\\Validator\\Constraints\\TimezoneValidator' => $vendorDir . '/symfony/validator/Constraints/TimezoneValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Traverse' => $vendorDir . '/symfony/validator/Constraints/Traverse.php', - 'Symfony\\Component\\Validator\\Constraints\\Type' => $vendorDir . '/symfony/validator/Constraints/Type.php', - 'Symfony\\Component\\Validator\\Constraints\\TypeValidator' => $vendorDir . '/symfony/validator/Constraints/TypeValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Ulid' => $vendorDir . '/symfony/validator/Constraints/Ulid.php', - 'Symfony\\Component\\Validator\\Constraints\\UlidValidator' => $vendorDir . '/symfony/validator/Constraints/UlidValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Unique' => $vendorDir . '/symfony/validator/Constraints/Unique.php', - 'Symfony\\Component\\Validator\\Constraints\\UniqueValidator' => $vendorDir . '/symfony/validator/Constraints/UniqueValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Url' => $vendorDir . '/symfony/validator/Constraints/Url.php', - 'Symfony\\Component\\Validator\\Constraints\\UrlValidator' => $vendorDir . '/symfony/validator/Constraints/UrlValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Uuid' => $vendorDir . '/symfony/validator/Constraints/Uuid.php', - 'Symfony\\Component\\Validator\\Constraints\\UuidValidator' => $vendorDir . '/symfony/validator/Constraints/UuidValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Valid' => $vendorDir . '/symfony/validator/Constraints/Valid.php', - 'Symfony\\Component\\Validator\\Constraints\\ValidValidator' => $vendorDir . '/symfony/validator/Constraints/ValidValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\When' => $vendorDir . '/symfony/validator/Constraints/When.php', - 'Symfony\\Component\\Validator\\Constraints\\WhenValidator' => $vendorDir . '/symfony/validator/Constraints/WhenValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\ZeroComparisonConstraintTrait' => $vendorDir . '/symfony/validator/Constraints/ZeroComparisonConstraintTrait.php', - 'Symfony\\Component\\Validator\\ContainerConstraintValidatorFactory' => $vendorDir . '/symfony/validator/ContainerConstraintValidatorFactory.php', - 'Symfony\\Component\\Validator\\Context\\ExecutionContext' => $vendorDir . '/symfony/validator/Context/ExecutionContext.php', - 'Symfony\\Component\\Validator\\Context\\ExecutionContextFactory' => $vendorDir . '/symfony/validator/Context/ExecutionContextFactory.php', - 'Symfony\\Component\\Validator\\Context\\ExecutionContextFactoryInterface' => $vendorDir . '/symfony/validator/Context/ExecutionContextFactoryInterface.php', - 'Symfony\\Component\\Validator\\Context\\ExecutionContextInterface' => $vendorDir . '/symfony/validator/Context/ExecutionContextInterface.php', - 'Symfony\\Component\\Validator\\DataCollector\\ValidatorDataCollector' => $vendorDir . '/symfony/validator/DataCollector/ValidatorDataCollector.php', - 'Symfony\\Component\\Validator\\DependencyInjection\\AddAutoMappingConfigurationPass' => $vendorDir . '/symfony/validator/DependencyInjection/AddAutoMappingConfigurationPass.php', - 'Symfony\\Component\\Validator\\DependencyInjection\\AddConstraintValidatorsPass' => $vendorDir . '/symfony/validator/DependencyInjection/AddConstraintValidatorsPass.php', - 'Symfony\\Component\\Validator\\DependencyInjection\\AddValidatorInitializersPass' => $vendorDir . '/symfony/validator/DependencyInjection/AddValidatorInitializersPass.php', - 'Symfony\\Component\\Validator\\Exception\\BadMethodCallException' => $vendorDir . '/symfony/validator/Exception/BadMethodCallException.php', - 'Symfony\\Component\\Validator\\Exception\\ConstraintDefinitionException' => $vendorDir . '/symfony/validator/Exception/ConstraintDefinitionException.php', - 'Symfony\\Component\\Validator\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/validator/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Validator\\Exception\\GroupDefinitionException' => $vendorDir . '/symfony/validator/Exception/GroupDefinitionException.php', - 'Symfony\\Component\\Validator\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/validator/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Validator\\Exception\\InvalidOptionsException' => $vendorDir . '/symfony/validator/Exception/InvalidOptionsException.php', - 'Symfony\\Component\\Validator\\Exception\\LogicException' => $vendorDir . '/symfony/validator/Exception/LogicException.php', - 'Symfony\\Component\\Validator\\Exception\\MappingException' => $vendorDir . '/symfony/validator/Exception/MappingException.php', - 'Symfony\\Component\\Validator\\Exception\\MissingOptionsException' => $vendorDir . '/symfony/validator/Exception/MissingOptionsException.php', - 'Symfony\\Component\\Validator\\Exception\\NoSuchMetadataException' => $vendorDir . '/symfony/validator/Exception/NoSuchMetadataException.php', - 'Symfony\\Component\\Validator\\Exception\\OutOfBoundsException' => $vendorDir . '/symfony/validator/Exception/OutOfBoundsException.php', - 'Symfony\\Component\\Validator\\Exception\\RuntimeException' => $vendorDir . '/symfony/validator/Exception/RuntimeException.php', - 'Symfony\\Component\\Validator\\Exception\\UnexpectedTypeException' => $vendorDir . '/symfony/validator/Exception/UnexpectedTypeException.php', - 'Symfony\\Component\\Validator\\Exception\\UnexpectedValueException' => $vendorDir . '/symfony/validator/Exception/UnexpectedValueException.php', - 'Symfony\\Component\\Validator\\Exception\\UnsupportedMetadataException' => $vendorDir . '/symfony/validator/Exception/UnsupportedMetadataException.php', - 'Symfony\\Component\\Validator\\Exception\\ValidationFailedException' => $vendorDir . '/symfony/validator/Exception/ValidationFailedException.php', - 'Symfony\\Component\\Validator\\Exception\\ValidatorException' => $vendorDir . '/symfony/validator/Exception/ValidatorException.php', - 'Symfony\\Component\\Validator\\GroupProviderInterface' => $vendorDir . '/symfony/validator/GroupProviderInterface.php', - 'Symfony\\Component\\Validator\\GroupSequenceProviderInterface' => $vendorDir . '/symfony/validator/GroupSequenceProviderInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\AutoMappingStrategy' => $vendorDir . '/symfony/validator/Mapping/AutoMappingStrategy.php', - 'Symfony\\Component\\Validator\\Mapping\\CascadingStrategy' => $vendorDir . '/symfony/validator/Mapping/CascadingStrategy.php', - 'Symfony\\Component\\Validator\\Mapping\\ClassMetadata' => $vendorDir . '/symfony/validator/Mapping/ClassMetadata.php', - 'Symfony\\Component\\Validator\\Mapping\\ClassMetadataInterface' => $vendorDir . '/symfony/validator/Mapping/ClassMetadataInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\Factory\\BlackHoleMetadataFactory' => $vendorDir . '/symfony/validator/Mapping/Factory/BlackHoleMetadataFactory.php', - 'Symfony\\Component\\Validator\\Mapping\\Factory\\LazyLoadingMetadataFactory' => $vendorDir . '/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php', - 'Symfony\\Component\\Validator\\Mapping\\Factory\\MetadataFactoryInterface' => $vendorDir . '/symfony/validator/Mapping/Factory/MetadataFactoryInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\GenericMetadata' => $vendorDir . '/symfony/validator/Mapping/GenericMetadata.php', - 'Symfony\\Component\\Validator\\Mapping\\GetterMetadata' => $vendorDir . '/symfony/validator/Mapping/GetterMetadata.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\AbstractLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/AbstractLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\AnnotationLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/AnnotationLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\AttributeLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/AttributeLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\AutoMappingTrait' => $vendorDir . '/symfony/validator/Mapping/Loader/AutoMappingTrait.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\FileLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/FileLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\FilesLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/FilesLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\LoaderChain' => $vendorDir . '/symfony/validator/Mapping/Loader/LoaderChain.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\LoaderInterface' => $vendorDir . '/symfony/validator/Mapping/Loader/LoaderInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\PropertyInfoLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/PropertyInfoLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\StaticMethodLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/StaticMethodLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\XmlFileLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/XmlFileLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\XmlFilesLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/XmlFilesLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\YamlFileLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/YamlFileLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\YamlFilesLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/YamlFilesLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\MemberMetadata' => $vendorDir . '/symfony/validator/Mapping/MemberMetadata.php', - 'Symfony\\Component\\Validator\\Mapping\\MetadataInterface' => $vendorDir . '/symfony/validator/Mapping/MetadataInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\PropertyMetadata' => $vendorDir . '/symfony/validator/Mapping/PropertyMetadata.php', - 'Symfony\\Component\\Validator\\Mapping\\PropertyMetadataInterface' => $vendorDir . '/symfony/validator/Mapping/PropertyMetadataInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\TraversalStrategy' => $vendorDir . '/symfony/validator/Mapping/TraversalStrategy.php', - 'Symfony\\Component\\Validator\\ObjectInitializerInterface' => $vendorDir . '/symfony/validator/ObjectInitializerInterface.php', - 'Symfony\\Component\\Validator\\Util\\PropertyPath' => $vendorDir . '/symfony/validator/Util/PropertyPath.php', - 'Symfony\\Component\\Validator\\Validation' => $vendorDir . '/symfony/validator/Validation.php', - 'Symfony\\Component\\Validator\\ValidatorBuilder' => $vendorDir . '/symfony/validator/ValidatorBuilder.php', - 'Symfony\\Component\\Validator\\Validator\\ContextualValidatorInterface' => $vendorDir . '/symfony/validator/Validator/ContextualValidatorInterface.php', - 'Symfony\\Component\\Validator\\Validator\\LazyProperty' => $vendorDir . '/symfony/validator/Validator/LazyProperty.php', - 'Symfony\\Component\\Validator\\Validator\\RecursiveContextualValidator' => $vendorDir . '/symfony/validator/Validator/RecursiveContextualValidator.php', - 'Symfony\\Component\\Validator\\Validator\\RecursiveValidator' => $vendorDir . '/symfony/validator/Validator/RecursiveValidator.php', - 'Symfony\\Component\\Validator\\Validator\\TraceableValidator' => $vendorDir . '/symfony/validator/Validator/TraceableValidator.php', - 'Symfony\\Component\\Validator\\Validator\\ValidatorInterface' => $vendorDir . '/symfony/validator/Validator/ValidatorInterface.php', - 'Symfony\\Component\\Validator\\Violation\\ConstraintViolationBuilder' => $vendorDir . '/symfony/validator/Violation/ConstraintViolationBuilder.php', - 'Symfony\\Component\\Validator\\Violation\\ConstraintViolationBuilderInterface' => $vendorDir . '/symfony/validator/Violation/ConstraintViolationBuilderInterface.php', 'Symfony\\Component\\VarDumper\\Caster\\AmqpCaster' => $vendorDir . '/symfony/var-dumper/Caster/AmqpCaster.php', 'Symfony\\Component\\VarDumper\\Caster\\ArgsStub' => $vendorDir . '/symfony/var-dumper/Caster/ArgsStub.php', 'Symfony\\Component\\VarDumper\\Caster\\Caster' => $vendorDir . '/symfony/var-dumper/Caster/Caster.php', diff --git a/lib/composer/autoload_static.php b/lib/composer/autoload_static.php index 7d7e438e8..eda1b54fe 100644 --- a/lib/composer/autoload_static.php +++ b/lib/composer/autoload_static.php @@ -28,12 +28,12 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f ); public static $prefixLengthsPsr4 = array ( - 'T' => + 'T' => array ( 'Twig\\' => 5, 'TheNetworg\\OAuth2\\Client\\' => 25, ), - 'S' => + 'S' => array ( 'Symfony\\Polyfill\\Php83\\' => 23, 'Symfony\\Polyfill\\Mbstring\\' => 26, @@ -49,7 +49,6 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'Symfony\\Component\\Yaml\\' => 23, 'Symfony\\Component\\VarExporter\\' => 30, 'Symfony\\Component\\VarDumper\\' => 28, - 'Symfony\\Component\\Validator\\' => 28, 'Symfony\\Component\\String\\' => 25, 'Symfony\\Component\\Stopwatch\\' => 28, 'Symfony\\Component\\Security\\Csrf\\' => 32, @@ -82,7 +81,7 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'ScssPhp\\ScssPhp\\' => 16, 'Sabberworm\\CSS\\' => 15, ), - 'P' => + 'P' => array ( 'Psr\\Log\\' => 8, 'Psr\\Http\\Message\\' => 17, @@ -93,298 +92,294 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'PhpParser\\' => 10, 'Pelago\\Emogrifier\\' => 18, ), - 'L' => + 'L' => array ( 'League\\OAuth2\\Client\\' => 21, ), - 'G' => + 'G' => array ( 'GuzzleHttp\\Psr7\\' => 16, 'GuzzleHttp\\Promise\\' => 19, 'GuzzleHttp\\' => 11, ), - 'F' => + 'F' => array ( 'Firebase\\JWT\\' => 13, ), - 'E' => + 'E' => array ( 'Egulias\\EmailValidator\\' => 23, ), - 'D' => + 'D' => array ( 'Doctrine\\Common\\Lexer\\' => 22, ), ); public static $prefixDirsPsr4 = array ( - 'Twig\\' => + 'Twig\\' => array ( 0 => __DIR__ . '/..' . '/twig/twig/src', ), - 'TheNetworg\\OAuth2\\Client\\' => + 'TheNetworg\\OAuth2\\Client\\' => array ( 0 => __DIR__ . '/..' . '/thenetworg/oauth2-azure/src', ), - 'Symfony\\Polyfill\\Php83\\' => + 'Symfony\\Polyfill\\Php83\\' => array ( 0 => __DIR__ . '/..' . '/symfony/polyfill-php83', ), - 'Symfony\\Polyfill\\Mbstring\\' => + 'Symfony\\Polyfill\\Mbstring\\' => array ( 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', ), - 'Symfony\\Polyfill\\Intl\\Normalizer\\' => + 'Symfony\\Polyfill\\Intl\\Normalizer\\' => array ( 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer', ), - 'Symfony\\Polyfill\\Intl\\Idn\\' => + 'Symfony\\Polyfill\\Intl\\Idn\\' => array ( 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-idn', ), - 'Symfony\\Polyfill\\Intl\\Icu\\' => + 'Symfony\\Polyfill\\Intl\\Icu\\' => array ( 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-icu', ), - 'Symfony\\Polyfill\\Intl\\Grapheme\\' => + 'Symfony\\Polyfill\\Intl\\Grapheme\\' => array ( 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme', ), - 'Symfony\\Polyfill\\Ctype\\' => + 'Symfony\\Polyfill\\Ctype\\' => array ( 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', ), - 'Symfony\\Contracts\\Translation\\' => + 'Symfony\\Contracts\\Translation\\' => array ( 0 => __DIR__ . '/..' . '/symfony/translation-contracts', ), - 'Symfony\\Contracts\\Service\\' => + 'Symfony\\Contracts\\Service\\' => array ( 0 => __DIR__ . '/..' . '/symfony/service-contracts', ), - 'Symfony\\Contracts\\EventDispatcher\\' => + 'Symfony\\Contracts\\EventDispatcher\\' => array ( 0 => __DIR__ . '/..' . '/symfony/event-dispatcher-contracts', ), - 'Symfony\\Contracts\\Cache\\' => + 'Symfony\\Contracts\\Cache\\' => array ( 0 => __DIR__ . '/..' . '/symfony/cache-contracts', ), - 'Symfony\\Component\\Yaml\\' => + 'Symfony\\Component\\Yaml\\' => array ( 0 => __DIR__ . '/..' . '/symfony/yaml', ), - 'Symfony\\Component\\VarExporter\\' => + 'Symfony\\Component\\VarExporter\\' => array ( 0 => __DIR__ . '/..' . '/symfony/var-exporter', ), - 'Symfony\\Component\\VarDumper\\' => + 'Symfony\\Component\\VarDumper\\' => array ( 0 => __DIR__ . '/..' . '/symfony/var-dumper', ), - 'Symfony\\Component\\Validator\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/validator', - ), - 'Symfony\\Component\\String\\' => + 'Symfony\\Component\\String\\' => array ( 0 => __DIR__ . '/..' . '/symfony/string', ), - 'Symfony\\Component\\Stopwatch\\' => + 'Symfony\\Component\\Stopwatch\\' => array ( 0 => __DIR__ . '/..' . '/symfony/stopwatch', ), - 'Symfony\\Component\\Security\\Csrf\\' => + 'Symfony\\Component\\Security\\Csrf\\' => array ( 0 => __DIR__ . '/..' . '/symfony/security-csrf', ), - 'Symfony\\Component\\Security\\Core\\' => + 'Symfony\\Component\\Security\\Core\\' => array ( 0 => __DIR__ . '/..' . '/symfony/security-core', ), - 'Symfony\\Component\\Routing\\' => + 'Symfony\\Component\\Routing\\' => array ( 0 => __DIR__ . '/..' . '/symfony/routing', ), - 'Symfony\\Component\\PropertyInfo\\' => + 'Symfony\\Component\\PropertyInfo\\' => array ( 0 => __DIR__ . '/..' . '/symfony/property-info', ), - 'Symfony\\Component\\PropertyAccess\\' => + 'Symfony\\Component\\PropertyAccess\\' => array ( 0 => __DIR__ . '/..' . '/symfony/property-access', ), - 'Symfony\\Component\\PasswordHasher\\' => + 'Symfony\\Component\\PasswordHasher\\' => array ( 0 => __DIR__ . '/..' . '/symfony/password-hasher', ), - 'Symfony\\Component\\OptionsResolver\\' => + 'Symfony\\Component\\OptionsResolver\\' => array ( 0 => __DIR__ . '/..' . '/symfony/options-resolver', ), - 'Symfony\\Component\\Mime\\' => + 'Symfony\\Component\\Mime\\' => array ( 0 => __DIR__ . '/..' . '/symfony/mime', ), - 'Symfony\\Component\\Mailer\\' => + 'Symfony\\Component\\Mailer\\' => array ( 0 => __DIR__ . '/..' . '/symfony/mailer', ), - 'Symfony\\Component\\HttpKernel\\' => + 'Symfony\\Component\\HttpKernel\\' => array ( 0 => __DIR__ . '/..' . '/symfony/http-kernel', ), - 'Symfony\\Component\\HttpFoundation\\' => + 'Symfony\\Component\\HttpFoundation\\' => array ( 0 => __DIR__ . '/..' . '/symfony/http-foundation', ), - 'Symfony\\Component\\Form\\' => + 'Symfony\\Component\\Form\\' => array ( 0 => __DIR__ . '/..' . '/symfony/form', ), - 'Symfony\\Component\\Finder\\' => + 'Symfony\\Component\\Finder\\' => array ( 0 => __DIR__ . '/..' . '/symfony/finder', ), - 'Symfony\\Component\\Filesystem\\' => + 'Symfony\\Component\\Filesystem\\' => array ( 0 => __DIR__ . '/..' . '/symfony/filesystem', ), - 'Symfony\\Component\\EventDispatcher\\' => + 'Symfony\\Component\\EventDispatcher\\' => array ( 0 => __DIR__ . '/..' . '/symfony/event-dispatcher', ), - 'Symfony\\Component\\ErrorHandler\\' => + 'Symfony\\Component\\ErrorHandler\\' => array ( 0 => __DIR__ . '/..' . '/symfony/error-handler', ), - 'Symfony\\Component\\Dotenv\\' => + 'Symfony\\Component\\Dotenv\\' => array ( 0 => __DIR__ . '/..' . '/symfony/dotenv', ), - 'Symfony\\Component\\DependencyInjection\\' => + 'Symfony\\Component\\DependencyInjection\\' => array ( 0 => __DIR__ . '/..' . '/symfony/dependency-injection', ), - 'Symfony\\Component\\CssSelector\\' => + 'Symfony\\Component\\CssSelector\\' => array ( 0 => __DIR__ . '/..' . '/symfony/css-selector', ), - 'Symfony\\Component\\Console\\' => + 'Symfony\\Component\\Console\\' => array ( 0 => __DIR__ . '/..' . '/symfony/console', ), - 'Symfony\\Component\\Config\\' => + 'Symfony\\Component\\Config\\' => array ( 0 => __DIR__ . '/..' . '/symfony/config', ), - 'Symfony\\Component\\Cache\\' => + 'Symfony\\Component\\Cache\\' => array ( 0 => __DIR__ . '/..' . '/symfony/cache', ), - 'Symfony\\Bundle\\WebProfilerBundle\\' => + 'Symfony\\Bundle\\WebProfilerBundle\\' => array ( 0 => __DIR__ . '/..' . '/symfony/web-profiler-bundle', ), - 'Symfony\\Bundle\\TwigBundle\\' => + 'Symfony\\Bundle\\TwigBundle\\' => array ( 0 => __DIR__ . '/..' . '/symfony/twig-bundle', ), - 'Symfony\\Bundle\\FrameworkBundle\\' => + 'Symfony\\Bundle\\FrameworkBundle\\' => array ( 0 => __DIR__ . '/..' . '/symfony/framework-bundle', ), - 'Symfony\\Bridge\\Twig\\' => + 'Symfony\\Bridge\\Twig\\' => array ( 0 => __DIR__ . '/..' . '/symfony/twig-bridge', ), - 'Soundasleep\\' => + 'Soundasleep\\' => array ( 0 => __DIR__ . '/..' . '/soundasleep/html2text/src', ), - 'ScssPhp\\ScssPhp\\' => + 'ScssPhp\\ScssPhp\\' => array ( 0 => __DIR__ . '/..' . '/scssphp/scssphp/src', ), - 'Sabberworm\\CSS\\' => + 'Sabberworm\\CSS\\' => array ( 0 => __DIR__ . '/..' . '/sabberworm/php-css-parser/src', ), - 'Psr\\Log\\' => + 'Psr\\Log\\' => array ( 0 => __DIR__ . '/..' . '/psr/log/src', ), - 'Psr\\Http\\Message\\' => + 'Psr\\Http\\Message\\' => array ( 0 => __DIR__ . '/..' . '/psr/http-factory/src', 1 => __DIR__ . '/..' . '/psr/http-message/src', ), - 'Psr\\Http\\Client\\' => + 'Psr\\Http\\Client\\' => array ( 0 => __DIR__ . '/..' . '/psr/http-client/src', ), - 'Psr\\EventDispatcher\\' => + 'Psr\\EventDispatcher\\' => array ( 0 => __DIR__ . '/..' . '/psr/event-dispatcher/src', ), - 'Psr\\Container\\' => + 'Psr\\Container\\' => array ( 0 => __DIR__ . '/..' . '/psr/container/src', ), - 'Psr\\Cache\\' => + 'Psr\\Cache\\' => array ( 0 => __DIR__ . '/..' . '/psr/cache/src', ), - 'PhpParser\\' => + 'PhpParser\\' => array ( 0 => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser', ), - 'Pelago\\Emogrifier\\' => + 'Pelago\\Emogrifier\\' => array ( 0 => __DIR__ . '/..' . '/pelago/emogrifier/src', ), - 'League\\OAuth2\\Client\\' => + 'League\\OAuth2\\Client\\' => array ( 0 => __DIR__ . '/..' . '/league/oauth2-google/src', 1 => __DIR__ . '/..' . '/league/oauth2-client/src', ), - 'GuzzleHttp\\Psr7\\' => + 'GuzzleHttp\\Psr7\\' => array ( 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src', ), - 'GuzzleHttp\\Promise\\' => + 'GuzzleHttp\\Promise\\' => array ( 0 => __DIR__ . '/..' . '/guzzlehttp/promises/src', ), - 'GuzzleHttp\\' => + 'GuzzleHttp\\' => array ( 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src', ), - 'Firebase\\JWT\\' => + 'Firebase\\JWT\\' => array ( 0 => __DIR__ . '/..' . '/firebase/php-jwt/src', ), - 'Egulias\\EmailValidator\\' => + 'Egulias\\EmailValidator\\' => array ( 0 => __DIR__ . '/..' . '/egulias/email-validator/src', ), - 'Doctrine\\Common\\Lexer\\' => + 'Doctrine\\Common\\Lexer\\' => array ( 0 => __DIR__ . '/..' . '/doctrine/lexer/src', ), ); public static $prefixesPsr0 = array ( - 'C' => + 'C' => array ( - 'Console' => + 'Console' => array ( 0 => __DIR__ . '/..' . '/pear/console_getopt', ), ), - 'A' => + 'A' => array ( - 'Archive_Tar' => + 'Archive_Tar' => array ( 0 => __DIR__ . '/..' . '/pear/archive_tar', ), @@ -556,6 +551,7 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Dashlet\\DashletFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Dashlet/DashletFactory.php', 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Dashlet\\DashletHeaderStatic' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Dashlet/DashletHeaderStatic.php', 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Dashlet\\DashletPlainText' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Dashlet/DashletPlainText.php', + 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Dashlet\\DashletWrapper' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Dashlet/DashletWrapper.php', 'Combodo\\iTop\\Application\\UI\\Base\\Component\\DataTable\\DataTable' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/DataTable/DataTable.php', 'Combodo\\iTop\\Application\\UI\\Base\\Component\\DataTable\\DataTableConfig\\DataTableConfig' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/DataTable/DataTableConfig/DataTableConfig.php', 'Combodo\\iTop\\Application\\UI\\Base\\Component\\DataTable\\DataTableSettings' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/DataTable/DataTableSettings.php', @@ -630,10 +626,6 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\ToolbarSpacer\\ToolbarSpacer' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Toolbar/ToolbarSpacer/ToolbarSpacer.php', 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\ToolbarSpacer\\ToolbarSpacerUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Toolbar/ToolbarSpacer/ToolbarSpacerUIBlockFactory.php', 'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\ToolbarUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Toolbar/ToolbarUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\TurboForm\\TurboForm' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/TurboForm/TurboForm.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\TurboForm\\TurboFormUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/TurboForm/TurboFormUIBlockFactory.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\TurboUpdate\\TurboStream' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/TurboStream/TurboStream.php', - 'Combodo\\iTop\\Application\\UI\\Base\\Component\\TurboUpdate\\TurboStreamUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/TurboStream/TurboStreamUIBlockFactory.php', 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\ActivityEntry' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/ActivityEntry.php', 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\ActivityEntryFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/ActivityEntryFactory.php', 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\CMDBChangeOp\\CMDBChangeOpAttachmentAddedFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/CMDBChangeOp/CMDBChangeOpAttachmentAddedFactory.php', @@ -656,8 +648,13 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\CaseLogEntryForm\\CaseLogEntryForm' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/CaseLogEntryForm/CaseLogEntryForm.php', 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\CaseLogEntryForm\\CaseLogEntryFormFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/CaseLogEntryForm/CaseLogEntryFormFactory.php', 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Dashboard\\DashboardColumn' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/Dashboard/DashboardColumn.php', + 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Dashboard\\DashboardGrid' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/Dashboard/DashboardGrid.php', + 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Dashboard\\DashboardGridSlot' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/Dashboard/DashboardGridSlot.php', 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Dashboard\\DashboardLayout' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/Dashboard/DashboardLayout.php', 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\Dashboard\\DashboardRow' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/Dashboard/DashboardRow.php', + 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\DashletPanel\\DashletEntry' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/DashletPanel/DashletEntry.php', + 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\DashletPanel\\DashletPanel' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/DashletPanel/DashletPanel.php', + 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\DashletPanel\\DashletPanelFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/DashletPanel/DashletPanelFactory.php', 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\MultiColumn\\Column\\Column' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/MultiColumn/Column/Column.php', 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\MultiColumn\\Column\\ColumnUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/MultiColumn/Column/ColumnUIBlockFactory.php', 'Combodo\\iTop\\Application\\UI\\Base\\Layout\\MultiColumn\\MultiColumn' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/MultiColumn/MultiColumn.php', @@ -730,8 +727,8 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'Combodo\\iTop\\Controller\\AbstractController' => __DIR__ . '/../..' . '/sources/Controller/AbstractController.php', 'Combodo\\iTop\\Controller\\AjaxRenderController' => __DIR__ . '/../..' . '/sources/Controller/AjaxRenderController.php', 'Combodo\\iTop\\Controller\\Base\\Layout\\ActivityPanelController' => __DIR__ . '/../..' . '/sources/Controller/Base/Layout/ActivityPanelController.php', + 'Combodo\\iTop\\Controller\\Base\\Layout\\DashboardController' => __DIR__ . '/../..' . '/sources/Controller/Base/Layout/DashboardController.php', 'Combodo\\iTop\\Controller\\Base\\Layout\\ObjectController' => __DIR__ . '/../..' . '/sources/Controller/Base/Layout/ObjectController.php', - 'Combodo\\iTop\\Controller\\Base\\Layout\\OqlController' => __DIR__ . '/../..' . '/sources/Controller/Base/Layout/OqlController.php', 'Combodo\\iTop\\Controller\\Links\\LinkSetController' => __DIR__ . '/../..' . '/sources/Controller/Links/LinkSetController.php', 'Combodo\\iTop\\Controller\\Newsroom\\iTopNewsroomController' => __DIR__ . '/../..' . '/sources/Controller/Newsroom/iTopNewsroomController.php', 'Combodo\\iTop\\Controller\\Notifications\\ActionController' => __DIR__ . '/../..' . '/sources/Controller/Notifications/ActionController.php', @@ -864,113 +861,8 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'Combodo\\iTop\\Form\\Validator\\MultipleChoicesValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/MultipleChoicesValidator.php', 'Combodo\\iTop\\Form\\Validator\\NotEmptyExtKeyValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/NotEmptyExtKeyValidator.php', 'Combodo\\iTop\\Form\\Validator\\SelectObjectValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/SelectObjectValidator.php', - 'Combodo\\iTop\\Forms\\Block\\AbstractFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/AbstractFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\AbstractTypeFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/AbstractTypeFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\CheckboxFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/CheckboxFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\ChoiceFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/ChoiceFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\ChoiceFromInputsBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/ChoiceFromInputsBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\CollectionBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/CollectionBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\DateFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/DateFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\DateTimeFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/DateTimeFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\FormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/FormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\HiddenFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/HiddenFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\IntegerFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/IntegerFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\NumberFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/NumberFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\TextAreaFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/TextAreaFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Base\\TextFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/TextFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\DataModel\\AttributeChoiceFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/DataModel/AttributeChoiceFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\DataModel\\AttributeTypeChoiceFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/DataModel/AttributeTypeChoiceFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\DataModel\\AttributeValueChoiceFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/DataModel/AttributeValueChoiceFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\DataModel\\Dashlet\\AggregateFunctionFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/DataModel/Dashlet/AggregateFunctionFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\DataModel\\Dashlet\\ClassAttributeGroupByFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/DataModel/Dashlet/ClassAttributeGroupByFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\DataModel\\LabelFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/DataModel/LabelFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\DataModel\\OqlFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/DataModel/OqlFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Expression\\AbstractExpressionFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Expression/AbstractExpressionFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Expression\\BooleanExpressionFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Expression/BooleanExpressionFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Expression\\NumberExpressionFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Expression/NumberExpressionFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\Expression\\StringExpressionFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Expression/StringExpressionFormBlock.php', - 'Combodo\\iTop\\Forms\\Block\\FormBlockException' => __DIR__ . '/../..' . '/sources/Forms/Block/FormBlockException.php', - 'Combodo\\iTop\\Forms\\Block\\FormBlockHelper' => __DIR__ . '/../..' . '/sources/Forms/Block/FormBlockHelper.php', - 'Combodo\\iTop\\Forms\\Block\\FormBlockService' => __DIR__ . '/../..' . '/sources/Forms/Block/FormBlockService.php', - 'Combodo\\iTop\\Forms\\Block\\IFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/IFormBlock.php', - 'Combodo\\iTop\\Forms\\Controller\\FormsController' => __DIR__ . '/../..' . '/sources/Forms/Controller/FormsController.php', - 'Combodo\\iTop\\Forms\\FormBuilder\\DependencyHandler' => __DIR__ . '/../..' . '/sources/Forms/FormBuilder/DependencyHandler.php', - 'Combodo\\iTop\\Forms\\FormBuilder\\DependencyMap' => __DIR__ . '/../..' . '/sources/Forms/FormBuilder/DependencyMap.php', - 'Combodo\\iTop\\Forms\\FormBuilder\\FormBuilder' => __DIR__ . '/../..' . '/sources/Forms/FormBuilder/FormBuilder.php', - 'Combodo\\iTop\\Forms\\FormBuilder\\FormBuilderException' => __DIR__ . '/../..' . '/sources/Forms/FormBuilder/FormBuilderException.php', - 'Combodo\\iTop\\Forms\\FormBuilder\\FormHelper' => __DIR__ . '/../..' . '/sources/Forms/FormBuilder/FormHelper.php', - 'Combodo\\iTop\\Forms\\FormBuilder\\FormTypeExtension' => __DIR__ . '/../..' . '/sources/Forms/FormBuilder/FormTypeExtension.php', - 'Combodo\\iTop\\Forms\\FormBuilder\\ResolvedFormType' => __DIR__ . '/../..' . '/sources/Forms/FormBuilder/ResolvedFormType.php', - 'Combodo\\iTop\\Forms\\FormBuilder\\ResolvedFormTypeFactory' => __DIR__ . '/../..' . '/sources/Forms/FormBuilder/ResolvedFormTypeFactory.php', - 'Combodo\\iTop\\Forms\\FormType\\Base\\ChoiceFormType' => __DIR__ . '/../..' . '/sources/Forms/FormType/Base/ChoiceFormType.php', - 'Combodo\\iTop\\Forms\\FormType\\Base\\CollectionFormType' => __DIR__ . '/../..' . '/sources/Forms/FormType/Base/CollectionFormType.php', - 'Combodo\\iTop\\Forms\\FormType\\Base\\FormType' => __DIR__ . '/../..' . '/sources/Forms/FormType/Base/FormType.php', - 'Combodo\\iTop\\Forms\\FormType\\DataModel\\OqlFormType' => __DIR__ . '/../..' . '/sources/Forms/FormType/DataModel/OqlFormType.php', - 'Combodo\\iTop\\Forms\\FormType\\FormTypeHelper' => __DIR__ . '/../..' . '/sources/Forms/FormType/FormTypeHelper.php', - 'Combodo\\iTop\\Forms\\Forms' => __DIR__ . '/../..' . '/sources/Forms/Forms.php', - 'Combodo\\iTop\\Forms\\FormsException' => __DIR__ . '/../..' . '/sources/Forms/FormsException.php', - 'Combodo\\iTop\\Forms\\IO\\AbstractFormIO' => __DIR__ . '/../..' . '/sources/Forms/IO/AbstractFormIO.php', - 'Combodo\\iTop\\Forms\\IO\\Converter\\AbstractConverter' => __DIR__ . '/../..' . '/sources/Forms/IO/Converter/AbstractConverter.php', - 'Combodo\\iTop\\Forms\\IO\\Converter\\ChoiceValueToLabelConverter' => __DIR__ . '/../..' . '/sources/Forms/IO/Converter/ChoiceValueToLabelConverter.php', - 'Combodo\\iTop\\Forms\\IO\\Converter\\CollectionToCountConverter' => __DIR__ . '/../..' . '/sources/Forms/IO/Converter/CollectionToCountConverter.php', - 'Combodo\\iTop\\Forms\\IO\\Converter\\OqlToClassConverter' => __DIR__ . '/../..' . '/sources/Forms/IO/Converter/OqlToClassConverter.php', - 'Combodo\\iTop\\Forms\\IO\\FormBinding' => __DIR__ . '/../..' . '/sources/Forms/IO/FormBinding.php', - 'Combodo\\iTop\\Forms\\IO\\FormBlockIOException' => __DIR__ . '/../..' . '/sources/Forms/IO/FormBlockIOException.php', - 'Combodo\\iTop\\Forms\\IO\\FormInput' => __DIR__ . '/../..' . '/sources/Forms/IO/FormInput.php', - 'Combodo\\iTop\\Forms\\IO\\FormOutput' => __DIR__ . '/../..' . '/sources/Forms/IO/FormOutput.php', - 'Combodo\\iTop\\Forms\\IO\\Format\\AbstractIOFormat' => __DIR__ . '/../..' . '/sources/Forms/IO/Format/AbstractIOFormat.php', - 'Combodo\\iTop\\Forms\\IO\\Format\\AttributeIOFormat' => __DIR__ . '/../..' . '/sources/Forms/IO/Format/AttributeIOFormat.php', - 'Combodo\\iTop\\Forms\\IO\\Format\\AttributeTypeArrayIOFormat' => __DIR__ . '/../..' . '/sources/Forms/IO/Format/AttributeTypeArrayIOFormat.php', - 'Combodo\\iTop\\Forms\\IO\\Format\\AttributeTypeIOFormat' => __DIR__ . '/../..' . '/sources/Forms/IO/Format/AttributeTypeIOFormat.php', - 'Combodo\\iTop\\Forms\\IO\\Format\\BooleanIOFormat' => __DIR__ . '/../..' . '/sources/Forms/IO/Format/BooleanIOFormat.php', - 'Combodo\\iTop\\Forms\\IO\\Format\\ClassIOFormat' => __DIR__ . '/../..' . '/sources/Forms/IO/Format/ClassIOFormat.php', - 'Combodo\\iTop\\Forms\\IO\\Format\\IntegerIOFormat' => __DIR__ . '/../..' . '/sources/Forms/IO/Format/IntegerIOFormat.php', - 'Combodo\\iTop\\Forms\\IO\\Format\\NumberIOFormat' => __DIR__ . '/../..' . '/sources/Forms/IO/Format/NumberIOFormat.php', - 'Combodo\\iTop\\Forms\\IO\\Format\\StringIOFormat' => __DIR__ . '/../..' . '/sources/Forms/IO/Format/StringIOFormat.php', - 'Combodo\\iTop\\Forms\\Register\\IORegister' => __DIR__ . '/../..' . '/sources/Forms/Register/IORegister.php', - 'Combodo\\iTop\\Forms\\Register\\Option' => __DIR__ . '/../..' . '/sources/Forms/Register/Option.php', - 'Combodo\\iTop\\Forms\\Register\\OptionsRegister' => __DIR__ . '/../..' . '/sources/Forms/Register/OptionsRegister.php', - 'Combodo\\iTop\\Forms\\Register\\RegisterException' => __DIR__ . '/../..' . '/sources/Forms/Register/RegisterException.php', 'Combodo\\iTop\\Forms\\Twig\\Extension\\FormCompatibilityExtension' => __DIR__ . '/../..' . '/sources/Forms/Twig/Extension/FormCompatibilityExtension.php', - 'Combodo\\iTop\\Forms\\Validator\\AttributeExist' => __DIR__ . '/../..' . '/sources/Forms/Validator/AttributeExist.php', - 'Combodo\\iTop\\Forms\\Validator\\AttributeExistValidator' => __DIR__ . '/../..' . '/sources/Forms/Validator/AttributeExistValidator.php', 'Combodo\\iTop\\PhpParser\\Evaluation\\PhpExpressionEvaluator' => __DIR__ . '/../..' . '/sources/PhpParser/Evaluation/PhpExpressionEvaluator.php', - 'Combodo\\iTop\\PropertyType\\Compiler\\PropertyTypeCompiler' => __DIR__ . '/../..' . '/sources/PropertyType/Compiler/PropertyTypeCompiler.php', - 'Combodo\\iTop\\PropertyType\\Compiler\\PropertyTypeCompilerException' => __DIR__ . '/../..' . '/sources/PropertyType/Compiler/PropertyTypeCompilerException.php', - 'Combodo\\iTop\\PropertyType\\PropertyType' => __DIR__ . '/../..' . '/sources/PropertyType/PropertyType.php', - 'Combodo\\iTop\\PropertyType\\PropertyTypeDesign' => __DIR__ . '/../..' . '/sources/PropertyType/PropertyTypeDesign.php', - 'Combodo\\iTop\\PropertyType\\PropertyTypeException' => __DIR__ . '/../..' . '/sources/PropertyType/PropertyTypeException.php', - 'Combodo\\iTop\\PropertyType\\PropertyTypeFactory' => __DIR__ . '/../..' . '/sources/PropertyType/PropertyTypeFactory.php', - 'Combodo\\iTop\\PropertyType\\PropertyTypeService' => __DIR__ . '/../..' . '/sources/PropertyType/PropertyTypeService.php', - 'Combodo\\iTop\\PropertyType\\Serializer\\SerializerException' => __DIR__ . '/../..' . '/sources/PropertyType/Serializer/SerializerException.php', - 'Combodo\\iTop\\PropertyType\\Serializer\\XMLFormat\\AbstractXMLFormat' => __DIR__ . '/../..' . '/sources/PropertyType/Serializer/XMLFormat/AbstractXMLFormat.php', - 'Combodo\\iTop\\PropertyType\\Serializer\\XMLFormat\\XMLFormatCSV' => __DIR__ . '/../..' . '/sources/PropertyType/Serializer/XMLFormat/XMLFormatCSV.php', - 'Combodo\\iTop\\PropertyType\\Serializer\\XMLFormat\\XMLFormatFactory' => __DIR__ . '/../..' . '/sources/PropertyType/Serializer/XMLFormat/XMLFormatFactory.php', - 'Combodo\\iTop\\PropertyType\\Serializer\\XMLFormat\\XMLFormatFlatArray' => __DIR__ . '/../..' . '/sources/PropertyType/Serializer/XMLFormat/XMLFormatFlatArray.php', - 'Combodo\\iTop\\PropertyType\\Serializer\\XMLFormat\\XMLFormatValueAsId' => __DIR__ . '/../..' . '/sources/PropertyType/Serializer/XMLFormat/XMLFormatValueAsId.php', - 'Combodo\\iTop\\PropertyType\\Serializer\\XMLSerializer' => __DIR__ . '/../..' . '/sources/PropertyType/Serializer/XMLSerializer.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\AbstractValueType' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/AbstractValueType.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Branch\\AbstractBranchValueType' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/Branch/AbstractBranchValueType.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Branch\\ValueTypeCollection' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/Branch/ValueTypeCollection.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Branch\\ValueTypePropertyTree' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/Branch/ValueTypePropertyTree.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\AbstractLeafValueType' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/Leaf/AbstractLeafValueType.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeAggregateFunction' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/Leaf/ValueTypeAggregateFunction.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeBoolean' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/Leaf/ValueTypeBoolean.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeChoice' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/Leaf/ValueTypeChoice.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeChoiceFromInput' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/Leaf/ValueTypeChoiceFromInput.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeClass' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/Leaf/ValueTypeClass.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeClassAttribute' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/Leaf/ValueTypeClassAttribute.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeClassAttributeGroupBy' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/Leaf/ValueTypeClassAttributeGroupBy.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeClassAttributeValue' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/Leaf/ValueTypeClassAttributeValue.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeCollectionOfValues' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/Leaf/ValueTypeCollectionOfValues.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeIcon' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/Leaf/ValueTypeIcon.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeInteger' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/Leaf/ValueTypeInteger.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeLabel' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/Leaf/ValueTypeLabel.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeOQL' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/Leaf/ValueTypeOQL.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeProfileName' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/Leaf/ValueTypeProfileName.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeString' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/Leaf/ValueTypeString.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\Leaf\\ValueTypeText' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/Leaf/ValueTypeText.php', - 'Combodo\\iTop\\PropertyType\\ValueType\\ValueTypeFactory' => __DIR__ . '/../..' . '/sources/PropertyType/ValueType/ValueTypeFactory.php', 'Combodo\\iTop\\Renderer\\BlockRenderer' => __DIR__ . '/../..' . '/sources/Renderer/BlockRenderer.php', 'Combodo\\iTop\\Renderer\\Bootstrap\\BsFieldRendererMappings' => __DIR__ . '/../..' . '/sources/Renderer/Bootstrap/BsFieldRendererMappings.php', 'Combodo\\iTop\\Renderer\\Bootstrap\\BsFormRenderer' => __DIR__ . '/../..' . '/sources/Renderer/Bootstrap/BsFormRenderer.php', @@ -993,8 +885,7 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'Combodo\\iTop\\Service\\Base\\ObjectRepository' => __DIR__ . '/../..' . '/sources/Service/Base/ObjectRepository.php', 'Combodo\\iTop\\Service\\Base\\iDataPostProcessor' => __DIR__ . '/../..' . '/sources/Service/Base/iDataPostProcessor.php', 'Combodo\\iTop\\Service\\Cache\\DataModelDependantCache' => __DIR__ . '/../..' . '/sources/Service/Cache/DataModelDependantCache.php', - 'Combodo\\iTop\\Service\\DependencyInjection\\DIException' => __DIR__ . '/../..' . '/sources/Service/DependencyInjection/DIException.php', - 'Combodo\\iTop\\Service\\DependencyInjection\\ServiceLocator' => __DIR__ . '/../..' . '/sources/Service/DependencyInjection/ServiceLocator.php', + 'Combodo\\iTop\\Service\\Dashboard\\DashletService' => __DIR__ . '/../..' . '/sources/Service/Dashboard/DashletService.php', 'Combodo\\iTop\\Service\\Events\\Description\\EventDataDescription' => __DIR__ . '/../..' . '/sources/Service/Events/Description/EventDataDescription.php', 'Combodo\\iTop\\Service\\Events\\Description\\EventDescription' => __DIR__ . '/../..' . '/sources/Service/Events/Description/EventDescription.php', 'Combodo\\iTop\\Service\\Events\\EventData' => __DIR__ . '/../..' . '/sources/Service/Events/EventData.php', @@ -3569,227 +3460,6 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'Symfony\\Component\\String\\Slugger\\AsciiSlugger' => __DIR__ . '/..' . '/symfony/string/Slugger/AsciiSlugger.php', 'Symfony\\Component\\String\\Slugger\\SluggerInterface' => __DIR__ . '/..' . '/symfony/string/Slugger/SluggerInterface.php', 'Symfony\\Component\\String\\UnicodeString' => __DIR__ . '/..' . '/symfony/string/UnicodeString.php', - 'Symfony\\Component\\Validator\\Attribute\\HasNamedArguments' => __DIR__ . '/..' . '/symfony/validator/Attribute/HasNamedArguments.php', - 'Symfony\\Component\\Validator\\Command\\DebugCommand' => __DIR__ . '/..' . '/symfony/validator/Command/DebugCommand.php', - 'Symfony\\Component\\Validator\\Constraint' => __DIR__ . '/..' . '/symfony/validator/Constraint.php', - 'Symfony\\Component\\Validator\\ConstraintValidator' => __DIR__ . '/..' . '/symfony/validator/ConstraintValidator.php', - 'Symfony\\Component\\Validator\\ConstraintValidatorFactory' => __DIR__ . '/..' . '/symfony/validator/ConstraintValidatorFactory.php', - 'Symfony\\Component\\Validator\\ConstraintValidatorFactoryInterface' => __DIR__ . '/..' . '/symfony/validator/ConstraintValidatorFactoryInterface.php', - 'Symfony\\Component\\Validator\\ConstraintValidatorInterface' => __DIR__ . '/..' . '/symfony/validator/ConstraintValidatorInterface.php', - 'Symfony\\Component\\Validator\\ConstraintViolation' => __DIR__ . '/..' . '/symfony/validator/ConstraintViolation.php', - 'Symfony\\Component\\Validator\\ConstraintViolationInterface' => __DIR__ . '/..' . '/symfony/validator/ConstraintViolationInterface.php', - 'Symfony\\Component\\Validator\\ConstraintViolationList' => __DIR__ . '/..' . '/symfony/validator/ConstraintViolationList.php', - 'Symfony\\Component\\Validator\\ConstraintViolationListInterface' => __DIR__ . '/..' . '/symfony/validator/ConstraintViolationListInterface.php', - 'Symfony\\Component\\Validator\\Constraints\\AbstractComparison' => __DIR__ . '/..' . '/symfony/validator/Constraints/AbstractComparison.php', - 'Symfony\\Component\\Validator\\Constraints\\AbstractComparisonValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/AbstractComparisonValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\All' => __DIR__ . '/..' . '/symfony/validator/Constraints/All.php', - 'Symfony\\Component\\Validator\\Constraints\\AllValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/AllValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\AtLeastOneOf' => __DIR__ . '/..' . '/symfony/validator/Constraints/AtLeastOneOf.php', - 'Symfony\\Component\\Validator\\Constraints\\AtLeastOneOfValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/AtLeastOneOfValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Bic' => __DIR__ . '/..' . '/symfony/validator/Constraints/Bic.php', - 'Symfony\\Component\\Validator\\Constraints\\BicValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/BicValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Blank' => __DIR__ . '/..' . '/symfony/validator/Constraints/Blank.php', - 'Symfony\\Component\\Validator\\Constraints\\BlankValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/BlankValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Callback' => __DIR__ . '/..' . '/symfony/validator/Constraints/Callback.php', - 'Symfony\\Component\\Validator\\Constraints\\CallbackValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/CallbackValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\CardScheme' => __DIR__ . '/..' . '/symfony/validator/Constraints/CardScheme.php', - 'Symfony\\Component\\Validator\\Constraints\\CardSchemeValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/CardSchemeValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Cascade' => __DIR__ . '/..' . '/symfony/validator/Constraints/Cascade.php', - 'Symfony\\Component\\Validator\\Constraints\\Choice' => __DIR__ . '/..' . '/symfony/validator/Constraints/Choice.php', - 'Symfony\\Component\\Validator\\Constraints\\ChoiceValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/ChoiceValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Cidr' => __DIR__ . '/..' . '/symfony/validator/Constraints/Cidr.php', - 'Symfony\\Component\\Validator\\Constraints\\CidrValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/CidrValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Collection' => __DIR__ . '/..' . '/symfony/validator/Constraints/Collection.php', - 'Symfony\\Component\\Validator\\Constraints\\CollectionValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/CollectionValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Composite' => __DIR__ . '/..' . '/symfony/validator/Constraints/Composite.php', - 'Symfony\\Component\\Validator\\Constraints\\Compound' => __DIR__ . '/..' . '/symfony/validator/Constraints/Compound.php', - 'Symfony\\Component\\Validator\\Constraints\\CompoundValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/CompoundValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Count' => __DIR__ . '/..' . '/symfony/validator/Constraints/Count.php', - 'Symfony\\Component\\Validator\\Constraints\\CountValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/CountValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Country' => __DIR__ . '/..' . '/symfony/validator/Constraints/Country.php', - 'Symfony\\Component\\Validator\\Constraints\\CountryValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/CountryValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\CssColor' => __DIR__ . '/..' . '/symfony/validator/Constraints/CssColor.php', - 'Symfony\\Component\\Validator\\Constraints\\CssColorValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/CssColorValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Currency' => __DIR__ . '/..' . '/symfony/validator/Constraints/Currency.php', - 'Symfony\\Component\\Validator\\Constraints\\CurrencyValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/CurrencyValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Date' => __DIR__ . '/..' . '/symfony/validator/Constraints/Date.php', - 'Symfony\\Component\\Validator\\Constraints\\DateTime' => __DIR__ . '/..' . '/symfony/validator/Constraints/DateTime.php', - 'Symfony\\Component\\Validator\\Constraints\\DateTimeValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/DateTimeValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\DateValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/DateValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\DisableAutoMapping' => __DIR__ . '/..' . '/symfony/validator/Constraints/DisableAutoMapping.php', - 'Symfony\\Component\\Validator\\Constraints\\DivisibleBy' => __DIR__ . '/..' . '/symfony/validator/Constraints/DivisibleBy.php', - 'Symfony\\Component\\Validator\\Constraints\\DivisibleByValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/DivisibleByValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Email' => __DIR__ . '/..' . '/symfony/validator/Constraints/Email.php', - 'Symfony\\Component\\Validator\\Constraints\\EmailValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/EmailValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\EnableAutoMapping' => __DIR__ . '/..' . '/symfony/validator/Constraints/EnableAutoMapping.php', - 'Symfony\\Component\\Validator\\Constraints\\EqualTo' => __DIR__ . '/..' . '/symfony/validator/Constraints/EqualTo.php', - 'Symfony\\Component\\Validator\\Constraints\\EqualToValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/EqualToValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Existence' => __DIR__ . '/..' . '/symfony/validator/Constraints/Existence.php', - 'Symfony\\Component\\Validator\\Constraints\\Expression' => __DIR__ . '/..' . '/symfony/validator/Constraints/Expression.php', - 'Symfony\\Component\\Validator\\Constraints\\ExpressionLanguageProvider' => __DIR__ . '/..' . '/symfony/validator/Constraints/ExpressionLanguageProvider.php', - 'Symfony\\Component\\Validator\\Constraints\\ExpressionLanguageSyntax' => __DIR__ . '/..' . '/symfony/validator/Constraints/ExpressionLanguageSyntax.php', - 'Symfony\\Component\\Validator\\Constraints\\ExpressionLanguageSyntaxValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/ExpressionLanguageSyntaxValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\ExpressionSyntax' => __DIR__ . '/..' . '/symfony/validator/Constraints/ExpressionSyntax.php', - 'Symfony\\Component\\Validator\\Constraints\\ExpressionSyntaxValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/ExpressionSyntaxValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\ExpressionValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/ExpressionValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\File' => __DIR__ . '/..' . '/symfony/validator/Constraints/File.php', - 'Symfony\\Component\\Validator\\Constraints\\FileValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/FileValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\GreaterThan' => __DIR__ . '/..' . '/symfony/validator/Constraints/GreaterThan.php', - 'Symfony\\Component\\Validator\\Constraints\\GreaterThanOrEqual' => __DIR__ . '/..' . '/symfony/validator/Constraints/GreaterThanOrEqual.php', - 'Symfony\\Component\\Validator\\Constraints\\GreaterThanOrEqualValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/GreaterThanOrEqualValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\GreaterThanValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/GreaterThanValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\GroupSequence' => __DIR__ . '/..' . '/symfony/validator/Constraints/GroupSequence.php', - 'Symfony\\Component\\Validator\\Constraints\\GroupSequenceProvider' => __DIR__ . '/..' . '/symfony/validator/Constraints/GroupSequenceProvider.php', - 'Symfony\\Component\\Validator\\Constraints\\Hostname' => __DIR__ . '/..' . '/symfony/validator/Constraints/Hostname.php', - 'Symfony\\Component\\Validator\\Constraints\\HostnameValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/HostnameValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Iban' => __DIR__ . '/..' . '/symfony/validator/Constraints/Iban.php', - 'Symfony\\Component\\Validator\\Constraints\\IbanValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/IbanValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\IdenticalTo' => __DIR__ . '/..' . '/symfony/validator/Constraints/IdenticalTo.php', - 'Symfony\\Component\\Validator\\Constraints\\IdenticalToValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/IdenticalToValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Image' => __DIR__ . '/..' . '/symfony/validator/Constraints/Image.php', - 'Symfony\\Component\\Validator\\Constraints\\ImageValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/ImageValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Ip' => __DIR__ . '/..' . '/symfony/validator/Constraints/Ip.php', - 'Symfony\\Component\\Validator\\Constraints\\IpValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/IpValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\IsFalse' => __DIR__ . '/..' . '/symfony/validator/Constraints/IsFalse.php', - 'Symfony\\Component\\Validator\\Constraints\\IsFalseValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/IsFalseValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\IsNull' => __DIR__ . '/..' . '/symfony/validator/Constraints/IsNull.php', - 'Symfony\\Component\\Validator\\Constraints\\IsNullValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/IsNullValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\IsTrue' => __DIR__ . '/..' . '/symfony/validator/Constraints/IsTrue.php', - 'Symfony\\Component\\Validator\\Constraints\\IsTrueValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/IsTrueValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Isbn' => __DIR__ . '/..' . '/symfony/validator/Constraints/Isbn.php', - 'Symfony\\Component\\Validator\\Constraints\\IsbnValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/IsbnValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Isin' => __DIR__ . '/..' . '/symfony/validator/Constraints/Isin.php', - 'Symfony\\Component\\Validator\\Constraints\\IsinValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/IsinValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Issn' => __DIR__ . '/..' . '/symfony/validator/Constraints/Issn.php', - 'Symfony\\Component\\Validator\\Constraints\\IssnValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/IssnValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Json' => __DIR__ . '/..' . '/symfony/validator/Constraints/Json.php', - 'Symfony\\Component\\Validator\\Constraints\\JsonValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/JsonValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Language' => __DIR__ . '/..' . '/symfony/validator/Constraints/Language.php', - 'Symfony\\Component\\Validator\\Constraints\\LanguageValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/LanguageValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Length' => __DIR__ . '/..' . '/symfony/validator/Constraints/Length.php', - 'Symfony\\Component\\Validator\\Constraints\\LengthValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/LengthValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\LessThan' => __DIR__ . '/..' . '/symfony/validator/Constraints/LessThan.php', - 'Symfony\\Component\\Validator\\Constraints\\LessThanOrEqual' => __DIR__ . '/..' . '/symfony/validator/Constraints/LessThanOrEqual.php', - 'Symfony\\Component\\Validator\\Constraints\\LessThanOrEqualValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/LessThanOrEqualValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\LessThanValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/LessThanValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Locale' => __DIR__ . '/..' . '/symfony/validator/Constraints/Locale.php', - 'Symfony\\Component\\Validator\\Constraints\\LocaleValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/LocaleValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Luhn' => __DIR__ . '/..' . '/symfony/validator/Constraints/Luhn.php', - 'Symfony\\Component\\Validator\\Constraints\\LuhnValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/LuhnValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Negative' => __DIR__ . '/..' . '/symfony/validator/Constraints/Negative.php', - 'Symfony\\Component\\Validator\\Constraints\\NegativeOrZero' => __DIR__ . '/..' . '/symfony/validator/Constraints/NegativeOrZero.php', - 'Symfony\\Component\\Validator\\Constraints\\NoSuspiciousCharacters' => __DIR__ . '/..' . '/symfony/validator/Constraints/NoSuspiciousCharacters.php', - 'Symfony\\Component\\Validator\\Constraints\\NoSuspiciousCharactersValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/NoSuspiciousCharactersValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\NotBlank' => __DIR__ . '/..' . '/symfony/validator/Constraints/NotBlank.php', - 'Symfony\\Component\\Validator\\Constraints\\NotBlankValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/NotBlankValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\NotCompromisedPassword' => __DIR__ . '/..' . '/symfony/validator/Constraints/NotCompromisedPassword.php', - 'Symfony\\Component\\Validator\\Constraints\\NotCompromisedPasswordValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/NotCompromisedPasswordValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\NotEqualTo' => __DIR__ . '/..' . '/symfony/validator/Constraints/NotEqualTo.php', - 'Symfony\\Component\\Validator\\Constraints\\NotEqualToValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/NotEqualToValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\NotIdenticalTo' => __DIR__ . '/..' . '/symfony/validator/Constraints/NotIdenticalTo.php', - 'Symfony\\Component\\Validator\\Constraints\\NotIdenticalToValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/NotIdenticalToValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\NotNull' => __DIR__ . '/..' . '/symfony/validator/Constraints/NotNull.php', - 'Symfony\\Component\\Validator\\Constraints\\NotNullValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/NotNullValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Optional' => __DIR__ . '/..' . '/symfony/validator/Constraints/Optional.php', - 'Symfony\\Component\\Validator\\Constraints\\PasswordStrength' => __DIR__ . '/..' . '/symfony/validator/Constraints/PasswordStrength.php', - 'Symfony\\Component\\Validator\\Constraints\\PasswordStrengthValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/PasswordStrengthValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Positive' => __DIR__ . '/..' . '/symfony/validator/Constraints/Positive.php', - 'Symfony\\Component\\Validator\\Constraints\\PositiveOrZero' => __DIR__ . '/..' . '/symfony/validator/Constraints/PositiveOrZero.php', - 'Symfony\\Component\\Validator\\Constraints\\Range' => __DIR__ . '/..' . '/symfony/validator/Constraints/Range.php', - 'Symfony\\Component\\Validator\\Constraints\\RangeValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/RangeValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Regex' => __DIR__ . '/..' . '/symfony/validator/Constraints/Regex.php', - 'Symfony\\Component\\Validator\\Constraints\\RegexValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/RegexValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Required' => __DIR__ . '/..' . '/symfony/validator/Constraints/Required.php', - 'Symfony\\Component\\Validator\\Constraints\\Sequentially' => __DIR__ . '/..' . '/symfony/validator/Constraints/Sequentially.php', - 'Symfony\\Component\\Validator\\Constraints\\SequentiallyValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/SequentiallyValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Time' => __DIR__ . '/..' . '/symfony/validator/Constraints/Time.php', - 'Symfony\\Component\\Validator\\Constraints\\TimeValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/TimeValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Timezone' => __DIR__ . '/..' . '/symfony/validator/Constraints/Timezone.php', - 'Symfony\\Component\\Validator\\Constraints\\TimezoneValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/TimezoneValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Traverse' => __DIR__ . '/..' . '/symfony/validator/Constraints/Traverse.php', - 'Symfony\\Component\\Validator\\Constraints\\Type' => __DIR__ . '/..' . '/symfony/validator/Constraints/Type.php', - 'Symfony\\Component\\Validator\\Constraints\\TypeValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/TypeValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Ulid' => __DIR__ . '/..' . '/symfony/validator/Constraints/Ulid.php', - 'Symfony\\Component\\Validator\\Constraints\\UlidValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/UlidValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Unique' => __DIR__ . '/..' . '/symfony/validator/Constraints/Unique.php', - 'Symfony\\Component\\Validator\\Constraints\\UniqueValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/UniqueValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Url' => __DIR__ . '/..' . '/symfony/validator/Constraints/Url.php', - 'Symfony\\Component\\Validator\\Constraints\\UrlValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/UrlValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Uuid' => __DIR__ . '/..' . '/symfony/validator/Constraints/Uuid.php', - 'Symfony\\Component\\Validator\\Constraints\\UuidValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/UuidValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Valid' => __DIR__ . '/..' . '/symfony/validator/Constraints/Valid.php', - 'Symfony\\Component\\Validator\\Constraints\\ValidValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/ValidValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\When' => __DIR__ . '/..' . '/symfony/validator/Constraints/When.php', - 'Symfony\\Component\\Validator\\Constraints\\WhenValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/WhenValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\ZeroComparisonConstraintTrait' => __DIR__ . '/..' . '/symfony/validator/Constraints/ZeroComparisonConstraintTrait.php', - 'Symfony\\Component\\Validator\\ContainerConstraintValidatorFactory' => __DIR__ . '/..' . '/symfony/validator/ContainerConstraintValidatorFactory.php', - 'Symfony\\Component\\Validator\\Context\\ExecutionContext' => __DIR__ . '/..' . '/symfony/validator/Context/ExecutionContext.php', - 'Symfony\\Component\\Validator\\Context\\ExecutionContextFactory' => __DIR__ . '/..' . '/symfony/validator/Context/ExecutionContextFactory.php', - 'Symfony\\Component\\Validator\\Context\\ExecutionContextFactoryInterface' => __DIR__ . '/..' . '/symfony/validator/Context/ExecutionContextFactoryInterface.php', - 'Symfony\\Component\\Validator\\Context\\ExecutionContextInterface' => __DIR__ . '/..' . '/symfony/validator/Context/ExecutionContextInterface.php', - 'Symfony\\Component\\Validator\\DataCollector\\ValidatorDataCollector' => __DIR__ . '/..' . '/symfony/validator/DataCollector/ValidatorDataCollector.php', - 'Symfony\\Component\\Validator\\DependencyInjection\\AddAutoMappingConfigurationPass' => __DIR__ . '/..' . '/symfony/validator/DependencyInjection/AddAutoMappingConfigurationPass.php', - 'Symfony\\Component\\Validator\\DependencyInjection\\AddConstraintValidatorsPass' => __DIR__ . '/..' . '/symfony/validator/DependencyInjection/AddConstraintValidatorsPass.php', - 'Symfony\\Component\\Validator\\DependencyInjection\\AddValidatorInitializersPass' => __DIR__ . '/..' . '/symfony/validator/DependencyInjection/AddValidatorInitializersPass.php', - 'Symfony\\Component\\Validator\\Exception\\BadMethodCallException' => __DIR__ . '/..' . '/symfony/validator/Exception/BadMethodCallException.php', - 'Symfony\\Component\\Validator\\Exception\\ConstraintDefinitionException' => __DIR__ . '/..' . '/symfony/validator/Exception/ConstraintDefinitionException.php', - 'Symfony\\Component\\Validator\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/validator/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Validator\\Exception\\GroupDefinitionException' => __DIR__ . '/..' . '/symfony/validator/Exception/GroupDefinitionException.php', - 'Symfony\\Component\\Validator\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/validator/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Validator\\Exception\\InvalidOptionsException' => __DIR__ . '/..' . '/symfony/validator/Exception/InvalidOptionsException.php', - 'Symfony\\Component\\Validator\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/validator/Exception/LogicException.php', - 'Symfony\\Component\\Validator\\Exception\\MappingException' => __DIR__ . '/..' . '/symfony/validator/Exception/MappingException.php', - 'Symfony\\Component\\Validator\\Exception\\MissingOptionsException' => __DIR__ . '/..' . '/symfony/validator/Exception/MissingOptionsException.php', - 'Symfony\\Component\\Validator\\Exception\\NoSuchMetadataException' => __DIR__ . '/..' . '/symfony/validator/Exception/NoSuchMetadataException.php', - 'Symfony\\Component\\Validator\\Exception\\OutOfBoundsException' => __DIR__ . '/..' . '/symfony/validator/Exception/OutOfBoundsException.php', - 'Symfony\\Component\\Validator\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/validator/Exception/RuntimeException.php', - 'Symfony\\Component\\Validator\\Exception\\UnexpectedTypeException' => __DIR__ . '/..' . '/symfony/validator/Exception/UnexpectedTypeException.php', - 'Symfony\\Component\\Validator\\Exception\\UnexpectedValueException' => __DIR__ . '/..' . '/symfony/validator/Exception/UnexpectedValueException.php', - 'Symfony\\Component\\Validator\\Exception\\UnsupportedMetadataException' => __DIR__ . '/..' . '/symfony/validator/Exception/UnsupportedMetadataException.php', - 'Symfony\\Component\\Validator\\Exception\\ValidationFailedException' => __DIR__ . '/..' . '/symfony/validator/Exception/ValidationFailedException.php', - 'Symfony\\Component\\Validator\\Exception\\ValidatorException' => __DIR__ . '/..' . '/symfony/validator/Exception/ValidatorException.php', - 'Symfony\\Component\\Validator\\GroupProviderInterface' => __DIR__ . '/..' . '/symfony/validator/GroupProviderInterface.php', - 'Symfony\\Component\\Validator\\GroupSequenceProviderInterface' => __DIR__ . '/..' . '/symfony/validator/GroupSequenceProviderInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\AutoMappingStrategy' => __DIR__ . '/..' . '/symfony/validator/Mapping/AutoMappingStrategy.php', - 'Symfony\\Component\\Validator\\Mapping\\CascadingStrategy' => __DIR__ . '/..' . '/symfony/validator/Mapping/CascadingStrategy.php', - 'Symfony\\Component\\Validator\\Mapping\\ClassMetadata' => __DIR__ . '/..' . '/symfony/validator/Mapping/ClassMetadata.php', - 'Symfony\\Component\\Validator\\Mapping\\ClassMetadataInterface' => __DIR__ . '/..' . '/symfony/validator/Mapping/ClassMetadataInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\Factory\\BlackHoleMetadataFactory' => __DIR__ . '/..' . '/symfony/validator/Mapping/Factory/BlackHoleMetadataFactory.php', - 'Symfony\\Component\\Validator\\Mapping\\Factory\\LazyLoadingMetadataFactory' => __DIR__ . '/..' . '/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php', - 'Symfony\\Component\\Validator\\Mapping\\Factory\\MetadataFactoryInterface' => __DIR__ . '/..' . '/symfony/validator/Mapping/Factory/MetadataFactoryInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\GenericMetadata' => __DIR__ . '/..' . '/symfony/validator/Mapping/GenericMetadata.php', - 'Symfony\\Component\\Validator\\Mapping\\GetterMetadata' => __DIR__ . '/..' . '/symfony/validator/Mapping/GetterMetadata.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\AbstractLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/AbstractLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\AnnotationLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/AnnotationLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\AttributeLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/AttributeLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\AutoMappingTrait' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/AutoMappingTrait.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\FileLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/FileLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\FilesLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/FilesLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\LoaderChain' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/LoaderChain.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\LoaderInterface' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/LoaderInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\PropertyInfoLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/PropertyInfoLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\StaticMethodLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/StaticMethodLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\XmlFileLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/XmlFileLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\XmlFilesLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/XmlFilesLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\YamlFileLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/YamlFileLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\YamlFilesLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/YamlFilesLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\MemberMetadata' => __DIR__ . '/..' . '/symfony/validator/Mapping/MemberMetadata.php', - 'Symfony\\Component\\Validator\\Mapping\\MetadataInterface' => __DIR__ . '/..' . '/symfony/validator/Mapping/MetadataInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\PropertyMetadata' => __DIR__ . '/..' . '/symfony/validator/Mapping/PropertyMetadata.php', - 'Symfony\\Component\\Validator\\Mapping\\PropertyMetadataInterface' => __DIR__ . '/..' . '/symfony/validator/Mapping/PropertyMetadataInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\TraversalStrategy' => __DIR__ . '/..' . '/symfony/validator/Mapping/TraversalStrategy.php', - 'Symfony\\Component\\Validator\\ObjectInitializerInterface' => __DIR__ . '/..' . '/symfony/validator/ObjectInitializerInterface.php', - 'Symfony\\Component\\Validator\\Util\\PropertyPath' => __DIR__ . '/..' . '/symfony/validator/Util/PropertyPath.php', - 'Symfony\\Component\\Validator\\Validation' => __DIR__ . '/..' . '/symfony/validator/Validation.php', - 'Symfony\\Component\\Validator\\ValidatorBuilder' => __DIR__ . '/..' . '/symfony/validator/ValidatorBuilder.php', - 'Symfony\\Component\\Validator\\Validator\\ContextualValidatorInterface' => __DIR__ . '/..' . '/symfony/validator/Validator/ContextualValidatorInterface.php', - 'Symfony\\Component\\Validator\\Validator\\LazyProperty' => __DIR__ . '/..' . '/symfony/validator/Validator/LazyProperty.php', - 'Symfony\\Component\\Validator\\Validator\\RecursiveContextualValidator' => __DIR__ . '/..' . '/symfony/validator/Validator/RecursiveContextualValidator.php', - 'Symfony\\Component\\Validator\\Validator\\RecursiveValidator' => __DIR__ . '/..' . '/symfony/validator/Validator/RecursiveValidator.php', - 'Symfony\\Component\\Validator\\Validator\\TraceableValidator' => __DIR__ . '/..' . '/symfony/validator/Validator/TraceableValidator.php', - 'Symfony\\Component\\Validator\\Validator\\ValidatorInterface' => __DIR__ . '/..' . '/symfony/validator/Validator/ValidatorInterface.php', - 'Symfony\\Component\\Validator\\Violation\\ConstraintViolationBuilder' => __DIR__ . '/..' . '/symfony/validator/Violation/ConstraintViolationBuilder.php', - 'Symfony\\Component\\Validator\\Violation\\ConstraintViolationBuilderInterface' => __DIR__ . '/..' . '/symfony/validator/Violation/ConstraintViolationBuilderInterface.php', 'Symfony\\Component\\VarDumper\\Caster\\AmqpCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/AmqpCaster.php', 'Symfony\\Component\\VarDumper\\Caster\\ArgsStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ArgsStub.php', 'Symfony\\Component\\VarDumper\\Caster\\Caster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/Caster.php', diff --git a/node_modules/gridstack/LICENSE b/node_modules/gridstack/LICENSE new file mode 100644 index 000000000..1473e70e6 --- /dev/null +++ b/node_modules/gridstack/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019-2025 Alain Dumesny. v0.4.0 and older (c) 2014-2018 Pavel Reznikov, Dylan Weiss + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/gridstack/README.md b/node_modules/gridstack/README.md new file mode 100644 index 000000000..c97d8f461 --- /dev/null +++ b/node_modules/gridstack/README.md @@ -0,0 +1,565 @@ +# gridstack.js + +[![NPM version](https://img.shields.io/npm/v/gridstack.svg)](https://www.npmjs.com/package/gridstack) +[![Coverage Status](https://coveralls.io/repos/github/gridstack/gridstack.js/badge.svg?branch=develop)](https://coveralls.io/github/gridstack/gridstack.js?branch=develop) +[![downloads](https://img.shields.io/npm/dm/gridstack.svg)](https://www.npmjs.com/package/gridstack) + +Mobile-friendly modern Typescript library for dashboard layout and creation. Making a drag-and-drop, multi-column responsive dashboard has never been easier. Has multiple bindings and works great with [Angular](https://angular.io/) (included), [React](https://reactjs.org/), [Vue](https://vuejs.org/), [Knockout.js](http://knockoutjs.com), [Ember](https://www.emberjs.com/) and others (see [frameworks](#specific-frameworks) section). + +Inspired by no-longer maintained gridster, built with love. + +Check http://gridstackjs.com and [these demos](http://gridstackjs.com/demo/). + +If you find this lib useful, please donate [PayPal](https://www.paypal.me/alaind831) (use **“send to a friend”** to avoid 3% fee) or [Venmo](https://www.venmo.com/adumesny) (adumesny) and help support it! + +[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/alaind831) +[![Donate](https://img.shields.io/badge/Donate-Venmo-g.svg)](https://www.venmo.com/adumesny) + +Join us on Slack: [https://gridstackjs.slack.com](https://join.slack.com/t/gridstackjs/shared_invite/zt-3978nsff6-HDNE_N45DydP36NBSV9JFQ) + + + + +**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* + +- [Demo and API Documentation](#demo-and-api-documentation) +- [Usage](#usage) + - [Install](#install) + - [Include](#include) + - [Basic usage](#basic-usage) + - [Requirements](#requirements) + - [Specific frameworks](#specific-frameworks) + - [Extend Library](#extend-library) + - [Extend Engine](#extend-engine) + - [Change grid columns](#change-grid-columns) + - [Custom columns CSS (OLD, not needed with v12+)](#custom-columns-css-old-not-needed-with-v12) + - [Override resizable/draggable options](#override-resizabledraggable-options) + - [Touch devices support](#touch-devices-support) +- [Migrating](#migrating) + - [Migrating to v0.6](#migrating-to-v06) + - [Migrating to v1](#migrating-to-v1) + - [Migrating to v2](#migrating-to-v2) + - [Migrating to v3](#migrating-to-v3) + - [Migrating to v4](#migrating-to-v4) + - [Migrating to v5](#migrating-to-v5) + - [Migrating to v6](#migrating-to-v6) + - [Migrating to v7](#migrating-to-v7) + - [Migrating to v8](#migrating-to-v8) + - [Migrating to v9](#migrating-to-v9) + - [Migrating to v10](#migrating-to-v10) + - [Migrating to v11](#migrating-to-v11) + - [Migrating to v12](#migrating-to-v12) +- [jQuery Application](#jquery-application) +- [Changes](#changes) +- [Usage Trend](#usage-trend) +- [The Team](#the-team) + + + + +# Demo and API Documentation + +Please visit http://gridstackjs.com and [these demos](http://gridstackjs.com/demo/), and complete [API documentation](https://gridstack.github.io/gridstack.js/doc/html/) ([markdown](https://github.com/gridstack/gridstack.js/tree/master/doc/API.md)) + +# Usage + +## Install +[![NPM version](https://img.shields.io/npm/v/gridstack.svg)](https://www.npmjs.com/package/gridstack) + +```js +yarn add gridstack +// or +npm install --save gridstack +``` + +## Include + +ES6 or Typescript + +```js +import 'gridstack/dist/gridstack.min.css'; +import { GridStack } from 'gridstack'; +``` + +Alternatively (single combined file, notice the -all.js) in html + +```html + + +``` + +**Note**: IE support was dropped in v2, but restored in v4.4 by an external contributor (I have no interest in testing+supporting obsolete browser so this likely will break again in the future) and DROPPED again in v12 (css variable needed). +You can use the es5 files and polyfill (larger) for older browser instead. For example: +```html + + + +``` + + +## Basic usage + +creating items dynamically... + +```js +// ...in your HTML +
+ +// ...in your script +var grid = GridStack.init(); +grid.addWidget({w: 2, content: 'item 1'}); +``` + +... or creating from list + +```js +// using serialize data instead of .addWidget() +const serializedData = [ + {x: 0, y: 0, w: 2, h: 2}, + {x: 2, y: 3, w: 3, content: 'item 2'}, + {x: 1, y: 3} +]; + +grid.load(serializedData); +``` + +... or DOM created items + +```js +// ...in your HTML +
+
+
Item 1
+
+
+
Item 2 wider
+
+
+ +// ...in your script +GridStack.init(); +``` + +...or see list of all [API and options](https://github.com/gridstack/gridstack.js/tree/master/doc) available. + +see [stackblitz sample](https://stackblitz.com/edit/gridstack-demo) as running example too. + +## Requirements + +GridStack no longer requires external dependencies as of v1 (lodash was removed in v0.5 and jquery API in v1). v3 is a complete HTML5 re-write removing need for jquery. v6 is native mouse and touch event for mobile support, and no longer have jquery-ui version. All you need to include now is `gridstack-all.js` and `gridstack.min.css` (layouts are done using CSS column based %). + +## Specific frameworks + +search for ['gridstack' under NPM](https://www.npmjs.com/search?q=gridstack&ranking=popularity) for latest, more to come... + +- **Angular**: we ship out of the box an Angular wrapper - see Angular Component. +- **Angular9**: [lb-gridstack](https://github.com/pfms84/lb-gridstack) Note: very old v0.3 gridstack instance so recommend for **concept ONLY if you wish to use directive instead**. Code has **not been vented** at as I use components. +- **AngularJS**: [gridstack-angular](https://github.com/kdietrich/gridstack-angular) +- **Ember**: [ember-gridstack](https://github.com/yahoo/ember-gridstack) +- **knockout**: see [demo](https://gridstackjs.com/demo/knockout.html) using component, but check [custom bindings ticket](https://github.com/gridstack/gridstack.js/issues/465) which is likely better approach. +- **Rails**: [gridstack-js-rails](https://github.com/randoum/gridstack-js-rails) +- **React**: work in progress to have wrapper code: see React Component. But also see [demo](https://gridstackjs.com/demo/react.html) with [src](https://github.com/gridstack/gridstack.js/tree/master/demo/react.html), or [react-gridstack-example](https://github.com/Inder2108/react-gridstack-example/tree/master/src/App.js), or read on what [hooks to use](https://github.com/gridstack/gridstack.js/issues/735#issuecomment-329888796) +- **Vue**: see [demo](https://gridstackjs.com/demo/vue3js.html) with [v3 src](https://github.com/gridstack/gridstack.js/tree/master/demo/vue3js.html) or [v2 src](https://github.com/gridstack/gridstack.js/tree/master/demo/vue2js.html) +- **Aurelia**: [aurelia-gridstack](https://github.com/aurelia-ui-toolkits/aurelia-gridstack), see [demo](https://aurelia-ui-toolkits.github.io/aurelia-gridstack/) + +## Extend Library + +You can easily extend or patch gridstack with code like this: + +```js +// extend gridstack with our own custom method +GridStack.prototype.printCount = function() { + console.log('grid has ' + this.engine.nodes.length + ' items'); +}; + +let grid = GridStack.init(); + +// you can now call +grid.printCount(); +``` + +## Extend Engine + +You can now (5.1+) easily create your own layout engine to further customize your usage. Here is a typescript example + +```ts +import { GridStack, GridStackEngine, GridStackNode, GridStackMoveOpts } from 'gridstack'; + +class CustomEngine extends GridStackEngine { + + /** refined this to move the node to the given new location */ + public override moveNode(node: GridStackNode, o: GridStackMoveOpts): boolean { + // keep the same original X and Width and let base do it all... + o.x = node.x; + o.w = node.w; + return super.moveNode(node, o); + } +} + +GridStack.registerEngine(CustomEngine); // globally set our custom class +``` + +## Change grid columns + +GridStack makes it very easy if you need [1-12] columns out of the box (default is 12), but you always need **2 things** if you need to customize this: + +1) Change the `column` grid option when creating a grid to your number N +```js +GridStack.init( {column: N} ); +``` + +NOTE: step 2 is OLD and not needed with v12+ which uses CSS variables instead of classes + +2) also include `gridstack-extra.css` if **N < 12** (else custom CSS - see next). Without these, things will not render/work correctly. +```html + + + +
...
+``` + +Note: class `.grid-stack-N` will automatically be added and we include `gridstack-extra.min.css` which defines CSS for grids with custom [2-11] columns. Anything more and you'll need to generate the SASS/CSS yourself (see next). + +See example: [2 grids demo](http://gridstack.github.io/gridstack.js/demo/two.html) with 6 columns + +## Custom columns CSS (OLD, not needed with v12+) + +NOTE: step is OLD and not needed with v12+ which uses CSS variables instead of classes + +If you need > 12 columns or want to generate the CSS manually you will need to generate CSS rules for `.grid-stack-item[gs-w="X"]` and `.grid-stack-item[gs-x="X"]`. + +For instance for 4-column grid you need CSS to be: + +```css +.gs-4 > .grid-stack-item[gs-x="1"] { left: 25% } +.gs-4 > .grid-stack-item[gs-x="2"] { left: 50% } +.gs-4 > .grid-stack-item[gs-x="3"] { left: 75% } + +.gs-4 > .grid-stack-item { width: 25% } +.gs-4 > .grid-stack-item[gs-w="2"] { width: 50% } +.gs-4 > .grid-stack-item[gs-w="3"] { width: 75% } +.gs-4 > .grid-stack-item[gs-w="4"] { width: 100% } +``` + +Better yet, here is a SCSS code snippet, you can use sites like [sassmeister.com](https://www.sassmeister.com/) to generate the CSS for you instead: + +```scss +$columns: 20; +@function fixed($float) { + @return round($float * 1000) / 1000; // total 2+3 digits being % +} +.gs-#{$columns} > .grid-stack-item { + + width: fixed(100% / $columns); + + @for $i from 1 through $columns - 1 { + &[gs-x='#{$i}'] { left: fixed((100% / $columns) * $i); } + &[gs-w='#{$i+1}'] { width: fixed((100% / $columns) * ($i+1)); } + } +} +``` + +you can also use the SCSS [src/gridstack-extra.scss](https://github.com/gridstack/gridstack.js/tree/master/src/gridstack-extra.scss) included in NPM package and modify to add more columns. + +Sample gulp command for 30 columns: +```js +gulp.src('node_modules/gridstack/dist/src/gridstack-extra.scss') + .pipe(replace('$start: 2 !default;','$start: 30;')) + .pipe(replace('$end: 11 !default;','$end: 30;')) + .pipe(sass({outputStyle: 'compressed'})) + .pipe(rename({extname: '.min.css'})) + .pipe(gulp.dest('dist/css')) +``` + +## Override resizable/draggable options + +You can override default `resizable`/`draggable` options. For instance to enable other then bottom right resizing handle +you can init gridstack like: + +```js +GridStack.init({ + resizable: { + handles: 'e,se,s,sw,w' + } +}); +``` + +## Touch devices support + +gridstack v6+ now support mobile out of the box, with the addition of native touch event (along with mouse event) for drag&drop and resize. +Older versions (3.2+) required the jq version with added touch punch, but doesn't work well with nested grids. + +This option is now the default: + +```js +let options = { + alwaysShowResizeHandle: 'mobile' // true if we're on mobile devices +}; +GridStack.init(options); +``` + +See [example](http://gridstack.github.io/gridstack.js/demo/mobile.html). + +# Migrating +## Migrating to v0.6 + +starting in 0.6.x `change` event are no longer sent (for pretty much most nodes!) when an item is just added/deleted unless it also changes other nodes (was incorrect and causing inefficiencies). You may need to track `added|removed` [events](https://github.com/gridstack/gridstack.js/tree/master/doc#events) if you didn't and relied on the old broken behavior. + +## Migrating to v1 + +v1.0.0 removed Jquery from the API and external dependencies, which will require some code changes. Here is a list of the changes: + +0. see previous step if not on v0.6 already + +1. your code only needs to `import GridStack from 'gridstack'` or include `gridstack.all.js` and `gristack.css` (don't include other JS) and is recommended you do that as internal dependencies will change over time. If you are jquery based, see [jquery app](#jquery-application) section. + +2. code change: + +**OLD** initializing code + adding a widget + adding an event: +```js +// initialization returned Jquery element, requiring second call to get GridStack var +var grid = $('.grid-stack').gridstack(opts?).data('gridstack'); + +// returned Jquery element +grid.addWidget($('
test
'), undefined, undefined, 2, undefined, true); + +// jquery event handler +$('.grid-stack').on('added', function(e, items) {/* items contains info */}); + +// grid access after init +var grid = $('.grid-stack').data('gridstack'); +``` +**NEW** +```js +// element identifier defaults to '.grid-stack', returns the grid +// Note: for Typescript use window.GridStack.init() until next native 2.x TS version +var grid = GridStack.init(opts?, element?); + +// returns DOM element +grid.addWidget('
test
', {width: 2}); +// Note: in 3.x it's ever simpler +// grid.addWidget({w:2, content: 'test'}) + +// event handler +grid.on('added', function(e, items) {/* items contains info */}); + +// grid access after init +var grid = el.gridstack; // where el = document.querySelector('.grid-stack') or other ways... +``` +Other rename changes + +```js +`GridStackUI` --> `GridStack` +`GridStackUI.GridStackEngine` --> `GridStack.Engine` +`grid.container` (jquery grid wrapper) --> `grid.el` // (grid DOM element) +`grid.grid` (GridStackEngine) --> `grid.engine` +`grid.setColumn(N)` --> `grid.column(N)` and `grid.column()` // to get value, old API still supported though +``` + +Recommend looking at the [many samples](./demo) for more code examples. + +## Migrating to v2 + +make sure to read v1 migration first! + +v2 is a Typescript rewrite of 1.x, removing all jquery events, using classes and overall code cleanup to support ES6 modules. Your code might need to change from 1.x + +1. In general methods that used no args (getter) vs setter can't be used in TS when the arguments differ (set/get are also not function calls so API would have changed). Instead we decided to have all set methods return `GridStack` to they can be chain-able (ex: `grid.float(true).cellHeight(10).column(6)`). Also legacy methods that used to take many parameters will now take a single object (typically `GridStackOptions` or `GridStackWidget`). + +```js +`addWidget(el, x, y, width, height)` --> `addWidget(el, {with: 2})` +// Note: in 2.1.x you can now just do addWidget({with: 2, content: "text"}) +`float()` --> `getFloat()` // to get value +`cellHeight()` --> `getCellHeight()` // to get value +`verticalMargin` --> `margin` // grid options and API that applies to all 4 sides. +`verticalMargin()` --> `getMargin()` // to get value +``` + +2. event signatures are generic and not jquery-ui dependent anymore. `gsresizestop` has been removed as `resizestop|dragstop` are now called **after** the DOM attributes have been updated. + +3. `oneColumnMode` would trigger when `window.width` < 768px by default. We now check for grid width instead (more correct and supports nesting). You might need to adjust grid `oneColumnSize` or `disableOneColumnMode`. + +**Note:** 2.x no longer support legacy IE11 and older due to using more compact ES6 output and typecsript native code. You will need to stay at 1.x + +## Migrating to v3 + +make sure to read v2 migration first! + +v3 has a new HTML5 drag&drop plugging (63k total, all native code), while still allowing you to use the legacy jquery-ui version instead (188k), or a new static grid version (34k, no user drag&drop but full API support). You will need to decide which version to use as `gridstack.all.js` no longer exist (same is now `gridstack-jq.js`) - see [include info](#include). + +**NOTE**: HTML5 version is almost on parity with the old jquery-ui based drag&drop. the `containment` (prevent a child from being dragged outside it's parent) and `revert` (not clear what it is for yet) are not yet implemented in initial release of v3.0.0.
+Also mobile devices don't support h5 `drag` events (will need to handle `touch`) whereas v3.2 jq version now now supports out of the box (see [v3.2 release](https://github.com/gridstack/gridstack.js/releases/tag/v3.2.0)) + +Breaking changes: + +1. include (as mentioned) need to change + +2. `GridStack.update(el, opt)` now takes single `GridStackWidget` options instead of only supporting (x,y,w,h) BUT legacy call in JS will continue working the same for now. That method is a complete re-write and does the right constrain and updates now for all the available params. + +3. `locked()`, `move()`, `resize()`, `minWidth()`, `minHeight()`, `maxWidth()`, `maxHeight()` methods are hidden from Typescript (JS can still call for now) as they are just 1 liner wrapper around `update(el, opt)` anyway and will go away soon. (ex: `move(el, x, y)` => `update(el, {x, y})`) + +4. item attribute like `data-gs-min-width` is now `gs-min-w`. We removed 'data-' from all attributes, and shorten 'width|height' to just 'w|h' to require less typing and more efficient (2k saved in .js alone!). + +5. `GridStackWidget` used in most API `width|height|minWidth|minHeight|maxWidth|maxHeight` are now shorter `w|h|minW|minH|maxW|maxH` as well + +## Migrating to v4 + +make sure to read v3 migration first! + +v4 is a complete re-write of the collision and drag in/out heuristics to fix some very long standing request & bugs. It also greatly improved usability. Read the release notes for more detail. + +**Unlikely** Breaking Changes (internal usage): + +1. `removeTimeout` was removed (feedback over trash will be immediate - actual removal still on mouse up) + +2. the following `GridStackEngine` methods changed (used internally, doesn't affect `GridStack` public API) + +```js +// moved to 3 methods with new option params to support new code and pixel coverage check +`collision()` -> `collide(), collideAll(), collideCoverage()` +`moveNodeCheck(node, x, y, w, h)` -> `moveNodeCheck(node, opt: GridStackMoveOpts)` +`isNodeChangedPosition(node, x, y, w, h)` -> `changedPosConstrain(node, opt: GridStackMoveOpts)` +`moveNode(node, x, y, w, h, noPack)` -> `moveNode(node, opt: GridStackMoveOpts)` +``` + +3. removed old obsolete (v0.6-v1 methods/attrs) `getGridHeight()`, `verticalMargin`, `data-gs-current-height`, +`locked()`, `maxWidth()`, `minWidth()`, `maxHeight()`, `minHeight()`, `move()`, `resize()` + + +## Migrating to v5 + +make sure to read v4 migration first! + +v5 does not have any breaking changes from v4, but a focus on nested grids in h5 mode: +You can now drag in/out of parent into nested child, with new API parameters values. See the release notes. + +## Migrating to v6 + +the API did not really change from v5, but a complete re-write of Drag&Drop to use native `mouseevent` (instead of HTML draggable=true which is buggy on Mac Safari, and doesn't work on mobile devices) and `touchevent` (mobile), and we no longer have jquery ui option (wasn't working well for nested grids, didn't want to maintain legacy lib). + +The main difference is you only need to include gridstack.js and get D&D (desktop and mobile) out of the box for the same size as h5 version. + +## Migrating to v7 + +New addition, no API breakage per say. See release notes about creating sub-grids on the fly. + +## Migrating to v8 + +Possible breaking change if you use nested grid JSON format, or original Angular wrapper, or relied on specific CSS paths. Also target is now ES2020 (see release notes). +* `GridStackOptions.subGrid` -> `GridStackOptions.subGridOpts` rename. We now have `GridStackWidget.subGridOpts` vs `GridStackNode.subGrid` (was both types which is error prone) +* `GridStackOptions.addRemoveCB` -> `GridStack.addRemoveCB` is now global instead of grid option +* removed `GridStackOptions.dragInOptions` since `GridStack.setupDragIn()` has it replaced since 4.0 +* remove `GridStackOptions.minWidth` obsolete since 5.1, use `oneColumnSize` instead +* CSS rules removed `.grid-stack` prefix for anything already gs based, 12 column (default) now uses `.gs-12`, extra.css is less than 1/4th it original size!, `gs-min|max_w|h` attribute no longer written (but read) + +## Migrating to v9 + +New addition - see release notes about `sizeToContent` feature. +Possible break: +* `GridStack.onParentResize()` is now called `onResize()` as grid now directly track size change, no longer involving parent per say to tell us anything. Note sure why it was public. + +## Migrating to v10 + +we now support much richer responsive behavior with `GridStackOptions.columnOpts` including any breakpoint width:column pairs, or automatic column sizing. + +breaking change: +* `disableOneColumnMode`, `oneColumnSize` have been removed (thought we temporary convert if you have them). use `columnOpts: { breakpoints: [{w:768, c:1}] }` for the same behavior. +* 1 column mode switch is no longer by default (`columnOpts` is not defined) as too many new users had issues. Instead set it explicitly (see above). +* `oneColumnModeDomSort` has been removed. Planning to support per column layouts at some future times. TBD + +## Migrating to v11 + +* All instances of `el.innerHTML = 'some content'` have been removed for security reason as it opens up some potential for accidental XSS. + +* Side panel drag&drop complete rewrite. + +* new lazy loading option + +**Breaking change:** + +* V11 add new `GridStack.renderCB` that is called for you to create the widget content (entire GridStackWidget is passed so you can use id or some other field as logic) while GS creates the 2 needed parent divs + classes, unlike `GridStack.addRemoveCB` which doesn't create anything for you. Both can be handy for Angular/React/Vue frameworks. +* `addWidget(w: GridStackWidget)` is now the only supported format, no more string content passing. You will need to create content yourself as shown below, OR use `GridStack.createWidgetDivs()` to create parent divs, do the innerHtml, then call `makeWidget(el)` instead. +* if your code relies on `GridStackWidget.content` with real HTML (like a few demos) it is up to you to do this: +```ts +// NOTE: REAL apps would sanitize-html or DOMPurify before blinding setting innerHTML. see #2736 +GridStack.renderCB = function(el: HTMLElement, w: GridStackNode) { + el.innerHTML = w.content; +}; + +// now you can create widgets like this again +let gridWidget = grid.addWidget({x, y, w, h, content: '
My html content
'}); +``` + +**Potential breaking change:** + +* BIG overall to how sidepanel helper drag&drop is done: +1. `clone()` helper is now passed full HTML element dragged, not an event on `grid-stack-item-content` so you can clone or set attr at the top. +2. use any class/structure you want for side panel items (see two.html) +3. `GridStack.setupDragIn()` now support associating a `GridStackWidget` for each sidepanel that will be used to define what to create on drop! +4. if no `GridStackWidget` is defined, the helper will now be inserted as is, and NOT original sidepanel item. +5. support DOM gs- attr as well as gridstacknode JSON (see two.html) alternatives. + +## Migrating to v12 + +* column and cell height code has been re-writen to use browser CSS variables, and we no longer need a tons of custom CSS classes! +this fixes a long standing issue where people forget to include the right CSS for non 12 columns layouts, and a big speedup in many cases (many columns, or small cellHeight values). + +**Potential breaking change:** +* `gridstack-extra.min.css` no longer exist, nor is custom column CSS classes needed. API/options hasn't changed. +* (v12.1) `ES5` folder content has been removed - was for IE support, which has been dropped. +* (v12.1) nested grid events are now sent to the main grid. You might have to adjust your workaround of this missing feature. nested.html demo has been adjusted. + +# jQuery Application + +This is **old and no longer apply to v6+**. You'll need to use v5.1.1 and before + +```js +import 'gridstack/dist/gridstack.min.css'; +import { GridStack } from 'gridstack'; +import 'gridstack/dist/jq/gridstack-dd-jqueryui'; +``` +**Note**: `jquery` & `jquery-ui` are imported by name, so you will have to specify their location in your webpack (or equivalent) config file, +which means you can possibly bring your own version +```js + alias: { + 'jquery': 'gridstack/dist/jq/jquery.js', + 'jquery-ui': 'gridstack/dist/jq/jquery-ui.js', + 'jquery.ui': 'gridstack/dist/jq/jquery-ui.js', + 'jquery.ui.touch-punch': 'gridstack/dist/jq/jquery.ui.touch-punch.js', + }, +``` +Alternatively (single combined file) in html + +```html + + + + + + + +``` + +We have a native HTML5 drag'n'drop through the plugin system (default), but the jquery-ui version can be used instead. It will bundle `jquery` (3.5.1) + `jquery-ui` (1.13.1 minimal drag|drop|resize) + `jquery-ui-touch-punch` (1.0.8 for mobile support) in `gridstack-jq.js`. + +**NOTE: in v4, v3**: we ES6 module import jquery & jquery-ui by name, so you need to specify location of those .js files, which means you might be able to bring your own version as well. See the include instructions. + +**NOTE: in v1.x** IFF you want to use gridstack-jq instead and your app needs to bring your own JQ version, you should **instead** include `gridstack-poly.min.js` (optional IE support) + `gridstack.min.js` + `gridstack.jQueryUI.min.js` after you import your JQ libs. But note that there are issue with jQuery and ES6 import (see [1306](https://github.com/gridstack/gridstack.js/issues/1306)). + +As for events, you can still use `$(".grid-stack").on(...)` for the version that uses jquery-ui for things we don't support. + +# Changes + +View our change log [here](https://github.com/gridstack/gridstack.js/tree/master/doc/CHANGES.md). + +# Usage Trend + +[Usage Trend of gridstack](https://npm-compare.com/gridstack#timeRange=THREE_YEARS) + + + NPM Usage Trend of gridstack + + +# The Team + +gridstack.js is currently maintained by [Alain Dumesny](https://github.com/adumesny), before that [Dylan Weiss](https://github.com/radiolips), originally created by [Pavel Reznikov](https://github.com/troolee). We appreciate [all contributors](https://github.com/gridstack/gridstack.js/graphs/contributors) for help. diff --git a/node_modules/gridstack/dist/angular/README.md b/node_modules/gridstack/dist/angular/README.md new file mode 100644 index 000000000..79abfc0ff --- /dev/null +++ b/node_modules/gridstack/dist/angular/README.md @@ -0,0 +1,211 @@ +# Angular wrapper + +The Angular [wrapper component](projects/lib/src/lib/gridstack.component.ts) is a better way to use Gridstack, but alternative raw [ngFor](projects/demo/src/app/ngFor.ts) or [simple](projects/demo/src/app/simple.ts) demos are also given. + +Running version can be seen here https://stackblitz.com/edit/gridstack-angular + +# Dynamic grid items + +this is the recommended way if you are going to have multiple grids (alow drag&drop between) or drag from toolbar to create items, or drag to remove items, etc... + +I.E. don't use Angular templating to create grid items as that is harder to sync when gridstack will also add/remove items. + +MyComponent HTML + +```html + +``` + +MyComponent CSS + +```css +@import "gridstack/dist/gridstack.min.css"; + +.grid-stack { + background: #fafad2; +} +.grid-stack-item-content { + text-align: center; + background-color: #18bc9c; +} +``` + + +Standalone MyComponent Code + +```ts +import { GridStackOptions } from 'gridstack'; +import { GridstackComponent, GridstackItemComponent } from 'gridstack/dist/angular'; + +@Component({ + imports: [ // SKIP if doing module import instead (next) + GridstackComponent, + GridstackItemComponent + ] + ... + }) +export class MyComponent { + // sample grid options + items to load... + public gridOptions: GridStackOptions = { + margin: 5, + children: [ // or call load(children) or addWidget(children[0]) with same data + {x:0, y:0, minW:2, content:'Item 1'}, + {x:1, y:0, content:'Item 2'}, + {x:0, y:1, content:'Item 3'}, + ] + } + +} +``` + +IF doing module import instead of standalone, you will also need this: + +```ts +import { GridstackModule } from 'gridstack/dist/angular'; + +@NgModule({ + imports: [GridstackModule, ...] + ... + bootstrap: [AppComponent] +}) +export class AppModule { } +``` + +# More Complete example + +In this example (build on previous one) will use your actual custom angular components inside each grid item (instead of dummy html content) and have per component saved settings as well (using BaseWidget). + +HTML + +```html + +
message when grid is empty
+
+``` + +Code + +```ts +import { Component } from '@angular/core'; +import { GridStack, GridStackOptions } from 'gridstack'; +import { GridstackComponent, gsCreateNgComponents, NgGridStackWidget, nodesCB, BaseWidget } from 'gridstack/dist/angular'; + +// some custom components +@Component({ + selector: 'app-a', + template: 'Comp A {{text}}', +}) +export class AComponent extends BaseWidget implements OnDestroy { + @Input() text: string = 'foo'; // test custom input data + public override serialize(): NgCompInputs | undefined { return this.text ? {text: this.text} : undefined; } + ngOnDestroy() { + console.log('Comp A destroyed'); // test to make sure cleanup happens + } +} + +@Component({ + selector: 'app-b', + template: 'Comp B', +}) +export class BComponent extends BaseWidget { +} + +// ...in your module (classic), OR your ng19 app.config provideEnvironmentInitializer call this: +constructor() { + // register all our dynamic components types created by the grid + GridstackComponent.addComponentToSelectorType([AComponent, BComponent]) ; +} + +// now our content will use Components instead of dummy html content +public gridOptions: NgGridStackOptions = { + margin: 5, + minRow: 1, // make space for empty message + children: [ // or call load()/addWidget() with same data + {x:0, y:0, minW:2, selector:'app-a'}, + {x:1, y:0, minW:2, selector:'app-a', input: { text: 'bar' }}, // custom input that works using BaseWidget.deserialize() Object.assign(this, w.input) + {x:2, y:0, selector:'app-b'}, + {x:3, y:0, content:'plain html'}, + ] +} + +// called whenever items change size/position/etc.. see other events +public onChange(data: nodesCB) { + console.log('change ', data.nodes.length > 1 ? data.nodes : data.nodes[0]); +} +``` + +# ngFor with wrapper + +For simple case where you control the children creation (gridstack doesn't do create or re-parenting) + +HTML + +```html + + + @for (n of items; track n.id) { + Item {{n.id}} + } + + Item {{n.id}} + +``` + +Code + +```javascript +import { GridStackOptions, GridStackWidget } from 'gridstack'; +import { nodesCB } from 'gridstack/dist/angular'; + +/** sample grid options and items to load... */ +public gridOptions: GridStackOptions = { margin: 5 } +public items: GridStackWidget[] = [ + {x:0, y:0, minW:2, id:'1'}, // must have unique id used for trackBy + {x:1, y:0, id:'2'}, + {x:0, y:1, id:'3'}, +]; + +// called whenever items change size/position/etc.. +public onChange(data: nodesCB) { + console.log('change ', data.nodes.length > 1 ? data.nodes : data.nodes[0]); +} + +// ngFor unique node id to have correct match between our items used and GS +public identify(index: number, w: GridStackWidget) { + return w.id; // or use index if no id is set and you only modify at the end... +} +``` + +## Demo + +You can see a fuller example at [app.component.ts](projects/demo/src/app/app.component.ts) + +to build the demo, go to [angular/projects/demo](projects/demo/) and run `yarn` + `yarn start` and navigate to `http://localhost:4200/` + +Code started shipping with v8.1.2+ in `dist/angular` for people to use directly and is an angular module! (source code under `dist/angular/src`) + +## Caveats + +- This wrapper needs: + - gridstack v8+ to run as it needs the latest changes (use older version that matches GS versions) + - Angular 14+ for dynamic `createComponent()` API and Standalone Components (verified against 19+) + +NOTE: if you are on Angular 13 or below: copy the wrapper code over (or patch it - see main page example) and change `createComponent()` calls to use old API instead: +NOTE2: now that we're using standalone, you will also need to remove `standalone: true` and `imports` on each component so you will to copy those locally (or use <11.1.2 version) +```ts +protected resolver: ComponentFactoryResolver, +... +const factory = this.resolver.resolveComponentFactory(GridItemComponent); +const gridItemRef = grid.container.createComponent(factory) as ComponentRef; +// ...do the same for widget selector... +``` + +## ngFor Caveats + +- This wrapper handles well ngFor loops, but if you're using a trackBy function (as I would recommend) and no element id change after an update, + you must manually update the `GridstackItemComponent.option` directly - see [modifyNgFor()](./projects/demo/src/app/app.component.ts#L202) example. +- The original client list of items is not updated to match **content** changes made by gridstack (TBD later), but adding new item or removing (as shown in demo) will update those new items. Client could use change/added/removed events to sync that list if they wish to do so. + +Would appreciate getting help doing the same for React and Vue (2 other popular frameworks) + +-Alain diff --git a/node_modules/gridstack/dist/angular/esm2020/gridstack-angular.mjs b/node_modules/gridstack/dist/angular/esm2020/gridstack-angular.mjs new file mode 100644 index 000000000..d468a8234 --- /dev/null +++ b/node_modules/gridstack/dist/angular/esm2020/gridstack-angular.mjs @@ -0,0 +1,5 @@ +/** + * Generated bundle index. Do not edit. + */ +export * from './index'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JpZHN0YWNrLWFuZ3VsYXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9hbmd1bGFyL3Byb2plY3RzL2xpYi9zcmMvZ3JpZHN0YWNrLWFuZ3VsYXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLFNBQVMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG4iXX0= \ No newline at end of file diff --git a/node_modules/gridstack/dist/angular/esm2020/index.mjs b/node_modules/gridstack/dist/angular/esm2020/index.mjs new file mode 100644 index 000000000..6760a86f3 --- /dev/null +++ b/node_modules/gridstack/dist/angular/esm2020/index.mjs @@ -0,0 +1,9 @@ +/* + * Public API Surface of gridstack-angular + */ +export * from './lib/types'; +export * from './lib/base-widget'; +export * from './lib/gridstack-item.component'; +export * from './lib/gridstack.component'; +export * from './lib/gridstack.module'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9hbmd1bGFyL3Byb2plY3RzL2xpYi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLGNBQWMsZ0NBQWdDLENBQUM7QUFDL0MsY0FBYywyQkFBMkIsQ0FBQztBQUMxQyxjQUFjLHdCQUF3QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBncmlkc3RhY2stYW5ndWxhclxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL3R5cGVzJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2Jhc2Utd2lkZ2V0JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2dyaWRzdGFjay1pdGVtLmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9ncmlkc3RhY2suY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2dyaWRzdGFjay5tb2R1bGUnO1xuIl19 \ No newline at end of file diff --git a/node_modules/gridstack/dist/angular/esm2020/lib/base-widget.mjs b/node_modules/gridstack/dist/angular/esm2020/lib/base-widget.mjs new file mode 100644 index 000000000..ebc09ba53 --- /dev/null +++ b/node_modules/gridstack/dist/angular/esm2020/lib/base-widget.mjs @@ -0,0 +1,90 @@ +/** + * gridstack-item.component.ts 12.3.3 + * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license + */ +/** + * Abstract base class that all custom widgets should extend. + * + * This class provides the interface needed for GridstackItemComponent to: + * - Serialize/deserialize widget data + * - Save/restore widget state + * - Integrate with Angular lifecycle + * + * Extend this class when creating custom widgets for dynamic grids. + * + * @example + * ```typescript + * @Component({ + * selector: 'my-custom-widget', + * template: '
{{data}}
' + * }) + * export class MyCustomWidget extends BaseWidget { + * @Input() data: string = ''; + * + * serialize() { + * return { data: this.data }; + * } + * } + * ``` + */ +import { Injectable } from '@angular/core'; +import * as i0 from "@angular/core"; +/** + * Base widget class for GridStack Angular integration. + */ +export class BaseWidget { + /** + * Override this method to return serializable data for this widget. + * + * Return an object with properties that map to your component's @Input() fields. + * The selector is handled automatically, so only include component-specific data. + * + * @returns Object containing serializable component data + * + * @example + * ```typescript + * serialize() { + * return { + * title: this.title, + * value: this.value, + * settings: this.settings + * }; + * } + * ``` + */ + serialize() { return; } + /** + * Override this method to handle widget restoration from saved data. + * + * Use this for complex initialization that goes beyond simple @Input() mapping. + * The default implementation automatically assigns input data to component properties. + * + * @param w The saved widget data including input properties + * + * @example + * ```typescript + * deserialize(w: NgGridStackWidget) { + * super.deserialize(w); // Call parent for basic setup + * + * // Custom initialization logic + * if (w.input?.complexData) { + * this.processComplexData(w.input.complexData); + * } + * } + * ``` + */ + deserialize(w) { + // save full description for meta data + this.widgetItem = w; + if (!w) + return; + if (w.input) + Object.assign(this, w.input); + } +} +BaseWidget.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseWidget, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); +BaseWidget.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseWidget }); +i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseWidget, decorators: [{ + type: Injectable + }] }); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS13aWRnZXQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9hbmd1bGFyL3Byb2plY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GRhdGFcclxuICAgIHRoaXMud2lkZ2V0SXRlbSA9IHc7XHJcbiAgICBpZiAoIXcpIHJldHVybjtcclxuXHJcbiAgICBpZiAody5pbnB1dCkgIE9iamVjdC5hc3NpZ24odGhpcywgdy5pbnB1dCk7XHJcbiAgfVxyXG4gfVxyXG4iXX0= \ No newline at end of file diff --git a/node_modules/gridstack/dist/angular/esm2020/lib/gridstack-item.component.mjs b/node_modules/gridstack/dist/angular/esm2020/lib/gridstack-item.component.mjs new file mode 100644 index 000000000..da5e052c9 --- /dev/null +++ b/node_modules/gridstack/dist/angular/esm2020/lib/gridstack-item.component.mjs @@ -0,0 +1,101 @@ +/** + * gridstack-item.component.ts 12.3.3 + * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license + */ +import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core'; +import * as i0 from "@angular/core"; +/** + * Angular component wrapper for individual GridStack items. + * + * This component represents a single grid item and handles: + * - Dynamic content creation and management + * - Integration with parent GridStack component + * - Component lifecycle and cleanup + * - Widget options and configuration + * + * Use in combination with GridstackComponent for the parent grid. + * + * @example + * ```html + * + * + * + * + * + * ``` + */ +export class GridstackItemComponent { + constructor(elementRef) { + this.elementRef = elementRef; + this.el._gridItemComp = this; + } + /** + * Grid item configuration options. + * Defines position, size, and behavior of this grid item. + * + * @example + * ```typescript + * itemOptions: GridStackNode = { + * x: 0, y: 0, w: 2, h: 1, + * noResize: true, + * content: 'Item content' + * }; + * ``` + */ + set options(val) { + const grid = this.el.gridstackNode?.grid; + if (grid) { + // already built, do an update... + grid.update(this.el, val); + } + else { + // store our custom element in options so we can update it and not re-create a generic div! + this._options = { ...val, el: this.el }; + } + } + /** return the latest grid options (from GS once built, otherwise initial values) */ + get options() { + return this.el.gridstackNode || this._options || { el: this.el }; + } + /** return the native element that contains grid specific fields as well */ + get el() { return this.elementRef.nativeElement; } + /** clears the initial options now that we've built */ + clearOptions() { + delete this._options; + } + ngOnDestroy() { + this.clearOptions(); + delete this.childWidget; + delete this.el._gridItemComp; + delete this.container; + delete this.ref; + } +} +GridstackItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackItemComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); +GridstackItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: GridstackItemComponent, isStandalone: true, selector: "gridstack-item", inputs: { options: "options" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: ` +
+ + + + + + {{options.content}} +
`, isInline: true, styles: [":host{display:block}\n"] }); +i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackItemComponent, decorators: [{ + type: Component, + args: [{ selector: 'gridstack-item', template: ` +
+ + + + + + {{options.content}} +
`, standalone: true, styles: [":host{display:block}\n"] }] + }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { container: [{ + type: ViewChild, + args: ['container', { read: ViewContainerRef, static: true }] + }], options: [{ + type: Input + }] } }); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JpZHN0YWNrLWl0ZW0uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vYW5ndWxhci9wcm9qZWN0cy9saWIvc3JjL2xpYi9ncmlkc3RhY2staXRlbS5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7OztHQUdHO0FBRUgsT0FBTyxFQUFFLFNBQVMsRUFBYyxLQUFLLEVBQUUsU0FBUyxFQUFFLGdCQUFnQixFQUEyQixNQUFNLGVBQWUsQ0FBQzs7QUFhbkg7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FtQkc7QUFrQkgsTUFBTSxPQUFPLHNCQUFzQjtJQT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2VsbCAqL1xuICBwdWJsaWMgZ2V0IGVsKCk6IEdyaWRJdGVtQ29tcEhUTUxFbGVtZW50IHsgcmV0dXJuIHRoaXMuZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50OyB9XG5cbiAgLyoqIGNsZWFycyB0aGUgaW5pdGlhbCBvcHRpb25zIG5vdyB0aGF0IHdlJ3ZlIGJ1aWx0ICovXG4gIHB1YmxpYyBjbGVhck9wdGlvbnMoKSB7XG4gICAgZGVsZXRlIHRoaXMuX29wdGlvbnM7XG4gIH1cblxuICBjb25zdHJ1Y3Rvcihwcm90ZWN0ZWQgcmVhZG9ubHkgZWxlbWVudFJlZjogRWxlbWVudFJlZjxHcmlkSXRlbUNvbXBIVE1MRWxlbWVudD4pIHtcbiAgICB0aGlzLmVsLl9ncmlkSXRlbUNvbXAgPSB0aGlzO1xuICB9XG5cbiAgcHVibGljIG5nT25EZXN0cm95KCk6IHZvaWQge1xuICAgIHRoaXMuY2xlYXJPcHRpb25zKCk7XG4gICAgZGVsZXRlIHRoaXMuY2hpbGRXaWRnZXRcbiAgICBkZWxldGUgdGhpcy5lbC5fZ3JpZEl0ZW1Db21wO1xuICAgIGRlbGV0ZSB0aGlzLmNvbnRhaW5lcjtcbiAgICBkZWxldGUgdGhpcy5yZWY7XG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/node_modules/gridstack/dist/angular/esm2020/lib/gridstack.component.mjs b/node_modules/gridstack/dist/angular/esm2020/lib/gridstack.component.mjs new file mode 100644 index 000000000..05f0d6ec1 --- /dev/null +++ b/node_modules/gridstack/dist/angular/esm2020/lib/gridstack.component.mjs @@ -0,0 +1,414 @@ +/** + * gridstack.component.ts 12.3.3 + * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license + */ +import { Component, ContentChildren, EventEmitter, Input, Output, ViewChild, ViewContainerRef, reflectComponentType } from '@angular/core'; +import { NgIf } from '@angular/common'; +import { GridStack } from 'gridstack'; +import { GridstackItemComponent } from './gridstack-item.component'; +import * as i0 from "@angular/core"; +/** + * Angular component wrapper for GridStack. + * + * This component provides Angular integration for GridStack grids, handling: + * - Grid initialization and lifecycle + * - Dynamic component creation and management + * - Event binding and emission + * - Integration with Angular change detection + * + * Use in combination with GridstackItemComponent for individual grid items. + * + * @example + * ```html + * + *
Drag widgets here
+ *
+ * ``` + */ +export class GridstackComponent { + constructor(elementRef) { + this.elementRef = elementRef; + /** + * GridStack event emitters for Angular integration. + * + * These provide Angular-style event handling for GridStack events. + * Alternatively, use `this.grid.on('event1 event2', callback)` for multiple events. + * + * Note: 'CB' suffix prevents conflicts with native DOM events. + * + * @example + * ```html + * + * + * ``` + */ + /** Emitted when widgets are added to the grid */ + this.addedCB = new EventEmitter(); + /** Emitted when grid layout changes */ + this.changeCB = new EventEmitter(); + /** Emitted when grid is disabled */ + this.disableCB = new EventEmitter(); + /** Emitted during widget drag operations */ + this.dragCB = new EventEmitter(); + /** Emitted when widget drag starts */ + this.dragStartCB = new EventEmitter(); + /** Emitted when widget drag stops */ + this.dragStopCB = new EventEmitter(); + /** Emitted when widget is dropped */ + this.droppedCB = new EventEmitter(); + /** Emitted when grid is enabled */ + this.enableCB = new EventEmitter(); + /** Emitted when widgets are removed from the grid */ + this.removedCB = new EventEmitter(); + /** Emitted during widget resize operations */ + this.resizeCB = new EventEmitter(); + /** Emitted when widget resize starts */ + this.resizeStartCB = new EventEmitter(); + /** Emitted when widget resize stops */ + this.resizeStopCB = new EventEmitter(); + // set globally our method to create the right widget type + if (!GridStack.addRemoveCB) { + GridStack.addRemoveCB = gsCreateNgComponents; + } + if (!GridStack.saveCB) { + GridStack.saveCB = gsSaveAdditionalNgInfo; + } + if (!GridStack.updateCB) { + GridStack.updateCB = gsUpdateNgComponents; + } + this.el._gridComp = this; + } + /** + * Grid configuration options. + * Can be set before grid initialization or updated after grid is created. + * + * @example + * ```typescript + * gridOptions: GridStackOptions = { + * column: 12, + * cellHeight: 'auto', + * animate: true + * }; + * ``` + */ + set options(o) { + if (this._grid) { + this._grid.updateOptions(o); + } + else { + this._options = o; + } + } + /** Get the current running grid options */ + get options() { return this._grid?.opts || this._options || {}; } + /** + * Get the native DOM element that contains grid-specific fields. + * This element has GridStack properties attached to it. + */ + get el() { return this.elementRef.nativeElement; } + /** + * Get the underlying GridStack instance. + * Use this to access GridStack API methods directly. + * + * @example + * ```typescript + * this.gridComponent.grid.addWidget({x: 0, y: 0, w: 2, h: 1}); + * ``` + */ + get grid() { return this._grid; } + /** + * Register a list of Angular components for dynamic creation. + * + * @param typeList Array of component types to register + * + * @example + * ```typescript + * GridstackComponent.addComponentToSelectorType([ + * MyWidgetComponent, + * AnotherWidgetComponent + * ]); + * ``` + */ + static addComponentToSelectorType(typeList) { + typeList.forEach(type => GridstackComponent.selectorToType[GridstackComponent.getSelector(type)] = type); + } + /** + * Extract the selector string from an Angular component type. + * + * @param type The component type to get selector from + * @returns The component's selector string + */ + static getSelector(type) { + return reflectComponentType(type).selector; + } + ngOnInit() { + // init ourself before any template children are created since we track them below anyway - no need to double create+update widgets + this.loaded = !!this.options?.children?.length; + this._grid = GridStack.init(this._options, this.el); + delete this._options; // GS has it now + this.checkEmpty(); + } + /** wait until after all DOM is ready to init gridstack children (after angular ngFor and sub-components run first) */ + ngAfterContentInit() { + // track whenever the children list changes and update the layout... + this._sub = this.gridstackItems?.changes.subscribe(() => this.updateAll()); + // ...and do this once at least unless we loaded children already + if (!this.loaded) + this.updateAll(); + this.hookEvents(this.grid); + } + ngOnDestroy() { + this.unhookEvents(this._grid); + this._sub?.unsubscribe(); + this._grid?.destroy(); + delete this._grid; + delete this.el._gridComp; + delete this.container; + delete this.ref; + } + /** + * called when the TEMPLATE (not recommended) list of items changes - get a list of nodes and + * update the layout accordingly (which will take care of adding/removing items changed by Angular) + */ + updateAll() { + if (!this.grid) + return; + const layout = []; + this.gridstackItems?.forEach(item => { + layout.push(item.options); + item.clearOptions(); + }); + this.grid.load(layout); // efficient that does diffs only + } + /** check if the grid is empty, if so show alternative content */ + checkEmpty() { + if (!this.grid) + return; + this.isEmpty = !this.grid.engine.nodes.length; + } + /** get all known events as easy to use Outputs for convenience */ + hookEvents(grid) { + if (!grid) + return; + // nested grids don't have events in v12.1+ so skip + if (grid.parentGridNode) + return; + grid + .on('added', (event, nodes) => { + const gridComp = nodes[0].grid?.el._gridComp || this; + gridComp.checkEmpty(); + this.addedCB.emit({ event, nodes }); + }) + .on('change', (event, nodes) => this.changeCB.emit({ event, nodes })) + .on('disable', (event) => this.disableCB.emit({ event })) + .on('drag', (event, el) => this.dragCB.emit({ event, el })) + .on('dragstart', (event, el) => this.dragStartCB.emit({ event, el })) + .on('dragstop', (event, el) => this.dragStopCB.emit({ event, el })) + .on('dropped', (event, previousNode, newNode) => this.droppedCB.emit({ event, previousNode, newNode })) + .on('enable', (event) => this.enableCB.emit({ event })) + .on('removed', (event, nodes) => { + const gridComp = nodes[0].grid?.el._gridComp || this; + gridComp.checkEmpty(); + this.removedCB.emit({ event, nodes }); + }) + .on('resize', (event, el) => this.resizeCB.emit({ event, el })) + .on('resizestart', (event, el) => this.resizeStartCB.emit({ event, el })) + .on('resizestop', (event, el) => this.resizeStopCB.emit({ event, el })); + } + unhookEvents(grid) { + if (!grid) + return; + // nested grids don't have events in v12.1+ so skip + if (grid.parentGridNode) + return; + grid.off('added change disable drag dragstart dragstop dropped enable removed resize resizestart resizestop'); + } +} +/** + * Mapping of component selectors to their types for dynamic creation. + * + * This enables dynamic component instantiation from string selectors. + * Angular doesn't provide public access to this mapping, so we maintain our own. + * + * @example + * ```typescript + * GridstackComponent.addComponentToSelectorType([MyWidgetComponent]); + * ``` + */ +GridstackComponent.selectorToType = {}; +GridstackComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); +GridstackComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: GridstackComponent, isStandalone: true, selector: "gridstack", inputs: { options: "options", isEmpty: "isEmpty" }, outputs: { addedCB: "addedCB", changeCB: "changeCB", disableCB: "disableCB", dragCB: "dragCB", dragStartCB: "dragStartCB", dragStopCB: "dragStopCB", droppedCB: "droppedCB", enableCB: "enableCB", removedCB: "removedCB", resizeCB: "resizeCB", resizeStartCB: "resizeStartCB", resizeStopCB: "resizeStopCB" }, queries: [{ propertyName: "gridstackItems", predicate: GridstackItemComponent }], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: ` + + + + + + + `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); +i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackComponent, decorators: [{ + type: Component, + args: [{ selector: 'gridstack', template: ` + + + + + + + `, standalone: true, imports: [NgIf], styles: [":host{display:block}\n"] }] + }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { gridstackItems: [{ + type: ContentChildren, + args: [GridstackItemComponent] + }], container: [{ + type: ViewChild, + args: ['container', { read: ViewContainerRef, static: true }] + }], options: [{ + type: Input + }], isEmpty: [{ + type: Input + }], addedCB: [{ + type: Output + }], changeCB: [{ + type: Output + }], disableCB: [{ + type: Output + }], dragCB: [{ + type: Output + }], dragStartCB: [{ + type: Output + }], dragStopCB: [{ + type: Output + }], droppedCB: [{ + type: Output + }], enableCB: [{ + type: Output + }], removedCB: [{ + type: Output + }], resizeCB: [{ + type: Output + }], resizeStartCB: [{ + type: Output + }], resizeStopCB: [{ + type: Output + }] } }); +/** + * can be used when a new item needs to be created, which we do as a Angular component, or deleted (skip) + **/ +export function gsCreateNgComponents(host, n, add, isGrid) { + if (add) { + // + // create the component dynamically - see https://angular.io/docs/ts/latest/cookbook/dynamic-component-loader.html + // + if (!host) + return; + if (isGrid) { + // TODO: figure out how to create ng component inside regular Div. need to access app injectors... + // if (!container) { + // const hostElement: Element = host; + // const environmentInjector: EnvironmentInjector; + // grid = createComponent(GridstackComponent, {environmentInjector, hostElement})?.instance; + // } + const gridItemComp = host.parentElement?._gridItemComp; + if (!gridItemComp) + return; + // check if gridItem has a child component with 'container' exposed to create under.. + const container = gridItemComp.childWidget?.container || gridItemComp.container; + const gridRef = container?.createComponent(GridstackComponent); + const grid = gridRef?.instance; + if (!grid) + return; + grid.ref = gridRef; + grid.options = n; + return grid.el; + } + else { + const gridComp = host._gridComp; + const gridItemRef = gridComp?.container?.createComponent(GridstackItemComponent); + const gridItem = gridItemRef?.instance; + if (!gridItem) + return; + gridItem.ref = gridItemRef; + // define what type of component to create as child, OR you can do it GridstackItemComponent template, but this is more generic + const selector = n.selector; + const type = selector ? GridstackComponent.selectorToType[selector] : undefined; + if (type) { + // shared code to create our selector component + const createComp = () => { + const childWidget = gridItem.container?.createComponent(type)?.instance; + // if proper BaseWidget subclass, save it and load additional data + if (childWidget && typeof childWidget.serialize === 'function' && typeof childWidget.deserialize === 'function') { + gridItem.childWidget = childWidget; + childWidget.deserialize(n); + } + }; + const lazyLoad = n.lazyLoad || n.grid?.opts?.lazyLoad && n.lazyLoad !== false; + if (lazyLoad) { + if (!n.visibleObservable) { + n.visibleObservable = new IntersectionObserver(([entry]) => { + if (entry.isIntersecting) { + n.visibleObservable?.disconnect(); + delete n.visibleObservable; + createComp(); + } + }); + window.setTimeout(() => n.visibleObservable?.observe(gridItem.el)); // wait until callee sets position attributes + } + } + else + createComp(); + } + return gridItem.el; + } + } + else { + // + // REMOVE - have to call ComponentRef:destroy() for dynamic objects to correctly remove themselves + // Note: this will destroy all children dynamic components as well: gridItem -> childWidget + // + if (isGrid) { + const grid = n.el?._gridComp; + if (grid?.ref) + grid.ref.destroy(); + else + grid?.ngOnDestroy(); + } + else { + const gridItem = n.el?._gridItemComp; + if (gridItem?.ref) + gridItem.ref.destroy(); + else + gridItem?.ngOnDestroy(); + } + } + return; +} +/** + * called for each item in the grid - check if additional information needs to be saved. + * Note: since this is options minus gridstack protected members using Utils.removeInternalForSave(), + * this typically doesn't need to do anything. However your custom Component @Input() are now supported + * using BaseWidget.serialize() + */ +export function gsSaveAdditionalNgInfo(n, w) { + const gridItem = n.el?._gridItemComp; + if (gridItem) { + const input = gridItem.childWidget?.serialize(); + if (input) { + w.input = input; + } + return; + } + // else check if Grid + const grid = n.el?._gridComp; + if (grid) { + //.... save any custom data + } +} +/** + * track when widgeta re updated (rather than created) to make sure we de-serialize them as well + */ +export function gsUpdateNgComponents(n) { + const w = n; + const gridItem = n.el?._gridItemComp; + if (gridItem?.childWidget && w.input) + gridItem.childWidget.deserialize(w); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JpZHN0YWNrLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2FuZ3VsYXIvcHJvamVjdHMvbGliL3NyYy9saWIvZ3JpZHN0YWNrLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7O0dBR0c7QUFFSCxPQUFPLEVBQ2UsU0FBUyxFQUFFLGVBQWUsRUFBYyxZQUFZLEVBQUUsS0FBSyxFQUMxRCxNQUFNLEVBQW1CLFNBQVMsRUFBRSxnQkFBZ0IsRUFBRSxvQkFBb0IsRUFDaEcsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFFLElBQUksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBRXZDLE9BQU8sRUFBd0MsU0FBUyxFQUFvRCxNQUFNLFdBQVcsQ0FBQztBQUk5SCxPQUFPLEVBQTJCLHNCQUFzQixFQUFFLE1BQU0sNEJBQTRCLENBQUM7O0FBa0M3Rjs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FpQkc7QUFrQkgsTUFBTSxPQUFPLGtCQUFrQj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aWRJdGVtID0gKG4uZWwgYXMgR3JpZEl0ZW1Db21wSFRNTEVsZW1lbnQpPy5fZ3JpZEl0ZW1Db21wO1xuICBpZiAoZ3JpZEl0ZW0/LmNoaWxkV2lkZ2V0ICYmIHcuaW5wdXQpIGdyaWRJdGVtLmNoaWxkV2lkZ2V0LmRlc2VyaWFsaXplKHcpO1xufSJdfQ== \ No newline at end of file diff --git a/node_modules/gridstack/dist/angular/esm2020/lib/gridstack.module.mjs b/node_modules/gridstack/dist/angular/esm2020/lib/gridstack.module.mjs new file mode 100644 index 000000000..0068bbd1d --- /dev/null +++ b/node_modules/gridstack/dist/angular/esm2020/lib/gridstack.module.mjs @@ -0,0 +1,53 @@ +/** + * gridstack.component.ts 12.3.3 + * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license + */ +import { NgModule } from "@angular/core"; +import { GridstackItemComponent } from "./gridstack-item.component"; +import { GridstackComponent } from "./gridstack.component"; +import * as i0 from "@angular/core"; +/** + * @deprecated Use GridstackComponent and GridstackItemComponent as standalone components instead. + * + * This NgModule is provided for backward compatibility but is no longer the recommended approach. + * Import components directly in your standalone components or use the new Angular module structure. + * + * @example + * ```typescript + * // Preferred approach - standalone components + * @Component({ + * selector: 'my-app', + * imports: [GridstackComponent, GridstackItemComponent], + * template: '' + * }) + * export class AppComponent {} + * + * // Legacy approach (deprecated) + * @NgModule({ + * imports: [GridstackModule] + * }) + * export class AppModule {} + * ``` + */ +export class GridstackModule { +} +GridstackModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); +GridstackModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: GridstackModule, imports: [GridstackItemComponent, + GridstackComponent], exports: [GridstackItemComponent, + GridstackComponent] }); +GridstackModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackModule, imports: [GridstackItemComponent, + GridstackComponent] }); +i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackModule, decorators: [{ + type: NgModule, + args: [{ + imports: [ + GridstackItemComponent, + GridstackComponent, + ], + exports: [ + GridstackItemComponent, + GridstackComponent, + ], + }] + }] }); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JpZHN0YWNrLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2FuZ3VsYXIvcHJvamVjdHMvbGliL3NyYy9saWIvZ3JpZHN0YWNrLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7O0dBR0c7QUFFSCxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRXpDLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBQ3BFLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLHVCQUF1QixDQUFDOztBQUUzRDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQXNCRztBQVdILE1BQU0sT0FBTyxlQUFlOzs0R0FBZixlQUFlOzZHQUFmLGVBQWUsWUFSeEIsc0JBQXNCO1FBQ3RCLGtCQUFrQixhQUdsQixzQkFBc0I7UUFDdEIsa0JBQWtCOzZHQUdULGVBQWUsWUFSeEIsc0JBQXNCO1FBQ3RCLGtCQUFrQjsyRkFPVCxlQUFlO2tCQVYzQixRQUFRO21CQUFDO29CQUNSLE9BQU8sRUFBRTt3QkFDUCxzQkFBc0I7d0JBQ3RCLGtCQUFrQjtxQkFDbkI7b0JBQ0QsT0FBTyxFQUFFO3dCQUNQLHNCQUFzQjt3QkFDdEIsa0JBQWtCO3FCQUNuQjtpQkFDRiIsInNvdXJjZXNDb250ZW50I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25lbnQsIEdyaWRzdGFja0l0ZW1Db21wb25lbnRdLFxyXG4gKiAgIHRlbXBsYXRlOiAnPGdyaWRzdGFjaz48L2dyaWRzdGFjaz4nXHJcbiAqIH0pXHJcbiAqIGV4cG9ydCBjbGFzcyBBcHBDb21wb25lbnQge31cclxuICogXHJcbiAqIC8vIExlZ2FjeSBhcHByb2FjaCAoZGVwcmVjYXRlZClcclxuICogQE5nTW9kdWxlKHtcclxuICogICBpbXBvcnRzOiBbR3JpZHN0YWNrTW9kdWxlXVxyXG4gKiB9KVxyXG4gKiBleHBvcnQgY2xhc3MgQXBwTW9kdWxlIHt9XHJcbiAqIGBgYFxyXG4gKi9cclxuQE5nTW9kdWxlKHtcclxuICBpbXBvcnRzOiBbXHJcbiAgICBHcmlkc3RhY2tJdGVtQ29tcG9uZW50LFxyXG4gICAgR3JpZHN0YWNrQ29tcG9uZW50LFxyXG4gIF0sXHJcbiAgZXhwb3J0czogW1xyXG4gICAgR3JpZHN0YWNrSXRlbUNvbXBvbmVudCxcclxuICAgIEdyaWRzdGFja0NvbXBvbmVudCxcclxuICBdLFxyXG59KVxyXG5leHBvcnQgY2xhc3MgR3JpZHN0YWNrTW9kdWxlIHt9XHJcbiJdfQ== \ No newline at end of file diff --git a/node_modules/gridstack/dist/angular/esm2020/lib/types.mjs b/node_modules/gridstack/dist/angular/esm2020/lib/types.mjs new file mode 100644 index 000000000..0d0bf9f07 --- /dev/null +++ b/node_modules/gridstack/dist/angular/esm2020/lib/types.mjs @@ -0,0 +1,6 @@ +/** + * gridstack-item.component.ts 12.3.3 + * Copyright (c) 2025 Alain Dumesny - see GridStack root license + */ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9hbmd1bGFyL3Byb2plY3RzL2xpYi9zcmMvbGliL3R5cGVzLnRzIl0sIm5hbWVzIjpbXSwibW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cclxuICogQGV4YW1wbGVcclxuICogYGBgdHlwZXNjcmlwdFxyXG4gKiBjb25zdCBpbnB1dHM6IE5nQ29tcElucHV0cyA9IHtcclxuICogICB0aXRsZTogJ015IFdpZGdldCcsXHJcbiAqICAgdmFsdWU6IDQyLFxyXG4gKiAgIGNvbmZpZzogeyBlbmFibGVkOiB0cnVlIH1cclxuICogfTtcclxuICogYGBgXHJcbiAqL1xyXG5leHBvcnQgdHlwZSBOZ0NvbXBJbnB1dHMgPSB7W2tleTogc3RyaW5nXTogYW55fTtcclxuIl19 \ No newline at end of file diff --git a/node_modules/gridstack/dist/angular/fesm2015/gridstack-angular.mjs b/node_modules/gridstack/dist/angular/fesm2015/gridstack-angular.mjs new file mode 100644 index 000000000..809d509b8 --- /dev/null +++ b/node_modules/gridstack/dist/angular/fesm2015/gridstack-angular.mjs @@ -0,0 +1,647 @@ +import * as i0 from '@angular/core'; +import { Injectable, ViewContainerRef, Component, ViewChild, Input, EventEmitter, reflectComponentType, ContentChildren, Output, NgModule } from '@angular/core'; +import { NgIf } from '@angular/common'; +import { GridStack } from 'gridstack'; + +/** + * gridstack-item.component.ts 12.3.3 + * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license + */ +/** + * Base widget class for GridStack Angular integration. + */ +class BaseWidget { + /** + * Override this method to return serializable data for this widget. + * + * Return an object with properties that map to your component's @Input() fields. + * The selector is handled automatically, so only include component-specific data. + * + * @returns Object containing serializable component data + * + * @example + * ```typescript + * serialize() { + * return { + * title: this.title, + * value: this.value, + * settings: this.settings + * }; + * } + * ``` + */ + serialize() { return; } + /** + * Override this method to handle widget restoration from saved data. + * + * Use this for complex initialization that goes beyond simple @Input() mapping. + * The default implementation automatically assigns input data to component properties. + * + * @param w The saved widget data including input properties + * + * @example + * ```typescript + * deserialize(w: NgGridStackWidget) { + * super.deserialize(w); // Call parent for basic setup + * + * // Custom initialization logic + * if (w.input?.complexData) { + * this.processComplexData(w.input.complexData); + * } + * } + * ``` + */ + deserialize(w) { + // save full description for meta data + this.widgetItem = w; + if (!w) + return; + if (w.input) + Object.assign(this, w.input); + } +} +BaseWidget.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseWidget, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); +BaseWidget.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseWidget }); +i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseWidget, decorators: [{ + type: Injectable + }] }); + +/** + * gridstack-item.component.ts 12.3.3 + * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license + */ +/** + * Angular component wrapper for individual GridStack items. + * + * This component represents a single grid item and handles: + * - Dynamic content creation and management + * - Integration with parent GridStack component + * - Component lifecycle and cleanup + * - Widget options and configuration + * + * Use in combination with GridstackComponent for the parent grid. + * + * @example + * ```html + * + * + * + * + * + * ``` + */ +class GridstackItemComponent { + constructor(elementRef) { + this.elementRef = elementRef; + this.el._gridItemComp = this; + } + /** + * Grid item configuration options. + * Defines position, size, and behavior of this grid item. + * + * @example + * ```typescript + * itemOptions: GridStackNode = { + * x: 0, y: 0, w: 2, h: 1, + * noResize: true, + * content: 'Item content' + * }; + * ``` + */ + set options(val) { + var _a; + const grid = (_a = this.el.gridstackNode) === null || _a === void 0 ? void 0 : _a.grid; + if (grid) { + // already built, do an update... + grid.update(this.el, val); + } + else { + // store our custom element in options so we can update it and not re-create a generic div! + this._options = Object.assign(Object.assign({}, val), { el: this.el }); + } + } + /** return the latest grid options (from GS once built, otherwise initial values) */ + get options() { + return this.el.gridstackNode || this._options || { el: this.el }; + } + /** return the native element that contains grid specific fields as well */ + get el() { return this.elementRef.nativeElement; } + /** clears the initial options now that we've built */ + clearOptions() { + delete this._options; + } + ngOnDestroy() { + this.clearOptions(); + delete this.childWidget; + delete this.el._gridItemComp; + delete this.container; + delete this.ref; + } +} +GridstackItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackItemComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); +GridstackItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: GridstackItemComponent, isStandalone: true, selector: "gridstack-item", inputs: { options: "options" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: ` +
+ + + + + + {{options.content}} +
`, isInline: true, styles: [":host{display:block}\n"] }); +i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackItemComponent, decorators: [{ + type: Component, + args: [{ selector: 'gridstack-item', template: ` +
+ + + + + + {{options.content}} +
`, standalone: true, styles: [":host{display:block}\n"] }] + }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { container: [{ + type: ViewChild, + args: ['container', { read: ViewContainerRef, static: true }] + }], options: [{ + type: Input + }] } }); + +/** + * gridstack.component.ts 12.3.3 + * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license + */ +/** + * Angular component wrapper for GridStack. + * + * This component provides Angular integration for GridStack grids, handling: + * - Grid initialization and lifecycle + * - Dynamic component creation and management + * - Event binding and emission + * - Integration with Angular change detection + * + * Use in combination with GridstackItemComponent for individual grid items. + * + * @example + * ```html + * + *
Drag widgets here
+ *
+ * ``` + */ +class GridstackComponent { + constructor(elementRef) { + this.elementRef = elementRef; + /** + * GridStack event emitters for Angular integration. + * + * These provide Angular-style event handling for GridStack events. + * Alternatively, use `this.grid.on('event1 event2', callback)` for multiple events. + * + * Note: 'CB' suffix prevents conflicts with native DOM events. + * + * @example + * ```html + * + * + * ``` + */ + /** Emitted when widgets are added to the grid */ + this.addedCB = new EventEmitter(); + /** Emitted when grid layout changes */ + this.changeCB = new EventEmitter(); + /** Emitted when grid is disabled */ + this.disableCB = new EventEmitter(); + /** Emitted during widget drag operations */ + this.dragCB = new EventEmitter(); + /** Emitted when widget drag starts */ + this.dragStartCB = new EventEmitter(); + /** Emitted when widget drag stops */ + this.dragStopCB = new EventEmitter(); + /** Emitted when widget is dropped */ + this.droppedCB = new EventEmitter(); + /** Emitted when grid is enabled */ + this.enableCB = new EventEmitter(); + /** Emitted when widgets are removed from the grid */ + this.removedCB = new EventEmitter(); + /** Emitted during widget resize operations */ + this.resizeCB = new EventEmitter(); + /** Emitted when widget resize starts */ + this.resizeStartCB = new EventEmitter(); + /** Emitted when widget resize stops */ + this.resizeStopCB = new EventEmitter(); + // set globally our method to create the right widget type + if (!GridStack.addRemoveCB) { + GridStack.addRemoveCB = gsCreateNgComponents; + } + if (!GridStack.saveCB) { + GridStack.saveCB = gsSaveAdditionalNgInfo; + } + if (!GridStack.updateCB) { + GridStack.updateCB = gsUpdateNgComponents; + } + this.el._gridComp = this; + } + /** + * Grid configuration options. + * Can be set before grid initialization or updated after grid is created. + * + * @example + * ```typescript + * gridOptions: GridStackOptions = { + * column: 12, + * cellHeight: 'auto', + * animate: true + * }; + * ``` + */ + set options(o) { + if (this._grid) { + this._grid.updateOptions(o); + } + else { + this._options = o; + } + } + /** Get the current running grid options */ + get options() { var _a; return ((_a = this._grid) === null || _a === void 0 ? void 0 : _a.opts) || this._options || {}; } + /** + * Get the native DOM element that contains grid-specific fields. + * This element has GridStack properties attached to it. + */ + get el() { return this.elementRef.nativeElement; } + /** + * Get the underlying GridStack instance. + * Use this to access GridStack API methods directly. + * + * @example + * ```typescript + * this.gridComponent.grid.addWidget({x: 0, y: 0, w: 2, h: 1}); + * ``` + */ + get grid() { return this._grid; } + /** + * Register a list of Angular components for dynamic creation. + * + * @param typeList Array of component types to register + * + * @example + * ```typescript + * GridstackComponent.addComponentToSelectorType([ + * MyWidgetComponent, + * AnotherWidgetComponent + * ]); + * ``` + */ + static addComponentToSelectorType(typeList) { + typeList.forEach(type => GridstackComponent.selectorToType[GridstackComponent.getSelector(type)] = type); + } + /** + * Extract the selector string from an Angular component type. + * + * @param type The component type to get selector from + * @returns The component's selector string + */ + static getSelector(type) { + return reflectComponentType(type).selector; + } + ngOnInit() { + var _a, _b; + // init ourself before any template children are created since we track them below anyway - no need to double create+update widgets + this.loaded = !!((_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.children) === null || _b === void 0 ? void 0 : _b.length); + this._grid = GridStack.init(this._options, this.el); + delete this._options; // GS has it now + this.checkEmpty(); + } + /** wait until after all DOM is ready to init gridstack children (after angular ngFor and sub-components run first) */ + ngAfterContentInit() { + var _a; + // track whenever the children list changes and update the layout... + this._sub = (_a = this.gridstackItems) === null || _a === void 0 ? void 0 : _a.changes.subscribe(() => this.updateAll()); + // ...and do this once at least unless we loaded children already + if (!this.loaded) + this.updateAll(); + this.hookEvents(this.grid); + } + ngOnDestroy() { + var _a, _b; + this.unhookEvents(this._grid); + (_a = this._sub) === null || _a === void 0 ? void 0 : _a.unsubscribe(); + (_b = this._grid) === null || _b === void 0 ? void 0 : _b.destroy(); + delete this._grid; + delete this.el._gridComp; + delete this.container; + delete this.ref; + } + /** + * called when the TEMPLATE (not recommended) list of items changes - get a list of nodes and + * update the layout accordingly (which will take care of adding/removing items changed by Angular) + */ + updateAll() { + var _a; + if (!this.grid) + return; + const layout = []; + (_a = this.gridstackItems) === null || _a === void 0 ? void 0 : _a.forEach(item => { + layout.push(item.options); + item.clearOptions(); + }); + this.grid.load(layout); // efficient that does diffs only + } + /** check if the grid is empty, if so show alternative content */ + checkEmpty() { + if (!this.grid) + return; + this.isEmpty = !this.grid.engine.nodes.length; + } + /** get all known events as easy to use Outputs for convenience */ + hookEvents(grid) { + if (!grid) + return; + // nested grids don't have events in v12.1+ so skip + if (grid.parentGridNode) + return; + grid + .on('added', (event, nodes) => { + var _a; + const gridComp = ((_a = nodes[0].grid) === null || _a === void 0 ? void 0 : _a.el._gridComp) || this; + gridComp.checkEmpty(); + this.addedCB.emit({ event, nodes }); + }) + .on('change', (event, nodes) => this.changeCB.emit({ event, nodes })) + .on('disable', (event) => this.disableCB.emit({ event })) + .on('drag', (event, el) => this.dragCB.emit({ event, el })) + .on('dragstart', (event, el) => this.dragStartCB.emit({ event, el })) + .on('dragstop', (event, el) => this.dragStopCB.emit({ event, el })) + .on('dropped', (event, previousNode, newNode) => this.droppedCB.emit({ event, previousNode, newNode })) + .on('enable', (event) => this.enableCB.emit({ event })) + .on('removed', (event, nodes) => { + var _a; + const gridComp = ((_a = nodes[0].grid) === null || _a === void 0 ? void 0 : _a.el._gridComp) || this; + gridComp.checkEmpty(); + this.removedCB.emit({ event, nodes }); + }) + .on('resize', (event, el) => this.resizeCB.emit({ event, el })) + .on('resizestart', (event, el) => this.resizeStartCB.emit({ event, el })) + .on('resizestop', (event, el) => this.resizeStopCB.emit({ event, el })); + } + unhookEvents(grid) { + if (!grid) + return; + // nested grids don't have events in v12.1+ so skip + if (grid.parentGridNode) + return; + grid.off('added change disable drag dragstart dragstop dropped enable removed resize resizestart resizestop'); + } +} +/** + * Mapping of component selectors to their types for dynamic creation. + * + * This enables dynamic component instantiation from string selectors. + * Angular doesn't provide public access to this mapping, so we maintain our own. + * + * @example + * ```typescript + * GridstackComponent.addComponentToSelectorType([MyWidgetComponent]); + * ``` + */ +GridstackComponent.selectorToType = {}; +GridstackComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); +GridstackComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: GridstackComponent, isStandalone: true, selector: "gridstack", inputs: { options: "options", isEmpty: "isEmpty" }, outputs: { addedCB: "addedCB", changeCB: "changeCB", disableCB: "disableCB", dragCB: "dragCB", dragStartCB: "dragStartCB", dragStopCB: "dragStopCB", droppedCB: "droppedCB", enableCB: "enableCB", removedCB: "removedCB", resizeCB: "resizeCB", resizeStartCB: "resizeStartCB", resizeStopCB: "resizeStopCB" }, queries: [{ propertyName: "gridstackItems", predicate: GridstackItemComponent }], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: ` + + + + + + + `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); +i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackComponent, decorators: [{ + type: Component, + args: [{ selector: 'gridstack', template: ` + + + + + + + `, standalone: true, imports: [NgIf], styles: [":host{display:block}\n"] }] + }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { gridstackItems: [{ + type: ContentChildren, + args: [GridstackItemComponent] + }], container: [{ + type: ViewChild, + args: ['container', { read: ViewContainerRef, static: true }] + }], options: [{ + type: Input + }], isEmpty: [{ + type: Input + }], addedCB: [{ + type: Output + }], changeCB: [{ + type: Output + }], disableCB: [{ + type: Output + }], dragCB: [{ + type: Output + }], dragStartCB: [{ + type: Output + }], dragStopCB: [{ + type: Output + }], droppedCB: [{ + type: Output + }], enableCB: [{ + type: Output + }], removedCB: [{ + type: Output + }], resizeCB: [{ + type: Output + }], resizeStartCB: [{ + type: Output + }], resizeStopCB: [{ + type: Output + }] } }); +/** + * can be used when a new item needs to be created, which we do as a Angular component, or deleted (skip) + **/ +function gsCreateNgComponents(host, n, add, isGrid) { + var _a, _b, _c, _d, _e, _f, _g; + if (add) { + // + // create the component dynamically - see https://angular.io/docs/ts/latest/cookbook/dynamic-component-loader.html + // + if (!host) + return; + if (isGrid) { + // TODO: figure out how to create ng component inside regular Div. need to access app injectors... + // if (!container) { + // const hostElement: Element = host; + // const environmentInjector: EnvironmentInjector; + // grid = createComponent(GridstackComponent, {environmentInjector, hostElement})?.instance; + // } + const gridItemComp = (_a = host.parentElement) === null || _a === void 0 ? void 0 : _a._gridItemComp; + if (!gridItemComp) + return; + // check if gridItem has a child component with 'container' exposed to create under.. + const container = ((_b = gridItemComp.childWidget) === null || _b === void 0 ? void 0 : _b.container) || gridItemComp.container; + const gridRef = container === null || container === void 0 ? void 0 : container.createComponent(GridstackComponent); + const grid = gridRef === null || gridRef === void 0 ? void 0 : gridRef.instance; + if (!grid) + return; + grid.ref = gridRef; + grid.options = n; + return grid.el; + } + else { + const gridComp = host._gridComp; + const gridItemRef = (_c = gridComp === null || gridComp === void 0 ? void 0 : gridComp.container) === null || _c === void 0 ? void 0 : _c.createComponent(GridstackItemComponent); + const gridItem = gridItemRef === null || gridItemRef === void 0 ? void 0 : gridItemRef.instance; + if (!gridItem) + return; + gridItem.ref = gridItemRef; + // define what type of component to create as child, OR you can do it GridstackItemComponent template, but this is more generic + const selector = n.selector; + const type = selector ? GridstackComponent.selectorToType[selector] : undefined; + if (type) { + // shared code to create our selector component + const createComp = () => { + var _a, _b; + const childWidget = (_b = (_a = gridItem.container) === null || _a === void 0 ? void 0 : _a.createComponent(type)) === null || _b === void 0 ? void 0 : _b.instance; + // if proper BaseWidget subclass, save it and load additional data + if (childWidget && typeof childWidget.serialize === 'function' && typeof childWidget.deserialize === 'function') { + gridItem.childWidget = childWidget; + childWidget.deserialize(n); + } + }; + const lazyLoad = n.lazyLoad || ((_e = (_d = n.grid) === null || _d === void 0 ? void 0 : _d.opts) === null || _e === void 0 ? void 0 : _e.lazyLoad) && n.lazyLoad !== false; + if (lazyLoad) { + if (!n.visibleObservable) { + n.visibleObservable = new IntersectionObserver(([entry]) => { + var _a; + if (entry.isIntersecting) { + (_a = n.visibleObservable) === null || _a === void 0 ? void 0 : _a.disconnect(); + delete n.visibleObservable; + createComp(); + } + }); + window.setTimeout(() => { var _a; return (_a = n.visibleObservable) === null || _a === void 0 ? void 0 : _a.observe(gridItem.el); }); // wait until callee sets position attributes + } + } + else + createComp(); + } + return gridItem.el; + } + } + else { + // + // REMOVE - have to call ComponentRef:destroy() for dynamic objects to correctly remove themselves + // Note: this will destroy all children dynamic components as well: gridItem -> childWidget + // + if (isGrid) { + const grid = (_f = n.el) === null || _f === void 0 ? void 0 : _f._gridComp; + if (grid === null || grid === void 0 ? void 0 : grid.ref) + grid.ref.destroy(); + else + grid === null || grid === void 0 ? void 0 : grid.ngOnDestroy(); + } + else { + const gridItem = (_g = n.el) === null || _g === void 0 ? void 0 : _g._gridItemComp; + if (gridItem === null || gridItem === void 0 ? void 0 : gridItem.ref) + gridItem.ref.destroy(); + else + gridItem === null || gridItem === void 0 ? void 0 : gridItem.ngOnDestroy(); + } + } + return; +} +/** + * called for each item in the grid - check if additional information needs to be saved. + * Note: since this is options minus gridstack protected members using Utils.removeInternalForSave(), + * this typically doesn't need to do anything. However your custom Component @Input() are now supported + * using BaseWidget.serialize() + */ +function gsSaveAdditionalNgInfo(n, w) { + var _a, _b, _c; + const gridItem = (_a = n.el) === null || _a === void 0 ? void 0 : _a._gridItemComp; + if (gridItem) { + const input = (_b = gridItem.childWidget) === null || _b === void 0 ? void 0 : _b.serialize(); + if (input) { + w.input = input; + } + return; + } + // else check if Grid + const grid = (_c = n.el) === null || _c === void 0 ? void 0 : _c._gridComp; + if (grid) { + //.... save any custom data + } +} +/** + * track when widgeta re updated (rather than created) to make sure we de-serialize them as well + */ +function gsUpdateNgComponents(n) { + var _a; + const w = n; + const gridItem = (_a = n.el) === null || _a === void 0 ? void 0 : _a._gridItemComp; + if ((gridItem === null || gridItem === void 0 ? void 0 : gridItem.childWidget) && w.input) + gridItem.childWidget.deserialize(w); +} + +/** + * gridstack.component.ts 12.3.3 + * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license + */ +/** + * @deprecated Use GridstackComponent and GridstackItemComponent as standalone components instead. + * + * This NgModule is provided for backward compatibility but is no longer the recommended approach. + * Import components directly in your standalone components or use the new Angular module structure. + * + * @example + * ```typescript + * // Preferred approach - standalone components + * @Component({ + * selector: 'my-app', + * imports: [GridstackComponent, GridstackItemComponent], + * template: '' + * }) + * export class AppComponent {} + * + * // Legacy approach (deprecated) + * @NgModule({ + * imports: [GridstackModule] + * }) + * export class AppModule {} + * ``` + */ +class GridstackModule { +} +GridstackModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); +GridstackModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: GridstackModule, imports: [GridstackItemComponent, + GridstackComponent], exports: [GridstackItemComponent, + GridstackComponent] }); +GridstackModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackModule, imports: [GridstackItemComponent, + GridstackComponent] }); +i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackModule, decorators: [{ + type: NgModule, + args: [{ + imports: [ + GridstackItemComponent, + GridstackComponent, + ], + exports: [ + GridstackItemComponent, + GridstackComponent, + ], + }] + }] }); + +/* + * Public API Surface of gridstack-angular + */ + +/** + * Generated bundle index. Do not edit. + */ + +export { BaseWidget, GridstackComponent, GridstackItemComponent, GridstackModule, gsCreateNgComponents, gsSaveAdditionalNgInfo, gsUpdateNgComponents }; +//# sourceMappingURL=gridstack-angular.mjs.map diff --git a/node_modules/gridstack/dist/angular/fesm2015/gridstack-angular.mjs.map b/node_modules/gridstack/dist/angular/fesm2015/gridstack-angular.mjs.map new file mode 100644 index 000000000..308a7890f --- /dev/null +++ b/node_modules/gridstack/dist/angular/fesm2015/gridstack-angular.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"gridstack-angular.mjs","sources":["../../../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.3.3\r\n * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license\r\n */\r\n\r\n/**\r\n * Abstract base class that all custom widgets should extend.\r\n * \r\n * This class provides the interface needed for GridstackItemComponent to:\r\n * - Serialize/deserialize widget data\r\n * - Save/restore widget state\r\n * - Integrate with Angular lifecycle\r\n * \r\n * Extend this class when creating custom widgets for dynamic grids.\r\n * \r\n * @example\r\n * ```typescript\r\n * @Component({\r\n * selector: 'my-custom-widget',\r\n * template: '
{{data}}
'\r\n * })\r\n * export class MyCustomWidget extends BaseWidget {\r\n * @Input() data: string = '';\r\n * \r\n * serialize() {\r\n * return { data: this.data };\r\n * }\r\n * }\r\n * ```\r\n */\r\n\r\nimport { Injectable } from '@angular/core';\r\nimport { NgCompInputs, NgGridStackWidget } from './types';\r\n\r\n/**\r\n * Base widget class for GridStack Angular integration.\r\n */\r\n@Injectable()\r\nexport abstract class BaseWidget {\r\n\r\n /**\r\n * Complete widget definition including position, size, and Angular-specific data.\r\n * Populated automatically when the widget is loaded or saved.\r\n */\r\n public widgetItem?: NgGridStackWidget;\r\n\r\n /**\r\n * Override this method to return serializable data for this widget.\r\n * \r\n * Return an object with properties that map to your component's @Input() fields.\r\n * The selector is handled automatically, so only include component-specific data.\r\n * \r\n * @returns Object containing serializable component data\r\n * \r\n * @example\r\n * ```typescript\r\n * serialize() {\r\n * return {\r\n * title: this.title,\r\n * value: this.value,\r\n * settings: this.settings\r\n * };\r\n * }\r\n * ```\r\n */\r\n public serialize(): NgCompInputs | undefined { return; }\r\n\r\n /**\r\n * Override this method to handle widget restoration from saved data.\r\n * \r\n * Use this for complex initialization that goes beyond simple @Input() mapping.\r\n * The default implementation automatically assigns input data to component properties.\r\n * \r\n * @param w The saved widget data including input properties\r\n * \r\n * @example\r\n * ```typescript\r\n * deserialize(w: NgGridStackWidget) {\r\n * super.deserialize(w); // Call parent for basic setup\r\n * \r\n * // Custom initialization logic\r\n * if (w.input?.complexData) {\r\n * this.processComplexData(w.input.complexData);\r\n * }\r\n * }\r\n * ```\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.3.3\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/**\n * Extended HTMLElement interface for grid items.\n * Stores a back-reference to the Angular component for integration.\n */\nexport interface GridItemCompHTMLElement extends GridItemHTMLElement {\n /** Back-reference to the Angular GridStackItem component */\n _gridItemComp?: GridstackItemComponent;\n}\n\n/**\n * Angular component wrapper for individual GridStack items.\n * \n * This component represents a single grid item and handles:\n * - Dynamic content creation and management\n * - Integration with parent GridStack component\n * - Component lifecycle and cleanup\n * - Widget options and configuration\n * \n * Use in combination with GridstackComponent for the parent grid.\n * \n * @example\n * ```html\n * \n * \n * \n * \n * \n * ```\n */\n@Component({\n selector: 'gridstack-item',\n template: `\n
\n \n \n \n \n \n {{options.content}}\n
`,\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 /**\n * Container for dynamic component creation within this grid item.\n * Used to append child components programmatically.\n */\n @ViewChild('container', { read: ViewContainerRef, static: true}) public container?: ViewContainerRef;\n\n /**\n * Component reference for dynamic component removal.\n * Used internally when this component is created dynamically.\n */\n public ref: ComponentRef | undefined;\n\n /**\n * Reference to child widget component for serialization.\n * Used to save/restore additional data along with grid position.\n */\n public childWidget: BaseWidget | undefined;\n\n /**\n * Grid item configuration options.\n * Defines position, size, and behavior of this grid item.\n * \n * @example\n * ```typescript\n * itemOptions: GridStackNode = {\n * x: 0, y: 0, w: 2, h: 1,\n * noResize: true,\n * content: 'Item content'\n * };\n * ```\n */\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) {\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.3.3\n * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license\n */\n\nimport {\n AfterContentInit, Component, ContentChildren, ElementRef, EventEmitter, Input,\n OnDestroy, OnInit, Output, QueryList, Type, ViewChild, ViewContainerRef, reflectComponentType, ComponentRef\n} 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/**\n * Event handler callback signatures for different GridStack events.\n * These types define the structure of data passed to Angular event emitters.\n */\n\n/** Callback for general events (enable, disable, etc.) */\nexport type eventCB = {event: Event};\n\n/** Callback for element-specific events (resize, drag, etc.) */\nexport type elementCB = {event: Event, el: GridItemHTMLElement};\n\n/** Callback for events affecting multiple nodes (change, etc.) */\nexport type nodesCB = {event: Event, nodes: GridStackNode[]};\n\n/** Callback for drop events with before/after node state */\nexport type droppedCB = {event: Event, previousNode: GridStackNode, newNode: GridStackNode};\n\n/**\n * Extended HTMLElement interface for the grid container.\n * Stores a back-reference to the Angular component for integration purposes.\n */\nexport interface GridCompHTMLElement extends GridHTMLElement {\n /** Back-reference to the Angular GridStack component */\n _gridComp?: GridstackComponent;\n}\n\n/**\n * Mapping of selector strings to Angular component types.\n * Used for dynamic component creation based on widget selectors.\n */\nexport type SelectorToType = {[key: string]: Type};\n\n/**\n * Angular component wrapper for GridStack.\n * \n * This component provides Angular integration for GridStack grids, handling:\n * - Grid initialization and lifecycle\n * - Dynamic component creation and management\n * - Event binding and emission\n * - Integration with Angular change detection\n * \n * Use in combination with GridstackItemComponent for individual grid items.\n * \n * @example\n * ```html\n * \n *
Drag widgets here
\n *
\n * ```\n */\n@Component({\n selector: 'gridstack',\n template: `\n \n \n \n \n \n \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 /**\n * List of template-based grid items (not recommended approach).\n * Used to sync between DOM and GridStack internals when items are defined in templates.\n * Prefer dynamic component creation instead.\n */\n @ContentChildren(GridstackItemComponent) public gridstackItems?: QueryList;\n /**\n * Container for dynamic component creation (recommended approach).\n * Used to append grid items programmatically at runtime.\n */\n @ViewChild('container', { read: ViewContainerRef, static: true}) public container?: ViewContainerRef;\n\n /**\n * Grid configuration options.\n * Can be set before grid initialization or updated after grid is created.\n * \n * @example\n * ```typescript\n * gridOptions: GridStackOptions = {\n * column: 12,\n * cellHeight: 'auto',\n * animate: true\n * };\n * ```\n */\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 /** Get the current running grid options */\n public get options(): GridStackOptions { return this._grid?.opts || this._options || {}; }\n\n /**\n * Controls whether empty content should be displayed.\n * Set to true to show ng-content with 'empty-content' selector when grid has no items.\n * \n * @example\n * ```html\n * \n *
Drag widgets here to get started
\n *
\n * ```\n */\n @Input() public isEmpty?: boolean;\n\n /**\n * GridStack event emitters for Angular integration.\n * \n * These provide Angular-style event handling for GridStack events.\n * Alternatively, use `this.grid.on('event1 event2', callback)` for multiple events.\n * \n * Note: 'CB' suffix prevents conflicts with native DOM events.\n * \n * @example\n * ```html\n * \n * \n * ```\n */\n \n /** Emitted when widgets are added to the grid */\n @Output() public addedCB = new EventEmitter();\n \n /** Emitted when grid layout changes */\n @Output() public changeCB = new EventEmitter();\n \n /** Emitted when grid is disabled */\n @Output() public disableCB = new EventEmitter();\n \n /** Emitted during widget drag operations */\n @Output() public dragCB = new EventEmitter();\n \n /** Emitted when widget drag starts */\n @Output() public dragStartCB = new EventEmitter();\n \n /** Emitted when widget drag stops */\n @Output() public dragStopCB = new EventEmitter();\n \n /** Emitted when widget is dropped */\n @Output() public droppedCB = new EventEmitter();\n \n /** Emitted when grid is enabled */\n @Output() public enableCB = new EventEmitter();\n \n /** Emitted when widgets are removed from the grid */\n @Output() public removedCB = new EventEmitter();\n \n /** Emitted during widget resize operations */\n @Output() public resizeCB = new EventEmitter();\n \n /** Emitted when widget resize starts */\n @Output() public resizeStartCB = new EventEmitter();\n \n /** Emitted when widget resize stops */\n @Output() public resizeStopCB = new EventEmitter();\n\n /**\n * Get the native DOM element that contains grid-specific fields.\n * This element has GridStack properties attached to it.\n */\n public get el(): GridCompHTMLElement { return this.elementRef.nativeElement; }\n\n /**\n * Get the underlying GridStack instance.\n * Use this to access GridStack API methods directly.\n * \n * @example\n * ```typescript\n * this.gridComponent.grid.addWidget({x: 0, y: 0, w: 2, h: 1});\n * ```\n */\n public get grid(): GridStack | undefined { return this._grid; }\n\n /**\n * Component reference for dynamic component removal.\n * Used internally when this component is created dynamically.\n */\n public ref: ComponentRef | undefined;\n\n /**\n * Mapping of component selectors to their types for dynamic creation.\n * \n * This enables dynamic component instantiation from string selectors.\n * Angular doesn't provide public access to this mapping, so we maintain our own.\n * \n * @example\n * ```typescript\n * GridstackComponent.addComponentToSelectorType([MyWidgetComponent]);\n * ```\n */\n public static selectorToType: SelectorToType = {};\n /**\n * Register a list of Angular components for dynamic creation.\n * \n * @param typeList Array of component types to register\n * \n * @example\n * ```typescript\n * GridstackComponent.addComponentToSelectorType([\n * MyWidgetComponent,\n * AnotherWidgetComponent\n * ]);\n * ```\n */\n public static addComponentToSelectorType(typeList: Array>) {\n typeList.forEach(type => GridstackComponent.selectorToType[ GridstackComponent.getSelector(type) ] = type);\n }\n /**\n * Extract the selector string from an Angular component type.\n * \n * @param type The component type to get selector from\n * @returns The component's selector string\n */\n public static getSelector(type: Type): 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) {\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 if (!GridStack.updateCB) {\n GridStack.updateCB = gsUpdateNgComponents;\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 // nested grids don't have events in v12.1+ so skip\n if (grid.parentGridNode) return;\n grid\n .on('added', (event: Event, nodes: GridStackNode[]) => {\n const gridComp = (nodes[0].grid?.el as GridCompHTMLElement)._gridComp || this;\n gridComp.checkEmpty();\n this.addedCB.emit({event, nodes});\n })\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[]) => {\n const gridComp = (nodes[0].grid?.el as GridCompHTMLElement)._gridComp || this;\n gridComp.checkEmpty();\n this.removedCB.emit({event, nodes});\n })\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 // nested grids don't have events in v12.1+ so skip\n if (grid.parentGridNode) 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\n/**\n * track when widgeta re updated (rather than created) to make sure we de-serialize them as well\n */\nexport function gsUpdateNgComponents(n: NgGridStackNode) {\n const w: NgGridStackWidget = n;\n const gridItem = (n.el as GridItemCompHTMLElement)?._gridItemComp;\n if (gridItem?.childWidget && w.input) gridItem.childWidget.deserialize(w);\n}","/**\r\n * gridstack.component.ts 12.3.3\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/**\r\n * @deprecated Use GridstackComponent and GridstackItemComponent as standalone components instead.\r\n * \r\n * This NgModule is provided for backward compatibility but is no longer the recommended approach.\r\n * Import components directly in your standalone components or use the new Angular module structure.\r\n * \r\n * @example\r\n * ```typescript\r\n * // Preferred approach - standalone components\r\n * @Component({\r\n * selector: 'my-app',\r\n * imports: [GridstackComponent, GridstackItemComponent],\r\n * template: ''\r\n * })\r\n * export class AppComponent {}\r\n * \r\n * // Legacy approach (deprecated)\r\n * @NgModule({\r\n * imports: [GridstackModule]\r\n * })\r\n * export class AppModule {}\r\n * ```\r\n */\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;AA+BH;;AAEG;MAEmB,UAAU,CAAA;AAQ9B;;;;;;;;;;;;;;;;;;AAkBG;IACI,SAAS,GAAA,EAAgC,OAAO,EAAE;AAEzD;;;;;;;;;;;;;;;;;;;AAmBG;AACI,IAAA,WAAW,CAAC,CAAoB,EAAA;;AAErC,QAAA,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;AACpB,QAAA,IAAI,CAAC,CAAC;YAAE,OAAO;QAEf,IAAI,CAAC,CAAC,KAAK;YAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;KAC5C;;uGAvDmB,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA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AAA,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;iBACF,CAAA;;;AC1CD;;AAEG;;ACFH;;AAEG;;;;"} \ No newline at end of file diff --git a/node_modules/gridstack/dist/angular/fesm2020/gridstack-angular.mjs b/node_modules/gridstack/dist/angular/fesm2020/gridstack-angular.mjs new file mode 100644 index 000000000..fc13dc804 --- /dev/null +++ b/node_modules/gridstack/dist/angular/fesm2020/gridstack-angular.mjs @@ -0,0 +1,640 @@ +import * as i0 from '@angular/core'; +import { Injectable, ViewContainerRef, Component, ViewChild, Input, EventEmitter, reflectComponentType, ContentChildren, Output, NgModule } from '@angular/core'; +import { NgIf } from '@angular/common'; +import { GridStack } from 'gridstack'; + +/** + * gridstack-item.component.ts 12.3.3 + * Copyright (c) 2025 Alain Dumesny - see GridStack root license + */ + +/** + * gridstack-item.component.ts 12.3.3 + * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license + */ +/** + * Base widget class for GridStack Angular integration. + */ +class BaseWidget { + /** + * Override this method to return serializable data for this widget. + * + * Return an object with properties that map to your component's @Input() fields. + * The selector is handled automatically, so only include component-specific data. + * + * @returns Object containing serializable component data + * + * @example + * ```typescript + * serialize() { + * return { + * title: this.title, + * value: this.value, + * settings: this.settings + * }; + * } + * ``` + */ + serialize() { return; } + /** + * Override this method to handle widget restoration from saved data. + * + * Use this for complex initialization that goes beyond simple @Input() mapping. + * The default implementation automatically assigns input data to component properties. + * + * @param w The saved widget data including input properties + * + * @example + * ```typescript + * deserialize(w: NgGridStackWidget) { + * super.deserialize(w); // Call parent for basic setup + * + * // Custom initialization logic + * if (w.input?.complexData) { + * this.processComplexData(w.input.complexData); + * } + * } + * ``` + */ + deserialize(w) { + // save full description for meta data + this.widgetItem = w; + if (!w) + return; + if (w.input) + Object.assign(this, w.input); + } +} +BaseWidget.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseWidget, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); +BaseWidget.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseWidget }); +i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseWidget, decorators: [{ + type: Injectable + }] }); + +/** + * gridstack-item.component.ts 12.3.3 + * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license + */ +/** + * Angular component wrapper for individual GridStack items. + * + * This component represents a single grid item and handles: + * - Dynamic content creation and management + * - Integration with parent GridStack component + * - Component lifecycle and cleanup + * - Widget options and configuration + * + * Use in combination with GridstackComponent for the parent grid. + * + * @example + * ```html + * + * + * + * + * + * ``` + */ +class GridstackItemComponent { + constructor(elementRef) { + this.elementRef = elementRef; + this.el._gridItemComp = this; + } + /** + * Grid item configuration options. + * Defines position, size, and behavior of this grid item. + * + * @example + * ```typescript + * itemOptions: GridStackNode = { + * x: 0, y: 0, w: 2, h: 1, + * noResize: true, + * content: 'Item content' + * }; + * ``` + */ + set options(val) { + const grid = this.el.gridstackNode?.grid; + if (grid) { + // already built, do an update... + grid.update(this.el, val); + } + else { + // store our custom element in options so we can update it and not re-create a generic div! + this._options = { ...val, el: this.el }; + } + } + /** return the latest grid options (from GS once built, otherwise initial values) */ + get options() { + return this.el.gridstackNode || this._options || { el: this.el }; + } + /** return the native element that contains grid specific fields as well */ + get el() { return this.elementRef.nativeElement; } + /** clears the initial options now that we've built */ + clearOptions() { + delete this._options; + } + ngOnDestroy() { + this.clearOptions(); + delete this.childWidget; + delete this.el._gridItemComp; + delete this.container; + delete this.ref; + } +} +GridstackItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackItemComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); +GridstackItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: GridstackItemComponent, isStandalone: true, selector: "gridstack-item", inputs: { options: "options" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: ` +
+ + + + + + {{options.content}} +
`, isInline: true, styles: [":host{display:block}\n"] }); +i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackItemComponent, decorators: [{ + type: Component, + args: [{ selector: 'gridstack-item', template: ` +
+ + + + + + {{options.content}} +
`, standalone: true, styles: [":host{display:block}\n"] }] + }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { container: [{ + type: ViewChild, + args: ['container', { read: ViewContainerRef, static: true }] + }], options: [{ + type: Input + }] } }); + +/** + * gridstack.component.ts 12.3.3 + * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license + */ +/** + * Angular component wrapper for GridStack. + * + * This component provides Angular integration for GridStack grids, handling: + * - Grid initialization and lifecycle + * - Dynamic component creation and management + * - Event binding and emission + * - Integration with Angular change detection + * + * Use in combination with GridstackItemComponent for individual grid items. + * + * @example + * ```html + * + *
Drag widgets here
+ *
+ * ``` + */ +class GridstackComponent { + constructor(elementRef) { + this.elementRef = elementRef; + /** + * GridStack event emitters for Angular integration. + * + * These provide Angular-style event handling for GridStack events. + * Alternatively, use `this.grid.on('event1 event2', callback)` for multiple events. + * + * Note: 'CB' suffix prevents conflicts with native DOM events. + * + * @example + * ```html + * + * + * ``` + */ + /** Emitted when widgets are added to the grid */ + this.addedCB = new EventEmitter(); + /** Emitted when grid layout changes */ + this.changeCB = new EventEmitter(); + /** Emitted when grid is disabled */ + this.disableCB = new EventEmitter(); + /** Emitted during widget drag operations */ + this.dragCB = new EventEmitter(); + /** Emitted when widget drag starts */ + this.dragStartCB = new EventEmitter(); + /** Emitted when widget drag stops */ + this.dragStopCB = new EventEmitter(); + /** Emitted when widget is dropped */ + this.droppedCB = new EventEmitter(); + /** Emitted when grid is enabled */ + this.enableCB = new EventEmitter(); + /** Emitted when widgets are removed from the grid */ + this.removedCB = new EventEmitter(); + /** Emitted during widget resize operations */ + this.resizeCB = new EventEmitter(); + /** Emitted when widget resize starts */ + this.resizeStartCB = new EventEmitter(); + /** Emitted when widget resize stops */ + this.resizeStopCB = new EventEmitter(); + // set globally our method to create the right widget type + if (!GridStack.addRemoveCB) { + GridStack.addRemoveCB = gsCreateNgComponents; + } + if (!GridStack.saveCB) { + GridStack.saveCB = gsSaveAdditionalNgInfo; + } + if (!GridStack.updateCB) { + GridStack.updateCB = gsUpdateNgComponents; + } + this.el._gridComp = this; + } + /** + * Grid configuration options. + * Can be set before grid initialization or updated after grid is created. + * + * @example + * ```typescript + * gridOptions: GridStackOptions = { + * column: 12, + * cellHeight: 'auto', + * animate: true + * }; + * ``` + */ + set options(o) { + if (this._grid) { + this._grid.updateOptions(o); + } + else { + this._options = o; + } + } + /** Get the current running grid options */ + get options() { return this._grid?.opts || this._options || {}; } + /** + * Get the native DOM element that contains grid-specific fields. + * This element has GridStack properties attached to it. + */ + get el() { return this.elementRef.nativeElement; } + /** + * Get the underlying GridStack instance. + * Use this to access GridStack API methods directly. + * + * @example + * ```typescript + * this.gridComponent.grid.addWidget({x: 0, y: 0, w: 2, h: 1}); + * ``` + */ + get grid() { return this._grid; } + /** + * Register a list of Angular components for dynamic creation. + * + * @param typeList Array of component types to register + * + * @example + * ```typescript + * GridstackComponent.addComponentToSelectorType([ + * MyWidgetComponent, + * AnotherWidgetComponent + * ]); + * ``` + */ + static addComponentToSelectorType(typeList) { + typeList.forEach(type => GridstackComponent.selectorToType[GridstackComponent.getSelector(type)] = type); + } + /** + * Extract the selector string from an Angular component type. + * + * @param type The component type to get selector from + * @returns The component's selector string + */ + static getSelector(type) { + return reflectComponentType(type).selector; + } + ngOnInit() { + // init ourself before any template children are created since we track them below anyway - no need to double create+update widgets + this.loaded = !!this.options?.children?.length; + this._grid = GridStack.init(this._options, this.el); + delete this._options; // GS has it now + this.checkEmpty(); + } + /** wait until after all DOM is ready to init gridstack children (after angular ngFor and sub-components run first) */ + ngAfterContentInit() { + // track whenever the children list changes and update the layout... + this._sub = this.gridstackItems?.changes.subscribe(() => this.updateAll()); + // ...and do this once at least unless we loaded children already + if (!this.loaded) + this.updateAll(); + this.hookEvents(this.grid); + } + ngOnDestroy() { + this.unhookEvents(this._grid); + this._sub?.unsubscribe(); + this._grid?.destroy(); + delete this._grid; + delete this.el._gridComp; + delete this.container; + delete this.ref; + } + /** + * called when the TEMPLATE (not recommended) list of items changes - get a list of nodes and + * update the layout accordingly (which will take care of adding/removing items changed by Angular) + */ + updateAll() { + if (!this.grid) + return; + const layout = []; + this.gridstackItems?.forEach(item => { + layout.push(item.options); + item.clearOptions(); + }); + this.grid.load(layout); // efficient that does diffs only + } + /** check if the grid is empty, if so show alternative content */ + checkEmpty() { + if (!this.grid) + return; + this.isEmpty = !this.grid.engine.nodes.length; + } + /** get all known events as easy to use Outputs for convenience */ + hookEvents(grid) { + if (!grid) + return; + // nested grids don't have events in v12.1+ so skip + if (grid.parentGridNode) + return; + grid + .on('added', (event, nodes) => { + const gridComp = nodes[0].grid?.el._gridComp || this; + gridComp.checkEmpty(); + this.addedCB.emit({ event, nodes }); + }) + .on('change', (event, nodes) => this.changeCB.emit({ event, nodes })) + .on('disable', (event) => this.disableCB.emit({ event })) + .on('drag', (event, el) => this.dragCB.emit({ event, el })) + .on('dragstart', (event, el) => this.dragStartCB.emit({ event, el })) + .on('dragstop', (event, el) => this.dragStopCB.emit({ event, el })) + .on('dropped', (event, previousNode, newNode) => this.droppedCB.emit({ event, previousNode, newNode })) + .on('enable', (event) => this.enableCB.emit({ event })) + .on('removed', (event, nodes) => { + const gridComp = nodes[0].grid?.el._gridComp || this; + gridComp.checkEmpty(); + this.removedCB.emit({ event, nodes }); + }) + .on('resize', (event, el) => this.resizeCB.emit({ event, el })) + .on('resizestart', (event, el) => this.resizeStartCB.emit({ event, el })) + .on('resizestop', (event, el) => this.resizeStopCB.emit({ event, el })); + } + unhookEvents(grid) { + if (!grid) + return; + // nested grids don't have events in v12.1+ so skip + if (grid.parentGridNode) + return; + grid.off('added change disable drag dragstart dragstop dropped enable removed resize resizestart resizestop'); + } +} +/** + * Mapping of component selectors to their types for dynamic creation. + * + * This enables dynamic component instantiation from string selectors. + * Angular doesn't provide public access to this mapping, so we maintain our own. + * + * @example + * ```typescript + * GridstackComponent.addComponentToSelectorType([MyWidgetComponent]); + * ``` + */ +GridstackComponent.selectorToType = {}; +GridstackComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); +GridstackComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: GridstackComponent, isStandalone: true, selector: "gridstack", inputs: { options: "options", isEmpty: "isEmpty" }, outputs: { addedCB: "addedCB", changeCB: "changeCB", disableCB: "disableCB", dragCB: "dragCB", dragStartCB: "dragStartCB", dragStopCB: "dragStopCB", droppedCB: "droppedCB", enableCB: "enableCB", removedCB: "removedCB", resizeCB: "resizeCB", resizeStartCB: "resizeStartCB", resizeStopCB: "resizeStopCB" }, queries: [{ propertyName: "gridstackItems", predicate: GridstackItemComponent }], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: ` + + + + + + + `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); +i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackComponent, decorators: [{ + type: Component, + args: [{ selector: 'gridstack', template: ` + + + + + + + `, standalone: true, imports: [NgIf], styles: [":host{display:block}\n"] }] + }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { gridstackItems: [{ + type: ContentChildren, + args: [GridstackItemComponent] + }], container: [{ + type: ViewChild, + args: ['container', { read: ViewContainerRef, static: true }] + }], options: [{ + type: Input + }], isEmpty: [{ + type: Input + }], addedCB: [{ + type: Output + }], changeCB: [{ + type: Output + }], disableCB: [{ + type: Output + }], dragCB: [{ + type: Output + }], dragStartCB: [{ + type: Output + }], dragStopCB: [{ + type: Output + }], droppedCB: [{ + type: Output + }], enableCB: [{ + type: Output + }], removedCB: [{ + type: Output + }], resizeCB: [{ + type: Output + }], resizeStartCB: [{ + type: Output + }], resizeStopCB: [{ + type: Output + }] } }); +/** + * can be used when a new item needs to be created, which we do as a Angular component, or deleted (skip) + **/ +function gsCreateNgComponents(host, n, add, isGrid) { + if (add) { + // + // create the component dynamically - see https://angular.io/docs/ts/latest/cookbook/dynamic-component-loader.html + // + if (!host) + return; + if (isGrid) { + // TODO: figure out how to create ng component inside regular Div. need to access app injectors... + // if (!container) { + // const hostElement: Element = host; + // const environmentInjector: EnvironmentInjector; + // grid = createComponent(GridstackComponent, {environmentInjector, hostElement})?.instance; + // } + const gridItemComp = host.parentElement?._gridItemComp; + if (!gridItemComp) + return; + // check if gridItem has a child component with 'container' exposed to create under.. + const container = gridItemComp.childWidget?.container || gridItemComp.container; + const gridRef = container?.createComponent(GridstackComponent); + const grid = gridRef?.instance; + if (!grid) + return; + grid.ref = gridRef; + grid.options = n; + return grid.el; + } + else { + const gridComp = host._gridComp; + const gridItemRef = gridComp?.container?.createComponent(GridstackItemComponent); + const gridItem = gridItemRef?.instance; + if (!gridItem) + return; + gridItem.ref = gridItemRef; + // define what type of component to create as child, OR you can do it GridstackItemComponent template, but this is more generic + const selector = n.selector; + const type = selector ? GridstackComponent.selectorToType[selector] : undefined; + if (type) { + // shared code to create our selector component + const createComp = () => { + const childWidget = gridItem.container?.createComponent(type)?.instance; + // if proper BaseWidget subclass, save it and load additional data + if (childWidget && typeof childWidget.serialize === 'function' && typeof childWidget.deserialize === 'function') { + gridItem.childWidget = childWidget; + childWidget.deserialize(n); + } + }; + const lazyLoad = n.lazyLoad || n.grid?.opts?.lazyLoad && n.lazyLoad !== false; + if (lazyLoad) { + if (!n.visibleObservable) { + n.visibleObservable = new IntersectionObserver(([entry]) => { + if (entry.isIntersecting) { + n.visibleObservable?.disconnect(); + delete n.visibleObservable; + createComp(); + } + }); + window.setTimeout(() => n.visibleObservable?.observe(gridItem.el)); // wait until callee sets position attributes + } + } + else + createComp(); + } + return gridItem.el; + } + } + else { + // + // REMOVE - have to call ComponentRef:destroy() for dynamic objects to correctly remove themselves + // Note: this will destroy all children dynamic components as well: gridItem -> childWidget + // + if (isGrid) { + const grid = n.el?._gridComp; + if (grid?.ref) + grid.ref.destroy(); + else + grid?.ngOnDestroy(); + } + else { + const gridItem = n.el?._gridItemComp; + if (gridItem?.ref) + gridItem.ref.destroy(); + else + gridItem?.ngOnDestroy(); + } + } + return; +} +/** + * called for each item in the grid - check if additional information needs to be saved. + * Note: since this is options minus gridstack protected members using Utils.removeInternalForSave(), + * this typically doesn't need to do anything. However your custom Component @Input() are now supported + * using BaseWidget.serialize() + */ +function gsSaveAdditionalNgInfo(n, w) { + const gridItem = n.el?._gridItemComp; + if (gridItem) { + const input = gridItem.childWidget?.serialize(); + if (input) { + w.input = input; + } + return; + } + // else check if Grid + const grid = n.el?._gridComp; + if (grid) { + //.... save any custom data + } +} +/** + * track when widgeta re updated (rather than created) to make sure we de-serialize them as well + */ +function gsUpdateNgComponents(n) { + const w = n; + const gridItem = n.el?._gridItemComp; + if (gridItem?.childWidget && w.input) + gridItem.childWidget.deserialize(w); +} + +/** + * gridstack.component.ts 12.3.3 + * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license + */ +/** + * @deprecated Use GridstackComponent and GridstackItemComponent as standalone components instead. + * + * This NgModule is provided for backward compatibility but is no longer the recommended approach. + * Import components directly in your standalone components or use the new Angular module structure. + * + * @example + * ```typescript + * // Preferred approach - standalone components + * @Component({ + * selector: 'my-app', + * imports: [GridstackComponent, GridstackItemComponent], + * template: '' + * }) + * export class AppComponent {} + * + * // Legacy approach (deprecated) + * @NgModule({ + * imports: [GridstackModule] + * }) + * export class AppModule {} + * ``` + */ +class GridstackModule { +} +GridstackModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); +GridstackModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: GridstackModule, imports: [GridstackItemComponent, + GridstackComponent], exports: [GridstackItemComponent, + GridstackComponent] }); +GridstackModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackModule, imports: [GridstackItemComponent, + GridstackComponent] }); +i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackModule, decorators: [{ + type: NgModule, + args: [{ + imports: [ + GridstackItemComponent, + GridstackComponent, + ], + exports: [ + GridstackItemComponent, + GridstackComponent, + ], + }] + }] }); + +/* + * Public API Surface of gridstack-angular + */ + +/** + * Generated bundle index. Do not edit. + */ + +export { BaseWidget, GridstackComponent, GridstackItemComponent, GridstackModule, gsCreateNgComponents, gsSaveAdditionalNgInfo, gsUpdateNgComponents }; +//# sourceMappingURL=gridstack-angular.mjs.map diff --git a/node_modules/gridstack/dist/angular/fesm2020/gridstack-angular.mjs.map b/node_modules/gridstack/dist/angular/fesm2020/gridstack-angular.mjs.map new file mode 100644 index 000000000..f854cb17d --- /dev/null +++ b/node_modules/gridstack/dist/angular/fesm2020/gridstack-angular.mjs.map @@ -0,0 +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.3.3\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/**\r\n * Extended GridStackWidget interface for Angular integration.\r\n * Adds Angular-specific properties for dynamic component creation.\r\n */\r\nexport interface NgGridStackWidget extends GridStackWidget {\r\n /** Angular component selector for dynamic creation (e.g., 'my-widget') */\r\n selector?: string;\r\n /** Serialized data for component @Input() properties */\r\n input?: NgCompInputs;\r\n /** Configuration for nested sub-grids */\r\n subGridOpts?: NgGridStackOptions;\r\n}\r\n\r\n/**\r\n * Extended GridStackNode interface for Angular integration.\r\n * Adds component selector for dynamic content creation.\r\n */\r\nexport interface NgGridStackNode extends GridStackNode {\r\n /** Angular component selector for this node's content */\r\n selector?: string;\r\n}\r\n\r\n/**\r\n * Extended GridStackOptions interface for Angular integration.\r\n * Supports Angular-specific widget definitions and nested grids.\r\n */\r\nexport interface NgGridStackOptions extends GridStackOptions {\r\n /** Array of Angular widget definitions for initial grid setup */\r\n children?: NgGridStackWidget[];\r\n /** Configuration for nested sub-grids (Angular-aware) */\r\n subGridOpts?: NgGridStackOptions;\r\n}\r\n\r\n/**\r\n * Type for component input data serialization.\r\n * Maps @Input() property names to their values for widget persistence.\r\n * \r\n * @example\r\n * ```typescript\r\n * const inputs: NgCompInputs = {\r\n * title: 'My Widget',\r\n * value: 42,\r\n * config: { enabled: true }\r\n * };\r\n * ```\r\n */\r\nexport type NgCompInputs = {[key: string]: any};\r\n","/**\r\n * gridstack-item.component.ts 12.3.3\r\n * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license\r\n */\r\n\r\n/**\r\n * Abstract base class that all custom widgets should extend.\r\n * \r\n * This class provides the interface needed for GridstackItemComponent to:\r\n * - Serialize/deserialize widget data\r\n * - Save/restore widget state\r\n * - Integrate with Angular lifecycle\r\n * \r\n * Extend this class when creating custom widgets for dynamic grids.\r\n * \r\n * @example\r\n * ```typescript\r\n * @Component({\r\n * selector: 'my-custom-widget',\r\n * template: '
{{data}}
'\r\n * })\r\n * export class MyCustomWidget extends BaseWidget {\r\n * @Input() data: string = '';\r\n * \r\n * serialize() {\r\n * return { data: this.data };\r\n * }\r\n * }\r\n * ```\r\n */\r\n\r\nimport { Injectable } from '@angular/core';\r\nimport { NgCompInputs, NgGridStackWidget } from './types';\r\n\r\n/**\r\n * Base widget class for GridStack Angular integration.\r\n */\r\n@Injectable()\r\nexport abstract class BaseWidget {\r\n\r\n /**\r\n * Complete widget definition including position, size, and Angular-specific data.\r\n * Populated automatically when the widget is loaded or saved.\r\n */\r\n public widgetItem?: NgGridStackWidget;\r\n\r\n /**\r\n * Override this method to return serializable data for this widget.\r\n * \r\n * Return an object with properties that map to your component's @Input() fields.\r\n * The selector is handled automatically, so only include component-specific data.\r\n * \r\n * @returns Object containing serializable component data\r\n * \r\n * @example\r\n * ```typescript\r\n * serialize() {\r\n * return {\r\n * title: this.title,\r\n * value: this.value,\r\n * settings: this.settings\r\n * };\r\n * }\r\n * ```\r\n */\r\n public serialize(): NgCompInputs | undefined { return; }\r\n\r\n /**\r\n * Override this method to handle widget restoration from saved data.\r\n * \r\n * Use this for complex initialization that goes beyond simple @Input() mapping.\r\n * The default implementation automatically assigns input data to component properties.\r\n * \r\n * @param w The saved widget data including input properties\r\n * \r\n * @example\r\n * ```typescript\r\n * deserialize(w: NgGridStackWidget) {\r\n * super.deserialize(w); // Call parent for basic setup\r\n * \r\n * // Custom initialization logic\r\n * if (w.input?.complexData) {\r\n * this.processComplexData(w.input.complexData);\r\n * }\r\n * }\r\n * ```\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.3.3\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/**\n * Extended HTMLElement interface for grid items.\n * Stores a back-reference to the Angular component for integration.\n */\nexport interface GridItemCompHTMLElement extends GridItemHTMLElement {\n /** Back-reference to the Angular GridStackItem component */\n _gridItemComp?: GridstackItemComponent;\n}\n\n/**\n * Angular component wrapper for individual GridStack items.\n * \n * This component represents a single grid item and handles:\n * - Dynamic content creation and management\n * - Integration with parent GridStack component\n * - Component lifecycle and cleanup\n * - Widget options and configuration\n * \n * Use in combination with GridstackComponent for the parent grid.\n * \n * @example\n * ```html\n * \n * \n * \n * \n * \n * ```\n */\n@Component({\n selector: 'gridstack-item',\n template: `\n
\n \n \n \n \n \n {{options.content}}\n
`,\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 /**\n * Container for dynamic component creation within this grid item.\n * Used to append child components programmatically.\n */\n @ViewChild('container', { read: ViewContainerRef, static: true}) public container?: ViewContainerRef;\n\n /**\n * Component reference for dynamic component removal.\n * Used internally when this component is created dynamically.\n */\n public ref: ComponentRef | undefined;\n\n /**\n * Reference to child widget component for serialization.\n * Used to save/restore additional data along with grid position.\n */\n public childWidget: BaseWidget | undefined;\n\n /**\n * Grid item configuration options.\n * Defines position, size, and behavior of this grid item.\n * \n * @example\n * ```typescript\n * itemOptions: GridStackNode = {\n * x: 0, y: 0, w: 2, h: 1,\n * noResize: true,\n * content: 'Item content'\n * };\n * ```\n */\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) {\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.3.3\n * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license\n */\n\nimport {\n AfterContentInit, Component, ContentChildren, ElementRef, EventEmitter, Input,\n OnDestroy, OnInit, Output, QueryList, Type, ViewChild, ViewContainerRef, reflectComponentType, ComponentRef\n} 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/**\n * Event handler callback signatures for different GridStack events.\n * These types define the structure of data passed to Angular event emitters.\n */\n\n/** Callback for general events (enable, disable, etc.) */\nexport type eventCB = {event: Event};\n\n/** Callback for element-specific events (resize, drag, etc.) */\nexport type elementCB = {event: Event, el: GridItemHTMLElement};\n\n/** Callback for events affecting multiple nodes (change, etc.) */\nexport type nodesCB = {event: Event, nodes: GridStackNode[]};\n\n/** Callback for drop events with before/after node state */\nexport type droppedCB = {event: Event, previousNode: GridStackNode, newNode: GridStackNode};\n\n/**\n * Extended HTMLElement interface for the grid container.\n * Stores a back-reference to the Angular component for integration purposes.\n */\nexport interface GridCompHTMLElement extends GridHTMLElement {\n /** Back-reference to the Angular GridStack component */\n _gridComp?: GridstackComponent;\n}\n\n/**\n * Mapping of selector strings to Angular component types.\n * Used for dynamic component creation based on widget selectors.\n */\nexport type SelectorToType = {[key: string]: Type};\n\n/**\n * Angular component wrapper for GridStack.\n * \n * This component provides Angular integration for GridStack grids, handling:\n * - Grid initialization and lifecycle\n * - Dynamic component creation and management\n * - Event binding and emission\n * - Integration with Angular change detection\n * \n * Use in combination with GridstackItemComponent for individual grid items.\n * \n * @example\n * ```html\n * \n *
Drag widgets here
\n *
\n * ```\n */\n@Component({\n selector: 'gridstack',\n template: `\n \n \n \n \n \n \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 /**\n * List of template-based grid items (not recommended approach).\n * Used to sync between DOM and GridStack internals when items are defined in templates.\n * Prefer dynamic component creation instead.\n */\n @ContentChildren(GridstackItemComponent) public gridstackItems?: QueryList;\n /**\n * Container for dynamic component creation (recommended approach).\n * Used to append grid items programmatically at runtime.\n */\n @ViewChild('container', { read: ViewContainerRef, static: true}) public container?: ViewContainerRef;\n\n /**\n * Grid configuration options.\n * Can be set before grid initialization or updated after grid is created.\n * \n * @example\n * ```typescript\n * gridOptions: GridStackOptions = {\n * column: 12,\n * cellHeight: 'auto',\n * animate: true\n * };\n * ```\n */\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 /** Get the current running grid options */\n public get options(): GridStackOptions { return this._grid?.opts || this._options || {}; }\n\n /**\n * Controls whether empty content should be displayed.\n * Set to true to show ng-content with 'empty-content' selector when grid has no items.\n * \n * @example\n * ```html\n * \n *
Drag widgets here to get started
\n *
\n * ```\n */\n @Input() public isEmpty?: boolean;\n\n /**\n * GridStack event emitters for Angular integration.\n * \n * These provide Angular-style event handling for GridStack events.\n * Alternatively, use `this.grid.on('event1 event2', callback)` for multiple events.\n * \n * Note: 'CB' suffix prevents conflicts with native DOM events.\n * \n * @example\n * ```html\n * \n * \n * ```\n */\n \n /** Emitted when widgets are added to the grid */\n @Output() public addedCB = new EventEmitter();\n \n /** Emitted when grid layout changes */\n @Output() public changeCB = new EventEmitter();\n \n /** Emitted when grid is disabled */\n @Output() public disableCB = new EventEmitter();\n \n /** Emitted during widget drag operations */\n @Output() public dragCB = new EventEmitter();\n \n /** Emitted when widget drag starts */\n @Output() public dragStartCB = new EventEmitter();\n \n /** Emitted when widget drag stops */\n @Output() public dragStopCB = new EventEmitter();\n \n /** Emitted when widget is dropped */\n @Output() public droppedCB = new EventEmitter();\n \n /** Emitted when grid is enabled */\n @Output() public enableCB = new EventEmitter();\n \n /** Emitted when widgets are removed from the grid */\n @Output() public removedCB = new EventEmitter();\n \n /** Emitted during widget resize operations */\n @Output() public resizeCB = new EventEmitter();\n \n /** Emitted when widget resize starts */\n @Output() public resizeStartCB = new EventEmitter();\n \n /** Emitted when widget resize stops */\n @Output() public resizeStopCB = new EventEmitter();\n\n /**\n * Get the native DOM element that contains grid-specific fields.\n * This element has GridStack properties attached to it.\n */\n public get el(): GridCompHTMLElement { return this.elementRef.nativeElement; }\n\n /**\n * Get the underlying GridStack instance.\n * Use this to access GridStack API methods directly.\n * \n * @example\n * ```typescript\n * this.gridComponent.grid.addWidget({x: 0, y: 0, w: 2, h: 1});\n * ```\n */\n public get grid(): GridStack | undefined { return this._grid; }\n\n /**\n * Component reference for dynamic component removal.\n * Used internally when this component is created dynamically.\n */\n public ref: ComponentRef | undefined;\n\n /**\n * Mapping of component selectors to their types for dynamic creation.\n * \n * This enables dynamic component instantiation from string selectors.\n * Angular doesn't provide public access to this mapping, so we maintain our own.\n * \n * @example\n * ```typescript\n * GridstackComponent.addComponentToSelectorType([MyWidgetComponent]);\n * ```\n */\n public static selectorToType: SelectorToType = {};\n /**\n * Register a list of Angular components for dynamic creation.\n * \n * @param typeList Array of component types to register\n * \n * @example\n * ```typescript\n * GridstackComponent.addComponentToSelectorType([\n * MyWidgetComponent,\n * AnotherWidgetComponent\n * ]);\n * ```\n */\n public static addComponentToSelectorType(typeList: Array>) {\n typeList.forEach(type => GridstackComponent.selectorToType[ GridstackComponent.getSelector(type) ] = type);\n }\n /**\n * Extract the selector string from an Angular component type.\n * \n * @param type The component type to get selector from\n * @returns The component's selector string\n */\n public static getSelector(type: Type): 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) {\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 if (!GridStack.updateCB) {\n GridStack.updateCB = gsUpdateNgComponents;\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 // nested grids don't have events in v12.1+ so skip\n if (grid.parentGridNode) return;\n grid\n .on('added', (event: Event, nodes: GridStackNode[]) => {\n const gridComp = (nodes[0].grid?.el as GridCompHTMLElement)._gridComp || this;\n gridComp.checkEmpty();\n this.addedCB.emit({event, nodes});\n })\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[]) => {\n const gridComp = (nodes[0].grid?.el as GridCompHTMLElement)._gridComp || this;\n gridComp.checkEmpty();\n this.removedCB.emit({event, nodes});\n })\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 // nested grids don't have events in v12.1+ so skip\n if (grid.parentGridNode) 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\n/**\n * track when widgeta re updated (rather than created) to make sure we de-serialize them as well\n */\nexport function gsUpdateNgComponents(n: NgGridStackNode) {\n const w: NgGridStackWidget = n;\n const gridItem = (n.el as GridItemCompHTMLElement)?._gridItemComp;\n if (gridItem?.childWidget && w.input) gridItem.childWidget.deserialize(w);\n}","/**\r\n * gridstack.component.ts 12.3.3\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/**\r\n * @deprecated Use GridstackComponent and GridstackItemComponent as standalone components instead.\r\n * \r\n * This NgModule is provided for backward compatibility but is no longer the recommended approach.\r\n * Import components directly in your standalone components or use the new Angular module structure.\r\n * \r\n * @example\r\n * ```typescript\r\n * // Preferred approach - standalone components\r\n * @Component({\r\n * selector: 'my-app',\r\n * imports: [GridstackComponent, GridstackItemComponent],\r\n * template: ''\r\n * })\r\n * export class AppComponent {}\r\n * \r\n * // Legacy approach (deprecated)\r\n * @NgModule({\r\n * imports: [GridstackModule]\r\n * })\r\n * export class AppModule {}\r\n * ```\r\n */\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;AA+BH;;AAEG;MAEmB,UAAU,CAAA;AAQ9B;;;;;;;;;;;;;;;;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C,WAAW,CAAC,CAAC,CAAC,CAAC;AAC5E;;AC3cA;;;AAGG;AAOH;;;;;;;;;;;;;;;;;;;;;;AAsBG;MAWU,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;;;AC1CD;;AAEG;;ACFH;;AAEG;;;;"} \ No newline at end of file diff --git a/node_modules/gridstack/dist/angular/index.d.ts b/node_modules/gridstack/dist/angular/index.d.ts new file mode 100644 index 000000000..0af54a2fb --- /dev/null +++ b/node_modules/gridstack/dist/angular/index.d.ts @@ -0,0 +1,5 @@ +export * from './lib/types'; +export * from './lib/base-widget'; +export * from './lib/gridstack-item.component'; +export * from './lib/gridstack.component'; +export * from './lib/gridstack.module'; diff --git a/node_modules/gridstack/dist/angular/lib/base-widget.d.ts b/node_modules/gridstack/dist/angular/lib/base-widget.d.ts new file mode 100644 index 000000000..dbed2eaf2 --- /dev/null +++ b/node_modules/gridstack/dist/angular/lib/base-widget.d.ts @@ -0,0 +1,55 @@ +import { NgCompInputs, NgGridStackWidget } from './types'; +import * as i0 from "@angular/core"; +/** + * Base widget class for GridStack Angular integration. + */ +export declare abstract class BaseWidget { + /** + * Complete widget definition including position, size, and Angular-specific data. + * Populated automatically when the widget is loaded or saved. + */ + widgetItem?: NgGridStackWidget; + /** + * Override this method to return serializable data for this widget. + * + * Return an object with properties that map to your component's @Input() fields. + * The selector is handled automatically, so only include component-specific data. + * + * @returns Object containing serializable component data + * + * @example + * ```typescript + * serialize() { + * return { + * title: this.title, + * value: this.value, + * settings: this.settings + * }; + * } + * ``` + */ + serialize(): NgCompInputs | undefined; + /** + * Override this method to handle widget restoration from saved data. + * + * Use this for complex initialization that goes beyond simple @Input() mapping. + * The default implementation automatically assigns input data to component properties. + * + * @param w The saved widget data including input properties + * + * @example + * ```typescript + * deserialize(w: NgGridStackWidget) { + * super.deserialize(w); // Call parent for basic setup + * + * // Custom initialization logic + * if (w.input?.complexData) { + * this.processComplexData(w.input.complexData); + * } + * } + * ``` + */ + deserialize(w: NgGridStackWidget): void; + static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵprov: i0.ɵɵInjectableDeclaration; +} diff --git a/node_modules/gridstack/dist/angular/lib/gridstack-item.component.d.ts b/node_modules/gridstack/dist/angular/lib/gridstack-item.component.d.ts new file mode 100644 index 000000000..2997be124 --- /dev/null +++ b/node_modules/gridstack/dist/angular/lib/gridstack-item.component.d.ts @@ -0,0 +1,79 @@ +/** + * gridstack-item.component.ts 12.3.3 + * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license + */ +import { ElementRef, ViewContainerRef, OnDestroy, ComponentRef } from '@angular/core'; +import { GridItemHTMLElement, GridStackNode } from 'gridstack'; +import { BaseWidget } from './base-widget'; +import * as i0 from "@angular/core"; +/** + * Extended HTMLElement interface for grid items. + * Stores a back-reference to the Angular component for integration. + */ +export interface GridItemCompHTMLElement extends GridItemHTMLElement { + /** Back-reference to the Angular GridStackItem component */ + _gridItemComp?: GridstackItemComponent; +} +/** + * Angular component wrapper for individual GridStack items. + * + * This component represents a single grid item and handles: + * - Dynamic content creation and management + * - Integration with parent GridStack component + * - Component lifecycle and cleanup + * - Widget options and configuration + * + * Use in combination with GridstackComponent for the parent grid. + * + * @example + * ```html + * + * + * + * + * + * ``` + */ +export declare class GridstackItemComponent implements OnDestroy { + protected readonly elementRef: ElementRef; + /** + * Container for dynamic component creation within this grid item. + * Used to append child components programmatically. + */ + container?: ViewContainerRef; + /** + * Component reference for dynamic component removal. + * Used internally when this component is created dynamically. + */ + ref: ComponentRef | undefined; + /** + * Reference to child widget component for serialization. + * Used to save/restore additional data along with grid position. + */ + childWidget: BaseWidget | undefined; + /** + * Grid item configuration options. + * Defines position, size, and behavior of this grid item. + * + * @example + * ```typescript + * itemOptions: GridStackNode = { + * x: 0, y: 0, w: 2, h: 1, + * noResize: true, + * content: 'Item content' + * }; + * ``` + */ + set options(val: GridStackNode); + /** return the latest grid options (from GS once built, otherwise initial values) */ + get options(): GridStackNode; + protected _options?: GridStackNode; + /** return the native element that contains grid specific fields as well */ + get el(): GridItemCompHTMLElement; + /** clears the initial options now that we've built */ + clearOptions(): void; + constructor(elementRef: ElementRef); + ngOnDestroy(): void; + static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵcmp: i0.ɵɵComponentDeclaration; +} diff --git a/node_modules/gridstack/dist/angular/lib/gridstack.component.d.ts b/node_modules/gridstack/dist/angular/lib/gridstack.component.d.ts new file mode 100644 index 000000000..9e33f7fa8 --- /dev/null +++ b/node_modules/gridstack/dist/angular/lib/gridstack.component.d.ts @@ -0,0 +1,236 @@ +/** + * gridstack.component.ts 12.3.3 + * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license + */ +import { AfterContentInit, ElementRef, EventEmitter, OnDestroy, OnInit, QueryList, Type, ViewContainerRef, ComponentRef } from '@angular/core'; +import { Subscription } from 'rxjs'; +import { GridHTMLElement, GridItemHTMLElement, GridStack, GridStackNode, GridStackOptions } from 'gridstack'; +import { NgGridStackNode, NgGridStackWidget } from './types'; +import { GridstackItemComponent } from './gridstack-item.component'; +import * as i0 from "@angular/core"; +/** + * Event handler callback signatures for different GridStack events. + * These types define the structure of data passed to Angular event emitters. + */ +/** Callback for general events (enable, disable, etc.) */ +export declare type eventCB = { + event: Event; +}; +/** Callback for element-specific events (resize, drag, etc.) */ +export declare type elementCB = { + event: Event; + el: GridItemHTMLElement; +}; +/** Callback for events affecting multiple nodes (change, etc.) */ +export declare type nodesCB = { + event: Event; + nodes: GridStackNode[]; +}; +/** Callback for drop events with before/after node state */ +export declare type droppedCB = { + event: Event; + previousNode: GridStackNode; + newNode: GridStackNode; +}; +/** + * Extended HTMLElement interface for the grid container. + * Stores a back-reference to the Angular component for integration purposes. + */ +export interface GridCompHTMLElement extends GridHTMLElement { + /** Back-reference to the Angular GridStack component */ + _gridComp?: GridstackComponent; +} +/** + * Mapping of selector strings to Angular component types. + * Used for dynamic component creation based on widget selectors. + */ +export declare type SelectorToType = { + [key: string]: Type; +}; +/** + * Angular component wrapper for GridStack. + * + * This component provides Angular integration for GridStack grids, handling: + * - Grid initialization and lifecycle + * - Dynamic component creation and management + * - Event binding and emission + * - Integration with Angular change detection + * + * Use in combination with GridstackItemComponent for individual grid items. + * + * @example + * ```html + * + *
Drag widgets here
+ *
+ * ``` + */ +export declare class GridstackComponent implements OnInit, AfterContentInit, OnDestroy { + protected readonly elementRef: ElementRef; + /** + * List of template-based grid items (not recommended approach). + * Used to sync between DOM and GridStack internals when items are defined in templates. + * Prefer dynamic component creation instead. + */ + gridstackItems?: QueryList; + /** + * Container for dynamic component creation (recommended approach). + * Used to append grid items programmatically at runtime. + */ + container?: ViewContainerRef; + /** + * Grid configuration options. + * Can be set before grid initialization or updated after grid is created. + * + * @example + * ```typescript + * gridOptions: GridStackOptions = { + * column: 12, + * cellHeight: 'auto', + * animate: true + * }; + * ``` + */ + set options(o: GridStackOptions); + /** Get the current running grid options */ + get options(): GridStackOptions; + /** + * Controls whether empty content should be displayed. + * Set to true to show ng-content with 'empty-content' selector when grid has no items. + * + * @example + * ```html + * + *
Drag widgets here to get started
+ *
+ * ``` + */ + isEmpty?: boolean; + /** + * GridStack event emitters for Angular integration. + * + * These provide Angular-style event handling for GridStack events. + * Alternatively, use `this.grid.on('event1 event2', callback)` for multiple events. + * + * Note: 'CB' suffix prevents conflicts with native DOM events. + * + * @example + * ```html + * + * + * ``` + */ + /** Emitted when widgets are added to the grid */ + addedCB: EventEmitter; + /** Emitted when grid layout changes */ + changeCB: EventEmitter; + /** Emitted when grid is disabled */ + disableCB: EventEmitter; + /** Emitted during widget drag operations */ + dragCB: EventEmitter; + /** Emitted when widget drag starts */ + dragStartCB: EventEmitter; + /** Emitted when widget drag stops */ + dragStopCB: EventEmitter; + /** Emitted when widget is dropped */ + droppedCB: EventEmitter; + /** Emitted when grid is enabled */ + enableCB: EventEmitter; + /** Emitted when widgets are removed from the grid */ + removedCB: EventEmitter; + /** Emitted during widget resize operations */ + resizeCB: EventEmitter; + /** Emitted when widget resize starts */ + resizeStartCB: EventEmitter; + /** Emitted when widget resize stops */ + resizeStopCB: EventEmitter; + /** + * Get the native DOM element that contains grid-specific fields. + * This element has GridStack properties attached to it. + */ + get el(): GridCompHTMLElement; + /** + * Get the underlying GridStack instance. + * Use this to access GridStack API methods directly. + * + * @example + * ```typescript + * this.gridComponent.grid.addWidget({x: 0, y: 0, w: 2, h: 1}); + * ``` + */ + get grid(): GridStack | undefined; + /** + * Component reference for dynamic component removal. + * Used internally when this component is created dynamically. + */ + ref: ComponentRef | undefined; + /** + * Mapping of component selectors to their types for dynamic creation. + * + * This enables dynamic component instantiation from string selectors. + * Angular doesn't provide public access to this mapping, so we maintain our own. + * + * @example + * ```typescript + * GridstackComponent.addComponentToSelectorType([MyWidgetComponent]); + * ``` + */ + static selectorToType: SelectorToType; + /** + * Register a list of Angular components for dynamic creation. + * + * @param typeList Array of component types to register + * + * @example + * ```typescript + * GridstackComponent.addComponentToSelectorType([ + * MyWidgetComponent, + * AnotherWidgetComponent + * ]); + * ``` + */ + static addComponentToSelectorType(typeList: Array>): void; + /** + * Extract the selector string from an Angular component type. + * + * @param type The component type to get selector from + * @returns The component's selector string + */ + static getSelector(type: Type): string; + protected _options?: GridStackOptions; + protected _grid?: GridStack; + protected _sub: Subscription | undefined; + protected loaded?: boolean; + constructor(elementRef: ElementRef); + ngOnInit(): void; + /** wait until after all DOM is ready to init gridstack children (after angular ngFor and sub-components run first) */ + ngAfterContentInit(): void; + ngOnDestroy(): void; + /** + * called when the TEMPLATE (not recommended) list of items changes - get a list of nodes and + * update the layout accordingly (which will take care of adding/removing items changed by Angular) + */ + updateAll(): void; + /** check if the grid is empty, if so show alternative content */ + checkEmpty(): void; + /** get all known events as easy to use Outputs for convenience */ + protected hookEvents(grid?: GridStack): void; + protected unhookEvents(grid?: GridStack): void; + static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵcmp: i0.ɵɵComponentDeclaration; +} +/** + * can be used when a new item needs to be created, which we do as a Angular component, or deleted (skip) + **/ +export declare function gsCreateNgComponents(host: GridCompHTMLElement | HTMLElement, n: NgGridStackNode, add: boolean, isGrid: boolean): HTMLElement | undefined; +/** + * called for each item in the grid - check if additional information needs to be saved. + * Note: since this is options minus gridstack protected members using Utils.removeInternalForSave(), + * this typically doesn't need to do anything. However your custom Component @Input() are now supported + * using BaseWidget.serialize() + */ +export declare function gsSaveAdditionalNgInfo(n: NgGridStackNode, w: NgGridStackWidget): void; +/** + * track when widgeta re updated (rather than created) to make sure we de-serialize them as well + */ +export declare function gsUpdateNgComponents(n: NgGridStackNode): void; diff --git a/node_modules/gridstack/dist/angular/lib/gridstack.module.d.ts b/node_modules/gridstack/dist/angular/lib/gridstack.module.d.ts new file mode 100644 index 000000000..0bb7599a3 --- /dev/null +++ b/node_modules/gridstack/dist/angular/lib/gridstack.module.d.ts @@ -0,0 +1,31 @@ +import * as i0 from "@angular/core"; +import * as i1 from "./gridstack-item.component"; +import * as i2 from "./gridstack.component"; +/** + * @deprecated Use GridstackComponent and GridstackItemComponent as standalone components instead. + * + * This NgModule is provided for backward compatibility but is no longer the recommended approach. + * Import components directly in your standalone components or use the new Angular module structure. + * + * @example + * ```typescript + * // Preferred approach - standalone components + * @Component({ + * selector: 'my-app', + * imports: [GridstackComponent, GridstackItemComponent], + * template: '' + * }) + * export class AppComponent {} + * + * // Legacy approach (deprecated) + * @NgModule({ + * imports: [GridstackModule] + * }) + * export class AppModule {} + * ``` + */ +export declare class GridstackModule { + static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵmod: i0.ɵɵNgModuleDeclaration; + static ɵinj: i0.ɵɵInjectorDeclaration; +} diff --git a/node_modules/gridstack/dist/angular/lib/types.d.ts b/node_modules/gridstack/dist/angular/lib/types.d.ts new file mode 100644 index 000000000..677d41c3c --- /dev/null +++ b/node_modules/gridstack/dist/angular/lib/types.d.ts @@ -0,0 +1,51 @@ +/** + * gridstack-item.component.ts 12.3.3 + * Copyright (c) 2025 Alain Dumesny - see GridStack root license + */ +import { GridStackNode, GridStackOptions, GridStackWidget } from "gridstack"; +/** + * Extended GridStackWidget interface for Angular integration. + * Adds Angular-specific properties for dynamic component creation. + */ +export interface NgGridStackWidget extends GridStackWidget { + /** Angular component selector for dynamic creation (e.g., 'my-widget') */ + selector?: string; + /** Serialized data for component @Input() properties */ + input?: NgCompInputs; + /** Configuration for nested sub-grids */ + subGridOpts?: NgGridStackOptions; +} +/** + * Extended GridStackNode interface for Angular integration. + * Adds component selector for dynamic content creation. + */ +export interface NgGridStackNode extends GridStackNode { + /** Angular component selector for this node's content */ + selector?: string; +} +/** + * Extended GridStackOptions interface for Angular integration. + * Supports Angular-specific widget definitions and nested grids. + */ +export interface NgGridStackOptions extends GridStackOptions { + /** Array of Angular widget definitions for initial grid setup */ + children?: NgGridStackWidget[]; + /** Configuration for nested sub-grids (Angular-aware) */ + subGridOpts?: NgGridStackOptions; +} +/** + * Type for component input data serialization. + * Maps @Input() property names to their values for widget persistence. + * + * @example + * ```typescript + * const inputs: NgCompInputs = { + * title: 'My Widget', + * value: 42, + * config: { enabled: true } + * }; + * ``` + */ +export declare type NgCompInputs = { + [key: string]: any; +}; diff --git a/node_modules/gridstack/dist/angular/package.json b/node_modules/gridstack/dist/angular/package.json new file mode 100644 index 000000000..6ef546eb7 --- /dev/null +++ b/node_modules/gridstack/dist/angular/package.json @@ -0,0 +1,31 @@ +{ + "name": "gridstack-angular", + "version": "12.3.3", + "peerDependencies": { + "@angular/common": ">=14", + "@angular/core": ">=14" + }, + "dependencies": { + "tslib": "^2.3.0" + }, + "module": "fesm2015/gridstack-angular.mjs", + "es2020": "fesm2020/gridstack-angular.mjs", + "esm2020": "esm2020/gridstack-angular.mjs", + "fesm2020": "fesm2020/gridstack-angular.mjs", + "fesm2015": "fesm2015/gridstack-angular.mjs", + "typings": "index.d.ts", + "exports": { + "./package.json": { + "default": "./package.json" + }, + ".": { + "types": "./index.d.ts", + "esm2020": "./esm2020/gridstack-angular.mjs", + "es2020": "./fesm2020/gridstack-angular.mjs", + "es2015": "./fesm2015/gridstack-angular.mjs", + "node": "./fesm2015/gridstack-angular.mjs", + "default": "./fesm2020/gridstack-angular.mjs" + } + }, + "sideEffects": false +} \ No newline at end of file diff --git a/node_modules/gridstack/dist/angular/src/base-widget.ts b/node_modules/gridstack/dist/angular/src/base-widget.ts new file mode 100644 index 000000000..31123039f --- /dev/null +++ b/node_modules/gridstack/dist/angular/src/base-widget.ts @@ -0,0 +1,95 @@ +/** + * gridstack-item.component.ts 12.3.3 + * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license + */ + +/** + * Abstract base class that all custom widgets should extend. + * + * This class provides the interface needed for GridstackItemComponent to: + * - Serialize/deserialize widget data + * - Save/restore widget state + * - Integrate with Angular lifecycle + * + * Extend this class when creating custom widgets for dynamic grids. + * + * @example + * ```typescript + * @Component({ + * selector: 'my-custom-widget', + * template: '
{{data}}
' + * }) + * export class MyCustomWidget extends BaseWidget { + * @Input() data: string = ''; + * + * serialize() { + * return { data: this.data }; + * } + * } + * ``` + */ + +import { Injectable } from '@angular/core'; +import { NgCompInputs, NgGridStackWidget } from './types'; + +/** + * Base widget class for GridStack Angular integration. + */ +@Injectable() +export abstract class BaseWidget { + + /** + * Complete widget definition including position, size, and Angular-specific data. + * Populated automatically when the widget is loaded or saved. + */ + public widgetItem?: NgGridStackWidget; + + /** + * Override this method to return serializable data for this widget. + * + * Return an object with properties that map to your component's @Input() fields. + * The selector is handled automatically, so only include component-specific data. + * + * @returns Object containing serializable component data + * + * @example + * ```typescript + * serialize() { + * return { + * title: this.title, + * value: this.value, + * settings: this.settings + * }; + * } + * ``` + */ + public serialize(): NgCompInputs | undefined { return; } + + /** + * Override this method to handle widget restoration from saved data. + * + * Use this for complex initialization that goes beyond simple @Input() mapping. + * The default implementation automatically assigns input data to component properties. + * + * @param w The saved widget data including input properties + * + * @example + * ```typescript + * deserialize(w: NgGridStackWidget) { + * super.deserialize(w); // Call parent for basic setup + * + * // Custom initialization logic + * if (w.input?.complexData) { + * this.processComplexData(w.input.complexData); + * } + * } + * ``` + */ + public deserialize(w: NgGridStackWidget) { + // save full description for meta data + this.widgetItem = w; + if (!w) return; + + if (w.input) Object.assign(this, w.input); + } + } diff --git a/node_modules/gridstack/dist/angular/src/gridstack-item.component.ts b/node_modules/gridstack/dist/angular/src/gridstack-item.component.ts new file mode 100644 index 000000000..18653a917 --- /dev/null +++ b/node_modules/gridstack/dist/angular/src/gridstack-item.component.ts @@ -0,0 +1,125 @@ +/** + * gridstack-item.component.ts 12.3.3 + * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license + */ + +import { Component, ElementRef, Input, ViewChild, ViewContainerRef, OnDestroy, ComponentRef } from '@angular/core'; +import { GridItemHTMLElement, GridStackNode } from 'gridstack'; +import { BaseWidget } from './base-widget'; + +/** + * Extended HTMLElement interface for grid items. + * Stores a back-reference to the Angular component for integration. + */ +export interface GridItemCompHTMLElement extends GridItemHTMLElement { + /** Back-reference to the Angular GridStackItem component */ + _gridItemComp?: GridstackItemComponent; +} + +/** + * Angular component wrapper for individual GridStack items. + * + * This component represents a single grid item and handles: + * - Dynamic content creation and management + * - Integration with parent GridStack component + * - Component lifecycle and cleanup + * - Widget options and configuration + * + * Use in combination with GridstackComponent for the parent grid. + * + * @example + * ```html + * + * + * + * + * + * ``` + */ +@Component({ + selector: 'gridstack-item', + template: ` +
+ + + + + + {{options.content}} +
`, + styles: [` + :host { display: block; } + `], + standalone: true, + // changeDetection: ChangeDetectionStrategy.OnPush, // IFF you want to optimize and control when ChangeDetection needs to happen... +}) +export class GridstackItemComponent implements OnDestroy { + + /** + * Container for dynamic component creation within this grid item. + * Used to append child components programmatically. + */ + @ViewChild('container', { read: ViewContainerRef, static: true}) public container?: ViewContainerRef; + + /** + * Component reference for dynamic component removal. + * Used internally when this component is created dynamically. + */ + public ref: ComponentRef | undefined; + + /** + * Reference to child widget component for serialization. + * Used to save/restore additional data along with grid position. + */ + public childWidget: BaseWidget | undefined; + + /** + * Grid item configuration options. + * Defines position, size, and behavior of this grid item. + * + * @example + * ```typescript + * itemOptions: GridStackNode = { + * x: 0, y: 0, w: 2, h: 1, + * noResize: true, + * content: 'Item content' + * }; + * ``` + */ + @Input() public set options(val: GridStackNode) { + const grid = this.el.gridstackNode?.grid; + if (grid) { + // already built, do an update... + grid.update(this.el, val); + } else { + // store our custom element in options so we can update it and not re-create a generic div! + this._options = {...val, el: this.el}; + } + } + /** return the latest grid options (from GS once built, otherwise initial values) */ + public get options(): GridStackNode { + return this.el.gridstackNode || this._options || {el: this.el}; + } + + protected _options?: GridStackNode; + + /** return the native element that contains grid specific fields as well */ + public get el(): GridItemCompHTMLElement { return this.elementRef.nativeElement; } + + /** clears the initial options now that we've built */ + public clearOptions() { + delete this._options; + } + + constructor(protected readonly elementRef: ElementRef) { + this.el._gridItemComp = this; + } + + public ngOnDestroy(): void { + this.clearOptions(); + delete this.childWidget + delete this.el._gridItemComp; + delete this.container; + delete this.ref; + } +} diff --git a/node_modules/gridstack/dist/angular/src/gridstack.component.ts b/node_modules/gridstack/dist/angular/src/gridstack.component.ts new file mode 100644 index 000000000..f129aab40 --- /dev/null +++ b/node_modules/gridstack/dist/angular/src/gridstack.component.ts @@ -0,0 +1,460 @@ +/** + * gridstack.component.ts 12.3.3 + * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license + */ + +import { + AfterContentInit, Component, ContentChildren, ElementRef, EventEmitter, Input, + OnDestroy, OnInit, Output, QueryList, Type, ViewChild, ViewContainerRef, reflectComponentType, ComponentRef +} from '@angular/core'; +import { NgIf } from '@angular/common'; +import { Subscription } from 'rxjs'; +import { GridHTMLElement, GridItemHTMLElement, GridStack, GridStackNode, GridStackOptions, GridStackWidget } from 'gridstack'; + +import { NgGridStackNode, NgGridStackWidget } from './types'; +import { BaseWidget } from './base-widget'; +import { GridItemCompHTMLElement, GridstackItemComponent } from './gridstack-item.component'; + +/** + * Event handler callback signatures for different GridStack events. + * These types define the structure of data passed to Angular event emitters. + */ + +/** Callback for general events (enable, disable, etc.) */ +export type eventCB = {event: Event}; + +/** Callback for element-specific events (resize, drag, etc.) */ +export type elementCB = {event: Event, el: GridItemHTMLElement}; + +/** Callback for events affecting multiple nodes (change, etc.) */ +export type nodesCB = {event: Event, nodes: GridStackNode[]}; + +/** Callback for drop events with before/after node state */ +export type droppedCB = {event: Event, previousNode: GridStackNode, newNode: GridStackNode}; + +/** + * Extended HTMLElement interface for the grid container. + * Stores a back-reference to the Angular component for integration purposes. + */ +export interface GridCompHTMLElement extends GridHTMLElement { + /** Back-reference to the Angular GridStack component */ + _gridComp?: GridstackComponent; +} + +/** + * Mapping of selector strings to Angular component types. + * Used for dynamic component creation based on widget selectors. + */ +export type SelectorToType = {[key: string]: Type}; + +/** + * Angular component wrapper for GridStack. + * + * This component provides Angular integration for GridStack grids, handling: + * - Grid initialization and lifecycle + * - Dynamic component creation and management + * - Event binding and emission + * - Integration with Angular change detection + * + * Use in combination with GridstackItemComponent for individual grid items. + * + * @example + * ```html + * + *
Drag widgets here
+ *
+ * ``` + */ +@Component({ + selector: 'gridstack', + template: ` + + + + + + + `, + styles: [` + :host { display: block; } + `], + standalone: true, + imports: [NgIf] + // changeDetection: ChangeDetectionStrategy.OnPush, // IFF you want to optimize and control when ChangeDetection needs to happen... +}) +export class GridstackComponent implements OnInit, AfterContentInit, OnDestroy { + + /** + * List of template-based grid items (not recommended approach). + * Used to sync between DOM and GridStack internals when items are defined in templates. + * Prefer dynamic component creation instead. + */ + @ContentChildren(GridstackItemComponent) public gridstackItems?: QueryList; + /** + * Container for dynamic component creation (recommended approach). + * Used to append grid items programmatically at runtime. + */ + @ViewChild('container', { read: ViewContainerRef, static: true}) public container?: ViewContainerRef; + + /** + * Grid configuration options. + * Can be set before grid initialization or updated after grid is created. + * + * @example + * ```typescript + * gridOptions: GridStackOptions = { + * column: 12, + * cellHeight: 'auto', + * animate: true + * }; + * ``` + */ + @Input() public set options(o: GridStackOptions) { + if (this._grid) { + this._grid.updateOptions(o); + } else { + this._options = o; + } + } + /** Get the current running grid options */ + public get options(): GridStackOptions { return this._grid?.opts || this._options || {}; } + + /** + * Controls whether empty content should be displayed. + * Set to true to show ng-content with 'empty-content' selector when grid has no items. + * + * @example + * ```html + * + *
Drag widgets here to get started
+ *
+ * ``` + */ + @Input() public isEmpty?: boolean; + + /** + * GridStack event emitters for Angular integration. + * + * These provide Angular-style event handling for GridStack events. + * Alternatively, use `this.grid.on('event1 event2', callback)` for multiple events. + * + * Note: 'CB' suffix prevents conflicts with native DOM events. + * + * @example + * ```html + * + * + * ``` + */ + + /** Emitted when widgets are added to the grid */ + @Output() public addedCB = new EventEmitter(); + + /** Emitted when grid layout changes */ + @Output() public changeCB = new EventEmitter(); + + /** Emitted when grid is disabled */ + @Output() public disableCB = new EventEmitter(); + + /** Emitted during widget drag operations */ + @Output() public dragCB = new EventEmitter(); + + /** Emitted when widget drag starts */ + @Output() public dragStartCB = new EventEmitter(); + + /** Emitted when widget drag stops */ + @Output() public dragStopCB = new EventEmitter(); + + /** Emitted when widget is dropped */ + @Output() public droppedCB = new EventEmitter(); + + /** Emitted when grid is enabled */ + @Output() public enableCB = new EventEmitter(); + + /** Emitted when widgets are removed from the grid */ + @Output() public removedCB = new EventEmitter(); + + /** Emitted during widget resize operations */ + @Output() public resizeCB = new EventEmitter(); + + /** Emitted when widget resize starts */ + @Output() public resizeStartCB = new EventEmitter(); + + /** Emitted when widget resize stops */ + @Output() public resizeStopCB = new EventEmitter(); + + /** + * Get the native DOM element that contains grid-specific fields. + * This element has GridStack properties attached to it. + */ + public get el(): GridCompHTMLElement { return this.elementRef.nativeElement; } + + /** + * Get the underlying GridStack instance. + * Use this to access GridStack API methods directly. + * + * @example + * ```typescript + * this.gridComponent.grid.addWidget({x: 0, y: 0, w: 2, h: 1}); + * ``` + */ + public get grid(): GridStack | undefined { return this._grid; } + + /** + * Component reference for dynamic component removal. + * Used internally when this component is created dynamically. + */ + public ref: ComponentRef | undefined; + + /** + * Mapping of component selectors to their types for dynamic creation. + * + * This enables dynamic component instantiation from string selectors. + * Angular doesn't provide public access to this mapping, so we maintain our own. + * + * @example + * ```typescript + * GridstackComponent.addComponentToSelectorType([MyWidgetComponent]); + * ``` + */ + public static selectorToType: SelectorToType = {}; + /** + * Register a list of Angular components for dynamic creation. + * + * @param typeList Array of component types to register + * + * @example + * ```typescript + * GridstackComponent.addComponentToSelectorType([ + * MyWidgetComponent, + * AnotherWidgetComponent + * ]); + * ``` + */ + public static addComponentToSelectorType(typeList: Array>) { + typeList.forEach(type => GridstackComponent.selectorToType[ GridstackComponent.getSelector(type) ] = type); + } + /** + * Extract the selector string from an Angular component type. + * + * @param type The component type to get selector from + * @returns The component's selector string + */ + public static getSelector(type: Type): string { + return reflectComponentType(type)!.selector; + } + + protected _options?: GridStackOptions; + protected _grid?: GridStack; + protected _sub: Subscription | undefined; + protected loaded?: boolean; + + constructor(protected readonly elementRef: ElementRef) { + // set globally our method to create the right widget type + if (!GridStack.addRemoveCB) { + GridStack.addRemoveCB = gsCreateNgComponents; + } + if (!GridStack.saveCB) { + GridStack.saveCB = gsSaveAdditionalNgInfo; + } + if (!GridStack.updateCB) { + GridStack.updateCB = gsUpdateNgComponents; + } + this.el._gridComp = this; + } + + public ngOnInit(): void { + // init ourself before any template children are created since we track them below anyway - no need to double create+update widgets + this.loaded = !!this.options?.children?.length; + this._grid = GridStack.init(this._options, this.el); + delete this._options; // GS has it now + + this.checkEmpty(); + } + + /** wait until after all DOM is ready to init gridstack children (after angular ngFor and sub-components run first) */ + public ngAfterContentInit(): void { + // track whenever the children list changes and update the layout... + this._sub = this.gridstackItems?.changes.subscribe(() => this.updateAll()); + // ...and do this once at least unless we loaded children already + if (!this.loaded) this.updateAll(); + this.hookEvents(this.grid); + } + + public ngOnDestroy(): void { + this.unhookEvents(this._grid); + this._sub?.unsubscribe(); + this._grid?.destroy(); + delete this._grid; + delete this.el._gridComp; + delete this.container; + delete this.ref; + } + + /** + * called when the TEMPLATE (not recommended) list of items changes - get a list of nodes and + * update the layout accordingly (which will take care of adding/removing items changed by Angular) + */ + public updateAll() { + if (!this.grid) return; + const layout: GridStackWidget[] = []; + this.gridstackItems?.forEach(item => { + layout.push(item.options); + item.clearOptions(); + }); + this.grid.load(layout); // efficient that does diffs only + } + + /** check if the grid is empty, if so show alternative content */ + public checkEmpty() { + if (!this.grid) return; + this.isEmpty = !this.grid.engine.nodes.length; + } + + /** get all known events as easy to use Outputs for convenience */ + protected hookEvents(grid?: GridStack) { + if (!grid) return; + // nested grids don't have events in v12.1+ so skip + if (grid.parentGridNode) return; + grid + .on('added', (event: Event, nodes: GridStackNode[]) => { + const gridComp = (nodes[0].grid?.el as GridCompHTMLElement)._gridComp || this; + gridComp.checkEmpty(); + this.addedCB.emit({event, nodes}); + }) + .on('change', (event: Event, nodes: GridStackNode[]) => this.changeCB.emit({event, nodes})) + .on('disable', (event: Event) => this.disableCB.emit({event})) + .on('drag', (event: Event, el: GridItemHTMLElement) => this.dragCB.emit({event, el})) + .on('dragstart', (event: Event, el: GridItemHTMLElement) => this.dragStartCB.emit({event, el})) + .on('dragstop', (event: Event, el: GridItemHTMLElement) => this.dragStopCB.emit({event, el})) + .on('dropped', (event: Event, previousNode: GridStackNode, newNode: GridStackNode) => this.droppedCB.emit({event, previousNode, newNode})) + .on('enable', (event: Event) => this.enableCB.emit({event})) + .on('removed', (event: Event, nodes: GridStackNode[]) => { + const gridComp = (nodes[0].grid?.el as GridCompHTMLElement)._gridComp || this; + gridComp.checkEmpty(); + this.removedCB.emit({event, nodes}); + }) + .on('resize', (event: Event, el: GridItemHTMLElement) => this.resizeCB.emit({event, el})) + .on('resizestart', (event: Event, el: GridItemHTMLElement) => this.resizeStartCB.emit({event, el})) + .on('resizestop', (event: Event, el: GridItemHTMLElement) => this.resizeStopCB.emit({event, el})) + } + + protected unhookEvents(grid?: GridStack) { + if (!grid) return; + // nested grids don't have events in v12.1+ so skip + if (grid.parentGridNode) return; + grid.off('added change disable drag dragstart dragstop dropped enable removed resize resizestart resizestop'); + } +} + +/** + * can be used when a new item needs to be created, which we do as a Angular component, or deleted (skip) + **/ +export function gsCreateNgComponents(host: GridCompHTMLElement | HTMLElement, n: NgGridStackNode, add: boolean, isGrid: boolean): HTMLElement | undefined { + if (add) { + // + // create the component dynamically - see https://angular.io/docs/ts/latest/cookbook/dynamic-component-loader.html + // + if (!host) return; + if (isGrid) { + // TODO: figure out how to create ng component inside regular Div. need to access app injectors... + // if (!container) { + // const hostElement: Element = host; + // const environmentInjector: EnvironmentInjector; + // grid = createComponent(GridstackComponent, {environmentInjector, hostElement})?.instance; + // } + + const gridItemComp = (host.parentElement as GridItemCompHTMLElement)?._gridItemComp; + if (!gridItemComp) return; + // check if gridItem has a child component with 'container' exposed to create under.. + const container = (gridItemComp.childWidget as any)?.container || gridItemComp.container; + const gridRef = container?.createComponent(GridstackComponent); + const grid = gridRef?.instance; + if (!grid) return; + grid.ref = gridRef; + grid.options = n; + return grid.el; + } else { + const gridComp = (host as GridCompHTMLElement)._gridComp; + const gridItemRef = gridComp?.container?.createComponent(GridstackItemComponent); + const gridItem = gridItemRef?.instance; + if (!gridItem) return; + gridItem.ref = gridItemRef + + // define what type of component to create as child, OR you can do it GridstackItemComponent template, but this is more generic + const selector = n.selector; + const type = selector ? GridstackComponent.selectorToType[selector] : undefined; + if (type) { + // shared code to create our selector component + const createComp = () => { + const childWidget = gridItem.container?.createComponent(type)?.instance as BaseWidget; + // if proper BaseWidget subclass, save it and load additional data + if (childWidget && typeof childWidget.serialize === 'function' && typeof childWidget.deserialize === 'function') { + gridItem.childWidget = childWidget; + childWidget.deserialize(n); + } + } + + const lazyLoad = n.lazyLoad || n.grid?.opts?.lazyLoad && n.lazyLoad !== false; + if (lazyLoad) { + if (!n.visibleObservable) { + n.visibleObservable = new IntersectionObserver(([entry]) => { if (entry.isIntersecting) { + n.visibleObservable?.disconnect(); + delete n.visibleObservable; + createComp(); + }}); + window.setTimeout(() => n.visibleObservable?.observe(gridItem.el)); // wait until callee sets position attributes + } + } else createComp(); + } + + return gridItem.el; + } + } else { + // + // REMOVE - have to call ComponentRef:destroy() for dynamic objects to correctly remove themselves + // Note: this will destroy all children dynamic components as well: gridItem -> childWidget + // + if (isGrid) { + const grid = (n.el as GridCompHTMLElement)?._gridComp; + if (grid?.ref) grid.ref.destroy(); + else grid?.ngOnDestroy(); + } else { + const gridItem = (n.el as GridItemCompHTMLElement)?._gridItemComp; + if (gridItem?.ref) gridItem.ref.destroy(); + else gridItem?.ngOnDestroy(); + } + } + return; +} + +/** + * called for each item in the grid - check if additional information needs to be saved. + * Note: since this is options minus gridstack protected members using Utils.removeInternalForSave(), + * this typically doesn't need to do anything. However your custom Component @Input() are now supported + * using BaseWidget.serialize() + */ +export function gsSaveAdditionalNgInfo(n: NgGridStackNode, w: NgGridStackWidget) { + const gridItem = (n.el as GridItemCompHTMLElement)?._gridItemComp; + if (gridItem) { + const input = gridItem.childWidget?.serialize(); + if (input) { + w.input = input; + } + return; + } + // else check if Grid + const grid = (n.el as GridCompHTMLElement)?._gridComp; + if (grid) { + //.... save any custom data + } +} + +/** + * track when widgeta re updated (rather than created) to make sure we de-serialize them as well + */ +export function gsUpdateNgComponents(n: NgGridStackNode) { + const w: NgGridStackWidget = n; + const gridItem = (n.el as GridItemCompHTMLElement)?._gridItemComp; + if (gridItem?.childWidget && w.input) gridItem.childWidget.deserialize(w); +} \ No newline at end of file diff --git a/node_modules/gridstack/dist/angular/src/gridstack.module.ts b/node_modules/gridstack/dist/angular/src/gridstack.module.ts new file mode 100644 index 000000000..015ef0fe1 --- /dev/null +++ b/node_modules/gridstack/dist/angular/src/gridstack.module.ts @@ -0,0 +1,44 @@ +/** + * gridstack.component.ts 12.3.3 + * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license + */ + +import { NgModule } from "@angular/core"; + +import { GridstackItemComponent } from "./gridstack-item.component"; +import { GridstackComponent } from "./gridstack.component"; + +/** + * @deprecated Use GridstackComponent and GridstackItemComponent as standalone components instead. + * + * This NgModule is provided for backward compatibility but is no longer the recommended approach. + * Import components directly in your standalone components or use the new Angular module structure. + * + * @example + * ```typescript + * // Preferred approach - standalone components + * @Component({ + * selector: 'my-app', + * imports: [GridstackComponent, GridstackItemComponent], + * template: '' + * }) + * export class AppComponent {} + * + * // Legacy approach (deprecated) + * @NgModule({ + * imports: [GridstackModule] + * }) + * export class AppModule {} + * ``` + */ +@NgModule({ + imports: [ + GridstackItemComponent, + GridstackComponent, + ], + exports: [ + GridstackItemComponent, + GridstackComponent, + ], +}) +export class GridstackModule {} diff --git a/node_modules/gridstack/dist/angular/src/types.ts b/node_modules/gridstack/dist/angular/src/types.ts new file mode 100644 index 000000000..71967ceea --- /dev/null +++ b/node_modules/gridstack/dist/angular/src/types.ts @@ -0,0 +1,54 @@ +/** + * gridstack-item.component.ts 12.3.3 + * Copyright (c) 2025 Alain Dumesny - see GridStack root license + */ + +import { GridStackNode, GridStackOptions, GridStackWidget } from "gridstack"; + +/** + * Extended GridStackWidget interface for Angular integration. + * Adds Angular-specific properties for dynamic component creation. + */ +export interface NgGridStackWidget extends GridStackWidget { + /** Angular component selector for dynamic creation (e.g., 'my-widget') */ + selector?: string; + /** Serialized data for component @Input() properties */ + input?: NgCompInputs; + /** Configuration for nested sub-grids */ + subGridOpts?: NgGridStackOptions; +} + +/** + * Extended GridStackNode interface for Angular integration. + * Adds component selector for dynamic content creation. + */ +export interface NgGridStackNode extends GridStackNode { + /** Angular component selector for this node's content */ + selector?: string; +} + +/** + * Extended GridStackOptions interface for Angular integration. + * Supports Angular-specific widget definitions and nested grids. + */ +export interface NgGridStackOptions extends GridStackOptions { + /** Array of Angular widget definitions for initial grid setup */ + children?: NgGridStackWidget[]; + /** Configuration for nested sub-grids (Angular-aware) */ + subGridOpts?: NgGridStackOptions; +} + +/** + * Type for component input data serialization. + * Maps @Input() property names to their values for widget persistence. + * + * @example + * ```typescript + * const inputs: NgCompInputs = { + * title: 'My Widget', + * value: 42, + * config: { enabled: true } + * }; + * ``` + */ +export type NgCompInputs = {[key: string]: any}; diff --git a/node_modules/gridstack/dist/dd-base-impl.d.ts b/node_modules/gridstack/dist/dd-base-impl.d.ts new file mode 100644 index 000000000..e607f4099 --- /dev/null +++ b/node_modules/gridstack/dist/dd-base-impl.d.ts @@ -0,0 +1,69 @@ +/** + * dd-base-impl.ts 12.3.2 + * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license + */ +/** + * Type for event callback functions used in drag & drop operations. + * Can return boolean to indicate if the event should continue propagation. + */ +export type EventCallback = (event: Event) => boolean | void; +/** + * Abstract base class for all drag & drop implementations. + * Provides common functionality for event handling, enable/disable state, + * and lifecycle management used by draggable, droppable, and resizable implementations. + */ +export declare abstract class DDBaseImplement { + /** + * Returns the current disabled state. + * Note: Use enable()/disable() methods to change state as other operations need to happen. + */ + get disabled(): boolean; + /** + * Register an event callback for the specified event. + * + * @param event - Event name to listen for + * @param callback - Function to call when event occurs + */ + on(event: string, callback: EventCallback): void; + /** + * Unregister an event callback for the specified event. + * + * @param event - Event name to stop listening for + */ + off(event: string): void; + /** + * Enable this drag & drop implementation. + * Subclasses should override to perform additional setup. + */ + enable(): void; + /** + * Disable this drag & drop implementation. + * Subclasses should override to perform additional cleanup. + */ + disable(): void; + /** + * Destroy this drag & drop implementation and clean up resources. + * Removes all event handlers and clears internal state. + */ + destroy(): void; + /** + * Trigger a registered event callback if one exists and the implementation is enabled. + * + * @param eventName - Name of the event to trigger + * @param event - DOM event object to pass to the callback + * @returns Result from the callback function, if any + */ + triggerEvent(eventName: string, event: Event): boolean | void; +} +/** + * Interface for HTML elements extended with drag & drop options. + * Used to associate DD configuration with DOM elements. + */ +export interface HTMLElementExtendOpt { + /** The HTML element being extended */ + el: HTMLElement; + /** The drag & drop options/configuration */ + option: T; + /** Method to update the options and return the DD implementation */ + updateOption(T: any): DDBaseImplement; +} diff --git a/node_modules/gridstack/dist/dd-base-impl.js b/node_modules/gridstack/dist/dd-base-impl.js new file mode 100644 index 000000000..2c31698ac --- /dev/null +++ b/node_modules/gridstack/dist/dd-base-impl.js @@ -0,0 +1,70 @@ +/** + * dd-base-impl.ts 12.3.2 + * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license + */ +/** + * Abstract base class for all drag & drop implementations. + * Provides common functionality for event handling, enable/disable state, + * and lifecycle management used by draggable, droppable, and resizable implementations. + */ +export class DDBaseImplement { + constructor() { + /** @internal */ + this._eventRegister = {}; + } + /** + * Returns the current disabled state. + * Note: Use enable()/disable() methods to change state as other operations need to happen. + */ + get disabled() { return this._disabled; } + /** + * Register an event callback for the specified event. + * + * @param event - Event name to listen for + * @param callback - Function to call when event occurs + */ + on(event, callback) { + this._eventRegister[event] = callback; + } + /** + * Unregister an event callback for the specified event. + * + * @param event - Event name to stop listening for + */ + off(event) { + delete this._eventRegister[event]; + } + /** + * Enable this drag & drop implementation. + * Subclasses should override to perform additional setup. + */ + enable() { + this._disabled = false; + } + /** + * Disable this drag & drop implementation. + * Subclasses should override to perform additional cleanup. + */ + disable() { + this._disabled = true; + } + /** + * Destroy this drag & drop implementation and clean up resources. + * Removes all event handlers and clears internal state. + */ + destroy() { + delete this._eventRegister; + } + /** + * Trigger a registered event callback if one exists and the implementation is enabled. + * + * @param eventName - Name of the event to trigger + * @param event - DOM event object to pass to the callback + * @returns Result from the callback function, if any + */ + triggerEvent(eventName, event) { + if (!this.disabled && this._eventRegister && this._eventRegister[eventName]) + return this._eventRegister[eventName](event); + } +} +//# sourceMappingURL=dd-base-impl.js.map \ No newline at end of file diff --git a/node_modules/gridstack/dist/dd-base-impl.js.map b/node_modules/gridstack/dist/dd-base-impl.js.map new file mode 100644 index 000000000..c3d19ba78 --- /dev/null +++ b/node_modules/gridstack/dist/dd-base-impl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dd-base-impl.js","sourceRoot":"","sources":["../src/dd-base-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH;;;;GAIG;AACH,MAAM,OAAgB,eAAe;IAArC;QASE,gBAAgB;QACN,mBAAc,GAEpB,EAAE,CAAC;IAwDT,CAAC;IAnEC;;;OAGG;IACH,IAAW,QAAQ,KAAgB,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAS3D;;;;;OAKG;IACI,EAAE,CAAC,KAAa,EAAE,QAAuB;QAC9C,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC;IACxC,CAAC;IAED;;;;OAIG;IACI,GAAG,CAAC,KAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED;;;OAGG;IACI,MAAM;QACX,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACzB,CAAC;IAED;;;OAGG;IACI,OAAO;QACZ,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACxB,CAAC;IAED;;;OAGG;IACI,OAAO;QACZ,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED;;;;;;OAMG;IACI,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.3.2\n * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license\n */\n\n/**\n * Type for event callback functions used in drag & drop operations.\n * Can return boolean to indicate if the event should continue propagation.\n */\nexport type EventCallback = (event: Event) => boolean|void;\n\n/**\n * Abstract base class for all drag & drop implementations.\n * Provides common functionality for event handling, enable/disable state,\n * and lifecycle management used by draggable, droppable, and resizable implementations.\n */\nexport abstract class DDBaseImplement {\n /**\n * Returns the current disabled state.\n * Note: Use enable()/disable() methods to change state as other operations need to happen.\n */\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 /**\n * Register an event callback for the specified event.\n * \n * @param event - Event name to listen for\n * @param callback - Function to call when event occurs\n */\n public on(event: string, callback: EventCallback): void {\n this._eventRegister[event] = callback;\n }\n\n /**\n * Unregister an event callback for the specified event.\n * \n * @param event - Event name to stop listening for\n */\n public off(event: string): void {\n delete this._eventRegister[event];\n }\n\n /**\n * Enable this drag & drop implementation.\n * Subclasses should override to perform additional setup.\n */\n public enable(): void {\n this._disabled = false;\n }\n\n /**\n * Disable this drag & drop implementation.\n * Subclasses should override to perform additional cleanup.\n */\n public disable(): void {\n this._disabled = true;\n }\n\n /**\n * Destroy this drag & drop implementation and clean up resources.\n * Removes all event handlers and clears internal state.\n */\n public destroy(): void {\n delete this._eventRegister;\n }\n\n /**\n * Trigger a registered event callback if one exists and the implementation is enabled.\n * \n * @param eventName - Name of the event to trigger\n * @param event - DOM event object to pass to the callback\n * @returns Result from the callback function, if any\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\n/**\n * Interface for HTML elements extended with drag & drop options.\n * Used to associate DD configuration with DOM elements.\n */\nexport interface HTMLElementExtendOpt {\n /** The HTML element being extended */\n el: HTMLElement;\n /** The drag & drop options/configuration */\n option: T;\n /** Method to update the options and return the DD implementation */\n updateOption(T): DDBaseImplement;\n}\n"]} \ No newline at end of file diff --git a/node_modules/gridstack/dist/dd-draggable.d.ts b/node_modules/gridstack/dist/dd-draggable.d.ts new file mode 100644 index 000000000..064054d34 --- /dev/null +++ b/node_modules/gridstack/dist/dd-draggable.d.ts @@ -0,0 +1,20 @@ +/** + * dd-draggable.ts 12.3.2 + * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license + */ +import { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl'; +import { GridItemHTMLElement, DDDragOpt } from './types'; +type DDDragEvent = 'drag' | 'dragstart' | 'dragstop'; +export declare class DDDraggable extends DDBaseImplement implements HTMLElementExtendOpt { + el: GridItemHTMLElement; + option: DDDragOpt; + helper: HTMLElement; + constructor(el: GridItemHTMLElement, option?: DDDragOpt); + on(event: DDDragEvent, callback: (event: DragEvent) => void): void; + off(event: DDDragEvent): void; + enable(): void; + disable(forDestroy?: boolean): void; + destroy(): void; + updateOption(opts: DDDragOpt): DDDraggable; +} +export {}; diff --git a/node_modules/gridstack/dist/dd-draggable.js b/node_modules/gridstack/dist/dd-draggable.js new file mode 100644 index 000000000..73c7eb9a9 --- /dev/null +++ b/node_modules/gridstack/dist/dd-draggable.js @@ -0,0 +1,364 @@ +/** + * dd-draggable.ts 12.3.2 + * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license + */ +import { DDManager } from './dd-manager'; +import { Utils } from './utils'; +import { DDBaseImplement } from './dd-base-impl'; +import { isTouch, touchend, touchmove, touchstart, pointerdown } from './dd-touch'; +// make sure we are not clicking on known object that handles mouseDown +const skipMouseDown = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle'; +// let count = 0; // TEST +class DDDraggable extends DDBaseImplement { + constructor(el, option = {}) { + super(); + this.el = el; + this.option = option; + /** @internal */ + this.dragTransform = { + xScale: 1, + yScale: 1, + xOffset: 0, + yOffset: 0 + }; + // get the element that is actually supposed to be dragged by + const handleName = option?.handle?.substring(1); + const n = el.gridstackNode; + this.dragEls = !handleName || el.classList.contains(handleName) ? [el] : (n?.subGrid ? [el.querySelector(option.handle) || el] : Array.from(el.querySelectorAll(option.handle))); + if (this.dragEls.length === 0) { + this.dragEls = [el]; + } + // create var event binding so we can easily remove and still look like TS methods (unlike anonymous functions) + this._mouseDown = this._mouseDown.bind(this); + this._mouseMove = this._mouseMove.bind(this); + this._mouseUp = this._mouseUp.bind(this); + this._keyEvent = this._keyEvent.bind(this); + this.enable(); + } + on(event, callback) { + super.on(event, callback); + } + off(event) { + super.off(event); + } + enable() { + if (this.disabled === false) + return; + super.enable(); + this.dragEls.forEach(dragEl => { + dragEl.addEventListener('mousedown', this._mouseDown); + if (isTouch) { + dragEl.addEventListener('touchstart', touchstart); + dragEl.addEventListener('pointerdown', pointerdown); + // dragEl.style.touchAction = 'none'; // not needed unlike pointerdown doc comment + } + }); + this.el.classList.remove('ui-draggable-disabled'); + } + disable(forDestroy = false) { + if (this.disabled === true) + return; + super.disable(); + this.dragEls.forEach(dragEl => { + dragEl.removeEventListener('mousedown', this._mouseDown); + if (isTouch) { + dragEl.removeEventListener('touchstart', touchstart); + dragEl.removeEventListener('pointerdown', pointerdown); + } + }); + if (!forDestroy) + this.el.classList.add('ui-draggable-disabled'); + } + destroy() { + if (this.dragTimeout) + window.clearTimeout(this.dragTimeout); + delete this.dragTimeout; + if (this.mouseDownEvent) + this._mouseUp(this.mouseDownEvent); + this.disable(true); + delete this.el; + delete this.helper; + delete this.option; + super.destroy(); + } + updateOption(opts) { + Object.keys(opts).forEach(key => this.option[key] = opts[key]); + return this; + } + /** @internal call when mouse goes down before a dragstart happens */ + _mouseDown(e) { + // don't let more than one widget handle mouseStart + if (DDManager.mouseHandled) + return; + if (e.button !== 0) + return true; // only left click + // make sure we are not clicking on known object that handles mouseDown, or ones supplied by the user + if (!this.dragEls.find(el => el === e.target) && e.target.closest(skipMouseDown)) + return true; + if (this.option.cancel) { + if (e.target.closest(this.option.cancel)) + return true; + } + this.mouseDownEvent = e; + delete this.dragging; + delete DDManager.dragElement; + delete DDManager.dropElement; + // document handler so we can continue receiving moves as the item is 'fixed' position, and capture=true so WE get a first crack + document.addEventListener('mousemove', this._mouseMove, { capture: true, passive: true }); // true=capture, not bubble + document.addEventListener('mouseup', this._mouseUp, true); + if (isTouch) { + e.currentTarget.addEventListener('touchmove', touchmove); + e.currentTarget.addEventListener('touchend', touchend); + } + e.preventDefault(); + // preventDefault() prevents blur event which occurs just after mousedown event. + // if an editable content has focus, then blur must be call + if (document.activeElement) + document.activeElement.blur(); + DDManager.mouseHandled = true; + return true; + } + /** @internal method to call actual drag event */ + _callDrag(e) { + if (!this.dragging) + return; + const ev = Utils.initEvent(e, { target: this.el, type: 'drag' }); + if (this.option.drag) { + this.option.drag(ev, this.ui()); + } + this.triggerEvent('drag', ev); + } + /** @internal called when the main page (after successful mousedown) receives a move event to drag the item around the screen */ + _mouseMove(e) { + // console.log(`${count++} move ${e.x},${e.y}`) + const s = this.mouseDownEvent; + this.lastDrag = e; + if (this.dragging) { + this._dragFollow(e); + // delay actual grid handling drag until we pause for a while if set + if (DDManager.pauseDrag) { + const pause = Number.isInteger(DDManager.pauseDrag) ? DDManager.pauseDrag : 100; + if (this.dragTimeout) + window.clearTimeout(this.dragTimeout); + this.dragTimeout = window.setTimeout(() => this._callDrag(e), pause); + } + else { + this._callDrag(e); + } + } + else if (Math.abs(e.x - s.x) + Math.abs(e.y - s.y) > 3) { + /** + * don't start unless we've moved at least 3 pixels + */ + this.dragging = true; + DDManager.dragElement = this; + // if we're dragging an actual grid item, set the current drop as the grid (to detect enter/leave) + const grid = this.el.gridstackNode?.grid; + if (grid) { + DDManager.dropElement = grid.el.ddElement.ddDroppable; + } + else { + delete DDManager.dropElement; + } + this.helper = this._createHelper(); + this._setupHelperContainmentStyle(); + this.dragTransform = Utils.getValuesFromTransformedElement(this.helperContainment); + this.dragOffset = this._getDragOffset(e, this.el, this.helperContainment); + this._setupHelperStyle(e); + const ev = Utils.initEvent(e, { target: this.el, type: 'dragstart' }); + if (this.option.start) { + this.option.start(ev, this.ui()); + } + this.triggerEvent('dragstart', ev); + // now track keyboard events to cancel or rotate + document.addEventListener('keydown', this._keyEvent); + } + // e.preventDefault(); // passive = true. OLD: was needed otherwise we get text sweep text selection as we drag around + return true; + } + /** @internal call when the mouse gets released to drop the item at current location */ + _mouseUp(e) { + document.removeEventListener('mousemove', this._mouseMove, true); + document.removeEventListener('mouseup', this._mouseUp, true); + if (isTouch && e.currentTarget) { // destroy() during nested grid call us again wit fake _mouseUp + e.currentTarget.removeEventListener('touchmove', touchmove, true); + e.currentTarget.removeEventListener('touchend', touchend, true); + } + if (this.dragging) { + delete this.dragging; + delete this.el.gridstackNode?._origRotate; + document.removeEventListener('keydown', this._keyEvent); + // reset the drop target if dragging over ourself (already parented, just moving during stop callback below) + if (DDManager.dropElement?.el === this.el.parentElement) { + delete DDManager.dropElement; + } + this.helperContainment.style.position = this.parentOriginStylePosition || null; + if (this.helper !== this.el) + this.helper.remove(); // hide now + this._removeHelperStyle(); + const ev = Utils.initEvent(e, { target: this.el, type: 'dragstop' }); + if (this.option.stop) { + this.option.stop(ev); // NOTE: destroy() will be called when removing item, so expect NULL ptr after! + } + this.triggerEvent('dragstop', ev); + // call the droppable method to receive the item + if (DDManager.dropElement) { + DDManager.dropElement.drop(e); + } + } + delete this.helper; + delete this.mouseDownEvent; + delete DDManager.dragElement; + delete DDManager.dropElement; + delete DDManager.mouseHandled; + e.preventDefault(); + } + /** @internal call when keys are being pressed - use Esc to cancel, R to rotate */ + _keyEvent(e) { + const n = this.el.gridstackNode; + const grid = n?.grid || DDManager.dropElement?.el?.gridstack; + if (e.key === 'Escape') { + if (n && n._origRotate) { + n._orig = n._origRotate; + delete n._origRotate; + } + grid?.cancelDrag(); + this._mouseUp(this.mouseDownEvent); + } + else if (n && grid && (e.key === 'r' || e.key === 'R')) { + if (!Utils.canBeRotated(n)) + return; + n._origRotate = n._origRotate || { ...n._orig }; // store the real orig size in case we Esc after doing rotation + delete n._moving; // force rotate to happen (move waits for >50% coverage otherwise) + grid.setAnimation(false) // immediate rotate so _getDragOffset() gets the right dom size below + .rotate(n.el, { top: -this.dragOffset.offsetTop, left: -this.dragOffset.offsetLeft }) + .setAnimation(); + n._moving = true; + this.dragOffset = this._getDragOffset(this.lastDrag, n.el, this.helperContainment); + this.helper.style.width = this.dragOffset.width + 'px'; + this.helper.style.height = this.dragOffset.height + 'px'; + Utils.swap(n._orig, 'w', 'h'); + delete n._rect; + this._mouseMove(this.lastDrag); + } + } + /** @internal create a clone copy (or user defined method) of the original drag item if set */ + _createHelper() { + let helper = this.el; + if (typeof this.option.helper === 'function') { + helper = this.option.helper(this.el); + } + else if (this.option.helper === 'clone') { + helper = Utils.cloneNode(this.el); + } + if (!helper.parentElement) { + Utils.appendTo(helper, this.option.appendTo === 'parent' ? this.el.parentElement : this.option.appendTo); + } + this.dragElementOriginStyle = DDDraggable.originStyleProp.map(prop => this.el.style[prop]); + return helper; + } + /** @internal set the fix position of the dragged item */ + _setupHelperStyle(e) { + this.helper.classList.add('ui-draggable-dragging'); + this.el.gridstackNode?.grid?.el.classList.add('grid-stack-dragging'); + // TODO: set all at once with style.cssText += ... ? https://stackoverflow.com/questions/3968593 + const style = this.helper.style; + style.pointerEvents = 'none'; // needed for over items to get enter/leave + // style.cursor = 'move'; // TODO: can't set with pointerEvents=none ! (no longer in CSS either as no-op) + style.width = this.dragOffset.width + 'px'; + style.height = this.dragOffset.height + 'px'; + style.willChange = 'left, top'; + style.position = 'fixed'; // let us drag between grids by not clipping as parent .grid-stack is position: 'relative' + this._dragFollow(e); // now position it + style.transition = 'none'; // show up instantly + setTimeout(() => { + if (this.helper) { + style.transition = null; // recover animation + } + }, 0); + return this; + } + /** @internal restore back the original style before dragging */ + _removeHelperStyle() { + this.helper.classList.remove('ui-draggable-dragging'); + this.el.gridstackNode?.grid?.el.classList.remove('grid-stack-dragging'); + const node = this.helper?.gridstackNode; + // don't bother restoring styles if we're gonna remove anyway... + if (!node?._isAboutToRemove && this.dragElementOriginStyle) { + const helper = this.helper; + // don't animate, otherwise we animate offseted when switching back to 'absolute' from 'fixed'. + // TODO: this also removes resizing animation which doesn't have this issue, but others. + // Ideally both would animate ('move' would immediately restore 'absolute' and adjust coordinate to match, + // then trigger a delay (repaint) to restore to final dest with animate) but then we need to make sure 'resizestop' + // is called AFTER 'transitionend' event is received (see https://github.com/gridstack/gridstack.js/issues/2033) + const transition = this.dragElementOriginStyle['transition'] || null; + helper.style.transition = this.dragElementOriginStyle['transition'] = 'none'; // can't be NULL #1973 + DDDraggable.originStyleProp.forEach(prop => helper.style[prop] = this.dragElementOriginStyle[prop] || null); + setTimeout(() => helper.style.transition = transition, 50); // recover animation from saved vars after a pause (0 isn't enough #1973) + } + delete this.dragElementOriginStyle; + return this; + } + /** @internal updates the top/left position to follow the mouse */ + _dragFollow(e) { + const containmentRect = { left: 0, top: 0 }; + // if (this.helper.style.position === 'absolute') { // we use 'fixed' + // const { left, top } = this.helperContainment.getBoundingClientRect(); + // containmentRect = { left, top }; + // } + const style = this.helper.style; + const offset = this.dragOffset; + style.left = (e.clientX + offset.offsetLeft - containmentRect.left) * this.dragTransform.xScale + 'px'; + style.top = (e.clientY + offset.offsetTop - containmentRect.top) * this.dragTransform.yScale + 'px'; + } + /** @internal */ + _setupHelperContainmentStyle() { + this.helperContainment = this.helper.parentElement; + if (this.helper.style.position !== 'fixed') { + this.parentOriginStylePosition = this.helperContainment.style.position; + if (getComputedStyle(this.helperContainment).position.match(/static/)) { + this.helperContainment.style.position = 'relative'; + } + } + return this; + } + /** @internal */ + _getDragOffset(event, el, parent) { + // in case ancestor has transform/perspective css properties that change the viewpoint + let xformOffsetX = 0; + let xformOffsetY = 0; + if (parent) { + xformOffsetX = this.dragTransform.xOffset; + xformOffsetY = this.dragTransform.yOffset; + } + const targetOffset = el.getBoundingClientRect(); + return { + left: targetOffset.left, + top: targetOffset.top, + offsetLeft: -event.clientX + targetOffset.left - xformOffsetX, + offsetTop: -event.clientY + targetOffset.top - xformOffsetY, + width: targetOffset.width * this.dragTransform.xScale, + height: targetOffset.height * this.dragTransform.yScale + }; + } + /** @internal TODO: set to public as called by DDDroppable! */ + ui() { + const containmentEl = this.el.parentElement; + const containmentRect = containmentEl.getBoundingClientRect(); + const offset = this.helper.getBoundingClientRect(); + return { + position: { + top: (offset.top - containmentRect.top) * this.dragTransform.yScale, + left: (offset.left - containmentRect.left) * this.dragTransform.xScale + } + /* not used by GridStack for now... + helper: [this.helper], //The object arr representing the helper that's being dragged. + offset: { top: offset.top, left: offset.left } // Current offset position of the helper as { top, left } object. + */ + }; + } +} +/** @internal properties we change during dragging, and restore back */ +DDDraggable.originStyleProp = ['width', 'height', 'transform', 'transform-origin', 'transition', 'pointerEvents', 'position', 'left', 'top', 'minWidth', 'willChange']; +export { DDDraggable }; +//# sourceMappingURL=dd-draggable.js.map \ No newline at end of file diff --git a/node_modules/gridstack/dist/dd-draggable.js.map b/node_modules/gridstack/dist/dd-draggable.js.map new file mode 100644 index 000000000..f6741b7da --- /dev/null +++ b/node_modules/gridstack/dist/dd-draggable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dd-draggable.js","sourceRoot":"","sources":["../src/dd-draggable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAiB,KAAK,EAAE,MAAM,SAAS,CAAC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Ae,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,kBAAkB,EAAE,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,CAAC,AAA3I,CAA4I;SApBjK,WAAW","sourcesContent":["/**\n * dd-draggable.ts 12.3.2\n * Copyright (c) 2021-2025 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 {\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;\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(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(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(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 this.el.gridstackNode?.grid?.el.classList.add('grid-stack-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 ! (no longer in CSS either as no-op)\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 this.el.gridstackNode?.grid?.el.classList.remove('grid-stack-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"]} \ No newline at end of file diff --git a/node_modules/gridstack/dist/dd-droppable.d.ts b/node_modules/gridstack/dist/dd-droppable.d.ts new file mode 100644 index 000000000..2bb3e6aba --- /dev/null +++ b/node_modules/gridstack/dist/dd-droppable.d.ts @@ -0,0 +1,26 @@ +/** + * dd-droppable.ts 12.3.2 + * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license + */ +import { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl'; +import { DDUIData } from './types'; +export interface DDDroppableOpt { + accept?: string | ((el: HTMLElement) => boolean); + drop?: (event: DragEvent, ui: DDUIData) => void; + over?: (event: DragEvent, ui: DDUIData) => void; + out?: (event: DragEvent, ui: DDUIData) => void; +} +export declare class DDDroppable extends DDBaseImplement implements HTMLElementExtendOpt { + el: HTMLElement; + option: DDDroppableOpt; + accept: (el: HTMLElement) => boolean; + constructor(el: HTMLElement, option?: DDDroppableOpt); + on(event: 'drop' | 'dropover' | 'dropout', callback: (event: DragEvent) => void): void; + off(event: 'drop' | 'dropover' | 'dropout'): void; + enable(): void; + disable(forDestroy?: boolean): void; + destroy(): void; + updateOption(opts: DDDroppableOpt): DDDroppable; + /** item is being dropped on us - called by the drag mouseup handler - this calls the client drop event */ + drop(e: MouseEvent): void; +} diff --git a/node_modules/gridstack/dist/dd-droppable.js b/node_modules/gridstack/dist/dd-droppable.js new file mode 100644 index 000000000..42d120f21 --- /dev/null +++ b/node_modules/gridstack/dist/dd-droppable.js @@ -0,0 +1,149 @@ +/** + * dd-droppable.ts 12.3.2 + * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license + */ +import { DDManager } from './dd-manager'; +import { DDBaseImplement } from './dd-base-impl'; +import { Utils } from './utils'; +import { isTouch, pointerenter, pointerleave } from './dd-touch'; +// let count = 0; // TEST +export class DDDroppable extends DDBaseImplement { + constructor(el, option = {}) { + super(); + this.el = el; + this.option = option; + // create var event binding so we can easily remove and still look like TS methods (unlike anonymous functions) + this._mouseEnter = this._mouseEnter.bind(this); + this._mouseLeave = this._mouseLeave.bind(this); + this.enable(); + this._setupAccept(); + } + on(event, callback) { + super.on(event, callback); + } + off(event) { + super.off(event); + } + enable() { + if (this.disabled === false) + return; + super.enable(); + this.el.classList.add('ui-droppable'); + this.el.classList.remove('ui-droppable-disabled'); + this.el.addEventListener('mouseenter', this._mouseEnter); + this.el.addEventListener('mouseleave', this._mouseLeave); + if (isTouch) { + this.el.addEventListener('pointerenter', pointerenter); + this.el.addEventListener('pointerleave', pointerleave); + } + } + disable(forDestroy = false) { + if (this.disabled === true) + return; + super.disable(); + this.el.classList.remove('ui-droppable'); + if (!forDestroy) + this.el.classList.add('ui-droppable-disabled'); + this.el.removeEventListener('mouseenter', this._mouseEnter); + this.el.removeEventListener('mouseleave', this._mouseLeave); + if (isTouch) { + this.el.removeEventListener('pointerenter', pointerenter); + this.el.removeEventListener('pointerleave', pointerleave); + } + } + destroy() { + this.disable(true); + this.el.classList.remove('ui-droppable'); + this.el.classList.remove('ui-droppable-disabled'); + super.destroy(); + } + updateOption(opts) { + Object.keys(opts).forEach(key => this.option[key] = opts[key]); + this._setupAccept(); + return this; + } + /** @internal called when the cursor enters our area - prepare for a possible drop and track leaving */ + _mouseEnter(e) { + // console.log(`${count++} Enter ${this.el.id || (this.el as GridHTMLElement).gridstack.opts.id}`); // TEST + if (!DDManager.dragElement) + return; + if (!this._canDrop(DDManager.dragElement.el)) + return; + e.preventDefault(); + e.stopPropagation(); + // make sure when we enter this, that the last one gets a leave FIRST to correctly cleanup as we don't always do + if (DDManager.dropElement && DDManager.dropElement !== this) { + DDManager.dropElement._mouseLeave(e, true); // calledByEnter = true + } + DDManager.dropElement = this; + const ev = Utils.initEvent(e, { target: this.el, type: 'dropover' }); + if (this.option.over) { + this.option.over(ev, this._ui(DDManager.dragElement)); + } + this.triggerEvent('dropover', ev); + this.el.classList.add('ui-droppable-over'); + // console.log('tracking'); // TEST + } + /** @internal called when the item is leaving our area, stop tracking if we had moving item */ + _mouseLeave(e, calledByEnter = false) { + // console.log(`${count++} Leave ${this.el.id || (this.el as GridHTMLElement).gridstack.opts.id}`); // TEST + if (!DDManager.dragElement || DDManager.dropElement !== this) + return; + e.preventDefault(); + e.stopPropagation(); + const ev = Utils.initEvent(e, { target: this.el, type: 'dropout' }); + if (this.option.out) { + this.option.out(ev, this._ui(DDManager.dragElement)); + } + this.triggerEvent('dropout', ev); + if (DDManager.dropElement === this) { + delete DDManager.dropElement; + // console.log('not tracking'); // TEST + // if we're still over a parent droppable, send it an enter as we don't get one from leaving nested children + if (!calledByEnter) { + let parentDrop; + let parent = this.el.parentElement; + while (!parentDrop && parent) { + parentDrop = parent.ddElement?.ddDroppable; + parent = parent.parentElement; + } + if (parentDrop) { + parentDrop._mouseEnter(e); + } + } + } + } + /** item is being dropped on us - called by the drag mouseup handler - this calls the client drop event */ + drop(e) { + e.preventDefault(); + const ev = Utils.initEvent(e, { target: this.el, type: 'drop' }); + if (this.option.drop) { + this.option.drop(ev, this._ui(DDManager.dragElement)); + } + this.triggerEvent('drop', ev); + } + /** @internal true if element matches the string/method accept option */ + _canDrop(el) { + return el && (!this.accept || this.accept(el)); + } + /** @internal */ + _setupAccept() { + if (!this.option.accept) + return this; + if (typeof this.option.accept === 'string') { + this.accept = (el) => el.classList.contains(this.option.accept) || el.matches(this.option.accept); + } + else { + this.accept = this.option.accept; + } + return this; + } + /** @internal */ + _ui(drag) { + return { + draggable: drag.el, + ...drag.ui() + }; + } +} +//# sourceMappingURL=dd-droppable.js.map \ No newline at end of file diff --git a/node_modules/gridstack/dist/dd-droppable.js.map b/node_modules/gridstack/dist/dd-droppable.js.map new file mode 100644 index 000000000..345384b2b --- /dev/null +++ b/node_modules/gridstack/dist/dd-droppable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dd-droppable.js","sourceRoot":"","sources":["../src/dd-droppable.ts"],"names":[],"mappings":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CAAC,CAAC;QAC5E,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;YACpB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAA;SACtD;QACD,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAChC,CAAC;IAED,wEAAwE;IAC9D,QAAQ,CAAC,EAAe;QAChC,OAAO,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,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.3.2\n * Copyright (c) 2021-2025 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 {\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(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(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(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"]} \ No newline at end of file diff --git a/node_modules/gridstack/dist/dd-element.d.ts b/node_modules/gridstack/dist/dd-element.d.ts new file mode 100644 index 000000000..ddf849968 --- /dev/null +++ b/node_modules/gridstack/dist/dd-element.d.ts @@ -0,0 +1,27 @@ +/** + * dd-elements.ts 12.3.2 + * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license + */ +import { DDResizable, DDResizableOpt } from './dd-resizable'; +import { DDDragOpt, GridItemHTMLElement } from './types'; +import { DDDraggable } from './dd-draggable'; +import { DDDroppable, DDDroppableOpt } from './dd-droppable'; +export interface DDElementHost extends GridItemHTMLElement { + ddElement?: DDElement; +} +export declare class DDElement { + el: DDElementHost; + static init(el: DDElementHost): DDElement; + ddDraggable?: DDDraggable; + ddDroppable?: DDDroppable; + ddResizable?: DDResizable; + constructor(el: DDElementHost); + on(eventName: string, callback: (event: MouseEvent) => void): DDElement; + off(eventName: string): DDElement; + setupDraggable(opts: DDDragOpt): DDElement; + cleanDraggable(): DDElement; + setupResizable(opts: DDResizableOpt): DDElement; + cleanResizable(): DDElement; + setupDroppable(opts: DDDroppableOpt): DDElement; + cleanDroppable(): DDElement; +} diff --git a/node_modules/gridstack/dist/dd-element.js b/node_modules/gridstack/dist/dd-element.js new file mode 100644 index 000000000..af8589fac --- /dev/null +++ b/node_modules/gridstack/dist/dd-element.js @@ -0,0 +1,91 @@ +/** + * dd-elements.ts 12.3.2 + * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license + */ +import { DDResizable } from './dd-resizable'; +import { DDDraggable } from './dd-draggable'; +import { DDDroppable } from './dd-droppable'; +export class DDElement { + static init(el) { + if (!el.ddElement) { + el.ddElement = new DDElement(el); + } + return el.ddElement; + } + constructor(el) { + this.el = el; + } + on(eventName, callback) { + if (this.ddDraggable && ['drag', 'dragstart', 'dragstop'].indexOf(eventName) > -1) { + this.ddDraggable.on(eventName, callback); + } + else if (this.ddDroppable && ['drop', 'dropover', 'dropout'].indexOf(eventName) > -1) { + this.ddDroppable.on(eventName, callback); + } + else if (this.ddResizable && ['resizestart', 'resize', 'resizestop'].indexOf(eventName) > -1) { + this.ddResizable.on(eventName, callback); + } + return this; + } + off(eventName) { + if (this.ddDraggable && ['drag', 'dragstart', 'dragstop'].indexOf(eventName) > -1) { + this.ddDraggable.off(eventName); + } + else if (this.ddDroppable && ['drop', 'dropover', 'dropout'].indexOf(eventName) > -1) { + this.ddDroppable.off(eventName); + } + else if (this.ddResizable && ['resizestart', 'resize', 'resizestop'].indexOf(eventName) > -1) { + this.ddResizable.off(eventName); + } + return this; + } + setupDraggable(opts) { + if (!this.ddDraggable) { + this.ddDraggable = new DDDraggable(this.el, opts); + } + else { + this.ddDraggable.updateOption(opts); + } + return this; + } + cleanDraggable() { + if (this.ddDraggable) { + this.ddDraggable.destroy(); + delete this.ddDraggable; + } + return this; + } + setupResizable(opts) { + if (!this.ddResizable) { + this.ddResizable = new DDResizable(this.el, opts); + } + else { + this.ddResizable.updateOption(opts); + } + return this; + } + cleanResizable() { + if (this.ddResizable) { + this.ddResizable.destroy(); + delete this.ddResizable; + } + return this; + } + setupDroppable(opts) { + if (!this.ddDroppable) { + this.ddDroppable = new DDDroppable(this.el, opts); + } + else { + this.ddDroppable.updateOption(opts); + } + return this; + } + cleanDroppable() { + if (this.ddDroppable) { + this.ddDroppable.destroy(); + delete this.ddDroppable; + } + return this; + } +} +//# sourceMappingURL=dd-element.js.map \ No newline at end of file diff --git a/node_modules/gridstack/dist/dd-element.js.map b/node_modules/gridstack/dist/dd-element.js.map new file mode 100644 index 000000000..b28dffa56 --- /dev/null +++ b/node_modules/gridstack/dist/dd-element.js.map @@ -0,0 +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,CAAC,SAA8C,EAAE,QAAQ,CAAC,CAAC;SAC/E;aAAM,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE;YACtF,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,SAA4C,EAAE,QAAQ,CAAC,C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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;IAEM,cAAc,CAAC,IAAoB;QACxC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACrB,IAAI,CAAC,WAAW,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;SACnD;aAAM;YACL,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;SACrC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,cAAc;QACnB,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;YAC3B,OAAO,IAAI,CAAC,WAAW,CAAC;SACzB;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,cAAc,CAAC,IAAoB;QACxC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACrB,IAAI,CAAC,WAAW,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;SACnD;aAAM;YACL,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;SACrC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,cAAc;QACnB,IAAI,IAAI,CAAC,WAAW,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.3.2\n * Copyright (c) 2021-2025 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"]} \ No newline at end of file diff --git a/node_modules/gridstack/dist/dd-gridstack.d.ts b/node_modules/gridstack/dist/dd-gridstack.d.ts new file mode 100644 index 000000000..d8d6a7204 --- /dev/null +++ b/node_modules/gridstack/dist/dd-gridstack.d.ts @@ -0,0 +1,82 @@ +/** + * dd-gridstack.ts 12.3.2 + * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license + */ +import { GridItemHTMLElement, GridStackElement, DDDragOpt } from './types'; +import { DDElementHost } from './dd-element'; +/** + * Drag & Drop options for drop targets. + * Configures which elements can be dropped onto a grid. + */ +export type DDDropOpt = { + /** Function to determine if an element can be dropped (see GridStackOptions.acceptWidgets) */ + accept?: (el: GridItemHTMLElement) => boolean; +}; +/** + * Drag & Drop operation types used throughout the DD system. + * Can be control commands or configuration objects. + */ +export type DDOpts = 'enable' | 'disable' | 'destroy' | 'option' | string | any; +/** + * Keys for DD configuration options that can be set via the 'option' command. + */ +export type DDKey = 'minWidth' | 'minHeight' | 'maxWidth' | 'maxHeight' | 'maxHeightMoveUp' | 'maxWidthMoveLeft'; +/** + * Values for DD configuration options (numbers or strings with units). + */ +export type DDValue = number | string; +/** + * Callback function type for drag & drop events. + * + * @param event - The DOM event that triggered the callback + * @param arg2 - The grid item element being dragged/dropped + * @param helper - Optional helper element used during drag operations + */ +export type DDCallback = (event: Event, arg2: GridItemHTMLElement, helper?: GridItemHTMLElement) => void; +/** + * HTML Native Mouse and Touch Events Drag and Drop functionality. + * + * This class provides the main drag & drop implementation for GridStack, + * handling resizing, dragging, and dropping of grid items using native HTML5 events. + * It manages the interaction between different DD components and the grid system. + */ +export declare class DDGridStack { + /** + * Enable/disable/configure resizing for grid elements. + * + * @param el - Grid item element(s) to configure + * @param opts - Resize options or command ('enable', 'disable', 'destroy', 'option', or config object) + * @param key - Option key when using 'option' command + * @param value - Option value when using 'option' command + * @returns this instance for chaining + * + * @example + * dd.resizable(element, 'enable'); // Enable resizing + * dd.resizable(element, 'option', 'minWidth', 100); // Set minimum width + */ + resizable(el: GridItemHTMLElement, opts: DDOpts, key?: DDKey, value?: DDValue): DDGridStack; + /** + * Enable/disable/configure dragging for grid elements. + * + * @param el - Grid item element(s) to configure + * @param opts - Drag options or command ('enable', 'disable', 'destroy', 'option', or config object) + * @param key - Option key when using 'option' command + * @param value - Option value when using 'option' command + * @returns this instance for chaining + * + * @example + * dd.draggable(element, 'enable'); // Enable dragging + * dd.draggable(element, {handle: '.drag-handle'}); // Configure drag handle + */ + draggable(el: GridItemHTMLElement, opts: DDOpts, key?: DDKey, value?: DDValue): DDGridStack; + dragIn(el: GridStackElement, opts: DDDragOpt): DDGridStack; + droppable(el: GridItemHTMLElement, opts: DDOpts | DDDropOpt, key?: DDKey, value?: DDValue): DDGridStack; + /** true if element is droppable */ + isDroppable(el: DDElementHost): boolean; + /** true if element is draggable */ + isDraggable(el: DDElementHost): boolean; + /** true if element is draggable */ + isResizable(el: DDElementHost): boolean; + on(el: GridItemHTMLElement, name: string, callback: DDCallback): DDGridStack; + off(el: GridItemHTMLElement, name: string): DDGridStack; +} diff --git a/node_modules/gridstack/dist/dd-gridstack.js b/node_modules/gridstack/dist/dd-gridstack.js new file mode 100644 index 000000000..0d5232803 --- /dev/null +++ b/node_modules/gridstack/dist/dd-gridstack.js @@ -0,0 +1,165 @@ +/** + * dd-gridstack.ts 12.3.2 + * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license + */ +import { Utils } from './utils'; +import { DDManager } from './dd-manager'; +import { DDElement } from './dd-element'; +// let count = 0; // TEST +/** + * HTML Native Mouse and Touch Events Drag and Drop functionality. + * + * This class provides the main drag & drop implementation for GridStack, + * handling resizing, dragging, and dropping of grid items using native HTML5 events. + * It manages the interaction between different DD components and the grid system. + */ +export class DDGridStack { + /** + * Enable/disable/configure resizing for grid elements. + * + * @param el - Grid item element(s) to configure + * @param opts - Resize options or command ('enable', 'disable', 'destroy', 'option', or config object) + * @param key - Option key when using 'option' command + * @param value - Option value when using 'option' command + * @returns this instance for chaining + * + * @example + * dd.resizable(element, 'enable'); // Enable resizing + * dd.resizable(element, 'option', 'minWidth', 100); // Set minimum width + */ + resizable(el, opts, key, value) { + this._getDDElements(el, opts).forEach(dEl => { + if (opts === 'disable' || opts === 'enable') { + dEl.ddResizable && dEl.ddResizable[opts](); // can't create DD as it requires options for setupResizable() + } + else if (opts === 'destroy') { + dEl.ddResizable && dEl.cleanResizable(); + } + else if (opts === 'option') { + dEl.setupResizable({ [key]: value }); + } + else { + const n = dEl.el.gridstackNode; + const grid = n.grid; + let handles = dEl.el.getAttribute('gs-resize-handles') || grid.opts.resizable.handles || 'e,s,se'; + if (handles === 'all') + handles = 'n,e,s,w,se,sw,ne,nw'; + // NOTE: keep the resize handles as e,w don't have enough space (10px) to show resize corners anyway. limit during drag instead + // restrict vertical resize if height is done to match content anyway... odd to have it spring back + // if (Utils.shouldSizeToContent(n, true)) { + // const doE = handles.indexOf('e') !== -1; + // const doW = handles.indexOf('w') !== -1; + // handles = doE ? (doW ? 'e,w' : 'e') : (doW ? 'w' : ''); + // } + const autoHide = !grid.opts.alwaysShowResizeHandle; + dEl.setupResizable({ + ...grid.opts.resizable, + ...{ handles, autoHide }, + ...{ + start: opts.start, + stop: opts.stop, + resize: opts.resize + } + }); + } + }); + return this; + } + /** + * Enable/disable/configure dragging for grid elements. + * + * @param el - Grid item element(s) to configure + * @param opts - Drag options or command ('enable', 'disable', 'destroy', 'option', or config object) + * @param key - Option key when using 'option' command + * @param value - Option value when using 'option' command + * @returns this instance for chaining + * + * @example + * dd.draggable(element, 'enable'); // Enable dragging + * dd.draggable(element, {handle: '.drag-handle'}); // Configure drag handle + */ + draggable(el, opts, key, value) { + this._getDDElements(el, opts).forEach(dEl => { + if (opts === 'disable' || opts === 'enable') { + dEl.ddDraggable && dEl.ddDraggable[opts](); // can't create DD as it requires options for setupDraggable() + } + else if (opts === 'destroy') { + dEl.ddDraggable && dEl.cleanDraggable(); + } + else if (opts === 'option') { + dEl.setupDraggable({ [key]: value }); + } + else { + const grid = dEl.el.gridstackNode.grid; + dEl.setupDraggable({ + ...grid.opts.draggable, + ...{ + // containment: (grid.parentGridNode && grid.opts.dragOut === false) ? grid.el.parentElement : (grid.opts.draggable.containment || null), + start: opts.start, + stop: opts.stop, + drag: opts.drag + } + }); + } + }); + return this; + } + dragIn(el, opts) { + this._getDDElements(el).forEach(dEl => dEl.setupDraggable(opts)); + return this; + } + droppable(el, opts, key, value) { + if (typeof opts.accept === 'function' && !opts._accept) { + opts._accept = opts.accept; + opts.accept = (el) => opts._accept(el); + } + this._getDDElements(el, opts).forEach(dEl => { + if (opts === 'disable' || opts === 'enable') { + dEl.ddDroppable && dEl.ddDroppable[opts](); + } + else if (opts === 'destroy') { + dEl.ddDroppable && dEl.cleanDroppable(); + } + else if (opts === 'option') { + dEl.setupDroppable({ [key]: value }); + } + else { + dEl.setupDroppable(opts); + } + }); + return this; + } + /** true if element is droppable */ + isDroppable(el) { + return !!(el?.ddElement?.ddDroppable && !el.ddElement.ddDroppable.disabled); + } + /** true if element is draggable */ + isDraggable(el) { + return !!(el?.ddElement?.ddDraggable && !el.ddElement.ddDraggable.disabled); + } + /** true if element is draggable */ + isResizable(el) { + return !!(el?.ddElement?.ddResizable && !el.ddElement.ddResizable.disabled); + } + on(el, name, callback) { + this._getDDElements(el).forEach(dEl => dEl.on(name, (event) => { + callback(event, DDManager.dragElement ? DDManager.dragElement.el : event.target, DDManager.dragElement ? DDManager.dragElement.helper : null); + })); + return this; + } + off(el, name) { + this._getDDElements(el).forEach(dEl => dEl.off(name)); + return this; + } + /** @internal returns a list of DD elements, creating them on the fly by default unless option is to destroy or disable */ + _getDDElements(els, opts) { + // don't force create if we're going to destroy it, unless it's a grid which is used as drop target for it's children + const create = els.gridstack || opts !== 'destroy' && opts !== 'disable'; + const hosts = Utils.getElements(els); + if (!hosts.length) + return []; + const list = hosts.map(e => e.ddElement || (create ? DDElement.init(e) : null)).filter(d => d); // remove nulls + return list; + } +} +//# sourceMappingURL=dd-gridstack.js.map \ No newline at end of file diff --git a/node_modules/gridstack/dist/dd-gridstack.js.map b/node_modules/gridstack/dist/dd-gridstack.js.map new file mode 100644 index 000000000..cd24bbb94 --- /dev/null +++ b/node_modules/gridstack/dist/dd-gridstack.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dd-gridstack.js","sourceRoot":"","sources":["../src/dd-gridstack.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAiB,MAAM,cAAc,CAAC;AAsCxD,yBAAyB;AAEzB;;;;;;GAMG;AACH,MAAM,OAAO,WAAW;IAEtB;;;;;;;;;;;;OAYG;IACI,SAAS,CAAC,EAAuB,EAAE,IAAY,EAAE,GAAW,EAAE,KAAe;QAClF,IAAI,CAAC,cAAc,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAC1C,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,QAAQ,EAAE;gBAC3C,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,8DAA8D;aAC3G;iBAAM,IAAI,IAAI,KAAK,SAAS,EAAE;gBAC7B,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,cAAc,EAAE,CAA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ts 12.3.2\r\n * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license\r\n */\r\n\r\n/* eslint-disable @typescript-eslint/no-unused-vars */\r\nimport { GridItemHTMLElement, GridStackElement, DDDragOpt } from './types';\r\nimport { Utils } from './utils';\r\nimport { DDManager } from './dd-manager';\r\nimport { DDElement, DDElementHost } from './dd-element';\r\nimport { GridHTMLElement } from './gridstack';\r\n\r\n/**\r\n * Drag & Drop options for drop targets.\r\n * Configures which elements can be dropped onto a grid.\r\n */\r\nexport type DDDropOpt = {\r\n /** Function to determine if an element can be dropped (see GridStackOptions.acceptWidgets) */\r\n accept?: (el: GridItemHTMLElement) => boolean;\r\n}\r\n\r\n/**\r\n * Drag & Drop operation types used throughout the DD system.\r\n * Can be control commands or configuration objects.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nexport type DDOpts = 'enable' | 'disable' | 'destroy' | 'option' | string | any;\r\n\r\n/**\r\n * Keys for DD configuration options that can be set via the 'option' command.\r\n */\r\nexport type DDKey = 'minWidth' | 'minHeight' | 'maxWidth' | 'maxHeight' | 'maxHeightMoveUp' | 'maxWidthMoveLeft';\r\n\r\n/**\r\n * Values for DD configuration options (numbers or strings with units).\r\n */\r\nexport type DDValue = number | string;\r\n\r\n/**\r\n * Callback function type for drag & drop events.\r\n * \r\n * @param event - The DOM event that triggered the callback\r\n * @param arg2 - The grid item element being dragged/dropped\r\n * @param helper - Optional helper element used during drag operations\r\n */\r\nexport type DDCallback = (event: Event, arg2: GridItemHTMLElement, helper?: GridItemHTMLElement) => void;\r\n\r\n// let count = 0; // TEST\r\n\r\n/**\r\n * HTML Native Mouse and Touch Events Drag and Drop functionality.\r\n * \r\n * This class provides the main drag & drop implementation for GridStack,\r\n * handling resizing, dragging, and dropping of grid items using native HTML5 events.\r\n * It manages the interaction between different DD components and the grid system.\r\n */\r\nexport class DDGridStack {\r\n\r\n /**\r\n * Enable/disable/configure resizing for grid elements.\r\n * \r\n * @param el - Grid item element(s) to configure\r\n * @param opts - Resize options or command ('enable', 'disable', 'destroy', 'option', or config object)\r\n * @param key - Option key when using 'option' command\r\n * @param value - Option value when using 'option' command\r\n * @returns this instance for chaining\r\n * \r\n * @example\r\n * dd.resizable(element, 'enable'); // Enable resizing\r\n * dd.resizable(element, 'option', 'minWidth', 100); // Set minimum width\r\n */\r\n public resizable(el: GridItemHTMLElement, opts: DDOpts, key?: DDKey, value?: DDValue): DDGridStack {\r\n this._getDDElements(el, opts).forEach(dEl => {\r\n if (opts === 'disable' || opts === 'enable') {\r\n dEl.ddResizable && dEl.ddResizable[opts](); // can't create DD as it requires options for setupResizable()\r\n } else if (opts === 'destroy') {\r\n dEl.ddResizable && dEl.cleanResizable();\r\n } else if (opts === 'option') {\r\n dEl.setupResizable({ [key]: value });\r\n } else {\r\n const n = dEl.el.gridstackNode;\r\n const grid = n.grid;\r\n let handles = dEl.el.getAttribute('gs-resize-handles') || grid.opts.resizable.handles || 'e,s,se';\r\n if (handles === 'all') handles = 'n,e,s,w,se,sw,ne,nw';\r\n // NOTE: keep the resize handles as e,w don't have enough space (10px) to show resize corners anyway. limit during drag instead\r\n // restrict vertical resize if height is done to match content anyway... odd to have it spring back\r\n // if (Utils.shouldSizeToContent(n, true)) {\r\n // const doE = handles.indexOf('e') !== -1;\r\n // const doW = handles.indexOf('w') !== -1;\r\n // handles = doE ? (doW ? 'e,w' : 'e') : (doW ? 'w' : '');\r\n // }\r\n const autoHide = !grid.opts.alwaysShowResizeHandle;\r\n dEl.setupResizable({\r\n ...grid.opts.resizable,\r\n ...{ handles, autoHide },\r\n ...{\r\n start: opts.start,\r\n stop: opts.stop,\r\n resize: opts.resize\r\n }\r\n });\r\n }\r\n });\r\n return this;\r\n }\r\n\r\n /**\r\n * Enable/disable/configure dragging for grid elements.\r\n * \r\n * @param el - Grid item element(s) to configure\r\n * @param opts - Drag options or command ('enable', 'disable', 'destroy', 'option', or config object)\r\n * @param key - Option key when using 'option' command\r\n * @param value - Option value when using 'option' command\r\n * @returns this instance for chaining\r\n * \r\n * @example\r\n * dd.draggable(element, 'enable'); // Enable dragging\r\n * dd.draggable(element, {handle: '.drag-handle'}); // Configure drag handle\r\n */\r\n public draggable(el: GridItemHTMLElement, opts: DDOpts, key?: DDKey, value?: DDValue): DDGridStack {\r\n this._getDDElements(el, opts).forEach(dEl => {\r\n if (opts === 'disable' || opts === 'enable') {\r\n dEl.ddDraggable && dEl.ddDraggable[opts](); // can't create DD as it requires options for setupDraggable()\r\n } else if (opts === 'destroy') {\r\n dEl.ddDraggable && dEl.cleanDraggable();\r\n } else if (opts === 'option') {\r\n dEl.setupDraggable({ [key]: value });\r\n } else {\r\n const grid = dEl.el.gridstackNode.grid;\r\n dEl.setupDraggable({\r\n ...grid.opts.draggable,\r\n ...{\r\n // containment: (grid.parentGridNode && grid.opts.dragOut === false) ? grid.el.parentElement : (grid.opts.draggable.containment || null),\r\n start: opts.start,\r\n stop: opts.stop,\r\n drag: opts.drag\r\n }\r\n });\r\n }\r\n });\r\n return this;\r\n }\r\n\r\n public dragIn(el: GridStackElement, opts: DDDragOpt): DDGridStack {\r\n this._getDDElements(el).forEach(dEl => dEl.setupDraggable(opts));\r\n return this;\r\n }\r\n\r\n public droppable(el: GridItemHTMLElement, opts: DDOpts | DDDropOpt, key?: DDKey, value?: DDValue): DDGridStack {\r\n if (typeof opts.accept === 'function' && !opts._accept) {\r\n opts._accept = opts.accept;\r\n opts.accept = (el) => opts._accept(el);\r\n }\r\n this._getDDElements(el, opts).forEach(dEl => {\r\n if (opts === 'disable' || opts === 'enable') {\r\n dEl.ddDroppable && dEl.ddDroppable[opts]();\r\n } else if (opts === 'destroy') {\r\n dEl.ddDroppable && dEl.cleanDroppable();\r\n } else if (opts === 'option') {\r\n dEl.setupDroppable({ [key]: value });\r\n } else {\r\n dEl.setupDroppable(opts);\r\n }\r\n });\r\n return this;\r\n }\r\n\r\n /** true if element is droppable */\r\n public isDroppable(el: DDElementHost): boolean {\r\n return !!(el?.ddElement?.ddDroppable && !el.ddElement.ddDroppable.disabled);\r\n }\r\n\r\n /** true if element is draggable */\r\n public isDraggable(el: DDElementHost): boolean {\r\n return !!(el?.ddElement?.ddDraggable && !el.ddElement.ddDraggable.disabled);\r\n }\r\n\r\n /** true if element is draggable */\r\n public isResizable(el: DDElementHost): boolean {\r\n return !!(el?.ddElement?.ddResizable && !el.ddElement.ddResizable.disabled);\r\n }\r\n\r\n public on(el: GridItemHTMLElement, name: string, callback: DDCallback): DDGridStack {\r\n this._getDDElements(el).forEach(dEl =>\r\n dEl.on(name, (event: Event) => {\r\n callback(\r\n event,\r\n DDManager.dragElement ? DDManager.dragElement.el : event.target as GridItemHTMLElement,\r\n DDManager.dragElement ? DDManager.dragElement.helper : null)\r\n })\r\n );\r\n return this;\r\n }\r\n\r\n public off(el: GridItemHTMLElement, name: string): DDGridStack {\r\n this._getDDElements(el).forEach(dEl => dEl.off(name));\r\n return this;\r\n }\r\n\r\n /** @internal returns a list of DD elements, creating them on the fly by default unless option is to destroy or disable */\r\n protected _getDDElements(els: GridStackElement, opts?: DDOpts): DDElement[] {\r\n // don't force create if we're going to destroy it, unless it's a grid which is used as drop target for it's children\r\n const create = (els as GridHTMLElement).gridstack || opts !== 'destroy' && opts !== 'disable';\r\n const hosts = Utils.getElements(els) as DDElementHost[];\r\n if (!hosts.length) return [];\r\n const list = hosts.map(e => e.ddElement || (create ? DDElement.init(e) : null)).filter(d => d); // remove nulls\r\n return list;\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/gridstack/dist/dd-manager.d.ts b/node_modules/gridstack/dist/dd-manager.d.ts new file mode 100644 index 000000000..ef61563c2 --- /dev/null +++ b/node_modules/gridstack/dist/dd-manager.d.ts @@ -0,0 +1,43 @@ +/** + * dd-manager.ts 12.3.2 + * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license + */ +import { DDDraggable } from './dd-draggable'; +import { DDDroppable } from './dd-droppable'; +import { DDResizable } from './dd-resizable'; +/** + * Global state manager for all Drag & Drop instances. + * + * This class maintains shared state across all drag & drop operations, + * ensuring proper coordination between multiple grids and drag/drop elements. + * All properties are static to provide global access throughout the DD system. + */ +export declare class DDManager { + /** + * Controls drag operation pausing behavior. + * If set to true or a number (milliseconds), dragging placement and collision + * detection will only happen after the user pauses movement. + * This improves performance during rapid mouse movements. + */ + static pauseDrag: boolean | number; + /** + * Flag indicating if a mouse down event was already handled. + * Prevents multiple handlers from processing the same mouse event. + */ + static mouseHandled: boolean; + /** + * Reference to the element currently being dragged. + * Used to track the active drag operation across the system. + */ + static dragElement: DDDraggable; + /** + * Reference to the drop target element currently under the cursor. + * Used to handle drop operations and hover effects. + */ + static dropElement: DDDroppable; + /** + * Reference to the element currently being resized. + * Helps ignore nested grid resize handles during resize operations. + */ + static overResizeElement: DDResizable; +} diff --git a/node_modules/gridstack/dist/dd-manager.js b/node_modules/gridstack/dist/dd-manager.js new file mode 100644 index 000000000..1099fa5df --- /dev/null +++ b/node_modules/gridstack/dist/dd-manager.js @@ -0,0 +1,14 @@ +/** + * dd-manager.ts 12.3.2 + * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license + */ +/** + * Global state manager for all Drag & Drop instances. + * + * This class maintains shared state across all drag & drop operations, + * ensuring proper coordination between multiple grids and drag/drop elements. + * All properties are static to provide global access throughout the DD system. + */ +export class DDManager { +} +//# sourceMappingURL=dd-manager.js.map \ No newline at end of file diff --git a/node_modules/gridstack/dist/dd-manager.js.map b/node_modules/gridstack/dist/dd-manager.js.map new file mode 100644 index 000000000..acb519a06 --- /dev/null +++ b/node_modules/gridstack/dist/dd-manager.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dd-manager.js","sourceRoot":"","sources":["../src/dd-manager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;;;;;GAMG;AACH,MAAM,OAAO,SAAS;CAiCrB","sourcesContent":["/**\n * dd-manager.ts 12.3.2\n * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license\n */\n\nimport { DDDraggable } from './dd-draggable';\nimport { DDDroppable } from './dd-droppable';\nimport { DDResizable } from './dd-resizable';\n\n/**\n * Global state manager for all Drag & Drop instances.\n * \n * This class maintains shared state across all drag & drop operations,\n * ensuring proper coordination between multiple grids and drag/drop elements.\n * All properties are static to provide global access throughout the DD system.\n */\nexport class DDManager {\n /**\n * Controls drag operation pausing behavior.\n * If set to true or a number (milliseconds), dragging placement and collision\n * detection will only happen after the user pauses movement.\n * This improves performance during rapid mouse movements.\n */\n public static pauseDrag: boolean | number;\n\n /**\n * Flag indicating if a mouse down event was already handled.\n * Prevents multiple handlers from processing the same mouse event.\n */\n public static mouseHandled: boolean;\n\n /**\n * Reference to the element currently being dragged.\n * Used to track the active drag operation across the system.\n */\n public static dragElement: DDDraggable;\n\n /**\n * Reference to the drop target element currently under the cursor.\n * Used to handle drop operations and hover effects.\n */\n public static dropElement: DDDroppable;\n\n /**\n * Reference to the element currently being resized.\n * Helps ignore nested grid resize handles during resize operations.\n */\n public static overResizeElement: DDResizable;\n\n}\n"]} \ No newline at end of file diff --git a/node_modules/gridstack/dist/dd-resizable-handle.d.ts b/node_modules/gridstack/dist/dd-resizable-handle.d.ts new file mode 100644 index 000000000..a34a14505 --- /dev/null +++ b/node_modules/gridstack/dist/dd-resizable-handle.d.ts @@ -0,0 +1,18 @@ +/** + * dd-resizable-handle.ts 12.3.2 + * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license + */ +import { GridItemHTMLElement } from './gridstack'; +export interface DDResizableHandleOpt { + start?: (event: any) => void; + move?: (event: any) => void; + stop?: (event: any) => void; +} +export declare class DDResizableHandle { + protected host: GridItemHTMLElement; + protected dir: string; + protected option: DDResizableHandleOpt; + constructor(host: GridItemHTMLElement, dir: string, option: DDResizableHandleOpt); + /** call this when resize handle needs to be removed and cleaned up */ + destroy(): DDResizableHandle; +} diff --git a/node_modules/gridstack/dist/dd-resizable-handle.js b/node_modules/gridstack/dist/dd-resizable-handle.js new file mode 100644 index 000000000..9a7501961 --- /dev/null +++ b/node_modules/gridstack/dist/dd-resizable-handle.js @@ -0,0 +1,113 @@ +/** + * dd-resizable-handle.ts 12.3.2 + * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license + */ +import { isTouch, pointerdown, touchend, touchmove, touchstart } from './dd-touch'; +class DDResizableHandle { + constructor(host, dir, option) { + this.host = host; + this.dir = dir; + this.option = option; + /** @internal true after we've moved enough pixels to start a resize */ + this.moving = false; + // create var event binding so we can easily remove and still look like TS methods (unlike anonymous functions) + this._mouseDown = this._mouseDown.bind(this); + this._mouseMove = this._mouseMove.bind(this); + this._mouseUp = this._mouseUp.bind(this); + this._keyEvent = this._keyEvent.bind(this); + this._init(); + } + /** @internal */ + _init() { + const el = this.el = document.createElement('div'); + el.classList.add('ui-resizable-handle'); + el.classList.add(`${DDResizableHandle.prefix}${this.dir}`); + el.style.zIndex = '100'; + el.style.userSelect = 'none'; + this.host.appendChild(this.el); + this.el.addEventListener('mousedown', this._mouseDown); + if (isTouch) { + this.el.addEventListener('touchstart', touchstart); + this.el.addEventListener('pointerdown', pointerdown); + // this.el.style.touchAction = 'none'; // not needed unlike pointerdown doc comment + } + return this; + } + /** call this when resize handle needs to be removed and cleaned up */ + destroy() { + if (this.moving) + this._mouseUp(this.mouseDownEvent); + this.el.removeEventListener('mousedown', this._mouseDown); + if (isTouch) { + this.el.removeEventListener('touchstart', touchstart); + this.el.removeEventListener('pointerdown', pointerdown); + } + this.host.removeChild(this.el); + delete this.el; + delete this.host; + return this; + } + /** @internal called on mouse down on us: capture move on the entire document (mouse might not stay on us) until we release the mouse */ + _mouseDown(e) { + this.mouseDownEvent = e; + document.addEventListener('mousemove', this._mouseMove, { capture: true, passive: true }); // capture, not bubble + document.addEventListener('mouseup', this._mouseUp, true); + if (isTouch) { + this.el.addEventListener('touchmove', touchmove); + this.el.addEventListener('touchend', touchend); + } + e.stopPropagation(); + e.preventDefault(); + } + /** @internal */ + _mouseMove(e) { + const s = this.mouseDownEvent; + if (this.moving) { + this._triggerEvent('move', e); + } + else if (Math.abs(e.x - s.x) + Math.abs(e.y - s.y) > 2) { + // don't start unless we've moved at least 3 pixels + this.moving = true; + this._triggerEvent('start', this.mouseDownEvent); + this._triggerEvent('move', e); + // now track keyboard events to cancel + document.addEventListener('keydown', this._keyEvent); + } + e.stopPropagation(); + // e.preventDefault(); passive = true + } + /** @internal */ + _mouseUp(e) { + if (this.moving) { + this._triggerEvent('stop', e); + document.removeEventListener('keydown', this._keyEvent); + } + document.removeEventListener('mousemove', this._mouseMove, true); + document.removeEventListener('mouseup', this._mouseUp, true); + if (isTouch) { + this.el.removeEventListener('touchmove', touchmove); + this.el.removeEventListener('touchend', touchend); + } + delete this.moving; + delete this.mouseDownEvent; + e.stopPropagation(); + e.preventDefault(); + } + /** @internal call when keys are being pressed - use Esc to cancel */ + _keyEvent(e) { + if (e.key === 'Escape') { + this.host.gridstackNode?.grid?.engine.restoreInitial(); + this._mouseUp(this.mouseDownEvent); + } + } + /** @internal */ + _triggerEvent(name, event) { + if (this.option[name]) + this.option[name](event); + return this; + } +} +/** @internal */ +DDResizableHandle.prefix = 'ui-resizable-'; +export { DDResizableHandle }; +//# sourceMappingURL=dd-resizable-handle.js.map \ No newline at end of file diff --git a/node_modules/gridstack/dist/dd-resizable-handle.js.map b/node_modules/gridstack/dist/dd-resizable-handle.js.map new file mode 100644 index 000000000..048353e79 --- /dev/null +++ b/node_modules/gridstack/dist/dd-resizable-handle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dd-resizable-handle.js","sourceRoot":"","sources":["../src/dd-resizable-handle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AASnF,MAAa,iBAAiB;IAU5B,YAAsB,IAAyB,EAAY,GAAW,EAAY,MAA4B;QAAxF,SAAI,GAAJ,IAAI,CAAqB;QAAY,QAAG,GAAH,GAAG,CAAQ;QAAY,WAAM,GA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AO,IAAI,CAAC,MAAM,CAAC;QACnB,OAAO,IAAI,CAAC,cAAc,CAAC;QAC3B,CAAC,CAAC,eAAe,EAAE,CAAC;QACpB,CAAC,CAAC,cAAc,EAAE,CAAC;IACrB,CAAC;IAED,qEAAqE;IAC3D,SAAS,CAAC,CAAgB;QAClC,IAAI,CAAC,CAAC,GAAG,KAAK,QAAQ,EAAE;YACtB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC;YACvD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;SACpC;IACH,CAAC;IAID,gBAAgB;IACN,aAAa,CAAC,IAAY,EAAE,KAAiB;QACrD,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;YAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;QAChD,OAAO,IAAI,CAAC;IACd,CAAC;;AA1GD,gBAAgB;AACC,wBAAM,GAAG,eAAe,AAAlB,CAAmB;SAR/B,iBAAiB","sourcesContent":["/**\n * dd-resizable-handle.ts 12.3.2\n * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license\n */\n\nimport { isTouch, pointerdown, touchend, touchmove, touchstart } from './dd-touch';\nimport { GridItemHTMLElement } from './gridstack';\n\nexport interface DDResizableHandleOpt {\n start?: (event) => void;\n move?: (event) => void;\n stop?: (event) => void;\n}\n\nexport class DDResizableHandle {\n /** @internal */\n protected el: HTMLElement;\n /** @internal true after we've moved enough pixels to start a resize */\n protected moving = false;\n /** @internal */\n protected mouseDownEvent: MouseEvent;\n /** @internal */\n protected static prefix = 'ui-resizable-';\n\n constructor(protected host: GridItemHTMLElement, protected dir: string, protected option: DDResizableHandleOpt) {\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\n this._init();\n }\n\n /** @internal */\n protected _init(): DDResizableHandle {\n const el = this.el = document.createElement('div');\n el.classList.add('ui-resizable-handle');\n el.classList.add(`${DDResizableHandle.prefix}${this.dir}`);\n el.style.zIndex = '100';\n el.style.userSelect = 'none';\n this.host.appendChild(this.el);\n this.el.addEventListener('mousedown', this._mouseDown);\n if (isTouch) {\n this.el.addEventListener('touchstart', touchstart);\n this.el.addEventListener('pointerdown', pointerdown);\n // this.el.style.touchAction = 'none'; // not needed unlike pointerdown doc comment\n }\n return this;\n }\n\n /** call this when resize handle needs to be removed and cleaned up */\n public destroy(): DDResizableHandle {\n if (this.moving) this._mouseUp(this.mouseDownEvent);\n this.el.removeEventListener('mousedown', this._mouseDown);\n if (isTouch) {\n this.el.removeEventListener('touchstart', touchstart);\n this.el.removeEventListener('pointerdown', pointerdown);\n }\n this.host.removeChild(this.el);\n delete this.el;\n delete this.host;\n return this;\n }\n\n /** @internal called on mouse down on us: capture move on the entire document (mouse might not stay on us) until we release the mouse */\n protected _mouseDown(e: MouseEvent): void {\n this.mouseDownEvent = e;\n document.addEventListener('mousemove', this._mouseMove, { capture: true, passive: true}); // capture, not bubble\n document.addEventListener('mouseup', this._mouseUp, true);\n if (isTouch) {\n this.el.addEventListener('touchmove', touchmove);\n this.el.addEventListener('touchend', touchend);\n }\n e.stopPropagation();\n e.preventDefault();\n }\n\n /** @internal */\n protected _mouseMove(e: MouseEvent): void {\n const s = this.mouseDownEvent;\n if (this.moving) {\n this._triggerEvent('move', e);\n } else if (Math.abs(e.x - s.x) + Math.abs(e.y - s.y) > 2) {\n // don't start unless we've moved at least 3 pixels\n this.moving = true;\n this._triggerEvent('start', this.mouseDownEvent);\n this._triggerEvent('move', e);\n // now track keyboard events to cancel\n document.addEventListener('keydown', this._keyEvent);\n }\n e.stopPropagation();\n // e.preventDefault(); passive = true\n }\n\n /** @internal */\n protected _mouseUp(e: MouseEvent): void {\n if (this.moving) {\n this._triggerEvent('stop', e);\n document.removeEventListener('keydown', this._keyEvent);\n }\n document.removeEventListener('mousemove', this._mouseMove, true);\n document.removeEventListener('mouseup', this._mouseUp, true);\n if (isTouch) {\n this.el.removeEventListener('touchmove', touchmove);\n this.el.removeEventListener('touchend', touchend);\n }\n delete this.moving;\n delete this.mouseDownEvent;\n e.stopPropagation();\n e.preventDefault();\n }\n\n /** @internal call when keys are being pressed - use Esc to cancel */\n protected _keyEvent(e: KeyboardEvent): void {\n if (e.key === 'Escape') {\n this.host.gridstackNode?.grid?.engine.restoreInitial();\n this._mouseUp(this.mouseDownEvent);\n }\n }\n\n\n\n /** @internal */\n protected _triggerEvent(name: string, event: MouseEvent): DDResizableHandle {\n if (this.option[name]) this.option[name](event);\n return this;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/gridstack/dist/dd-resizable.d.ts b/node_modules/gridstack/dist/dd-resizable.d.ts new file mode 100644 index 000000000..4d95dcd85 --- /dev/null +++ b/node_modules/gridstack/dist/dd-resizable.d.ts @@ -0,0 +1,30 @@ +/** + * dd-resizable.ts 12.3.2 + * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license + */ +import { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl'; +import { DDUIData, GridItemHTMLElement } from './types'; +export interface DDResizableOpt { + autoHide?: boolean; + handles?: string; + maxHeight?: number; + maxHeightMoveUp?: number; + maxWidth?: number; + maxWidthMoveLeft?: number; + minHeight?: number; + minWidth?: number; + start?: (event: Event, ui: DDUIData) => void; + stop?: (event: Event) => void; + resize?: (event: Event, ui: DDUIData) => void; +} +export declare class DDResizable extends DDBaseImplement implements HTMLElementExtendOpt { + el: GridItemHTMLElement; + option: DDResizableOpt; + constructor(el: GridItemHTMLElement, option?: DDResizableOpt); + on(event: 'resizestart' | 'resize' | 'resizestop', callback: (event: DragEvent) => void): void; + off(event: 'resizestart' | 'resize' | 'resizestop'): void; + enable(): void; + disable(): void; + destroy(): void; + updateOption(opts: DDResizableOpt): DDResizable; +} diff --git a/node_modules/gridstack/dist/dd-resizable.js b/node_modules/gridstack/dist/dd-resizable.js new file mode 100644 index 000000000..ddc997333 --- /dev/null +++ b/node_modules/gridstack/dist/dd-resizable.js @@ -0,0 +1,304 @@ +/** + * dd-resizable.ts 12.3.2 + * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license + */ +import { DDResizableHandle } from './dd-resizable-handle'; +import { DDBaseImplement } from './dd-base-impl'; +import { Utils } from './utils'; +import { DDManager } from './dd-manager'; +class DDResizable extends DDBaseImplement { + // have to be public else complains for HTMLElementExtendOpt ? + constructor(el, option = {}) { + super(); + this.el = el; + this.option = option; + /** @internal */ + this.rectScale = { x: 1, y: 1 }; + /** @internal */ + this._ui = () => { + const containmentEl = this.el.parentElement; + const containmentRect = containmentEl.getBoundingClientRect(); + const newRect = { + width: this.originalRect.width, + height: this.originalRect.height + this.scrolled, + left: this.originalRect.left, + top: this.originalRect.top - this.scrolled + }; + const rect = this.temporalRect || newRect; + return { + position: { + left: (rect.left - containmentRect.left) * this.rectScale.x, + top: (rect.top - containmentRect.top) * this.rectScale.y + }, + size: { + width: rect.width * this.rectScale.x, + height: rect.height * this.rectScale.y + } + /* Gridstack ONLY needs position set above... keep around in case. + element: [this.el], // The object representing the element to be resized + helper: [], // TODO: not support yet - The object representing the helper that's being resized + originalElement: [this.el],// we don't wrap here, so simplify as this.el //The object representing the original element before it is wrapped + originalPosition: { // The position represented as { left, top } before the resizable is resized + left: this.originalRect.left - containmentRect.left, + top: this.originalRect.top - containmentRect.top + }, + originalSize: { // The size represented as { width, height } before the resizable is resized + width: this.originalRect.width, + height: this.originalRect.height + } + */ + }; + }; + // create var event binding so we can easily remove and still look like TS methods (unlike anonymous functions) + this._mouseOver = this._mouseOver.bind(this); + this._mouseOut = this._mouseOut.bind(this); + this.enable(); + this._setupAutoHide(this.option.autoHide); + this._setupHandlers(); + } + on(event, callback) { + super.on(event, callback); + } + off(event) { + super.off(event); + } + enable() { + super.enable(); + this.el.classList.remove('ui-resizable-disabled'); + this._setupAutoHide(this.option.autoHide); + } + disable() { + super.disable(); + this.el.classList.add('ui-resizable-disabled'); + this._setupAutoHide(false); + } + destroy() { + this._removeHandlers(); + this._setupAutoHide(false); + delete this.el; + super.destroy(); + } + updateOption(opts) { + const updateHandles = (opts.handles && opts.handles !== this.option.handles); + const updateAutoHide = (opts.autoHide && opts.autoHide !== this.option.autoHide); + Object.keys(opts).forEach(key => this.option[key] = opts[key]); + if (updateHandles) { + this._removeHandlers(); + this._setupHandlers(); + } + if (updateAutoHide) { + this._setupAutoHide(this.option.autoHide); + } + return this; + } + /** @internal turns auto hide on/off */ + _setupAutoHide(auto) { + if (auto) { + this.el.classList.add('ui-resizable-autohide'); + // use mouseover and not mouseenter to get better performance and track for nested cases + this.el.addEventListener('mouseover', this._mouseOver); + this.el.addEventListener('mouseout', this._mouseOut); + } + else { + this.el.classList.remove('ui-resizable-autohide'); + this.el.removeEventListener('mouseover', this._mouseOver); + this.el.removeEventListener('mouseout', this._mouseOut); + if (DDManager.overResizeElement === this) { + delete DDManager.overResizeElement; + } + } + return this; + } + /** @internal */ + // eslint-disable-next-line @typescript-eslint/no-unused-vars + _mouseOver(e) { + // console.log(`${count++} pre-enter ${(this.el as GridItemHTMLElement).gridstackNode._id}`) + // already over a child, ignore. Ideally we just call e.stopPropagation() but see https://github.com/gridstack/gridstack.js/issues/2018 + if (DDManager.overResizeElement || DDManager.dragElement) + return; + DDManager.overResizeElement = this; + // console.log(`${count++} enter ${(this.el as GridItemHTMLElement).gridstackNode._id}`) + this.el.classList.remove('ui-resizable-autohide'); + } + /** @internal */ + // eslint-disable-next-line @typescript-eslint/no-unused-vars + _mouseOut(e) { + // console.log(`${count++} pre-leave ${(this.el as GridItemHTMLElement).gridstackNode._id}`) + if (DDManager.overResizeElement !== this) + return; + delete DDManager.overResizeElement; + // console.log(`${count++} leave ${(this.el as GridItemHTMLElement).gridstackNode._id}`) + this.el.classList.add('ui-resizable-autohide'); + } + /** @internal */ + _setupHandlers() { + this.handlers = this.option.handles.split(',') + .map(dir => dir.trim()) + .map(dir => new DDResizableHandle(this.el, dir, { + start: (event) => { + this._resizeStart(event); + }, + stop: (event) => { + this._resizeStop(event); + }, + move: (event) => { + this._resizing(event, dir); + } + })); + return this; + } + /** @internal */ + _resizeStart(event) { + this.sizeToContent = Utils.shouldSizeToContent(this.el.gridstackNode, true); // strick true only and not number + this.originalRect = this.el.getBoundingClientRect(); + this.scrollEl = Utils.getScrollElement(this.el); + this.scrollY = this.scrollEl.scrollTop; + this.scrolled = 0; + this.startEvent = event; + this._setupHelper(); + this._applyChange(); + const ev = Utils.initEvent(event, { type: 'resizestart', target: this.el }); + if (this.option.start) { + this.option.start(ev, this._ui()); + } + this.el.classList.add('ui-resizable-resizing'); + this.triggerEvent('resizestart', ev); + return this; + } + /** @internal */ + _resizing(event, dir) { + this.scrolled = this.scrollEl.scrollTop - this.scrollY; + this.temporalRect = this._getChange(event, dir); + this._applyChange(); + const ev = Utils.initEvent(event, { type: 'resize', target: this.el }); + if (this.option.resize) { + this.option.resize(ev, this._ui()); + } + this.triggerEvent('resize', ev); + return this; + } + /** @internal */ + _resizeStop(event) { + const ev = Utils.initEvent(event, { type: 'resizestop', target: this.el }); + // Remove style attr now, so the stop handler can rebuild style attrs + this._cleanHelper(); + if (this.option.stop) { + this.option.stop(ev); // Note: ui() not used by gridstack so don't pass + } + this.el.classList.remove('ui-resizable-resizing'); + this.triggerEvent('resizestop', ev); + delete this.startEvent; + delete this.originalRect; + delete this.temporalRect; + delete this.scrollY; + delete this.scrolled; + return this; + } + /** @internal */ + _setupHelper() { + this.elOriginStyleVal = DDResizable._originStyleProp.map(prop => this.el.style[prop]); + this.parentOriginStylePosition = this.el.parentElement.style.position; + const parent = this.el.parentElement; + const dragTransform = Utils.getValuesFromTransformedElement(parent); + this.rectScale = { + x: dragTransform.xScale, + y: dragTransform.yScale + }; + if (getComputedStyle(this.el.parentElement).position.match(/static/)) { + this.el.parentElement.style.position = 'relative'; + } + this.el.style.position = 'absolute'; + this.el.style.opacity = '0.8'; + return this; + } + /** @internal */ + _cleanHelper() { + DDResizable._originStyleProp.forEach((prop, i) => { + this.el.style[prop] = this.elOriginStyleVal[i] || null; + }); + this.el.parentElement.style.position = this.parentOriginStylePosition || null; + return this; + } + /** @internal */ + _getChange(event, dir) { + const oEvent = this.startEvent; + const newRect = { + width: this.originalRect.width, + height: this.originalRect.height + this.scrolled, + left: this.originalRect.left, + top: this.originalRect.top - this.scrolled + }; + const offsetX = event.clientX - oEvent.clientX; + const offsetY = this.sizeToContent ? 0 : event.clientY - oEvent.clientY; // prevent vert resize + let moveLeft; + let moveUp; + if (dir.indexOf('e') > -1) { + newRect.width += offsetX; + } + else if (dir.indexOf('w') > -1) { + newRect.width -= offsetX; + newRect.left += offsetX; + moveLeft = true; + } + if (dir.indexOf('s') > -1) { + newRect.height += offsetY; + } + else if (dir.indexOf('n') > -1) { + newRect.height -= offsetY; + newRect.top += offsetY; + moveUp = true; + } + const constrain = this._constrainSize(newRect.width, newRect.height, moveLeft, moveUp); + if (Math.round(newRect.width) !== Math.round(constrain.width)) { // round to ignore slight round-off errors + if (dir.indexOf('w') > -1) { + newRect.left += newRect.width - constrain.width; + } + newRect.width = constrain.width; + } + if (Math.round(newRect.height) !== Math.round(constrain.height)) { + if (dir.indexOf('n') > -1) { + newRect.top += newRect.height - constrain.height; + } + newRect.height = constrain.height; + } + return newRect; + } + /** @internal constrain the size to the set min/max values */ + _constrainSize(oWidth, oHeight, moveLeft, moveUp) { + const o = this.option; + const maxWidth = (moveLeft ? o.maxWidthMoveLeft : o.maxWidth) || Number.MAX_SAFE_INTEGER; + const minWidth = o.minWidth / this.rectScale.x || oWidth; + const maxHeight = (moveUp ? o.maxHeightMoveUp : o.maxHeight) || Number.MAX_SAFE_INTEGER; + const minHeight = o.minHeight / this.rectScale.y || oHeight; + const width = Math.min(maxWidth, Math.max(minWidth, oWidth)); + const height = Math.min(maxHeight, Math.max(minHeight, oHeight)); + return { width, height }; + } + /** @internal */ + _applyChange() { + let containmentRect = { left: 0, top: 0, width: 0, height: 0 }; + if (this.el.style.position === 'absolute') { + const containmentEl = this.el.parentElement; + const { left, top } = containmentEl.getBoundingClientRect(); + containmentRect = { left, top, width: 0, height: 0 }; + } + if (!this.temporalRect) + return this; + Object.keys(this.temporalRect).forEach(key => { + const value = this.temporalRect[key]; + const scaleReciprocal = key === 'width' || key === 'left' ? this.rectScale.x : key === 'height' || key === 'top' ? this.rectScale.y : 1; + this.el.style[key] = (value - containmentRect[key]) * scaleReciprocal + 'px'; + }); + return this; + } + /** @internal */ + _removeHandlers() { + this.handlers.forEach(handle => handle.destroy()); + delete this.handlers; + return this; + } +} +/** @internal */ +DDResizable._originStyleProp = ['width', 'height', 'position', 'left', 'top', 'opacity', 'zIndex']; +export { DDResizable }; +//# sourceMappingURL=dd-resizable.js.map \ No newline at end of file diff --git a/node_modules/gridstack/dist/dd-resizable.js.map b/node_modules/gridstack/dist/dd-resizable.js.map new file mode 100644 index 000000000..a0206ddab --- /dev/null +++ b/node_modules/gridstack/dist/dd-resizable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dd-resizable.js","sourceRoot":"","sources":["../src/dd-resizable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAwB,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAwBzC,MAAa,WAAY,SAAQ,eAAe;IA0B9C,8DAA8D;IAC9D,YAAmB,EAAuB,EAAS,SAAyB,EAAE;QAC5E,KAAK,EAAE,CAAC;QADS,OAAE,GAAF,EAAE,CAAqB;QAAS,WAAM,GAAN,MAAM,CAAqB;QAtB9E,gBAAgB;QACN,cAAS,GAAwB,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE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AC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACxI,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,eAAe,GAAG,IAAI,CAAC;QAC/E,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAED,gBAAgB;IACN,eAAe;QACvB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QAClD,OAAO,IAAI,CAAC,QAAQ,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;;AAhRD,gBAAgB;AACC,4BAAgB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,AAAtE,CAAuE;SAtB7F,WAAW","sourcesContent":["/**\n * dd-resizable.ts 12.3.2\n * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license\n */\n\nimport { DDResizableHandle } from './dd-resizable-handle';\nimport { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl';\nimport { Utils } from './utils';\nimport { DDUIData, GridItemHTMLElement, Rect, Size } from './types';\nimport { DDManager } from './dd-manager';\n\n// import { GridItemHTMLElement } from './types'; let count = 0; // TEST\n\n// TODO: merge with DDDragOpt\nexport interface DDResizableOpt {\n autoHide?: boolean;\n handles?: string;\n maxHeight?: number;\n maxHeightMoveUp?: number;\n maxWidth?: number;\n maxWidthMoveLeft?: number;\n minHeight?: number;\n minWidth?: number;\n start?: (event: Event, ui: DDUIData) => void;\n stop?: (event: Event) => void;\n resize?: (event: Event, ui: DDUIData) => void;\n}\n\ninterface RectScaleReciprocal {\n x: number;\n y: number;\n}\n\nexport class DDResizable extends DDBaseImplement implements HTMLElementExtendOpt {\n /** @internal */\n protected handlers: DDResizableHandle[];\n /** @internal */\n protected originalRect: Rect;\n /** @internal */\n protected rectScale: RectScaleReciprocal = { x: 1, y: 1 };\n /** @internal */\n protected temporalRect: Rect;\n /** @internal */\n protected scrollY: number;\n /** @internal */\n protected scrolled: number;\n /** @internal */\n protected scrollEl: HTMLElement;\n /** @internal */\n protected startEvent: MouseEvent;\n /** @internal value saved in the same order as _originStyleProp[] */\n protected elOriginStyleVal: string[];\n /** @internal */\n protected parentOriginStylePosition: string;\n /** @internal */\n protected static _originStyleProp = ['width', 'height', 'position', 'left', 'top', 'opacity', 'zIndex'];\n /** @internal */\n protected sizeToContent: boolean;\n\n // have to be public else complains for HTMLElementExtendOpt ?\n constructor(public el: GridItemHTMLElement, public option: DDResizableOpt = {}) {\n super();\n // create var event binding so we can easily remove and still look like TS methods (unlike anonymous functions)\n this._mouseOver = this._mouseOver.bind(this);\n this._mouseOut = this._mouseOut.bind(this);\n this.enable();\n this._setupAutoHide(this.option.autoHide);\n this._setupHandlers();\n }\n\n public on(event: 'resizestart' | 'resize' | 'resizestop', callback: (event: DragEvent) => void): void {\n super.on(event, callback);\n }\n\n public off(event: 'resizestart' | 'resize' | 'resizestop'): void {\n super.off(event);\n }\n\n public enable(): void {\n super.enable();\n this.el.classList.remove('ui-resizable-disabled');\n this._setupAutoHide(this.option.autoHide);\n }\n\n public disable(): void {\n super.disable();\n this.el.classList.add('ui-resizable-disabled');\n this._setupAutoHide(false);\n }\n\n public destroy(): void {\n this._removeHandlers();\n this._setupAutoHide(false);\n delete this.el;\n super.destroy();\n }\n\n public updateOption(opts: DDResizableOpt): DDResizable {\n const updateHandles = (opts.handles && opts.handles !== this.option.handles);\n const updateAutoHide = (opts.autoHide && opts.autoHide !== this.option.autoHide);\n Object.keys(opts).forEach(key => this.option[key] = opts[key]);\n if (updateHandles) {\n this._removeHandlers();\n this._setupHandlers();\n }\n if (updateAutoHide) {\n this._setupAutoHide(this.option.autoHide);\n }\n return this;\n }\n\n /** @internal turns auto hide on/off */\n protected _setupAutoHide(auto: boolean): DDResizable {\n if (auto) {\n this.el.classList.add('ui-resizable-autohide');\n // use mouseover and not mouseenter to get better performance and track for nested cases\n this.el.addEventListener('mouseover', this._mouseOver);\n this.el.addEventListener('mouseout', this._mouseOut);\n } else {\n this.el.classList.remove('ui-resizable-autohide');\n this.el.removeEventListener('mouseover', this._mouseOver);\n this.el.removeEventListener('mouseout', this._mouseOut);\n if (DDManager.overResizeElement === this) {\n delete DDManager.overResizeElement;\n }\n }\n return this;\n }\n\n /** @internal */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected _mouseOver(e: Event): void {\n // console.log(`${count++} pre-enter ${(this.el as GridItemHTMLElement).gridstackNode._id}`)\n // already over a child, ignore. Ideally we just call e.stopPropagation() but see https://github.com/gridstack/gridstack.js/issues/2018\n if (DDManager.overResizeElement || DDManager.dragElement) return;\n DDManager.overResizeElement = this;\n // console.log(`${count++} enter ${(this.el as GridItemHTMLElement).gridstackNode._id}`)\n this.el.classList.remove('ui-resizable-autohide');\n }\n\n /** @internal */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected _mouseOut(e: Event): void {\n // console.log(`${count++} pre-leave ${(this.el as GridItemHTMLElement).gridstackNode._id}`)\n if (DDManager.overResizeElement !== this) return;\n delete DDManager.overResizeElement;\n // console.log(`${count++} leave ${(this.el as GridItemHTMLElement).gridstackNode._id}`)\n this.el.classList.add('ui-resizable-autohide');\n }\n\n /** @internal */\n protected _setupHandlers(): DDResizable {\n this.handlers = this.option.handles.split(',')\n .map(dir => dir.trim())\n .map(dir => new DDResizableHandle(this.el, dir, {\n start: (event: MouseEvent) => {\n this._resizeStart(event);\n },\n stop: (event: MouseEvent) => {\n this._resizeStop(event);\n },\n move: (event: MouseEvent) => {\n this._resizing(event, dir);\n }\n }));\n return this;\n }\n\n /** @internal */\n protected _resizeStart(event: MouseEvent): DDResizable {\n this.sizeToContent = Utils.shouldSizeToContent(this.el.gridstackNode, true); // strick true only and not number\n this.originalRect = this.el.getBoundingClientRect();\n this.scrollEl = Utils.getScrollElement(this.el);\n this.scrollY = this.scrollEl.scrollTop;\n this.scrolled = 0;\n this.startEvent = event;\n this._setupHelper();\n this._applyChange();\n const ev = Utils.initEvent(event, { type: 'resizestart', target: this.el });\n if (this.option.start) {\n this.option.start(ev, this._ui());\n }\n this.el.classList.add('ui-resizable-resizing');\n this.triggerEvent('resizestart', ev);\n return this;\n }\n\n /** @internal */\n protected _resizing(event: MouseEvent, dir: string): DDResizable {\n this.scrolled = this.scrollEl.scrollTop - this.scrollY;\n this.temporalRect = this._getChange(event, dir);\n this._applyChange();\n const ev = Utils.initEvent(event, { type: 'resize', target: this.el });\n if (this.option.resize) {\n this.option.resize(ev, this._ui());\n }\n this.triggerEvent('resize', ev);\n return this;\n }\n\n /** @internal */\n protected _resizeStop(event: MouseEvent): DDResizable {\n const ev = Utils.initEvent(event, { type: 'resizestop', target: this.el });\n // Remove style attr now, so the stop handler can rebuild style attrs\n this._cleanHelper();\n if (this.option.stop) {\n this.option.stop(ev); // Note: ui() not used by gridstack so don't pass\n }\n this.el.classList.remove('ui-resizable-resizing');\n this.triggerEvent('resizestop', ev);\n delete this.startEvent;\n delete this.originalRect;\n delete this.temporalRect;\n delete this.scrollY;\n delete this.scrolled;\n return this;\n }\n\n /** @internal */\n protected _setupHelper(): DDResizable {\n this.elOriginStyleVal = DDResizable._originStyleProp.map(prop => this.el.style[prop]);\n this.parentOriginStylePosition = this.el.parentElement.style.position;\n\n const parent = this.el.parentElement;\n const dragTransform = Utils.getValuesFromTransformedElement(parent);\n this.rectScale = {\n x: dragTransform.xScale,\n y: dragTransform.yScale\n };\n\n if (getComputedStyle(this.el.parentElement).position.match(/static/)) {\n this.el.parentElement.style.position = 'relative';\n }\n this.el.style.position = 'absolute';\n this.el.style.opacity = '0.8';\n return this;\n }\n\n /** @internal */\n protected _cleanHelper(): DDResizable {\n DDResizable._originStyleProp.forEach((prop, i) => {\n this.el.style[prop] = this.elOriginStyleVal[i] || null;\n });\n this.el.parentElement.style.position = this.parentOriginStylePosition || null;\n return this;\n }\n\n /** @internal */\n protected _getChange(event: MouseEvent, dir: string): Rect {\n const oEvent = this.startEvent;\n const newRect = { // Note: originalRect is a complex object, not a simple Rect, so copy out.\n width: this.originalRect.width,\n height: this.originalRect.height + this.scrolled,\n left: this.originalRect.left,\n top: this.originalRect.top - this.scrolled\n };\n\n const offsetX = event.clientX - oEvent.clientX;\n const offsetY = this.sizeToContent ? 0 : event.clientY - oEvent.clientY; // prevent vert resize\n let moveLeft: boolean;\n let moveUp: boolean;\n\n if (dir.indexOf('e') > -1) {\n newRect.width += offsetX;\n } else if (dir.indexOf('w') > -1) {\n newRect.width -= offsetX;\n newRect.left += offsetX;\n moveLeft = true;\n }\n if (dir.indexOf('s') > -1) {\n newRect.height += offsetY;\n } else if (dir.indexOf('n') > -1) {\n newRect.height -= offsetY;\n newRect.top += offsetY\n moveUp = true;\n }\n const constrain = this._constrainSize(newRect.width, newRect.height, moveLeft, moveUp);\n if (Math.round(newRect.width) !== Math.round(constrain.width)) { // round to ignore slight round-off errors\n if (dir.indexOf('w') > -1) {\n newRect.left += newRect.width - constrain.width;\n }\n newRect.width = constrain.width;\n }\n if (Math.round(newRect.height) !== Math.round(constrain.height)) {\n if (dir.indexOf('n') > -1) {\n newRect.top += newRect.height - constrain.height;\n }\n newRect.height = constrain.height;\n }\n return newRect;\n }\n\n /** @internal constrain the size to the set min/max values */\n protected _constrainSize(oWidth: number, oHeight: number, moveLeft: boolean, moveUp: boolean): Size {\n const o = this.option;\n const maxWidth = (moveLeft ? o.maxWidthMoveLeft : o.maxWidth) || Number.MAX_SAFE_INTEGER;\n const minWidth = o.minWidth / this.rectScale.x || oWidth;\n const maxHeight = (moveUp ? o.maxHeightMoveUp : o.maxHeight) || Number.MAX_SAFE_INTEGER;\n const minHeight = o.minHeight / this.rectScale.y || oHeight;\n const width = Math.min(maxWidth, Math.max(minWidth, oWidth));\n const height = Math.min(maxHeight, Math.max(minHeight, oHeight));\n return { width, height };\n }\n\n /** @internal */\n protected _applyChange(): DDResizable {\n let containmentRect = { left: 0, top: 0, width: 0, height: 0 };\n if (this.el.style.position === 'absolute') {\n const containmentEl = this.el.parentElement;\n const { left, top } = containmentEl.getBoundingClientRect();\n containmentRect = { left, top, width: 0, height: 0 };\n }\n if (!this.temporalRect) return this;\n Object.keys(this.temporalRect).forEach(key => {\n const value = this.temporalRect[key];\n const scaleReciprocal = key === 'width' || key === 'left' ? this.rectScale.x : key === 'height' || key === 'top' ? this.rectScale.y : 1;\n this.el.style[key] = (value - containmentRect[key]) * scaleReciprocal + 'px';\n });\n return this;\n }\n\n /** @internal */\n protected _removeHandlers(): DDResizable {\n this.handlers.forEach(handle => handle.destroy());\n delete this.handlers;\n return this;\n }\n\n /** @internal */\n protected _ui = (): DDUIData => {\n const containmentEl = this.el.parentElement;\n const containmentRect = containmentEl.getBoundingClientRect();\n const newRect = { // Note: originalRect is a complex object, not a simple Rect, so copy out.\n width: this.originalRect.width,\n height: this.originalRect.height + this.scrolled,\n left: this.originalRect.left,\n top: this.originalRect.top - this.scrolled\n };\n const rect = this.temporalRect || newRect;\n return {\n position: {\n left: (rect.left - containmentRect.left) * this.rectScale.x,\n top: (rect.top - containmentRect.top) * this.rectScale.y\n },\n size: {\n width: rect.width * this.rectScale.x,\n height: rect.height * this.rectScale.y\n }\n /* Gridstack ONLY needs position set above... keep around in case.\n element: [this.el], // The object representing the element to be resized\n helper: [], // TODO: not support yet - The object representing the helper that's being resized\n originalElement: [this.el],// we don't wrap here, so simplify as this.el //The object representing the original element before it is wrapped\n originalPosition: { // The position represented as { left, top } before the resizable is resized\n left: this.originalRect.left - containmentRect.left,\n top: this.originalRect.top - containmentRect.top\n },\n originalSize: { // The size represented as { width, height } before the resizable is resized\n width: this.originalRect.width,\n height: this.originalRect.height\n }\n */\n };\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/gridstack/dist/dd-touch.d.ts b/node_modules/gridstack/dist/dd-touch.d.ts new file mode 100644 index 000000000..b995bce01 --- /dev/null +++ b/node_modules/gridstack/dist/dd-touch.d.ts @@ -0,0 +1,33 @@ +/** + * touch.ts 12.3.2 + * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license + */ +/** + * Detect touch support - Windows Surface devices and other touch devices + * should we use this instead ? (what we had for always showing resize handles) + * /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) + */ +export declare const isTouch: boolean; +/** + * Handle the touchstart events + * @param {Object} e The widget element's touchstart event + */ +export declare function touchstart(e: TouchEvent): void; +/** + * Handle the touchmove events + * @param {Object} e The document's touchmove event + */ +export declare function touchmove(e: TouchEvent): void; +/** + * Handle the touchend events + * @param {Object} e The document's touchend event + */ +export declare function touchend(e: TouchEvent): void; +/** + * Note we don't get touchenter/touchleave (which are deprecated) + * see https://stackoverflow.com/questions/27908339/js-touch-equivalent-for-mouseenter + * so instead of PointerEvent to still get enter/leave and send the matching mouse event. + */ +export declare function pointerdown(e: PointerEvent): void; +export declare function pointerenter(e: PointerEvent): void; +export declare function pointerleave(e: PointerEvent): void; diff --git a/node_modules/gridstack/dist/dd-touch.js b/node_modules/gridstack/dist/dd-touch.js new file mode 100644 index 000000000..00abdb9f2 --- /dev/null +++ b/node_modules/gridstack/dist/dd-touch.js @@ -0,0 +1,145 @@ +/** + * touch.ts 12.3.2 + * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license + */ +import { DDManager } from './dd-manager'; +import { Utils } from './utils'; +/** + * Detect touch support - Windows Surface devices and other touch devices + * should we use this instead ? (what we had for always showing resize handles) + * /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) + */ +export const isTouch = typeof window !== 'undefined' && typeof document !== 'undefined' && + ('ontouchstart' in document + || 'ontouchstart' in window + // || !!window.TouchEvent // true on Windows 10 Chrome desktop so don't use this + // eslint-disable-next-line @typescript-eslint/no-explicit-any + || (window.DocumentTouch && document instanceof window.DocumentTouch) + || navigator.maxTouchPoints > 0 + // eslint-disable-next-line @typescript-eslint/no-explicit-any + || navigator.msMaxTouchPoints > 0); +// interface TouchCoord {x: number, y: number}; +class DDTouch { +} +/** +* Get the x,y position of a touch event +*/ +// function getTouchCoords(e: TouchEvent): TouchCoord { +// return { +// x: e.changedTouches[0].pageX, +// y: e.changedTouches[0].pageY +// }; +// } +/** + * Simulate a mouse event based on a corresponding touch event + * @param {Object} e A touch event + * @param {String} simulatedType The corresponding mouse event + */ +function simulateMouseEvent(e, simulatedType) { + // Ignore multi-touch events + if (e.touches.length > 1) + return; + // Prevent "Ignored attempt to cancel a touchmove event with cancelable=false" errors + if (e.cancelable) + e.preventDefault(); + // Dispatch the simulated event to the target element + Utils.simulateMouseEvent(e.changedTouches[0], simulatedType); +} +/** + * Simulate a mouse event based on a corresponding Pointer event + * @param {Object} e A pointer event + * @param {String} simulatedType The corresponding mouse event + */ +function simulatePointerMouseEvent(e, simulatedType) { + // Prevent "Ignored attempt to cancel a touchmove event with cancelable=false" errors + if (e.cancelable) + e.preventDefault(); + // Dispatch the simulated event to the target element + Utils.simulateMouseEvent(e, simulatedType); +} +/** + * Handle the touchstart events + * @param {Object} e The widget element's touchstart event + */ +export function touchstart(e) { + // Ignore the event if another widget is already being handled + if (DDTouch.touchHandled) + return; + DDTouch.touchHandled = true; + // Simulate the mouse events + // simulateMouseEvent(e, 'mouseover'); + // simulateMouseEvent(e, 'mousemove'); + simulateMouseEvent(e, 'mousedown'); +} +/** + * Handle the touchmove events + * @param {Object} e The document's touchmove event + */ +export function touchmove(e) { + // Ignore event if not handled by us + if (!DDTouch.touchHandled) + return; + simulateMouseEvent(e, 'mousemove'); +} +/** + * Handle the touchend events + * @param {Object} e The document's touchend event + */ +export function touchend(e) { + // Ignore event if not handled + if (!DDTouch.touchHandled) + return; + // cancel delayed leave event when we release on ourself which happens BEFORE we get this! + if (DDTouch.pointerLeaveTimeout) { + window.clearTimeout(DDTouch.pointerLeaveTimeout); + delete DDTouch.pointerLeaveTimeout; + } + const wasDragging = !!DDManager.dragElement; + // Simulate the mouseup event + simulateMouseEvent(e, 'mouseup'); + // simulateMouseEvent(event, 'mouseout'); + // If the touch interaction did not move, it should trigger a click + if (!wasDragging) { + simulateMouseEvent(e, 'click'); + } + // Unset the flag to allow other widgets to inherit the touch event + DDTouch.touchHandled = false; +} +/** + * Note we don't get touchenter/touchleave (which are deprecated) + * see https://stackoverflow.com/questions/27908339/js-touch-equivalent-for-mouseenter + * so instead of PointerEvent to still get enter/leave and send the matching mouse event. + */ +export function pointerdown(e) { + // console.log("pointer down") + if (e.pointerType === 'mouse') + return; + e.target.releasePointerCapture(e.pointerId); // <- Important! +} +export function pointerenter(e) { + // ignore the initial one we get on pointerdown on ourself + if (!DDManager.dragElement) { + // console.log('pointerenter ignored'); + return; + } + // console.log('pointerenter'); + if (e.pointerType === 'mouse') + return; + simulatePointerMouseEvent(e, 'mouseenter'); +} +export function pointerleave(e) { + // ignore the leave on ourself we get before releasing the mouse over ourself + // by delaying sending the event and having the up event cancel us + if (!DDManager.dragElement) { + // console.log('pointerleave ignored'); + return; + } + if (e.pointerType === 'mouse') + return; + DDTouch.pointerLeaveTimeout = window.setTimeout(() => { + delete DDTouch.pointerLeaveTimeout; + // console.log('pointerleave delayed'); + simulatePointerMouseEvent(e, 'mouseleave'); + }, 10); +} +//# sourceMappingURL=dd-touch.js.map \ No newline at end of file diff --git a/node_modules/gridstack/dist/dd-touch.js.map b/node_modules/gridstack/dist/dd-touch.js.map new file mode 100644 index 000000000..32bdd2b0c --- /dev/null +++ b/node_modules/gridstack/dist/dd-touch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dd-touch.js","sourceRoot":"","sources":["../src/dd-touch.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC;;;;GAIG;AACH,MAAM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AW,KAAK,OAAO;QAAE,OAAO;IACtC,yBAAyB,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,CAAe;IAC1C,6EAA6E;IAC7E,kEAAkE;IAClE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE;QAC1B,uCAAuC;QACvC,OAAO;KACR;IACD,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO;QAAE,OAAO;IACtC,OAAO,CAAC,mBAAmB,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE;QACnD,OAAO,OAAO,CAAC,mBAAmB,CAAC;QACnC,uCAAuC;QACvC,yBAAyB,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;IAC7C,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC","sourcesContent":["/**\n * touch.ts 12.3.2\n * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license\n */\n\nimport { DDManager } from './dd-manager';\nimport { Utils } from './utils';\n\n/**\n * Detect touch support - Windows Surface devices and other touch devices\n * should we use this instead ? (what we had for always showing resize handles)\n * /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)\n */\nexport const isTouch: boolean = typeof window !== 'undefined' && typeof document !== 'undefined' &&\n ( 'ontouchstart' in document\n || 'ontouchstart' in window\n // || !!window.TouchEvent // true on Windows 10 Chrome desktop so don't use this\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n || ((window as any).DocumentTouch && document instanceof (window as any).DocumentTouch)\n || navigator.maxTouchPoints > 0\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n || (navigator as any).msMaxTouchPoints > 0\n );\n\n// interface TouchCoord {x: number, y: number};\n\nclass DDTouch {\n public static touchHandled: boolean;\n public static pointerLeaveTimeout: number;\n}\n\n/**\n* Get the x,y position of a touch event\n*/\n// function getTouchCoords(e: TouchEvent): TouchCoord {\n// return {\n// x: e.changedTouches[0].pageX,\n// y: e.changedTouches[0].pageY\n// };\n// }\n\n/**\n * Simulate a mouse event based on a corresponding touch event\n * @param {Object} e A touch event\n * @param {String} simulatedType The corresponding mouse event\n */\nfunction simulateMouseEvent(e: TouchEvent, simulatedType: string) {\n\n // Ignore multi-touch events\n if (e.touches.length > 1) return;\n\n // Prevent \"Ignored attempt to cancel a touchmove event with cancelable=false\" errors\n if (e.cancelable) e.preventDefault();\n\n // Dispatch the simulated event to the target element\n Utils.simulateMouseEvent(e.changedTouches[0], simulatedType);\n}\n\n/**\n * Simulate a mouse event based on a corresponding Pointer event\n * @param {Object} e A pointer event\n * @param {String} simulatedType The corresponding mouse event\n */\nfunction simulatePointerMouseEvent(e: PointerEvent, simulatedType: string) {\n\n // Prevent \"Ignored attempt to cancel a touchmove event with cancelable=false\" errors\n if (e.cancelable) e.preventDefault();\n\n // Dispatch the simulated event to the target element\n Utils.simulateMouseEvent(e, simulatedType);\n}\n\n\n/**\n * Handle the touchstart events\n * @param {Object} e The widget element's touchstart event\n */\nexport function touchstart(e: TouchEvent): void {\n // Ignore the event if another widget is already being handled\n if (DDTouch.touchHandled) return;\n DDTouch.touchHandled = true;\n\n // Simulate the mouse events\n // simulateMouseEvent(e, 'mouseover');\n // simulateMouseEvent(e, 'mousemove');\n simulateMouseEvent(e, 'mousedown');\n}\n\n/**\n * Handle the touchmove events\n * @param {Object} e The document's touchmove event\n */\nexport function touchmove(e: TouchEvent): void {\n // Ignore event if not handled by us\n if (!DDTouch.touchHandled) return;\n\n simulateMouseEvent(e, 'mousemove');\n}\n\n/**\n * Handle the touchend events\n * @param {Object} e The document's touchend event\n */\nexport function touchend(e: TouchEvent): void {\n\n // Ignore event if not handled\n if (!DDTouch.touchHandled) return;\n\n // cancel delayed leave event when we release on ourself which happens BEFORE we get this!\n if (DDTouch.pointerLeaveTimeout) {\n window.clearTimeout(DDTouch.pointerLeaveTimeout);\n delete DDTouch.pointerLeaveTimeout;\n }\n\n const wasDragging = !!DDManager.dragElement;\n\n // Simulate the mouseup event\n simulateMouseEvent(e, 'mouseup');\n // simulateMouseEvent(event, 'mouseout');\n\n // If the touch interaction did not move, it should trigger a click\n if (!wasDragging) {\n simulateMouseEvent(e, 'click');\n }\n\n // Unset the flag to allow other widgets to inherit the touch event\n DDTouch.touchHandled = false;\n}\n\n/**\n * Note we don't get touchenter/touchleave (which are deprecated)\n * see https://stackoverflow.com/questions/27908339/js-touch-equivalent-for-mouseenter\n * so instead of PointerEvent to still get enter/leave and send the matching mouse event.\n */\nexport function pointerdown(e: PointerEvent): void {\n // console.log(\"pointer down\")\n if (e.pointerType === 'mouse') return;\n (e.target as HTMLElement).releasePointerCapture(e.pointerId) // <- Important!\n}\n\nexport function pointerenter(e: PointerEvent): void {\n // ignore the initial one we get on pointerdown on ourself\n if (!DDManager.dragElement) {\n // console.log('pointerenter ignored');\n return;\n }\n // console.log('pointerenter');\n if (e.pointerType === 'mouse') return;\n simulatePointerMouseEvent(e, 'mouseenter');\n}\n\nexport function pointerleave(e: PointerEvent): void {\n // ignore the leave on ourself we get before releasing the mouse over ourself\n // by delaying sending the event and having the up event cancel us\n if (!DDManager.dragElement) {\n // console.log('pointerleave ignored');\n return;\n }\n if (e.pointerType === 'mouse') return;\n DDTouch.pointerLeaveTimeout = window.setTimeout(() => {\n delete DDTouch.pointerLeaveTimeout;\n // console.log('pointerleave delayed');\n simulatePointerMouseEvent(e, 'mouseleave');\n }, 10);\n}\n\n"]} \ No newline at end of file diff --git a/node_modules/gridstack/dist/gridstack-all.js b/node_modules/gridstack/dist/gridstack-all.js new file mode 100644 index 000000000..9afc9eb1e --- /dev/null +++ b/node_modules/gridstack/dist/gridstack-all.js @@ -0,0 +1,3 @@ +/*! For license information please see gridstack-all.js.LICENSE.txt */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.GridStack=t():e.GridStack=t()}(self,(()=>(()=>{"use strict";var e={d:(t,i)=>{for(var s in i)e.o(i,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:i[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{GridStack:()=>x});class i{static getElements(e,t=document){if("string"==typeof e){const i="getElementById"in t?t:void 0;if(i&&!isNaN(+e[0])){const t=i.getElementById(e);return t?[t]:[]}let s=t.querySelectorAll(e);return s.length||"."===e[0]||"#"===e[0]||(s=t.querySelectorAll("."+e),s.length||(s=t.querySelectorAll("#"+e))),Array.from(s)}return[e]}static getElement(e,t=document){if("string"==typeof e){const i="getElementById"in t?t:void 0;if(!e.length)return null;if(i&&"#"===e[0])return i.getElementById(e.substring(1));if("#"===e[0]||"."===e[0]||"["===e[0])return t.querySelector(e);if(i&&!isNaN(+e[0]))return i.getElementById(e);let s=t.querySelector(e);return i&&!s&&(s=i.getElementById(e)),s||(s=t.querySelector("."+e)),s}return e}static lazyLoad(e){return e.lazyLoad||e.grid?.opts?.lazyLoad&&!1!==e.lazyLoad}static createDiv(e,t){const i=document.createElement("div");return e.forEach((e=>{e&&i.classList.add(e)})),t?.appendChild(i),i}static shouldSizeToContent(e,t=!1){return e?.grid&&(t?!0===e.sizeToContent||!0===e.grid.opts.sizeToContent&&void 0===e.sizeToContent:!!e.sizeToContent||e.grid.opts.sizeToContent&&!1!==e.sizeToContent)}static isIntercepted(e,t){return!(e.y>=t.y+t.h||e.y+e.h<=t.y||e.x+e.w<=t.x||e.x>=t.x+t.w)}static isTouching(e,t){return i.isIntercepted(e,{x:t.x-.5,y:t.y-.5,w:t.w+1,h:t.h+1})}static areaIntercept(e,t){const i=e.x>t.x?e.x:t.x,s=e.x+e.wt.y?e.y:t.y,n=e.y+e.h{const o=t*((e.y??i)-(s.y??i));return 0===o?t*((e.x??i)-(s.x??i)):o}))}static find(e,t){return t?e.find((e=>e.id===t)):void 0}static toBool(e){return"boolean"==typeof e?e:"string"==typeof e?!(""===(e=e.toLowerCase())||"no"===e||"false"===e||"0"===e):Boolean(e)}static toNumber(e){return null===e||0===e.length?void 0:Number(e)}static parseHeight(e){let t,i="px";if("string"==typeof e)if("auto"===e||""===e)t=0;else{const s=e.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);if(!s)throw new Error(`Invalid height val = ${e}`);i=s[2]||"px",t=parseFloat(s[1])}else t=e;return{h:t,unit:i}}static defaults(e,...t){return t.forEach((t=>{for(const s in t){if(!t.hasOwnProperty(s))return;null===e[s]||void 0===e[s]?e[s]=t[s]:"object"==typeof t[s]&&"object"==typeof e[s]&&i.defaults(e[s],t[s])}})),e}static same(e,t){if("object"!=typeof e)return e==t;if(typeof e!=typeof t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(e[i]!==t[i])return!1;return!0}static copyPos(e,t,i=!1){return void 0!==t.x&&(e.x=t.x),void 0!==t.y&&(e.y=t.y),void 0!==t.w&&(e.w=t.w),void 0!==t.h&&(e.h=t.h),i&&(t.minW&&(e.minW=t.minW),t.minH&&(e.minH=t.minH),t.maxW&&(e.maxW=t.maxW),t.maxH&&(e.maxH=t.maxH)),e}static samePos(e,t){return e&&t&&e.x===t.x&&e.y===t.y&&(e.w||1)===(t.w||1)&&(e.h||1)===(t.h||1)}static sanitizeMinMax(e){e.minW||delete e.minW,e.minH||delete e.minH,e.maxW||delete e.maxW,e.maxH||delete e.maxH}static removeInternalAndSame(e,t){if("object"==typeof e&&"object"==typeof t&&!Array.isArray(e)&&!Array.isArray(t))for(let s in e){const o=e[s],n=t[s];"_"===s[0]||o===n?delete e[s]:o&&"object"==typeof o&&void 0!==n&&(i.removeInternalAndSame(o,n),Object.keys(o).length||delete e[s])}}static removeInternalForSave(e,t=!0){for(let t in e)"_"!==t[0]&&null!==e[t]&&void 0!==e[t]||delete e[t];delete e.grid,t&&delete e.el,e.autoPosition||delete e.autoPosition,e.noResize||delete e.noResize,e.noMove||delete e.noMove,e.locked||delete e.locked,1!==e.w&&e.w!==e.minW||delete e.w,1!==e.h&&e.h!==e.minH||delete e.h}static throttle(e,t){let i=!1;return(...s)=>{i||(i=!0,setTimeout((()=>{e(...s),i=!1}),t))}}static removePositioningStyles(e){const t=e.style;t.position&&t.removeProperty("position"),t.left&&t.removeProperty("left"),t.top&&t.removeProperty("top"),t.width&&t.removeProperty("width"),t.height&&t.removeProperty("height")}static getScrollElement(e){if(!e)return document.scrollingElement||document.documentElement;const t=getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowY)?e:i.getScrollElement(e.parentElement)}static updateScrollPosition(e,t,s){const o=i.getScrollElement(e);if(!o)return;const n=e.getBoundingClientRect(),r=o.getBoundingClientRect(),a=window.innerHeight||document.documentElement.clientHeight,h=n.bottom-Math.min(r.bottom,a),l=n.top-Math.max(r.top,0),d=o.scrollTop;l<0&&s<0?e.offsetHeight>r.height?o.scrollTop+=s:o.scrollTop+=Math.abs(l)>Math.abs(s)?s:l:h>0&&s>0&&(e.offsetHeight>r.height?o.scrollTop+=s:o.scrollTop+=h>s?s:h),t.top+=o.scrollTop-d}static updateScrollResize(e,t,s){const o=i.getScrollElement(t),n=o.clientHeight,r=o===i.getScrollElement()?0:o.getBoundingClientRect().top,a=e.clientY-r,h=a>n-s;ae===o))&&(s[o]=i.cloneDeep(e[o]));return s}static cloneNode(e){const t=e.cloneNode(!0);return t.removeAttribute("id"),t}static appendTo(e,t){let s;s="string"==typeof t?i.getElement(t):t,s&&s.appendChild(e)}static addElStyles(e,t){if(t instanceof Object)for(const i in t)t.hasOwnProperty(i)&&(Array.isArray(t[i])?t[i].forEach((t=>{e.style[i]=t})):e.style[i]=t[i])}static initEvent(e,t){const i={type:t.type},s={button:0,which:0,buttons:1,bubbles:!0,cancelable:!0,target:t.target?t.target:e.target};return["altKey","ctrlKey","metaKey","shiftKey"].forEach((t=>i[t]=e[t])),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach((t=>i[t]=e[t])),{...i,...s}}static simulateMouseEvent(e,t,i){const s=e,o=new MouseEvent(t,{bubbles:!0,composed:!0,cancelable:!0,view:window,detail:1,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,ctrlKey:s.ctrlKey??!1,altKey:s.altKey??!1,shiftKey:s.shiftKey??!1,metaKey:s.metaKey??!1,button:0,relatedTarget:e.target});(i||e.target).dispatchEvent(o)}static getValuesFromTransformedElement(e){const t=document.createElement("div");i.addElStyles(t,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),e.appendChild(t);const s=t.getBoundingClientRect();return e.removeChild(t),t.remove(),{xScale:1/s.width,yScale:1/s.height,xOffset:s.left,yOffset:s.top}}static swap(e,t,i){if(!e)return;const s=e[t];e[t]=e[i],e[i]=s}static canBeRotated(e){return!(!e||e.w===e.h||e.locked||e.noResize||e.grid?.opts.disableResize||e.minW&&e.minW===e.maxW||e.minH&&e.minH===e.maxH)}}class s{constructor(e={}){this.addedNodes=[],this.removedNodes=[],this.defaultColumn=12,this.column=e.column||this.defaultColumn,this.column>this.defaultColumn&&(this.defaultColumn=this.column),this.maxRow=e.maxRow,this._float=e.float,this.nodes=e.nodes||[],this.onChange=e.onChange}batchUpdate(e=!0,t=!0){return!!this.batchMode===e||(this.batchMode=e,e?(this._prevFloat=this._float,this._float=!0,this.cleanNodes(),this.saveInitial()):(this._float=this._prevFloat,delete this._prevFloat,t&&this._packNodes(),this._notify())),this}_useEntireRowArea(e,t){return(!this.float||this.batchMode&&!this._prevFloat)&&!this._hasLocked&&(!e._moving||e._skipDown||t.y<=e.y)}_fixCollisions(e,t=e,s,o={}){if(this.sortNodes(-1),!(s=s||this.collide(e,t)))return!1;if(e._moving&&!o.nested&&!this.float&&this.swap(e,s))return!0;let n=t;!this._loading&&this._useEntireRowArea(e,t)&&(n={x:0,w:this.column,y:t.y,h:t.h},s=this.collide(e,n,o.skip));let r=!1;const a={nested:!0,pack:!1};let h=0;for(;s=s||this.collide(e,n,o.skip);){if(h++>2*this.nodes.length)throw new Error("Infinite collide check");let n;if(s.locked||this._loading||e._moving&&!e._skipDown&&t.y>e.y&&!this.float&&(!this.collide(s,{...s,y:e.y},e)||!this.collide(s,{...s,y:t.y-s.h},e))){e._skipDown=e._skipDown||t.y>e.y;const h={...t,y:s.y+s.h,...a};n=!(!this._loading||!i.samePos(e,h))||this.moveNode(e,h),(s.locked||this._loading)&&n?i.copyPos(t,e):!s.locked&&n&&o.pack&&(this._packNodes(),t.y=s.y+s.h,i.copyPos(e,t)),r=r||n}else n=this.moveNode(s,{...s,y:t.y+t.h,skip:e,...a});if(!n)return r;s=void 0}return r}collide(e,t=e,s){const o=e._id,n=s?._id;return this.nodes.find((e=>e._id!==o&&e._id!==n&&i.isIntercepted(e,t)))}collideAll(e,t=e,s){const o=e._id,n=s?._id;return this.nodes.filter((e=>e._id!==o&&e._id!==n&&i.isIntercepted(e,t)))}directionCollideCoverage(e,t,i){if(!t.rect||!e._rect)return;const s=e._rect,o={...t.rect};let n;o.y>s.y?(o.h+=o.y-s.y,o.y=s.y):o.h+=s.y-o.y,o.x>s.x?(o.w+=o.x-s.x,o.x=s.x):o.w+=s.x-o.x;let r=.5;for(let e of i){if(e.locked||!e._rect)break;const t=e._rect;let i=Number.MAX_VALUE,a=Number.MAX_VALUE;s.yt.y+t.h&&(i=(t.y+t.h-o.y)/t.h),s.xt.x+t.w&&(a=(t.x+t.w-o.x)/t.w);const h=Math.min(a,i);h>r&&(r=h,n=e)}return t.collide=n,n}cacheRects(e,t,i,s,o,n){return this.nodes.forEach((r=>r._rect={y:r.y*t+i,x:r.x*e+n,w:r.w*e-n-s,h:r.h*t-i-o})),this}swap(e,t){if(!t||t.locked||!e||e.locked)return!1;function s(){const i=t.x,s=t.y;return t.x=e.x,t.y=e.y,e.h!=t.h?(e.x=i,e.y=t.y+t.h):e.w!=t.w?(e.x=t.x+t.w,e.y=s):(e.x=i,e.y=s),e._dirty=t._dirty=!0,!0}let o;if(e.w===t.w&&e.h===t.h&&(e.x===t.x||e.y===t.y)&&(o=i.isTouching(e,t)))return s();if(!1!==o){if(e.w===t.w&&e.x===t.x&&(o||(o=i.isTouching(e,t)))){if(t.y{let o;t.locked||(t.autoPosition=!0,"list"===e&&i&&(o=s[i-1])),this.addNode(t,!1,o)})),s||delete this._inColumnResize,i||this.batchUpdate(!1),this}set float(e){this._float!==e&&(this._float=e||!1,e||this._packNodes()._notify())}get float(){return this._float||!1}sortNodes(e=1){return this.nodes=i.sort(this.nodes,e),this}_packNodes(){return this.batchMode||(this.sortNodes(),this.float?this.nodes.forEach((e=>{if(e._updating||void 0===e._orig||e.y===e._orig.y)return;let t=e.y;for(;t>e._orig.y;)--t,this.collide(e,{x:e.x,y:t,w:e.w,h:e.h})||(e._dirty=!0,e.y=t)})):this.nodes.forEach(((e,t)=>{if(!e.locked)for(;e.y>0;){const i=0===t?0:e.y-1;if(0!==t&&this.collide(e,{x:e.x,y:i,w:e.w,h:e.h}))break;e._dirty=e.y!==i,e.y=i}}))),this}prepareNode(e,t){e._id=e._id??s._idSeq++;const o=e.id;if(o){let t=1;for(;this.nodes.find((t=>t.id===e.id&&t!==e));)e.id=o+"_"+t++}void 0!==e.x&&void 0!==e.y&&null!==e.x&&null!==e.y||(e.autoPosition=!0);const n={x:0,y:0,w:1,h:1};return i.defaults(e,n),e.autoPosition||delete e.autoPosition,e.noResize||delete e.noResize,e.noMove||delete e.noMove,i.sanitizeMinMax(e),"string"==typeof e.x&&(e.x=Number(e.x)),"string"==typeof e.y&&(e.y=Number(e.y)),"string"==typeof e.w&&(e.w=Number(e.w)),"string"==typeof e.h&&(e.h=Number(e.h)),isNaN(e.x)&&(e.x=n.x,e.autoPosition=!0),isNaN(e.y)&&(e.y=n.y,e.autoPosition=!0),isNaN(e.w)&&(e.w=n.w),isNaN(e.h)&&(e.h=n.h),this.nodeBoundFix(e,t),e}nodeBoundFix(e,t){const s=e._orig||i.copyPos({},e);if(e.maxW&&(e.w=Math.min(e.w||1,e.maxW)),e.maxH&&(e.h=Math.min(e.h||1,e.maxH)),e.minW&&(e.w=Math.max(e.w||1,e.minW)),e.minH&&(e.h=Math.max(e.h||1,e.minH)),(e.x||0)+(e.w||1)>this.column&&this.columnthis.column?e.w=this.column:e.w<1&&(e.w=1),this.maxRow&&e.h>this.maxRow?e.h=this.maxRow:e.h<1&&(e.h=1),e.x<0&&(e.x=0),e.y<0&&(e.y=0),e.x+e.w>this.column&&(t?e.w=this.column-e.x:e.x=this.column-e.w),this.maxRow&&e.y+e.h>this.maxRow&&(t?e.h=this.maxRow-e.y:e.y=this.maxRow-e.h),i.samePos(e,s)||(e._dirty=!0),this}getDirtyNodes(e){return e?this.nodes.filter((e=>e._dirty&&!i.samePos(e,e._orig))):this.nodes.filter((e=>e._dirty))}_notify(e){if(this.batchMode||!this.onChange)return this;const t=(e||[]).concat(this.getDirtyNodes());return this.onChange(t),this}cleanNodes(){return this.batchMode||this.nodes.forEach((e=>{delete e._dirty,delete e._lastTried})),this}saveInitial(){return this.nodes.forEach((e=>{e._orig=i.copyPos({},e),delete e._dirty})),this._hasLocked=this.nodes.some((e=>e.locked)),this}restoreInitial(){return this.nodes.forEach((e=>{e._orig&&!i.samePos(e,e._orig)&&(i.copyPos(e,e._orig),e._dirty=!0)})),this._notify(),this}findEmptyPosition(e,t=this.nodes,s=this.column,o){let n=!1;for(let r=o?o.y*s+(o.x+o.w):0;!n;++r){const o=r%s,a=Math.floor(r/s);if(o+e.w>s)continue;const h={x:o,y:a,w:e.w,h:e.h};t.find((e=>i.isIntercepted(h,e)))||(e.x===o&&e.y===a||(e._dirty=!0),e.x=o,e.y=a,delete e.autoPosition,n=!0)}return n}addNode(e,t=!1,i){const s=this.nodes.find((t=>t._id===e._id));if(s)return s;let o;return this._inColumnResize?this.nodeBoundFix(e):this.prepareNode(e),delete e._temporaryRemoved,delete e._removeDOM,e.autoPosition&&this.findEmptyPosition(e,this.nodes,this.column,i)&&(delete e.autoPosition,o=!0),this.nodes.push(e),t&&this.addedNodes.push(e),o||this._fixCollisions(e),this.batchMode||this._packNodes()._notify(),e}removeNode(e,t=!0,i=!1){return this.nodes.find((t=>t._id===e._id))?(i&&this.removedNodes.push(e),t&&(e._removeDOM=!0),this.nodes=this.nodes.filter((t=>t._id!==e._id)),e._isAboutToRemove||this._packNodes(),this._notify([e]),this):this}removeAll(e=!0,t=!0){if(delete this._layouts,!this.nodes.length)return this;e&&this.nodes.forEach((e=>e._removeDOM=!0));const i=this.nodes;return this.removedNodes=t?i:[],this.nodes=[],this._notify(i)}moveNodeCheck(e,t){if(!this.changedPosConstrain(e,t))return!1;if(t.pack=!0,!this.maxRow)return this.moveNode(e,t);let o;const n=new s({column:this.column,float:this.float,nodes:this.nodes.map((t=>t._id===e._id?(o={...t},o):{...t}))});if(!o)return!1;const r=n.moveNode(o,t)&&n.getRow()<=Math.max(this.getRow(),this.maxRow);if(!r&&!t.resizing&&t.collide){const i=t.collide.el.gridstackNode;if(this.swap(e,i))return this._notify(),!0}return!!r&&(n.nodes.filter((e=>e._dirty)).forEach((e=>{const t=this.nodes.find((t=>t._id===e._id));t&&(i.copyPos(t,e),t._dirty=!0)})),this._notify(),!0)}willItFit(e){if(delete e._willFitPos,!this.maxRow)return!0;const t=new s({column:this.column,float:this.float,nodes:this.nodes.map((e=>({...e})))}),o={...e};return this.cleanupNode(o),delete o.el,delete o._id,delete o.content,delete o.grid,t.addNode(o),t.getRow()<=this.maxRow&&(e._willFitPos=i.copyPos({},o),!0)}changedPosConstrain(e,t){return t.w=t.w||e.w,t.h=t.h||e.h,e.x!==t.x||e.y!==t.y||(e.maxW&&(t.w=Math.min(t.w,e.maxW)),e.maxH&&(t.h=Math.min(t.h,e.maxH)),e.minW&&(t.w=Math.max(t.w,e.minW)),e.minH&&(t.h=Math.max(t.h,e.minH)),e.w!==t.w||e.h!==t.h)}moveNode(e,t){if(!e||!t)return!1;let s;void 0!==t.pack||this.batchMode||(s=t.pack=!0),"number"!=typeof t.x&&(t.x=e.x),"number"!=typeof t.y&&(t.y=e.y),"number"!=typeof t.w&&(t.w=e.w),"number"!=typeof t.h&&(t.h=e.h);const o=e.w!==t.w||e.h!==t.h,n=i.copyPos({},e,!0);if(i.copyPos(n,t),this.nodeBoundFix(n,o),i.copyPos(t,n),!t.forceCollide&&i.samePos(e,t))return!1;const r=i.copyPos({},e),a=this.collideAll(e,n,t.skip);let h=!0;if(a.length){const o=e._moving&&!t.nested;let r=o?this.directionCollideCoverage(e,t,a):a[0];if(o&&r&&e.grid?.opts?.subGridDynamic&&!e.grid._isTemp){const s=i.areaIntercept(t.rect,r._rect),o=i.area(t.rect),n=i.area(r._rect);s/(o.8&&(r.grid.makeSubGrid(r.el,void 0,e),r=void 0)}r?h=!this._fixCollisions(e,n,r,t):(h=!1,s&&delete t.pack)}return h&&!i.samePos(e,n)&&(e._dirty=!0,i.copyPos(e,n)),t.pack&&this._packNodes()._notify(),!i.samePos(e,r)}getRow(){return this.nodes.reduce(((e,t)=>Math.max(e,t.y+t.h)),0)}beginUpdate(e){return e._updating||(e._updating=!0,delete e._skipDown,this.batchMode||this.saveInitial()),this}endUpdate(){const e=this.nodes.find((e=>e._updating));return e&&(delete e._updating,delete e._skipDown),this}save(e=!0,t,s){const o=this._layouts?.length||0;let n;o&&(s?s!==this.column&&(n=this._layouts[s]):this.column!==o-1&&(n=this._layouts[o-1]));const r=[];return this.sortNodes(),this.nodes.forEach((s=>{const o=n?.find((e=>e._id===s._id)),a={...s,...o||{}};i.removeInternalForSave(a,!e),t&&t(s,a),r.push(a)})),r}layoutsNodesChange(e){return!this._layouts||this._inColumnResize||this._layouts.forEach(((t,i)=>{if(!t||i===this.column)return this;if(i{if(!e._orig)return;const i=t.find((t=>t._id===e._id));i&&(i.y>=0&&e.y!==e._orig.y&&(i.y+=e.y-e._orig.y),e.x!==e._orig.x&&(i.x=Math.round(e.x*s)),e.w!==e._orig.w&&(i.w=Math.round(e.w*s)))}))}})),this}columnChanged(e,t,s="moveScale"){if(!this.nodes.length||!t||e===t)return this;const o="compact"===s||"list"===s;o&&this.sortNodes(1),te&&this._layouts){const i=this._layouts[t]||[],s=this._layouts.length-1;!i.length&&e!==s&&this._layouts[s]?.length&&(e=s,this._layouts[s].forEach((e=>{const t=r.find((t=>t._id===e._id));t&&(o||e.autoPosition||(t.x=e.x??t.x,t.y=e.y??t.y),t.w=e.w??t.w,null!=e.x&&void 0!==e.y||(t.autoPosition=!0))}))),i.forEach((e=>{const t=r.findIndex((t=>t._id===e._id));if(-1!==t){const i=r[t];if(o)return void(i.w=e.w);(e.autoPosition||isNaN(e.x)||isNaN(e.y))&&this.findEmptyPosition(e,n),e.autoPosition||(i.x=e.x??i.x,i.y=e.y??i.y,i.w=e.w??i.w,n.push(i)),r.splice(t,1)}}))}if(o)this.compact(s,!1);else{if(r.length)if("function"==typeof s)s(t,e,n,r);else{const i=o||"none"===s?1:t/e,a="move"===s||"moveScale"===s,h="scale"===s||"moveScale"===s;r.forEach((s=>{s.x=1===t?0:a?Math.round(s.x*i):Math.min(s.x,t-1),s.w=1===t||1===e?1:h?Math.round(s.w*i)||1:Math.min(s.w,t),n.push(s)})),r=[]}n=i.sort(n,-1),this._inColumnResize=!0,this.nodes=[],n.forEach((e=>{this.addNode(e,!1),delete e._orig}))}return this.nodes.forEach((e=>delete e._orig)),this.batchUpdate(!1,!o),delete this._inColumnResize,this}cacheLayout(e,t,i=!1){const o=[];return e.forEach(((e,t)=>{if(void 0===e._id){const t=e.id?this.nodes.find((t=>t.id===e.id)):void 0;e._id=t?._id??s._idSeq++}o[t]={x:e.x,y:e.y,w:e.w,_id:e._id}})),this._layouts=i?[]:this._layouts||[],this._layouts[t]=o,this}cacheOneLayout(e,t){e._id=e._id??s._idSeq++;const i={x:e.x,y:e.y,w:e.w,_id:e._id};(e.autoPosition||void 0===e.x)&&(delete i.x,delete i.y,e.autoPosition&&(i.autoPosition=!0)),this._layouts=this._layouts||[],this._layouts[t]=this._layouts[t]||[];const o=this.findCacheLayout(e,t);return-1===o?this._layouts[t].push(i):this._layouts[t][o]=i,this}findCacheLayout(e,t){return this._layouts?.[t]?.findIndex((t=>t._id===e._id))??-1}removeNodeFromLayoutCache(e){if(this._layouts)for(let t=0;t0||navigator.msMaxTouchPoints>0);class a{}function h(e,t){e.touches.length>1||(e.cancelable&&e.preventDefault(),i.simulateMouseEvent(e.changedTouches[0],t))}function l(e,t){e.cancelable&&e.preventDefault(),i.simulateMouseEvent(e,t)}function d(e){a.touchHandled||(a.touchHandled=!0,h(e,"mousedown"))}function c(e){a.touchHandled&&h(e,"mousemove")}function g(e){if(!a.touchHandled)return;a.pointerLeaveTimeout&&(window.clearTimeout(a.pointerLeaveTimeout),delete a.pointerLeaveTimeout);const t=!!n.dragElement;h(e,"mouseup"),t||h(e,"click"),a.touchHandled=!1}function u(e){"mouse"!==e.pointerType&&e.target.releasePointerCapture(e.pointerId)}function p(e){n.dragElement&&"mouse"!==e.pointerType&&l(e,"mouseenter")}function m(e){n.dragElement&&"mouse"!==e.pointerType&&(a.pointerLeaveTimeout=window.setTimeout((()=>{delete a.pointerLeaveTimeout,l(e,"mouseleave")}),10))}class f{constructor(e,t,i){this.host=e,this.dir=t,this.option=i,this.moving=!1,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this._init()}_init(){const e=this.el=document.createElement("div");return e.classList.add("ui-resizable-handle"),e.classList.add(`${f.prefix}${this.dir}`),e.style.zIndex="100",e.style.userSelect="none",this.host.appendChild(this.el),this.el.addEventListener("mousedown",this._mouseDown),r&&(this.el.addEventListener("touchstart",d),this.el.addEventListener("pointerdown",u)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),r&&(this.el.removeEventListener("touchstart",d),this.el.removeEventListener("pointerdown",u)),this.host.removeChild(this.el),delete this.el,delete this.host,this}_mouseDown(e){this.mouseDownEvent=e,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),r&&(this.el.addEventListener("touchmove",c),this.el.addEventListener("touchend",g)),e.stopPropagation(),e.preventDefault()}_mouseMove(e){const t=this.mouseDownEvent;this.moving?this._triggerEvent("move",e):Math.abs(e.x-t.x)+Math.abs(e.y-t.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",e),document.addEventListener("keydown",this._keyEvent)),e.stopPropagation()}_mouseUp(e){this.moving&&(this._triggerEvent("stop",e),document.removeEventListener("keydown",this._keyEvent)),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),r&&(this.el.removeEventListener("touchmove",c),this.el.removeEventListener("touchend",g)),delete this.moving,delete this.mouseDownEvent,e.stopPropagation(),e.preventDefault()}_keyEvent(e){"Escape"===e.key&&(this.host.gridstackNode?.grid?.engine.restoreInitial(),this._mouseUp(this.mouseDownEvent))}_triggerEvent(e,t){return this.option[e]&&this.option[e](t),this}}f.prefix="ui-resizable-";class v{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(e,t){this._eventRegister[e]=t}off(e){delete this._eventRegister[e]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){delete this._eventRegister}triggerEvent(e,t){if(!this.disabled&&this._eventRegister&&this._eventRegister[e])return this._eventRegister[e](t)}}class _ extends v{constructor(e,t={}){super(),this.el=e,this.option=t,this.rectScale={x:1,y:1},this._ui=()=>{const e=this.el.parentElement.getBoundingClientRect(),t={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},i=this.temporalRect||t;return{position:{left:(i.left-e.left)*this.rectScale.x,top:(i.top-e.top)*this.rectScale.y},size:{width:i.width*this.rectScale.x,height:i.height*this.rectScale.y}}},this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(this.option.autoHide),this._setupHandlers()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){super.enable(),this.el.classList.remove("ui-resizable-disabled"),this._setupAutoHide(this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),delete this.el,super.destroy()}updateOption(e){const t=e.handles&&e.handles!==this.option.handles,i=e.autoHide&&e.autoHide!==this.option.autoHide;return Object.keys(e).forEach((t=>this.option[t]=e[t])),t&&(this._removeHandlers(),this._setupHandlers()),i&&this._setupAutoHide(this.option.autoHide),this}_setupAutoHide(e){return e?(this.el.classList.add("ui-resizable-autohide"),this.el.addEventListener("mouseover",this._mouseOver),this.el.addEventListener("mouseout",this._mouseOut)):(this.el.classList.remove("ui-resizable-autohide"),this.el.removeEventListener("mouseover",this._mouseOver),this.el.removeEventListener("mouseout",this._mouseOut),n.overResizeElement===this&&delete n.overResizeElement),this}_mouseOver(e){n.overResizeElement||n.dragElement||(n.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(e){n.overResizeElement===this&&(delete n.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){return this.handlers=this.option.handles.split(",").map((e=>e.trim())).map((e=>new f(this.el,e,{start:e=>{this._resizeStart(e)},stop:e=>{this._resizeStop(e)},move:t=>{this._resizing(t,e)}}))),this}_resizeStart(e){this.sizeToContent=i.shouldSizeToContent(this.el.gridstackNode,!0),this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=i.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=e,this._setupHelper(),this._applyChange();const t=i.initEvent(e,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(t,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",t),this}_resizing(e,t){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(e,t),this._applyChange();const s=i.initEvent(e,{type:"resize",target:this.el});return this.option.resize&&this.option.resize(s,this._ui()),this.triggerEvent("resize",s),this}_resizeStop(e){const t=i.initEvent(e,{type:"resizestop",target:this.el});return this._cleanHelper(),this.option.stop&&this.option.stop(t),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",t),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){this.elOriginStyleVal=_._originStyleProp.map((e=>this.el.style[e])),this.parentOriginStylePosition=this.el.parentElement.style.position;const e=this.el.parentElement,t=i.getValuesFromTransformedElement(e);return this.rectScale={x:t.xScale,y:t.yScale},getComputedStyle(this.el.parentElement).position.match(/static/)&&(this.el.parentElement.style.position="relative"),this.el.style.position="absolute",this.el.style.opacity="0.8",this}_cleanHelper(){return _._originStyleProp.forEach(((e,t)=>{this.el.style[e]=this.elOriginStyleVal[t]||null})),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(e,t){const i=this.startEvent,s={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},o=e.clientX-i.clientX,n=this.sizeToContent?0:e.clientY-i.clientY;let r,a;t.indexOf("e")>-1?s.width+=o:t.indexOf("w")>-1&&(s.width-=o,s.left+=o,r=!0),t.indexOf("s")>-1?s.height+=n:t.indexOf("n")>-1&&(s.height-=n,s.top+=n,a=!0);const h=this._constrainSize(s.width,s.height,r,a);return Math.round(s.width)!==Math.round(h.width)&&(t.indexOf("w")>-1&&(s.left+=s.width-h.width),s.width=h.width),Math.round(s.height)!==Math.round(h.height)&&(t.indexOf("n")>-1&&(s.top+=s.height-h.height),s.height=h.height),s}_constrainSize(e,t,i,s){const o=this.option,n=(i?o.maxWidthMoveLeft:o.maxWidth)||Number.MAX_SAFE_INTEGER,r=o.minWidth/this.rectScale.x||e,a=(s?o.maxHeightMoveUp:o.maxHeight)||Number.MAX_SAFE_INTEGER,h=o.minHeight/this.rectScale.y||t;return{width:Math.min(n,Math.max(r,e)),height:Math.min(a,Math.max(h,t))}}_applyChange(){let e={left:0,top:0,width:0,height:0};if("absolute"===this.el.style.position){const t=this.el.parentElement,{left:i,top:s}=t.getBoundingClientRect();e={left:i,top:s,width:0,height:0}}return this.temporalRect?(Object.keys(this.temporalRect).forEach((t=>{const i=this.temporalRect[t],s="width"===t||"left"===t?this.rectScale.x:"height"===t||"top"===t?this.rectScale.y:1;this.el.style[t]=(i-e[t])*s+"px"})),this):this}_removeHandlers(){return this.handlers.forEach((e=>e.destroy())),delete this.handlers,this}}_._originStyleProp=["width","height","position","left","top","opacity","zIndex"];class y extends v{constructor(e,t={}){super(),this.el=e,this.option=t,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0};const i=t?.handle?.substring(1),s=e.gridstackNode;this.dragEls=!i||e.classList.contains(i)?[e]:s?.subGrid?[e.querySelector(t.handle)||e]:Array.from(e.querySelectorAll(t.handle)),0===this.dragEls.length&&(this.dragEls=[e]),this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this.enable()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){!1!==this.disabled&&(super.enable(),this.dragEls.forEach((e=>{e.addEventListener("mousedown",this._mouseDown),r&&(e.addEventListener("touchstart",d),e.addEventListener("pointerdown",u))})),this.el.classList.remove("ui-draggable-disabled"))}disable(e=!1){!0!==this.disabled&&(super.disable(),this.dragEls.forEach((e=>{e.removeEventListener("mousedown",this._mouseDown),r&&(e.removeEventListener("touchstart",d),e.removeEventListener("pointerdown",u))})),e||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.mouseDownEvent&&this._mouseUp(this.mouseDownEvent),this.disable(!0),delete this.el,delete this.helper,delete this.option,super.destroy()}updateOption(e){return Object.keys(e).forEach((t=>this.option[t]=e[t])),this}_mouseDown(e){if(!n.mouseHandled)return 0!==e.button||!this.dragEls.find((t=>t===e.target))&&e.target.closest('input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle')||this.option.cancel&&e.target.closest(this.option.cancel)||(this.mouseDownEvent=e,delete this.dragging,delete n.dragElement,delete n.dropElement,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),r&&(e.currentTarget.addEventListener("touchmove",c),e.currentTarget.addEventListener("touchend",g)),e.preventDefault(),document.activeElement&&document.activeElement.blur(),n.mouseHandled=!0),!0}_callDrag(e){if(!this.dragging)return;const t=i.initEvent(e,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(t,this.ui()),this.triggerEvent("drag",t)}_mouseMove(e){const t=this.mouseDownEvent;if(this.lastDrag=e,this.dragging)if(this._dragFollow(e),n.pauseDrag){const t=Number.isInteger(n.pauseDrag)?n.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout((()=>this._callDrag(e)),t)}else this._callDrag(e);else if(Math.abs(e.x-t.x)+Math.abs(e.y-t.y)>3){this.dragging=!0,n.dragElement=this;const t=this.el.gridstackNode?.grid;t?n.dropElement=t.el.ddElement.ddDroppable:delete n.dropElement,this.helper=this._createHelper(),this._setupHelperContainmentStyle(),this.dragTransform=i.getValuesFromTransformedElement(this.helperContainment),this.dragOffset=this._getDragOffset(e,this.el,this.helperContainment),this._setupHelperStyle(e);const s=i.initEvent(e,{target:this.el,type:"dragstart"});this.option.start&&this.option.start(s,this.ui()),this.triggerEvent("dragstart",s),document.addEventListener("keydown",this._keyEvent)}return!0}_mouseUp(e){if(document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),r&&e.currentTarget&&(e.currentTarget.removeEventListener("touchmove",c,!0),e.currentTarget.removeEventListener("touchend",g,!0)),this.dragging){delete this.dragging,delete this.el.gridstackNode?._origRotate,document.removeEventListener("keydown",this._keyEvent),n.dropElement?.el===this.el.parentElement&&delete n.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper!==this.el&&this.helper.remove(),this._removeHelperStyle();const t=i.initEvent(e,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(t),this.triggerEvent("dragstop",t),n.dropElement&&n.dropElement.drop(e)}delete this.helper,delete this.mouseDownEvent,delete n.dragElement,delete n.dropElement,delete n.mouseHandled,e.preventDefault()}_keyEvent(e){const t=this.el.gridstackNode,s=t?.grid||n.dropElement?.el?.gridstack;if("Escape"===e.key)t&&t._origRotate&&(t._orig=t._origRotate,delete t._origRotate),s?.cancelDrag(),this._mouseUp(this.mouseDownEvent);else if(t&&s&&("r"===e.key||"R"===e.key)){if(!i.canBeRotated(t))return;t._origRotate=t._origRotate||{...t._orig},delete t._moving,s.setAnimation(!1).rotate(t.el,{top:-this.dragOffset.offsetTop,left:-this.dragOffset.offsetLeft}).setAnimation(),t._moving=!0,this.dragOffset=this._getDragOffset(this.lastDrag,t.el,this.helperContainment),this.helper.style.width=this.dragOffset.width+"px",this.helper.style.height=this.dragOffset.height+"px",i.swap(t._orig,"w","h"),delete t._rect,this._mouseMove(this.lastDrag)}}_createHelper(){let e=this.el;return"function"==typeof this.option.helper?e=this.option.helper(this.el):"clone"===this.option.helper&&(e=i.cloneNode(this.el)),e.parentElement||i.appendTo(e,"parent"===this.option.appendTo?this.el.parentElement:this.option.appendTo),this.dragElementOriginStyle=y.originStyleProp.map((e=>this.el.style[e])),e}_setupHelperStyle(e){this.helper.classList.add("ui-draggable-dragging"),this.el.gridstackNode?.grid?.el.classList.add("grid-stack-dragging");const t=this.helper.style;return t.pointerEvents="none",t.width=this.dragOffset.width+"px",t.height=this.dragOffset.height+"px",t.willChange="left, top",t.position="fixed",this._dragFollow(e),t.transition="none",setTimeout((()=>{this.helper&&(t.transition=null)}),0),this}_removeHelperStyle(){this.helper.classList.remove("ui-draggable-dragging"),this.el.gridstackNode?.grid?.el.classList.remove("grid-stack-dragging");const e=this.helper?.gridstackNode;if(!e?._isAboutToRemove&&this.dragElementOriginStyle){const e=this.helper,t=this.dragElementOriginStyle.transition||null;e.style.transition=this.dragElementOriginStyle.transition="none",y.originStyleProp.forEach((t=>e.style[t]=this.dragElementOriginStyle[t]||null)),setTimeout((()=>e.style.transition=t),50)}return delete this.dragElementOriginStyle,this}_dragFollow(e){const t=this.helper.style,i=this.dragOffset;t.left=(e.clientX+i.offsetLeft-0)*this.dragTransform.xScale+"px",t.top=(e.clientY+i.offsetTop-0)*this.dragTransform.yScale+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,"fixed"!==this.helper.style.position&&(this.parentOriginStylePosition=this.helperContainment.style.position,getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(e,t,i){let s=0,o=0;i&&(s=this.dragTransform.xOffset,o=this.dragTransform.yOffset);const n=t.getBoundingClientRect();return{left:n.left,top:n.top,offsetLeft:-e.clientX+n.left-s,offsetTop:-e.clientY+n.top-o,width:n.width*this.dragTransform.xScale,height:n.height*this.dragTransform.yScale}}ui(){const e=this.el.parentElement.getBoundingClientRect(),t=this.helper.getBoundingClientRect();return{position:{top:(t.top-e.top)*this.dragTransform.yScale,left:(t.left-e.left)*this.dragTransform.xScale}}}}y.originStyleProp=["width","height","transform","transform-origin","transition","pointerEvents","position","left","top","minWidth","willChange"];class b extends v{constructor(e,t={}){super(),this.el=e,this.option=t,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.enable(),this._setupAccept()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){!1!==this.disabled&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.el.addEventListener("mouseenter",this._mouseEnter),this.el.addEventListener("mouseleave",this._mouseLeave),r&&(this.el.addEventListener("pointerenter",p),this.el.addEventListener("pointerleave",m)))}disable(e=!1){!0!==this.disabled&&(super.disable(),this.el.classList.remove("ui-droppable"),e||this.el.classList.add("ui-droppable-disabled"),this.el.removeEventListener("mouseenter",this._mouseEnter),this.el.removeEventListener("mouseleave",this._mouseLeave),r&&(this.el.removeEventListener("pointerenter",p),this.el.removeEventListener("pointerleave",m)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(e){return Object.keys(e).forEach((t=>this.option[t]=e[t])),this._setupAccept(),this}_mouseEnter(e){if(!n.dragElement)return;if(!this._canDrop(n.dragElement.el))return;e.preventDefault(),e.stopPropagation(),n.dropElement&&n.dropElement!==this&&n.dropElement._mouseLeave(e,!0),n.dropElement=this;const t=i.initEvent(e,{target:this.el,type:"dropover"});this.option.over&&this.option.over(t,this._ui(n.dragElement)),this.triggerEvent("dropover",t),this.el.classList.add("ui-droppable-over")}_mouseLeave(e,t=!1){if(!n.dragElement||n.dropElement!==this)return;e.preventDefault(),e.stopPropagation();const s=i.initEvent(e,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(s,this._ui(n.dragElement)),this.triggerEvent("dropout",s),n.dropElement===this&&(delete n.dropElement,!t)){let t,i=this.el.parentElement;for(;!t&&i;)t=i.ddElement?.ddDroppable,i=i.parentElement;t&&t._mouseEnter(e)}}drop(e){e.preventDefault();const t=i.initEvent(e,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(t,this._ui(n.dragElement)),this.triggerEvent("drop",t)}_canDrop(e){return e&&(!this.accept||this.accept(e))}_setupAccept(){return this.option.accept?("string"==typeof this.option.accept?this.accept=e=>e.classList.contains(this.option.accept)||e.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(e){return{draggable:e.el,...e.ui()}}}class w{static init(e){return e.ddElement||(e.ddElement=new w(e)),e.ddElement}constructor(e){this.el=e}on(e,t){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(e)>-1?this.ddDraggable.on(e,t):this.ddDroppable&&["drop","dropover","dropout"].indexOf(e)>-1?this.ddDroppable.on(e,t):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(e)>-1&&this.ddResizable.on(e,t),this}off(e){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(e)>-1?this.ddDraggable.off(e):this.ddDroppable&&["drop","dropover","dropout"].indexOf(e)>-1?this.ddDroppable.off(e):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(e)>-1&&this.ddResizable.off(e),this}setupDraggable(e){return this.ddDraggable?this.ddDraggable.updateOption(e):this.ddDraggable=new y(this.el,e),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(e){return this.ddResizable?this.ddResizable.updateOption(e):this.ddResizable=new _(this.el,e),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(e){return this.ddDroppable?this.ddDroppable.updateOption(e):this.ddDroppable=new b(this.el,e),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}}const E=new class{resizable(e,t,i,s){return this._getDDElements(e,t).forEach((e=>{if("disable"===t||"enable"===t)e.ddResizable&&e.ddResizable[t]();else if("destroy"===t)e.ddResizable&&e.cleanResizable();else if("option"===t)e.setupResizable({[i]:s});else{const i=e.el.gridstackNode.grid;let s=e.el.getAttribute("gs-resize-handles")||i.opts.resizable.handles||"e,s,se";"all"===s&&(s="n,e,s,w,se,sw,ne,nw");const o=!i.opts.alwaysShowResizeHandle;e.setupResizable({...i.opts.resizable,handles:s,autoHide:o,start:t.start,stop:t.stop,resize:t.resize})}})),this}draggable(e,t,i,s){return this._getDDElements(e,t).forEach((e=>{if("disable"===t||"enable"===t)e.ddDraggable&&e.ddDraggable[t]();else if("destroy"===t)e.ddDraggable&&e.cleanDraggable();else if("option"===t)e.setupDraggable({[i]:s});else{const i=e.el.gridstackNode.grid;e.setupDraggable({...i.opts.draggable,start:t.start,stop:t.stop,drag:t.drag})}})),this}dragIn(e,t){return this._getDDElements(e).forEach((e=>e.setupDraggable(t))),this}droppable(e,t,i,s){return"function"!=typeof t.accept||t._accept||(t._accept=t.accept,t.accept=e=>t._accept(e)),this._getDDElements(e,t).forEach((e=>{"disable"===t||"enable"===t?e.ddDroppable&&e.ddDroppable[t]():"destroy"===t?e.ddDroppable&&e.cleanDroppable():"option"===t?e.setupDroppable({[i]:s}):e.setupDroppable(t)})),this}isDroppable(e){return!(!e?.ddElement?.ddDroppable||e.ddElement.ddDroppable.disabled)}isDraggable(e){return!(!e?.ddElement?.ddDraggable||e.ddElement.ddDraggable.disabled)}isResizable(e){return!(!e?.ddElement?.ddResizable||e.ddElement.ddResizable.disabled)}on(e,t,i){return this._getDDElements(e).forEach((e=>e.on(t,(e=>{i(e,n.dragElement?n.dragElement.el:e.target,n.dragElement?n.dragElement.helper:null)})))),this}off(e,t){return this._getDDElements(e).forEach((e=>e.off(t))),this}_getDDElements(e,t){const s=e.gridstack||"destroy"!==t&&"disable"!==t,o=i.getElements(e);return o.length?o.map((e=>e.ddElement||(s?w.init(e):null))).filter((e=>e)):[]}};class x{static init(e={},t=".grid-stack"){if("undefined"==typeof document)return null;const s=x.getGridElement(t);return s?(s.gridstack||(s.gridstack=new x(s,i.cloneDeep(e))),s.gridstack):("string"==typeof t?console.error('GridStack.initAll() no grid was found with selector "'+t+'" - element missing or wrong selector ?\nNote: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.'):console.error("GridStack.init() no grid element was passed."),null)}static initAll(e={},t=".grid-stack"){const s=[];return"undefined"==typeof document||(x.getGridElements(t).forEach((t=>{t.gridstack||(t.gridstack=new x(t,i.cloneDeep(e))),s.push(t.gridstack)})),0===s.length&&console.error('GridStack.initAll() no grid was found with selector "'+t+'" - element missing or wrong selector ?\nNote: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.')),s}static addGrid(e,t={}){if(!e)return null;let s=e;if(s.gridstack){const e=s.gridstack;return t&&(e.opts={...e.opts,...t}),void 0!==t.children&&e.load(t.children),e}return e.classList.contains("grid-stack")&&!x.addRemoveCB||(s=x.addRemoveCB?x.addRemoveCB(e,t,!0,!0):i.createDiv(["grid-stack",t.class],e)),x.init(t,s)}static registerEngine(e){x.engineClass=e}get placeholder(){if(!this._placeholder){this._placeholder=i.createDiv([this.opts.placeholderClass,o.itemClass,this.opts.itemClass]);const e=i.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(e.textContent=this.opts.placeholderText)}return this._placeholder}constructor(e,t={}){this.el=e,this.opts=t,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},e.gridstack=this,this.opts=t=t||{},e.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),t.row&&(t.minRow=t.maxRow=t.row,delete t.row);const a=i.toNumber(e.getAttribute("gs-row"));"auto"===t.column&&delete t.column,void 0!==t.alwaysShowResizeHandle&&(t._alwaysShowResizeHandle=t.alwaysShowResizeHandle);const h=t.columnOpts;if(h){const e=h.breakpoints;h.columnWidth||e?.length?(h.columnMax=h.columnMax||12,e?.length>1&&e.sort(((e,t)=>(t.w||0)-(e.w||0)))):delete t.columnOpts}const l={...i.cloneDeep(o),column:i.toNumber(e.getAttribute("gs-column"))||o.column,minRow:a||i.toNumber(e.getAttribute("gs-min-row"))||o.minRow,maxRow:a||i.toNumber(e.getAttribute("gs-max-row"))||o.maxRow,staticGrid:i.toBool(e.getAttribute("gs-static"))||o.staticGrid,sizeToContent:i.toBool(e.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(t.handleClass?"."+t.handleClass:t.handle?t.handle:"")||o.draggable.handle},removableOptions:{accept:t.itemClass||o.removableOptions.accept,decline:o.removableOptions.decline}};e.getAttribute("gs-animate")&&(l.animate=i.toBool(e.getAttribute("gs-animate"))),t=i.defaults(t,l),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(t),"auto"===t.rtl&&(t.rtl="rtl"===e.style.direction),t.rtl&&this.el.classList.add("grid-stack-rtl");const d=this.el.closest("."+o.itemClass),c=d?.gridstackNode;if(c&&(c.subGrid=this,this.parentGridNode=c,this.el.classList.add("grid-stack-nested"),c.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight="auto"===t.cellHeight,this._isAutoCellHeight||"initial"===t.cellHeight)this.cellHeight(void 0);else{"number"==typeof t.cellHeight&&t.cellHeightUnit&&t.cellHeightUnit!==o.cellHeightUnit&&(t.cellHeight=t.cellHeight+t.cellHeightUnit,delete t.cellHeightUnit);const e=t.cellHeight;delete t.cellHeight,this.cellHeight(e)}"mobile"===t.alwaysShowResizeHandle&&(t.alwaysShowResizeHandle=r),this._setStaticClass();const g=t.engineClass||x.engineClass||s;if(this.engine=new g({column:this.getColumn(),float:t.float,maxRow:t.maxRow,onChange:e=>{e.forEach((e=>{const t=e.el;t&&(e._removeDOM?(t&&t.remove(),delete e._removeDOM):this._writePosAttr(t,e))})),this._updateContainerHeight()}}),t.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach((e=>this._prepareElement(e))),delete this.engine._loading,this.batchUpdate(!1)),t.children){const e=t.children;delete t.children,e.length&&this.load(e)}this.setAnimation(),t.subGridDynamic&&!n.pauseDrag&&(n.pauseDrag=!0),void 0!==t.draggable?.pause&&(n.pauseDrag=t.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(e=this.opts){this.el.classList.add("gs-"+e.column),"number"==typeof e.column&&this.el.style.setProperty("--gs-column-width",100/e.column+"%")}addWidget(e){if(!e)return;if("string"==typeof e)return void console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");if(e.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(e);let t,s=e;if(s.grid=this,t=s.el?s.el:x.addRemoveCB?x.addRemoveCB(this.el,e,!0,!1):this.createWidgetDivs(s),!t)return;if(s=t.gridstackNode,s&&t.parentElement===this.el&&this.engine.nodes.find((e=>e._id===s._id)))return t;const o=this._readAttr(t);return i.defaults(e,o),this.engine.prepareNode(e),this.el.appendChild(t),this.makeWidget(t,e),t}createWidgetDivs(e){const t=i.createDiv(["grid-stack-item",this.opts.itemClass]),s=i.createDiv(["grid-stack-item-content"],t);return i.lazyLoad(e)?e.visibleObservable||(e.visibleObservable=new IntersectionObserver((([t])=>{t.isIntersecting&&(e.visibleObservable?.disconnect(),delete e.visibleObservable,x.renderCB(s,e),e.grid?.prepareDragDrop(e.el))})),window.setTimeout((()=>e.visibleObservable?.observe(t)))):x.renderCB(s,e),t}makeSubGrid(e,t,s,o=!0){let n,r=e.gridstackNode;if(r||(r=this.makeWidget(e).gridstackNode),r.subGrid?.el)return r.subGrid;let a,h=this;for(;h&&!n;)n=h.opts?.subGridOpts,h=h.parentGridNode?.grid;t=i.cloneDeep({...this.opts,id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0,...n||{},...t||r.subGridOpts||{}}),r.subGridOpts=t,"auto"===t.column&&(a=!0,t.column=Math.max(r.w||1,s?.w||1),delete t.columnOpts);let l,d,c=r.el.querySelector(".grid-stack-item-content");if(o&&(this._removeDD(r.el),d={...r,x:0,y:0},i.removeInternalForSave(d),delete d.subGridOpts,r.content&&(d.content=r.content,delete r.content),x.addRemoveCB?l=x.addRemoveCB(this.el,d,!0,!1):(l=i.createDiv(["grid-stack-item"]),l.appendChild(c),c=i.createDiv(["grid-stack-item-content"],r.el)),this.prepareDragDrop(r.el)),s){const e=a?t.column:r.w,i=r.h+s.h,o=r.el.style;o.transition="none",this.update(r.el,{w:e,h:i}),setTimeout((()=>o.transition=null))}const g=r.subGrid=x.addGrid(c,t);return s?._moving&&(g._isTemp=!0),a&&(g._autoColumn=!0),o&&g.makeWidget(l,d),s&&(s._moving?window.setTimeout((()=>i.simulateMouseEvent(s._event,"mouseenter",g.el)),0):g.makeWidget(r.el,r)),this.resizeToContentCheck(!1,r),g}removeAsSubGrid(e){const t=this.parentGridNode?.grid;t&&(t.batchUpdate(),t.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach((e=>{e.x+=this.parentGridNode.x,e.y+=this.parentGridNode.y,t.makeWidget(e.el,e)})),t.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,e&&window.setTimeout((()=>i.simulateMouseEvent(e._event,"mouseenter",t.el)),0))}save(e=!0,t=!1,s=x.saveCB,n){const r=this.engine.save(e,s,n);if(r.forEach((i=>{if(e&&i.el&&!i.subGrid&&!s){const e=i.el.querySelector(".grid-stack-item-content");i.content=e?.innerHTML,i.content||delete i.content}else if(e||s||delete i.content,i.subGrid?.el){const o=i.w||i.subGrid.getColumn(),n=i.subGrid.save(e,t,s,o);i.subGridOpts=t?n:{children:n},delete i.subGrid}delete i.el})),t){const e=i.cloneDeep(this.opts);e.marginBottom===e.marginTop&&e.marginRight===e.marginLeft&&e.marginTop===e.marginRight&&(e.margin=e.marginTop,delete e.marginTop,delete e.marginRight,delete e.marginBottom,delete e.marginLeft),e.rtl===("rtl"===this.el.style.direction)&&(e.rtl="auto"),this._isAutoCellHeight&&(e.cellHeight="auto"),this._autoColumn&&(e.column="auto");const t=e._alwaysShowResizeHandle;return delete e._alwaysShowResizeHandle,void 0!==t?e.alwaysShowResizeHandle=t:delete e.alwaysShowResizeHandle,i.removeInternalAndSame(e,o),e.children=r,e}return r}load(e,t=x.addRemoveCB||!0){e=i.cloneDeep(e);const s=this.getColumn();e.forEach((e=>{e.w=e.w||e.minW||1,e.h=e.h||e.minH||1})),e=i.sort(e),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let o=0;e.forEach((e=>{o=Math.max(o,(e.x||0)+e.w)})),o>this.engine.defaultColumn&&(this.engine.defaultColumn=o),o>s&&(0===this.engine.nodes.length&&this.responseLayout?(this.engine.nodes=e,this.engine.columnChanged(o,s,this.responseLayout),e=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(e,o,!0));const n=x.addRemoveCB;"function"==typeof t&&(x.addRemoveCB=t);const r=[];this.batchUpdate();const a=!this.engine.nodes.length,h=a&&this.opts.animate;h&&this.setAnimation(!1),!a&&t&&[...this.engine.nodes].forEach((t=>{t.id&&(i.find(e,t.id)||(x.addRemoveCB&&x.addRemoveCB(this.el,t,!1,!1),r.push(t),this.removeWidget(t.el,!0,!1)))})),this.engine._loading=!0;const l=[];return this.engine.nodes=this.engine.nodes.filter((t=>!i.find(e,t.id)||(l.push(t),!1))),e.forEach((e=>{const s=i.find(l,e.id);if(s){if(i.shouldSizeToContent(s)&&(e.h=s.h),this.engine.nodeBoundFix(e),(e.autoPosition||void 0===e.x||void 0===e.y)&&(e.w=e.w||s.w,e.h=e.h||s.h,this.engine.findEmptyPosition(e)),this.engine.nodes.push(s),i.samePos(s,e)&&this.engine.nodes.length>1&&(this.moveNode(s,{...e,forceCollide:!0}),i.copyPos(e,s)),this.update(s.el,e),e.subGridOpts?.children){const t=s.el.querySelector(".grid-stack");t&&t.gridstack&&t.gridstack.load(e.subGridOpts.children)}}else t&&this.addWidget(e)})),delete this.engine._loading,this.engine.removedNodes=r,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,n?x.addRemoveCB=n:delete x.addRemoveCB,h&&this.setAnimation(!0,!0),this}batchUpdate(e=!0){return this.engine.batchUpdate(e),e||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(e=!1){if(this.opts.cellHeight&&"auto"!==this.opts.cellHeight&&(!e||!this.opts.cellHeightUnit||"px"===this.opts.cellHeightUnit))return this.opts.cellHeight;if("rem"===this.opts.cellHeightUnit)return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if("em"===this.opts.cellHeightUnit)return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if("cm"===this.opts.cellHeightUnit)return this.opts.cellHeight*(96/2.54);if("mm"===this.opts.cellHeightUnit)return this.opts.cellHeight*(96/2.54)/10;const t=this.el.querySelector("."+this.opts.itemClass);if(t){const e=i.toNumber(t.getAttribute("gs-h"))||1;return Math.round(t.offsetHeight/e)}const s=parseInt(this.el.getAttribute("gs-current-row"));return s?Math.round(this.el.getBoundingClientRect().height/s):this.opts.cellHeight}cellHeight(e){if(void 0!==e&&this._isAutoCellHeight!==("auto"===e)&&(this._isAutoCellHeight="auto"===e,this._updateResizeEvent()),"initial"!==e&&"auto"!==e||(e=void 0),void 0===e){const t=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;e=this.cellWidth()+t}const t=i.parseHeight(e);return this.opts.cellHeightUnit===t.unit&&this.opts.cellHeight===t.h||(this.opts.cellHeightUnit=t.unit,this.opts.cellHeight=t.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck()),this}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(e=!1){return e&&this.opts.columnOpts?.breakpointForWindow?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){const e=this.opts.columnOpts;if(!e||!e.columnWidth&&!e.breakpoints?.length)return!1;const t=this.getColumn();let i=t;const s=this._widthOrContainer(!0);if(e.columnWidth)i=Math.min(Math.round(s/e.columnWidth)||1,e.columnMax);else{i=e.columnMax;let o=0;for(;oe.c===i));return this.column(i,t?.layout||e.layout),!0}return!1}compact(e="compact",t=!0){return this.engine.compact(e,t),this._triggerChangeEvent(),this}column(e,t="moveScale"){if(!e||e<1||this.opts.column===e)return this;const i=this.getColumn();return this.opts.column=e,this.engine?(this.engine.column=e,this.el.classList.remove("gs-"+i),this._updateColumnVar(),this.engine.columnChanged(i,e,t),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=t,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter((e=>e.matches("."+this.opts.itemClass)&&!e.matches("."+this.opts.placeholderClass)))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(e=!0){if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),e?this.el.parentNode.removeChild(this.el):(this.removeAll(e),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,delete this._placeholder?.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(e){return this.opts.float!==e&&(this.opts.float=this.engine.float=e,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(e,t=!1){const i=this.el.getBoundingClientRect();let s;s=t?{top:i.top+document.documentElement.scrollTop,left:i.left}:{top:this.el.offsetTop,left:this.el.offsetLeft};const o=e.left-s.left,n=e.top-s.top,r=i.width/this.getColumn(),a=i.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(o/r),y:Math.floor(n/a)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(e,t,i,s){return this.engine.isAreaEmpty(e,t,i,s)}makeWidget(e,t){const i=x.getElement(e);if(!i||i.gridstackNode)return i;i.parentElement||this.el.appendChild(i),this._prepareElement(i,!0,t);const s=i.gridstackNode;let o;return this._updateContainerHeight(),s.subGridOpts&&this.makeSubGrid(i,s.subGridOpts,void 0,!1),1!==this.opts.column||this._ignoreLayoutsNodeChange||(o=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),o&&delete this._ignoreLayoutsNodeChange,i}on(e,t){if(-1!==e.indexOf(" "))return e.split(" ").forEach((e=>this.on(e,t))),this;if("change"===e||"added"===e||"removed"===e||"enable"===e||"disable"===e){const i="enable"===e||"disable"===e;this._gsEventHandler[e]=i?e=>t(e):e=>{e.detail&&t(e,e.detail)},this.el.addEventListener(e,this._gsEventHandler[e])}else"drag"===e||"dragstart"===e||"dragstop"===e||"resizestart"===e||"resize"===e||"resizestop"===e||"dropped"===e||"resizecontent"===e?this._gsEventHandler[e]=t:console.error("GridStack.on("+e+") event not supported");return this}off(e){return-1!==e.indexOf(" ")?(e.split(" ").forEach((e=>this.off(e))),this):("change"!==e&&"added"!==e&&"removed"!==e&&"enable"!==e&&"disable"!==e||this._gsEventHandler[e]&&this.el.removeEventListener(e,this._gsEventHandler[e]),delete this._gsEventHandler[e],this)}offAll(){return Object.keys(this._gsEventHandler).forEach((e=>this.off(e))),this}removeWidget(e,t=!0,i=!0){return e?(x.getElements(e).forEach((e=>{if(e.parentElement&&e.parentElement!==this.el)return;let s=e.gridstackNode;s||(s=this.engine.nodes.find((t=>e===t.el))),s&&(t&&x.addRemoveCB&&x.addRemoveCB(this.el,s,!1,!1),delete e.gridstackNode,this._removeDD(e),this.engine.removeNode(s,t,i),t&&e.parentElement&&e.remove())})),i&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(e=!0,t=!0){return this.engine.nodes.forEach((t=>{e&&x.addRemoveCB&&x.addRemoveCB(this.el,t,!1,!1),delete t.el.gridstackNode,this.opts.staticGrid||this._removeDD(t.el)})),this.engine.removeAll(e,t),t&&this._triggerRemoveEvent(),this}setAnimation(e=this.opts.animate,t){return t?setTimeout((()=>{this.opts&&this.setAnimation(e)})):e?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=e,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(e,t=!0,i=!0){return!!this.opts.staticGrid===e||(e?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach((s=>{this.prepareDragDrop(s.el),s.subGrid&&i&&s.subGrid.setStatic(e,t,i)})),t&&this._setStaticClass()),this}updateOptions(e){const t=this.opts;return e===t||(void 0!==e.acceptWidgets&&(t.acceptWidgets=e.acceptWidgets,this._setupAcceptWidget()),void 0!==e.animate&&this.setAnimation(e.animate),e.cellHeight&&this.cellHeight(e.cellHeight),void 0!==e.class&&e.class!==t.class&&(t.class&&this.el.classList.remove(t.class),e.class&&this.el.classList.add(e.class)),e.columnOpts?(this.opts.columnOpts=e.columnOpts,this.checkDynamicColumn()):null===e.columnOpts&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):"number"==typeof e.column&&this.column(e.column),void 0!==e.margin&&this.margin(e.margin),void 0!==e.staticGrid&&this.setStatic(e.staticGrid),void 0===e.disableDrag||e.staticGrid||this.enableMove(!e.disableDrag),void 0===e.disableResize||e.staticGrid||this.enableResize(!e.disableResize),void 0!==e.float&&this.float(e.float),void 0!==e.row?(t.minRow=t.maxRow=t.row=e.row,this._updateContainerHeight()):(void 0!==e.minRow&&(t.minRow=e.minRow,this._updateContainerHeight()),void 0!==e.maxRow&&(t.maxRow=e.maxRow)),e.children?.length&&this.load(e.children)),this}update(e,t){return x.getElements(e).forEach((e=>{const s=e?.gridstackNode;if(!s)return;const o={...i.copyPos({},s),...i.cloneDeep(t)};this.engine.nodeBoundFix(o),delete o.autoPosition;const n=["x","y","w","h"];let r;if(n.some((e=>void 0!==o[e]&&o[e]!==s[e]))&&(r={},n.forEach((e=>{r[e]=void 0!==o[e]?o[e]:s[e],delete o[e]}))),!r&&(o.minW||o.minH||o.maxW||o.maxH)&&(r={}),void 0!==o.content){const t=e.querySelector(".grid-stack-item-content");t&&t.textContent!==o.content&&(s.content=o.content,x.renderCB(t,o),s.subGrid?.el&&(t.appendChild(s.subGrid.el),s.subGrid._updateContainerHeight())),delete o.content}let a=!1,h=!1;for(const e in o)"_"!==e[0]&&s[e]!==o[e]&&(s[e]=o[e],a=!0,h=h||!this.opts.staticGrid&&("noResize"===e||"noMove"===e||"locked"===e));if(i.sanitizeMinMax(s),r){const e=void 0!==r.w&&r.w!==s.w;this.moveNode(s,r),e&&s.subGrid?s.subGrid.onResize(this.hasAnimationCSS()?s.w:void 0):this.resizeToContentCheck(e,s),delete s._orig}(r||a)&&this._writeAttr(e,s),h&&this.prepareDragDrop(s.el),x.updateCB&&x.updateCB(s)})),this}moveNode(e,t){const i=e._updating;i||this.engine.cleanNodes().beginUpdate(e),this.engine.moveNode(e,t),this._updateContainerHeight(),i||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(e){if(!e)return;if(e.classList.remove("size-to-content-max"),!e.clientHeight)return;const t=e.gridstackNode;if(!t)return;const i=t.grid;if(!i||e.parentElement!==i.el)return;const s=i.getCellHeight(!0);if(!s)return;let o,n=t.h?t.h*s:e.clientHeight;if(t.resizeToContentParent&&(o=e.querySelector(t.resizeToContentParent)),o||(o=e.querySelector(x.resizeToContentParent)),!o)return;const r=e.clientHeight-o.clientHeight,a=t.h?t.h*s-r:o.clientHeight;let h;if(t.subGrid){h=t.subGrid.getRow()*t.subGrid.getCellHeight(!0);const i=t.subGrid.el.getBoundingClientRect(),s=e.getBoundingClientRect();h+=i.top-s.top}else{if(t.subGridOpts?.children?.length)return;{const e=o.firstElementChild;if(!e)return void console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${x.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);h=e.getBoundingClientRect().height||a}}if(a===h)return;n+=h-a;let l=Math.ceil(n/s);const d=Number.isInteger(t.sizeToContent)?t.sizeToContent:0;d&&l>d&&(l=d,e.classList.add("size-to-content-max")),t.minH&&lt.maxH&&(l=t.maxH),l!==t.h&&(i._ignoreLayoutsNodeChange=!0,i.moveNode(t,{h:l}),delete i._ignoreLayoutsNodeChange)}resizeToContentCBCheck(e){x.resizeToContentCB?x.resizeToContentCB(e):this.resizeToContent(e)}rotate(e,t){return x.getElements(e).forEach((e=>{const s=e.gridstackNode;if(!i.canBeRotated(s))return;const o={w:s.h,h:s.w,minH:s.minW,minW:s.minH,maxH:s.maxW,maxW:s.maxH};if(t){const e=t.left>0?Math.floor(t.left/this.cellWidth()):0,i=t.top>0?Math.floor(t.top/this.opts.cellHeight):0;o.x=s.x+e-(s.h-(i+1)),o.y=s.y+i-e}Object.keys(o).forEach((e=>{void 0===o[e]&&delete o[e]}));const n=s._orig;this.update(e,o),s._orig=n})),this}margin(e){if(!("string"==typeof e&&e.split(" ").length>1)){const t=i.parseHeight(e);if(this.opts.marginUnit===t.unit&&this.opts.margin===t.h)return}return this.opts.margin=e,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(e){if(arguments.length>1){console.warn("gridstack.ts: `willItFit(x,y,w,h,autoPosition)` is deprecated. Use `willItFit({x, y,...})`. It will be removed soon");const e=arguments;let t=0,i={x:e[t++],y:e[t++],w:e[t++],h:e[t++],autoPosition:e[t++]};return this.willItFit(i)}return this.engine.willItFit(e)}_triggerChangeEvent(){if(this.engine.batchMode)return this;const e=this.engine.getDirtyNodes(!0);return e&&e.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(e),this._triggerEvent("change",e)),this.engine.saveInitial(),this}_triggerAddEvent(){if(this.engine.batchMode)return this;if(this.engine.addedNodes?.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach((e=>{delete e._dirty}));const e=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",e)}return this}_triggerRemoveEvent(){if(this.engine.batchMode)return this;if(this.engine.removedNodes?.length){const e=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",e)}return this}_triggerEvent(e,t){const i=t?new CustomEvent(e,{bubbles:!1,detail:t}):new Event(e);let s=this;for(;s.parentGridNode;)s=s.parentGridNode.grid;return s.el.dispatchEvent(i),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;const e=this.parentGridNode;let t=this.getRow()+this._extraDragRow;const s=this.opts.cellHeight,o=this.opts.cellHeightUnit;if(!s)return this;if(!e&&!this.opts.minRow){const e=i.parseHeight(getComputedStyle(this.el).minHeight);if(e.h>0&&e.unit===o){const i=Math.floor(e.h/s);t1?`calc(${t.w} * var(--gs-column-width))`:null,e.style.height=t.h>1?`calc(${t.h} * var(--gs-cell-height))`:null),t.x>0?e.setAttribute("gs-x",String(t.x)):e.removeAttribute("gs-x"),t.y>0?e.setAttribute("gs-y",String(t.y)):e.removeAttribute("gs-y"),t.w>1?e.setAttribute("gs-w",String(t.w)):e.removeAttribute("gs-w"),t.h>1?e.setAttribute("gs-h",String(t.h)):e.removeAttribute("gs-h"),this}_writeAttr(e,t){if(!t)return this;this._writePosAttr(e,t);const i={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(const s in i)t[s]?e.setAttribute(i[s],String(t[s])):e.removeAttribute(i[s]);return this}_readAttr(e,t=!0){const s={};s.x=i.toNumber(e.getAttribute("gs-x")),s.y=i.toNumber(e.getAttribute("gs-y")),s.w=i.toNumber(e.getAttribute("gs-w")),s.h=i.toNumber(e.getAttribute("gs-h")),s.autoPosition=i.toBool(e.getAttribute("gs-auto-position")),s.noResize=i.toBool(e.getAttribute("gs-no-resize")),s.noMove=i.toBool(e.getAttribute("gs-no-move")),s.locked=i.toBool(e.getAttribute("gs-locked"));const o=e.getAttribute("gs-size-to-content");o&&(s.sizeToContent="true"===o||"false"===o?i.toBool(o):parseInt(o,10)),s.id=e.getAttribute("gs-id"),s.maxW=i.toNumber(e.getAttribute("gs-max-w")),s.minW=i.toNumber(e.getAttribute("gs-min-w")),s.maxH=i.toNumber(e.getAttribute("gs-max-h")),s.minH=i.toNumber(e.getAttribute("gs-min-h")),t&&(1===s.w&&e.removeAttribute("gs-w"),1===s.h&&e.removeAttribute("gs-h"),s.maxW&&e.removeAttribute("gs-max-w"),s.minW&&e.removeAttribute("gs-min-w"),s.maxH&&e.removeAttribute("gs-max-h"),s.minH&&e.removeAttribute("gs-min-h"));for(const e in s){if(!s.hasOwnProperty(e))return;s[e]||0===s[e]||"sizeToContent"===e||delete s[e]}return s}_setStaticClass(){const e=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...e),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...e),this.el.removeAttribute("gs-static")),this}onResize(e=this.el?.clientWidth){if(!e)return;if(this.prevWidth===e)return;this.prevWidth=e,this.batchUpdate();let t=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),t=!0):t=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach((e=>{e.subGrid&&e.subGrid.onResize()})),this._skipInitialResize||this.resizeToContentCheck(t),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(e=!1,t=void 0){if(this.engine){if(e&&this.hasAnimationCSS())return setTimeout((()=>this.resizeToContentCheck(!1,t)),this.animationDelay);if(t)i.shouldSizeToContent(t)&&this.resizeToContentCBCheck(t.el);else if(this.engine.nodes.some((e=>i.shouldSizeToContent(e)))){const e=[...this.engine.nodes];this.batchUpdate(),e.forEach((e=>{i.shouldSizeToContent(e)&&this.resizeToContentCBCheck(e.el)})),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,t?[t]:this.engine.nodes)}}_updateResizeEvent(e=!1){const t=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find((e=>e.sizeToContent)));return e||!t||this.resizeObserver?!e&&t||!this.resizeObserver||(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle):(this._sizeThrottle=i.throttle((()=>this.onResize()),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver((()=>this._sizeThrottle())),this.resizeObserver.observe(this.el),this._skipInitialResize=!0),this}static getElement(e=".grid-stack-item"){return i.getElement(e)}static getElements(e=".grid-stack-item"){return i.getElements(e)}static getGridElement(e){return x.getElement(e)}static getGridElements(e){return i.getElements(e)}_initMargin(){let e,t=0,s=[];"string"==typeof this.opts.margin&&(s=this.opts.margin.split(" ")),2===s.length?(this.opts.marginTop=this.opts.marginBottom=s[0],this.opts.marginLeft=this.opts.marginRight=s[1]):4===s.length?(this.opts.marginTop=s[0],this.opts.marginRight=s[1],this.opts.marginBottom=s[2],this.opts.marginLeft=s[3]):(e=i.parseHeight(this.opts.margin),this.opts.marginUnit=e.unit,t=this.opts.margin=e.h),["marginTop","marginRight","marginBottom","marginLeft"].forEach((s=>{void 0===this.opts[s]?this.opts[s]=t:(e=i.parseHeight(this.opts[s]),this.opts[s]=e.h,delete this.opts.margin)})),this.opts.marginUnit=e.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);const o=this.el.style;return o.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return E}static setupDragIn(e,t,s,o=document){void 0!==t?.pause&&(n.pauseDrag=t.pause),t={appendTo:"body",helper:"clone",...t||{}},("string"==typeof e?i.getElements(e,o):e).forEach(((e,i)=>{E.isDraggable(e)||E.dragIn(e,t),s?.[i]&&(e.gridstackNode=s[i])}))}movable(e,t){return this.opts.staticGrid||x.getElements(e).forEach((e=>{const i=e.gridstackNode;i&&(t?delete i.noMove:i.noMove=!0,this.prepareDragDrop(i.el))})),this}resizable(e,t){return this.opts.staticGrid||x.getElements(e).forEach((e=>{const i=e.gridstackNode;i&&(t?delete i.noResize:i.noResize=!0,this.prepareDragDrop(i.el))})),this}disable(e=!0){if(!this.opts.staticGrid)return this.enableMove(!1,e),this.enableResize(!1,e),this._triggerEvent("disable"),this}enable(e=!0){if(!this.opts.staticGrid)return this.enableMove(!0,e),this.enableResize(!0,e),this._triggerEvent("enable"),this}enableMove(e,t=!0){return this.opts.staticGrid||(e?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach((i=>{this.prepareDragDrop(i.el),i.subGrid&&t&&i.subGrid.enableMove(e,t)}))),this}enableResize(e,t=!0){return this.opts.staticGrid||(e?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach((i=>{this.prepareDragDrop(i.el),i.subGrid&&t&&i.subGrid.enableResize(e,t)}))),this}cancelDrag(){const e=this._placeholder?.gridstackNode;e&&(e._isExternal?(e._isAboutToRemove=!0,this.engine.removeNode(e)):e._isAboutToRemove&&x._itemRemoving(e.el,!1),this.engine.restoreInitial())}_removeDD(e){return E.draggable(e,"destroy").resizable(e,"destroy"),e.gridstackNode&&delete e.gridstackNode._initDD,delete e.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return E.droppable(this.el,"destroy"),this;let e,t;const s=(s,o,n)=>{const r=(n=n||o).gridstackNode;if(!r)return;if(!r.grid?.el){n.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;const e=n.getBoundingClientRect();n.style.left=e.x+(this.dragTransform.xScale-1)*(s.clientX-e.x)/this.dragTransform.xScale+"px",n.style.top=e.y+(this.dragTransform.yScale-1)*(s.clientY-e.y)/this.dragTransform.yScale+"px",n.style.transformOrigin="0px 0px"}let{top:a,left:h}=n.getBoundingClientRect();const l=this.el.getBoundingClientRect();h-=l.left,a-=l.top;const d={position:{top:a*this.dragTransform.xScale,left:h*this.dragTransform.yScale}};if(r._temporaryRemoved){if(r.x=Math.max(0,Math.round(h/t)),r.y=Math.max(0,Math.round(a/e)),delete r.autoPosition,this.engine.nodeBoundFix(r),!this.engine.willItFit(r)){if(r.autoPosition=!0,!this.engine.willItFit(r))return void E.off(o,"drag");r._willFitPos&&(i.copyPos(r,r._willFitPos),delete r._willFitPos)}this._onStartMoving(n,s,d,r,t,e)}else this._dragOrResize(n,s,d,r,t,e)};return E.droppable(this.el,{accept:e=>{const t=e.gridstackNode||this._readAttr(e,!1);if(t?.grid===this)return!0;if(!this.opts.acceptWidgets)return!1;let i=!0;if("function"==typeof this.opts.acceptWidgets)i=this.opts.acceptWidgets(e);else{const t=!0===this.opts.acceptWidgets?".grid-stack-item":this.opts.acceptWidgets;i=e.matches(t)}if(i&&t&&this.opts.maxRow){const e={w:t.w,h:t.h,minW:t.minW,minH:t.minH};i=this.engine.willItFit(e)}return i}}).on(this.el,"dropover",((i,o,n)=>{let r=n?.gridstackNode||o.gridstackNode;if(r?.grid===this&&!r._temporaryRemoved)return!1;if(r?._sidebarOrig&&(r.w=r._sidebarOrig.w,r.h=r._sidebarOrig.h),r?.grid&&r.grid!==this&&!r._temporaryRemoved&&r.grid._leave(o,n),n=n||o,t=this.cellWidth(),e=this.getCellHeight(!0),!r){const e=n.getAttribute("data-gs-widget")||n.getAttribute("gridstacknode");if(e){try{r=JSON.parse(e)}catch(t){console.error("Gridstack dropover: Bad JSON format: ",e)}n.removeAttribute("data-gs-widget"),n.removeAttribute("gridstacknode")}r||(r=this._readAttr(n)),r._sidebarOrig={w:r.w,h:r.h}}r.grid||(r.el||(r={...r}),r._isExternal=!0,n.gridstackNode=r);const a=r.w||Math.round(n.offsetWidth/t)||1,h=r.h||Math.round(n.offsetHeight/e)||1;return r.grid&&r.grid!==this?(o._gridstackNodeOrig||(o._gridstackNodeOrig=r),o.gridstackNode=r={...r,w:a,h,grid:this},delete r.x,delete r.y,this.engine.cleanupNode(r).nodeBoundFix(r),r._initDD=r._isExternal=r._temporaryRemoved=!0):(r.w=a,r.h=h,r._temporaryRemoved=!0),x._itemRemoving(r.el,!1),E.on(o,"drag",s),s(i,o,n),!1})).on(this.el,"dropout",((e,t,i)=>{const s=i?.gridstackNode||t.gridstackNode;return!!s&&(s.grid&&s.grid!==this||(this._leave(t,i),this._isTemp&&this.removeAsSubGrid(s)),!1)})).on(this.el,"drop",((e,t,s)=>{const o=s?.gridstackNode||t.gridstackNode;if(o?.grid===this&&!o._isExternal)return!1;const n=!!this.placeholder.parentElement,r=t!==s;this.placeholder.remove(),delete this.placeholder.gridstackNode,n&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));const a=t._gridstackNodeOrig;if(delete t._gridstackNodeOrig,n&&a?.grid&&a.grid!==this){const e=a.grid;e.engine.removeNodeFromLayoutCache(a),e.engine.removedNodes.push(a),e._triggerRemoveEvent()._triggerChangeEvent(),e.parentGridNode&&!e.engine.nodes.length&&e.opts.subGridDynamic&&e.removeAsSubGrid()}if(!o)return!1;if(n&&(this.engine.cleanupNode(o),o.grid=this),delete o.grid?._isTemp,E.off(t,"drag"),s!==t?(s.remove(),t=s):t.remove(),this._removeDD(t),!n)return!1;const h=o.subGrid?.el?.gridstack;return i.copyPos(o,this._readAttr(this.placeholder)),i.removePositioningStyles(t),r&&(o.content||o.subGridOpts||x.addRemoveCB)?(delete o.el,t=this.addWidget(o)):(this._prepareElement(t,!0,o),this.el.appendChild(t),this.resizeToContentCheck(!1,o),h&&(h.parentGridNode=o),this._updateContainerHeight()),this.engine.addedNodes.push(o),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped({...e,type:"dropped"},a&&a.grid?a:void 0,o),!1})),this}static _itemRemoving(e,t){if(!e)return;const i=e?e.gridstackNode:void 0;i?.grid&&!e.classList.contains(i.grid.opts.removableOptions.decline)&&(t?i._isAboutToRemove=!0:delete i._isAboutToRemove,t?e.classList.add("grid-stack-item-removing"):e.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if("string"!=typeof this.opts.removable)return this;const e=document.querySelector(this.opts.removable);return e?(this.opts.staticGrid||E.isDroppable(e)||E.droppable(e,this.opts.removableOptions).on(e,"dropover",((e,t)=>x._itemRemoving(t,!0))).on(e,"dropout",((e,t)=>x._itemRemoving(t,!1))),this):this}prepareDragDrop(e,t=!1){const s=e?.gridstackNode;if(!s)return;const o=s.noMove||this.opts.disableDrag,n=s.noResize||this.opts.disableResize,r=this.opts.staticGrid||o&&n;if((t||r)&&(s._initDD&&(this._removeDD(e),delete s._initDD),r&&e.classList.add("ui-draggable-disabled","ui-resizable-disabled"),!t))return this;if(!s._initDD){let t,o;const n=(i,n)=>{this.triggerEvent(i,i.target),t=this.cellWidth(),o=this.getCellHeight(!0),this._onStartMoving(e,i,n,s,t,o)},r=(i,n)=>{this._dragOrResize(e,i,n,s,t,o)},a=t=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete s._moving,delete s._resizing,delete s._event,delete s._lastTried;const o=s.w!==s._orig.w,n=t.target;if(n.gridstackNode&&n.gridstackNode.grid===this){if(s.el=n,s._isAboutToRemove){const i=e.gridstackNode.grid;i._gsEventHandler[t.type]&&i._gsEventHandler[t.type](t,n),i.engine.nodes.push(s),i.removeWidget(e,!0,!0)}else i.removePositioningStyles(n),s._temporaryRemoved?(this._writePosAttr(n,s),this.engine.addNode(s)):this._writePosAttr(n,s),this.triggerEvent(t,n);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),"resizestop"===t.type&&(Number.isInteger(s.sizeToContent)&&(s.sizeToContent=s.h),this.resizeToContentCheck(o,s))}};E.draggable(e,{start:n,stop:a,drag:r}).resizable(e,{start:n,stop:a,resize:r}),s._initDD=!0}return E.draggable(e,o?"disable":"enable").resizable(e,n?"disable":"enable"),this}_onStartMoving(e,t,s,o,n,r){if(this.engine.cleanNodes().beginUpdate(o),this._writePosAttr(this.placeholder,o),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=o,o.grid?.el)this.dragTransform=i.getValuesFromTransformedElement(e);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){const e=this.placeholder.closest(".grid-stack");this.dragTransform=i.getValuesFromTransformedElement(e)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(o.el=this.placeholder,o._lastUiPosition=s.position,o._prevYPix=s.position.top,o._moving="dragstart"===t.type,o._resizing="resizestart"===t.type,delete o._lastTried,"dropover"===t.type&&o._temporaryRemoved&&(this.engine.addNode(o),o._moving=!0),this.engine.cacheRects(n,r,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),"resizestart"===t.type){const t=this.getColumn()-o.x,i=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-o.y;E.resizable(e,"option","minWidth",n*Math.min(o.minW||1,t)).resizable(e,"option","minHeight",r*Math.min(o.minH||1,i)).resizable(e,"option","maxWidth",n*Math.min(o.maxW||Number.MAX_SAFE_INTEGER,t)).resizable(e,"option","maxWidthMoveLeft",n*Math.min(o.maxW||Number.MAX_SAFE_INTEGER,o.x+o.w)).resizable(e,"option","maxHeight",r*Math.min(o.maxH||Number.MAX_SAFE_INTEGER,i)).resizable(e,"option","maxHeightMoveUp",r*Math.min(o.maxH||Number.MAX_SAFE_INTEGER,o.y+o.h))}}_dragOrResize(e,t,s,o,n,r){const a={...o._orig};let h,l=this.opts.marginLeft,d=this.opts.marginRight,c=this.opts.marginTop,g=this.opts.marginBottom;const u=Math.round(.1*r),p=Math.round(.1*n);if(l=Math.min(l,p),d=Math.min(d,p),c=Math.min(c,u),g=Math.min(g,u),"drag"===t.type){if(o._temporaryRemoved)return;const t=s.position.top-o._prevYPix;o._prevYPix=s.position.top,!1!==this.opts.draggable.scroll&&i.updateScrollPosition(e,s.position,t);const h=s.position.left+(s.position.left>o._lastUiPosition.left?-d:l),u=s.position.top+(s.position.top>o._lastUiPosition.top?-g:c);a.x=Math.round(h/n),a.y=Math.round(u/r);const p=this._extraDragRow;if(this.engine.collide(o,a)){const e=this.getRow();let t=Math.max(0,a.y+o.h-e);this.opts.maxRow&&e+t>this.opts.maxRow&&(t=Math.max(0,this.opts.maxRow-e)),this._extraDragRow=t}else this._extraDragRow=0;if(this._extraDragRow!==p&&this._updateContainerHeight(),o.x===a.x&&o.y===a.y)return}else if("resize"===t.type){if(a.x<0)return;if(i.updateScrollResize(t,e,r),a.w=Math.round((s.size.width-l)/n),a.h=Math.round((s.size.height-c)/r),o.w===a.w&&o.h===a.h)return;if(o._lastTried&&o._lastTried.w===a.w&&o._lastTried.h===a.h)return;const d=s.position.left+l,g=s.position.top+c;a.x=Math.round(d/n),a.y=Math.round(g/r),h=!0}o._event=t,o._lastTried=a;const m={x:s.position.left+l,y:s.position.top+c,w:(s.size?s.size.width:o.w*n)-l-d,h:(s.size?s.size.height:o.h*r)-c-g};if(this.engine.moveNodeCheck(o,{...a,cellWidth:n,cellHeight:r,rect:m,resizing:h})){o._lastUiPosition=s.position,this.engine.cacheRects(n,r,c,d,g,l),delete o._skipDown,h&&o.subGrid&&o.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();const e=t.target;o._sidebarOrig||this._writePosAttr(e,o),this.triggerEvent(t,e)}}triggerEvent(e,t){let i=this;for(;i.parentGridNode;)i=i.parentGridNode.grid;i._gsEventHandler[e.type]&&i._gsEventHandler[e.type](e,t)}_leave(e,t){const i=(t=t||e).gridstackNode;if(!i)return;if(t.style.transform=t.style.transformOrigin=null,E.off(e,"drag"),i._temporaryRemoved)return;i._temporaryRemoved=!0,this.engine.removeNode(i),i.el=i._isExternal&&t?t:e;const s=i._sidebarOrig;i._isExternal&&this.engine.cleanupNode(i),i._sidebarOrig=s,!0===this.opts.removable&&x._itemRemoving(e,!0),e._gridstackNodeOrig?(e.gridstackNode=e._gridstackNodeOrig,delete e._gridstackNodeOrig):i._isExternal&&this.engine.restoreInitial()}commit(){return this.batchUpdate(!1).prototype,this}}return x.renderCB=(e,t)=>{e&&t?.content&&(e.textContent=t.content)},x.resizeToContentParent=".grid-stack-item-content",x.Utils=i,x.Engine=s,x.GDRev="12.3.3",t.GridStack})())); +//# sourceMappingURL=gridstack-all.js.map \ No newline at end of file diff --git a/node_modules/gridstack/dist/gridstack-all.js.LICENSE.txt b/node_modules/gridstack/dist/gridstack-all.js.LICENSE.txt new file mode 100644 index 000000000..49052fac2 --- /dev/null +++ b/node_modules/gridstack/dist/gridstack-all.js.LICENSE.txt @@ -0,0 +1,7 @@ +/*! + * GridStack 12.3.3 + * https://gridstackjs.com/ + * + * Copyright (c) 2021-2025 Alain Dumesny + * see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE + */ diff --git a/node_modules/gridstack/dist/gridstack-all.js.map b/node_modules/gridstack/dist/gridstack-all.js.map new file mode 100644 index 000000000..4cf19f354 --- /dev/null +++ b/node_modules/gridstack/dist/gridstack-all.js.map @@ -0,0 +1 @@ +{"version":3,"file":"gridstack-all.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAmB,UAAID,IAEvBD,EAAgB,UAAIC,GACrB,CATD,CASGK,MAAM,uBCRT,IAAIC,EAAsB,CCA1BA,EAAwB,CAACL,EAASM,KACjC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAER,EAASO,IAC5EE,OAAOC,eAAeV,EAASO,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDF,EAAwB,CAACQ,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,kCCgG3E,MAAMI,EAeX,kBAAOC,CAAYC,EAAuBtB,EAA+BuB,UACvE,GAAmB,iBAARD,EAAkB,CAC3B,MAAME,EAAO,mBAAoBxB,EAAQA,OAAmByB,EAK5D,GAAID,IAAQE,OAAOJ,EAAI,IAAK,CAC1B,MAAMK,EAAKH,EAAII,eAAeN,GAC9B,OAAOK,EAAK,CAACA,GAAM,GAGrB,IAAIE,EAAO7B,EAAK8B,iBAAiBR,GAKjC,OAJKO,EAAKE,QAAqB,MAAXT,EAAI,IAAyB,MAAXA,EAAI,KACxCO,EAAO7B,EAAK8B,iBAAiB,IAAMR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0BACfhxB,EAAGgxB,oBACDtsB,EAAKsrB,aAEd/jB,KAAKkO,OAAOzI,gBAEhB,CAGO,MAAA8gB,GAA+F,OAA1DvmB,KAAKM,aAAY,GXt6FvCjN,UWs6FuF2M,IAAM,SAzwFrG,EAAA2b,SAAuB,CAAC5nB,EAAiBgC,KAA2BhC,GAAMgC,GAAGsR,UAAStT,EAAGglB,YAAchjB,EAAEsR,QAAO,EAQhH,EAAAga,sBAAwB,2BAGxB,EAAA7tB,MAAQA,EAGR,EAAAgzB,OAAS5mB,EA06DhB,EAAA6mB,MAAQ","sources":["webpack://GridStack/webpack/universalModuleDefinition","webpack://GridStack/webpack/bootstrap","webpack://GridStack/webpack/runtime/define property getters","webpack://GridStack/webpack/runtime/hasOwnProperty shorthand","webpack://GridStack/./src/utils.ts","webpack://GridStack/./src/gridstack-engine.ts","webpack://GridStack/./src/types.ts","webpack://GridStack/./src/dd-manager.ts","webpack://GridStack/./src/dd-touch.ts","webpack://GridStack/./src/dd-resizable-handle.ts","webpack://GridStack/./src/dd-base-impl.ts","webpack://GridStack/./src/dd-resizable.ts","webpack://GridStack/./src/dd-draggable.ts","webpack://GridStack/./src/dd-droppable.ts","webpack://GridStack/./src/dd-element.ts","webpack://GridStack/./src/gridstack.ts","webpack://GridStack/./src/dd-gridstack.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"GridStack\"] = factory();\n\telse\n\t\troot[\"GridStack\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","/**\r\n * utils.ts 12.3.3\r\n * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license\r\n */\r\n\r\nimport { GridStackElement, GridStackNode, GridStackOptions, numberOrString, GridStackPosition, GridStackWidget } from './types';\r\n\r\nexport interface HeightData {\r\n h: number;\r\n unit: string;\r\n}\r\n\r\nexport interface DragTransform {\r\n xScale: number;\r\n yScale: number;\r\n xOffset: number;\r\n yOffset: number;\r\n}\r\n\r\n/**\r\n * @internal Checks for obsolete method names and provides deprecation warnings.\r\n * Creates a wrapper function that logs a deprecation warning when called.\r\n *\r\n * @param self the object context to apply the function to\r\n * @param f the new function to call\r\n * @param oldName the deprecated method name\r\n * @param newName the new method name to use instead\r\n * @param rev the version when the deprecation was introduced\r\n * @returns a wrapper function that warns about deprecation\r\n */\r\n// eslint-disable-next-line\r\nexport function obsolete(self, f, oldName: string, newName: string, rev: string): (...args: any[]) => any {\r\n const wrapper = (...args) => {\r\n console.warn('gridstack.js: Function `' + oldName + '` is deprecated in ' + rev + ' and has been replaced ' +\r\n 'with `' + newName + '`. It will be **removed** in a future release');\r\n return f.apply(self, args);\r\n }\r\n wrapper.prototype = f.prototype;\r\n return wrapper;\r\n}\r\n\r\n/**\r\n * @internal Checks for obsolete grid options and migrates them to new names.\r\n * Automatically copies old option values to new option names and shows deprecation warnings.\r\n *\r\n * @param opts the options object to check and migrate\r\n * @param oldName the deprecated option name\r\n * @param newName the new option name to use instead\r\n * @param rev the version when the deprecation was introduced\r\n */\r\nexport function obsoleteOpts(opts: GridStackOptions, oldName: string, newName: string, rev: string): void {\r\n if (opts[oldName] !== undefined) {\r\n opts[newName] = opts[oldName];\r\n console.warn('gridstack.js: Option `' + oldName + '` is deprecated in ' + rev + ' and has been replaced with `' +\r\n newName + '`. It will be **removed** in a future release');\r\n }\r\n}\r\n\r\n/**\r\n * @internal Checks for obsolete grid options that have been completely removed.\r\n * Shows deprecation warnings for options that are no longer supported.\r\n *\r\n * @param opts the options object to check\r\n * @param oldName the removed option name\r\n * @param rev the version when the option was removed\r\n * @param info additional information about the removal\r\n */\r\nexport function obsoleteOptsDel(opts: GridStackOptions, oldName: string, rev: string, info: string): void {\r\n if (opts[oldName] !== undefined) {\r\n console.warn('gridstack.js: Option `' + oldName + '` is deprecated in ' + rev + info);\r\n }\r\n}\r\n\r\n/**\r\n * @internal Checks for obsolete HTML element attributes and migrates them.\r\n * Automatically copies old attribute values to new attribute names and shows deprecation warnings.\r\n *\r\n * @param el the HTML element to check and migrate\r\n * @param oldName the deprecated attribute name\r\n * @param newName the new attribute name to use instead\r\n * @param rev the version when the deprecation was introduced\r\n */\r\nexport function obsoleteAttr(el: HTMLElement, oldName: string, newName: string, rev: string): void {\r\n const oldAttr = el.getAttribute(oldName);\r\n if (oldAttr !== null) {\r\n el.setAttribute(newName, oldAttr);\r\n console.warn('gridstack.js: attribute `' + oldName + '`=' + oldAttr + ' is deprecated on this object in ' + rev + ' and has been replaced with `' +\r\n newName + '`. It will be **removed** in a future release');\r\n }\r\n}\r\n\r\n/**\r\n * Collection of utility methods used throughout GridStack.\r\n * These are general-purpose helper functions for DOM manipulation,\r\n * positioning calculations, object operations, and more.\r\n */\r\nexport class Utils {\r\n\r\n /**\r\n * Convert a potential selector into an actual list of HTML elements.\r\n * Supports CSS selectors, element references, and special ID handling.\r\n *\r\n * @param els selector string, HTMLElement, or array of elements\r\n * @param root optional root element to search within (defaults to document, useful for shadow DOM)\r\n * @returns array of HTML elements matching the selector\r\n *\r\n * @example\r\n * const elements = Utils.getElements('.grid-item');\r\n * const byId = Utils.getElements('#myWidget');\r\n * const fromShadow = Utils.getElements('.item', shadowRoot);\r\n */\r\n static getElements(els: GridStackElement, root: HTMLElement | Document = document): HTMLElement[] {\r\n if (typeof els === 'string') {\r\n const doc = ('getElementById' in root) ? root as Document : undefined;\r\n\r\n // Note: very common for people use to id='1,2,3' which is only legal as HTML5 id, but not CSS selectors\r\n // so if we start with a number, assume it's an id and just return that one item...\r\n // see https://github.com/gridstack/gridstack.js/issues/2234#issuecomment-1523796562\r\n if (doc && !isNaN(+els[0])) { // start with digit\r\n const el = doc.getElementById(els);\r\n return el ? [el] : [];\r\n }\r\n\r\n let list = root.querySelectorAll(els);\r\n if (!list.length && els[0] !== '.' && els[0] !== '#') {\r\n list = root.querySelectorAll('.' + els);\r\n if (!list.length) { list = root.querySelectorAll('#' + els) }\r\n }\r\n return Array.from(list) as HTMLElement[];\r\n }\r\n return [els];\r\n }\r\n\r\n /**\r\n * Convert a potential selector into a single HTML element.\r\n * Similar to getElements() but returns only the first match.\r\n *\r\n * @param els selector string or HTMLElement\r\n * @param root optional root element to search within (defaults to document)\r\n * @returns the first HTML element matching the selector, or null if not found\r\n *\r\n * @example\r\n * const element = Utils.getElement('#myWidget');\r\n * const first = Utils.getElement('.grid-item');\r\n */\r\n static getElement(els: GridStackElement, root: HTMLElement | Document = document): HTMLElement {\r\n if (typeof els === 'string') {\r\n const doc = ('getElementById' in root) ? root as Document : undefined;\r\n if (!els.length) return null;\r\n if (doc && els[0] === '#') {\r\n return doc.getElementById(els.substring(1));\r\n }\r\n if (els[0] === '#' || els[0] === '.' || els[0] === '[') {\r\n return root.querySelector(els);\r\n }\r\n\r\n // if we start with a digit, assume it's an id (error calling querySelector('#1')) as class are not valid CSS\r\n if (doc && !isNaN(+els[0])) { // start with digit\r\n return doc.getElementById(els);\r\n }\r\n\r\n // finally try string, then id, then class\r\n let el = root.querySelector(els);\r\n if (doc && !el) { el = doc.getElementById(els) }\r\n if (!el) { el = root.querySelector('.' + els) }\r\n return el as HTMLElement;\r\n }\r\n return els;\r\n }\r\n\r\n /**\r\n * Check if a widget should be lazy loaded based on node or grid settings.\r\n *\r\n * @param n the grid node to check\r\n * @returns true if the item should be lazy loaded\r\n *\r\n * @example\r\n * if (Utils.lazyLoad(node)) {\r\n * // Set up intersection observer for lazy loading\r\n * }\r\n */\r\n static lazyLoad(n: GridStackNode): boolean {\r\n return n.lazyLoad || n.grid?.opts?.lazyLoad && n.lazyLoad !== false;\r\n }\r\n\r\n /**\r\n * Create a div element with the specified CSS classes.\r\n *\r\n * @param classes array of CSS class names to add\r\n * @param parent optional parent element to append the div to\r\n * @returns the created div element\r\n *\r\n * @example\r\n * const div = Utils.createDiv(['grid-item', 'draggable']);\r\n * const nested = Utils.createDiv(['content'], parentDiv);\r\n */\r\n static createDiv(classes: string[], parent?: HTMLElement): HTMLElement {\r\n const el = document.createElement('div');\r\n classes.forEach(c => {if (c) el.classList.add(c)});\r\n parent?.appendChild(el);\r\n return el;\r\n }\r\n\r\n /**\r\n * Check if a widget should resize to fit its content.\r\n *\r\n * @param n the grid node to check (can be undefined)\r\n * @param strict if true, only returns true for explicit sizeToContent:true (not numbers)\r\n * @returns true if the widget should resize to content\r\n *\r\n * @example\r\n * if (Utils.shouldSizeToContent(node)) {\r\n * // Trigger content-based resizing\r\n * }\r\n */\r\n static shouldSizeToContent(n: GridStackNode | undefined, strict = false): boolean {\r\n return n?.grid && (strict ?\r\n (n.sizeToContent === true || (n.grid.opts.sizeToContent === true && n.sizeToContent === undefined)) :\r\n (!!n.sizeToContent || (n.grid.opts.sizeToContent && n.sizeToContent !== false)));\r\n }\r\n\r\n /**\r\n * Check if two grid positions overlap/intersect.\r\n *\r\n * @param a first position with x, y, w, h properties\r\n * @param b second position with x, y, w, h properties\r\n * @returns true if the positions overlap\r\n *\r\n * @example\r\n * const overlaps = Utils.isIntercepted(\r\n * {x: 0, y: 0, w: 2, h: 1},\r\n * {x: 1, y: 0, w: 2, h: 1}\r\n * ); // true - they overlap\r\n */\r\n static isIntercepted(a: GridStackPosition, b: GridStackPosition): boolean {\r\n return !(a.y >= b.y + b.h || a.y + a.h <= b.y || a.x + a.w <= b.x || a.x >= b.x + b.w);\r\n }\r\n\r\n /**\r\n * Check if two grid positions are touching (edges or corners).\r\n *\r\n * @param a first position\r\n * @param b second position\r\n * @returns true if the positions are touching\r\n *\r\n * @example\r\n * const touching = Utils.isTouching(\r\n * {x: 0, y: 0, w: 2, h: 1},\r\n * {x: 2, y: 0, w: 1, h: 1}\r\n * ); // true - they share an edge\r\n */\r\n static isTouching(a: GridStackPosition, b: GridStackPosition): boolean {\r\n return Utils.isIntercepted(a, {x: b.x-0.5, y: b.y-0.5, w: b.w+1, h: b.h+1})\r\n }\r\n\r\n /**\r\n * Calculate the overlapping area between two grid positions.\r\n *\r\n * @param a first position\r\n * @param b second position\r\n * @returns the area of overlap (0 if no overlap)\r\n *\r\n * @example\r\n * const overlap = Utils.areaIntercept(\r\n * {x: 0, y: 0, w: 3, h: 2},\r\n * {x: 1, y: 0, w: 3, h: 2}\r\n * ); // returns 4 (2x2 overlap)\r\n */\r\n static areaIntercept(a: GridStackPosition, b: GridStackPosition): number {\r\n const x0 = (a.x > b.x) ? a.x : b.x;\r\n const x1 = (a.x+a.w < b.x+b.w) ? a.x+a.w : b.x+b.w;\r\n if (x1 <= x0) return 0; // no overlap\r\n const y0 = (a.y > b.y) ? a.y : b.y;\r\n const y1 = (a.y+a.h < b.y+b.h) ? a.y+a.h : b.y+b.h;\r\n if (y1 <= y0) return 0; // no overlap\r\n return (x1-x0) * (y1-y0);\r\n }\r\n\r\n /**\r\n * Calculate the total area of a grid position.\r\n *\r\n * @param a position with width and height\r\n * @returns the total area (width * height)\r\n *\r\n * @example\r\n * const area = Utils.area({x: 0, y: 0, w: 3, h: 2}); // returns 6\r\n */\r\n static area(a: GridStackPosition): number {\r\n return a.w * a.h;\r\n }\r\n\r\n /**\r\n * Sort an array of grid nodes by position (y first, then x).\r\n *\r\n * @param nodes array of nodes to sort\r\n * @param dir sort direction: 1 for ascending (top-left first), -1 for descending\r\n * @returns the sorted array (modifies original)\r\n *\r\n * @example\r\n * const sorted = Utils.sort(nodes); // Sort top-left to bottom-right\r\n * const reverse = Utils.sort(nodes, -1); // Sort bottom-right to top-left\r\n */\r\n static sort(nodes: GridStackNode[], dir: 1 | -1 = 1): GridStackNode[] {\r\n const und = 10000;\r\n return nodes.sort((a, b) => {\r\n const diffY = dir * ((a.y ?? und) - (b.y ?? und));\r\n if (diffY === 0) return dir * ((a.x ?? und) - (b.x ?? und));\r\n return diffY;\r\n });\r\n }\r\n\r\n /**\r\n * Find a grid node by its ID.\r\n *\r\n * @param nodes array of nodes to search\r\n * @param id the ID to search for\r\n * @returns the node with matching ID, or undefined if not found\r\n *\r\n * @example\r\n * const node = Utils.find(nodes, 'widget-1');\r\n * if (node) console.log('Found node at:', node.x, node.y);\r\n */\r\n static find(nodes: GridStackNode[], id: string): GridStackNode | undefined {\r\n return id ? nodes.find(n => n.id === id) : undefined;\r\n }\r\n\r\n /**\r\n * Convert various value types to boolean.\r\n * Handles strings like 'false', 'no', '0' as false.\r\n *\r\n * @param v value to convert\r\n * @returns boolean representation\r\n *\r\n * @example\r\n * Utils.toBool('true'); // true\r\n * Utils.toBool('false'); // false\r\n * Utils.toBool('no'); // false\r\n * Utils.toBool('1'); // true\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n static toBool(v: unknown): boolean {\r\n if (typeof v === 'boolean') {\r\n return v;\r\n }\r\n if (typeof v === 'string') {\r\n v = v.toLowerCase();\r\n return !(v === '' || v === 'no' || v === 'false' || v === '0');\r\n }\r\n return Boolean(v);\r\n }\r\n\r\n /**\r\n * Convert a string value to a number, handling null and empty strings.\r\n *\r\n * @param value string or null value to convert\r\n * @returns number value, or undefined for null/empty strings\r\n *\r\n * @example\r\n * Utils.toNumber('42'); // 42\r\n * Utils.toNumber(''); // undefined\r\n * Utils.toNumber(null); // undefined\r\n */\r\n static toNumber(value: null | string): number {\r\n return (value === null || value.length === 0) ? undefined : Number(value);\r\n }\r\n\r\n /**\r\n * Parse a height value with units into numeric value and unit string.\r\n * Supports px, em, rem, vh, vw, %, cm, mm units.\r\n *\r\n * @param val height value as number or string with units\r\n * @returns object with h (height) and unit properties\r\n *\r\n * @example\r\n * Utils.parseHeight('100px'); // {h: 100, unit: 'px'}\r\n * Utils.parseHeight('2rem'); // {h: 2, unit: 'rem'}\r\n * Utils.parseHeight(50); // {h: 50, unit: 'px'}\r\n */\r\n static parseHeight(val: numberOrString): HeightData {\r\n let h: number;\r\n let unit = 'px';\r\n if (typeof val === 'string') {\r\n if (val === 'auto' || val === '') h = 0;\r\n else {\r\n const match = val.match(/^(-[0-9]+\\.[0-9]+|[0-9]*\\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);\r\n if (!match) {\r\n throw new Error(`Invalid height val = ${val}`);\r\n }\r\n unit = match[2] || 'px';\r\n h = parseFloat(match[1]);\r\n }\r\n } else {\r\n h = val;\r\n }\r\n return { h, unit };\r\n }\r\n\r\n /**\r\n * Copy unset fields from source objects to target object (shallow merge with defaults).\r\n * Similar to Object.assign but only sets undefined/null fields.\r\n *\r\n * @param target the object to copy defaults into\r\n * @param sources one or more source objects to copy defaults from\r\n * @returns the modified target object\r\n *\r\n * @example\r\n * const config = { width: 100 };\r\n * Utils.defaults(config, { width: 200, height: 50 });\r\n * // config is now { width: 100, height: 50 }\r\n */\r\n // eslint-disable-next-line\r\n static defaults(target, ...sources): {} {\r\n\r\n sources.forEach(source => {\r\n for (const key in source) {\r\n if (!source.hasOwnProperty(key)) return;\r\n if (target[key] === null || target[key] === undefined) {\r\n target[key] = source[key];\r\n } else if (typeof source[key] === 'object' && typeof target[key] === 'object') {\r\n // property is an object, recursively add it's field over... #1373\r\n Utils.defaults(target[key], source[key]);\r\n }\r\n }\r\n });\r\n\r\n return target;\r\n }\r\n\r\n /**\r\n * Compare two objects for equality (shallow comparison).\r\n * Checks if objects have the same fields and values at one level deep.\r\n *\r\n * @param a first object to compare\r\n * @param b second object to compare\r\n * @returns true if objects have the same values\r\n *\r\n * @example\r\n * Utils.same({x: 1, y: 2}, {x: 1, y: 2}); // true\r\n * Utils.same({x: 1}, {x: 1, y: 2}); // false\r\n */\r\n static same(a: unknown, b: unknown): boolean {\r\n if (typeof a !== 'object') return a == b;\r\n if (typeof a !== typeof b) return false;\r\n // else we have object, check just 1 level deep for being same things...\r\n if (Object.keys(a).length !== Object.keys(b).length) return false;\r\n for (const key in a) {\r\n if (a[key] !== b[key]) return false;\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * Copy position and size properties from one widget to another.\r\n * Copies x, y, w, h and optionally min/max constraints.\r\n *\r\n * @param a target widget to copy to\r\n * @param b source widget to copy from\r\n * @param doMinMax if true, also copy min/max width/height constraints\r\n * @returns the target widget (a)\r\n *\r\n * @example\r\n * Utils.copyPos(widget1, widget2); // Copy position/size\r\n * Utils.copyPos(widget1, widget2, true); // Also copy constraints\r\n */\r\n static copyPos(a: GridStackWidget, b: GridStackWidget, doMinMax = false): GridStackWidget {\r\n if (b.x !== undefined) a.x = b.x;\r\n if (b.y !== undefined) a.y = b.y;\r\n if (b.w !== undefined) a.w = b.w;\r\n if (b.h !== undefined) a.h = b.h;\r\n if (doMinMax) {\r\n if (b.minW) a.minW = b.minW;\r\n if (b.minH) a.minH = b.minH;\r\n if (b.maxW) a.maxW = b.maxW;\r\n if (b.maxH) a.maxH = b.maxH;\r\n }\r\n return a;\r\n }\r\n\r\n /** true if a and b has same size & position */\r\n static samePos(a: GridStackPosition, b: GridStackPosition): boolean {\r\n return a && b && a.x === b.x && a.y === b.y && (a.w || 1) === (b.w || 1) && (a.h || 1) === (b.h || 1);\r\n }\r\n\r\n /** given a node, makes sure it's min/max are valid */\r\n static sanitizeMinMax(node: GridStackNode) {\r\n // remove 0, undefine, null\r\n if (!node.minW) { delete node.minW; }\r\n if (!node.minH) { delete node.minH; }\r\n if (!node.maxW) { delete node.maxW; }\r\n if (!node.maxH) { delete node.maxH; }\r\n }\r\n\r\n /** removes field from the first object if same as the second objects (like diffing) and internal '_' for saving */\r\n static removeInternalAndSame(a: unknown, b: unknown):void {\r\n if (typeof a !== 'object' || typeof b !== 'object') return;\r\n // skip arrays as we don't know how to hydrate them (unlike object spread operator)\r\n if (Array.isArray(a) || Array.isArray(b)) return;\r\n for (let key in a) {\r\n const aVal = a[key];\r\n const bVal = b[key];\r\n if (key[0] === '_' || aVal === bVal) {\r\n delete a[key]\r\n } else if (aVal && typeof aVal === 'object' && bVal !== undefined) {\r\n Utils.removeInternalAndSame(aVal, bVal);\r\n if (!Object.keys(aVal).length) { delete a[key] }\r\n }\r\n }\r\n }\r\n\r\n /** removes internal fields '_' and default values for saving */\r\n static removeInternalForSave(n: GridStackNode, removeEl = true): void {\r\n for (let key in n) { if (key[0] === '_' || n[key] === null || n[key] === undefined ) delete n[key]; }\r\n delete n.grid;\r\n if (removeEl) delete n.el;\r\n // delete default values (will be re-created on read)\r\n if (!n.autoPosition) delete n.autoPosition;\r\n if (!n.noResize) delete n.noResize;\r\n if (!n.noMove) delete n.noMove;\r\n if (!n.locked) delete n.locked;\r\n if (n.w === 1 || n.w === n.minW) delete n.w;\r\n if (n.h === 1 || n.h === n.minH) delete n.h;\r\n }\r\n\r\n /** return the closest parent (or itself) matching the given class */\r\n // static closestUpByClass(el: HTMLElement, name: string): HTMLElement {\r\n // while (el) {\r\n // if (el.classList.contains(name)) return el;\r\n // el = el.parentElement\r\n // }\r\n // return null;\r\n // }\r\n\r\n /** delay calling the given function for given delay, preventing new calls from happening while waiting */\r\n static throttle(func: () => void, delay: number): () => void {\r\n let isWaiting = false;\r\n return (...args) => {\r\n if (!isWaiting) {\r\n isWaiting = true;\r\n setTimeout(() => { func(...args); isWaiting = false; }, delay);\r\n }\r\n }\r\n }\r\n\r\n static removePositioningStyles(el: HTMLElement): void {\r\n const style = el.style;\r\n if (style.position) {\r\n style.removeProperty('position');\r\n }\r\n if (style.left) {\r\n style.removeProperty('left');\r\n }\r\n if (style.top) {\r\n style.removeProperty('top');\r\n }\r\n if (style.width) {\r\n style.removeProperty('width');\r\n }\r\n if (style.height) {\r\n style.removeProperty('height');\r\n }\r\n }\r\n\r\n /** @internal returns the passed element if scrollable, else the closest parent that will, up to the entire document scrolling element */\r\n static getScrollElement(el?: HTMLElement): HTMLElement {\r\n if (!el) return document.scrollingElement as HTMLElement || document.documentElement; // IE support\r\n const style = getComputedStyle(el);\r\n const overflowRegex = /(auto|scroll)/;\r\n\r\n if (overflowRegex.test(style.overflow + style.overflowY)) {\r\n return el;\r\n } else {\r\n return Utils.getScrollElement(el.parentElement);\r\n }\r\n }\r\n\r\n /** @internal */\r\n static updateScrollPosition(el: HTMLElement, position: {top: number}, distance: number): void {\r\n const scrollEl = Utils.getScrollElement(el);\r\n if (!scrollEl) return;\r\n\r\n const elRect = el.getBoundingClientRect();\r\n const scrollRect = scrollEl.getBoundingClientRect();\r\n const innerHeightOrClientHeight = (window.innerHeight || document.documentElement.clientHeight);\r\n\r\n const offsetDiffDown = elRect.bottom - Math.min(scrollRect.bottom, innerHeightOrClientHeight);\r\n const offsetDiffUp = elRect.top - Math.max(scrollRect.top, 0);\r\n const prevScroll = scrollEl.scrollTop;\r\n\r\n if (offsetDiffUp < 0 && distance < 0) {\r\n // scroll up\r\n if (el.offsetHeight > scrollRect.height) {\r\n scrollEl.scrollTop += distance;\r\n } else {\r\n scrollEl.scrollTop += Math.abs(offsetDiffUp) > Math.abs(distance) ? distance : offsetDiffUp;\r\n }\r\n } else if (offsetDiffDown > 0 && distance > 0) {\r\n // scroll down\r\n if (el.offsetHeight > scrollRect.height) {\r\n scrollEl.scrollTop += distance;\r\n } else {\r\n scrollEl.scrollTop += offsetDiffDown > distance ? distance : offsetDiffDown;\r\n }\r\n }\r\n\r\n position.top += scrollEl.scrollTop - prevScroll;\r\n }\r\n\r\n /**\r\n * @internal Function used to scroll the page.\r\n *\r\n * @param event `MouseEvent` that triggers the resize\r\n * @param el `HTMLElement` that's being resized\r\n * @param distance Distance from the V edges to start scrolling\r\n */\r\n static updateScrollResize(event: MouseEvent, el: HTMLElement, distance: number): void {\r\n const scrollEl = Utils.getScrollElement(el);\r\n const height = scrollEl.clientHeight;\r\n // #1727 event.clientY is relative to viewport, so must compare this against position of scrollEl getBoundingClientRect().top\r\n // #1745 Special situation if scrollEl is document 'html': here browser spec states that\r\n // clientHeight is height of viewport, but getBoundingClientRect() is rectangle of html element;\r\n // this discrepancy arises because in reality scrollbar is attached to viewport, not html element itself.\r\n const offsetTop = (scrollEl === Utils.getScrollElement()) ? 0 : scrollEl.getBoundingClientRect().top;\r\n const pointerPosY = event.clientY - offsetTop;\r\n const top = pointerPosY < distance;\r\n const bottom = pointerPosY > height - distance;\r\n\r\n if (top) {\r\n // This also can be done with a timeout to keep scrolling while the mouse is\r\n // in the scrolling zone. (will have smoother behavior)\r\n scrollEl.scrollBy({ behavior: 'smooth', top: pointerPosY - distance});\r\n } else if (bottom) {\r\n scrollEl.scrollBy({ behavior: 'smooth', top: distance - (height - pointerPosY)});\r\n }\r\n }\r\n\r\n /** single level clone, returning a new object with same top fields. This will share sub objects and arrays */\r\n static clone(obj: T): T {\r\n if (obj === null || obj === undefined || typeof(obj) !== 'object') {\r\n return obj;\r\n }\r\n // return Object.assign({}, obj);\r\n if (obj instanceof Array) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n return [...obj] as any;\r\n }\r\n return {...obj};\r\n }\r\n\r\n /**\r\n * Recursive clone version that returns a full copy, checking for nested objects and arrays ONLY.\r\n * Note: this will use as-is any key starting with double __ (and not copy inside) some lib have circular dependencies.\r\n */\r\n static cloneDeep(obj: T): T {\r\n // list of fields we will skip during cloneDeep (nested objects, other internal)\r\n const skipFields = ['parentGrid', 'el', 'grid', 'subGrid', 'engine'];\r\n // return JSON.parse(JSON.stringify(obj)); // doesn't work with date format ?\r\n const ret = Utils.clone(obj);\r\n for (const key in ret) {\r\n // NOTE: we don't support function/circular dependencies so skip those properties for now...\r\n if (ret.hasOwnProperty(key) && typeof(ret[key]) === 'object' && key.substring(0, 2) !== '__' && !skipFields.find(k => k === key)) {\r\n ret[key] = Utils.cloneDeep(obj[key]);\r\n }\r\n }\r\n return ret;\r\n }\r\n\r\n /** deep clone the given HTML node, removing teh unique id field */\r\n public static cloneNode(el: HTMLElement): HTMLElement {\r\n const node = el.cloneNode(true) as HTMLElement;\r\n node.removeAttribute('id');\r\n return node;\r\n }\r\n\r\n public static appendTo(el: HTMLElement, parent: string | HTMLElement): void {\r\n let parentNode: HTMLElement;\r\n if (typeof parent === 'string') {\r\n parentNode = Utils.getElement(parent);\r\n } else {\r\n parentNode = parent;\r\n }\r\n if (parentNode) {\r\n parentNode.appendChild(el);\r\n }\r\n }\r\n\r\n // public static setPositionRelative(el: HTMLElement): void {\r\n // if (!(/^(?:r|a|f)/).test(getComputedStyle(el).position)) {\r\n // el.style.position = \"relative\";\r\n // }\r\n // }\r\n\r\n public static addElStyles(el: HTMLElement, styles: { [prop: string]: string | string[] }): void {\r\n if (styles instanceof Object) {\r\n for (const s in styles) {\r\n if (styles.hasOwnProperty(s)) {\r\n if (Array.isArray(styles[s])) {\r\n // support fallback value\r\n (styles[s] as string[]).forEach(val => {\r\n el.style[s] = val;\r\n });\r\n } else {\r\n el.style[s] = styles[s];\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n public static initEvent(e: DragEvent | MouseEvent, info: { type: string; target?: EventTarget }): T {\r\n const evt = { type: info.type };\r\n const obj = {\r\n button: 0,\r\n which: 0,\r\n buttons: 1,\r\n bubbles: true,\r\n cancelable: true,\r\n target: info.target ? info.target : e.target\r\n };\r\n ['altKey','ctrlKey','metaKey','shiftKey'].forEach(p => evt[p] = e[p]); // keys\r\n ['pageX','pageY','clientX','clientY','screenX','screenY'].forEach(p => evt[p] = e[p]); // point info\r\n return {...evt, ...obj} as unknown as T;\r\n }\r\n\r\n /** copies the MouseEvent (or convert Touch) properties and sends it as another event to the given target */\r\n public static simulateMouseEvent(e: MouseEvent | Touch, simulatedType: string, target?: EventTarget): void {\r\n const me = e as MouseEvent;\r\n const simulatedEvent = new MouseEvent(simulatedType, {\r\n bubbles: true,\r\n composed: true,\r\n cancelable: true,\r\n view: window,\r\n detail: 1,\r\n screenX: e.screenX,\r\n screenY: e.screenY,\r\n clientX: e.clientX,\r\n clientY: e.clientY,\r\n ctrlKey: me.ctrlKey??false,\r\n altKey: me.altKey??false,\r\n shiftKey: me.shiftKey??false,\r\n metaKey: me.metaKey??false,\r\n button: 0,\r\n relatedTarget: e.target\r\n });\r\n\r\n (target || e.target).dispatchEvent(simulatedEvent);\r\n }\r\n\r\n /**\r\n * defines an element that is used to get the offset and scale from grid transforms\r\n * returns the scale and offsets from said element\r\n */\r\n public static getValuesFromTransformedElement(parent: HTMLElement): DragTransform {\r\n const transformReference = document.createElement('div');\r\n Utils.addElStyles(transformReference, {\r\n opacity: '0',\r\n position: 'fixed',\r\n top: 0 + 'px',\r\n left: 0 + 'px',\r\n width: '1px',\r\n height: '1px',\r\n zIndex: '-999999',\r\n });\r\n parent.appendChild(transformReference);\r\n const transformValues = transformReference.getBoundingClientRect();\r\n parent.removeChild(transformReference);\r\n transformReference.remove();\r\n return {\r\n xScale: 1 / transformValues.width,\r\n yScale: 1 / transformValues.height,\r\n xOffset: transformValues.left,\r\n yOffset: transformValues.top,\r\n }\r\n }\r\n\r\n /** swap the given object 2 field values */\r\n public static swap(o: unknown, a: string, b: string): void {\r\n if (!o) return;\r\n const tmp = o[a]; o[a] = o[b]; o[b] = tmp;\r\n }\r\n\r\n /** returns true if event is inside the given element rectangle */\r\n // Note: Safari Mac has null event.relatedTarget which causes #1684 so check if DragEvent is inside the coordinates instead\r\n // Utils.el.contains(event.relatedTarget as HTMLElement)\r\n // public static inside(e: MouseEvent, el: HTMLElement): boolean {\r\n // // srcElement, toElement, target: all set to placeholder when leaving simple grid, so we can't use that (Chrome)\r\n // const target: HTMLElement = e.relatedTarget || (e as any).fromElement;\r\n // if (!target) {\r\n // const { bottom, left, right, top } = el.getBoundingClientRect();\r\n // return (e.x < right && e.x > left && e.y < bottom && e.y > top);\r\n // }\r\n // return el.contains(target);\r\n // }\r\n\r\n /** true if the item can be rotated (checking for prop, not space available) */\r\n public static canBeRotated(n: GridStackNode): boolean {\r\n return !(!n || n.w === n.h || n.locked || n.noResize || n.grid?.opts.disableResize || (n.minW && n.minW === n.maxW) || (n.minH && n.minH === n.maxH));\r\n }\r\n}","/**\n * gridstack-engine.ts 12.3.3\n * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license\n */\n\nimport { Utils } from './utils';\nimport { GridStackNode, ColumnOptions, GridStackPosition, GridStackMoveOpts, SaveFcn, CompactOptions } from './types';\n\n/** callback to update the DOM attributes since this class is generic (no HTML or other info) for items that changed - see _notify() */\ntype OnChangeCB = (nodes: GridStackNode[]) => void;\n\n/** options used during creation - similar to GridStackOptions */\nexport interface GridStackEngineOptions {\n column?: number;\n maxRow?: number;\n float?: boolean;\n nodes?: GridStackNode[];\n onChange?: OnChangeCB;\n}\n\n/**\n * Defines the GridStack engine that handles all grid layout calculations and node positioning.\n * This is the core engine that performs grid manipulation without any DOM operations.\n *\n * The engine manages:\n * - Node positioning and collision detection\n * - Layout algorithms (compact, float, etc.)\n * - Grid resizing and column changes\n * - Widget movement and resizing logic\n *\n * NOTE: Values should not be modified directly - use the main GridStack API instead\n * to ensure proper DOM updates and event triggers.\n */\nexport class GridStackEngine {\n public column: number;\n public maxRow: number;\n public nodes: GridStackNode[];\n public addedNodes: GridStackNode[] = [];\n public removedNodes: GridStackNode[] = [];\n public batchMode: boolean;\n public defaultColumn = 12;\n /** @internal callback to update the DOM attributes */\n protected onChange: OnChangeCB;\n /** @internal */\n protected _float: boolean;\n /** @internal */\n protected _prevFloat: boolean;\n /** @internal cached layouts of difference column count so we can restore back (eg 12 -> 1 -> 12) */\n protected _layouts?: GridStackNode[][]; // maps column # to array of values nodes\n /** @internal set during loading (which is sorted) so item gets added AFTER collision nodes */\n public _loading?: boolean\n /** @internal true while we are resizing widgets during column resize to skip certain parts */\n protected _inColumnResize?: boolean;\n /** true when grid.load() already cached the layout and can skip out of bound caching info */\n public skipCacheUpdate?: boolean;\n /** @internal true if we have some items locked */\n protected _hasLocked: boolean;\n /** @internal unique global internal _id counter */\n public static _idSeq = 0;\n\n public constructor(opts: GridStackEngineOptions = {}) {\n this.column = opts.column || this.defaultColumn;\n if (this.column > this.defaultColumn) this.defaultColumn = this.column;\n this.maxRow = opts.maxRow;\n this._float = opts.float;\n this.nodes = opts.nodes || [];\n this.onChange = opts.onChange;\n }\n\n /**\n * Enable/disable batch mode for multiple operations to optimize performance.\n * When enabled, layout updates are deferred until batch mode is disabled.\n *\n * @param flag true to enable batch mode, false to disable and apply changes\n * @param doPack if true (default), pack/compact nodes when disabling batch mode\n * @returns the engine instance for chaining\n *\n * @example\n * // Start batch mode for multiple operations\n * engine.batchUpdate(true);\n * engine.addNode(node1);\n * engine.addNode(node2);\n * engine.batchUpdate(false); // Apply all changes at once\n */\n public batchUpdate(flag = true, doPack = true): GridStackEngine {\n if (!!this.batchMode === flag) return this;\n this.batchMode = flag;\n if (flag) {\n this._prevFloat = this._float;\n this._float = true; // let things go anywhere for now... will restore and possibly reposition later\n this.cleanNodes();\n this.saveInitial(); // since begin update (which is called multiple times) won't do this\n } else {\n this._float = this._prevFloat;\n delete this._prevFloat;\n if (doPack) this._packNodes();\n this._notify();\n }\n return this;\n }\n\n // use entire row for hitting area (will use bottom reverse sorted first) if we not actively moving DOWN and didn't already skip\n protected _useEntireRowArea(node: GridStackNode, nn: GridStackPosition): boolean {\n return (!this.float || this.batchMode && !this._prevFloat) && !this._hasLocked && (!node._moving || node._skipDown || nn.y <= node.y);\n }\n\n /** @internal fix collision on given 'node', going to given new location 'nn', with optional 'collide' node already found.\n * return true if we moved. */\n protected _fixCollisions(node: GridStackNode, nn = node, collide?: GridStackNode, opt: GridStackMoveOpts = {}): boolean {\n this.sortNodes(-1); // from last to first, so recursive collision move items in the right order\n\n collide = collide || this.collide(node, nn); // REAL area collide for swap and skip if none...\n if (!collide) return false;\n\n // swap check: if we're actively moving in gravity mode, see if we collide with an object the same size\n if (node._moving && !opt.nested && !this.float) {\n if (this.swap(node, collide)) return true;\n }\n\n // during while() collisions MAKE SURE to check entire row so larger items don't leap frog small ones (push them all down starting last in grid)\n let area = nn;\n if (!this._loading && this._useEntireRowArea(node, nn)) {\n area = {x: 0, w: this.column, y: nn.y, h: nn.h};\n collide = this.collide(node, area, opt.skip); // force new hit\n }\n\n let didMove = false;\n const newOpt: GridStackMoveOpts = {nested: true, pack: false};\n let counter = 0;\n while (collide = collide || this.collide(node, area, opt.skip)) { // could collide with more than 1 item... so repeat for each\n if (counter++ > this.nodes.length * 2) {\n throw new Error(\"Infinite collide check\");\n }\n let moved: boolean;\n // if colliding with a locked item OR loading (move after) OR moving down with top gravity (and collide could move up) -> skip past the collide,\n // but remember that skip down so we only do this once (and push others otherwise).\n if (collide.locked || this._loading || node._moving && !node._skipDown && nn.y > node.y && !this.float &&\n // can take space we had, or before where we're going\n (!this.collide(collide, {...collide, y: node.y}, node) || !this.collide(collide, {...collide, y: nn.y - collide.h}, node))) {\n\n node._skipDown = (node._skipDown || nn.y > node.y);\n const newNN = {...nn, y: collide.y + collide.h, ...newOpt};\n // pretent we moved to where we are now so we can continue any collision checks #2492\n moved = this._loading && Utils.samePos(node, newNN) ? true : this.moveNode(node, newNN);\n\n if ((collide.locked || this._loading) && moved) {\n Utils.copyPos(nn, node); // moving after lock become our new desired location\n } else if (!collide.locked && moved && opt.pack) {\n // we moved after and will pack: do it now and keep the original drop location, but past the old collide to see what else we might push way\n this._packNodes();\n nn.y = collide.y + collide.h;\n Utils.copyPos(node, nn);\n }\n didMove = didMove || moved;\n } else {\n // move collide down *after* where we will be, ignoring where we are now (don't collide with us)\n moved = this.moveNode(collide, {...collide, y: nn.y + nn.h, skip: node, ...newOpt});\n }\n\n if (!moved) return didMove; // break inf loop if we couldn't move after all (ex: maxRow, fixed)\n\n collide = undefined;\n }\n return didMove;\n }\n\n /**\n * Return the first node that intercepts/collides with the given node or area.\n * Used for collision detection during drag and drop operations.\n *\n * @param skip the node to skip in collision detection (usually the node being moved)\n * @param area the area to check for collisions (defaults to skip node's area)\n * @param skip2 optional second node to skip in collision detection\n * @returns the first colliding node, or undefined if no collision\n *\n * @example\n * const colliding = engine.collide(draggedNode, {x: 2, y: 1, w: 2, h: 1});\n * if (colliding) {\n * console.log('Would collide with:', colliding.id);\n * }\n */\n public collide(skip: GridStackNode, area = skip, skip2?: GridStackNode): GridStackNode | undefined {\n const skipId = skip._id;\n const skip2Id = skip2?._id;\n return this.nodes.find(n => n._id !== skipId && n._id !== skip2Id && Utils.isIntercepted(n, area));\n }\n /**\n * Return all nodes that intercept/collide with the given node or area.\n * Similar to collide() but returns all colliding nodes instead of just the first.\n *\n * @param skip the node to skip in collision detection\n * @param area the area to check for collisions (defaults to skip node's area)\n * @param skip2 optional second node to skip in collision detection\n * @returns array of all colliding nodes\n *\n * @example\n * const allCollisions = engine.collideAll(draggedNode);\n * console.log('Colliding with', allCollisions.length, 'nodes');\n */\n public collideAll(skip: GridStackNode, area = skip, skip2?: GridStackNode): GridStackNode[] {\n const skipId = skip._id;\n const skip2Id = skip2?._id;\n return this.nodes.filter(n => n._id !== skipId && n._id !== skip2Id && Utils.isIntercepted(n, area));\n }\n\n /** does a pixel coverage collision based on where we started, returning the node that has the most coverage that is >50% mid line */\n protected directionCollideCoverage(node: GridStackNode, o: GridStackMoveOpts, collides: GridStackNode[]): GridStackNode | undefined {\n if (!o.rect || !node._rect) return;\n const r0 = node._rect; // where started\n const r = {...o.rect}; // where we are\n\n // update dragged rect to show where it's coming from (above or below, etc...)\n if (r.y > r0.y) {\n r.h += r.y - r0.y;\n r.y = r0.y;\n } else {\n r.h += r0.y - r.y;\n }\n if (r.x > r0.x) {\n r.w += r.x - r0.x;\n r.x = r0.x;\n } else {\n r.w += r0.x - r.x;\n }\n\n let collide: GridStackNode;\n let overMax = 0.5; // need >50%\n for (let n of collides) {\n if (n.locked || !n._rect) {\n break;\n }\n const r2 = n._rect; // overlapping target\n let yOver = Number.MAX_VALUE, xOver = Number.MAX_VALUE;\n // depending on which side we started from, compute the overlap % of coverage\n // (ex: from above/below we only compute the max horizontal line coverage)\n if (r0.y < r2.y) { // from above\n yOver = ((r.y + r.h) - r2.y) / r2.h;\n } else if (r0.y + r0.h > r2.y + r2.h) { // from below\n yOver = ((r2.y + r2.h) - r.y) / r2.h;\n }\n if (r0.x < r2.x) { // from the left\n xOver = ((r.x + r.w) - r2.x) / r2.w;\n } else if (r0.x + r0.w > r2.x + r2.w) { // from the right\n xOver = ((r2.x + r2.w) - r.x) / r2.w;\n }\n const over = Math.min(xOver, yOver);\n if (over > overMax) {\n overMax = over;\n collide = n;\n }\n }\n o.collide = collide; // save it so we don't have to find it again\n return collide;\n }\n\n /** does a pixel coverage returning the node that has the most coverage by area */\n /*\n protected collideCoverage(r: GridStackPosition, collides: GridStackNode[]): {collide: GridStackNode, over: number} {\n const collide: GridStackNode;\n const overMax = 0;\n collides.forEach(n => {\n if (n.locked || !n._rect) return;\n const over = Utils.areaIntercept(r, n._rect);\n if (over > overMax) {\n overMax = over;\n collide = n;\n }\n });\n return {collide, over: overMax};\n }\n */\n\n /**\n * Cache the pixel rectangles for all nodes used for collision detection during drag operations.\n * This optimization converts grid coordinates to pixel coordinates for faster collision detection.\n *\n * @param w width of a single grid cell in pixels\n * @param h height of a single grid cell in pixels\n * @param top top margin/padding in pixels\n * @param right right margin/padding in pixels\n * @param bottom bottom margin/padding in pixels\n * @param left left margin/padding in pixels\n * @returns the engine instance for chaining\n *\n * @internal This is typically called by GridStack during resize events\n */\n public cacheRects(w: number, h: number, top: number, right: number, bottom: number, left: number): GridStackEngine\n {\n this.nodes.forEach(n =>\n n._rect = {\n y: n.y * h + top,\n x: n.x * w + left,\n w: n.w * w - left - right,\n h: n.h * h - top - bottom\n }\n );\n return this;\n }\n\n /**\n * Attempt to swap the positions of two nodes if they meet swapping criteria.\n * Nodes can swap if they are the same size or in the same column/row, not locked, and touching.\n *\n * @param a first node to swap\n * @param b second node to swap\n * @returns true if swap was successful, false if not possible, undefined if not applicable\n *\n * @example\n * const swapped = engine.swap(nodeA, nodeB);\n * if (swapped) {\n * console.log('Nodes swapped successfully');\n * }\n */\n public swap(a: GridStackNode, b: GridStackNode): boolean | undefined {\n if (!b || b.locked || !a || a.locked) return false;\n\n function _doSwap(): true { // assumes a is before b IFF they have different height (put after rather than exact swap)\n const x = b.x, y = b.y;\n b.x = a.x; b.y = a.y; // b -> a position\n if (a.h != b.h) {\n a.x = x; a.y = b.y + b.h; // a -> goes after b\n } else if (a.w != b.w) {\n a.x = b.x + b.w; a.y = y; // a -> goes after b\n } else {\n a.x = x; a.y = y; // a -> old b position\n }\n a._dirty = b._dirty = true;\n return true;\n }\n let touching: boolean; // remember if we called it (vs undefined)\n\n // same size and same row or column, and touching\n if (a.w === b.w && a.h === b.h && (a.x === b.x || a.y === b.y) && (touching = Utils.isTouching(a, b)))\n return _doSwap();\n if (touching === false) return; // IFF ran test and fail, bail out\n\n // check for taking same columns (but different height) and touching\n if (a.w === b.w && a.x === b.x && (touching || (touching = Utils.isTouching(a, b)))) {\n if (b.y < a.y) { const t = a; a = b; b = t; } // swap a <-> b vars so a is first\n return _doSwap();\n }\n if (touching === false) return;\n\n // check if taking same row (but different width) and touching\n if (a.h === b.h && a.y === b.y && (touching || (touching = Utils.isTouching(a, b)))) {\n if (b.x < a.x) { const t = a; a = b; b = t; } // swap a <-> b vars so a is first\n return _doSwap();\n }\n return false;\n }\n\n /**\n * Check if the specified rectangular area is empty (no nodes occupy any part of it).\n *\n * @param x the x coordinate (column) of the area to check\n * @param y the y coordinate (row) of the area to check\n * @param w the width in columns of the area to check\n * @param h the height in rows of the area to check\n * @returns true if the area is completely empty, false if any node overlaps\n *\n * @example\n * if (engine.isAreaEmpty(2, 1, 3, 2)) {\n * console.log('Area is available for placement');\n * }\n */\n public isAreaEmpty(x: number, y: number, w: number, h: number): boolean {\n const nn: GridStackNode = {x: x || 0, y: y || 0, w: w || 1, h: h || 1};\n return !this.collide(nn);\n }\n\n /**\n * Re-layout grid items to reclaim any empty space.\n * This optimizes the grid layout by moving items to fill gaps.\n *\n * @param layout layout algorithm to use:\n * - 'compact' (default): find truly empty spaces, may reorder items\n * - 'list': keep the sort order exactly the same, move items up sequentially\n * @param doSort if true (default), sort nodes by position before compacting\n * @returns the engine instance for chaining\n *\n * @example\n * // Compact to fill empty spaces\n * engine.compact();\n *\n * // Compact preserving item order\n * engine.compact('list');\n */\n public compact(layout: CompactOptions = 'compact', doSort = true): GridStackEngine {\n if (this.nodes.length === 0) return this;\n if (doSort) this.sortNodes();\n const wasBatch = this.batchMode;\n if (!wasBatch) this.batchUpdate();\n const wasColumnResize = this._inColumnResize;\n if (!wasColumnResize) this._inColumnResize = true; // faster addNode()\n const copyNodes = this.nodes;\n this.nodes = []; // pretend we have no nodes to conflict layout to start with...\n copyNodes.forEach((n, index, list) => {\n let after: GridStackNode;\n if (!n.locked) {\n n.autoPosition = true;\n if (layout === 'list' && index) after = list[index - 1];\n }\n this.addNode(n, false, after); // 'false' for add event trigger\n });\n if (!wasColumnResize) delete this._inColumnResize;\n if (!wasBatch) this.batchUpdate(false);\n return this;\n }\n\n /**\n * Enable/disable floating widgets (default: `false`).\n * When floating is enabled, widgets can move up to fill empty spaces.\n * See [example](http://gridstackjs.com/demo/float.html)\n *\n * @param val true to enable floating, false to disable\n *\n * @example\n * engine.float = true; // Enable floating\n * engine.float = false; // Disable floating (default)\n */\n public set float(val: boolean) {\n if (this._float === val) return;\n this._float = val || false;\n if (!val) {\n this._packNodes()._notify();\n }\n }\n\n /**\n * Get the current floating mode setting.\n *\n * @returns true if floating is enabled, false otherwise\n *\n * @example\n * const isFloating = engine.float;\n * console.log('Floating enabled:', isFloating);\n */\n public get float(): boolean { return this._float || false; }\n\n /**\n * Sort the nodes array from first to last, or reverse.\n * This is called during collision/placement operations to enforce a specific order.\n *\n * @param dir sort direction: 1 for ascending (first to last), -1 for descending (last to first)\n * @returns the engine instance for chaining\n *\n * @example\n * engine.sortNodes(); // Sort ascending (default)\n * engine.sortNodes(-1); // Sort descending\n */\n public sortNodes(dir: 1 | -1 = 1): GridStackEngine {\n this.nodes = Utils.sort(this.nodes, dir);\n return this;\n }\n\n /** @internal called to top gravity pack the items back OR revert back to original Y positions when floating */\n protected _packNodes(): GridStackEngine {\n if (this.batchMode) { return this; }\n this.sortNodes(); // first to last\n\n if (this.float) {\n // restore original Y pos\n this.nodes.forEach(n => {\n if (n._updating || n._orig === undefined || n.y === n._orig.y) return;\n let newY = n.y;\n while (newY > n._orig.y) {\n --newY;\n const collide = this.collide(n, {x: n.x, y: newY, w: n.w, h: n.h});\n if (!collide) {\n n._dirty = true;\n n.y = newY;\n }\n }\n });\n } else {\n // top gravity pack\n this.nodes.forEach((n, i) => {\n if (n.locked) return;\n while (n.y > 0) {\n const newY = i === 0 ? 0 : n.y - 1;\n const canBeMoved = i === 0 || !this.collide(n, {x: n.x, y: newY, w: n.w, h: n.h});\n if (!canBeMoved) break;\n // Note: must be dirty (from last position) for GridStack::OnChange CB to update positions\n // and move items back. The user 'change' CB should detect changes from the original\n // starting position instead.\n n._dirty = (n.y !== newY);\n n.y = newY;\n }\n });\n }\n return this;\n }\n\n /**\n * Prepare and validate a node's coordinates and values for the current grid.\n * This ensures the node has valid position, size, and properties before being added to the grid.\n *\n * @param node the node to prepare and validate\n * @param resizing if true, resize the node down if it's out of bounds; if false, move it to fit\n * @returns the prepared node with valid coordinates\n *\n * @example\n * const node = { w: 3, h: 2, content: 'Hello' };\n * const prepared = engine.prepareNode(node);\n * console.log('Node prepared at:', prepared.x, prepared.y);\n */\n public prepareNode(node: GridStackNode, resizing?: boolean): GridStackNode {\n node._id = node._id ?? GridStackEngine._idSeq++;\n\n // make sure USER supplied id are unique in our list, else assign a new one as it will create issues during load/update/etc...\n const id = node.id;\n if (id) {\n let count = 1; // append nice _n rather than some random number\n while (this.nodes.find(n => n.id === node.id && n !== node)) {\n node.id = id + '_' + (count++);\n }\n }\n\n // if we're missing position, have the grid position us automatically (before we set them to 0,0)\n if (node.x === undefined || node.y === undefined || node.x === null || node.y === null) {\n node.autoPosition = true;\n }\n\n // assign defaults for missing required fields\n const defaults: GridStackNode = { x: 0, y: 0, w: 1, h: 1};\n Utils.defaults(node, defaults);\n\n if (!node.autoPosition) { delete node.autoPosition; }\n if (!node.noResize) { delete node.noResize; }\n if (!node.noMove) { delete node.noMove; }\n Utils.sanitizeMinMax(node);\n\n // check for NaN (in case messed up strings were passed. can't do parseInt() || defaults.x above as 0 is valid #)\n if (typeof node.x == 'string') { node.x = Number(node.x); }\n if (typeof node.y == 'string') { node.y = Number(node.y); }\n if (typeof node.w == 'string') { node.w = Number(node.w); }\n if (typeof node.h == 'string') { node.h = Number(node.h); }\n if (isNaN(node.x)) { node.x = defaults.x; node.autoPosition = true; }\n if (isNaN(node.y)) { node.y = defaults.y; node.autoPosition = true; }\n if (isNaN(node.w)) { node.w = defaults.w; }\n if (isNaN(node.h)) { node.h = defaults.h; }\n\n this.nodeBoundFix(node, resizing);\n return node;\n }\n\n /**\n * Part 2 of preparing a node to fit inside the grid - validates and fixes coordinates and dimensions.\n * This ensures the node fits within grid boundaries and respects min/max constraints.\n *\n * @param node the node to validate and fix\n * @param resizing if true, resize the node to fit; if false, move the node to fit\n * @returns the engine instance for chaining\n *\n * @example\n * // Fix a node that might be out of bounds\n * engine.nodeBoundFix(node, true); // Resize to fit\n * engine.nodeBoundFix(node, false); // Move to fit\n */\n public nodeBoundFix(node: GridStackNode, resizing?: boolean): GridStackEngine {\n\n const before = node._orig || Utils.copyPos({}, node);\n\n if (node.maxW) { node.w = Math.min(node.w || 1, node.maxW); }\n if (node.maxH) { node.h = Math.min(node.h || 1, node.maxH); }\n if (node.minW) { node.w = Math.max(node.w || 1, node.minW); }\n if (node.minH) { node.h = Math.max(node.h || 1, node.minH); }\n\n // if user loaded a larger than allowed widget for current # of columns,\n // remember it's position & width so we can restore back (1 -> 12 column) #1655 #1985\n // IFF we're not in the middle of column resizing!\n const saveOrig = (node.x || 0) + (node.w || 1) > this.column;\n if (saveOrig && this.column < this.defaultColumn && !this._inColumnResize && !this.skipCacheUpdate && node._id != null && this.findCacheLayout(node, this.defaultColumn) === -1) {\n const copy = {...node}; // need _id + positions\n if (copy.autoPosition || copy.x === undefined) { delete copy.x; delete copy.y; }\n else copy.x = Math.min(this.defaultColumn - 1, copy.x);\n copy.w = Math.min(this.defaultColumn, copy.w || 1);\n this.cacheOneLayout(copy, this.defaultColumn);\n }\n\n if (node.w > this.column) {\n node.w = this.column;\n } else if (node.w < 1) {\n node.w = 1;\n }\n\n if (this.maxRow && node.h > this.maxRow) {\n node.h = this.maxRow;\n } else if (node.h < 1) {\n node.h = 1;\n }\n\n if (node.x < 0) {\n node.x = 0;\n }\n if (node.y < 0) {\n node.y = 0;\n }\n\n if (node.x + node.w > this.column) {\n if (resizing) {\n node.w = this.column - node.x;\n } else {\n node.x = this.column - node.w;\n }\n }\n if (this.maxRow && node.y + node.h > this.maxRow) {\n if (resizing) {\n node.h = this.maxRow - node.y;\n } else {\n node.y = this.maxRow - node.h;\n }\n }\n\n if (!Utils.samePos(node, before)) {\n node._dirty = true;\n }\n\n return this;\n }\n\n /**\n * Returns a list of nodes that have been modified from their original values.\n * This is used to track which nodes need DOM updates.\n *\n * @param verify if true, performs additional verification by comparing current vs original positions\n * @returns array of nodes that have been modified\n *\n * @example\n * const changed = engine.getDirtyNodes();\n * console.log('Modified nodes:', changed.length);\n *\n * // Get verified dirty nodes\n * const verified = engine.getDirtyNodes(true);\n */\n public getDirtyNodes(verify?: boolean): GridStackNode[] {\n // compare original x,y,w,h instead as _dirty can be a temporary state\n if (verify) {\n return this.nodes.filter(n => n._dirty && !Utils.samePos(n, n._orig));\n }\n return this.nodes.filter(n => n._dirty);\n }\n\n /** @internal call this to call onChange callback with dirty nodes so DOM can be updated */\n protected _notify(removedNodes?: GridStackNode[]): GridStackEngine {\n if (this.batchMode || !this.onChange) return this;\n const dirtyNodes = (removedNodes || []).concat(this.getDirtyNodes());\n this.onChange(dirtyNodes);\n return this;\n }\n\n /**\n * Clean all dirty and last tried information from nodes.\n * This resets the dirty state tracking for all nodes.\n *\n * @returns the engine instance for chaining\n *\n * @internal\n */\n public cleanNodes(): GridStackEngine {\n if (this.batchMode) return this;\n this.nodes.forEach(n => {\n delete n._dirty;\n delete n._lastTried;\n });\n return this;\n }\n\n /**\n * Save the initial position/size of all nodes to track real dirty state.\n * This creates a snapshot of current positions that can be restored later.\n *\n * Note: Should be called right after change events and before move/resize operations.\n *\n * @returns the engine instance for chaining\n *\n * @internal\n */\n public saveInitial(): GridStackEngine {\n this.nodes.forEach(n => {\n n._orig = Utils.copyPos({}, n);\n delete n._dirty;\n });\n this._hasLocked = this.nodes.some(n => n.locked);\n return this;\n }\n\n /**\n * Restore all nodes back to their initial values.\n * This is typically called when canceling an operation (e.g., Esc key during drag).\n *\n * @returns the engine instance for chaining\n *\n * @internal\n */\n public restoreInitial(): GridStackEngine {\n this.nodes.forEach(n => {\n if (!n._orig || Utils.samePos(n, n._orig)) return;\n Utils.copyPos(n, n._orig);\n n._dirty = true;\n });\n this._notify();\n return this;\n }\n\n /**\n * Find the first available empty spot for the given node dimensions.\n * Updates the node's x,y attributes with the found position.\n *\n * @param node the node to find a position for (w,h must be set)\n * @param nodeList optional list of nodes to check against (defaults to engine nodes)\n * @param column optional column count (defaults to engine column count)\n * @param after optional node to start search after (maintains order)\n * @returns true if an empty position was found and node was updated\n *\n * @example\n * const node = { w: 2, h: 1 };\n * if (engine.findEmptyPosition(node)) {\n * console.log('Found position at:', node.x, node.y);\n * }\n */\n public findEmptyPosition(node: GridStackNode, nodeList = this.nodes, column = this.column, after?: GridStackNode): boolean {\n const start = after ? after.y * column + (after.x + after.w) : 0;\n let found = false;\n for (let i = start; !found; ++i) {\n const x = i % column;\n const y = Math.floor(i / column);\n if (x + node.w > column) {\n continue;\n }\n const box = {x, y, w: node.w, h: node.h};\n if (!nodeList.find(n => Utils.isIntercepted(box, n))) {\n if (node.x !== x || node.y !== y) node._dirty = true;\n node.x = x;\n node.y = y;\n delete node.autoPosition;\n found = true;\n }\n }\n return found;\n }\n\n /**\n * Add the given node to the grid, handling collision detection and re-packing.\n * This is the main method for adding new widgets to the engine.\n *\n * @param node the node to add to the grid\n * @param triggerAddEvent if true, adds node to addedNodes list for event triggering\n * @param after optional node to place this node after (for ordering)\n * @returns the added node (or existing node if duplicate)\n *\n * @example\n * const node = { x: 0, y: 0, w: 2, h: 1, content: 'Hello' };\n * const added = engine.addNode(node, true);\n */\n public addNode(node: GridStackNode, triggerAddEvent = false, after?: GridStackNode): GridStackNode {\n const dup = this.nodes.find(n => n._id === node._id);\n if (dup) return dup; // prevent inserting twice! return it instead.\n\n // skip prepareNode if we're in middle of column resize (not new) but do check for bounds!\n this._inColumnResize ? this.nodeBoundFix(node) : this.prepareNode(node);\n delete node._temporaryRemoved;\n delete node._removeDOM;\n\n let skipCollision: boolean;\n if (node.autoPosition && this.findEmptyPosition(node, this.nodes, this.column, after)) {\n delete node.autoPosition; // found our slot\n skipCollision = true;\n }\n\n this.nodes.push(node);\n if (triggerAddEvent) { this.addedNodes.push(node); }\n\n if (!skipCollision) this._fixCollisions(node);\n if (!this.batchMode) { this._packNodes()._notify(); }\n return node;\n }\n\n /**\n * Remove the given node from the grid.\n *\n * @param node the node to remove\n * @param removeDOM if true (default), marks node for DOM removal\n * @param triggerEvent if true, adds node to removedNodes list for event triggering\n * @returns the engine instance for chaining\n *\n * @example\n * engine.removeNode(node, true, true);\n */\n public removeNode(node: GridStackNode, removeDOM = true, triggerEvent = false): GridStackEngine {\n if (!this.nodes.find(n => n._id === node._id)) {\n // TEST console.log(`Error: GridStackEngine.removeNode() node._id=${node._id} not found!`)\n return this;\n }\n if (triggerEvent) { // we wait until final drop to manually track removed items (rather than during drag)\n this.removedNodes.push(node);\n }\n if (removeDOM) node._removeDOM = true; // let CB remove actual HTML (used to set _id to null, but then we loose layout info)\n // don't use 'faster' .splice(findIndex(),1) in case node isn't in our list, or in multiple times.\n this.nodes = this.nodes.filter(n => n._id !== node._id);\n if (!node._isAboutToRemove) this._packNodes(); // if dragged out, no need to relayout as already done...\n this._notify([node]);\n return this;\n }\n\n /**\n * Remove all nodes from the grid.\n *\n * @param removeDOM if true (default), marks all nodes for DOM removal\n * @param triggerEvent if true (default), triggers removal events\n * @returns the engine instance for chaining\n *\n * @example\n * engine.removeAll(); // Remove all nodes\n */\n public removeAll(removeDOM = true, triggerEvent = true): GridStackEngine {\n delete this._layouts;\n if (!this.nodes.length) return this;\n removeDOM && this.nodes.forEach(n => n._removeDOM = true); // let CB remove actual HTML (used to set _id to null, but then we loose layout info)\n const removedNodes = this.nodes;\n this.removedNodes = triggerEvent ? removedNodes : [];\n this.nodes = [];\n return this._notify(removedNodes);\n }\n\n /**\n * Check if a node can be moved to a new position, considering layout constraints.\n * This is a safer version of moveNode() that validates the move first.\n *\n * For complex cases (like maxRow constraints), it simulates the move in a clone first,\n * then applies the changes only if they meet all specifications.\n *\n * @param node the node to move\n * @param o move options including target position\n * @returns true if the node was successfully moved\n *\n * @example\n * const canMove = engine.moveNodeCheck(node, { x: 2, y: 1 });\n * if (canMove) {\n * console.log('Node moved successfully');\n * }\n */\n public moveNodeCheck(node: GridStackNode, o: GridStackMoveOpts): boolean {\n // if (node.locked) return false;\n if (!this.changedPosConstrain(node, o)) return false;\n o.pack = true;\n\n // simpler case: move item directly...\n if (!this.maxRow) {\n return this.moveNode(node, o);\n }\n\n // complex case: create a clone with NO maxRow (will check for out of bounds at the end)\n let clonedNode: GridStackNode;\n const clone = new GridStackEngine({\n column: this.column,\n float: this.float,\n nodes: this.nodes.map(n => {\n if (n._id === node._id) {\n clonedNode = {...n};\n return clonedNode;\n }\n return {...n};\n })\n });\n if (!clonedNode) return false;\n\n // check if we're covering 50% collision and could move, while still being under maxRow or at least not making it worse\n // (case where widget was somehow added past our max #2449)\n const canMove = clone.moveNode(clonedNode, o) && clone.getRow() <= Math.max(this.getRow(), this.maxRow);\n // else check if we can force a swap (float=true, or different shapes) on non-resize\n if (!canMove && !o.resizing && o.collide) {\n const collide = o.collide.el.gridstackNode; // find the source node the clone collided with at 50%\n if (this.swap(node, collide)) { // swaps and mark dirty\n this._notify();\n return true;\n }\n }\n if (!canMove) return false;\n\n // if clone was able to move, copy those mods over to us now instead of caller trying to do this all over!\n // Note: we can't use the list directly as elements and other parts point to actual node, so copy content\n clone.nodes.filter(n => n._dirty).forEach(c => {\n const n = this.nodes.find(a => a._id === c._id);\n if (!n) return;\n Utils.copyPos(n, c);\n n._dirty = true;\n });\n this._notify();\n return true;\n }\n\n /** return true if can fit in grid height constrain only (always true if no maxRow) */\n public willItFit(node: GridStackNode): boolean {\n delete node._willFitPos;\n if (!this.maxRow) return true;\n // create a clone with NO maxRow and check if still within size\n const clone = new GridStackEngine({\n column: this.column,\n float: this.float,\n nodes: this.nodes.map(n => {return {...n}})\n });\n const n = {...node}; // clone node so we don't mod any settings on it but have full autoPosition and min/max as well! #1687\n this.cleanupNode(n);\n delete n.el; delete n._id; delete n.content; delete n.grid;\n clone.addNode(n);\n if (clone.getRow() <= this.maxRow) {\n node._willFitPos = Utils.copyPos({}, n);\n return true;\n }\n return false;\n }\n\n /** true if x,y or w,h are different after clamping to min/max */\n public changedPosConstrain(node: GridStackNode, p: GridStackPosition): boolean {\n // first make sure w,h are set for caller\n p.w = p.w || node.w;\n p.h = p.h || node.h;\n if (node.x !== p.x || node.y !== p.y) return true;\n // check constrained w,h\n if (node.maxW) { p.w = Math.min(p.w, node.maxW); }\n if (node.maxH) { p.h = Math.min(p.h, node.maxH); }\n if (node.minW) { p.w = Math.max(p.w, node.minW); }\n if (node.minH) { p.h = Math.max(p.h, node.minH); }\n return (node.w !== p.w || node.h !== p.h);\n }\n\n /** return true if the passed in node was actually moved (checks for no-op and locked) */\n public moveNode(node: GridStackNode, o: GridStackMoveOpts): boolean {\n if (!node || /*node.locked ||*/ !o) return false;\n let wasUndefinedPack: boolean;\n if (o.pack === undefined && !this.batchMode) {\n wasUndefinedPack = o.pack = true;\n }\n\n // constrain the passed in values and check if we're still changing our node\n if (typeof o.x !== 'number') { o.x = node.x; }\n if (typeof o.y !== 'number') { o.y = node.y; }\n if (typeof o.w !== 'number') { o.w = node.w; }\n if (typeof o.h !== 'number') { o.h = node.h; }\n const resizing = (node.w !== o.w || node.h !== o.h);\n const nn: GridStackNode = Utils.copyPos({}, node, true); // get min/max out first, then opt positions next\n Utils.copyPos(nn, o);\n this.nodeBoundFix(nn, resizing);\n Utils.copyPos(o, nn);\n\n if (!o.forceCollide && Utils.samePos(node, o)) return false;\n const prevPos: GridStackPosition = Utils.copyPos({}, node);\n\n // check if we will need to fix collision at our new location\n const collides = this.collideAll(node, nn, o.skip);\n let needToMove = true;\n if (collides.length) {\n const activeDrag = node._moving && !o.nested;\n // check to make sure we actually collided over 50% surface area while dragging\n let collide = activeDrag ? this.directionCollideCoverage(node, o, collides) : collides[0];\n // if we're enabling creation of sub-grids on the fly, see if we're covering 80% of either one, if we didn't already do that\n if (activeDrag && collide && node.grid?.opts?.subGridDynamic && !node.grid._isTemp) {\n const over = Utils.areaIntercept(o.rect, collide._rect);\n const a1 = Utils.area(o.rect);\n const a2 = Utils.area(collide._rect);\n const perc = over / (a1 < a2 ? a1 : a2);\n if (perc > .8) {\n collide.grid.makeSubGrid(collide.el, undefined, node);\n collide = undefined;\n }\n }\n\n if (collide) {\n needToMove = !this._fixCollisions(node, nn, collide, o); // check if already moved...\n } else {\n needToMove = false; // we didn't cover >50% for a move, skip...\n if (wasUndefinedPack) delete o.pack;\n }\n }\n\n // now move (to the original ask vs the collision version which might differ) and repack things\n if (needToMove && !Utils.samePos(node, nn)) {\n node._dirty = true;\n Utils.copyPos(node, nn);\n }\n if (o.pack) {\n this._packNodes()\n ._notify();\n }\n return !Utils.samePos(node, prevPos); // pack might have moved things back\n }\n\n public getRow(): number {\n return this.nodes.reduce((row, n) => Math.max(row, n.y + n.h), 0);\n }\n\n public beginUpdate(node: GridStackNode): GridStackEngine {\n if (!node._updating) {\n node._updating = true;\n delete node._skipDown;\n if (!this.batchMode) this.saveInitial();\n }\n return this;\n }\n\n public endUpdate(): GridStackEngine {\n const n = this.nodes.find(n => n._updating);\n if (n) {\n delete n._updating;\n delete n._skipDown;\n }\n return this;\n }\n\n /** saves a copy of the largest column layout (eg 12 even when rendering 1 column) so we don't loose orig layout, unless explicity column\n * count to use is given. returning a list of widgets for serialization\n * @param saveElement if true (default), the element will be saved to GridStackWidget.el field, else it will be removed.\n * @param saveCB callback for each node -> widget, so application can insert additional data to be saved into the widget data structure.\n * @param column if provided, the grid will be saved for the given column count (IFF we have matching internal saved layout, or current layout).\n * Note: nested grids will ALWAYS save the container w to match overall layouts (parent + child) to be consistent.\n */\n public save(saveElement = true, saveCB?: SaveFcn, column?: number): GridStackNode[] {\n // use the highest layout for any saved info so we can have full detail on reload #1849\n // unless we're given a column to match (always set for nested grids)\n const len = this._layouts?.length || 0;\n let layout: GridStackNode[];\n if (len) {\n if (column) {\n if (column !== this.column) layout = this._layouts[column];\n } else if (this.column !== len - 1) {\n layout = this._layouts[len - 1];\n }\n }\n const list: GridStackNode[] = [];\n this.sortNodes();\n this.nodes.forEach(n => {\n const wl = layout?.find(l => l._id === n._id);\n // use layout info fields instead if set\n const w: GridStackNode = {...n, ...(wl || {})};\n Utils.removeInternalForSave(w, !saveElement);\n if (saveCB) saveCB(n, w);\n list.push(w);\n });\n return list;\n }\n\n /** @internal called whenever a node is added or moved - updates the cached layouts */\n public layoutsNodesChange(nodes: GridStackNode[]): GridStackEngine {\n if (!this._layouts || this._inColumnResize) return this;\n // remove smaller layouts - we will re-generate those on the fly... larger ones need to update\n this._layouts.forEach((layout, column) => {\n if (!layout || column === this.column) return this;\n if (column < this.column) {\n this._layouts[column] = undefined;\n }\n else {\n // we save the original x,y,w (h isn't cached) to see what actually changed to propagate better.\n // NOTE: we don't need to check against out of bound scaling/moving as that will be done when using those cache values. #1785\n const ratio = column / this.column;\n nodes.forEach(node => {\n if (!node._orig) return; // didn't change (newly added ?)\n const n = layout.find(l => l._id === node._id);\n if (!n) return; // no cache for new nodes. Will use those values.\n // Y changed, push down same amount\n // TODO: detect doing item 'swaps' will help instead of move (especially in 1 column mode)\n if (n.y >= 0 && node.y !== node._orig.y) {\n n.y += (node.y - node._orig.y);\n }\n // X changed, scale from new position\n if (node.x !== node._orig.x) {\n n.x = Math.round(node.x * ratio);\n }\n // width changed, scale from new width\n if (node.w !== node._orig.w) {\n n.w = Math.round(node.w * ratio);\n }\n // ...height always carries over from cache\n });\n }\n });\n return this;\n }\n\n /**\n * @internal Called to scale the widget width & position up/down based on the column change.\n * Note we store previous layouts (especially original ones) to make it possible to go\n * from say 12 -> 1 -> 12 and get back to where we were.\n *\n * @param prevColumn previous number of columns\n * @param column new column number\n * @param layout specify the type of re-layout that will happen (position, size, etc...).\n * Note: items will never be outside of the current column boundaries. default (moveScale). Ignored for 1 column\n */\n public columnChanged(prevColumn: number, column: number, layout: ColumnOptions = 'moveScale'): GridStackEngine {\n if (!this.nodes.length || !column || prevColumn === column) return this;\n\n // simpler shortcuts layouts\n const doCompact = layout === 'compact' || layout === 'list';\n if (doCompact) {\n this.sortNodes(1); // sort with original layout once and only once (new column will affect order otherwise)\n }\n\n // cache the current layout in case they want to go back (like 12 -> 1 -> 12) as it requires original data IFF we're sizing down (see below)\n if (column < prevColumn) this.cacheLayout(this.nodes, prevColumn);\n this.batchUpdate(); // do this EARLY as it will call saveInitial() so we can detect where we started for _dirty and collision\n let newNodes: GridStackNode[] = [];\n let nodes = doCompact ? this.nodes : Utils.sort(this.nodes, -1); // current column reverse sorting so we can insert last to front (limit collision)\n\n // see if we have cached previous layout IFF we are going up in size (restore) otherwise always\n // generate next size down from where we are (looks more natural as you gradually size down).\n if (column > prevColumn && this._layouts) {\n const cacheNodes = this._layouts[column] || [];\n // ...if not, start with the largest layout (if not already there) as down-scaling is more accurate\n // by pretending we came from that larger column by assigning those values as starting point\n const lastIndex = this._layouts.length - 1;\n if (!cacheNodes.length && prevColumn !== lastIndex && this._layouts[lastIndex]?.length) {\n prevColumn = lastIndex;\n this._layouts[lastIndex].forEach(cacheNode => {\n const n = nodes.find(n => n._id === cacheNode._id);\n if (n) {\n // still current, use cache info positions\n if (!doCompact && !cacheNode.autoPosition) {\n n.x = cacheNode.x ?? n.x;\n n.y = cacheNode.y ?? n.y;\n }\n n.w = cacheNode.w ?? n.w;\n if (cacheNode.x == undefined || cacheNode.y === undefined) n.autoPosition = true;\n }\n });\n }\n\n // if we found cache re-use those nodes that are still current\n cacheNodes.forEach(cacheNode => {\n const j = nodes.findIndex(n => n._id === cacheNode._id);\n if (j !== -1) {\n const n = nodes[j];\n // still current, use cache info positions\n if (doCompact) {\n n.w = cacheNode.w; // only w is used, and don't trim the list\n return;\n }\n if (cacheNode.autoPosition || isNaN(cacheNode.x) || isNaN(cacheNode.y)) {\n this.findEmptyPosition(cacheNode, newNodes);\n }\n if (!cacheNode.autoPosition) {\n n.x = cacheNode.x ?? n.x;\n n.y = cacheNode.y ?? n.y;\n n.w = cacheNode.w ?? n.w;\n newNodes.push(n);\n }\n nodes.splice(j, 1);\n }\n });\n }\n\n // much simpler layout that just compacts\n if (doCompact) {\n this.compact(layout, false);\n } else {\n // ...and add any extra non-cached ones\n if (nodes.length) {\n if (typeof layout === 'function') {\n layout(column, prevColumn, newNodes, nodes);\n } else {\n const ratio = (doCompact || layout === 'none') ? 1 : column / prevColumn;\n const move = (layout === 'move' || layout === 'moveScale');\n const scale = (layout === 'scale' || layout === 'moveScale');\n nodes.forEach(node => {\n // NOTE: x + w could be outside of the grid, but addNode() below will handle that\n node.x = (column === 1 ? 0 : (move ? Math.round(node.x * ratio) : Math.min(node.x, column - 1)));\n node.w = ((column === 1 || prevColumn === 1) ? 1 : scale ? (Math.round(node.w * ratio) || 1) : (Math.min(node.w, column)));\n newNodes.push(node);\n });\n nodes = [];\n }\n }\n\n // finally re-layout them in reverse order (to get correct placement)\n newNodes = Utils.sort(newNodes, -1);\n this._inColumnResize = true; // prevent cache update\n this.nodes = []; // pretend we have no nodes to start with (add() will use same structures) to simplify layout\n newNodes.forEach(node => {\n this.addNode(node, false); // 'false' for add event trigger\n delete node._orig; // make sure the commit doesn't try to restore things back to original\n });\n }\n\n this.nodes.forEach(n => delete n._orig); // clear _orig before batch=false so it doesn't handle float=true restore\n this.batchUpdate(false, !doCompact);\n delete this._inColumnResize;\n return this;\n }\n\n /**\n * call to cache the given layout internally to the given location so we can restore back when column changes size\n * @param nodes list of nodes\n * @param column corresponding column index to save it under\n * @param clear if true, will force other caches to be removed (default false)\n */\n public cacheLayout(nodes: GridStackNode[], column: number, clear = false): GridStackEngine {\n const copy: GridStackNode[] = [];\n nodes.forEach((n, i) => {\n // make sure we have an id in case this is new layout, else re-use id already set\n if (n._id === undefined) {\n const existing = n.id ? this.nodes.find(n2 => n2.id === n.id) : undefined; // find existing node using users id\n n._id = existing?._id ?? GridStackEngine._idSeq++;\n }\n copy[i] = {x: n.x, y: n.y, w: n.w, _id: n._id} // only thing we change is x,y,w and id to find it back\n });\n this._layouts = clear ? [] : this._layouts || []; // use array to find larger quick\n this._layouts[column] = copy;\n return this;\n }\n\n /**\n * call to cache the given node layout internally to the given location so we can restore back when column changes size\n * @param node single node to cache\n * @param column corresponding column index to save it under\n */\n public cacheOneLayout(n: GridStackNode, column: number): GridStackEngine {\n n._id = n._id ?? GridStackEngine._idSeq++;\n const l: GridStackNode = {x: n.x, y: n.y, w: n.w, _id: n._id}\n if (n.autoPosition || n.x === undefined) { delete l.x; delete l.y; if (n.autoPosition) l.autoPosition = true; }\n this._layouts = this._layouts || [];\n this._layouts[column] = this._layouts[column] || [];\n const index = this.findCacheLayout(n, column);\n if (index === -1)\n this._layouts[column].push(l);\n else\n this._layouts[column][index] = l;\n return this;\n }\n\n protected findCacheLayout(n: GridStackNode, column: number): number | undefined {\n return this._layouts?.[column]?.findIndex(l => l._id === n._id) ?? -1;\n }\n\n public removeNodeFromLayoutCache(n: GridStackNode) {\n if (!this._layouts) {\n return;\n }\n for (let i = 0; i < this._layouts.length; i++) {\n const index = this.findCacheLayout(n, i);\n if (index !== -1) {\n this._layouts[i].splice(index, 1);\n }\n }\n }\n\n /** called to remove all internal values but the _id */\n public cleanupNode(node: GridStackNode): GridStackEngine {\n for (const prop in node) {\n if (prop[0] === '_' && prop !== '_id') delete node[prop];\n }\n return this;\n }\n}\n","/**\r\n * types.ts 12.3.3\r\n * Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license\r\n */\r\n\r\nimport { GridStack } from './gridstack';\r\nimport { GridStackEngine } from './gridstack-engine';\r\n\r\n/**\r\n * Default values for grid options - used during initialization and when saving out grid configuration.\r\n * These values are applied when options are not explicitly provided.\r\n */\r\nexport const gridDefaults: GridStackOptions = {\r\n alwaysShowResizeHandle: 'mobile',\r\n animate: true,\r\n auto: true,\r\n cellHeight: 'auto',\r\n cellHeightThrottle: 100,\r\n cellHeightUnit: 'px',\r\n column: 12,\r\n draggable: { handle: '.grid-stack-item-content', appendTo: 'body', scroll: true },\r\n handle: '.grid-stack-item-content',\r\n itemClass: 'grid-stack-item',\r\n margin: 10,\r\n marginUnit: 'px',\r\n maxRow: 0,\r\n minRow: 0,\r\n placeholderClass: 'grid-stack-placeholder',\r\n placeholderText: '',\r\n removableOptions: { accept: 'grid-stack-item', decline: 'grid-stack-non-removable'},\r\n resizable: { handles: 'se' },\r\n rtl: 'auto',\r\n\r\n // **** same as not being set ****\r\n // disableDrag: false,\r\n // disableResize: false,\r\n // float: false,\r\n // handleClass: null,\r\n // removable: false,\r\n // staticGrid: false,\r\n //removable\r\n};\r\n\r\n/**\r\n * Different layout options when changing the number of columns.\r\n *\r\n * These options control how widgets are repositioned when the grid column count changes.\r\n * Note: The new list may be partially filled if there's a cached layout for that size.\r\n *\r\n * Options:\r\n * - `'list'`: Treat items as a sorted list, keeping them sequentially without resizing (unless too big)\r\n * - `'compact'`: Similar to list, but uses compact() method to fill empty slots by reordering\r\n * - `'moveScale'`: Scale and move items by the ratio of newColumnCount / oldColumnCount\r\n * - `'move'`: Only move items, keep their sizes\r\n * - `'scale'`: Only scale items, keep their positions\r\n * - `'none'`: Leave items unchanged unless they don't fit in the new column count\r\n * - Custom function: Provide your own layout logic\r\n */\r\nexport type ColumnOptions = 'list' | 'compact' | 'moveScale' | 'move' | 'scale' | 'none' |\r\n ((column: number, oldColumn: number, nodes: GridStackNode[], oldNodes: GridStackNode[]) => void);\r\n/**\r\n * Options for the compact() method to reclaim empty space.\r\n * - `'list'`: Keep items in order, move them up sequentially\r\n * - `'compact'`: Find truly empty spaces, may reorder items for optimal fit\r\n */\r\nexport type CompactOptions = 'list' | 'compact';\r\n/**\r\n * Type representing values that can be either numbers or strings (e.g., dimensions with units).\r\n * Used for properties like width, height, margins that accept both numeric and string values.\r\n */\r\nexport type numberOrString = number | string;\r\n/**\r\n * Extended HTMLElement interface for grid items.\r\n * All grid item DOM elements implement this interface to provide access to their grid data.\r\n */\r\nexport interface GridItemHTMLElement extends HTMLElement {\r\n /** Pointer to the associated grid node instance containing position, size, and other widget data */\r\n gridstackNode?: GridStackNode;\r\n /** @internal Original node data (used for restoring during drag operations) */\r\n _gridstackNodeOrig?: GridStackNode;\r\n}\r\n\r\n/**\r\n * Type representing various ways to specify grid elements.\r\n * Can be a CSS selector string, HTMLElement, or GridItemHTMLElement.\r\n */\r\nexport type GridStackElement = string | HTMLElement | GridItemHTMLElement;\r\n\r\n/**\r\n * Event handler function types for the .on() method.\r\n * Different handlers receive different parameters based on the event type.\r\n */\r\n\r\n/** General event handler that receives only the event */\r\nexport type GridStackEventHandler = (event: Event) => void;\r\n\r\n/** Element-specific event handler that receives event and affected element */\r\nexport type GridStackElementHandler = (event: Event, el: GridItemHTMLElement) => void;\r\n\r\n/** Node-based event handler that receives event and array of affected nodes */\r\nexport type GridStackNodesHandler = (event: Event, nodes: GridStackNode[]) => void;\r\n\r\n/** Drop event handler that receives previous and new node states */\r\nexport type GridStackDroppedHandler = (event: Event, previousNode: GridStackNode, newNode: GridStackNode) => void;\r\n\r\n/** Union type of all possible event handler types */\r\nexport type GridStackEventHandlerCallback = GridStackEventHandler | GridStackElementHandler | GridStackNodesHandler | GridStackDroppedHandler;\r\n\r\n/**\r\n * Optional callback function called during load() operations.\r\n * Allows custom handling of widget addition/removal for framework integration.\r\n *\r\n * @param parent - The parent HTML element\r\n * @param w - The widget definition\r\n * @param add - True if adding, false if removing\r\n * @param grid - True if this is a grid operation\r\n * @returns The created/modified HTML element, or undefined\r\n */\r\nexport type AddRemoveFcn = (parent: HTMLElement, w: GridStackWidget, add: boolean, grid: boolean) => HTMLElement | undefined;\r\n\r\n/**\r\n * Optional callback function called during save() operations.\r\n * Allows adding custom data to the saved widget structure.\r\n *\r\n * @param node - The internal grid node\r\n * @param w - The widget structure being saved (can be modified)\r\n */\r\nexport type SaveFcn = (node: GridStackNode, w: GridStackWidget) => void;\r\n\r\n/**\r\n * Optional callback function for custom widget content rendering.\r\n * Called during load()/addWidget() to create custom content beyond plain text.\r\n *\r\n * @param el - The widget's content container element\r\n * @param w - The widget definition with content and other properties\r\n */\r\nexport type RenderFcn = (el: HTMLElement, w: GridStackWidget) => void;\r\n\r\n/**\r\n * Optional callback function for custom resize-to-content behavior.\r\n * Called when a widget needs to resize to fit its content.\r\n *\r\n * @param el - The grid item element to resize\r\n */\r\nexport type ResizeToContentFcn = (el: GridItemHTMLElement) => void;\r\n\r\n/**\r\n * Configuration for responsive grid behavior.\r\n *\r\n * Defines how the grid responds to different screen sizes by changing column counts.\r\n * NOTE: Make sure to include the appropriate CSS (gridstack-extra.css) to support responsive behavior.\r\n */\r\nexport interface Responsive {\r\n /** wanted width to maintain (+-50%) to dynamically pick a column count. NOTE: make sure to have correct extra CSS to support this. */\r\n columnWidth?: number;\r\n /** maximum number of columns allowed (default: 12). NOTE: make sure to have correct extra CSS to support this. */\r\n columnMax?: number;\r\n /** explicit width:column breakpoints instead of automatic 'columnWidth'. NOTE: make sure to have correct extra CSS to support this. */\r\n breakpoints?: Breakpoint[];\r\n /** specify if breakpoints are for window size or grid size (default:false = grid) */\r\n breakpointForWindow?: boolean;\r\n /** global re-layout mode when changing columns */\r\n layout?: ColumnOptions;\r\n}\r\n\r\n/**\r\n * Defines a responsive breakpoint for automatic column count changes.\r\n * Used with the responsive.breakpoints option.\r\n */\r\nexport interface Breakpoint {\r\n /** Maximum width (in pixels) for this breakpoint to be active */\r\n w?: number;\r\n /** Number of columns to use when this breakpoint is active */\r\n c: number;\r\n /** Layout mode for this specific breakpoint (overrides global responsive.layout) */\r\n layout?: ColumnOptions;\r\n /** TODO: Future feature - specific children layout for this breakpoint */\r\n // children?: GridStackWidget[];\r\n}\r\n\r\n/**\r\n * Defines the options for a Grid\r\n */\r\nexport interface GridStackOptions {\r\n /**\r\n * Accept widgets dragged from other grids or from outside (default: `false`). Can be:\r\n * - `true`: will accept HTML elements having 'grid-stack-item' as class attribute\r\n * - `false`: will not accept any external widgets\r\n * - string: explicit class name to accept instead of default\r\n * - function: callback called before an item will be accepted when entering a grid\r\n *\r\n * @example\r\n * // Accept all grid items\r\n * acceptWidgets: true\r\n *\r\n * // Accept only items with specific class\r\n * acceptWidgets: 'my-draggable-item'\r\n *\r\n * // Custom validation function\r\n * acceptWidgets: (el) => {\r\n * return el.getAttribute('data-accept') === 'true';\r\n * }\r\n *\r\n * @see {@link http://gridstack.github.io/gridstack.js/demo/two.html} for complete example\r\n */\r\n acceptWidgets?: boolean | string | ((element: Element) => boolean);\r\n\r\n /** possible values (default: `mobile`) - does not apply to non-resizable widgets\r\n * `false` the resizing handles are only shown while hovering over a widget\r\n * `true` the resizing handles are always shown\r\n * 'mobile' if running on a mobile device, default to `true` (since there is no hovering per say), else `false`.\r\n See [example](http://gridstack.github.io/gridstack.js/demo/mobile.html) */\r\n alwaysShowResizeHandle?: true | false | 'mobile';\r\n\r\n /** turns animation on (default?: true) */\r\n animate?: boolean;\r\n\r\n /** if false gridstack will not initialize existing items (default?: true) */\r\n auto?: boolean;\r\n\r\n /**\r\n * One cell height (default: 'auto'). Can be:\r\n * - an integer (px): fixed pixel height\r\n * - a string (ex: '100px', '10em', '10rem'): CSS length value\r\n * - 0: library will not generate styles for rows (define your own CSS)\r\n * - 'auto': height calculated for square cells (width / column) and updated live on window resize\r\n * - 'initial': similar to 'auto' but stays fixed size during window resizing\r\n *\r\n * Note: % values don't work correctly - see demo/cell-height.html\r\n *\r\n * @example\r\n * // Fixed 100px height\r\n * cellHeight: 100\r\n *\r\n * // CSS units\r\n * cellHeight: '5rem'\r\n * cellHeight: '100px'\r\n *\r\n * // Auto-sizing for square cells\r\n * cellHeight: 'auto'\r\n *\r\n * // No CSS generation (custom styles)\r\n * cellHeight: 0\r\n */\r\n cellHeight?: numberOrString;\r\n\r\n /** throttle time delay (in ms) used when cellHeight='auto' to improve performance vs usability (default?: 100).\r\n * A value of 0 will make it instant at a cost of re-creating the CSS file at ever window resize event!\r\n * */\r\n cellHeightThrottle?: number;\r\n\r\n /** (internal) unit for cellHeight (default? 'px') which is set when a string cellHeight with a unit is passed (ex: '10rem') */\r\n cellHeightUnit?: string;\r\n\r\n /** list of children item to create when calling load() or addGrid() */\r\n children?: GridStackWidget[];\r\n\r\n /** number of columns (default?: 12). Note: IF you change this, CSS also have to change. See https://github.com/gridstack/gridstack.js#change-grid-columns.\r\n * Note: for nested grids, it is recommended to use 'auto' which will always match the container grid-item current width (in column) to keep inside and outside\r\n * items always the same. flag is NOT supported for regular non-nested grids.\r\n */\r\n column?: number | 'auto';\r\n\r\n /** responsive column layout for width:column behavior */\r\n columnOpts?: Responsive;\r\n\r\n /** additional class on top of '.grid-stack' (which is required for our CSS) to differentiate this instance.\r\n Note: only used by addGrid(), else your element should have the needed class */\r\n class?: string;\r\n\r\n /** disallows dragging of widgets (default?: false) */\r\n disableDrag?: boolean;\r\n\r\n /** disallows resizing of widgets (default?: false). */\r\n disableResize?: boolean;\r\n\r\n /** allows to override UI draggable options. (default?: { handle?: '.grid-stack-item-content', appendTo?: 'body' }) */\r\n draggable?: DDDragOpt;\r\n\r\n /** let user drag nested grid items out of a parent or not (default true - not supported yet) */\r\n //dragOut?: boolean;\r\n\r\n /** the type of engine to create (so you can subclass) default to GridStackEngine */\r\n engineClass?: typeof GridStackEngine;\r\n\r\n /** enable floating widgets (default?: false) See example (http://gridstack.github.io/gridstack.js/demo/float.html) */\r\n float?: boolean;\r\n\r\n /** draggable handle selector (default?: '.grid-stack-item-content') */\r\n handle?: string;\r\n\r\n /** draggable handle class (e.g. 'grid-stack-item-content'). If set 'handle' is ignored (default?: null) */\r\n handleClass?: string;\r\n\r\n /** additional widget class (default?: 'grid-stack-item') */\r\n itemClass?: string;\r\n\r\n /** re-layout mode when we're a subgrid and we are being resized. default to 'list' */\r\n layout?: ColumnOptions;\r\n\r\n /** true when widgets are only created when they scroll into view (visible) */\r\n lazyLoad?: boolean;\r\n\r\n /**\r\n * gap between grid item and content (default?: 10). This will set all 4 sides and support the CSS formats below\r\n * an integer (px)\r\n * a string with possible units (ex: '2em', '20px', '2rem')\r\n * string with space separated values (ex: '5px 10px 0 20px' for all 4 sides, or '5em 10em' for top/bottom and left/right pairs like CSS).\r\n * Note: all sides must have same units (last one wins, default px)\r\n */\r\n margin?: numberOrString;\r\n\r\n /** OLD way to optionally set each side - use margin: '5px 10px 0 20px' instead. Used internally to store each side. */\r\n marginTop?: numberOrString;\r\n marginRight?: numberOrString;\r\n marginBottom?: numberOrString;\r\n marginLeft?: numberOrString;\r\n\r\n /** (internal) unit for margin (default? 'px') set when `margin` is set as string with unit (ex: 2rem') */\r\n marginUnit?: string;\r\n\r\n /** maximum rows amount. Default? is 0 which means no maximum rows */\r\n maxRow?: number;\r\n\r\n /** minimum rows amount which is handy to prevent grid from collapsing when empty. Default is `0`.\r\n * When no set the `min-height` CSS attribute on the grid div (in pixels) can be used, which will round to the closest row.\r\n */\r\n minRow?: number;\r\n\r\n /** If you are using a nonce-based Content Security Policy, pass your nonce here and\r\n * GridStack will add it to the