From 98c3a3a37eb5b68e52ea40c11f397b1316a90b5e Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Sat, 14 Mar 2020 07:45:01 -0700 Subject: [PATCH] TS: working demos * removed a bunch more jquery code in main file (more drag&drop will need to move out) * all the demos are finally running, found a bunch of issues of DOM vs jquery ->all but knockout which always inserts at (0,0) now -> RTL works a little better now, but still broken (hasn't worked in a while) * public API that take string | HTMLElement will now handle list with selector * using 'let' everywhere since not real global const TODO: fix lint and test cases next... --- .eslintrc.js | 3 +- README.md | 2 +- demo/advance.html | 5 +- demo/anijs.html | 5 +- demo/column.html | 6 +- demo/float.html | 13 +- demo/knockout.html | 6 +- demo/nested.html | 7 +- demo/responsive.html | 6 +- demo/right-to-left(rtl).html | 6 +- demo/serialization.html | 6 +- demo/two.html | 6 +- doc/CHANGES.md | 3 +- doc/README.md | 2 +- spec/gridstack-spec.js | 18 +- src/gridstack-dragdrop-plugin.ts | 14 +- src/gridstack-engine.ts | 76 +-- src/gridstack.ts | 534 ++++++++++++---------- src/jqueryui-gridstack-dragdrop-plugin.ts | 26 +- src/types.ts | 1 - src/utils.ts | 38 +- tsconfig.json | 18 - yarn.lock | 12 +- 23 files changed, 397 insertions(+), 416 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index e62997fcf..76b691f34 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -16,6 +16,7 @@ module.exports = { rules: { 'indent': ['error', 2], 'max-len': ['error', 180], - 'no-trailing-spaces': 'error' + 'no-trailing-spaces': 'error', + 'prefer-const': 0 } }; diff --git a/README.md b/README.md index a8df5ad0e..b9b9101e2 100644 --- a/README.md +++ b/README.md @@ -162,7 +162,7 @@ GridStack.init( {column: N} ); 2) include `gridstack-extra.css` if **N < 12** (else custom CSS - see next). Without these, things will not render/work correctly. ```html - +
...
``` diff --git a/demo/advance.html b/demo/advance.html index ec71a386e..3bb6c31d9 100644 --- a/demo/advance.html +++ b/demo/advance.html @@ -13,10 +13,7 @@ - - - - +
@@ -30,6 +23,12 @@

Float grid demo

- - - - - +
diff --git a/demo/nested.html b/demo/nested.html index 17203189b..116f88485 100644 --- a/demo/nested.html +++ b/demo/nested.html @@ -7,12 +7,7 @@ Nested grids demo - - - - - - + - - - - - +
diff --git a/demo/serialization.html b/demo/serialization.html index f5f11031a..5fa56121f 100644 --- a/demo/serialization.html +++ b/demo/serialization.html @@ -7,11 +7,7 @@ Serialization demo - - - - - +
diff --git a/demo/two.html b/demo/two.html index da0c540dc..8c58335ff 100644 --- a/demo/two.html +++ b/demo/two.html @@ -9,11 +9,7 @@ - - - - - +