{"_id":"table-dragger","_rev":"18-38cb61b1b76a27c582303e5a10dff332","name":"table-dragger","description":"Drag and sort columns and rows of table","dist-tags":{"latest":"2.0.5","next":"2.0.2"},"versions":{"1.0.0":{"name":"table-dragger","version":"1.0.0","description":"Drag and sort columns and rows of table","author":{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"},"main":"dist/table-dragger.js","repository":{"type":"git","url":"git+https://github.com/sindu12jun/SortableTable.git"},"homepage":"https://sindu12jun.github.io/SortableTable/","directories":{"src":"src/"},"files":["LICENSE","README.md","CHANGELOG.md","src","dist"],"keywords":["dom","table","drag","sort","row","column"],"scripts":{"build":"webpack --progress --hide-modules --config  webpack.build.min.js && webpack --progress --hide-modules --config  webpack.build.js","builddocs":"webpack --progress --hide-modules && set NODE_ENV=production webpack --progress --hide-modules","docs":"webpack-dev-server --inline --hot --quiet","gpages":"gh-pages -d build","postversion":"git push && git push --tags","version":"npm run build && git add -A dist"},"dependencies":{"babel-polyfill":"^6.16.0","dragula":"git+https://github.com/sindu12jun/dragula.git"},"devDependencies":{"autoprefixer":"^6.4.0","babel-core":"^6.0.0","babel-eslint":"^7.0.0","babel-loader":"^6.0.0","babel-plugin-transform-runtime":"^6.0.0","babel-preset-es2015":"^6.0.0","babel-preset-stage-2":"^6.0.0","babel-register":"^6.0.0","chai":"^3.5.0","chalk":"^1.1.3","chromedriver":"^2.21.2","connect-history-api-fallback":"^1.1.0","cross-spawn":"^4.0.2","css-loader":"^0.26.1","eslint":"^3.7.1","eslint-config-airbnb-base":"^8.0.0","eslint-friendly-formatter":"^2.0.5","eslint-import-resolver-webpack":"^0.6.0","eslint-loader":"^1.5.0","eslint-plugin-html":"^1.3.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jasmine":"^2.1.0","eventsource-polyfill":"^0.9.6","express":"^4.13.3","extract-text-webpack-plugin":"^1.0.1","file-loader":"^0.9.0","function-bind":"^1.0.2","gh-pages":"^0.12.0","html-webpack-plugin":"^2.8.1","http-proxy-middleware":"^0.17.2","inject-loader":"^2.0.1","isparta-loader":"^2.0.0","jasmine":"^2.5.2","jasmine-core":"^2.5.2","json-loader":"^0.5.4","karma":"^1.3.0","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.1.1","karma-jasmine":"^1.0.2","karma-mocha":"^1.2.0","karma-phantomjs-launcher":"^1.0.0","karma-sinon-chai":"^1.2.0","karma-sourcemap-loader":"^0.3.7","karma-spec-reporter":"0.0.26","karma-webpack":"^1.7.0","lolex":"^1.4.0","mocha":"^3.1.0","nightwatch":"^0.9.9","opn":"^4.0.2","ora":"^0.3.0","phantomjs-prebuilt":"2.1.7","selenium-server":"^3.0.1","semver":"^5.3.0","shelljs":"^0.7.4","sinon":"^1.17.3","sinon-chai":"^2.8.0","webpack":"^1.13.2","webpack-dev-middleware":"^1.8.3","webpack-hot-middleware":"^2.12.2","webpack-merge":"^0.14.1","style-loader":"^0.13.1"},"bugs":{"url":"https://github.com/sindu12jun/table-dragger/issues"},"license":"MIT","gitHead":"27cab7212486438f2391eb6a3c6eed86c14ba0ef","_id":"table-dragger@1.0.0","_shasum":"d4d5009e1babb44b6c58d07d15585e1caaa37710","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.2.1","_npmUser":{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"},"dist":{"shasum":"d4d5009e1babb44b6c58d07d15585e1caaa37710","tarball":"https://registry.npmjs.org/table-dragger/-/table-dragger-1.0.0.tgz","integrity":"sha512-2QcGohwqqxkKnF6MgQc2qbDfbC9urdUxZAVRSx3E+qxBkL6FwprLUH7B+/dg3kBwxereYRNAgIlHCLQWB/M47w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFqhFqZiyiXs2WEl1t5IVDzS7DoyCH9vcuWz2HjhS4GeAiEA9Mg2WlOq4XaZ9hls74D/ZXQKSOSVc85fqhmdSomOrXI="}]},"maintainers":[{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/table-dragger-1.0.0.tgz_1481803415824_0.4652827379759401"}},"1.0.1":{"name":"table-dragger","version":"1.0.1","description":"Drag and sort columns and rows of table","author":{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"},"main":"dist/table-dragger.js","repository":{"type":"git","url":"git+https://github.com/sindu12jun/SortableTable.git"},"homepage":"https://sindu12jun.github.io/table-dragger/","directories":{"src":"src/"},"files":["LICENSE","README.md","CHANGELOG.md","src","dist"],"keywords":["dom","table","drag","sort","row","column"],"scripts":{"build":"webpack --progress --hide-modules --config  webpack.build.min.js && webpack --progress --hide-modules --config  webpack.build.js","builddocs":"webpack --progress --hide-modules && set NODE_ENV=production webpack --progress --hide-modules","docs":"webpack-dev-server --inline --hot --quiet","gpages":"gh-pages -d build","postversion":"git push && git push --tags","version":"npm run build && git add -A dist"},"dependencies":{"babel-runtime":"^6.20.0","crossvent":"^1.5.5","dragula-with-animation":"^3.7.2"},"devDependencies":{"autoprefixer":"^6.4.0","babel-core":"^6.0.0","babel-eslint":"^7.0.0","babel-loader":"^6.0.0","babel-plugin-transform-runtime":"^6.0.0","babel-preset-es2015":"^6.0.0","babel-preset-stage-2":"^6.0.0","babel-register":"^6.0.0","chai":"^3.5.0","chalk":"^1.1.3","chromedriver":"^2.21.2","connect-history-api-fallback":"^1.1.0","cross-spawn":"^4.0.2","css-loader":"^0.26.1","eslint":"^3.7.1","eslint-config-airbnb-base":"^8.0.0","eslint-friendly-formatter":"^2.0.5","eslint-import-resolver-webpack":"^0.6.0","eslint-loader":"^1.5.0","eslint-plugin-html":"^1.3.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jasmine":"^2.1.0","eventsource-polyfill":"^0.9.6","express":"^4.13.3","extract-text-webpack-plugin":"^1.0.1","file-loader":"^0.9.0","function-bind":"^1.0.2","gh-pages":"^0.12.0","html-webpack-plugin":"^2.8.1","http-proxy-middleware":"^0.17.2","inject-loader":"^2.0.1","isparta-loader":"^2.0.0","jasmine":"^2.5.2","jasmine-core":"^2.5.2","json-loader":"^0.5.4","karma":"^1.3.0","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.1.1","karma-jasmine":"^1.0.2","karma-mocha":"^1.2.0","karma-phantomjs-launcher":"^1.0.0","karma-sinon-chai":"^1.2.0","karma-sourcemap-loader":"^0.3.7","karma-spec-reporter":"0.0.26","karma-webpack":"^1.7.0","lolex":"^1.4.0","mocha":"^3.1.0","nightwatch":"^0.9.9","opn":"^4.0.2","ora":"^0.3.0","phantomjs-prebuilt":"2.1.7","selenium-server":"^3.0.1","semver":"^5.3.0","shelljs":"^0.7.4","sinon":"^1.17.3","sinon-chai":"^2.8.0","webpack":"^1.13.2","webpack-dev-middleware":"^1.8.3","webpack-hot-middleware":"^2.12.2","webpack-merge":"^0.14.1","style-loader":"^0.13.1"},"bugs":{"url":"https://github.com/sindu12jun/table-dragger/issues"},"license":"MIT","gitHead":"de89a5db4714fa75107ec2826d8370007df95641","_id":"table-dragger@1.0.1","_shasum":"37f7ae04bb7a6f8afea1e9b5112c289c63efacfa","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.2.1","_npmUser":{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"},"dist":{"shasum":"37f7ae04bb7a6f8afea1e9b5112c289c63efacfa","tarball":"https://registry.npmjs.org/table-dragger/-/table-dragger-1.0.1.tgz","integrity":"sha512-pogKNAPlZtkmDab2dQkdxq2ol+OsYVctEanPB0P805+AFW8UuhlFRUgu4KGZR641dTPffFMAiDp1bCYo+T/Lvw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG8M172SDwsezYFp/m7m2pDuDDbWsgGeUGolKW8j/4DsAiBEsnG82iFUL2HmVQd5Pk4JtHzJJDoMU2h4r565/Hy40w=="}]},"maintainers":[{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/table-dragger-1.0.1.tgz_1482385497432_0.7120552673004568"}},"1.0.2":{"name":"table-dragger","version":"1.0.2","description":"Drag and sort columns and rows of table","author":{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"},"main":"dist/table-dragger.js","repository":{"type":"git","url":"git+https://github.com/sindu12jun/SortableTable.git"},"homepage":"https://sindu12jun.github.io/table-dragger/","directories":{"src":"src/"},"files":["LICENSE","README.md","CHANGELOG.md","src","dist"],"keywords":["dom","table","drag","sort","row","column"],"scripts":{"build":"webpack --progress --hide-modules --config  webpack.build.min.js && webpack --progress --hide-modules --config  webpack.build.js","builddocs":"webpack --progress --hide-modules && set NODE_ENV=production webpack --progress --hide-modules","docs":"webpack-dev-server --host 0.0.0.0 --port 9090 --inline --hot --quiet","gpages":"gh-pages -d build","postversion":"git push && git push --tags","version":"npm run build && git add -A dist"},"dependencies":{"babel-runtime":"^6.20.0","crossvent":"^1.5.5","dragula-with-animation":"^3.7.2","rx":"^4.1.0"},"devDependencies":{"autoprefixer":"^6.4.0","babel-core":"^6.0.0","babel-eslint":"^7.0.0","babel-loader":"^6.0.0","babel-plugin-transform-runtime":"^6.0.0","babel-preset-es2015":"^6.0.0","babel-preset-stage-2":"^6.0.0","babel-register":"^6.0.0","chai":"^3.5.0","chalk":"^1.1.3","chromedriver":"^2.21.2","connect-history-api-fallback":"^1.1.0","cross-spawn":"^4.0.2","css-loader":"^0.26.1","eslint":"^3.7.1","eslint-config-airbnb-base":"^8.0.0","eslint-friendly-formatter":"^2.0.5","eslint-import-resolver-webpack":"^0.6.0","eslint-loader":"^1.5.0","eslint-plugin-html":"^1.3.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jasmine":"^2.1.0","eventsource-polyfill":"^0.9.6","express":"^4.13.3","extract-text-webpack-plugin":"^1.0.1","file-loader":"^0.9.0","function-bind":"^1.0.2","gh-pages":"^0.12.0","html-webpack-plugin":"^2.8.1","http-proxy-middleware":"^0.17.2","inject-loader":"^2.0.1","isparta-loader":"^2.0.0","jasmine":"^2.5.2","jasmine-core":"^2.5.2","json-loader":"^0.5.4","karma":"^1.3.0","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.1.1","karma-jasmine":"^1.0.2","karma-mocha":"^1.2.0","karma-phantomjs-launcher":"^1.0.0","karma-sinon-chai":"^1.2.0","karma-sourcemap-loader":"^0.3.7","karma-spec-reporter":"0.0.26","karma-webpack":"^1.7.0","lolex":"^1.4.0","mocha":"^3.1.0","nightwatch":"^0.9.9","opn":"^4.0.2","ora":"^0.3.0","phantomjs-prebuilt":"2.1.7","selenium-server":"^3.0.1","semver":"^5.3.0","shelljs":"^0.7.4","sinon":"^1.17.3","sinon-chai":"^2.8.0","webpack":"^1.13.2","webpack-dev-middleware":"^1.8.3","webpack-hot-middleware":"^2.12.2","webpack-merge":"^0.14.1","style-loader":"^0.13.1"},"bugs":{"url":"https://github.com/sindu12jun/table-dragger/issues"},"license":"MIT","gitHead":"7336fded58776a1994ea8e7c1a2efc1c45c3be34","_id":"table-dragger@1.0.2","_shasum":"981f46c62fd2899b3fc5e644055ea72831949707","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.0","_npmUser":{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"},"dist":{"shasum":"981f46c62fd2899b3fc5e644055ea72831949707","tarball":"https://registry.npmjs.org/table-dragger/-/table-dragger-1.0.2.tgz","integrity":"sha512-Lr+hCxi7R8VllityTVEqGPf88cXIcS0MmAlagEveRf2KqyNf0xuKrIqII3aajlWPm38c27LK4uQXytwvNiWCpw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFhQIWsBEg9AS9cYnm7USCjRDl1qIzn3UEMCSq0O7GWfAiAXq3mehbghtZ0VwF32K364sEWpPr4SF+3gqpRZgV4W8g=="}]},"maintainers":[{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/table-dragger-1.0.2.tgz_1505471394515_0.7811224164906889"}},"1.0.3":{"name":"table-dragger","version":"1.0.3","description":"Drag and sort columns and rows of table","author":{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"},"main":"dist/table-dragger.js","repository":{"type":"git","url":"git+https://github.com/sindu12jun/SortableTable.git"},"homepage":"https://sindu12jun.github.io/table-dragger/","directories":{"src":"src/"},"keywords":["dom","table","drag","sort","row","column"],"scripts":{"build":"webpack --progress --hide-modules --config  webpack.build.min.js && webpack --progress --hide-modules --config  webpack.build.js","builddocs":"webpack --progress --hide-modules && set NODE_ENV=production webpack --progress --hide-modules","docs":"webpack-dev-server --inline --hot --quiet","gpages":"gh-pages -d build","postversion":"git push && git push --tags","version":"npm run build && git add -A dist","test":"jest --watch"},"dependencies":{"babel-runtime":"^6.20.0","crossvent":"^1.5.5","dragula-with-animation":"^3.7.4"},"devDependencies":{"autoprefixer":"^6.4.0","babel-core":"^6.0.0","babel-eslint":"^7.0.0","babel-loader":"^6.0.0","babel-plugin-transform-runtime":"^6.0.0","babel-preset-es2015":"^6.0.0","babel-preset-stage-2":"^6.0.0","babel-register":"^6.0.0","connect-history-api-fallback":"^1.1.0","cross-spawn":"^4.0.2","css-loader":"^0.26.1","eslint":"^3.7.1","eslint-config-airbnb-base":"^8.0.0","eslint-friendly-formatter":"^2.0.5","eslint-import-resolver-webpack":"^0.6.0","eslint-loader":"^1.5.0","eslint-plugin-html":"^1.3.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jasmine":"^2.1.0","eventsource-polyfill":"^0.9.6","express":"^4.13.3","extract-text-webpack-plugin":"^1.0.1","file-loader":"^0.9.0","function-bind":"^1.0.2","gh-pages":"^0.12.0","html-webpack-plugin":"^2.8.1","http-proxy-middleware":"^0.17.2","inject-loader":"^2.0.1","isparta-loader":"^2.0.0","jasmine":"^2.5.2","jasmine-core":"^2.5.2","jest":"^23.6.0","json-loader":"^0.5.4","style-loader":"^0.13.1","webpack":"^1.13.2","webpack-dev-middleware":"^1.8.3","webpack-hot-middleware":"^2.12.2","webpack-merge":"^0.14.1"},"bugs":{"url":"https://github.com/sindu12jun/table-dragger/issues"},"license":"MIT","gitHead":"ddf181fbd30926ac77ef0a0e2614f8fe6ef728b0","_id":"table-dragger@1.0.3","_npmVersion":"6.4.1","_nodeVersion":"8.16.0","_npmUser":{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"},"dist":{"integrity":"sha512-9HpdZ6wRDRUIURE1nxOW37QBW5SrUAiILiDfahpgLNJUzjfKnoU3qShCiSRCyryuqi6t5VPFexXRZdoJSox6ew==","shasum":"dcc640214fd8afb7abdb54dfdf7ec045a7a9e379","tarball":"https://registry.npmjs.org/table-dragger/-/table-dragger-1.0.3.tgz","fileCount":15,"unpackedSize":404346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdViI3CRA9TVsSAnZWagAAwZEP/1TKkqtTTQdg5REtmm30\nveHKAHcl+qOqy9nTN+4PVxKsJXXbO0FUV34lCL3b+tAn/e1/KSfOSKo7tKUK\nwl0KQ/nCZSaD/btN9dABAqc2RrhPBE4cxiG+DZtHXZYB9FNZ0CDHoQk3NIi4\nNHF2I/sBIKeNct3ajVuitELqXdnCm4HlXcZus7g6C941GnH1u4ygfyWfb/sK\nYqi96vMI8FH0jWjLpKpfra2Qq4meTXMEQ8fCGhr3zsdmeiJets7NyfKay/+E\n9FBqVG47EOxdz61zCFnbtKISYanvDVAqRbeChOJapRb2/JTUUyg1Eyct59lI\nro5oQ53881k8uujP6DCdEw2iN4tXeWDabiEM8+fDjXDkT5Zaz1MwQDA459//\nM7Kv8VGMiqchgKyqD8TIha+L1YhXTDoAOFEnEsgU/lp20QQ74TprWRelaFH+\nCkWUs84wE9KEFC2Ao7tGfjJKKk8k+s1ordVDu1mWPhtjiRbj6cJgWehEUAC/\no6O0bJxhbfqjBLsTJ20oNpK/oteSVCRsG5bgjRfAYJ3iF1FDfO3qdZZgJcE5\nd8JTfS4kCJcYwguYT5f1PRV5nP+JpA1L1NukFCNDuSux97ESQtB2oNJJZugB\nxjBzxtT9fBAgBxlYBPku/2ghU/c2AwW7y4pypVrh8cgxihA1oRcFnbnedeh0\n8kSt\r\n=AGcI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5R+iJLDgEtNOgRCGbObqjlQ47pNUGib0Q3dta3uBNnAIhAKWmLo14KW5BtyQ1SCZc09/xNMC70q8QkoWwwUV20VXA"}]},"maintainers":[{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/table-dragger_1.0.3_1565925942822_0.7920491985914191"},"_hasShrinkwrap":false},"2.0.0":{"name":"table-dragger","version":"2.0.0","description":"Drag and sort columns and rows of table","main":"dist/table-dragger.js","scripts":{"build":"NODE_ENV=production webpack --config webpack/webpack.config.prod.js  --colors","start":"webpack-dev-server --inline --hot --open --config webpack/webpack.config.dev.js","e2e":"testcafe chrome test/e2e.test.js e2e","test":"jest test/unit.test.js --coverage && cat ./coverage/lcov.info | coveralls"},"repository":{"type":"git","url":"git+https://github.com/sindu12jun/table-dragger.git"},"keywords":["table","drag","sort","dnd"],"author":{"name":"sindu12jun"},"license":"MIT","bugs":{"url":"https://github.com/sindu12jun/table-dragger/issues"},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-proposal-class-properties":"^7.4.0","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/preset-env":"^7.4.2","babel-loader":"^8.0.5","chromedriver":"^76.0.0","clean-webpack-plugin":"^2.0.2","copy-webpack-plugin":"^5.0.3","coveralls":"^3.0.6","css-loader":"^3.0.0","eslint":"^5.16.0","eslint-loader":"^2.1.2","expect-puppeteer":"^4.3.0","html-webpack-plugin":"^4.0.0-beta.5","jest":"^24.8.0","jest-environment-puppeteer":"^4.3.0","jest-puppeteer":"^4.3.0","mini-css-extract-plugin":"^0.8.0","puppeteer":"^1.19.0","style-loader":"^0.23.1","webpack":"^4.29.6","webpack-cli":"^3.3.0","webpack-dev-server":"^3.2.1","webpack-merge":"^4.2.1"},"dependencies":{"@babel/polyfill":"^7.4.0","core-js":"^3.0.1","dragula-with-animation":"^3.7.4","ramda":"^0.26.1","rxjs":"^6.5.2"},"readme":"# table-dragger\n\n[![Build Status](https://travis-ci.org/sindu12jun/table-dragger.svg?branch=master)](https://travis-ci.org/sindu12jun/table-dragger)\n[![Coverage Status](https://coveralls.io/repos/github/sindu12jun/table-dragger/badge.svg?branch=master)](https://coveralls.io/github/sindu12jun/table-dragger?branch=master)\n[![Downloads](https://img.shields.io/npm/dw/table-dragger)](https://npmcharts.com/compare/table-dragger?minimal=true)\n[![Npm version](https://img.shields.io/github/package-json/v/sindu12jun/table-dragger)](https://www.npmjs.com/package/table-dragger)\n\n\n> Finally, you are able to drag and sort your table as you want.\n\n[![demo.gif][demoPic]][demo]\n\n# Demo\nTry out the [demo][demo]!\n\n# Inspiration\nTable-dragger is a minimalist plain Javascript library for building reorderable drag-and-drop table.\n\n# Features\n- Super easy to set up\n- cellspacing, cellpadding, col and colgroup in account\n- Able to sort columns or rows at the same time\n- Smooth animation when sort\n- No bloated dependencies\n- Touch events\n\n# Install\nYou can get it on npm.\n\n```shell\nnpm install table-dragger --save\n```\nor\n```html\n<script src=\"../node_modules/table-dragger/dist/table-dragger.min.js\"></script>\n```\n\n# Usage\n```\nimport tableDragger from 'table-dragger'\n\ntableDragger(el, options?)\n```\n```html\n<table id=\"table\">\n  <thead>\n  <tr>\n    <th class='handle'>header1</th>\n    <th class='handle'>header2</th>\n  </tr>\n  </thead>\n  <tbody>\n  <tr>\n    <td>conten1</td>\n    <td>conten2</td>\n  </tr>\n  </tbody>\n</table>\n```\n```js\nvar el = document.getElementById('table');\nvar dragger = tableDragger(el, {\n  mode: 'row',\n  dragHandler: '.handle',\n  onlyBody: true,\n});\ndragger.on('drop',function(from, to){\n  console(from);\n  console(to);\n});\n```\nAnd you could also not set any options, which defaults to drag with the default options.\n\nThe options are detailed below.\n\n#### `options.mode`\n- Setting `mode` to `column`, user drag and sort columns of table\n- Setting `mode` to `row`, user drag and sort rows of table\n- Setting `mode` to `free`, user drag rows or columns, depending on the direction of the mouse movement after tapping. Notice you have to specify `dragHandler` in `free` mode.\n\n#### `options.dragHandler`\n- `dragHandler` is drag handle selector within table\n- By default, when in `column` mode, `dragHandler` is the first row of table; in `row` mode, the first column.\n\n#### `options.onlyBody`\n- Setting `onlyBody` to `true` in `row` mode, user can only lift rows in `tbody`.\n\n# API\nThe `tableDragger` method returns a tiny object with a concise API. We'll refer to the API returned by `tableDragger` as `dragger`\n\n#### `dragger.on (Events)`\nThe `dragger` is an event emitter. The following events can be tracked using `dragger.on(type, listener)`:\n\nEvent Name | Listener Arguments               | Event Description\n-----------|----------------------------------|-------------------------------------------------------------------------------------\n`drag`     | `el, mode`                     | `el` is the origin table, `mode` is `column` or `row`, shows the mode user sort\n`drop`  | `oldIndex, newIndex, el, mode`                             | `oldIndex` is the index before sorting. `newIndex` is the index after sorting\n`shadowMove`  | `oldIndex, newIndex, el, mode`                             | trigger when column(row) is being lifted and moving into other column(row) place.\n`out`   | `el, mode`          | column(row) was dragged out of `el`, or dropped\n\n\n#### `dragger.dragging`\nThis property will be true whenever an element is being dragged.\n\n# License\nMIT\n\n[demo]: https://sindu12jun.github.io/table-dragger/\n[demoPic]: ./resources/dragger.gif\n","readmeFilename":"README.md","gitHead":"ef0bbd253648a26b2f3ed4f82b37d57776e43e40","homepage":"https://github.com/sindu12jun/table-dragger#readme","_id":"table-dragger@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.16.0","_npmUser":{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"},"dist":{"integrity":"sha512-8cL+kOzZQhxEhQitlwj9VTii7ROCJClodKyRweOFJhxw5Mk8euVT4MelksLZIA0jMUvbR8PXyKkEE8cXLDVc+g==","shasum":"a01e158c95a330586bcf98d21a5fb56ff5e0f3ba","tarball":"https://registry.npmjs.org/table-dragger/-/table-dragger-2.0.0.tgz","fileCount":41,"unpackedSize":962482,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdV7cQCRA9TVsSAnZWagAAVZsP/AlMl8YIJeQd0snpGGo3\nqDdbvSR538Ad7UsgQ7SNwO7eL6e5WuIqTuosL4L7+lNabW420p1S+l7Ggv/o\nUjZ7rpEZyKmKICDk6EjCuYBclchV76Z0E+xnvLDopm1qEHMHHptX20XRDkjd\ncHBVm6dAYR9W0L6QqiG24UrOLvm7ZcFec9BdscO9NVd8c0hZTBUlksp3zFxr\nM2rMK+9+8aiL6rlz7NhDpCsZSeVhzJwBtLowo/6p6Yn7kFPjwwI9x6xH3ygp\nl1KXyPW1i+udRxpXRWqVzP8wYiRwDLMhKMllag/b+MYmDRO2wIWf/anU2S7I\nv7buVoBJRp6/XSQTCmHknbiin1jU2XBV6gkVUACLUfMuPxecPz2wQ+9nbNoV\nlzs0Oa+brNETgRVPkjxSBT7w70Ncbk4ATyQsdHeFvUEurIc9lRbS+9Z50SQ9\nMThtQnkETJxA0mCjUc0JRNW5zIV7Vn1WBrBDH5kSHLvKXbdyF+zgpHI/KVUm\nnLkrz48oyjp0xOclcZ9BISazGBewy/a4mMUlEH5v9oiUNt+y/iP2NP3tpzcZ\nzcNomYReXeKN8L9AMhLjVOGwyriyGaltaNZ3tr/58eyu4e9TaeXZBNQBDegl\nvkOA81Zs59zPa/cFpDuzjq8aTkqxetpMbTvMNxlGChDH5mcMX/s9bwrpK+wV\nnJJv\r\n=+qDA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF4hxVowgOMRN7lE49mjhXgaBwB3nI1Tr/bSk1K3zYJDAiA6aYJSPnQz1ELhyYMX8bzgP8DqXfi6zT+H1WFvi8Dqqg=="}]},"maintainers":[{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/table-dragger_2.0.0_1566029583633_0.6583428462118273"},"_hasShrinkwrap":false},"2.0.1":{"name":"table-dragger","version":"2.0.1","description":"Drag and sort columns and rows of table","main":"dist/table-dragger.js","scripts":{"build":"NODE_ENV=production webpack --config webpack/webpack.config.prod.js  --colors","start":"webpack-dev-server --inline --hot --open --config webpack/webpack.config.dev.js","e2e":"testcafe chrome test/e2e.test.js e2e","test":"jest test/unit.test.js --coverage && cat ./coverage/lcov.info | coveralls"},"repository":{"type":"git","url":"git+https://github.com/sindu12jun/table-dragger.git"},"keywords":["table","drag","sort","dnd"],"author":{"name":"sindu12jun"},"license":"MIT","bugs":{"url":"https://github.com/sindu12jun/table-dragger/issues"},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-proposal-class-properties":"^7.4.0","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/preset-env":"^7.4.2","babel-loader":"^8.0.5","chromedriver":"^76.0.0","clean-webpack-plugin":"^2.0.2","copy-webpack-plugin":"^5.0.3","coveralls":"^3.0.6","css-loader":"^3.0.0","eslint":"^5.16.0","eslint-loader":"^2.1.2","expect-puppeteer":"^4.3.0","html-webpack-plugin":"^4.0.0-beta.5","jest":"^24.8.0","jest-environment-puppeteer":"^4.3.0","jest-puppeteer":"^4.3.0","mini-css-extract-plugin":"^0.8.0","puppeteer":"^1.19.0","style-loader":"^0.23.1","webpack":"^4.29.6","webpack-cli":"^3.3.0","webpack-dev-server":"^3.2.1","webpack-merge":"^4.2.1"},"dependencies":{"@babel/polyfill":"^7.4.0","core-js":"^3.0.1","dragula-with-animation":"^3.7.4","ramda":"^0.26.1","rxjs":"^6.5.2"},"gitHead":"8e4d164f89a9cf213eab8cc6c3f60b4e9b3bfa00","homepage":"https://github.com/sindu12jun/table-dragger#readme","_id":"table-dragger@2.0.1","_npmVersion":"6.4.1","_nodeVersion":"8.16.0","_npmUser":{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"},"dist":{"integrity":"sha512-mcrkrnqNhoRk4IWDUzFpNTaO1t/nNJXpIGP5WCAaCF08uhg4Exzsfgu1LG57I/zso9b8ZUficTyZyYJpGp0C8g==","shasum":"c74841764bd7b1501f6c73f131d554f0234fc66a","tarball":"https://registry.npmjs.org/table-dragger/-/table-dragger-2.0.1.tgz","fileCount":41,"unpackedSize":963242,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdV7wiCRA9TVsSAnZWagAAdx8P/j+0MaCfctV46HtYKVyP\nWHI9cyfIsXiRFt9cNFnnQeIDctZWFpZlyWr9MHYLhW2W4VTJkXXd4KquvNxu\n6ptTOUSSXxYfLdzTxuBad/pm9zzaruowlERAP1uomfr27WZveSacJdovMOGg\n8LUKrOWkkP5WnWw3b/tPPjUSAWIRdqMjWY6f1mI8k6c/izehcnmDPCi/3Maf\nUy4qGteAgwlBMOovipZtvPUn5/m86wQu5Fj5IxUlG8549cCGgZRPNO/0T21W\nTKB+nHWVqLrOInINeZ6beZI8b33zZE4/5l41K3CWFkAuzkbcqjsOtTtsC2fg\nGyQxGS/xxD2dyCUxYoiU1qzrOfxsCXnyQI7+N9v/WkBrVk4hsED0FdR+CkMu\nkikuuBTFDTe53TSptD70DuDfRW+dENyUMjMyBjXjO+am1A/ZZH0VlW5i1fLD\nHlgIdla5CNTTaFYYjJvSsckvn1h189C6W1J/W0S4rQ/y8bD21oQ9fySMvKNp\nFnEIjIWBb07lA8MBwktNvHD7zWxHuvjKN7em46OA16rVfjf2lFU7AALcJkS/\nEwx9516LtdFHGzRr6A2k8qAGJRk6AfEiUOQb4oT/QnAysrSLxqjHJjI2QdM2\nxfgtcv2z9OqS43+oG7fl+7v0eBQvdCUnanY2DDYe800x4h/C/xJkbxPWI+0R\nqIRY\r\n=d95U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHMU0Izs/+nxmt3UM6uoJgI+f94lMBcCiMI6sP/trji9AiEAoE4geAmFebFbZug49aS6yNa4W126ENfzpZzny0Sa2FE="}]},"maintainers":[{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/table-dragger_2.0.1_1566030882178_0.3481632581121543"},"_hasShrinkwrap":false},"2.0.2":{"name":"table-dragger","version":"2.0.2","description":"Drag and sort columns and rows of table","main":"dist/table-dragger.js","scripts":{"build":"NODE_ENV=production webpack --config webpack/webpack.config.prod.js  --colors","start":"webpack-dev-server --inline --hot --open --config webpack/webpack.config.dev.js","e2e":"testcafe chrome test/e2e.test.js e2e","test":"jest test/unit.test.js --coverage && cat ./coverage/lcov.info | coveralls"},"repository":{"type":"git","url":"git+https://github.com/sindu12jun/table-dragger.git"},"keywords":["table","drag","sort","dnd"],"author":{"name":"sindu12jun"},"license":"MIT","bugs":{"url":"https://github.com/sindu12jun/table-dragger/issues"},"devDependencies":{"@babel/core":"^7.4.0","@babel/plugin-proposal-class-properties":"^7.4.0","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/preset-env":"^7.4.2","babel-loader":"^8.0.5","chromedriver":"^76.0.0","clean-webpack-plugin":"^2.0.2","copy-webpack-plugin":"^5.0.3","coveralls":"^3.0.6","css-loader":"^3.0.0","eslint":"^5.16.0","eslint-loader":"^2.1.2","expect-puppeteer":"^4.3.0","html-webpack-plugin":"^4.0.0-beta.5","jest":"^24.8.0","jest-environment-puppeteer":"^4.3.0","jest-puppeteer":"^4.3.0","mini-css-extract-plugin":"^0.8.0","puppeteer":"^1.19.0","style-loader":"^0.23.1","webpack":"^4.29.6","webpack-cli":"^3.3.0","webpack-dev-server":"^3.2.1","webpack-merge":"^4.2.1"},"dependencies":{"@babel/polyfill":"^7.4.0","core-js":"^3.0.1","dragula-with-animation":"^3.7.4","ramda":"^0.26.1","rxjs":"^6.5.2"},"readme":"# table-dragger\n\n[![Build Status](https://travis-ci.org/sindu12jun/table-dragger.svg?branch=master)](https://travis-ci.org/sindu12jun/table-dragger)\n[![Coverage Status](https://coveralls.io/repos/github/sindu12jun/table-dragger/badge.svg?branch=master)](https://coveralls.io/github/sindu12jun/table-dragger?branch=master)\n[![Downloads](https://img.shields.io/npm/dw/table-dragger)](https://npmcharts.com/compare/table-dragger?minimal=true)\n[![Npm version](https://img.shields.io/github/package-json/v/sindu12jun/table-dragger)](https://www.npmjs.com/package/table-dragger)\n\n\n> Finally, you are able to drag and sort your table as you want.\n\n[![demo.gif][demoPic]][demo]\n\n# Demo\nTry out the [demo][demo]!\n\n# Inspiration\nTable-dragger is a minimalist plain Javascript library for building reorderable drag-and-drop table.\n\n# Features\n- Super easy to set up\n- Able to sort columns or rows at the same time\n- Smooth animation when sort\n- No bloated dependencies\n- Touch events\n\n# Install\nYou can get it on npm.\n\n```shell\nnpm install table-dragger --save\n```\nor\n```html\n<script src=\"../node_modules/table-dragger/dist/table-dragger.min.js\"></script>\n```\n\nIf you want to try the unstable version under developing\n```shell\nnpm install table-dragger@next --save\n```\n\n# Usage\n```\nimport tableDragger from 'table-dragger'\n\ntableDragger(el, options?)\n```\n```html\n<table id=\"table\">\n  <thead>\n  <tr>\n    <th class='handle'>header1</th>\n    <th class='handle'>header2</th>\n  </tr>\n  </thead>\n  <tbody>\n  <tr>\n    <td>conten1</td>\n    <td>conten2</td>\n  </tr>\n  </tbody>\n</table>\n```\n```js\nvar el = document.getElementById('table');\nvar dragger = tableDragger(el, {\n  mode: 'row',\n  dragHandler: '.handle',\n  onlyBody: true,\n});\ndragger.on('drop',function(from, to){\n  console(from);\n  console(to);\n});\n```\nAnd you could also not set any options, which defaults to drag with the default options.\n\nThe options are detailed below.\n\n#### `options.mode`\n- Setting `mode` to `column`, user drag and sort columns of table\n- Setting `mode` to `row`, user drag and sort rows of table\n- Setting `mode` to `free`, user drag rows or columns, depending on the direction of the mouse movement after tapping. Notice you have to specify `dragHandler` in `free` mode.\n\n#### `options.dragHandler`\n- `dragHandler` is drag handle selector within table\n- By default, when in `column` mode, `dragHandler` is the first row of table; in `row` mode, the first column.\n\n#### `options.onlyBody`\n- Setting `onlyBody` to `true` in `row` mode, user can only lift rows in `tbody`.\n\n# API\nThe `tableDragger` method returns a tiny object with a concise API. We'll refer to the API returned by `tableDragger` as `dragger`\n\n#### `dragger.on (Events)`\nThe `dragger` is an event emitter. The following events can be tracked using `dragger.on(type, listener)`:\n\nEvent Name | Listener Arguments               | Event Description\n-----------|----------------------------------|-------------------------------------------------------------------------------------\n`drag`     | `el, mode`                     | `el` is the origin table, `mode` is `column` or `row`, shows the mode user sort\n`drop`  | `oldIndex, newIndex, el, mode`                             | `oldIndex` is the index before sorting. `newIndex` is the index after sorting\n`shadowMove`  | `oldIndex, newIndex, el, mode`                             | trigger when column(row) is being lifted and moving into other column(row) place.\n`out`   | `el, mode`          | column(row) was dragged out of `el`, or dropped\n\n\n#### `dragger.dragging`\nThis property will be true whenever an element is being dragged.\n\n# License\nMIT\n\n[demo]: https://sindu12jun.github.io/table-dragger/\n[demoPic]: ./resources/dragger.gif\n","readmeFilename":"README.md","gitHead":"4148382f64ff41fc035961c67fc7badba1b3c35f","homepage":"https://github.com/sindu12jun/table-dragger#readme","_id":"table-dragger@2.0.2","_npmVersion":"6.4.1","_nodeVersion":"8.16.0","_npmUser":{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"},"dist":{"integrity":"sha512-u6m0kx+a4aWQDxIcpXjeiiGP480PK8bn1qLjWKo+ALcgUeQyOzVT/stm4eqtsu8noNlNNmYvUPcJKQTh/vd2NQ==","shasum":"305708d42ac511fb3138585263c54648cb7fd1a6","tarball":"https://registry.npmjs.org/table-dragger/-/table-dragger-2.0.2.tgz","fileCount":41,"unpackedSize":970205,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdV8AECRA9TVsSAnZWagAA1IgP/1w1YhyzeOHs+iSIz7j4\no2+dkhHaAgrbn5fIPC7OWx9c1UByfNvFMneKpCZ24x3yenD5xkV2fVLFOtvc\nIcjoiF9SxkxuesQ0qwVXd1bJVgatuN4CMDKQ8D8VWl1nLyDqTe04uelfZl+W\nIU/5rSgXgz6z0PBE79pl7d+c2euR/KjUnEile/g7QwV79WhmbZxgG6cf8h2N\n+LiRCvZLz64PTXbnYb6GPRJu7IXBY8/7eRZKWJ8KKtZWizKmJHCBjRJmreZl\ngtBfc0JTyDg0/YHrNnZpBR5c9EXrL8mEptZQVAxByqZEwsD88uSiV/YYsET+\nuEQj8YiwCJbBYNPE1kAKP9s9ja1hwe+LDHbgpZP3MQ6NoZxy2YuAUSR/oAfc\nX6/dD7zeAYX06tJpQo40VyaPMIEM/YcKkEq3YYVRW5yzrGFvUnRZTZI64gdu\nE4LtLtoPRAz2SbTyG/i86j0sFwNXR1z1JkjmJ1s8Y0VwIx7ORwMIUu2Or9K8\nQY/rRD/MTDSd9rQANo3tjQ6k+KCIy4cN3iRXqfmndb4bYGXGg/iSPuF5xC/Q\nB60XjZOtt6wwZpy4C1xIodhlAVMKPMGk+CXYb7OemfqHrrDIadAB9Jw0UNAb\nZfkIdjKOkR+cpZoIt4kxbatJU8deiDGPyIEQb2i1zYPjcgZwa9QkJF+/qlKL\nHfNQ\r\n=ztvB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBzyflCHWPTNlqOQUKeMS/j5OJcMciDqa8VWorf25/r9AiEAh2CAltSIZOzTacHuWmJKynWVPJchbBL11Ro7hfrG8YE="}]},"maintainers":[{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/table-dragger_2.0.2_1566031876102_0.43242625074900176"},"_hasShrinkwrap":false},"1.0.4":{"name":"table-dragger","version":"1.0.4","description":"Drag and sort columns and rows of table","author":{"name":"sindu12jun","email":"imleelijun@gmail.com"},"main":"dist/table-dragger.js","repository":{"type":"git","url":"git+https://github.com/sindu12jun/table-dragger.git"},"homepage":"https://sindu12jun.github.io/table-dragger/","directories":{"src":"src/"},"keywords":["dom","table","drag","sort","row","column"],"scripts":{"build":"webpack --progress --hide-modules --config  webpack.build.min.js && webpack --progress --hide-modules --config  webpack.build.js","builddocs":"webpack --progress --hide-modules && set NODE_ENV=production webpack --progress --hide-modules","docs":"webpack-dev-server --inline --hot --quiet","gpages":"gh-pages -d build","postversion":"git push && git push --tags","version":"npm run build && git add -A dist","test":"jest --watch"},"dependencies":{"babel-runtime":"^6.20.0","crossvent":"^1.5.5","dragula-with-animation":"^3.7.4"},"devDependencies":{"autoprefixer":"^6.4.0","babel-core":"^6.0.0","babel-eslint":"^7.0.0","babel-loader":"^6.0.0","babel-plugin-transform-runtime":"^6.0.0","babel-preset-es2015":"^6.0.0","babel-preset-stage-2":"^6.0.0","babel-register":"^6.0.0","connect-history-api-fallback":"^1.1.0","cross-spawn":"^4.0.2","css-loader":"^0.26.1","eslint":"^3.7.1","eslint-config-airbnb-base":"^8.0.0","eslint-friendly-formatter":"^2.0.5","eslint-import-resolver-webpack":"^0.6.0","eslint-loader":"^1.5.0","eslint-plugin-html":"^1.3.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jasmine":"^2.1.0","eventsource-polyfill":"^0.9.6","express":"^4.13.3","extract-text-webpack-plugin":"^1.0.1","file-loader":"^0.9.0","function-bind":"^1.0.2","gh-pages":"^0.12.0","html-webpack-plugin":"^2.8.1","http-proxy-middleware":"^0.17.2","inject-loader":"^2.0.1","isparta-loader":"^2.0.0","jasmine":"^2.5.2","jasmine-core":"^2.5.2","jest":"^23.6.0","json-loader":"^0.5.4","style-loader":"^0.13.1","webpack":"^1.13.2","webpack-dev-middleware":"^1.8.3","webpack-hot-middleware":"^2.12.2","webpack-merge":"^0.14.1"},"bugs":{"url":"https://github.com/sindu12jun/table-dragger/issues"},"license":"MIT","gitHead":"b0828869493eb1bfb4f37ef12d01c9a7c99f53af","_id":"table-dragger@1.0.4","_nodeVersion":"16.20.1","_npmVersion":"8.19.4","dist":{"integrity":"sha512-hiqHGLwJ581fqoEhPBT19zFhZqoAdzc2zJSjM5+I1fkUEr5+sZtSKe1v4iQXUYxGeJ56mA+rdG1EfAb9R3RngA==","shasum":"b397d9a62ba2a11c5efbabf6a401645d522390b8","tarball":"https://registry.npmjs.org/table-dragger/-/table-dragger-1.0.4.tgz","fileCount":12,"unpackedSize":401145,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB6Y1uLgqP+1AN7FQNq3oPfYY8DUD56XHcg2M4MiTZRZAiEAxFt7IJbe4MRk1Z8NTxM3D5pwj3pe3RFk39EVq3GcjPI="}]},"_npmUser":{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"},"maintainers":[{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/table-dragger_1.0.4_1709443495269_0.43698966812528983"},"_hasShrinkwrap":false},"2.0.3":{"name":"table-dragger","version":"2.0.3","description":"Drag and sort columns and rows of table","author":{"name":"sindu12jun","email":"imleelijun@gmail.com"},"main":"dist/table-dragger.js","repository":{"type":"git","url":"git+https://github.com/sindu12jun/table-dragger.git"},"homepage":"https://sindu12jun.github.io/table-dragger/","directories":{"src":"src/"},"keywords":["dom","table","drag","sort","row","column"],"scripts":{"build":"webpack --progress --hide-modules --config  webpack.build.min.js && webpack --progress --hide-modules --config  webpack.build.js","builddocs":"webpack --progress --hide-modules && set NODE_ENV=production webpack --progress --hide-modules","docs":"webpack-dev-server --inline --hot --quiet","gpages":"gh-pages -d build","postversion":"git push && git push --tags","version":"npm run build && git add -A dist","test":"jest --watch"},"dependencies":{"babel-runtime":"^6.20.0","crossvent":"^1.5.5","dragula-with-animation":"^3.7.4"},"devDependencies":{"autoprefixer":"^6.4.0","babel-core":"^6.0.0","babel-eslint":"^7.0.0","babel-loader":"^6.0.0","babel-plugin-transform-runtime":"^6.0.0","babel-preset-es2015":"^6.0.0","babel-preset-stage-2":"^6.0.0","babel-register":"^6.0.0","connect-history-api-fallback":"^1.1.0","cross-spawn":"^4.0.2","css-loader":"^0.26.1","eslint":"^3.7.1","eslint-config-airbnb-base":"^8.0.0","eslint-friendly-formatter":"^2.0.5","eslint-import-resolver-webpack":"^0.6.0","eslint-loader":"^1.5.0","eslint-plugin-html":"^1.3.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jasmine":"^2.1.0","eventsource-polyfill":"^0.9.6","express":"^4.13.3","extract-text-webpack-plugin":"^1.0.1","file-loader":"^0.9.0","function-bind":"^1.0.2","gh-pages":"^0.12.0","html-webpack-plugin":"^2.8.1","http-proxy-middleware":"^0.17.2","inject-loader":"^2.0.1","isparta-loader":"^2.0.0","jasmine":"^2.5.2","jasmine-core":"^2.5.2","jest":"^23.6.0","json-loader":"^0.5.4","style-loader":"^0.13.1","webpack":"^1.13.2","webpack-dev-middleware":"^1.8.3","webpack-hot-middleware":"^2.12.2","webpack-merge":"^0.14.1"},"bugs":{"url":"https://github.com/sindu12jun/table-dragger/issues"},"license":"MIT","gitHead":"25e26037696a38d39f527f6e0af79baed8ab4a63","_id":"table-dragger@2.0.3","_nodeVersion":"16.20.1","_npmVersion":"8.19.4","dist":{"integrity":"sha512-V0jLTchHTqR2zVpteHDZ1qb2OcoM7ALRMyCTe5HM568tYRKKJyZeCYkd9SgRrKqM4AveKWjvuvnCq1Gs+68Hmg==","shasum":"a13fb13a88b0a9c8384f7a2d1a7bc38dc824957d","tarball":"https://registry.npmjs.org/table-dragger/-/table-dragger-2.0.3.tgz","fileCount":12,"unpackedSize":401145,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAqH3a7jqOy5OIhGKFW9ImScTX0SlrBk8KgxQSF0GvVhAiBxHVofnX6/8ua5C9sbMsqgaYQD4Cj3V20H38HrOcp6dQ=="}]},"_npmUser":{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"},"maintainers":[{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/table-dragger_2.0.3_1709443725939_0.7269419149176939"},"_hasShrinkwrap":false},"2.0.4":{"name":"table-dragger","version":"2.0.4","description":"Drag and sort columns and rows of table","author":{"name":"sindu12jun","email":"imleelijun@gmail.com"},"main":"dist/table-dragger.js","repository":{"type":"git","url":"git+https://github.com/sindu12jun/table-dragger.git"},"homepage":"https://sindu12jun.github.io/table-dragger/","directories":{"src":"src/"},"keywords":["dom","table","drag","sort","row","column"],"scripts":{"build":"webpack --progress --hide-modules --config  webpack.build.min.js && webpack --progress --hide-modules --config  webpack.build.js","builddocs":"webpack --progress --hide-modules && set NODE_ENV=production webpack --progress --hide-modules","docs":"webpack-dev-server --inline --hot --quiet","gpages":"gh-pages -d build","postversion":"git push && git push --tags","version":"npm run build && git add -A dist","test":"jest --watch"},"dependencies":{"babel-runtime":"^6.20.0","crossvent":"^1.5.5","dragula-with-animation":"^3.7.4"},"devDependencies":{"autoprefixer":"^6.4.0","babel-core":"^6.0.0","babel-eslint":"^7.0.0","babel-loader":"^6.0.0","babel-plugin-transform-runtime":"^6.0.0","babel-preset-es2015":"^6.0.0","babel-preset-stage-2":"^6.0.0","babel-register":"^6.0.0","connect-history-api-fallback":"^1.1.0","cross-spawn":"^4.0.2","css-loader":"^0.26.1","eslint":"^3.7.1","eslint-config-airbnb-base":"^8.0.0","eslint-friendly-formatter":"^2.0.5","eslint-import-resolver-webpack":"^0.6.0","eslint-loader":"^1.5.0","eslint-plugin-html":"^1.3.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jasmine":"^2.1.0","eventsource-polyfill":"^0.9.6","express":"^4.13.3","extract-text-webpack-plugin":"^1.0.1","file-loader":"^0.9.0","function-bind":"^1.0.2","gh-pages":"^0.12.0","html-webpack-plugin":"^2.8.1","http-proxy-middleware":"^0.17.2","inject-loader":"^2.0.1","isparta-loader":"^2.0.0","jasmine":"^2.5.2","jasmine-core":"^2.5.2","jest":"^23.6.0","json-loader":"^0.5.4","style-loader":"^0.13.1","webpack":"^1.13.2","webpack-dev-middleware":"^1.8.3","webpack-hot-middleware":"^2.12.2","webpack-merge":"^0.14.1"},"bugs":{"url":"https://github.com/sindu12jun/table-dragger/issues"},"license":"MIT","gitHead":"e3e11aedfdfb1e217387e786d07f32cc28b04d53","_id":"table-dragger@2.0.4","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-qugnOQsuL/R/klPD9PTOzuqkcg6dIa9i4f2JXjbjYpgDnBwi2MYActCm1BWh3ni/GchCSTR8i8gwcwG3gzAbHA==","shasum":"863eab71354fb0c47d0fd4c6274b138ffe68efcd","tarball":"https://registry.npmjs.org/table-dragger/-/table-dragger-2.0.4.tgz","fileCount":12,"unpackedSize":401164,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEyYC3RO3JIInIA7qjysObIsXpV9QhyUyr23IYba+lwlAiEAwOc+5LBickABTQc1ZFJl0CTJZKY7QXdISgueKfCXOkw="}]},"_npmUser":{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"},"maintainers":[{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/table-dragger_2.0.4_1709564689428_0.005507506785575211"},"_hasShrinkwrap":false},"2.0.5":{"name":"table-dragger","version":"2.0.5","description":"Drag and sort columns and rows of table","author":{"name":"sindu12jun","email":"imleelijun@gmail.com"},"main":"dist/table-dragger.js","repository":{"type":"git","url":"git+https://github.com/sindu12jun/table-dragger.git"},"homepage":"https://sindu12jun.github.io/table-dragger/","directories":{"src":"src/"},"keywords":["dom","table","drag","sort","row","column"],"scripts":{"build":"webpack --progress --hide-modules --config  webpack.build.min.js && webpack --progress --hide-modules --config  webpack.build.js","builddocs":"webpack --progress --hide-modules && set NODE_ENV=production webpack --progress --hide-modules","docs":"webpack-dev-server --inline --hot --quiet","gpages":"gh-pages -d build","postversion":"git push && git push --tags","version":"npm run build && git add -A dist","test":"jest --watch"},"dependencies":{"babel-runtime":"^6.20.0","crossvent":"^1.5.5","dragula-with-animation":"^3.7.4"},"devDependencies":{"autoprefixer":"^6.4.0","babel-core":"^6.0.0","babel-eslint":"^7.0.0","babel-loader":"^6.0.0","babel-plugin-transform-runtime":"^6.0.0","babel-preset-es2015":"^6.0.0","babel-preset-stage-2":"^6.0.0","babel-register":"^6.0.0","connect-history-api-fallback":"^1.1.0","cross-spawn":"^4.0.2","css-loader":"^0.26.1","eslint":"^3.7.1","eslint-config-airbnb-base":"^8.0.0","eslint-friendly-formatter":"^2.0.5","eslint-import-resolver-webpack":"^0.6.0","eslint-loader":"^1.5.0","eslint-plugin-html":"^1.3.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jasmine":"^2.1.0","eventsource-polyfill":"^0.9.6","express":"^4.13.3","extract-text-webpack-plugin":"^1.0.1","file-loader":"^0.9.0","function-bind":"^1.0.2","gh-pages":"^0.12.0","html-webpack-plugin":"^2.8.1","http-proxy-middleware":"^0.17.2","inject-loader":"^2.0.1","isparta-loader":"^2.0.0","jasmine":"^2.5.2","jasmine-core":"^2.5.2","jest":"^23.6.0","json-loader":"^0.5.4","style-loader":"^0.13.1","webpack":"^1.13.2","webpack-dev-middleware":"^1.8.3","webpack-hot-middleware":"^2.12.2","webpack-merge":"^0.14.1"},"bugs":{"url":"https://github.com/sindu12jun/table-dragger/issues"},"license":"MIT","gitHead":"366827910503b0b83401ef92deb3fa2f5a0f7278","_id":"table-dragger@2.0.5","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-T1rbHElingYNrxdX2LAsf5jpl19AmSR60vJlfegKlUZHZvEncVj/R39Z8eFgs5WoFEZrAjkTFhA8NBeyaR3gvA==","shasum":"622db535186d3434d58774fb2aeff1b5fa8fd5e5","tarball":"https://registry.npmjs.org/table-dragger/-/table-dragger-2.0.5.tgz","fileCount":12,"unpackedSize":401164,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDSuJWlRfIxU6T7KG2xWx/eKRGjfdDTpf3gpMqDmefojAiEA1hd8Zb1cGWmY31oY9Ih2vxPdu/rwP9bLXomJ2eQNfRU="}]},"_npmUser":{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"},"maintainers":[{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/table-dragger_2.0.5_1709605174780_0.2090706290017197"},"_hasShrinkwrap":false}},"readme":"# table-dragger\n\n> Finally, you are able to drag and sort your table as you want.\n\n[![demo.gif][demoPic]][demo]\n\n# Demo\nTry out the [demo][demo]!\n\n# Inspiration\nTable-dragger is a minimalist plain Javascript library for building reorderable drag-and-drop table.\n\n# Features\n- Super easy to set up\n- cellspacing, cellpadding, col and colgroup in account\n- Able to sort columns or rows at the same time\n- Smooth animation when sort\n- No bloated dependencies\n- Touch events\n\n# Install\nYou can get it on npm.\n\n```shell\nnpm install table-dragger --save\n```\nor\n```html\n<script src=\"../node_modules/table-dragger/dist/table-dragger.min.js\"></script>\n```\n\n# Usage\n```\nimport tableDragger from 'table-dragger'\n\ntableDragger(el, options?)\n```\n```html\n<table id=\"table\">\n  <thead>\n  <tr>\n    <th class='handle'>header1</th>\n    <th class='handle'>header2</th>\n  </tr>\n  </thead>\n  <tbody>\n  <tr>\n    <td>conten1</td>\n    <td>conten2</td>\n  </tr>\n  </tbody>\n</table>\n```\n```js\nvar el = document.getElementById('table');\nvar dragger = tableDragger(el, {\n  mode: 'row',\n  dragHandler: '.handle',\n  onlyBody: true,\n  animation: 300\n});\ndragger.on('drop',function(from, to){\n  console(from);\n  console(to);\n});\n```\nAnd you could also not set any options, which defaults to drag with the default options.\n\nThe options are detailed below.\n\n#### `options.mode`\n- Setting `mode` to `column`, user drag and sort columns of table\n- Setting `mode` to `row`, user drag and sort rows of table\n- Setting `mode` to `free`, user drag rows or columns, depending on the direction of the mouse movement after tapping. Notice you have to specify `dragHandler` in `free` mode.\n\n#### `options.dragHandler`\n- `dragHandler` is drag handle selector within table\n- By default, when in `column` mode, `dragHandler` is the first row of table; in `row` mode, the first column.\n\n#### `options.onlyBody`\n- Setting `onlyBody` to `true` in `row` mode, user can only lift rows in `tbody`.\n\n#### `options.animation`\n- ms, animation speed moving items when sorting, `300` — without animation\n\n# API\nThe `tableDragger` method returns a tiny object with a concise API. We'll refer to the API returned by `tableDragger` as `dragger`\n\n#### `dragger.on (Events)`\nThe `dragger` is an event emitter. The following events can be tracked using `dragger.on(type, listener)`:\n\nEvent Name | Listener Arguments               | Event Description\n-----------|----------------------------------|-------------------------------------------------------------------------------------\n`drag`     | `el, mode`                     | `el` is the origin table, `mode` is `column` or `row`, shows the mode user sort\n`drop`  | `oldIndex, newIndex, el, mode`                             | `oldIndex` is the index before sorting. `newIndex` is the index after sorting\n`shadowMove`  | `oldIndex, newIndex, el, mode`                             | trigger when column(row) is being lifted and moving into other column(row) place.\n`out`   | `el, mode`          | column(row) was dragged out of `el`, or dropped\n\n\n#### `dragger.dragging`\nThis property will be true whenever an element is being dragged.\n\n#### `dragger.destroy`\nRemoves all drag and drop events used by `table-dragger` to manage drag and drop.\n\n# License\nMIT\n\n[demo]: https://sindu12jun.github.io/table-dragger/\n[demoPic]: ./resources/dragger.gif\n","maintainers":[{"name":"sindu12jun","email":"imgonnalovetheworld@gmail.com"}],"time":{"modified":"2024-03-05T02:19:35.427Z","created":"2016-12-15T12:03:38.150Z","1.0.0":"2016-12-15T12:03:38.150Z","1.0.1":"2016-12-22T05:44:57.701Z","1.0.2":"2017-09-15T10:29:54.883Z","1.0.3":"2019-08-16T03:25:42.996Z","2.0.0":"2019-08-17T08:13:03.789Z","2.0.1":"2019-08-17T08:34:42.344Z","2.0.2":"2019-08-17T08:51:16.385Z","1.0.4":"2024-03-03T05:24:55.442Z","2.0.3":"2024-03-03T05:28:46.081Z","2.0.4":"2024-03-04T15:04:49.609Z","2.0.5":"2024-03-05T02:19:35.010Z"},"homepage":"https://sindu12jun.github.io/table-dragger/","keywords":["dom","table","drag","sort","row","column"],"repository":{"type":"git","url":"git+https://github.com/sindu12jun/table-dragger.git"},"author":{"name":"sindu12jun","email":"imleelijun@gmail.com"},"bugs":{"url":"https://github.com/sindu12jun/table-dragger/issues"},"license":"MIT","readmeFilename":"README.md","users":{"rexpan":true,"letsbora":true}}