-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
typescript ->develop merge #1352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
another BIG, BIG change * converted all code to Typescript * initial bundling with webpack to `gridstack.all.js` for browser inclusion * added index.ts to include all modules and dependencies for build * part-2 of gridstack gridstack#1084 TODO: * modified float.html to test new code. still not running (missing `GridStack` export) * need to use tsc to output for typescript native files ?
Typescript conversion
TS: fix obsoleteAttr() issue
Fix missing `mode` warning Replace `tslint` with `eslint`
Export global
TS: Replace some `jQuery`
* removed most JQ code in gridstack.ts, some harder parts remain.
* changed `.${val}` to just '.'+val to make it easier to search for $ replacement
* continued gridstack#1084
Note: float.html finally loads for me and add widget works! BUT drag/drop is still broken...
TS: more jquery removal
TS: Fix lint command on Windows
* 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...
TS: working demos
* we now pass `yarn lint` stage * removed more jquery calls * `yarn test` is stuck with a 2min timeout ```cmd HeadlessChrome 80.0.3987 (Windows 10.0.0): Executed 0 of 106 SUCCESS (0 secs / 0 secs) HeadlessChrome 80.0.3987 (Windows 10.0.0) ERROR Disconnectedreconnect failed before timeout of 2000ms (ping timeout) HeadlessChrome 80.0.3987 (Windows 10.0.0): Executed 0 of 106 DISCONNECTED (32.002 secs / 0 secs) ``` * part of gridstack#1084
TS: lint fix and more jq removal
No more `$(el).children()`
TS: added `getGridItems()`
Add Typescript support for Karma
* copied over the latest bug fixes from develop. apparently I had missed some (row feature, etc..) * `addWidget(el, x, y, width, ...)` now obsolete but sitll supported warning * started 2.x readme section more gridstack#1084
TS: update to latest develop branch
* the karma test cases are now all working again (found some actual issues in new TS code) * most test changes are `let` vs `var` getSttribute() returning NULL instead of undefined and removing jquery calls * code coverage NOT working right now (need to figure how to test .ts files ?) * reverted karma.config.js for now (pre TS changes) more gridstack#1084
TS: karma test cases
* all methods now return at least `this` so they can be chainable if they don't return something specific * `staticGrid` no longer disable oneColumnMode
TS: return signature cleanup, bug fix
TS: develop -> typescript
renamed GridStackDragDropPlugin -> GridStackDD JQueryUIGridStackDragDropPlugin -> GridStackDDJQueryUI * gridstack.all.js is now generated (190k) optimized with map and works great * gridstack.js is also generated and complete without JQ anything and works great * jq + jqui are now generated as min with map and appears to be OK only thing remaining is to get gridstack-dd-jqueryui.js generated as stand alone file that could be imported. (webpack will bundle dependencies so I need separate rule OR get tsc to do that
TS: progress on bundling for build, renamed DD files
* more fix for gridstack#1286 changed method to load() (rather than restore()) * added a callback function in additon to boolean which default to true (will add/remove widgets by default)
TS: support callback for load()
* use webpack to bundle gridstack.all.js (all inclusive, works in browsers)
* use tsc to compile each .TS into ES6 modules
verified that you can now do this in a sample app
import { GridStack } from 'gridstack';
import 'gridstack/dist/gridstack.css';
var grid = GridStack.init();
TS v2.0 release candidate
good re-write of D&D with generic non jquery code. this fixes the following: * gridstack#1329 D&D wasn't working correctly in 2.0.0-rc went through entire code with fine comb. "had to change 'drop' signature to have 2 elements (original drag and helper) do handle both cases * gridstack#1102 we no longer make a copy when dragging between grids (just re-parent) so all actions and settings stay the same. Only time we make a copy is if dragging from an external toolbar and user has helper to clone item
TS: drag&drop fixes
* rename of internal _prepareElementsByNode() -> _prepareDragDropByNode() * more efficient node removal * fix to check for dropped element being there before we add drag&drop feedback (which is delayed)
2.0.0-rc2 release
* more fixed for gridstack#1286 * load() was not correctly clearing the HTML items, and calling removed callback * added sample text case * also fixed other use cases includes
TS: more fixed for load()
removeWidget() doc update
*make sure we remove drag&drop handler * reset el.gridstackNode before callback to let callee know it's going away. * Only remove if not already done.
TS: tweaks to 'removed' callback
TS: fixed package.json to refer to main module file
TS: 2.0.0-rc3 release
TS: rev 2.0.0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
develop (main branch) now has all the Typescript branch (soon to be delete) v2.0.0 release code
Checklist
yarn test)