{"_id":"livewire-sortablejs","_rev":"3-26ddcd1a16c65dc158eb513a53989fa6","time":{"0.1.0":"2021-06-01T19:44:04.440Z","created":"2021-07-02T11:17:37.469Z","0.1.1":"2021-07-02T11:17:37.630Z","modified":"2022-05-08T05:38:43.456Z"},"name":"livewire-sortablejs","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.1":{"name":"livewire-sortablejs","version":"0.1.1","description":"A Livewire wrapper for SortableJS.","main":"dist/livewire-sortable.js","scripts":{"watch":"npx rollup -c -w","build":"npx rollup -c","lint":"eslint src tests --fix","test":"jest --verbose","prepare":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/amiranagram/livewire-sortablejs.git"},"keywords":["livewire","sortable","sortablejs"],"author":{"name":"Amir Rami"},"license":"MIT","bugs":{"url":"https://github.com/amiranagram/livewire-sortablejs/issues"},"homepage":"https://github.com/amiranagram/livewire-sortablejs#readme","dependencies":{"sortablejs":"^1.13.0"},"devDependencies":{"@babel/core":"^7.14.3","@babel/preset-env":"^7.14.4","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-node-resolve":"^13.0.0","eslint":"^7.1.0","jest":"^27.0.0","rollup":"^2.50.5","rollup-plugin-filesize":"^9.1.1","rollup-plugin-terser":"^7.0.2"},"jest":{"testMatch":["**/tests/**/*.js"]},"gitHead":"7f537e83bebf0181bed3c66f89312a73b2943a7a","_id":"livewire-sortablejs@0.1.1","_nodeVersion":"12.22.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-2Rz1tttuZoOze19xEg3BIKS0yQ6D25M2/OqgIs7aNQ93c+UprmuOgWzjM8xNTz8LuEC4+d8xxaXzG6r0xr5sgg==","shasum":"a4b16f2082af065565eef7dd0e078b9216c794d5","tarball":"https://registry.npmjs.org/livewire-sortablejs/-/livewire-sortablejs-0.1.1.tgz","fileCount":9,"unpackedSize":357441,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3vXSCRA9TVsSAnZWagAAgDUP/AjbRTK73O3Qj+EqO0KQ\n7EHCI1HIxDVTZLWykrYwSc0GA8IzRm8H9a69pGvfHnEQZCVxUeNpO0wS9laG\nwgaQCtPVRWCZin/U6ZMYbBpCChS21uUxWbeoOIV+rDVnM+0k088kMdPOnjxY\nRMWt3Ee0NZQyC3+EFJBAU/jM9WQTAmovSdbU1rtHr5PfQewPsrX/k17j4yhO\n5mSfngwpwxAopNoWoL0MLaxcuMn1CjoimM/uBJJ3g+1O0+VI29X+IqOWeBJ0\n4Oc9ggIs3fTAkV4lmDnAf+HKBX7IFSpkCE5Jfha48R9cr7Ls3ovcBNpWjuZ1\n0uUdp5vHcUkD/M4tS3wERXY8maxkEj7nseD5J0e/CyYgj+GWNWmxSt6IchGK\ne4xfyinvK+8AKYvwDuCjXZLOcmO9U5ATI7xTTKF6A+TdtMJAz/Zg57CNILVI\nLwjD13QGHn5ZmRKs2JA8FfAjMxwk4rClE98RWvpx28xEuBYQxl7Fq0vH1jeO\nmRgMpf/hlFe/l/lBCbhY0OlBwuhgcmqv9BT2bjhGNpiJzxQFHvoNGeLHbqur\n+HFXgkh9KtgC00h6yMtzKu8BxHbZY6dGyCE+/LBO1QGtZvw1rONNLZ8STHuS\nu6y3xue3K5+jlj77wG8WMW1OVgprjfmu1zuqacTpwrU85cv/PWIURCcBP82e\n8kMR\r\n=5NDq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFOG4BMdz6G2vy0vgKO4F4xofrA6JkfrzOZ3pHF9OvmYAiA0+ZLHFE/IWwKYWbQFE1AjypM6JxOAcKItEyi9T00BBA=="}]},"_npmUser":{"name":"amirami","email":"me@amirrami.com"},"directories":{},"maintainers":[{"name":"amirami","email":"me@amirrami.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/livewire-sortablejs_0.1.1_1625224657469_0.6632829206829138"},"_hasShrinkwrap":false}},"maintainers":[{"name":"amirami","email":"me@amirrami.com"}],"description":"A Livewire wrapper for SortableJS.","homepage":"https://github.com/amiranagram/livewire-sortablejs#readme","keywords":["livewire","sortable","sortablejs"],"repository":{"type":"git","url":"git+https://github.com/amiranagram/livewire-sortablejs.git"},"author":{"name":"Amir Rami"},"bugs":{"url":"https://github.com/amiranagram/livewire-sortablejs/issues"},"license":"MIT","readme":"# Livewire SortableJS\n\nA Livewire wrapper for [SortableJS](https://github.com/SortableJS/Sortable).\n\n[![Latest Version on NPM](https://img.shields.io/npm/v/livewire-sortablejs.svg?style=flat-square)](https://npmjs.com/package/livewire-sortablejs)\n[![GitHub Build Action Status](https://img.shields.io/github/workflow/status/amiranagram/livewire-sortablejs/Build%20assets?label=build&style=flat-square)](https://github.com/amiranagram/livewire-sortablejs/actions/workflows/build.yml?query=workflow%3Abuild+branch%3A0.x.x)\n[![Total Downloads](https://img.shields.io/npm/dt/livewire-sortablejs.svg?style=flat-square)](https://npmjs.com/package/livewire-sortablejs)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)\n\n---\n\n![](demo/assets/example-1.gif)\n\nA simple list of tasks in your component view.\n\n```html\n<div class=\"bg-white shadow overflow-hidden sm:rounded-md\">\n    <ul \n        wire:sortable=\"updateTaskOrder\"\n        wire:sortable.animation=\"150\"\n        class=\"divide-y divide-gray-200\"\n    >\n        @foreach($tasks as $task)\n            <li wire:sortable.item=\"{{ $task->id }}\">\n                <a href=\"#\" class=\"block hover:bg-gray-50\">\n                    <div class=\"flex items-center px-4 py-4 sm:px-6\">\n                        Task {{ $task->id }}\n                    </div>\n                </a>\n            </li>\n        @endforeach\n    </ul>\n</div>\n```\n\nAn update method in your component class.\n\n```php\npublic $tasks;\n\npublic function mount()\n{\n    $this->tasks = Task::orderBy('order')->get();\n}\n    \npublic function updateTaskOrder($list)\n{\n    foreach($list as $item) {\n        Task::where('id', $item['value'])\n            ->update(['order' => $item['order']]);\n    }\n    \n    $this->tasks = Task::orderBy('order')->get();\n}\n```\n\n## Support me\n\n<a href=\"https://www.buymeacoffee.com/amirami\" target=\"_blank\"><img src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" height=\"41\" width=\"174\"></a>\n\nI invest a lot of time writing quality software, what open-source market deserves.\n\nWhere I live I'm currently unable to apply for GitHub sponsorship. I was able to set up a Buy Me a Coffee account though. That's where you can show appreciation for my dedicated time to writing this package.\n\n## Installation\n\n### CDN\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/livewire-sortablejs@0.x.x/dist/livewire-sortable.min.js\"></script>\n```\n\n### NPM\n\n```bash\nnpm install livewire-sortablejs\n```\n\nor\n\n```bash\nyarn add livewire-sortablejs\n```\n\nThen import the package into your bundle:\n\n```js\nimport 'livewire-sortablejs'\n// or\nrequire('livewire-sortablejs')\n```\n\n## Usage\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Amir Rami](https://github.com/amiranagram)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","readmeFilename":"README.md"}