├── .gitignore ├── BlazorGridStack.sln ├── BlazorGridStack ├── BlazorGridStack - Backup (1).csproj ├── BlazorGridStack - Backup.csproj ├── BlazorGridStack.csproj ├── BlazorGridStackBody.razor ├── BlazorGridStackBody.razor.cs ├── BlazorGridStackWidget.razor ├── BlazorGridStackWidget.razor.cs ├── GridStackInterop.cs ├── Models │ ├── BlazorGridCoordinates.cs │ ├── BlazorGridStackBodyOptions.cs │ ├── BlazorGridStackDroppedEventArgs.cs │ ├── BlazorGridStackWidgetData.cs │ ├── BlazorGridStackWidgetEventArgs.cs │ ├── BlazorGridStackWidgetListEventArgs.cs │ └── BlazorGridStackWidgetOptions.cs ├── Properties │ └── launchSettings.json ├── _Imports.razor ├── node_modules │ ├── .package-lock.json │ └── gridstack │ │ ├── .github │ │ └── FUNDING.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── dist │ │ ├── dd-base-impl.d.ts │ │ ├── dd-base-impl.js │ │ ├── dd-base-impl.js.map │ │ ├── dd-draggable.d.ts │ │ ├── dd-draggable.js │ │ ├── dd-draggable.js.map │ │ ├── dd-droppable.d.ts │ │ ├── dd-droppable.js │ │ ├── dd-droppable.js.map │ │ ├── dd-element.d.ts │ │ ├── dd-element.js │ │ ├── dd-element.js.map │ │ ├── dd-gridstack.d.ts │ │ ├── dd-gridstack.js │ │ ├── dd-gridstack.js.map │ │ ├── dd-manager.d.ts │ │ ├── dd-manager.js │ │ ├── dd-manager.js.map │ │ ├── dd-resizable-handle.d.ts │ │ ├── dd-resizable-handle.js │ │ ├── dd-resizable-handle.js.map │ │ ├── dd-resizable.d.ts │ │ ├── dd-resizable.js │ │ ├── dd-resizable.js.map │ │ ├── dd-touch.d.ts │ │ ├── dd-touch.js │ │ ├── dd-touch.js.map │ │ ├── es5 │ │ │ ├── dd-base-impl.d.ts │ │ │ ├── dd-base-impl.js │ │ │ ├── dd-base-impl.js.map │ │ │ ├── dd-draggable.d.ts │ │ │ ├── dd-draggable.js │ │ │ ├── dd-draggable.js.map │ │ │ ├── dd-droppable.d.ts │ │ │ ├── dd-droppable.js │ │ │ ├── dd-droppable.js.map │ │ │ ├── dd-element.d.ts │ │ │ ├── dd-element.js │ │ │ ├── dd-element.js.map │ │ │ ├── dd-gridstack.d.ts │ │ │ ├── dd-gridstack.js │ │ │ ├── dd-gridstack.js.map │ │ │ ├── dd-manager.d.ts │ │ │ ├── dd-manager.js │ │ │ ├── dd-manager.js.map │ │ │ ├── dd-resizable-handle.d.ts │ │ │ ├── dd-resizable-handle.js │ │ │ ├── dd-resizable-handle.js.map │ │ │ ├── dd-resizable.d.ts │ │ │ ├── dd-resizable.js │ │ │ ├── dd-resizable.js.map │ │ │ ├── dd-touch.d.ts │ │ │ ├── dd-touch.js │ │ │ ├── dd-touch.js.map │ │ │ ├── gridstack-all.js │ │ │ ├── gridstack-all.js.LICENSE.txt │ │ │ ├── gridstack-all.js.map │ │ │ ├── gridstack-engine.d.ts │ │ │ ├── gridstack-engine.js │ │ │ ├── gridstack-engine.js.map │ │ │ ├── gridstack-poly.js │ │ │ ├── gridstack.d.ts │ │ │ ├── gridstack.js │ │ │ ├── gridstack.js.map │ │ │ ├── types.d.ts │ │ │ ├── types.js │ │ │ ├── types.js.map │ │ │ ├── utils.d.ts │ │ │ ├── utils.js │ │ │ └── utils.js.map │ │ ├── gridstack-all.js │ │ ├── gridstack-all.js.LICENSE.txt │ │ ├── gridstack-all.js.map │ │ ├── gridstack-engine.d.ts │ │ ├── gridstack-engine.js │ │ ├── gridstack-engine.js.map │ │ ├── gridstack-extra.css │ │ ├── gridstack-extra.min.css │ │ ├── gridstack.css │ │ ├── gridstack.d.ts │ │ ├── gridstack.js │ │ ├── gridstack.js.map │ │ ├── gridstack.min.css │ │ ├── src │ │ │ ├── gridstack-extra.scss │ │ │ └── gridstack.scss │ │ ├── types.d.ts │ │ ├── types.js │ │ ├── types.js.map │ │ ├── utils.d.ts │ │ ├── utils.js │ │ └── utils.js.map │ │ ├── doc │ │ ├── CHANGES.md │ │ └── README.md │ │ └── package.json ├── package-lock.json ├── package.json └── wwwroot │ ├── gridStackInterop.js │ └── gridstack │ ├── gridstack-all.js │ ├── gridstack-all.js.map │ └── gridstack.min.css ├── BlazorGridStackDemo ├── App.razor ├── BlazorGridStackServerModeDemo.csproj ├── Pages │ ├── Error.cshtml │ ├── Error.cshtml.cs │ ├── Index.razor │ ├── _Host.cshtml │ └── _Layout.cshtml ├── Program.cs ├── Properties │ └── launchSettings.json ├── Shared │ └── MainLayout.razor ├── _Imports.razor ├── appsettings.Development.json ├── appsettings.json └── wwwroot │ ├── css │ └── site.css │ └── favicon.ico ├── BlazorGridStackWebAssemblyDemo ├── App.razor ├── BlazorGridStackWebAssemblyDemo.csproj ├── MainLayout.razor ├── Pages │ └── Index.razor ├── Program.cs ├── Properties │ └── launchSettings.json ├── _Imports.razor └── wwwroot │ ├── css │ └── app.css │ └── index.html ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Ll]og/ 33 | [Ll]ogs/ 34 | 35 | # Visual Studio 2015/2017 cache/options directory 36 | .vs/ 37 | # Uncomment if you have tasks that create the project's static files in wwwroot 38 | #wwwroot/ 39 | 40 | # Visual Studio 2017 auto generated files 41 | Generated\ Files/ 42 | 43 | # MSTest test Results 44 | [Tt]est[Rr]esult*/ 45 | [Bb]uild[Ll]og.* 46 | 47 | # NUnit 48 | *.VisualState.xml 49 | TestResult.xml 50 | nunit-*.xml 51 | 52 | # Build Results of an ATL Project 53 | [Dd]ebugPS/ 54 | [Rr]eleasePS/ 55 | dlldata.c 56 | 57 | # Benchmark Results 58 | BenchmarkDotNet.Artifacts/ 59 | 60 | # .NET Core 61 | project.lock.json 62 | project.fragment.lock.json 63 | artifacts/ 64 | 65 | # ASP.NET Scaffolding 66 | ScaffoldingReadMe.txt 67 | 68 | # StyleCop 69 | StyleCopReport.xml 70 | 71 | # Files built by Visual Studio 72 | *_i.c 73 | *_p.c 74 | *_h.h 75 | *.ilk 76 | *.meta 77 | *.obj 78 | *.iobj 79 | *.pch 80 | *.pdb 81 | *.ipdb 82 | *.pgc 83 | *.pgd 84 | *.rsp 85 | *.sbr 86 | *.tlb 87 | *.tli 88 | *.tlh 89 | *.tmp 90 | *.tmp_proj 91 | *_wpftmp.csproj 92 | *.log 93 | *.tlog 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio 6 auto-generated project file (contains which files were open etc.) 298 | *.vbp 299 | 300 | # Visual Studio 6 workspace and project file (working project files containing files to include in project) 301 | *.dsw 302 | *.dsp 303 | 304 | # Visual Studio 6 technical files 305 | *.ncb 306 | *.aps 307 | 308 | # Visual Studio LightSwitch build output 309 | **/*.HTMLClient/GeneratedArtifacts 310 | **/*.DesktopClient/GeneratedArtifacts 311 | **/*.DesktopClient/ModelManifest.xml 312 | **/*.Server/GeneratedArtifacts 313 | **/*.Server/ModelManifest.xml 314 | _Pvt_Extensions 315 | 316 | # Paket dependency manager 317 | .paket/paket.exe 318 | paket-files/ 319 | 320 | # FAKE - F# Make 321 | .fake/ 322 | 323 | # CodeRush personal settings 324 | .cr/personal 325 | 326 | # Python Tools for Visual Studio (PTVS) 327 | __pycache__/ 328 | *.pyc 329 | 330 | # Cake - Uncomment if you are using it 331 | # tools/** 332 | # !tools/packages.config 333 | 334 | # Tabs Studio 335 | *.tss 336 | 337 | # Telerik's JustMock configuration file 338 | *.jmconfig 339 | 340 | # BizTalk build output 341 | *.btp.cs 342 | *.btm.cs 343 | *.odx.cs 344 | *.xsd.cs 345 | 346 | # OpenCover UI analysis results 347 | OpenCover/ 348 | 349 | # Azure Stream Analytics local run output 350 | ASALocalRun/ 351 | 352 | # MSBuild Binary and Structured Log 353 | *.binlog 354 | 355 | # NVidia Nsight GPU debugger configuration file 356 | *.nvuser 357 | 358 | # MFractors (Xamarin productivity tool) working folder 359 | .mfractor/ 360 | 361 | # Local History for Visual Studio 362 | .localhistory/ 363 | 364 | # Visual Studio History (VSHistory) files 365 | .vshistory/ 366 | 367 | # BeatPulse healthcheck temp database 368 | healthchecksdb 369 | 370 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 371 | MigrationBackup/ 372 | 373 | # Ionide (cross platform F# VS Code tools) working folder 374 | .ionide/ 375 | 376 | # Fody - auto-generated XML schema 377 | FodyWeavers.xsd 378 | 379 | # VS Code files for those working on multiple tools 380 | .vscode/* 381 | !.vscode/settings.json 382 | !.vscode/tasks.json 383 | !.vscode/launch.json 384 | !.vscode/extensions.json 385 | *.code-workspace 386 | 387 | # Local History for Visual Studio Code 388 | .history/ 389 | 390 | # Windows Installer files from build outputs 391 | *.cab 392 | *.msi 393 | *.msix 394 | *.msm 395 | *.msp 396 | 397 | # JetBrains Rider 398 | *.sln.iml -------------------------------------------------------------------------------- /BlazorGridStack.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.2.32630.192 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorGridStack", "BlazorGridStack\BlazorGridStack.csproj", "{69C43432-BE2D-412D-96C1-42F428FCAD11}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorGridStackServerModeDemo", "BlazorGridStackDemo\BlazorGridStackServerModeDemo.csproj", "{8D217B32-940E-4062-B834-F3EAC387D8EA}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorGridStackWebAssemblyDemo", "BlazorGridStackWebAssemblyDemo\BlazorGridStackWebAssemblyDemo.csproj", "{DDAC0392-9090-493B-A58B-57660555FA16}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Release|Any CPU = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {69C43432-BE2D-412D-96C1-42F428FCAD11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {69C43432-BE2D-412D-96C1-42F428FCAD11}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {69C43432-BE2D-412D-96C1-42F428FCAD11}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {69C43432-BE2D-412D-96C1-42F428FCAD11}.Release|Any CPU.Build.0 = Release|Any CPU 22 | {8D217B32-940E-4062-B834-F3EAC387D8EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {8D217B32-940E-4062-B834-F3EAC387D8EA}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {8D217B32-940E-4062-B834-F3EAC387D8EA}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {8D217B32-940E-4062-B834-F3EAC387D8EA}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {DDAC0392-9090-493B-A58B-57660555FA16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {DDAC0392-9090-493B-A58B-57660555FA16}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {DDAC0392-9090-493B-A58B-57660555FA16}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {DDAC0392-9090-493B-A58B-57660555FA16}.Release|Any CPU.Build.0 = Release|Any CPU 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | GlobalSection(ExtensibilityGlobals) = postSolution 35 | SolutionGuid = {3F6A0730-E0FB-44A9-91EC-7CAC4B5C0A93} 36 | EndGlobalSection 37 | EndGlobal 38 | -------------------------------------------------------------------------------- /BlazorGridStack/BlazorGridStack - Backup (1).csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | True 8 | 1.0.9 9 | Decelis 10 | gridstack.js port for Blazor 11 | https://github.com/decelis/BlazorGridStack 12 | README.md 13 | https://github.com/decelis/BlazorGridStack 14 | gridstack;blazor;js 15 | 16 | 17 | 18 | 19 | True 20 | \ 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | Always 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /BlazorGridStack/BlazorGridStack - Backup.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | True 8 | 1.0.1 9 | Decelis 10 | gridstack.js port for Blazor 11 | https://github.com/decelis/BlazorGridStack 12 | README.md 13 | https://github.com/decelis/BlazorGridStack 14 | gridstack;blazor;js 15 | 16 | 17 | 18 | 19 | True 20 | \ 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | Always 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /BlazorGridStack/BlazorGridStack.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | True 8 | 1.0.11 9 | Decelis 10 | gridstack.js port for Blazor 11 | https://github.com/decelis/BlazorGridStack 12 | README.md 13 | https://github.com/decelis/BlazorGridStack 14 | gridstack;blazor;js 15 | 16 | 17 | 18 | 19 | True 20 | \ 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | Always 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /BlazorGridStack/BlazorGridStackBody.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Components.Rendering 2 | @using Microsoft.JSInterop 3 | @inject IJSRuntime _jsRuntime 4 | 5 |
6 | @ChildContent 7 |
-------------------------------------------------------------------------------- /BlazorGridStack/BlazorGridStackWidget.razor: -------------------------------------------------------------------------------- 1 | 
6 |
@ChildContent
7 |
8 | -------------------------------------------------------------------------------- /BlazorGridStack/BlazorGridStackWidget.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using BlazorGridStack.Models; 7 | using Microsoft.AspNetCore.Components; 8 | 9 | namespace BlazorGridStack 10 | { 11 | partial class BlazorGridStackWidget : ComponentBase 12 | { 13 | [Parameter] public RenderFragment? ChildContent { get; set; } 14 | [Parameter] public BlazorGridStackWidgetOptions? WidgetOptions { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /BlazorGridStack/Models/BlazorGridCoordinates.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace BlazorGridStack.Models 8 | { 9 | public class BlazorGridCoordinates 10 | { 11 | public int X { get; set; } 12 | public int Y { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /BlazorGridStack/Models/BlazorGridStackDroppedEventArgs.cs: -------------------------------------------------------------------------------- 1 | namespace BlazorGridStack.Models; 2 | 3 | public class BlazorGridStackDroppedEventArgs 4 | { 5 | public BlazorGridStackWidgetData? PreviousWidget { get; set; } 6 | public BlazorGridStackWidgetData NewWidget { get; set; } 7 | } -------------------------------------------------------------------------------- /BlazorGridStack/Models/BlazorGridStackWidgetData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace BlazorGridStack.Models 8 | { 9 | public class BlazorGridStackWidgetData 10 | { 11 | 12 | public string Content { get; set; } 13 | public int H { get; set; } 14 | public int W { get; set; } 15 | public int X { get; set; } 16 | public int Y { get; set; } 17 | public string? ClassName { get; set; } 18 | public string Id { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /BlazorGridStack/Models/BlazorGridStackWidgetEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace BlazorGridStack.Models 8 | { 9 | public class BlazorGridStackWidgetEventArgs 10 | { 11 | public BlazorGridStackWidgetData Item { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /BlazorGridStack/Models/BlazorGridStackWidgetListEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace BlazorGridStack.Models 8 | { 9 | public class BlazorGridStackWidgetListEventArgs: EventArgs 10 | { 11 | public IEnumerable Items { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /BlazorGridStack/Models/BlazorGridStackWidgetOptions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Newtonsoft.Json; 7 | 8 | namespace BlazorGridStack.Models 9 | { 10 | public class BlazorGridStackWidgetOptions 11 | { 12 | public bool? AutoPosition { get; set; } 13 | public int? X { get; set; } 14 | public int? Y { get; set; } 15 | public int? W { get; set; } 16 | public int? H { get; set; } 17 | public int? MaxW { get; set; } 18 | public int? MinW { get; set; } 19 | public int? MaxH { get; set; } 20 | public int? MinH { get; set; } 21 | public bool? Locked { get; set; } 22 | public bool? NoResize { get; set; } 23 | public bool? NoMove { get; set; } 24 | public string? ResizeHandles { get; set; } 25 | public object Id { get; set; } 26 | public string? Content { get; set; } 27 | public BlazorGridStackBodyOptions? SubGrid { get; set; } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /BlazorGridStack/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "BlazorGridStack": { 4 | "commandName": "Project" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /BlazorGridStack/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Components.Web 2 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/.package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "blazorgridstack", 3 | "version": "1.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "node_modules/gridstack": { 8 | "version": "7.1.0", 9 | "resolved": "https://registry.npmjs.org/gridstack/-/gridstack-7.1.0.tgz", 10 | "integrity": "sha512-lLRUfZvDNphtmHtf/wVSA1dgipFeHQUi21G5rO+YtYzC8kbTWkLE8GoNA5k8qbUj8uzEhK7iKNrppo3hJWRWRA==", 11 | "funding": [ 12 | { 13 | "type": "paypal", 14 | "url": "https://www.paypal.me/alaind831" 15 | }, 16 | { 17 | "type": "venmo", 18 | "url": "https://www.venmo.com/adumesny" 19 | } 20 | ] 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: ['https://www.paypal.me/alaind831', 'https://www.venmo.com/adumesny'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/LICENSE: -------------------------------------------------------------------------------- 1 | v4+ Copyright (c) 2021 Alain Dumesny 2 | under MIT license 3 | 4 | previous v3.x and older is: 5 | /** 6 | * https://gridstackjs.com/ 7 | * (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov 8 | * gridstack.js may be freely distributed under the MIT license. 9 | */ 10 | 11 | The MIT License (MIT) 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy 14 | of this software and associated documentation files (the "Software"), to deal 15 | in the Software without restriction, including without limitation the rights 16 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 17 | copies of the Software, and to permit persons to whom the Software is 18 | furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included in all 21 | copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 28 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 29 | SOFTWARE. 30 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/dd-base-impl.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * dd-base-impl.ts 7.1.0 3 | * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license 4 | */ 5 | export declare type EventCallback = (event: Event) => boolean | void; 6 | export declare abstract class DDBaseImplement { 7 | /** returns the enable state, but you have to call enable()/disable() to change (as other things need to happen) */ 8 | get disabled(): boolean; 9 | on(event: string, callback: EventCallback): void; 10 | off(event: string): void; 11 | enable(): void; 12 | disable(): void; 13 | destroy(): void; 14 | triggerEvent(eventName: string, event: Event): boolean | void; 15 | } 16 | export interface HTMLElementExtendOpt { 17 | el: HTMLElement; 18 | option: T; 19 | updateOption(T: any): DDBaseImplement; 20 | } 21 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/dd-base-impl.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * dd-base-impl.ts 7.1.0 4 | * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license 5 | */ 6 | Object.defineProperty(exports, "__esModule", { value: true }); 7 | exports.DDBaseImplement = void 0; 8 | class DDBaseImplement { 9 | constructor() { 10 | /** @internal */ 11 | this._eventRegister = {}; 12 | } 13 | /** returns the enable state, but you have to call enable()/disable() to change (as other things need to happen) */ 14 | get disabled() { return this._disabled; } 15 | on(event, callback) { 16 | this._eventRegister[event] = callback; 17 | } 18 | off(event) { 19 | delete this._eventRegister[event]; 20 | } 21 | enable() { 22 | this._disabled = false; 23 | } 24 | disable() { 25 | this._disabled = true; 26 | } 27 | destroy() { 28 | delete this._eventRegister; 29 | } 30 | triggerEvent(eventName, event) { 31 | if (!this.disabled && this._eventRegister && this._eventRegister[eventName]) 32 | return this._eventRegister[eventName](event); 33 | } 34 | } 35 | exports.DDBaseImplement = DDBaseImplement; 36 | //# sourceMappingURL=dd-base-impl.js.map -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/dd-base-impl.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"dd-base-impl.js","sourceRoot":"","sources":["../src/dd-base-impl.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,MAAsB,eAAe;IAArC;QAME,gBAAgB;QACN,mBAAc,GAEpB,EAAE,CAAC;IA0BT,CAAC;IAlCC,mHAAmH;IACnH,IAAW,QAAQ,KAAgB,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IASpD,EAAE,CAAC,KAAa,EAAE,QAAuB;QAC9C,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC;IACxC,CAAC;IAEM,GAAG,CAAC,KAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAEM,MAAM;QACX,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACzB,CAAC;IAEM,OAAO;QACZ,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACxB,CAAC;IAEM,OAAO;QACZ,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAEM,YAAY,CAAC,SAAiB,EAAE,KAAY;QACjD,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC;YACzE,OAAO,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC;CACF;AAnCD,0CAmCC","sourcesContent":["/**\n * dd-base-impl.ts 7.1.0\n * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license\n */\n\nexport type EventCallback = (event: Event) => boolean|void;\nexport abstract class DDBaseImplement {\n /** returns the enable state, but you have to call enable()/disable() to change (as other things need to happen) */\n public get disabled(): boolean { return this._disabled; }\n\n /** @internal */\n protected _disabled: boolean; // initial state to differentiate from false\n /** @internal */\n protected _eventRegister: {\n [eventName: string]: EventCallback;\n } = {};\n\n public on(event: string, callback: EventCallback): void {\n this._eventRegister[event] = callback;\n }\n\n public off(event: string): void {\n delete this._eventRegister[event];\n }\n\n public enable(): void {\n this._disabled = false;\n }\n\n public disable(): void {\n this._disabled = true;\n }\n\n public destroy(): void {\n delete this._eventRegister;\n }\n\n public triggerEvent(eventName: string, event: Event): boolean|void {\n if (!this.disabled && this._eventRegister && this._eventRegister[eventName])\n return this._eventRegister[eventName](event);\n }\n}\n\nexport interface HTMLElementExtendOpt {\n el: HTMLElement;\n option: T;\n updateOption(T): DDBaseImplement;\n}\n"]} -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/dd-draggable.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * dd-draggable.ts 7.1.0 3 | * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license 4 | */ 5 | import { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl'; 6 | import { DDUIData } from './types'; 7 | export interface DDDraggableOpt { 8 | appendTo?: string | HTMLElement; 9 | handle?: string; 10 | helper?: string | HTMLElement | ((event: Event) => HTMLElement); 11 | start?: (event: Event, ui: DDUIData) => void; 12 | stop?: (event: Event) => void; 13 | drag?: (event: Event, ui: DDUIData) => void; 14 | } 15 | declare type DDDragEvent = 'drag' | 'dragstart' | 'dragstop'; 16 | export declare class DDDraggable extends DDBaseImplement implements HTMLElementExtendOpt { 17 | el: HTMLElement; 18 | option: DDDraggableOpt; 19 | helper: HTMLElement; 20 | constructor(el: HTMLElement, option?: DDDraggableOpt); 21 | on(event: DDDragEvent, callback: (event: DragEvent) => void): void; 22 | off(event: DDDragEvent): void; 23 | enable(): void; 24 | disable(forDestroy?: boolean): void; 25 | destroy(): void; 26 | updateOption(opts: DDDraggableOpt): DDDraggable; 27 | } 28 | export {}; 29 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/dd-droppable.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * dd-droppable.ts 7.1.0 3 | * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license 4 | */ 5 | import { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl'; 6 | export interface DDDroppableOpt { 7 | accept?: string | ((el: HTMLElement) => boolean); 8 | drop?: (event: DragEvent, ui: any) => void; 9 | over?: (event: DragEvent, ui: any) => void; 10 | out?: (event: DragEvent, ui: any) => void; 11 | } 12 | export declare class DDDroppable extends DDBaseImplement implements HTMLElementExtendOpt { 13 | accept: (el: HTMLElement) => boolean; 14 | el: HTMLElement; 15 | option: DDDroppableOpt; 16 | constructor(el: HTMLElement, opts?: DDDroppableOpt); 17 | on(event: 'drop' | 'dropover' | 'dropout', callback: (event: DragEvent) => void): void; 18 | off(event: 'drop' | 'dropover' | 'dropout'): void; 19 | enable(): void; 20 | disable(forDestroy?: boolean): void; 21 | destroy(): void; 22 | updateOption(opts: DDDroppableOpt): DDDroppable; 23 | /** item is being dropped on us - called by the drag mouseup handler - this calls the client drop event */ 24 | drop(e: MouseEvent): void; 25 | } 26 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/dd-droppable.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * dd-droppable.ts 7.1.0 4 | * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license 5 | */ 6 | Object.defineProperty(exports, "__esModule", { value: true }); 7 | exports.DDDroppable = void 0; 8 | const dd_manager_1 = require("./dd-manager"); 9 | const dd_base_impl_1 = require("./dd-base-impl"); 10 | const utils_1 = require("./utils"); 11 | const dd_touch_1 = require("./dd-touch"); 12 | // let count = 0; // TEST 13 | class DDDroppable extends dd_base_impl_1.DDBaseImplement { 14 | constructor(el, opts = {}) { 15 | super(); 16 | this.el = el; 17 | this.option = opts; 18 | // create var event binding so we can easily remove and still look like TS methods (unlike anonymous functions) 19 | this._mouseEnter = this._mouseEnter.bind(this); 20 | this._mouseLeave = this._mouseLeave.bind(this); 21 | this.enable(); 22 | this._setupAccept(); 23 | } 24 | on(event, callback) { 25 | super.on(event, callback); 26 | } 27 | off(event) { 28 | super.off(event); 29 | } 30 | enable() { 31 | if (this.disabled === false) 32 | return; 33 | super.enable(); 34 | this.el.classList.add('ui-droppable'); 35 | this.el.classList.remove('ui-droppable-disabled'); 36 | this.el.addEventListener('mouseenter', this._mouseEnter); 37 | this.el.addEventListener('mouseleave', this._mouseLeave); 38 | if (dd_touch_1.isTouch) { 39 | this.el.addEventListener('pointerenter', dd_touch_1.pointerenter); 40 | this.el.addEventListener('pointerleave', dd_touch_1.pointerleave); 41 | } 42 | } 43 | disable(forDestroy = false) { 44 | if (this.disabled === true) 45 | return; 46 | super.disable(); 47 | this.el.classList.remove('ui-droppable'); 48 | if (!forDestroy) 49 | this.el.classList.add('ui-droppable-disabled'); 50 | this.el.removeEventListener('mouseenter', this._mouseEnter); 51 | this.el.removeEventListener('mouseleave', this._mouseLeave); 52 | if (dd_touch_1.isTouch) { 53 | this.el.removeEventListener('pointerenter', dd_touch_1.pointerenter); 54 | this.el.removeEventListener('pointerleave', dd_touch_1.pointerleave); 55 | } 56 | } 57 | destroy() { 58 | this.disable(true); 59 | this.el.classList.remove('ui-droppable'); 60 | this.el.classList.remove('ui-droppable-disabled'); 61 | super.destroy(); 62 | } 63 | updateOption(opts) { 64 | Object.keys(opts).forEach(key => this.option[key] = opts[key]); 65 | this._setupAccept(); 66 | return this; 67 | } 68 | /** @internal called when the cursor enters our area - prepare for a possible drop and track leaving */ 69 | _mouseEnter(e) { 70 | // console.log(`${count++} Enter ${this.el.id || (this.el as GridHTMLElement).gridstack.opts.id}`); // TEST 71 | if (!dd_manager_1.DDManager.dragElement) 72 | return; 73 | if (!this._canDrop(dd_manager_1.DDManager.dragElement.el)) 74 | return; 75 | e.preventDefault(); 76 | e.stopPropagation(); 77 | // make sure when we enter this, that the last one gets a leave FIRST to correctly cleanup as we don't always do 78 | if (dd_manager_1.DDManager.dropElement && dd_manager_1.DDManager.dropElement !== this) { 79 | dd_manager_1.DDManager.dropElement._mouseLeave(e); 80 | } 81 | dd_manager_1.DDManager.dropElement = this; 82 | const ev = utils_1.Utils.initEvent(e, { target: this.el, type: 'dropover' }); 83 | if (this.option.over) { 84 | this.option.over(ev, this._ui(dd_manager_1.DDManager.dragElement)); 85 | } 86 | this.triggerEvent('dropover', ev); 87 | this.el.classList.add('ui-droppable-over'); 88 | // console.log('tracking'); // TEST 89 | } 90 | /** @internal called when the item is leaving our area, stop tracking if we had moving item */ 91 | _mouseLeave(e) { 92 | var _a; 93 | // console.log(`${count++} Leave ${this.el.id || (this.el as GridHTMLElement).gridstack.opts.id}`); // TEST 94 | if (!dd_manager_1.DDManager.dragElement || dd_manager_1.DDManager.dropElement !== this) 95 | return; 96 | e.preventDefault(); 97 | e.stopPropagation(); 98 | const ev = utils_1.Utils.initEvent(e, { target: this.el, type: 'dropout' }); 99 | if (this.option.out) { 100 | this.option.out(ev, this._ui(dd_manager_1.DDManager.dragElement)); 101 | } 102 | this.triggerEvent('dropout', ev); 103 | if (dd_manager_1.DDManager.dropElement === this) { 104 | delete dd_manager_1.DDManager.dropElement; 105 | // console.log('not tracking'); // TEST 106 | // if we're still over a parent droppable, send it an enter as we don't get one from leaving nested children 107 | let parentDrop; 108 | let parent = this.el.parentElement; 109 | while (!parentDrop && parent) { 110 | parentDrop = (_a = parent.ddElement) === null || _a === void 0 ? void 0 : _a.ddDroppable; 111 | parent = parent.parentElement; 112 | } 113 | if (parentDrop) { 114 | parentDrop._mouseEnter(e); 115 | } 116 | } 117 | } 118 | /** item is being dropped on us - called by the drag mouseup handler - this calls the client drop event */ 119 | drop(e) { 120 | e.preventDefault(); 121 | const ev = utils_1.Utils.initEvent(e, { target: this.el, type: 'drop' }); 122 | if (this.option.drop) { 123 | this.option.drop(ev, this._ui(dd_manager_1.DDManager.dragElement)); 124 | } 125 | this.triggerEvent('drop', ev); 126 | } 127 | /** @internal true if element matches the string/method accept option */ 128 | _canDrop(el) { 129 | return el && (!this.accept || this.accept(el)); 130 | } 131 | /** @internal */ 132 | _setupAccept() { 133 | if (!this.option.accept) 134 | return this; 135 | if (typeof this.option.accept === 'string') { 136 | this.accept = (el) => el.matches(this.option.accept); 137 | } 138 | else { 139 | this.accept = this.option.accept; 140 | } 141 | return this; 142 | } 143 | /** @internal */ 144 | _ui(drag) { 145 | return Object.assign({ draggable: drag.el }, drag.ui()); 146 | } 147 | } 148 | exports.DDDroppable = DDDroppable; 149 | //# sourceMappingURL=dd-droppable.js.map -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/dd-element.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * dd-elements.ts 7.1.0 3 | * Copyright (c) 2021 Alain Dumesny - see GridStack root license 4 | */ 5 | import { DDResizable, DDResizableOpt } from './dd-resizable'; 6 | import { GridItemHTMLElement } from './types'; 7 | import { DDDraggable, DDDraggableOpt } from './dd-draggable'; 8 | import { DDDroppable, DDDroppableOpt } from './dd-droppable'; 9 | export interface DDElementHost extends GridItemHTMLElement { 10 | ddElement?: DDElement; 11 | } 12 | export declare class DDElement { 13 | static init(el: DDElementHost): DDElement; 14 | el: DDElementHost; 15 | ddDraggable?: DDDraggable; 16 | ddDroppable?: DDDroppable; 17 | ddResizable?: DDResizable; 18 | constructor(el: DDElementHost); 19 | on(eventName: string, callback: (event: MouseEvent) => void): DDElement; 20 | off(eventName: string): DDElement; 21 | setupDraggable(opts: DDDraggableOpt): DDElement; 22 | cleanDraggable(): DDElement; 23 | setupResizable(opts: DDResizableOpt): DDElement; 24 | cleanResizable(): DDElement; 25 | setupDroppable(opts: DDDroppableOpt): DDElement; 26 | cleanDroppable(): DDElement; 27 | } 28 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/dd-element.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * dd-elements.ts 7.1.0 4 | * Copyright (c) 2021 Alain Dumesny - see GridStack root license 5 | */ 6 | Object.defineProperty(exports, "__esModule", { value: true }); 7 | exports.DDElement = void 0; 8 | const dd_resizable_1 = require("./dd-resizable"); 9 | const dd_draggable_1 = require("./dd-draggable"); 10 | const dd_droppable_1 = require("./dd-droppable"); 11 | class DDElement { 12 | constructor(el) { 13 | this.el = el; 14 | } 15 | static init(el) { 16 | if (!el.ddElement) { 17 | el.ddElement = new DDElement(el); 18 | } 19 | return el.ddElement; 20 | } 21 | on(eventName, callback) { 22 | if (this.ddDraggable && ['drag', 'dragstart', 'dragstop'].indexOf(eventName) > -1) { 23 | this.ddDraggable.on(eventName, callback); 24 | } 25 | else if (this.ddDroppable && ['drop', 'dropover', 'dropout'].indexOf(eventName) > -1) { 26 | this.ddDroppable.on(eventName, callback); 27 | } 28 | else if (this.ddResizable && ['resizestart', 'resize', 'resizestop'].indexOf(eventName) > -1) { 29 | this.ddResizable.on(eventName, callback); 30 | } 31 | return this; 32 | } 33 | off(eventName) { 34 | if (this.ddDraggable && ['drag', 'dragstart', 'dragstop'].indexOf(eventName) > -1) { 35 | this.ddDraggable.off(eventName); 36 | } 37 | else if (this.ddDroppable && ['drop', 'dropover', 'dropout'].indexOf(eventName) > -1) { 38 | this.ddDroppable.off(eventName); 39 | } 40 | else if (this.ddResizable && ['resizestart', 'resize', 'resizestop'].indexOf(eventName) > -1) { 41 | this.ddResizable.off(eventName); 42 | } 43 | return this; 44 | } 45 | setupDraggable(opts) { 46 | if (!this.ddDraggable) { 47 | this.ddDraggable = new dd_draggable_1.DDDraggable(this.el, opts); 48 | } 49 | else { 50 | this.ddDraggable.updateOption(opts); 51 | } 52 | return this; 53 | } 54 | cleanDraggable() { 55 | if (this.ddDraggable) { 56 | this.ddDraggable.destroy(); 57 | delete this.ddDraggable; 58 | } 59 | return this; 60 | } 61 | setupResizable(opts) { 62 | if (!this.ddResizable) { 63 | this.ddResizable = new dd_resizable_1.DDResizable(this.el, opts); 64 | } 65 | else { 66 | this.ddResizable.updateOption(opts); 67 | } 68 | return this; 69 | } 70 | cleanResizable() { 71 | if (this.ddResizable) { 72 | this.ddResizable.destroy(); 73 | delete this.ddResizable; 74 | } 75 | return this; 76 | } 77 | setupDroppable(opts) { 78 | if (!this.ddDroppable) { 79 | this.ddDroppable = new dd_droppable_1.DDDroppable(this.el, opts); 80 | } 81 | else { 82 | this.ddDroppable.updateOption(opts); 83 | } 84 | return this; 85 | } 86 | cleanDroppable() { 87 | if (this.ddDroppable) { 88 | this.ddDroppable.destroy(); 89 | delete this.ddDroppable; 90 | } 91 | return this; 92 | } 93 | } 94 | exports.DDElement = DDElement; 95 | //# sourceMappingURL=dd-element.js.map -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/dd-element.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"dd-element.js","sourceRoot":"","sources":["../src/dd-element.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDAA6D;AAE7D,iDAA6D;AAC7D,iDAA6D;AAM7D,MAAa,SAAS;IAYpB,YAAY,EAAiB;QAC3B,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;IAZD,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;IAWM,EAAE,CAAC,SAAiB,EAAE,QAAqC;QAChE,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,CAA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pB,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;YAC3B,OAAO,IAAI,CAAC,WAAW,CAAC;SACzB;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAxFD,8BAwFC","sourcesContent":["/**\n * dd-elements.ts 7.1.0\n * Copyright (c) 2021 Alain Dumesny - see GridStack root license\n */\n\nimport { DDResizable, DDResizableOpt } from './dd-resizable';\nimport { GridItemHTMLElement } from './types';\nimport { DDDraggable, DDDraggableOpt } 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 el: DDElementHost;\n public ddDraggable?: DDDraggable;\n public ddDroppable?: DDDroppable;\n public ddResizable?: DDResizable;\n\n constructor(el: DDElementHost) {\n this.el = el;\n }\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: DDDraggableOpt): 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"]} -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/dd-gridstack.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * dd-gridstack.ts 7.1.0 3 | * Copyright (c) 2021 Alain Dumesny - see GridStack root license 4 | */ 5 | import { GridItemHTMLElement, GridStackElement, DDDragInOpt } from './types'; 6 | import { DDElementHost } from './dd-element'; 7 | /** Drag&Drop drop options */ 8 | export declare type DDDropOpt = { 9 | /** function or class type that this grid will accept as dropped items (see GridStackOptions.acceptWidgets) */ 10 | accept?: (el: GridItemHTMLElement) => boolean; 11 | }; 12 | /** drag&drop options currently called from the main code, but others can be passed in grid options */ 13 | export declare type DDOpts = 'enable' | 'disable' | 'destroy' | 'option' | string | any; 14 | export declare type DDKey = 'minWidth' | 'minHeight' | 'maxWidth' | 'maxHeight'; 15 | export declare type DDValue = number | string; 16 | /** drag&drop events callbacks */ 17 | export declare type DDCallback = (event: Event, arg2: GridItemHTMLElement, helper?: GridItemHTMLElement) => void; 18 | /** 19 | * HTML Native Mouse and Touch Events Drag and Drop functionality. 20 | */ 21 | export declare class DDGridStack { 22 | /** get the global (but static to this code) DD implementation */ 23 | static get(): DDGridStack; 24 | resizable(el: GridItemHTMLElement, opts: DDOpts, key?: DDKey, value?: DDValue): DDGridStack; 25 | draggable(el: GridItemHTMLElement, opts: DDOpts, key?: DDKey, value?: DDValue): DDGridStack; 26 | dragIn(el: GridStackElement, opts: DDDragInOpt): DDGridStack; 27 | droppable(el: GridItemHTMLElement, opts: DDOpts | DDDropOpt, key?: DDKey, value?: DDValue): DDGridStack; 28 | /** true if element is droppable */ 29 | isDroppable(el: DDElementHost): boolean; 30 | /** true if element is draggable */ 31 | isDraggable(el: DDElementHost): boolean; 32 | /** true if element is draggable */ 33 | isResizable(el: DDElementHost): boolean; 34 | on(el: GridItemHTMLElement, name: string, callback: DDCallback): DDGridStack; 35 | off(el: GridItemHTMLElement, name: string): DDGridStack; 36 | } 37 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/dd-manager.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * dd-manager.ts 7.1.0 3 | * Copyright (c) 2021 Alain Dumesny - see GridStack root license 4 | */ 5 | import { DDDraggable } from './dd-draggable'; 6 | import { DDDroppable } from './dd-droppable'; 7 | import { DDResizable } from './dd-resizable'; 8 | /** 9 | * globals that are shared across Drag & Drop instances 10 | */ 11 | export declare class DDManager { 12 | /** if set (true | in msec), dragging placement (collision) will only happen after a pause by the user*/ 13 | static pauseDrag: boolean | number; 14 | /** true if a mouse down event was handled */ 15 | static mouseHandled: boolean; 16 | /** item being dragged */ 17 | static dragElement: DDDraggable; 18 | /** item we are currently over as drop target */ 19 | static dropElement: DDDroppable; 20 | /** current item we're over for resizing purpose (ignore nested grid resize handles) */ 21 | static overResizeElement: DDResizable; 22 | } 23 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/dd-manager.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * dd-manager.ts 7.1.0 4 | * Copyright (c) 2021 Alain Dumesny - see GridStack root license 5 | */ 6 | Object.defineProperty(exports, "__esModule", { value: true }); 7 | exports.DDManager = void 0; 8 | /** 9 | * globals that are shared across Drag & Drop instances 10 | */ 11 | class DDManager { 12 | } 13 | exports.DDManager = DDManager; 14 | //# sourceMappingURL=dd-manager.js.map -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/dd-manager.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"dd-manager.js","sourceRoot":"","sources":["../src/dd-manager.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAMH;;GAEG;AACH,MAAa,SAAS;CAgBrB;AAhBD,8BAgBC","sourcesContent":["/**\n * dd-manager.ts 7.1.0\n * Copyright (c) 2021 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 * globals that are shared across Drag & Drop instances\n */\nexport class DDManager {\n /** if set (true | in msec), dragging placement (collision) will only happen after a pause by the user*/\n public static pauseDrag: boolean | number;\n\n /** true if a mouse down event was handled */\n public static mouseHandled: boolean;\n\n /** item being dragged */\n public static dragElement: DDDraggable;\n\n /** item we are currently over as drop target */\n public static dropElement: DDDroppable;\n\n /** current item we're over for resizing purpose (ignore nested grid resize handles) */\n public static overResizeElement: DDResizable;\n\n}\n"]} -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/dd-resizable-handle.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * dd-resizable-handle.ts 7.1.0 3 | * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license 4 | */ 5 | export interface DDResizableHandleOpt { 6 | start?: (event: any) => void; 7 | move?: (event: any) => void; 8 | stop?: (event: any) => void; 9 | } 10 | export declare class DDResizableHandle { 11 | constructor(host: HTMLElement, direction: string, option: DDResizableHandleOpt); 12 | /** call this when resize handle needs to be removed and cleaned up */ 13 | destroy(): DDResizableHandle; 14 | } 15 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/dd-resizable-handle.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * dd-resizable-handle.ts 7.1.0 4 | * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license 5 | */ 6 | Object.defineProperty(exports, "__esModule", { value: true }); 7 | exports.DDResizableHandle = void 0; 8 | const dd_touch_1 = require("./dd-touch"); 9 | class DDResizableHandle { 10 | constructor(host, direction, option) { 11 | /** @internal true after we've moved enough pixels to start a resize */ 12 | this.moving = false; 13 | this.host = host; 14 | this.dir = direction; 15 | this.option = option; 16 | // create var event binding so we can easily remove and still look like TS methods (unlike anonymous functions) 17 | this._mouseDown = this._mouseDown.bind(this); 18 | this._mouseMove = this._mouseMove.bind(this); 19 | this._mouseUp = this._mouseUp.bind(this); 20 | this._init(); 21 | } 22 | /** @internal */ 23 | _init() { 24 | const el = document.createElement('div'); 25 | el.classList.add('ui-resizable-handle'); 26 | el.classList.add(`${DDResizableHandle.prefix}${this.dir}`); 27 | el.style.zIndex = '100'; 28 | el.style.userSelect = 'none'; 29 | this.el = el; 30 | this.host.appendChild(this.el); 31 | this.el.addEventListener('mousedown', this._mouseDown); 32 | if (dd_touch_1.isTouch) { 33 | this.el.addEventListener('touchstart', dd_touch_1.touchstart); 34 | this.el.addEventListener('pointerdown', dd_touch_1.pointerdown); 35 | // this.el.style.touchAction = 'none'; // not needed unlike pointerdown doc comment 36 | } 37 | return this; 38 | } 39 | /** call this when resize handle needs to be removed and cleaned up */ 40 | destroy() { 41 | if (this.moving) 42 | this._mouseUp(this.mouseDownEvent); 43 | this.el.removeEventListener('mousedown', this._mouseDown); 44 | if (dd_touch_1.isTouch) { 45 | this.el.removeEventListener('touchstart', dd_touch_1.touchstart); 46 | this.el.removeEventListener('pointerdown', dd_touch_1.pointerdown); 47 | } 48 | this.host.removeChild(this.el); 49 | delete this.el; 50 | delete this.host; 51 | return this; 52 | } 53 | /** @internal called on mouse down on us: capture move on the entire document (mouse might not stay on us) until we release the mouse */ 54 | _mouseDown(e) { 55 | this.mouseDownEvent = e; 56 | document.addEventListener('mousemove', this._mouseMove, true); // capture, not bubble 57 | document.addEventListener('mouseup', this._mouseUp, true); 58 | if (dd_touch_1.isTouch) { 59 | this.el.addEventListener('touchmove', dd_touch_1.touchmove); 60 | this.el.addEventListener('touchend', dd_touch_1.touchend); 61 | } 62 | e.stopPropagation(); 63 | e.preventDefault(); 64 | } 65 | /** @internal */ 66 | _mouseMove(e) { 67 | let s = this.mouseDownEvent; 68 | if (this.moving) { 69 | this._triggerEvent('move', e); 70 | } 71 | else if (Math.abs(e.x - s.x) + Math.abs(e.y - s.y) > 2) { 72 | // don't start unless we've moved at least 3 pixels 73 | this.moving = true; 74 | this._triggerEvent('start', this.mouseDownEvent); 75 | this._triggerEvent('move', e); 76 | } 77 | e.stopPropagation(); 78 | e.preventDefault(); 79 | } 80 | /** @internal */ 81 | _mouseUp(e) { 82 | if (this.moving) { 83 | this._triggerEvent('stop', e); 84 | } 85 | document.removeEventListener('mousemove', this._mouseMove, true); 86 | document.removeEventListener('mouseup', this._mouseUp, true); 87 | if (dd_touch_1.isTouch) { 88 | this.el.removeEventListener('touchmove', dd_touch_1.touchmove); 89 | this.el.removeEventListener('touchend', dd_touch_1.touchend); 90 | } 91 | delete this.moving; 92 | delete this.mouseDownEvent; 93 | e.stopPropagation(); 94 | e.preventDefault(); 95 | } 96 | /** @internal */ 97 | _triggerEvent(name, event) { 98 | if (this.option[name]) 99 | this.option[name](event); 100 | return this; 101 | } 102 | } 103 | exports.DDResizableHandle = DDResizableHandle; 104 | /** @internal */ 105 | DDResizableHandle.prefix = 'ui-resizable-'; 106 | //# sourceMappingURL=dd-resizable-handle.js.map -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/dd-resizable-handle.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"dd-resizable-handle.js","sourceRoot":"","sources":["../src/dd-resizable-handle.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,yCAAmF;AAQnF,MAAa,iBAAiB;IAgB5B,YAAY,IAAiB,EAAE,SAAiB,EAAE,MAA4B;QAP9E,uEAAuE;QAC7D,WAAM,GAAG,KAAK,CAAC;QAOvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,GAAG,GAAG,SAAS,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,+GAA+G;QAC/G,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEzC,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAED,gBAAgB;IACN,KAAK;QACb,MAAM,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACzC,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;QACxC,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,iBAAiB,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QAC3D,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC;QACxB,EAAE,CAAC,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QA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,oBAAS,CAAC,CAAC;YACpD,IAAI,CAAC,EAAE,CAAC,mBAAmB,CAAC,UAAU,EAAE,mBAAQ,CAAC,CAAC;SACnD;QACD,OAAO,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,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;;AA7GH,8CA8GC;AAjGC,gBAAgB;AACC,wBAAM,GAAG,eAAe,CAAC","sourcesContent":["/**\n * dd-resizable-handle.ts 7.1.0\n * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license\n */\n\nimport { isTouch, pointerdown, touchend, touchmove, touchstart } from './dd-touch';\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 */\n protected host: HTMLElement;\n /** @internal */\n protected option: DDResizableHandleOpt;\n /** @internal */\n protected dir: string;\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(host: HTMLElement, direction: string, option: DDResizableHandleOpt) {\n this.host = host;\n this.dir = direction;\n this.option = option;\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\n this._init();\n }\n\n /** @internal */\n protected _init(): DDResizableHandle {\n const 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.el = el;\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) {\n this.mouseDownEvent = e;\n document.addEventListener('mousemove', this._mouseMove, 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) {\n let 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 }\n e.stopPropagation();\n e.preventDefault();\n }\n\n /** @internal */\n protected _mouseUp(e: MouseEvent) {\n if (this.moving) {\n this._triggerEvent('stop', e);\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 */\n protected _triggerEvent(name: string, event: MouseEvent): DDResizableHandle {\n if (this.option[name]) this.option[name](event);\n return this;\n }\n}\n"]} -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/dd-resizable.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * dd-resizable.ts 7.1.0 3 | * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license 4 | */ 5 | import { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl'; 6 | import { DDUIData } from './types'; 7 | export interface DDResizableOpt { 8 | autoHide?: boolean; 9 | handles?: string; 10 | maxHeight?: number; 11 | maxWidth?: number; 12 | minHeight?: number; 13 | minWidth?: number; 14 | start?: (event: Event, ui: DDUIData) => void; 15 | stop?: (event: Event) => void; 16 | resize?: (event: Event, ui: DDUIData) => void; 17 | } 18 | export declare class DDResizable extends DDBaseImplement implements HTMLElementExtendOpt { 19 | el: HTMLElement; 20 | option: DDResizableOpt; 21 | constructor(el: HTMLElement, opts?: DDResizableOpt); 22 | on(event: 'resizestart' | 'resize' | 'resizestop', callback: (event: DragEvent) => void): void; 23 | off(event: 'resizestart' | 'resize' | 'resizestop'): void; 24 | enable(): void; 25 | disable(): void; 26 | destroy(): void; 27 | updateOption(opts: DDResizableOpt): DDResizable; 28 | } 29 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/dd-touch.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * touch.ts 7.1.0 3 | * Copyright (c) 2021 Alain Dumesny - see GridStack root license 4 | */ 5 | /** 6 | * Detect touch support - Windows Surface devices and other touch devices 7 | * should we use this instead ? (what we had for always showing resize handles) 8 | * /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) 9 | */ 10 | export declare const isTouch: boolean; 11 | /** 12 | * Handle the touchstart events 13 | * @param {Object} e The widget element's touchstart event 14 | */ 15 | export declare function touchstart(e: TouchEvent): void; 16 | /** 17 | * Handle the touchmove events 18 | * @param {Object} e The document's touchmove event 19 | */ 20 | export declare function touchmove(e: TouchEvent): void; 21 | /** 22 | * Handle the touchend events 23 | * @param {Object} e The document's touchend event 24 | */ 25 | export declare function touchend(e: TouchEvent): void; 26 | /** 27 | * Note we don't get touchenter/touchleave (which are deprecated) 28 | * see https://stackoverflow.com/questions/27908339/js-touch-equivalent-for-mouseenter 29 | * so instead of PointerEvent to still get enter/leave and send the matching mouse event. 30 | */ 31 | export declare function pointerdown(e: PointerEvent): void; 32 | export declare function pointerenter(e: PointerEvent): void; 33 | export declare function pointerleave(e: PointerEvent): void; 34 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/dd-touch.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * touch.ts 7.1.0 4 | * Copyright (c) 2021 Alain Dumesny - see GridStack root license 5 | */ 6 | Object.defineProperty(exports, "__esModule", { value: true }); 7 | exports.pointerleave = exports.pointerenter = exports.pointerdown = exports.touchend = exports.touchmove = exports.touchstart = exports.isTouch = void 0; 8 | const dd_manager_1 = require("./dd-manager"); 9 | /** 10 | * Detect touch support - Windows Surface devices and other touch devices 11 | * should we use this instead ? (what we had for always showing resize handles) 12 | * /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) 13 | */ 14 | exports.isTouch = typeof window !== 'undefined' && typeof document !== 'undefined' && 15 | ('ontouchstart' in document 16 | || 'ontouchstart' in window 17 | // || !!window.TouchEvent // true on Windows 10 Chrome desktop so don't use this 18 | || (window.DocumentTouch && document instanceof window.DocumentTouch) 19 | || navigator.maxTouchPoints > 0 20 | || navigator.msMaxTouchPoints > 0); 21 | // interface TouchCoord {x: number, y: number}; 22 | class DDTouch { 23 | } 24 | /** 25 | * Get the x,y position of a touch event 26 | */ 27 | // function getTouchCoords(e: TouchEvent): TouchCoord { 28 | // return { 29 | // x: e.changedTouches[0].pageX, 30 | // y: e.changedTouches[0].pageY 31 | // }; 32 | // } 33 | /** 34 | * Simulate a mouse event based on a corresponding touch event 35 | * @param {Object} e A touch event 36 | * @param {String} simulatedType The corresponding mouse event 37 | */ 38 | function simulateMouseEvent(e, simulatedType) { 39 | // Ignore multi-touch events 40 | if (e.touches.length > 1) 41 | return; 42 | // Prevent "Ignored attempt to cancel a touchmove event with cancelable=false" errors 43 | if (e.cancelable) 44 | e.preventDefault(); 45 | const touch = e.changedTouches[0], simulatedEvent = document.createEvent('MouseEvents'); 46 | // Initialize the simulated mouse event using the touch event's coordinates 47 | simulatedEvent.initMouseEvent(simulatedType, // type 48 | true, // bubbles 49 | true, // cancelable 50 | window, // view 51 | 1, // detail 52 | touch.screenX, // screenX 53 | touch.screenY, // screenY 54 | touch.clientX, // clientX 55 | touch.clientY, // clientY 56 | false, // ctrlKey 57 | false, // altKey 58 | false, // shiftKey 59 | false, // metaKey 60 | 0, // button 61 | null // relatedTarget 62 | ); 63 | // Dispatch the simulated event to the target element 64 | e.target.dispatchEvent(simulatedEvent); 65 | } 66 | /** 67 | * Simulate a mouse event based on a corresponding Pointer event 68 | * @param {Object} e A pointer event 69 | * @param {String} simulatedType The corresponding mouse event 70 | */ 71 | function simulatePointerMouseEvent(e, simulatedType) { 72 | // Prevent "Ignored attempt to cancel a touchmove event with cancelable=false" errors 73 | if (e.cancelable) 74 | e.preventDefault(); 75 | const simulatedEvent = document.createEvent('MouseEvents'); 76 | // Initialize the simulated mouse event using the touch event's coordinates 77 | simulatedEvent.initMouseEvent(simulatedType, // type 78 | true, // bubbles 79 | true, // cancelable 80 | window, // view 81 | 1, // detail 82 | e.screenX, // screenX 83 | e.screenY, // screenY 84 | e.clientX, // clientX 85 | e.clientY, // clientY 86 | false, // ctrlKey 87 | false, // altKey 88 | false, // shiftKey 89 | false, // metaKey 90 | 0, // button 91 | null // relatedTarget 92 | ); 93 | // Dispatch the simulated event to the target element 94 | e.target.dispatchEvent(simulatedEvent); 95 | } 96 | /** 97 | * Handle the touchstart events 98 | * @param {Object} e The widget element's touchstart event 99 | */ 100 | function touchstart(e) { 101 | // Ignore the event if another widget is already being handled 102 | if (DDTouch.touchHandled) 103 | return; 104 | DDTouch.touchHandled = true; 105 | // Simulate the mouse events 106 | // simulateMouseEvent(e, 'mouseover'); 107 | // simulateMouseEvent(e, 'mousemove'); 108 | simulateMouseEvent(e, 'mousedown'); 109 | } 110 | exports.touchstart = touchstart; 111 | /** 112 | * Handle the touchmove events 113 | * @param {Object} e The document's touchmove event 114 | */ 115 | function touchmove(e) { 116 | // Ignore event if not handled by us 117 | if (!DDTouch.touchHandled) 118 | return; 119 | simulateMouseEvent(e, 'mousemove'); 120 | } 121 | exports.touchmove = touchmove; 122 | /** 123 | * Handle the touchend events 124 | * @param {Object} e The document's touchend event 125 | */ 126 | function touchend(e) { 127 | // Ignore event if not handled 128 | if (!DDTouch.touchHandled) 129 | return; 130 | // cancel delayed leave event when we release on ourself which happens BEFORE we get this! 131 | if (DDTouch.pointerLeaveTimeout) { 132 | window.clearTimeout(DDTouch.pointerLeaveTimeout); 133 | delete DDTouch.pointerLeaveTimeout; 134 | } 135 | const wasDragging = !!dd_manager_1.DDManager.dragElement; 136 | // Simulate the mouseup event 137 | simulateMouseEvent(e, 'mouseup'); 138 | // simulateMouseEvent(event, 'mouseout'); 139 | // If the touch interaction did not move, it should trigger a click 140 | if (!wasDragging) { 141 | simulateMouseEvent(e, 'click'); 142 | } 143 | // Unset the flag to allow other widgets to inherit the touch event 144 | DDTouch.touchHandled = false; 145 | } 146 | exports.touchend = touchend; 147 | /** 148 | * Note we don't get touchenter/touchleave (which are deprecated) 149 | * see https://stackoverflow.com/questions/27908339/js-touch-equivalent-for-mouseenter 150 | * so instead of PointerEvent to still get enter/leave and send the matching mouse event. 151 | */ 152 | function pointerdown(e) { 153 | e.target.releasePointerCapture(e.pointerId); // <- Important! 154 | } 155 | exports.pointerdown = pointerdown; 156 | function pointerenter(e) { 157 | // ignore the initial one we get on pointerdown on ourself 158 | if (!dd_manager_1.DDManager.dragElement) { 159 | // console.log('pointerenter ignored'); 160 | return; 161 | } 162 | // console.log('pointerenter'); 163 | simulatePointerMouseEvent(e, 'mouseenter'); 164 | } 165 | exports.pointerenter = pointerenter; 166 | function pointerleave(e) { 167 | // ignore the leave on ourself we get before releasing the mouse over ourself 168 | // by delaying sending the event and having the up event cancel us 169 | if (!dd_manager_1.DDManager.dragElement) { 170 | // console.log('pointerleave ignored'); 171 | return; 172 | } 173 | DDTouch.pointerLeaveTimeout = window.setTimeout(() => { 174 | delete DDTouch.pointerLeaveTimeout; 175 | // console.log('pointerleave delayed'); 176 | simulatePointerMouseEvent(e, 'mouseleave'); 177 | }, 10); 178 | } 179 | exports.pointerleave = pointerleave; 180 | //# sourceMappingURL=dd-touch.js.map -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/dd-touch.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"dd-touch.js","sourceRoot":"","sources":["../src/dd-touch.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6CAAyC;AAEzC;;;;GAIG;AACU,QAAA,OAAO,GAAY,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,QAAQ,KAAK,WAAW;IAChG,CAAE,cAAc,IAAI,QAAQ;WACvB,cAAc,IAAI,MAAM;QAC3B,gFAAgF;WAC7E,CAAE,MAAc,CAAC,aAAa,IAAI,QAAQ,YAAa,MAAc,CAAC,aAAa,CAAC;WACpF,SAAS,CAAC,cAAc,GAAG,CAAC;WAC3B,SAAiB,CAAC,gBAAgB,GAAG,CAAC,CAC3C,CAAC;AAEF,+CAA+C;AAE/C,MAAM,OAAO;CAGZ;AAED;;EAEE;AACF,uDAAuD;AACvD,aAAa;AACb,oCAAoC;AACpC,mCAAmC;AACnC,OAAO;AACP,IAAI;AAEJ;;;;GAIG;AACH,SAAS,kBAAkB,CAAC,CAAa,EAAE,aAAqB;IAE9D,4BAA4B;IAC5B,IAAI,CAAC,CAAC,OAAO,CA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,CAAC,WAAW,EAAE;QAChB,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;KAChC;IAED,mEAAmE;IACnE,OAAO,CAAC,YAAY,GAAG,KAAK,CAAC;AAC/B,CAAC;AAxBD,4BAwBC;AAED;;;;GAIG;AACH,SAAgB,WAAW,CAAC,CAAe;IACxC,CAAC,CAAC,MAAsB,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA,CAAC,gBAAgB;AAC/E,CAAC;AAFD,kCAEC;AAED,SAAgB,YAAY,CAAC,CAAe;IAC1C,0DAA0D;IAC1D,IAAI,CAAC,sBAAS,CAAC,WAAW,EAAE;QAC1B,uCAAuC;QACvC,OAAO;KACR;IACD,+BAA+B;IAC/B,yBAAyB,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;AAC7C,CAAC;AARD,oCAQC;AAED,SAAgB,YAAY,CAAC,CAAe;IAC1C,6EAA6E;IAC7E,kEAAkE;IAClE,IAAI,CAAC,sBAAS,CAAC,WAAW,EAAE;QAC1B,uCAAuC;QACvC,OAAO;KACR;IACD,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;AAZD,oCAYC","sourcesContent":["/**\n * touch.ts 7.1.0\n * Copyright (c) 2021 Alain Dumesny - see GridStack root license\n */\n\nimport { DDManager } from './dd-manager';\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 || ((window as any).DocumentTouch && document instanceof (window as any).DocumentTouch)\n || navigator.maxTouchPoints > 0\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 const touch = e.changedTouches[0], simulatedEvent = document.createEvent('MouseEvents');\n\n // Initialize the simulated mouse event using the touch event's coordinates\n simulatedEvent.initMouseEvent(\n simulatedType, // type\n true, // bubbles\n true, // cancelable\n window, // view\n 1, // detail\n touch.screenX, // screenX\n touch.screenY, // screenY\n touch.clientX, // clientX\n touch.clientY, // clientY\n false, // ctrlKey\n false, // altKey\n false, // shiftKey\n false, // metaKey\n 0, // button\n null // relatedTarget\n );\n\n // Dispatch the simulated event to the target element\n e.target.dispatchEvent(simulatedEvent);\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 const simulatedEvent = document.createEvent('MouseEvents');\n\n // Initialize the simulated mouse event using the touch event's coordinates\n simulatedEvent.initMouseEvent(\n simulatedType, // type\n true, // bubbles\n true, // cancelable\n window, // view\n 1, // detail\n e.screenX, // screenX\n e.screenY, // screenY\n e.clientX, // clientX\n e.clientY, // clientY\n false, // ctrlKey\n false, // altKey\n false, // shiftKey\n false, // metaKey\n 0, // button\n null // relatedTarget\n );\n\n // Dispatch the simulated event to the target element\n e.target.dispatchEvent(simulatedEvent);\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) {\n // Ignore the event if another widget is already being handled\n if (DDTouch.touchHandled) return; 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) {\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) {\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) {\n (e.target as HTMLElement).releasePointerCapture(e.pointerId) // <- Important!\n}\n\nexport function pointerenter(e: PointerEvent) {\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 simulatePointerMouseEvent(e, 'mouseenter');\n}\n\nexport function pointerleave(e: PointerEvent) {\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 DDTouch.pointerLeaveTimeout = window.setTimeout(() => {\n delete DDTouch.pointerLeaveTimeout;\n // console.log('pointerleave delayed');\n simulatePointerMouseEvent(e, 'mouseleave');\n }, 10);\n}\n\n"]} -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/dd-base-impl.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * dd-base-impl.ts 7.1.0 3 | * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license 4 | */ 5 | export declare type EventCallback = (event: Event) => boolean | void; 6 | export declare abstract class DDBaseImplement { 7 | /** returns the enable state, but you have to call enable()/disable() to change (as other things need to happen) */ 8 | get disabled(): boolean; 9 | on(event: string, callback: EventCallback): void; 10 | off(event: string): void; 11 | enable(): void; 12 | disable(): void; 13 | destroy(): void; 14 | triggerEvent(eventName: string, event: Event): boolean | void; 15 | } 16 | export interface HTMLElementExtendOpt { 17 | el: HTMLElement; 18 | option: T; 19 | updateOption(T: any): DDBaseImplement; 20 | } 21 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/dd-base-impl.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * dd-base-impl.ts 7.1.0 4 | * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license 5 | */ 6 | Object.defineProperty(exports, "__esModule", { value: true }); 7 | exports.DDBaseImplement = void 0; 8 | var DDBaseImplement = /** @class */ (function () { 9 | function DDBaseImplement() { 10 | /** @internal */ 11 | this._eventRegister = {}; 12 | } 13 | Object.defineProperty(DDBaseImplement.prototype, "disabled", { 14 | /** returns the enable state, but you have to call enable()/disable() to change (as other things need to happen) */ 15 | get: function () { return this._disabled; }, 16 | enumerable: false, 17 | configurable: true 18 | }); 19 | DDBaseImplement.prototype.on = function (event, callback) { 20 | this._eventRegister[event] = callback; 21 | }; 22 | DDBaseImplement.prototype.off = function (event) { 23 | delete this._eventRegister[event]; 24 | }; 25 | DDBaseImplement.prototype.enable = function () { 26 | this._disabled = false; 27 | }; 28 | DDBaseImplement.prototype.disable = function () { 29 | this._disabled = true; 30 | }; 31 | DDBaseImplement.prototype.destroy = function () { 32 | delete this._eventRegister; 33 | }; 34 | DDBaseImplement.prototype.triggerEvent = function (eventName, event) { 35 | if (!this.disabled && this._eventRegister && this._eventRegister[eventName]) 36 | return this._eventRegister[eventName](event); 37 | }; 38 | return DDBaseImplement; 39 | }()); 40 | exports.DDBaseImplement = DDBaseImplement; 41 | //# sourceMappingURL=dd-base-impl.js.map -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/dd-base-impl.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"dd-base-impl.js","sourceRoot":"","sources":["../../src/dd-base-impl.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH;IAAA;QAME,gBAAgB;QACN,mBAAc,GAEpB,EAAE,CAAC;IA0BT,CAAC;IAjCC,sBAAW,qCAAQ;QADnB,mHAAmH;aACnH,cAAmC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;;;OAAA;IASpD,4BAAE,GAAT,UAAU,KAAa,EAAE,QAAuB;QAC9C,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC;IACxC,CAAC;IAEM,6BAAG,GAAV,UAAW,KAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAEM,gCAAM,GAAb;QACE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACzB,CAAC;IAEM,iCAAO,GAAd;QACE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACxB,CAAC;IAEM,iCAAO,GAAd;QACE,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAEM,sCAAY,GAAnB,UAAoB,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;IACH,sBAAC;AAAD,CAAC,AAnCD,IAmCC;AAnCqB,0CAAe","sourcesContent":["/**\n * dd-base-impl.ts 7.1.0\n * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license\n */\n\nexport type EventCallback = (event: Event) => boolean|void;\nexport abstract class DDBaseImplement {\n /** returns the enable state, but you have to call enable()/disable() to change (as other things need to happen) */\n public get disabled(): boolean { return this._disabled; }\n\n /** @internal */\n protected _disabled: boolean; // initial state to differentiate from false\n /** @internal */\n protected _eventRegister: {\n [eventName: string]: EventCallback;\n } = {};\n\n public on(event: string, callback: EventCallback): void {\n this._eventRegister[event] = callback;\n }\n\n public off(event: string): void {\n delete this._eventRegister[event];\n }\n\n public enable(): void {\n this._disabled = false;\n }\n\n public disable(): void {\n this._disabled = true;\n }\n\n public destroy(): void {\n delete this._eventRegister;\n }\n\n public triggerEvent(eventName: string, event: Event): boolean|void {\n if (!this.disabled && this._eventRegister && this._eventRegister[eventName])\n return this._eventRegister[eventName](event);\n }\n}\n\nexport interface HTMLElementExtendOpt {\n el: HTMLElement;\n option: T;\n updateOption(T): DDBaseImplement;\n}\n"]} -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/dd-draggable.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * dd-draggable.ts 7.1.0 3 | * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license 4 | */ 5 | import { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl'; 6 | import { DDUIData } from './types'; 7 | export interface DDDraggableOpt { 8 | appendTo?: string | HTMLElement; 9 | handle?: string; 10 | helper?: string | HTMLElement | ((event: Event) => HTMLElement); 11 | start?: (event: Event, ui: DDUIData) => void; 12 | stop?: (event: Event) => void; 13 | drag?: (event: Event, ui: DDUIData) => void; 14 | } 15 | declare type DDDragEvent = 'drag' | 'dragstart' | 'dragstop'; 16 | export declare class DDDraggable extends DDBaseImplement implements HTMLElementExtendOpt { 17 | el: HTMLElement; 18 | option: DDDraggableOpt; 19 | helper: HTMLElement; 20 | constructor(el: HTMLElement, option?: DDDraggableOpt); 21 | on(event: DDDragEvent, callback: (event: DragEvent) => void): void; 22 | off(event: DDDragEvent): void; 23 | enable(): void; 24 | disable(forDestroy?: boolean): void; 25 | destroy(): void; 26 | updateOption(opts: DDDraggableOpt): DDDraggable; 27 | } 28 | export {}; 29 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/dd-droppable.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * dd-droppable.ts 7.1.0 3 | * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license 4 | */ 5 | import { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl'; 6 | export interface DDDroppableOpt { 7 | accept?: string | ((el: HTMLElement) => boolean); 8 | drop?: (event: DragEvent, ui: any) => void; 9 | over?: (event: DragEvent, ui: any) => void; 10 | out?: (event: DragEvent, ui: any) => void; 11 | } 12 | export declare class DDDroppable extends DDBaseImplement implements HTMLElementExtendOpt { 13 | accept: (el: HTMLElement) => boolean; 14 | el: HTMLElement; 15 | option: DDDroppableOpt; 16 | constructor(el: HTMLElement, opts?: DDDroppableOpt); 17 | on(event: 'drop' | 'dropover' | 'dropout', callback: (event: DragEvent) => void): void; 18 | off(event: 'drop' | 'dropover' | 'dropout'): void; 19 | enable(): void; 20 | disable(forDestroy?: boolean): void; 21 | destroy(): void; 22 | updateOption(opts: DDDroppableOpt): DDDroppable; 23 | /** item is being dropped on us - called by the drag mouseup handler - this calls the client drop event */ 24 | drop(e: MouseEvent): void; 25 | } 26 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/dd-droppable.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * dd-droppable.ts 7.1.0 4 | * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license 5 | */ 6 | var __extends = (this && this.__extends) || (function () { 7 | var extendStatics = function (d, b) { 8 | extendStatics = Object.setPrototypeOf || 9 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || 10 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; 11 | return extendStatics(d, b); 12 | }; 13 | return function (d, b) { 14 | extendStatics(d, b); 15 | function __() { this.constructor = d; } 16 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); 17 | }; 18 | })(); 19 | var __assign = (this && this.__assign) || function () { 20 | __assign = Object.assign || function(t) { 21 | for (var s, i = 1, n = arguments.length; i < n; i++) { 22 | s = arguments[i]; 23 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) 24 | t[p] = s[p]; 25 | } 26 | return t; 27 | }; 28 | return __assign.apply(this, arguments); 29 | }; 30 | Object.defineProperty(exports, "__esModule", { value: true }); 31 | exports.DDDroppable = void 0; 32 | var dd_manager_1 = require("./dd-manager"); 33 | var dd_base_impl_1 = require("./dd-base-impl"); 34 | var utils_1 = require("./utils"); 35 | var dd_touch_1 = require("./dd-touch"); 36 | // let count = 0; // TEST 37 | var DDDroppable = /** @class */ (function (_super) { 38 | __extends(DDDroppable, _super); 39 | function DDDroppable(el, opts) { 40 | if (opts === void 0) { opts = {}; } 41 | var _this = _super.call(this) || this; 42 | _this.el = el; 43 | _this.option = opts; 44 | // create var event binding so we can easily remove and still look like TS methods (unlike anonymous functions) 45 | _this._mouseEnter = _this._mouseEnter.bind(_this); 46 | _this._mouseLeave = _this._mouseLeave.bind(_this); 47 | _this.enable(); 48 | _this._setupAccept(); 49 | return _this; 50 | } 51 | DDDroppable.prototype.on = function (event, callback) { 52 | _super.prototype.on.call(this, event, callback); 53 | }; 54 | DDDroppable.prototype.off = function (event) { 55 | _super.prototype.off.call(this, event); 56 | }; 57 | DDDroppable.prototype.enable = function () { 58 | if (this.disabled === false) 59 | return; 60 | _super.prototype.enable.call(this); 61 | this.el.classList.add('ui-droppable'); 62 | this.el.classList.remove('ui-droppable-disabled'); 63 | this.el.addEventListener('mouseenter', this._mouseEnter); 64 | this.el.addEventListener('mouseleave', this._mouseLeave); 65 | if (dd_touch_1.isTouch) { 66 | this.el.addEventListener('pointerenter', dd_touch_1.pointerenter); 67 | this.el.addEventListener('pointerleave', dd_touch_1.pointerleave); 68 | } 69 | }; 70 | DDDroppable.prototype.disable = function (forDestroy) { 71 | if (forDestroy === void 0) { forDestroy = false; } 72 | if (this.disabled === true) 73 | return; 74 | _super.prototype.disable.call(this); 75 | this.el.classList.remove('ui-droppable'); 76 | if (!forDestroy) 77 | this.el.classList.add('ui-droppable-disabled'); 78 | this.el.removeEventListener('mouseenter', this._mouseEnter); 79 | this.el.removeEventListener('mouseleave', this._mouseLeave); 80 | if (dd_touch_1.isTouch) { 81 | this.el.removeEventListener('pointerenter', dd_touch_1.pointerenter); 82 | this.el.removeEventListener('pointerleave', dd_touch_1.pointerleave); 83 | } 84 | }; 85 | DDDroppable.prototype.destroy = function () { 86 | this.disable(true); 87 | this.el.classList.remove('ui-droppable'); 88 | this.el.classList.remove('ui-droppable-disabled'); 89 | _super.prototype.destroy.call(this); 90 | }; 91 | DDDroppable.prototype.updateOption = function (opts) { 92 | var _this = this; 93 | Object.keys(opts).forEach(function (key) { return _this.option[key] = opts[key]; }); 94 | this._setupAccept(); 95 | return this; 96 | }; 97 | /** @internal called when the cursor enters our area - prepare for a possible drop and track leaving */ 98 | DDDroppable.prototype._mouseEnter = function (e) { 99 | // console.log(`${count++} Enter ${this.el.id || (this.el as GridHTMLElement).gridstack.opts.id}`); // TEST 100 | if (!dd_manager_1.DDManager.dragElement) 101 | return; 102 | if (!this._canDrop(dd_manager_1.DDManager.dragElement.el)) 103 | return; 104 | e.preventDefault(); 105 | e.stopPropagation(); 106 | // make sure when we enter this, that the last one gets a leave FIRST to correctly cleanup as we don't always do 107 | if (dd_manager_1.DDManager.dropElement && dd_manager_1.DDManager.dropElement !== this) { 108 | dd_manager_1.DDManager.dropElement._mouseLeave(e); 109 | } 110 | dd_manager_1.DDManager.dropElement = this; 111 | var ev = utils_1.Utils.initEvent(e, { target: this.el, type: 'dropover' }); 112 | if (this.option.over) { 113 | this.option.over(ev, this._ui(dd_manager_1.DDManager.dragElement)); 114 | } 115 | this.triggerEvent('dropover', ev); 116 | this.el.classList.add('ui-droppable-over'); 117 | // console.log('tracking'); // TEST 118 | }; 119 | /** @internal called when the item is leaving our area, stop tracking if we had moving item */ 120 | DDDroppable.prototype._mouseLeave = function (e) { 121 | var _a; 122 | // console.log(`${count++} Leave ${this.el.id || (this.el as GridHTMLElement).gridstack.opts.id}`); // TEST 123 | if (!dd_manager_1.DDManager.dragElement || dd_manager_1.DDManager.dropElement !== this) 124 | return; 125 | e.preventDefault(); 126 | e.stopPropagation(); 127 | var ev = utils_1.Utils.initEvent(e, { target: this.el, type: 'dropout' }); 128 | if (this.option.out) { 129 | this.option.out(ev, this._ui(dd_manager_1.DDManager.dragElement)); 130 | } 131 | this.triggerEvent('dropout', ev); 132 | if (dd_manager_1.DDManager.dropElement === this) { 133 | delete dd_manager_1.DDManager.dropElement; 134 | // console.log('not tracking'); // TEST 135 | // if we're still over a parent droppable, send it an enter as we don't get one from leaving nested children 136 | var parentDrop = void 0; 137 | var parent_1 = this.el.parentElement; 138 | while (!parentDrop && parent_1) { 139 | parentDrop = (_a = parent_1.ddElement) === null || _a === void 0 ? void 0 : _a.ddDroppable; 140 | parent_1 = parent_1.parentElement; 141 | } 142 | if (parentDrop) { 143 | parentDrop._mouseEnter(e); 144 | } 145 | } 146 | }; 147 | /** item is being dropped on us - called by the drag mouseup handler - this calls the client drop event */ 148 | DDDroppable.prototype.drop = function (e) { 149 | e.preventDefault(); 150 | var ev = utils_1.Utils.initEvent(e, { target: this.el, type: 'drop' }); 151 | if (this.option.drop) { 152 | this.option.drop(ev, this._ui(dd_manager_1.DDManager.dragElement)); 153 | } 154 | this.triggerEvent('drop', ev); 155 | }; 156 | /** @internal true if element matches the string/method accept option */ 157 | DDDroppable.prototype._canDrop = function (el) { 158 | return el && (!this.accept || this.accept(el)); 159 | }; 160 | /** @internal */ 161 | DDDroppable.prototype._setupAccept = function () { 162 | var _this = this; 163 | if (!this.option.accept) 164 | return this; 165 | if (typeof this.option.accept === 'string') { 166 | this.accept = function (el) { return el.matches(_this.option.accept); }; 167 | } 168 | else { 169 | this.accept = this.option.accept; 170 | } 171 | return this; 172 | }; 173 | /** @internal */ 174 | DDDroppable.prototype._ui = function (drag) { 175 | return __assign({ draggable: drag.el }, drag.ui()); 176 | }; 177 | return DDDroppable; 178 | }(dd_base_impl_1.DDBaseImplement)); 179 | exports.DDDroppable = DDDroppable; 180 | //# sourceMappingURL=dd-droppable.js.map -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/dd-element.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * dd-elements.ts 7.1.0 3 | * Copyright (c) 2021 Alain Dumesny - see GridStack root license 4 | */ 5 | import { DDResizable, DDResizableOpt } from './dd-resizable'; 6 | import { GridItemHTMLElement } from './types'; 7 | import { DDDraggable, DDDraggableOpt } from './dd-draggable'; 8 | import { DDDroppable, DDDroppableOpt } from './dd-droppable'; 9 | export interface DDElementHost extends GridItemHTMLElement { 10 | ddElement?: DDElement; 11 | } 12 | export declare class DDElement { 13 | static init(el: DDElementHost): DDElement; 14 | el: DDElementHost; 15 | ddDraggable?: DDDraggable; 16 | ddDroppable?: DDDroppable; 17 | ddResizable?: DDResizable; 18 | constructor(el: DDElementHost); 19 | on(eventName: string, callback: (event: MouseEvent) => void): DDElement; 20 | off(eventName: string): DDElement; 21 | setupDraggable(opts: DDDraggableOpt): DDElement; 22 | cleanDraggable(): DDElement; 23 | setupResizable(opts: DDResizableOpt): DDElement; 24 | cleanResizable(): DDElement; 25 | setupDroppable(opts: DDDroppableOpt): DDElement; 26 | cleanDroppable(): DDElement; 27 | } 28 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/dd-element.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * dd-elements.ts 7.1.0 4 | * Copyright (c) 2021 Alain Dumesny - see GridStack root license 5 | */ 6 | Object.defineProperty(exports, "__esModule", { value: true }); 7 | exports.DDElement = void 0; 8 | var dd_resizable_1 = require("./dd-resizable"); 9 | var dd_draggable_1 = require("./dd-draggable"); 10 | var dd_droppable_1 = require("./dd-droppable"); 11 | var DDElement = /** @class */ (function () { 12 | function DDElement(el) { 13 | this.el = el; 14 | } 15 | DDElement.init = function (el) { 16 | if (!el.ddElement) { 17 | el.ddElement = new DDElement(el); 18 | } 19 | return el.ddElement; 20 | }; 21 | DDElement.prototype.on = function (eventName, callback) { 22 | if (this.ddDraggable && ['drag', 'dragstart', 'dragstop'].indexOf(eventName) > -1) { 23 | this.ddDraggable.on(eventName, callback); 24 | } 25 | else if (this.ddDroppable && ['drop', 'dropover', 'dropout'].indexOf(eventName) > -1) { 26 | this.ddDroppable.on(eventName, callback); 27 | } 28 | else if (this.ddResizable && ['resizestart', 'resize', 'resizestop'].indexOf(eventName) > -1) { 29 | this.ddResizable.on(eventName, callback); 30 | } 31 | return this; 32 | }; 33 | DDElement.prototype.off = function (eventName) { 34 | if (this.ddDraggable && ['drag', 'dragstart', 'dragstop'].indexOf(eventName) > -1) { 35 | this.ddDraggable.off(eventName); 36 | } 37 | else if (this.ddDroppable && ['drop', 'dropover', 'dropout'].indexOf(eventName) > -1) { 38 | this.ddDroppable.off(eventName); 39 | } 40 | else if (this.ddResizable && ['resizestart', 'resize', 'resizestop'].indexOf(eventName) > -1) { 41 | this.ddResizable.off(eventName); 42 | } 43 | return this; 44 | }; 45 | DDElement.prototype.setupDraggable = function (opts) { 46 | if (!this.ddDraggable) { 47 | this.ddDraggable = new dd_draggable_1.DDDraggable(this.el, opts); 48 | } 49 | else { 50 | this.ddDraggable.updateOption(opts); 51 | } 52 | return this; 53 | }; 54 | DDElement.prototype.cleanDraggable = function () { 55 | if (this.ddDraggable) { 56 | this.ddDraggable.destroy(); 57 | delete this.ddDraggable; 58 | } 59 | return this; 60 | }; 61 | DDElement.prototype.setupResizable = function (opts) { 62 | if (!this.ddResizable) { 63 | this.ddResizable = new dd_resizable_1.DDResizable(this.el, opts); 64 | } 65 | else { 66 | this.ddResizable.updateOption(opts); 67 | } 68 | return this; 69 | }; 70 | DDElement.prototype.cleanResizable = function () { 71 | if (this.ddResizable) { 72 | this.ddResizable.destroy(); 73 | delete this.ddResizable; 74 | } 75 | return this; 76 | }; 77 | DDElement.prototype.setupDroppable = function (opts) { 78 | if (!this.ddDroppable) { 79 | this.ddDroppable = new dd_droppable_1.DDDroppable(this.el, opts); 80 | } 81 | else { 82 | this.ddDroppable.updateOption(opts); 83 | } 84 | return this; 85 | }; 86 | DDElement.prototype.cleanDroppable = function () { 87 | if (this.ddDroppable) { 88 | this.ddDroppable.destroy(); 89 | delete this.ddDroppable; 90 | } 91 | return this; 92 | }; 93 | return DDElement; 94 | }()); 95 | exports.DDElement = DDElement; 96 | //# sourceMappingURL=dd-element.js.map -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/dd-element.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"dd-element.js","sourceRoot":"","sources":["../../src/dd-element.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA6D;AAE7D,+CAA6D;AAC7D,+CAA6D;AAM7D;IAYE,mBAAY,EAAiB;QAC3B,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;IAZM,cAAI,GAAX,UAAY,EA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;IACd,CAAC;IAEM,kCAAc,GAArB,UAAsB,IAAoB;QACxC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACrB,IAAI,CAAC,WAAW,GAAG,IAAI,0BAAW,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,kCAAc,GAArB;QACE,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;IACH,gBAAC;AAAD,CAAC,AAxFD,IAwFC;AAxFY,8BAAS","sourcesContent":["/**\n * dd-elements.ts 7.1.0\n * Copyright (c) 2021 Alain Dumesny - see GridStack root license\n */\n\nimport { DDResizable, DDResizableOpt } from './dd-resizable';\nimport { GridItemHTMLElement } from './types';\nimport { DDDraggable, DDDraggableOpt } 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 el: DDElementHost;\n public ddDraggable?: DDDraggable;\n public ddDroppable?: DDDroppable;\n public ddResizable?: DDResizable;\n\n constructor(el: DDElementHost) {\n this.el = el;\n }\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: DDDraggableOpt): 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"]} -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/dd-gridstack.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * dd-gridstack.ts 7.1.0 3 | * Copyright (c) 2021 Alain Dumesny - see GridStack root license 4 | */ 5 | import { GridItemHTMLElement, GridStackElement, DDDragInOpt } from './types'; 6 | import { DDElementHost } from './dd-element'; 7 | /** Drag&Drop drop options */ 8 | export declare type DDDropOpt = { 9 | /** function or class type that this grid will accept as dropped items (see GridStackOptions.acceptWidgets) */ 10 | accept?: (el: GridItemHTMLElement) => boolean; 11 | }; 12 | /** drag&drop options currently called from the main code, but others can be passed in grid options */ 13 | export declare type DDOpts = 'enable' | 'disable' | 'destroy' | 'option' | string | any; 14 | export declare type DDKey = 'minWidth' | 'minHeight' | 'maxWidth' | 'maxHeight'; 15 | export declare type DDValue = number | string; 16 | /** drag&drop events callbacks */ 17 | export declare type DDCallback = (event: Event, arg2: GridItemHTMLElement, helper?: GridItemHTMLElement) => void; 18 | /** 19 | * HTML Native Mouse and Touch Events Drag and Drop functionality. 20 | */ 21 | export declare class DDGridStack { 22 | /** get the global (but static to this code) DD implementation */ 23 | static get(): DDGridStack; 24 | resizable(el: GridItemHTMLElement, opts: DDOpts, key?: DDKey, value?: DDValue): DDGridStack; 25 | draggable(el: GridItemHTMLElement, opts: DDOpts, key?: DDKey, value?: DDValue): DDGridStack; 26 | dragIn(el: GridStackElement, opts: DDDragInOpt): DDGridStack; 27 | droppable(el: GridItemHTMLElement, opts: DDOpts | DDDropOpt, key?: DDKey, value?: DDValue): DDGridStack; 28 | /** true if element is droppable */ 29 | isDroppable(el: DDElementHost): boolean; 30 | /** true if element is draggable */ 31 | isDraggable(el: DDElementHost): boolean; 32 | /** true if element is draggable */ 33 | isResizable(el: DDElementHost): boolean; 34 | on(el: GridItemHTMLElement, name: string, callback: DDCallback): DDGridStack; 35 | off(el: GridItemHTMLElement, name: string): DDGridStack; 36 | } 37 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/dd-manager.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * dd-manager.ts 7.1.0 3 | * Copyright (c) 2021 Alain Dumesny - see GridStack root license 4 | */ 5 | import { DDDraggable } from './dd-draggable'; 6 | import { DDDroppable } from './dd-droppable'; 7 | import { DDResizable } from './dd-resizable'; 8 | /** 9 | * globals that are shared across Drag & Drop instances 10 | */ 11 | export declare class DDManager { 12 | /** if set (true | in msec), dragging placement (collision) will only happen after a pause by the user*/ 13 | static pauseDrag: boolean | number; 14 | /** true if a mouse down event was handled */ 15 | static mouseHandled: boolean; 16 | /** item being dragged */ 17 | static dragElement: DDDraggable; 18 | /** item we are currently over as drop target */ 19 | static dropElement: DDDroppable; 20 | /** current item we're over for resizing purpose (ignore nested grid resize handles) */ 21 | static overResizeElement: DDResizable; 22 | } 23 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/dd-manager.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * dd-manager.ts 7.1.0 4 | * Copyright (c) 2021 Alain Dumesny - see GridStack root license 5 | */ 6 | Object.defineProperty(exports, "__esModule", { value: true }); 7 | exports.DDManager = void 0; 8 | /** 9 | * globals that are shared across Drag & Drop instances 10 | */ 11 | var DDManager = /** @class */ (function () { 12 | function DDManager() { 13 | } 14 | return DDManager; 15 | }()); 16 | exports.DDManager = DDManager; 17 | //# sourceMappingURL=dd-manager.js.map -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/dd-manager.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"dd-manager.js","sourceRoot":"","sources":["../../src/dd-manager.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAMH;;GAEG;AACH;IAAA;IAgBA,CAAC;IAAD,gBAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,8BAAS","sourcesContent":["/**\n * dd-manager.ts 7.1.0\n * Copyright (c) 2021 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 * globals that are shared across Drag & Drop instances\n */\nexport class DDManager {\n /** if set (true | in msec), dragging placement (collision) will only happen after a pause by the user*/\n public static pauseDrag: boolean | number;\n\n /** true if a mouse down event was handled */\n public static mouseHandled: boolean;\n\n /** item being dragged */\n public static dragElement: DDDraggable;\n\n /** item we are currently over as drop target */\n public static dropElement: DDDroppable;\n\n /** current item we're over for resizing purpose (ignore nested grid resize handles) */\n public static overResizeElement: DDResizable;\n\n}\n"]} -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/dd-resizable-handle.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * dd-resizable-handle.ts 7.1.0 3 | * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license 4 | */ 5 | export interface DDResizableHandleOpt { 6 | start?: (event: any) => void; 7 | move?: (event: any) => void; 8 | stop?: (event: any) => void; 9 | } 10 | export declare class DDResizableHandle { 11 | constructor(host: HTMLElement, direction: string, option: DDResizableHandleOpt); 12 | /** call this when resize handle needs to be removed and cleaned up */ 13 | destroy(): DDResizableHandle; 14 | } 15 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/dd-resizable-handle.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * dd-resizable-handle.ts 7.1.0 4 | * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license 5 | */ 6 | Object.defineProperty(exports, "__esModule", { value: true }); 7 | exports.DDResizableHandle = void 0; 8 | var dd_touch_1 = require("./dd-touch"); 9 | var DDResizableHandle = /** @class */ (function () { 10 | function DDResizableHandle(host, direction, option) { 11 | /** @internal true after we've moved enough pixels to start a resize */ 12 | this.moving = false; 13 | this.host = host; 14 | this.dir = direction; 15 | this.option = option; 16 | // create var event binding so we can easily remove and still look like TS methods (unlike anonymous functions) 17 | this._mouseDown = this._mouseDown.bind(this); 18 | this._mouseMove = this._mouseMove.bind(this); 19 | this._mouseUp = this._mouseUp.bind(this); 20 | this._init(); 21 | } 22 | /** @internal */ 23 | DDResizableHandle.prototype._init = function () { 24 | var el = document.createElement('div'); 25 | el.classList.add('ui-resizable-handle'); 26 | el.classList.add("" + DDResizableHandle.prefix + this.dir); 27 | el.style.zIndex = '100'; 28 | el.style.userSelect = 'none'; 29 | this.el = el; 30 | this.host.appendChild(this.el); 31 | this.el.addEventListener('mousedown', this._mouseDown); 32 | if (dd_touch_1.isTouch) { 33 | this.el.addEventListener('touchstart', dd_touch_1.touchstart); 34 | this.el.addEventListener('pointerdown', dd_touch_1.pointerdown); 35 | // this.el.style.touchAction = 'none'; // not needed unlike pointerdown doc comment 36 | } 37 | return this; 38 | }; 39 | /** call this when resize handle needs to be removed and cleaned up */ 40 | DDResizableHandle.prototype.destroy = function () { 41 | if (this.moving) 42 | this._mouseUp(this.mouseDownEvent); 43 | this.el.removeEventListener('mousedown', this._mouseDown); 44 | if (dd_touch_1.isTouch) { 45 | this.el.removeEventListener('touchstart', dd_touch_1.touchstart); 46 | this.el.removeEventListener('pointerdown', dd_touch_1.pointerdown); 47 | } 48 | this.host.removeChild(this.el); 49 | delete this.el; 50 | delete this.host; 51 | return this; 52 | }; 53 | /** @internal called on mouse down on us: capture move on the entire document (mouse might not stay on us) until we release the mouse */ 54 | DDResizableHandle.prototype._mouseDown = function (e) { 55 | this.mouseDownEvent = e; 56 | document.addEventListener('mousemove', this._mouseMove, true); // capture, not bubble 57 | document.addEventListener('mouseup', this._mouseUp, true); 58 | if (dd_touch_1.isTouch) { 59 | this.el.addEventListener('touchmove', dd_touch_1.touchmove); 60 | this.el.addEventListener('touchend', dd_touch_1.touchend); 61 | } 62 | e.stopPropagation(); 63 | e.preventDefault(); 64 | }; 65 | /** @internal */ 66 | DDResizableHandle.prototype._mouseMove = function (e) { 67 | var s = this.mouseDownEvent; 68 | if (this.moving) { 69 | this._triggerEvent('move', e); 70 | } 71 | else if (Math.abs(e.x - s.x) + Math.abs(e.y - s.y) > 2) { 72 | // don't start unless we've moved at least 3 pixels 73 | this.moving = true; 74 | this._triggerEvent('start', this.mouseDownEvent); 75 | this._triggerEvent('move', e); 76 | } 77 | e.stopPropagation(); 78 | e.preventDefault(); 79 | }; 80 | /** @internal */ 81 | DDResizableHandle.prototype._mouseUp = function (e) { 82 | if (this.moving) { 83 | this._triggerEvent('stop', e); 84 | } 85 | document.removeEventListener('mousemove', this._mouseMove, true); 86 | document.removeEventListener('mouseup', this._mouseUp, true); 87 | if (dd_touch_1.isTouch) { 88 | this.el.removeEventListener('touchmove', dd_touch_1.touchmove); 89 | this.el.removeEventListener('touchend', dd_touch_1.touchend); 90 | } 91 | delete this.moving; 92 | delete this.mouseDownEvent; 93 | e.stopPropagation(); 94 | e.preventDefault(); 95 | }; 96 | /** @internal */ 97 | DDResizableHandle.prototype._triggerEvent = function (name, event) { 98 | if (this.option[name]) 99 | this.option[name](event); 100 | return this; 101 | }; 102 | /** @internal */ 103 | DDResizableHandle.prefix = 'ui-resizable-'; 104 | return DDResizableHandle; 105 | }()); 106 | exports.DDResizableHandle = DDResizableHandle; 107 | //# sourceMappingURL=dd-resizable-handle.js.map -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/dd-resizable-handle.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"dd-resizable-handle.js","sourceRoot":"","sources":["../../src/dd-resizable-handle.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAAmF;AAQnF;IAgBE,2BAAY,IAAiB,EAAE,SAAiB,EAAE,MAA4B;QAP9E,uEAAuE;QAC7D,WAAM,GAAG,KAAK,CAAC;QAOvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,GAAG,GAAG,SAAS,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,+GAA+G;QAC/G,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C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n * dd-resizable-handle.ts 7.1.0\n * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license\n */\n\nimport { isTouch, pointerdown, touchend, touchmove, touchstart } from './dd-touch';\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 */\n protected host: HTMLElement;\n /** @internal */\n protected option: DDResizableHandleOpt;\n /** @internal */\n protected dir: string;\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(host: HTMLElement, direction: string, option: DDResizableHandleOpt) {\n this.host = host;\n this.dir = direction;\n this.option = option;\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\n this._init();\n }\n\n /** @internal */\n protected _init(): DDResizableHandle {\n const 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.el = el;\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) {\n this.mouseDownEvent = e;\n document.addEventListener('mousemove', this._mouseMove, 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) {\n let 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 }\n e.stopPropagation();\n e.preventDefault();\n }\n\n /** @internal */\n protected _mouseUp(e: MouseEvent) {\n if (this.moving) {\n this._triggerEvent('stop', e);\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 */\n protected _triggerEvent(name: string, event: MouseEvent): DDResizableHandle {\n if (this.option[name]) this.option[name](event);\n return this;\n }\n}\n"]} -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/dd-resizable.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * dd-resizable.ts 7.1.0 3 | * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license 4 | */ 5 | import { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl'; 6 | import { DDUIData } from './types'; 7 | export interface DDResizableOpt { 8 | autoHide?: boolean; 9 | handles?: string; 10 | maxHeight?: number; 11 | maxWidth?: number; 12 | minHeight?: number; 13 | minWidth?: number; 14 | start?: (event: Event, ui: DDUIData) => void; 15 | stop?: (event: Event) => void; 16 | resize?: (event: Event, ui: DDUIData) => void; 17 | } 18 | export declare class DDResizable extends DDBaseImplement implements HTMLElementExtendOpt { 19 | el: HTMLElement; 20 | option: DDResizableOpt; 21 | constructor(el: HTMLElement, opts?: DDResizableOpt); 22 | on(event: 'resizestart' | 'resize' | 'resizestop', callback: (event: DragEvent) => void): void; 23 | off(event: 'resizestart' | 'resize' | 'resizestop'): void; 24 | enable(): void; 25 | disable(): void; 26 | destroy(): void; 27 | updateOption(opts: DDResizableOpt): DDResizable; 28 | } 29 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/dd-touch.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * touch.ts 7.1.0 3 | * Copyright (c) 2021 Alain Dumesny - see GridStack root license 4 | */ 5 | /** 6 | * Detect touch support - Windows Surface devices and other touch devices 7 | * should we use this instead ? (what we had for always showing resize handles) 8 | * /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) 9 | */ 10 | export declare const isTouch: boolean; 11 | /** 12 | * Handle the touchstart events 13 | * @param {Object} e The widget element's touchstart event 14 | */ 15 | export declare function touchstart(e: TouchEvent): void; 16 | /** 17 | * Handle the touchmove events 18 | * @param {Object} e The document's touchmove event 19 | */ 20 | export declare function touchmove(e: TouchEvent): void; 21 | /** 22 | * Handle the touchend events 23 | * @param {Object} e The document's touchend event 24 | */ 25 | export declare function touchend(e: TouchEvent): void; 26 | /** 27 | * Note we don't get touchenter/touchleave (which are deprecated) 28 | * see https://stackoverflow.com/questions/27908339/js-touch-equivalent-for-mouseenter 29 | * so instead of PointerEvent to still get enter/leave and send the matching mouse event. 30 | */ 31 | export declare function pointerdown(e: PointerEvent): void; 32 | export declare function pointerenter(e: PointerEvent): void; 33 | export declare function pointerleave(e: PointerEvent): void; 34 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/dd-touch.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * touch.ts 7.1.0 4 | * Copyright (c) 2021 Alain Dumesny - see GridStack root license 5 | */ 6 | Object.defineProperty(exports, "__esModule", { value: true }); 7 | exports.pointerleave = exports.pointerenter = exports.pointerdown = exports.touchend = exports.touchmove = exports.touchstart = exports.isTouch = void 0; 8 | var dd_manager_1 = require("./dd-manager"); 9 | /** 10 | * Detect touch support - Windows Surface devices and other touch devices 11 | * should we use this instead ? (what we had for always showing resize handles) 12 | * /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) 13 | */ 14 | exports.isTouch = typeof window !== 'undefined' && typeof document !== 'undefined' && 15 | ('ontouchstart' in document 16 | || 'ontouchstart' in window 17 | // || !!window.TouchEvent // true on Windows 10 Chrome desktop so don't use this 18 | || (window.DocumentTouch && document instanceof window.DocumentTouch) 19 | || navigator.maxTouchPoints > 0 20 | || navigator.msMaxTouchPoints > 0); 21 | // interface TouchCoord {x: number, y: number}; 22 | var DDTouch = /** @class */ (function () { 23 | function DDTouch() { 24 | } 25 | return DDTouch; 26 | }()); 27 | /** 28 | * Get the x,y position of a touch event 29 | */ 30 | // function getTouchCoords(e: TouchEvent): TouchCoord { 31 | // return { 32 | // x: e.changedTouches[0].pageX, 33 | // y: e.changedTouches[0].pageY 34 | // }; 35 | // } 36 | /** 37 | * Simulate a mouse event based on a corresponding touch event 38 | * @param {Object} e A touch event 39 | * @param {String} simulatedType The corresponding mouse event 40 | */ 41 | function simulateMouseEvent(e, simulatedType) { 42 | // Ignore multi-touch events 43 | if (e.touches.length > 1) 44 | return; 45 | // Prevent "Ignored attempt to cancel a touchmove event with cancelable=false" errors 46 | if (e.cancelable) 47 | e.preventDefault(); 48 | var touch = e.changedTouches[0], simulatedEvent = document.createEvent('MouseEvents'); 49 | // Initialize the simulated mouse event using the touch event's coordinates 50 | simulatedEvent.initMouseEvent(simulatedType, // type 51 | true, // bubbles 52 | true, // cancelable 53 | window, // view 54 | 1, // detail 55 | touch.screenX, // screenX 56 | touch.screenY, // screenY 57 | touch.clientX, // clientX 58 | touch.clientY, // clientY 59 | false, // ctrlKey 60 | false, // altKey 61 | false, // shiftKey 62 | false, // metaKey 63 | 0, // button 64 | null // relatedTarget 65 | ); 66 | // Dispatch the simulated event to the target element 67 | e.target.dispatchEvent(simulatedEvent); 68 | } 69 | /** 70 | * Simulate a mouse event based on a corresponding Pointer event 71 | * @param {Object} e A pointer event 72 | * @param {String} simulatedType The corresponding mouse event 73 | */ 74 | function simulatePointerMouseEvent(e, simulatedType) { 75 | // Prevent "Ignored attempt to cancel a touchmove event with cancelable=false" errors 76 | if (e.cancelable) 77 | e.preventDefault(); 78 | var simulatedEvent = document.createEvent('MouseEvents'); 79 | // Initialize the simulated mouse event using the touch event's coordinates 80 | simulatedEvent.initMouseEvent(simulatedType, // type 81 | true, // bubbles 82 | true, // cancelable 83 | window, // view 84 | 1, // detail 85 | e.screenX, // screenX 86 | e.screenY, // screenY 87 | e.clientX, // clientX 88 | e.clientY, // clientY 89 | false, // ctrlKey 90 | false, // altKey 91 | false, // shiftKey 92 | false, // metaKey 93 | 0, // button 94 | null // relatedTarget 95 | ); 96 | // Dispatch the simulated event to the target element 97 | e.target.dispatchEvent(simulatedEvent); 98 | } 99 | /** 100 | * Handle the touchstart events 101 | * @param {Object} e The widget element's touchstart event 102 | */ 103 | function touchstart(e) { 104 | // Ignore the event if another widget is already being handled 105 | if (DDTouch.touchHandled) 106 | return; 107 | DDTouch.touchHandled = true; 108 | // Simulate the mouse events 109 | // simulateMouseEvent(e, 'mouseover'); 110 | // simulateMouseEvent(e, 'mousemove'); 111 | simulateMouseEvent(e, 'mousedown'); 112 | } 113 | exports.touchstart = touchstart; 114 | /** 115 | * Handle the touchmove events 116 | * @param {Object} e The document's touchmove event 117 | */ 118 | function touchmove(e) { 119 | // Ignore event if not handled by us 120 | if (!DDTouch.touchHandled) 121 | return; 122 | simulateMouseEvent(e, 'mousemove'); 123 | } 124 | exports.touchmove = touchmove; 125 | /** 126 | * Handle the touchend events 127 | * @param {Object} e The document's touchend event 128 | */ 129 | function touchend(e) { 130 | // Ignore event if not handled 131 | if (!DDTouch.touchHandled) 132 | return; 133 | // cancel delayed leave event when we release on ourself which happens BEFORE we get this! 134 | if (DDTouch.pointerLeaveTimeout) { 135 | window.clearTimeout(DDTouch.pointerLeaveTimeout); 136 | delete DDTouch.pointerLeaveTimeout; 137 | } 138 | var wasDragging = !!dd_manager_1.DDManager.dragElement; 139 | // Simulate the mouseup event 140 | simulateMouseEvent(e, 'mouseup'); 141 | // simulateMouseEvent(event, 'mouseout'); 142 | // If the touch interaction did not move, it should trigger a click 143 | if (!wasDragging) { 144 | simulateMouseEvent(e, 'click'); 145 | } 146 | // Unset the flag to allow other widgets to inherit the touch event 147 | DDTouch.touchHandled = false; 148 | } 149 | exports.touchend = touchend; 150 | /** 151 | * Note we don't get touchenter/touchleave (which are deprecated) 152 | * see https://stackoverflow.com/questions/27908339/js-touch-equivalent-for-mouseenter 153 | * so instead of PointerEvent to still get enter/leave and send the matching mouse event. 154 | */ 155 | function pointerdown(e) { 156 | e.target.releasePointerCapture(e.pointerId); // <- Important! 157 | } 158 | exports.pointerdown = pointerdown; 159 | function pointerenter(e) { 160 | // ignore the initial one we get on pointerdown on ourself 161 | if (!dd_manager_1.DDManager.dragElement) { 162 | // console.log('pointerenter ignored'); 163 | return; 164 | } 165 | // console.log('pointerenter'); 166 | simulatePointerMouseEvent(e, 'mouseenter'); 167 | } 168 | exports.pointerenter = pointerenter; 169 | function pointerleave(e) { 170 | // ignore the leave on ourself we get before releasing the mouse over ourself 171 | // by delaying sending the event and having the up event cancel us 172 | if (!dd_manager_1.DDManager.dragElement) { 173 | // console.log('pointerleave ignored'); 174 | return; 175 | } 176 | DDTouch.pointerLeaveTimeout = window.setTimeout(function () { 177 | delete DDTouch.pointerLeaveTimeout; 178 | // console.log('pointerleave delayed'); 179 | simulatePointerMouseEvent(e, 'mouseleave'); 180 | }, 10); 181 | } 182 | exports.pointerleave = pointerleave; 183 | //# sourceMappingURL=dd-touch.js.map -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/gridstack-all.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * GridStack 7.1.0 3 | * https://gridstackjs.com/ 4 | * 5 | * Copyright (c) 2021-2022 Alain Dumesny 6 | * see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE 7 | */ 8 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/gridstack-engine.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * gridstack-engine.ts 7.1.0 3 | * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license 4 | */ 5 | import { GridStackNode, GridStackPosition, GridStackMoveOpts } from './types'; 6 | /** callback to update the DOM attributes since this class is generic (no HTML or other info) for items that changed - see _notify() */ 7 | declare type OnChangeCB = (nodes: GridStackNode[]) => void; 8 | /** options used during creation - similar to GridStackOptions */ 9 | export interface GridStackEngineOptions { 10 | column?: number; 11 | maxRow?: number; 12 | float?: boolean; 13 | nodes?: GridStackNode[]; 14 | onChange?: OnChangeCB; 15 | } 16 | /** 17 | * Defines the GridStack engine that does most no DOM grid manipulation. 18 | * See GridStack methods and vars for descriptions. 19 | * 20 | * NOTE: values should not be modified directly - call the main GridStack API instead 21 | */ 22 | export declare class GridStackEngine { 23 | column: number; 24 | maxRow: number; 25 | nodes: GridStackNode[]; 26 | addedNodes: GridStackNode[]; 27 | removedNodes: GridStackNode[]; 28 | batchMode: boolean; 29 | constructor(opts?: GridStackEngineOptions); 30 | batchUpdate(flag?: boolean): GridStackEngine; 31 | protected _useEntireRowArea(node: GridStackNode, nn: GridStackPosition): boolean; 32 | /** return the nodes that intercept the given node. Optionally a different area can be used, as well as a second node to skip */ 33 | collide(skip: GridStackNode, area?: GridStackNode, skip2?: GridStackNode): GridStackNode; 34 | collideAll(skip: GridStackNode, area?: GridStackNode, skip2?: GridStackNode): GridStackNode[]; 35 | /** does a pixel coverage collision based on where we started, returning the node that has the most coverage that is >50% mid line */ 36 | protected directionCollideCoverage(node: GridStackNode, o: GridStackMoveOpts, collides: GridStackNode[]): GridStackNode; 37 | /** does a pixel coverage returning the node that has the most coverage by area */ 38 | /** called to cache the nodes pixel rectangles used for collision detection during drag */ 39 | cacheRects(w: number, h: number, top: number, right: number, bottom: number, left: number): GridStackEngine; 40 | /** called to possibly swap between 2 nodes (same size or column, not locked, touching), returning true if successful */ 41 | swap(a: GridStackNode, b: GridStackNode): boolean; 42 | isAreaEmpty(x: number, y: number, w: number, h: number): boolean; 43 | /** re-layout grid items to reclaim any empty space */ 44 | compact(): GridStackEngine; 45 | /** enable/disable floating widgets (default: `false`) See [example](http://gridstackjs.com/demo/float.html) */ 46 | set float(val: boolean); 47 | /** float getter method */ 48 | get float(): boolean; 49 | /** sort the nodes array from first to last, or reverse. Called during collision/placement to force an order */ 50 | sortNodes(dir?: -1 | 1): GridStackEngine; 51 | /** 52 | * given a random node, makes sure it's coordinates/values are valid in the current grid 53 | * @param node to adjust 54 | * @param resizing if out of bound, resize down or move into the grid to fit ? 55 | */ 56 | prepareNode(node: GridStackNode, resizing?: boolean): GridStackNode; 57 | /** part2 of preparing a node to fit inside our grid - checks for x,y,w from grid dimensions */ 58 | nodeBoundFix(node: GridStackNode, resizing?: boolean): GridStackNode; 59 | /** returns a list of modified nodes from their original values */ 60 | getDirtyNodes(verify?: boolean): GridStackNode[]; 61 | /** find the first available empty spot for the given node width/height, updating the x,y attributes. return true if found */ 62 | findEmptyPosition(node: GridStackNode): boolean; 63 | /** call to add the given node to our list, fixing collision and re-packing */ 64 | addNode(node: GridStackNode, triggerAddEvent?: boolean): GridStackNode; 65 | removeNode(node: GridStackNode, removeDOM?: boolean, triggerEvent?: boolean): GridStackEngine; 66 | removeAll(removeDOM?: boolean): GridStackEngine; 67 | /** checks if item can be moved (layout constrain) vs moveNode(), returning true if was able to move. 68 | * In more complicated cases (maxRow) it will attempt at moving the item and fixing 69 | * others in a clone first, then apply those changes if still within specs. */ 70 | moveNodeCheck(node: GridStackNode, o: GridStackMoveOpts): boolean; 71 | /** return true if can fit in grid height constrain only (always true if no maxRow) */ 72 | willItFit(node: GridStackNode): boolean; 73 | /** true if x,y or w,h are different after clamping to min/max */ 74 | changedPosConstrain(node: GridStackNode, p: GridStackPosition): boolean; 75 | /** return true if the passed in node was actually moved (checks for no-op and locked) */ 76 | moveNode(node: GridStackNode, o: GridStackMoveOpts): boolean; 77 | getRow(): number; 78 | beginUpdate(node: GridStackNode): GridStackEngine; 79 | endUpdate(): GridStackEngine; 80 | /** saves a copy of the largest column layout (eg 12 even when rendering oneColumnMode) so we don't loose orig layout, 81 | * returning a list of widgets for serialization */ 82 | save(saveElement?: boolean): GridStackNode[]; 83 | /** 84 | * call to cache the given layout internally to the given location so we can restore back when column changes size 85 | * @param nodes list of nodes 86 | * @param column corresponding column index to save it under 87 | * @param clear if true, will force other caches to be removed (default false) 88 | */ 89 | cacheLayout(nodes: GridStackNode[], column: number, clear?: boolean): GridStackEngine; 90 | /** 91 | * call to cache the given node layout internally to the given location so we can restore back when column changes size 92 | * @param node single node to cache 93 | * @param column corresponding column index to save it under 94 | */ 95 | cacheOneLayout(n: GridStackNode, column: number): GridStackEngine; 96 | protected findCacheLayout(n: GridStackNode, column: number): number; 97 | /** called to remove all internal values but the _id */ 98 | cleanupNode(node: GridStackNode): GridStackEngine; 99 | } 100 | export {}; 101 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/types.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * types.ts 7.1.0 4 | * Copyright (c) 2021 Alain Dumesny - see GridStack root license 5 | */ 6 | Object.defineProperty(exports, "__esModule", { value: true }); 7 | exports.dragInDefaultOptions = exports.gridDefaults = void 0; 8 | // default values for grid options - used during init and when saving out 9 | exports.gridDefaults = { 10 | alwaysShowResizeHandle: 'mobile', 11 | animate: true, 12 | auto: true, 13 | cellHeight: 'auto', 14 | cellHeightThrottle: 100, 15 | cellHeightUnit: 'px', 16 | column: 12, 17 | draggable: { handle: '.grid-stack-item-content', appendTo: 'body' }, 18 | handle: '.grid-stack-item-content', 19 | itemClass: 'grid-stack-item', 20 | margin: 10, 21 | marginUnit: 'px', 22 | maxRow: 0, 23 | minRow: 0, 24 | oneColumnSize: 768, 25 | placeholderClass: 'grid-stack-placeholder', 26 | placeholderText: '', 27 | removableOptions: { accept: '.grid-stack-item' }, 28 | resizable: { handles: 'se' }, 29 | rtl: 'auto', 30 | }; 31 | /** default dragIn options */ 32 | exports.dragInDefaultOptions = { 33 | handle: '.grid-stack-item-content', 34 | appendTo: 'body', 35 | }; 36 | //# sourceMappingURL=types.js.map -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/es5/utils.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * utils.ts 7.1.0 3 | * Copyright (c) 2021 Alain Dumesny - see GridStack root license 4 | */ 5 | import { GridStackElement, GridStackNode, GridStackOptions, numberOrString, GridStackPosition, GridStackWidget } from './types'; 6 | export interface HeightData { 7 | h: number; 8 | unit: string; 9 | } 10 | /** checks for obsolete method names */ 11 | export declare function obsolete(self: any, f: any, oldName: string, newName: string, rev: string): (...args: any[]) => any; 12 | /** checks for obsolete grid options (can be used for any fields, but msg is about options) */ 13 | export declare function obsoleteOpts(opts: GridStackOptions, oldName: string, newName: string, rev: string): void; 14 | /** checks for obsolete grid options which are gone */ 15 | export declare function obsoleteOptsDel(opts: GridStackOptions, oldName: string, rev: string, info: string): void; 16 | /** checks for obsolete Jquery element attributes */ 17 | export declare function obsoleteAttr(el: HTMLElement, oldName: string, newName: string, rev: string): void; 18 | /** 19 | * Utility methods 20 | */ 21 | export declare class Utils { 22 | /** convert a potential selector into actual list of html elements */ 23 | static getElements(els: GridStackElement): HTMLElement[]; 24 | /** convert a potential selector into actual single element */ 25 | static getElement(els: GridStackElement): HTMLElement; 26 | /** returns true if a and b overlap */ 27 | static isIntercepted(a: GridStackPosition, b: GridStackPosition): boolean; 28 | /** returns true if a and b touch edges or corners */ 29 | static isTouching(a: GridStackPosition, b: GridStackPosition): boolean; 30 | /** returns the area a and b overlap */ 31 | static areaIntercept(a: GridStackPosition, b: GridStackPosition): number; 32 | /** returns the area */ 33 | static area(a: GridStackPosition): number; 34 | /** 35 | * Sorts array of nodes 36 | * @param nodes array to sort 37 | * @param dir 1 for asc, -1 for desc (optional) 38 | * @param width width of the grid. If undefined the width will be calculated automatically (optional). 39 | **/ 40 | static sort(nodes: GridStackNode[], dir?: -1 | 1, column?: number): GridStackNode[]; 41 | /** 42 | * creates a style sheet with style id under given parent 43 | * @param id will set the 'gs-style-id' attribute to that id 44 | * @param parent to insert the stylesheet as first child, 45 | * if none supplied it will be appended to the document head instead. 46 | */ 47 | static createStylesheet(id: string, parent?: HTMLElement): CSSStyleSheet; 48 | /** removed the given stylesheet id */ 49 | static removeStylesheet(id: string): void; 50 | /** inserts a CSS rule */ 51 | static addCSSRule(sheet: CSSStyleSheet, selector: string, rules: string): void; 52 | static toBool(v: unknown): boolean; 53 | static toNumber(value: null | string): number; 54 | static parseHeight(val: numberOrString): HeightData; 55 | /** copies unset fields in target to use the given default sources values */ 56 | static defaults(target: any, ...sources: any[]): {}; 57 | /** given 2 objects return true if they have the same values. Checks for Object {} having same fields and values (just 1 level down) */ 58 | static same(a: unknown, b: unknown): boolean; 59 | /** copies over b size & position (GridStackPosition), and optionally min/max as well */ 60 | static copyPos(a: GridStackWidget, b: GridStackWidget, doMinMax?: boolean): GridStackWidget; 61 | /** true if a and b has same size & position */ 62 | static samePos(a: GridStackPosition, b: GridStackPosition): boolean; 63 | /** removes field from the first object if same as the second objects (like diffing) and internal '_' for saving */ 64 | static removeInternalAndSame(a: unknown, b: unknown): void; 65 | /** removes internal fields '_' and default values for saving */ 66 | static removeInternalForSave(n: GridStackNode, removeEl?: boolean): void; 67 | /** return the closest parent (or itself) matching the given class */ 68 | static closestUpByClass(el: HTMLElement, name: string): HTMLElement; 69 | /** delay calling the given function for given delay, preventing new calls from happening while waiting */ 70 | static throttle(func: () => void, delay: number): () => void; 71 | static removePositioningStyles(el: HTMLElement): void; 72 | /** single level clone, returning a new object with same top fields. This will share sub objects and arrays */ 73 | static clone(obj: T): T; 74 | /** 75 | * Recursive clone version that returns a full copy, checking for nested objects and arrays ONLY. 76 | * Note: this will use as-is any key starting with double __ (and not copy inside) some lib have circular dependencies. 77 | */ 78 | static cloneDeep(obj: T): T; 79 | /** deep clone the given HTML node, removing teh unique id field */ 80 | static cloneNode(el: HTMLElement): HTMLElement; 81 | static appendTo(el: HTMLElement, parent: string | HTMLElement | Node): void; 82 | static addElStyles(el: HTMLElement, styles: { 83 | [prop: string]: string | string[]; 84 | }): void; 85 | static initEvent(e: DragEvent | MouseEvent, info: { 86 | type: string; 87 | target?: EventTarget; 88 | }): T; 89 | /** copies the MouseEvent properties and sends it as another event to the given target */ 90 | static simulateMouseEvent(e: MouseEvent, simulatedType: string, target?: EventTarget): void; 91 | } 92 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/gridstack-all.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * GridStack 7.1.0 3 | * https://gridstackjs.com/ 4 | * 5 | * Copyright (c) 2021-2022 Alain Dumesny 6 | * see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE 7 | */ 8 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/gridstack-engine.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * gridstack-engine.ts 7.1.0 3 | * Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license 4 | */ 5 | import { GridStackNode, GridStackPosition, GridStackMoveOpts } from './types'; 6 | /** callback to update the DOM attributes since this class is generic (no HTML or other info) for items that changed - see _notify() */ 7 | declare type OnChangeCB = (nodes: GridStackNode[]) => void; 8 | /** options used during creation - similar to GridStackOptions */ 9 | export interface GridStackEngineOptions { 10 | column?: number; 11 | maxRow?: number; 12 | float?: boolean; 13 | nodes?: GridStackNode[]; 14 | onChange?: OnChangeCB; 15 | } 16 | /** 17 | * Defines the GridStack engine that does most no DOM grid manipulation. 18 | * See GridStack methods and vars for descriptions. 19 | * 20 | * NOTE: values should not be modified directly - call the main GridStack API instead 21 | */ 22 | export declare class GridStackEngine { 23 | column: number; 24 | maxRow: number; 25 | nodes: GridStackNode[]; 26 | addedNodes: GridStackNode[]; 27 | removedNodes: GridStackNode[]; 28 | batchMode: boolean; 29 | constructor(opts?: GridStackEngineOptions); 30 | batchUpdate(flag?: boolean): GridStackEngine; 31 | protected _useEntireRowArea(node: GridStackNode, nn: GridStackPosition): boolean; 32 | /** return the nodes that intercept the given node. Optionally a different area can be used, as well as a second node to skip */ 33 | collide(skip: GridStackNode, area?: GridStackNode, skip2?: GridStackNode): GridStackNode; 34 | collideAll(skip: GridStackNode, area?: GridStackNode, skip2?: GridStackNode): GridStackNode[]; 35 | /** does a pixel coverage collision based on where we started, returning the node that has the most coverage that is >50% mid line */ 36 | protected directionCollideCoverage(node: GridStackNode, o: GridStackMoveOpts, collides: GridStackNode[]): GridStackNode; 37 | /** does a pixel coverage returning the node that has the most coverage by area */ 38 | /** called to cache the nodes pixel rectangles used for collision detection during drag */ 39 | cacheRects(w: number, h: number, top: number, right: number, bottom: number, left: number): GridStackEngine; 40 | /** called to possibly swap between 2 nodes (same size or column, not locked, touching), returning true if successful */ 41 | swap(a: GridStackNode, b: GridStackNode): boolean; 42 | isAreaEmpty(x: number, y: number, w: number, h: number): boolean; 43 | /** re-layout grid items to reclaim any empty space */ 44 | compact(): GridStackEngine; 45 | /** enable/disable floating widgets (default: `false`) See [example](http://gridstackjs.com/demo/float.html) */ 46 | set float(val: boolean); 47 | /** float getter method */ 48 | get float(): boolean; 49 | /** sort the nodes array from first to last, or reverse. Called during collision/placement to force an order */ 50 | sortNodes(dir?: -1 | 1): GridStackEngine; 51 | /** 52 | * given a random node, makes sure it's coordinates/values are valid in the current grid 53 | * @param node to adjust 54 | * @param resizing if out of bound, resize down or move into the grid to fit ? 55 | */ 56 | prepareNode(node: GridStackNode, resizing?: boolean): GridStackNode; 57 | /** part2 of preparing a node to fit inside our grid - checks for x,y,w from grid dimensions */ 58 | nodeBoundFix(node: GridStackNode, resizing?: boolean): GridStackNode; 59 | /** returns a list of modified nodes from their original values */ 60 | getDirtyNodes(verify?: boolean): GridStackNode[]; 61 | /** find the first available empty spot for the given node width/height, updating the x,y attributes. return true if found */ 62 | findEmptyPosition(node: GridStackNode): boolean; 63 | /** call to add the given node to our list, fixing collision and re-packing */ 64 | addNode(node: GridStackNode, triggerAddEvent?: boolean): GridStackNode; 65 | removeNode(node: GridStackNode, removeDOM?: boolean, triggerEvent?: boolean): GridStackEngine; 66 | removeAll(removeDOM?: boolean): GridStackEngine; 67 | /** checks if item can be moved (layout constrain) vs moveNode(), returning true if was able to move. 68 | * In more complicated cases (maxRow) it will attempt at moving the item and fixing 69 | * others in a clone first, then apply those changes if still within specs. */ 70 | moveNodeCheck(node: GridStackNode, o: GridStackMoveOpts): boolean; 71 | /** return true if can fit in grid height constrain only (always true if no maxRow) */ 72 | willItFit(node: GridStackNode): boolean; 73 | /** true if x,y or w,h are different after clamping to min/max */ 74 | changedPosConstrain(node: GridStackNode, p: GridStackPosition): boolean; 75 | /** return true if the passed in node was actually moved (checks for no-op and locked) */ 76 | moveNode(node: GridStackNode, o: GridStackMoveOpts): boolean; 77 | getRow(): number; 78 | beginUpdate(node: GridStackNode): GridStackEngine; 79 | endUpdate(): GridStackEngine; 80 | /** saves a copy of the largest column layout (eg 12 even when rendering oneColumnMode) so we don't loose orig layout, 81 | * returning a list of widgets for serialization */ 82 | save(saveElement?: boolean): GridStackNode[]; 83 | /** 84 | * call to cache the given layout internally to the given location so we can restore back when column changes size 85 | * @param nodes list of nodes 86 | * @param column corresponding column index to save it under 87 | * @param clear if true, will force other caches to be removed (default false) 88 | */ 89 | cacheLayout(nodes: GridStackNode[], column: number, clear?: boolean): GridStackEngine; 90 | /** 91 | * call to cache the given node layout internally to the given location so we can restore back when column changes size 92 | * @param node single node to cache 93 | * @param column corresponding column index to save it under 94 | */ 95 | cacheOneLayout(n: GridStackNode, column: number): GridStackEngine; 96 | protected findCacheLayout(n: GridStackNode, column: number): number; 97 | /** called to remove all internal values but the _id */ 98 | cleanupNode(node: GridStackNode): GridStackEngine; 99 | } 100 | export {}; 101 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/gridstack.min.css: -------------------------------------------------------------------------------- 1 | :root .grid-stack-item>.ui-resizable-handle{filter:none}.grid-stack{position:relative}.grid-stack.grid-stack-rtl{direction:ltr}.grid-stack.grid-stack-rtl>.grid-stack-item{direction:rtl}.grid-stack .grid-stack-placeholder>.placeholder-content{background-color:rgba(0,0,0,.1);margin:0;position:absolute;width:auto;z-index:0!important;text-align:center}.grid-stack>.grid-stack-item{min-width:8.3333333333%;position:absolute;padding:0}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;width:auto;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none}.grid-stack>.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle,.grid-stack>.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle{display:none}.grid-stack>.grid-stack-item>.ui-resizable-se,.grid-stack>.grid-stack-item>.ui-resizable-sw{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG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IzNC0xLjgwNywxMi44NDktNS40MjQgICBsNzMuMDg3LTczLjA4OGMzLjYxMy0zLjYyLDUuNDIxLTcuOTAxLDUuNDIxLTEyLjg0N2MwLTQuOTQ4LTEuODA4LTkuMjMyLTUuNDIxLTEyLjg1NCAgIEMzMzguMTQyLDQwMy44MDIsMzMzLjg1Nyw0MDEuOTk0LDMyOC45MDYsNDAxLjk5NHoiIGZpbGw9IiM2NjY2NjYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K);background-repeat:no-repeat;background-position:center;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.grid-stack>.grid-stack-item>.ui-resizable-se{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.grid-stack>.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:0}.grid-stack>.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:0;left:25px;right:25px}.grid-stack>.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:0}.grid-stack>.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px}.grid-stack>.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px}.grid-stack>.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:0;right:25px}.grid-stack>.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px}.grid-stack>.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px}.grid-stack>.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack>.grid-stack-item[gs-w="0"]{width:0%}.grid-stack>.grid-stack-item[gs-x="0"]{left:0}.grid-stack>.grid-stack-item[gs-min-w="0"]{min-width:0}.grid-stack>.grid-stack-item[gs-max-w="0"]{max-width:0%}.grid-stack>.grid-stack-item[gs-w="1"]{width:8.3333333333%}.grid-stack>.grid-stack-item[gs-x="1"]{left:8.3333333333%}.grid-stack>.grid-stack-item[gs-min-w="1"]{min-width:8.3333333333%}.grid-stack>.grid-stack-item[gs-max-w="1"]{max-width:8.3333333333%}.grid-stack>.grid-stack-item[gs-w="2"]{width:16.6666666667%}.grid-stack>.grid-stack-item[gs-x="2"]{left:16.6666666667%}.grid-stack>.grid-stack-item[gs-min-w="2"]{min-width:16.6666666667%}.grid-stack>.grid-stack-item[gs-max-w="2"]{max-width:16.6666666667%}.grid-stack>.grid-stack-item[gs-w="3"]{width:25%}.grid-stack>.grid-stack-item[gs-x="3"]{left:25%}.grid-stack>.grid-stack-item[gs-min-w="3"]{min-width:25%}.grid-stack>.grid-stack-item[gs-max-w="3"]{max-width:25%}.grid-stack>.grid-stack-item[gs-w="4"]{width:33.3333333333%}.grid-stack>.grid-stack-item[gs-x="4"]{left:33.3333333333%}.grid-stack>.grid-stack-item[gs-min-w="4"]{min-width:33.3333333333%}.grid-stack>.grid-stack-item[gs-max-w="4"]{max-width:33.3333333333%}.grid-stack>.grid-stack-item[gs-w="5"]{width:41.6666666667%}.grid-stack>.grid-stack-item[gs-x="5"]{left:41.6666666667%}.grid-stack>.grid-stack-item[gs-min-w="5"]{min-width:41.6666666667%}.grid-stack>.grid-stack-item[gs-max-w="5"]{max-width:41.6666666667%}.grid-stack>.grid-stack-item[gs-w="6"]{width:50%}.grid-stack>.grid-stack-item[gs-x="6"]{left:50%}.grid-stack>.grid-stack-item[gs-min-w="6"]{min-width:50%}.grid-stack>.grid-stack-item[gs-max-w="6"]{max-width:50%}.grid-stack>.grid-stack-item[gs-w="7"]{width:58.3333333333%}.grid-stack>.grid-stack-item[gs-x="7"]{left:58.3333333333%}.grid-stack>.grid-stack-item[gs-min-w="7"]{min-width:58.3333333333%}.grid-stack>.grid-stack-item[gs-max-w="7"]{max-width:58.3333333333%}.grid-stack>.grid-stack-item[gs-w="8"]{width:66.6666666667%}.grid-stack>.grid-stack-item[gs-x="8"]{left:66.6666666667%}.grid-stack>.grid-stack-item[gs-min-w="8"]{min-width:66.6666666667%}.grid-stack>.grid-stack-item[gs-max-w="8"]{max-width:66.6666666667%}.grid-stack>.grid-stack-item[gs-w="9"]{width:75%}.grid-stack>.grid-stack-item[gs-x="9"]{left:75%}.grid-stack>.grid-stack-item[gs-min-w="9"]{min-width:75%}.grid-stack>.grid-stack-item[gs-max-w="9"]{max-width:75%}.grid-stack>.grid-stack-item[gs-w="10"]{width:83.3333333333%}.grid-stack>.grid-stack-item[gs-x="10"]{left:83.3333333333%}.grid-stack>.grid-stack-item[gs-min-w="10"]{min-width:83.3333333333%}.grid-stack>.grid-stack-item[gs-max-w="10"]{max-width:83.3333333333%}.grid-stack>.grid-stack-item[gs-w="11"]{width:91.6666666667%}.grid-stack>.grid-stack-item[gs-x="11"]{left:91.6666666667%}.grid-stack>.grid-stack-item[gs-min-w="11"]{min-width:91.6666666667%}.grid-stack>.grid-stack-item[gs-max-w="11"]{max-width:91.6666666667%}.grid-stack>.grid-stack-item[gs-w="12"]{width:100%}.grid-stack>.grid-stack-item[gs-x="12"]{left:100%}.grid-stack>.grid-stack-item[gs-min-w="12"]{min-width:100%}.grid-stack>.grid-stack-item[gs-max-w="12"]{max-width:100%}.grid-stack.grid-stack-1>.grid-stack-item{min-width:100%}.grid-stack.grid-stack-1>.grid-stack-item[gs-w="1"]{width:100%}.grid-stack.grid-stack-1>.grid-stack-item[gs-x="1"]{left:100%}.grid-stack.grid-stack-1>.grid-stack-item[gs-min-w="1"]{min-width:100%}.grid-stack.grid-stack-1>.grid-stack-item[gs-max-w="1"]{max-width:100%}.grid-stack.grid-stack-animate,.grid-stack.grid-stack-animate .grid-stack-item{-webkit-transition:left .3s,top .3s,height .3s,width .3s;-moz-transition:left .3s,top .3s,height .3s,width .3s;-ms-transition:left .3s,top .3s,height .3s,width .3s;-o-transition:left .3s,top .3s,height .3s,width .3s;transition:left .3s,top .3s,height .3s,width .3s}.grid-stack.grid-stack-animate .grid-stack-item.grid-stack-placeholder,.grid-stack.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack.grid-stack-animate .grid-stack-item.ui-resizable-resizing{-webkit-transition:left 0s,top 0s,height 0s,width 0s;-moz-transition:left 0s,top 0s,height 0s,width 0s;-ms-transition:left 0s,top 0s,height 0s,width 0s;-o-transition:left 0s,top 0s,height 0s,width 0s;transition:left 0s,top 0s,height 0s,width 0s}.ui-draggable-dragging,.ui-resizable-resizing{z-index:100}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{box-shadow:1px 4px 6px rgba(0,0,0,.2);opacity:.8}.ui-draggable-dragging{will-change:left,top;cursor:move}.ui-resizable-resizing{will-change:width,height} -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/src/gridstack-extra.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * default to generate [2-11] columns as 1 (oneColumnMode) and 12 (default) are in the main css 3 | * Copyright (c) 2021 Alain Dumesny - see GridStack root license 4 | */ 5 | 6 | @use "sass:math"; 7 | 8 | $gridstack-columns-start: 2 !default; 9 | $gridstack-columns: 11 !default; 10 | 11 | @mixin grid-stack-items($columns) { 12 | .grid-stack.grid-stack-#{$columns} { 13 | 14 | > .grid-stack-item { 15 | min-width: math.div(100%, $columns); 16 | 17 | @for $i from 1 through $columns { 18 | &[gs-w='#{$i}'] { width: math.div(100%, $columns) * $i; } 19 | &[gs-x='#{$i}'] { left: math.div(100%, $columns) * $i; } 20 | &[gs-min-w='#{$i}'] { min-width: math.div(100%, $columns) * $i; } 21 | &[gs-max-w='#{$i}'] { max-width: math.div(100%, $columns) * $i; } 22 | } 23 | } 24 | } 25 | } 26 | 27 | @for $j from $gridstack-columns-start through $gridstack-columns { 28 | @include grid-stack-items($j) 29 | } 30 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/src/gridstack.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * gridstack SASS styles 7.1.0 3 | * Copyright (c) 2021 Alain Dumesny - see GridStack root license 4 | */ 5 | 6 | @use "sass:math"; 7 | 8 | $gridstack-columns: 12 !default; 9 | $animation_speed: .3s !default; 10 | 11 | @mixin vendor($property, $value...){ 12 | -webkit-#{$property}: $value; 13 | -moz-#{$property}: $value; 14 | -ms-#{$property}: $value; 15 | -o-#{$property}: $value; 16 | #{$property}: $value; 17 | } 18 | 19 | :root .grid-stack-item > .ui-resizable-handle { filter: none; } 20 | 21 | .grid-stack { 22 | position: relative; 23 | 24 | &.grid-stack-rtl { 25 | direction: ltr; 26 | > .grid-stack-item { 27 | direction: rtl; 28 | } 29 | } 30 | 31 | .grid-stack-placeholder > .placeholder-content { 32 | background-color: rgba(0,0,0,0.1); 33 | margin: 0; 34 | position: absolute; 35 | width: auto; 36 | z-index: 0 !important; 37 | text-align: center; 38 | } 39 | 40 | > .grid-stack-item { 41 | min-width: math.div(100%, $gridstack-columns); 42 | position: absolute; 43 | padding: 0; 44 | 45 | > .grid-stack-item-content { 46 | margin: 0; 47 | position: absolute; 48 | width: auto; 49 | overflow-x: hidden; 50 | overflow-y: auto; 51 | } 52 | 53 | > .ui-resizable-handle { 54 | position: absolute; 55 | font-size: 0.1px; 56 | display: block; 57 | -ms-touch-action: none; 58 | touch-action: none; 59 | } 60 | 61 | &.ui-resizable-disabled > .ui-resizable-handle, 62 | &.ui-resizable-autohide > .ui-resizable-handle { display: none; } 63 | 64 | > .ui-resizable-se, 65 | > .ui-resizable-sw { 66 | background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlb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Mi44NDVjMy42MTksMy42MTcsNy45MDEsNS40MjYsMTIuODUsNS40MjYgICBoMzYuNTQ1djI5Mi4zNThoLTM2LjU0MmMtNC45NTIsMC05LjIzNSwxLjgwOC0xMi44NSw1LjQyMWMtMy42MTcsMy42MjEtNS40MjQsNy45MDUtNS40MjQsMTIuODU0ICAgYzAsNC45NDUsMS44MDcsOS4yMjcsNS40MjQsMTIuODQ3bDczLjA4OSw3My4wODhjMy42MTcsMy42MTcsNy44OTgsNS40MjQsMTIuODQ3LDUuNDI0YzQuOTUsMCw5LjIzNC0xLjgwNywxMi44NDktNS40MjQgICBsNzMuMDg3LTczLjA4OGMzLjYxMy0zLjYyLDUuNDIxLTcuOTAxLDUuNDIxLTEyLjg0N2MwLTQuOTQ4LTEuODA4LTkuMjMyLTUuNDIxLTEyLjg1NCAgIEMzMzguMTQyLDQwMy44MDIsMzMzLjg1Nyw0MDEuOTk0LDMyOC45MDYsNDAxLjk5NHoiIGZpbGw9IiM2NjY2NjYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K); 67 | background-repeat: no-repeat; 68 | background-position: center; 69 | @include vendor(transform, rotate(45deg)); 70 | } 71 | 72 | > .ui-resizable-se { 73 | @include vendor(transform, rotate(-45deg)); 74 | } 75 | 76 | > .ui-resizable-nw { cursor: nw-resize; width: 20px; height: 20px; top: 0; } 77 | > .ui-resizable-n { cursor: n-resize; height: 10px; top: 0; left: 25px; right: 25px; } 78 | > .ui-resizable-ne { cursor: ne-resize; width: 20px; height: 20px; top: 0; } 79 | > .ui-resizable-e { cursor: e-resize; width: 10px; top: 15px; bottom: 15px; } 80 | > .ui-resizable-se { cursor: se-resize; width: 20px; height: 20px;} 81 | > .ui-resizable-s { cursor: s-resize; height: 10px; left: 25px; bottom: 0; right: 25px; } 82 | > .ui-resizable-sw { cursor: sw-resize; width: 20px; height: 20px;} 83 | > .ui-resizable-w { cursor: w-resize; width: 10px; top: 15px; bottom: 15px; } 84 | 85 | &.ui-draggable-dragging { 86 | &> .ui-resizable-handle { 87 | display: none !important; 88 | } 89 | } 90 | 91 | @for $i from 0 through $gridstack-columns { 92 | &[gs-w='#{$i}'] { width: math.div(100%, $gridstack-columns) * $i; } 93 | &[gs-x='#{$i}'] { left: math.div(100%, $gridstack-columns) * $i; } 94 | &[gs-min-w='#{$i}'] { min-width: math.div(100%, $gridstack-columns) * $i; } 95 | &[gs-max-w='#{$i}'] { max-width: math.div(100%, $gridstack-columns) * $i; } 96 | } 97 | } 98 | 99 | &.grid-stack-1>.grid-stack-item { 100 | min-width: 100%; 101 | &[gs-w='1'] { width: 100%; } 102 | &[gs-x='1'] { left: 100%; } 103 | &[gs-min-w='1'] { min-width: 100%; } 104 | &[gs-max-w='1'] { max-width: 100%; } 105 | } 106 | 107 | &.grid-stack-animate, 108 | &.grid-stack-animate .grid-stack-item { 109 | @include vendor(transition, left $animation_speed, top $animation_speed, height $animation_speed, width $animation_speed); 110 | } 111 | 112 | &.grid-stack-animate .grid-stack-item.ui-draggable-dragging, 113 | &.grid-stack-animate .grid-stack-item.ui-resizable-resizing, 114 | &.grid-stack-animate .grid-stack-item.grid-stack-placeholder{ 115 | @include vendor(transition, left 0s, top 0s, height 0s, width 0s); 116 | } 117 | 118 | // without this, the html5 drag will flicker between no-drop and drop when dragging over second grid 119 | // Update: removed that as it causes nested grids to no receive dragenter events when parent drags and sets this for #992. not seeing cursor flicker (chrome). 120 | // &.ui-droppable.ui-droppable-over > *:not(.ui-droppable) { 121 | // pointer-events: none; 122 | // } 123 | } 124 | 125 | .ui-draggable-dragging, 126 | .ui-resizable-resizing { 127 | z-index: 100; 128 | 129 | > .grid-stack-item-content { 130 | box-shadow: 1px 4px 6px rgba(0, 0, 0, 0.2); 131 | opacity: 0.8; 132 | } 133 | } 134 | .ui-draggable-dragging { 135 | will-change: left, top; 136 | cursor: move; 137 | } 138 | .ui-resizable-resizing { 139 | will-change: width, height; 140 | } -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/types.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * types.ts 7.1.0 4 | * Copyright (c) 2021 Alain Dumesny - see GridStack root license 5 | */ 6 | Object.defineProperty(exports, "__esModule", { value: true }); 7 | exports.dragInDefaultOptions = exports.gridDefaults = void 0; 8 | // default values for grid options - used during init and when saving out 9 | exports.gridDefaults = { 10 | alwaysShowResizeHandle: 'mobile', 11 | animate: true, 12 | auto: true, 13 | cellHeight: 'auto', 14 | cellHeightThrottle: 100, 15 | cellHeightUnit: 'px', 16 | column: 12, 17 | draggable: { handle: '.grid-stack-item-content', appendTo: 'body' }, 18 | handle: '.grid-stack-item-content', 19 | itemClass: 'grid-stack-item', 20 | margin: 10, 21 | marginUnit: 'px', 22 | maxRow: 0, 23 | minRow: 0, 24 | oneColumnSize: 768, 25 | placeholderClass: 'grid-stack-placeholder', 26 | placeholderText: '', 27 | removableOptions: { accept: '.grid-stack-item' }, 28 | resizable: { handles: 'se' }, 29 | rtl: 'auto', 30 | }; 31 | /** default dragIn options */ 32 | exports.dragInDefaultOptions = { 33 | handle: '.grid-stack-item-content', 34 | appendTo: 'body', 35 | }; 36 | //# sourceMappingURL=types.js.map -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/dist/utils.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * utils.ts 7.1.0 3 | * Copyright (c) 2021 Alain Dumesny - see GridStack root license 4 | */ 5 | import { GridStackElement, GridStackNode, GridStackOptions, numberOrString, GridStackPosition, GridStackWidget } from './types'; 6 | export interface HeightData { 7 | h: number; 8 | unit: string; 9 | } 10 | /** checks for obsolete method names */ 11 | export declare function obsolete(self: any, f: any, oldName: string, newName: string, rev: string): (...args: any[]) => any; 12 | /** checks for obsolete grid options (can be used for any fields, but msg is about options) */ 13 | export declare function obsoleteOpts(opts: GridStackOptions, oldName: string, newName: string, rev: string): void; 14 | /** checks for obsolete grid options which are gone */ 15 | export declare function obsoleteOptsDel(opts: GridStackOptions, oldName: string, rev: string, info: string): void; 16 | /** checks for obsolete Jquery element attributes */ 17 | export declare function obsoleteAttr(el: HTMLElement, oldName: string, newName: string, rev: string): void; 18 | /** 19 | * Utility methods 20 | */ 21 | export declare class Utils { 22 | /** convert a potential selector into actual list of html elements */ 23 | static getElements(els: GridStackElement): HTMLElement[]; 24 | /** convert a potential selector into actual single element */ 25 | static getElement(els: GridStackElement): HTMLElement; 26 | /** returns true if a and b overlap */ 27 | static isIntercepted(a: GridStackPosition, b: GridStackPosition): boolean; 28 | /** returns true if a and b touch edges or corners */ 29 | static isTouching(a: GridStackPosition, b: GridStackPosition): boolean; 30 | /** returns the area a and b overlap */ 31 | static areaIntercept(a: GridStackPosition, b: GridStackPosition): number; 32 | /** returns the area */ 33 | static area(a: GridStackPosition): number; 34 | /** 35 | * Sorts array of nodes 36 | * @param nodes array to sort 37 | * @param dir 1 for asc, -1 for desc (optional) 38 | * @param width width of the grid. If undefined the width will be calculated automatically (optional). 39 | **/ 40 | static sort(nodes: GridStackNode[], dir?: -1 | 1, column?: number): GridStackNode[]; 41 | /** 42 | * creates a style sheet with style id under given parent 43 | * @param id will set the 'gs-style-id' attribute to that id 44 | * @param parent to insert the stylesheet as first child, 45 | * if none supplied it will be appended to the document head instead. 46 | */ 47 | static createStylesheet(id: string, parent?: HTMLElement): CSSStyleSheet; 48 | /** removed the given stylesheet id */ 49 | static removeStylesheet(id: string): void; 50 | /** inserts a CSS rule */ 51 | static addCSSRule(sheet: CSSStyleSheet, selector: string, rules: string): void; 52 | static toBool(v: unknown): boolean; 53 | static toNumber(value: null | string): number; 54 | static parseHeight(val: numberOrString): HeightData; 55 | /** copies unset fields in target to use the given default sources values */ 56 | static defaults(target: any, ...sources: any[]): {}; 57 | /** given 2 objects return true if they have the same values. Checks for Object {} having same fields and values (just 1 level down) */ 58 | static same(a: unknown, b: unknown): boolean; 59 | /** copies over b size & position (GridStackPosition), and optionally min/max as well */ 60 | static copyPos(a: GridStackWidget, b: GridStackWidget, doMinMax?: boolean): GridStackWidget; 61 | /** true if a and b has same size & position */ 62 | static samePos(a: GridStackPosition, b: GridStackPosition): boolean; 63 | /** removes field from the first object if same as the second objects (like diffing) and internal '_' for saving */ 64 | static removeInternalAndSame(a: unknown, b: unknown): void; 65 | /** removes internal fields '_' and default values for saving */ 66 | static removeInternalForSave(n: GridStackNode, removeEl?: boolean): void; 67 | /** return the closest parent (or itself) matching the given class */ 68 | static closestUpByClass(el: HTMLElement, name: string): HTMLElement; 69 | /** delay calling the given function for given delay, preventing new calls from happening while waiting */ 70 | static throttle(func: () => void, delay: number): () => void; 71 | static removePositioningStyles(el: HTMLElement): void; 72 | /** single level clone, returning a new object with same top fields. This will share sub objects and arrays */ 73 | static clone(obj: T): T; 74 | /** 75 | * Recursive clone version that returns a full copy, checking for nested objects and arrays ONLY. 76 | * Note: this will use as-is any key starting with double __ (and not copy inside) some lib have circular dependencies. 77 | */ 78 | static cloneDeep(obj: T): T; 79 | /** deep clone the given HTML node, removing teh unique id field */ 80 | static cloneNode(el: HTMLElement): HTMLElement; 81 | static appendTo(el: HTMLElement, parent: string | HTMLElement | Node): void; 82 | static addElStyles(el: HTMLElement, styles: { 83 | [prop: string]: string | string[]; 84 | }): void; 85 | static initEvent(e: DragEvent | MouseEvent, info: { 86 | type: string; 87 | target?: EventTarget; 88 | }): T; 89 | /** copies the MouseEvent properties and sends it as another event to the given target */ 90 | static simulateMouseEvent(e: MouseEvent, simulatedType: string, target?: EventTarget): void; 91 | } 92 | -------------------------------------------------------------------------------- /BlazorGridStack/node_modules/gridstack/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gridstack", 3 | "version": "7.1.0", 4 | "description": "TypeScript/JS lib for dashboard layout and creation, responsive, mobile support, no external dependencies, with many wrappers (React, Angular, Vue, Ember, knockout...)", 5 | "main": "./dist/gridstack.js", 6 | "types": "./dist/gridstack.d.ts", 7 | "repository": { 8 | "type": "git", 9 | "url": "git+https://github.com/gridstack/gridstack.js.git" 10 | }, 11 | "funding": [ 12 | { 13 | "type": "paypal", 14 | "url": "https://www.paypal.me/alaind831" 15 | }, 16 | { 17 | "type": "venmo", 18 | "url": "https://www.venmo.com/adumesny" 19 | } 20 | ], 21 | "scripts": { 22 | "build": "yarn --no-progress && rm -rf dist/* && grunt && yarn build:es6 && yarn build:es5 && yarn doc", 23 | "build:es6": "webpack && tsc --stripInternal", 24 | "build:es5": "webpack --config es5/webpack.config.js && tsc --stripInternal --project es5/tsconfig.json", 25 | "w": "webpack", 26 | "t": "rm -rf dist/* && grunt && tsc --stripInternal", 27 | "doc": "doctoc ./README.md && doctoc ./doc/README.md && doctoc ./doc/CHANGES.md", 28 | "test": "yarn lint && karma start karma.conf.js", 29 | "lint": "tsc --noEmit && eslint src/*.ts", 30 | "reset": "rm -rf dist node_modules", 31 | "prepublishOnly": "yarn build" 32 | }, 33 | "keywords": [ 34 | "Typescript", 35 | "gridstack.js", 36 | "grid", 37 | "gridster", 38 | "layout", 39 | "responsive", 40 | "dashboard", 41 | "resize", 42 | "drag&drop", 43 | "widgets", 44 | "Angular", 45 | "React", 46 | "Vue", 47 | "JavaScript" 48 | ], 49 | "author": "Alain Dumesny (https://github.com/adumesny)", 50 | "contributors": [ 51 | "Pavel Reznikov ", 52 | "Dylan Weiss (https://dylandreams.com)" 53 | ], 54 | "license": "MIT", 55 | "bugs": { 56 | "url": "https://github.com/gridstack/gridstack.js/issues" 57 | }, 58 | "homepage": "http://gridstack.js/", 59 | "devDependencies": { 60 | "@types/jasmine": "^3.5.9", 61 | "@typescript-eslint/eslint-plugin": "^4.6.0", 62 | "@typescript-eslint/parser": "^4.6.0", 63 | "connect": "^3.7.0", 64 | "core-js": "^3.6.4", 65 | "coveralls": "^3.0.9", 66 | "doctoc": "^1.4.0", 67 | "eslint": "^7.14", 68 | "grunt": "^1.0.4", 69 | "grunt-cli": "^1.3.2", 70 | "grunt-contrib-connect": "^3.0.0", 71 | "grunt-contrib-copy": "^1.0.0", 72 | "grunt-contrib-cssmin": "^3.0.0", 73 | "grunt-contrib-uglify": "^5.0.0", 74 | "grunt-contrib-watch": "^1.1.0", 75 | "grunt-eslint": "^23.0.0", 76 | "grunt-protractor-runner": "^5.0.0", 77 | "grunt-protractor-webdriver": "^0.2.5", 78 | "grunt-sass": "3.1.0", 79 | "jasmine-core": "^3.5.0", 80 | "karma": "^6", 81 | "karma-chrome-launcher": "^3.1.0", 82 | "karma-cli": "^2.0.0", 83 | "karma-jasmine": "^4.0.1", 84 | "karma-typescript": "4.1.1", 85 | "protractor": "^7.0.0", 86 | "puppeteer": "^5.4.1", 87 | "sass": "^1.42.1", 88 | "serve-static": "^1.14.1", 89 | "ts-loader": "^8.0.7", 90 | "typescript": "^3.7", 91 | "webpack": "^5.3.2", 92 | "webpack-cli": "^4.6.0" 93 | } 94 | } -------------------------------------------------------------------------------- /BlazorGridStack/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "blazorgridstack", 3 | "version": "1.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "blazorgridstack", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "gridstack": "^7.1.0" 13 | } 14 | }, 15 | "node_modules/gridstack": { 16 | "version": "7.1.0", 17 | "resolved": "https://registry.npmjs.org/gridstack/-/gridstack-7.1.0.tgz", 18 | "integrity": "sha512-lLRUfZvDNphtmHtf/wVSA1dgipFeHQUi21G5rO+YtYzC8kbTWkLE8GoNA5k8qbUj8uzEhK7iKNrppo3hJWRWRA==", 19 | "funding": [ 20 | { 21 | "type": "paypal", 22 | "url": "https://www.paypal.me/alaind831" 23 | }, 24 | { 25 | "type": "venmo", 26 | "url": "https://www.venmo.com/adumesny" 27 | } 28 | ] 29 | } 30 | }, 31 | "dependencies": { 32 | "gridstack": { 33 | "version": "7.1.0", 34 | "resolved": "https://registry.npmjs.org/gridstack/-/gridstack-7.1.0.tgz", 35 | "integrity": "sha512-lLRUfZvDNphtmHtf/wVSA1dgipFeHQUi21G5rO+YtYzC8kbTWkLE8GoNA5k8qbUj8uzEhK7iKNrppo3hJWRWRA==" 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /BlazorGridStack/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "blazorgridstack", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "gridstack": "^7.1.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /BlazorGridStack/wwwroot/gridStackInterop.js: -------------------------------------------------------------------------------- 1 | // This is a JavaScript module that is loaded on demand. It can export any number of 2 | // functions, and may import other JavaScript modules if required. 3 | 4 | import './gridstack/gridstack-all.js'; 5 | 6 | var gsCssId = "gs-blazor-styles"; 7 | 8 | export function init(options, interopReference) 9 | { 10 | initCss(); 11 | 12 | if (options.acceptWidgetsEvent) 13 | { 14 | options.acceptWidgets = 15 | async (i, _) => await interopReference.invokeMethodAsync("AcceptWidgetsDelegateFired", i); 16 | } 17 | 18 | var grid = window.GridStack.init(options); 19 | 20 | //events 21 | grid.on("added", 22 | async (event, items) => 23 | { 24 | await interopReference.invokeMethodAsync("AddedFired", items.map(i => { return generateGridWidgetObject(i) })); 25 | }); 26 | 27 | grid.on("change", 28 | async (event, items) => 29 | { 30 | await interopReference.invokeMethodAsync("ChangeFired", items.map(i => { return generateGridWidgetObject(i) })); 31 | }); 32 | 33 | grid.on("disable", 34 | async (event) => { 35 | await interopReference.invokeMethodAsync("DisableFired"); 36 | }); 37 | 38 | grid.on("dragstart", 39 | async (event, el) => 40 | { 41 | await interopReference.invokeMethodAsync("DragStartFired", generateGridWidgetObjectFromElement(el)); 42 | }); 43 | 44 | grid.on("drag", 45 | async (event, el) => { 46 | await interopReference.invokeMethodAsync("DragFired", generateGridWidgetObjectFromElement(el)); 47 | }); 48 | 49 | grid.on("dragstop", 50 | async (event, el) => { 51 | await interopReference.invokeMethodAsync("DragStopFired", generateGridWidgetObjectFromElement(el)); 52 | }); 53 | 54 | grid.on("dropped", 55 | async (event, previousWidget, newWidget) => { 56 | await interopReference.invokeMethodAsync("DroppedFired", previousWidget, newWidget); 57 | }); 58 | 59 | grid.on("enable", 60 | async (event) => { 61 | await interopReference.invokeMethodAsync("EnableFired"); 62 | }); 63 | 64 | grid.on("removed", 65 | async (event, items) => { 66 | await interopReference.invokeMethodAsync("RemovedFired", items.map(i => { return generateGridWidgetObject(i) })); 67 | }); 68 | 69 | grid.on("resizestart", 70 | async (event, el) => { 71 | await interopReference.invokeMethodAsync("ResizeStartFired", generateGridWidgetObjectFromElement(el)); 72 | }); 73 | 74 | grid.on("resize", 75 | async (event, el) => { 76 | await interopReference.invokeMethodAsync("ResizeFired", generateGridWidgetObjectFromElement(el)); 77 | }); 78 | 79 | grid.on("resizestop", 80 | async (event, el) => { 81 | await interopReference.invokeMethodAsync("ResizeStopFired", generateGridWidgetObjectFromElement(el)); 82 | }); 83 | 84 | //methods 85 | grid.addWidgetForBlazor = (widgetOptions) => 86 | { 87 | return generateGridWidgetObjectFromElement(grid.addWidget(widgetOptions)); 88 | } 89 | 90 | grid.addWidgetById = (id) => 91 | { 92 | return generateGridWidgetObjectFromElement(grid.addWidget(document.getElementById(id))); 93 | } 94 | 95 | grid.getGridItemsForBlazor = () => 96 | { 97 | return grid.getGridItems().map(i => { return generateGridWidgetObjectFromElement(i) }); 98 | } 99 | 100 | grid.makeWidgetById = (id) => 101 | { 102 | grid.makeWidget(document.getElementById(id)); 103 | } 104 | 105 | grid.movableById = (id, val) => 106 | { 107 | grid.movable(document.getElementById(id), val); 108 | } 109 | 110 | grid.removeWidgetById = (id, removeDOM, triggerEvent) => 111 | { 112 | grid.removeWidget(document.getElementById(id), removeDOM, triggerEvent); 113 | } 114 | 115 | grid.resizableById = (id, val) => 116 | { 117 | grid.resizable(document.getElementById(id), val); 118 | } 119 | 120 | grid.updateById = (id, opts) => 121 | { 122 | grid.update(document.getElementById(id), opts); 123 | } 124 | 125 | return grid; 126 | } 127 | 128 | function initCss() 129 | { 130 | //init css 131 | if (!document.getElementById(gsCssId)) { 132 | var head = document.getElementsByTagName('head')[0]; 133 | var link = document.createElement('link'); 134 | link.id = gsCssId; 135 | link.href = '_content/BlazorGridStack/gridstack/gridstack.min.css'; 136 | link.rel = "stylesheet"; 137 | head.appendChild(link); 138 | } 139 | } 140 | 141 | function generateGridWidgetObject(widget) 142 | { 143 | return { 144 | x: widget.x, 145 | y: widget.y, 146 | h: widget.h, 147 | w: widget.w, 148 | content: widget.el? widget.el.innerHTML : null, 149 | className: widget.el? widget.el.className : null, 150 | id: widget.el.id 151 | } 152 | } 153 | 154 | function generateGridWidgetObjectFromElement(element) 155 | { 156 | return { 157 | x: parseInt(element.getAttribute("gs-x")), 158 | y: parseInt(element.getAttribute("gs-y")), 159 | h: parseInt(element.getAttribute("gs-h")), 160 | w: parseInt(element.getAttribute("gs-w")), 161 | content: element.querySelector(".grid-stack-item-content").innerHTML, 162 | className: element.className, 163 | id: element.id 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /BlazorGridStack/wwwroot/gridstack/gridstack.min.css: -------------------------------------------------------------------------------- 1 | :root .grid-stack-item>.ui-resizable-handle{filter:none}.grid-stack{position:relative}.grid-stack.grid-stack-rtl{direction:ltr}.grid-stack.grid-stack-rtl>.grid-stack-item{direction:rtl}.grid-stack .grid-stack-placeholder>.placeholder-content{background-color:rgba(0,0,0,.1);margin:0;position:absolute;width:auto;z-index:0!important;text-align:center}.grid-stack>.grid-stack-item{min-width:8.3333333333%;position:absolute;padding:0}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;width:auto;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none}.grid-stack>.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle,.grid-stack>.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle{display:none}.grid-stack>.grid-stack-item>.ui-resizable-se,.grid-stack>.grid-stack-item>.ui-resizable-sw{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iMCAwIDUxMS42MjYgNTExLjYyNyIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTExLjYyNiA1MTEuNjI3OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggZD0iTTMyOC45MDYsNDAxLjk5NGgtMzYuNTUzVjEwOS42MzZoMzYuNTUzYzQuOTQ4LDAsOS4yMzYtMS44MDksMTIuODQ3LTUuNDI2YzMuNjEzLTMuNjE1LDUu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no-repeat;background-position:center;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.grid-stack>.grid-stack-item>.ui-resizable-se{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.grid-stack>.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:0}.grid-stack>.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:0;left:25px;right:25px}.grid-stack>.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:0}.grid-stack>.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px}.grid-stack>.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px}.grid-stack>.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:0;right:25px}.grid-stack>.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px}.grid-stack>.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px}.grid-stack>.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack>.grid-stack-item[gs-w="0"]{width:0%}.grid-stack>.grid-stack-item[gs-x="0"]{left:0}.grid-stack>.grid-stack-item[gs-min-w="0"]{min-width:0}.grid-stack>.grid-stack-item[gs-max-w="0"]{max-width:0%}.grid-stack>.grid-stack-item[gs-w="1"]{width:8.3333333333%}.grid-stack>.grid-stack-item[gs-x="1"]{left:8.3333333333%}.grid-stack>.grid-stack-item[gs-min-w="1"]{min-width:8.3333333333%}.grid-stack>.grid-stack-item[gs-max-w="1"]{max-width:8.3333333333%}.grid-stack>.grid-stack-item[gs-w="2"]{width:16.6666666667%}.grid-stack>.grid-stack-item[gs-x="2"]{left:16.6666666667%}.grid-stack>.grid-stack-item[gs-min-w="2"]{min-width:16.6666666667%}.grid-stack>.grid-stack-item[gs-max-w="2"]{max-width:16.6666666667%}.grid-stack>.grid-stack-item[gs-w="3"]{width:25%}.grid-stack>.grid-stack-item[gs-x="3"]{left:25%}.grid-stack>.grid-stack-item[gs-min-w="3"]{min-width:25%}.grid-stack>.grid-stack-item[gs-max-w="3"]{max-width:25%}.grid-stack>.grid-stack-item[gs-w="4"]{width:33.3333333333%}.grid-stack>.grid-stack-item[gs-x="4"]{left:33.3333333333%}.grid-stack>.grid-stack-item[gs-min-w="4"]{min-width:33.3333333333%}.grid-stack>.grid-stack-item[gs-max-w="4"]{max-width:33.3333333333%}.grid-stack>.grid-stack-item[gs-w="5"]{width:41.6666666667%}.grid-stack>.grid-stack-item[gs-x="5"]{left:41.6666666667%}.grid-stack>.grid-stack-item[gs-min-w="5"]{min-width:41.6666666667%}.grid-stack>.grid-stack-item[gs-max-w="5"]{max-width:41.6666666667%}.grid-stack>.grid-stack-item[gs-w="6"]{width:50%}.grid-stack>.grid-stack-item[gs-x="6"]{left:50%}.grid-stack>.grid-stack-item[gs-min-w="6"]{min-width:50%}.grid-stack>.grid-stack-item[gs-max-w="6"]{max-width:50%}.grid-stack>.grid-stack-item[gs-w="7"]{width:58.3333333333%}.grid-stack>.grid-stack-item[gs-x="7"]{left:58.3333333333%}.grid-stack>.grid-stack-item[gs-min-w="7"]{min-width:58.3333333333%}.grid-stack>.grid-stack-item[gs-max-w="7"]{max-width:58.3333333333%}.grid-stack>.grid-stack-item[gs-w="8"]{width:66.6666666667%}.grid-stack>.grid-stack-item[gs-x="8"]{left:66.6666666667%}.grid-stack>.grid-stack-item[gs-min-w="8"]{min-width:66.6666666667%}.grid-stack>.grid-stack-item[gs-max-w="8"]{max-width:66.6666666667%}.grid-stack>.grid-stack-item[gs-w="9"]{width:75%}.grid-stack>.grid-stack-item[gs-x="9"]{left:75%}.grid-stack>.grid-stack-item[gs-min-w="9"]{min-width:75%}.grid-stack>.grid-stack-item[gs-max-w="9"]{max-width:75%}.grid-stack>.grid-stack-item[gs-w="10"]{width:83.3333333333%}.grid-stack>.grid-stack-item[gs-x="10"]{left:83.3333333333%}.grid-stack>.grid-stack-item[gs-min-w="10"]{min-width:83.3333333333%}.grid-stack>.grid-stack-item[gs-max-w="10"]{max-width:83.3333333333%}.grid-stack>.grid-stack-item[gs-w="11"]{width:91.6666666667%}.grid-stack>.grid-stack-item[gs-x="11"]{left:91.6666666667%}.grid-stack>.grid-stack-item[gs-min-w="11"]{min-width:91.6666666667%}.grid-stack>.grid-stack-item[gs-max-w="11"]{max-width:91.6666666667%}.grid-stack>.grid-stack-item[gs-w="12"]{width:100%}.grid-stack>.grid-stack-item[gs-x="12"]{left:100%}.grid-stack>.grid-stack-item[gs-min-w="12"]{min-width:100%}.grid-stack>.grid-stack-item[gs-max-w="12"]{max-width:100%}.grid-stack.grid-stack-1>.grid-stack-item{min-width:100%}.grid-stack.grid-stack-1>.grid-stack-item[gs-w="1"]{width:100%}.grid-stack.grid-stack-1>.grid-stack-item[gs-x="1"]{left:100%}.grid-stack.grid-stack-1>.grid-stack-item[gs-min-w="1"]{min-width:100%}.grid-stack.grid-stack-1>.grid-stack-item[gs-max-w="1"]{max-width:100%}.grid-stack.grid-stack-animate,.grid-stack.grid-stack-animate .grid-stack-item{-webkit-transition:left .3s,top .3s,height .3s,width .3s;-moz-transition:left .3s,top .3s,height .3s,width .3s;-ms-transition:left .3s,top .3s,height .3s,width .3s;-o-transition:left .3s,top .3s,height .3s,width .3s;transition:left .3s,top .3s,height .3s,width .3s}.grid-stack.grid-stack-animate .grid-stack-item.grid-stack-placeholder,.grid-stack.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack.grid-stack-animate .grid-stack-item.ui-resizable-resizing{-webkit-transition:left 0s,top 0s,height 0s,width 0s;-moz-transition:left 0s,top 0s,height 0s,width 0s;-ms-transition:left 0s,top 0s,height 0s,width 0s;-o-transition:left 0s,top 0s,height 0s,width 0s;transition:left 0s,top 0s,height 0s,width 0s}.ui-draggable-dragging,.ui-resizable-resizing{z-index:100}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{box-shadow:1px 4px 6px rgba(0,0,0,.2);opacity:.8}.ui-draggable-dragging{will-change:left,top;cursor:move}.ui-resizable-resizing{will-change:width,height} -------------------------------------------------------------------------------- /BlazorGridStackDemo/App.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | Not found 8 | 9 |

Sorry, there's nothing at this address.

10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /BlazorGridStackDemo/BlazorGridStackServerModeDemo.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /BlazorGridStackDemo/Pages/Error.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model BlazorGridStackDemo.Pages.ErrorModel 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Error 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 |

Error.

19 |

An error occurred while processing your request.

20 | 21 | @if (Model.ShowRequestId) 22 | { 23 |

24 | Request ID: @Model.RequestId 25 |

26 | } 27 | 28 |

Development Mode

29 |

30 | Swapping to the Development environment displays detailed information about the error that occurred. 31 |

32 |

33 | The Development environment shouldn't be enabled for deployed applications. 34 | It can result in displaying sensitive information from exceptions to end users. 35 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 36 | and restarting the app. 37 |

38 |
39 |
40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /BlazorGridStackDemo/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.Mvc.RazorPages; 3 | using System.Diagnostics; 4 | 5 | namespace BlazorGridStackDemo.Pages 6 | { 7 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 8 | [IgnoreAntiforgeryToken] 9 | public class ErrorModel : PageModel 10 | { 11 | public string? RequestId { get; set; } 12 | 13 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 14 | 15 | private readonly ILogger _logger; 16 | 17 | public ErrorModel(ILogger logger) 18 | { 19 | _logger = logger; 20 | } 21 | 22 | public void OnGet() 23 | { 24 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /BlazorGridStackDemo/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @using BlazorGridStack.Models 3 | 4 | BlazorGridStack Demo 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 |
17 | 18 | @code { 19 | BlazorGridStackBody? Grid; 20 | 21 | public void AddElementClicked() 22 | { 23 | Grid.AddWidget(new BlazorGridStackWidgetOptions 24 | { 25 | W = 1, 26 | H = 1 27 | }); 28 | } 29 | 30 | public void CompactClicked() 31 | { 32 | Grid.Compact(); 33 | } 34 | 35 | public void DisableClicked() 36 | { 37 | Grid.Disable(); 38 | } 39 | 40 | public void EnableClicked() 41 | { 42 | Grid.Enable(); 43 | } 44 | 45 | public void ClearClicked() 46 | { 47 | Grid.RemoveAll(); 48 | } 49 | 50 | public async void GetItemsClicked() 51 | { 52 | var gridItems = await Grid.GetGridItems(); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /BlazorGridStackDemo/Pages/_Host.cshtml: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @namespace BlazorGridStackServerModeDemo.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @{ 5 | Layout = "_Layout"; 6 | } 7 | 8 | 9 | -------------------------------------------------------------------------------- /BlazorGridStackDemo/Pages/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Components.Web 2 | @namespace BlazorGridStackDemo.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | @RenderBody() 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /BlazorGridStackDemo/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using Microsoft.AspNetCore.Components.Web; 3 | 4 | var builder = WebApplication.CreateBuilder(args); 5 | 6 | // Add services to the container. 7 | builder.Services.AddRazorPages(); 8 | builder.Services.AddServerSideBlazor(); 9 | 10 | var app = builder.Build(); 11 | 12 | // Configure the HTTP request pipeline. 13 | if (!app.Environment.IsDevelopment()) 14 | { 15 | app.UseExceptionHandler("/Error"); 16 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. 17 | app.UseHsts(); 18 | } 19 | 20 | app.UseHttpsRedirection(); 21 | 22 | app.UseStaticFiles(); 23 | 24 | app.UseRouting(); 25 | 26 | app.MapBlazorHub(); 27 | app.MapFallbackToPage("/_Host"); 28 | 29 | app.Run(); 30 | -------------------------------------------------------------------------------- /BlazorGridStackDemo/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:61942", 7 | "sslPort": 44393 8 | } 9 | }, 10 | "profiles": { 11 | "BlazorGridStackDemo": { 12 | "commandName": "Project", 13 | "dotnetRunMessages": true, 14 | "launchBrowser": true, 15 | "applicationUrl": "https://localhost:7283;http://localhost:5283", 16 | "environmentVariables": { 17 | "ASPNETCORE_ENVIRONMENT": "Development" 18 | } 19 | }, 20 | "IIS Express": { 21 | "commandName": "IISExpress", 22 | "launchBrowser": true, 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /BlazorGridStackDemo/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | BlazorGridStack Demo 4 | 5 |
6 | @Body 7 |
-------------------------------------------------------------------------------- /BlazorGridStackDemo/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.AspNetCore.Components.Web.Virtualization 8 | @using Microsoft.JSInterop 9 | @using BlazorGridStackServerModeDemo 10 | @using BlazorGridStackServerModeDemo.Shared 11 | @using BlazorGridStack -------------------------------------------------------------------------------- /BlazorGridStackDemo/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft.AspNetCore": "Warning" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /BlazorGridStackDemo/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /BlazorGridStackDemo/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | .grid-stack { 2 | background: lightgoldenrodyellow; 3 | } 4 | 5 | .grid-stack-item-content { 6 | color: #2c3e50; 7 | text-align: center; 8 | background-color: #18bc9c; 9 | } 10 | 11 | .remove { 12 | width: 300px; 13 | height: 300px; 14 | background-color: red; 15 | } -------------------------------------------------------------------------------- /BlazorGridStackDemo/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/decelis/BlazorGridStack/a27fdcb5d7382dd0e7d76e1d3faa9a2dbbe43238/BlazorGridStackDemo/wwwroot/favicon.ico -------------------------------------------------------------------------------- /BlazorGridStackWebAssemblyDemo/App.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | Not found 8 | 9 |

Sorry, there's nothing at this address.

10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /BlazorGridStackWebAssemblyDemo/BlazorGridStackWebAssemblyDemo.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /BlazorGridStackWebAssemblyDemo/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 |
4 | @Body 5 |
6 | -------------------------------------------------------------------------------- /BlazorGridStackWebAssemblyDemo/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @using BlazorGridStack 2 | @using BlazorGridStack.Models 3 | @page "/" 4 | 5 | BlazorGridStack Demo 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | @code { 18 | BlazorGridStackBody? Grid; 19 | 20 | public void AddElementClicked() 21 | { 22 | Grid.AddWidget(new BlazorGridStackWidgetOptions 23 | { 24 | W = 1, 25 | H = 1 26 | }); 27 | } 28 | 29 | public void CompactClicked() 30 | { 31 | Grid.Compact(); 32 | } 33 | 34 | public void DisableClicked() 35 | { 36 | Grid.Disable(); 37 | } 38 | 39 | public void EnableClicked() 40 | { 41 | Grid.Enable(); 42 | } 43 | 44 | public void ClearClicked() 45 | { 46 | Grid.RemoveAll(); 47 | } 48 | 49 | public async void GetItemsClicked() 50 | { 51 | var gridItems = await Grid.GetGridItems(); 52 | } 53 | } -------------------------------------------------------------------------------- /BlazorGridStackWebAssemblyDemo/Program.cs: -------------------------------------------------------------------------------- 1 | using BlazorGridStackWebAssemblyDemo; 2 | using Microsoft.AspNetCore.Components.Web; 3 | using Microsoft.AspNetCore.Components.WebAssembly.Hosting; 4 | 5 | var builder = WebAssemblyHostBuilder.CreateDefault(args); 6 | builder.RootComponents.Add("#app"); 7 | builder.RootComponents.Add("head::after"); 8 | 9 | builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); 10 | 11 | await builder.Build().RunAsync(); 12 | -------------------------------------------------------------------------------- /BlazorGridStackWebAssemblyDemo/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "iisExpress": { 4 | "applicationUrl": "http://localhost:62218", 5 | "sslPort": 44319 6 | } 7 | }, 8 | "profiles": { 9 | "http": { 10 | "commandName": "Project", 11 | "dotnetRunMessages": true, 12 | "launchBrowser": true, 13 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 14 | "applicationUrl": "http://localhost:5249", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "https": { 20 | "commandName": "Project", 21 | "dotnetRunMessages": true, 22 | "launchBrowser": true, 23 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 24 | "applicationUrl": "https://localhost:7113;http://localhost:5249", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | }, 29 | "IIS Express": { 30 | "commandName": "IISExpress", 31 | "launchBrowser": true, 32 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 33 | "environmentVariables": { 34 | "ASPNETCORE_ENVIRONMENT": "Development" 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /BlazorGridStackWebAssemblyDemo/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Net.Http.Json 3 | @using Microsoft.AspNetCore.Components.Routing 4 | @using Microsoft.AspNetCore.Components.Web 5 | @using Microsoft.AspNetCore.Components.WebAssembly.Http 6 | @using Microsoft.JSInterop 7 | @using BlazorGridStackWebAssemblyDemo 8 | -------------------------------------------------------------------------------- /BlazorGridStackWebAssemblyDemo/wwwroot/css/app.css: -------------------------------------------------------------------------------- 1 | h1:focus { 2 | outline: none; 3 | } 4 | 5 | #blazor-error-ui { 6 | background: lightyellow; 7 | bottom: 0; 8 | box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); 9 | display: none; 10 | left: 0; 11 | padding: 0.6rem 1.25rem 0.7rem 1.25rem; 12 | position: fixed; 13 | width: 100%; 14 | z-index: 1000; 15 | } 16 | 17 | #blazor-error-ui .dismiss { 18 | cursor: pointer; 19 | position: absolute; 20 | right: 0.75rem; 21 | top: 0.5rem; 22 | } 23 | 24 | .blazor-error-boundary { 25 | background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121; 26 | padding: 1rem 1rem 1rem 3.7rem; 27 | color: white; 28 | } 29 | 30 | .blazor-error-boundary::after { 31 | content: "An error has occurred." 32 | } 33 | 34 | .grid-stack { 35 | background: lightgoldenrodyellow; 36 | } 37 | 38 | .grid-stack-item-content { 39 | color: #2c3e50; 40 | text-align: center; 41 | background-color: #18bc9c; 42 | } 43 | 44 | .remove { 45 | width: 300px; 46 | height: 300px; 47 | background-color: red; 48 | } -------------------------------------------------------------------------------- /BlazorGridStackWebAssemblyDemo/wwwroot/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BlazorGridStackWebAssemblyDemo 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 |
Loading...
16 | 17 |
18 | An unhandled error has occurred. 19 | Reload 20 | 🗙 21 |
22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 decelis 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BlazorGridStack 2 | 3 | gridstack.js port for Blazor 4 | Compatible with Blazor **server mode** and **WASM** 5 | 6 | 7 | ## Nugget package 8 | 9 | https://www.nuget.org/packages/BlazorGridStack/1.0.0 10 | 11 | 12 | ## Installation 13 | 14 | Install the nugget package through nugget manager or 15 | 16 | ``` 17 | dotnet add package MudBlazor 18 | ``` 19 | 20 | Import the following 21 | 22 | ```razor 23 | @using BlazorGridStack 24 | @using BlazorGridStack.Models 25 | ``` 26 | 27 | then simply add the markup shown in the **Usage/Examples** section. Javascript and css files are loaded automatically. 28 | 29 | ## Usage/Examples 30 | 31 | Widgets as markup: 32 | 33 | ```razor 34 | 35 | 36 | 37 | ``` 38 | 39 | Widgets on runtime 40 | ```razor 41 | 42 | 43 | 44 | @code { 45 | BlazorGridStackBody? Grid; 46 | 47 | public void AddElementClicked() 48 | { 49 | Grid.AddWidget(new BlazorGridStackWidgetOptions 50 | { 51 | W = 1, 52 | H = 1 53 | }); 54 | } 55 | } 56 | ``` 57 | ## API Reference 58 | 59 | BlazorGridStack uses the same event and method names as gridstack.js (in UpperCammelCase), described in their API: 60 | https://github.com/gridstack/gridstack.js/tree/master/doc 61 | 62 | ### exceptions and limitations 63 | 64 | - Events and Methods that return a widget DOM element, will return objects of the type **BlazorGridWidget**. 65 | - Methods wich require a widget DOM element, will accept an ID instead. --------------------------------------------------------------------------------