{"_id":"@cslegany/drag-drop-content-types-strapi5","_rev":"1-ab562c6f37f6553ff4db660f508b3477","name":"@cslegany/drag-drop-content-types-strapi5","dist-tags":{"latest":"0.5.1"},"versions":{"0.5.0":{"name":"@cslegany/drag-drop-content-types-strapi5","version":"0.5.0","keywords":["strapi","plugin","strapi-plugin","drag","drop","drag and drop","drag drop content types","content types","sort","order"],"author":{"url":"https://synerinsoft.com/","name":"cslegany","email":"cslegany@synerinsoft.com"},"license":"MIT","_id":"@cslegany/drag-drop-content-types-strapi5@0.5.0","maintainers":[{"name":"cslegany","email":"cslegany@synerinsoft.com"}],"dist":{"shasum":"72e4d6e133f14d84605b8350433281ec791bff91","tarball":"https://registry.npmjs.org/@cslegany/drag-drop-content-types-strapi5/-/drag-drop-content-types-strapi5-0.5.0.tgz","fileCount":26,"integrity":"sha512-FUn1ZPVUH5kwe9HGLI3kd4CePxmZKDzaJ1UuJ/skgsEmEpVCLOlLnQbNlqGp2Ux0MynuxaLd5v2vbzv+8biWyQ==","signatures":[{"sig":"MEUCIQD7ORBSz8pNgvl8kMbgGFtpQ6TXaX4fOD1yQPcwA4fF+wIgZeNua6cyPh4jcav47Voi6JN0g2lgO1Oo7U9E5APeNP0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1193442},"type":"commonjs","strapi":{"kind":"plugin","name":"drag-drop-content-types","description":"This plugin add a drag and droppable list that allows you to sort content type entries.","displayName":"Drag Drop Content Types"},"exports":{"./package.json":"./package.json","./strapi-admin":{"types":"./dist/admin/src/index.d.ts","import":"./dist/admin/index.mjs","source":"./admin/src/index.ts","default":"./dist/admin/index.js","require":"./dist/admin/index.js"},"./strapi-server":{"types":"./dist/server/src/index.d.ts","import":"./dist/server/index.mjs","source":"./server/src/index.ts","default":"./dist/server/index.js","require":"./dist/server/index.js"}},"gitHead":"ecfd54f85e19a883a9237c4c3a322d790165c2f4","scripts":{"build":"strapi-plugin build","watch":"strapi-plugin watch","verify":"strapi-plugin verify","watch:link":"strapi-plugin watch:link","test:ts:back":"run -T tsc -p server/tsconfig.json","test:ts:front":"run -T tsc -p admin/tsconfig.json"},"_npmUser":{"name":"cslegany","email":"cslegany@synerinsoft.com"},"_npmVersion":"10.2.4","description":"This plugin add a drag and droppable list that allows you to sort content type entries.","directories":{},"_nodeVersion":"20.11.0","dependencies":{"zod":"^3.23.8","array-move":"^4.0.0","react-intl":"^6.6.8","@dnd-kit/core":"^6.1.0","@strapi/icons":"^2.0.0-rc.11","@dnd-kit/sortable":"^8.0.0","@dnd-kit/utilities":"^3.2.2","@strapi/design-system":"^2.0.0-rc.11"},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.3.1","prettier":"^3.3.3","react-dom":"^18.3.1","typescript":"^5.6.2","@types/react":"^18.3.8","@strapi/strapi":"^5.0.0","@types/react-dom":"^18.3.0","react-router-dom":"^6.26.2","styled-components":"^6.1.13","@strapi/sdk-plugin":"^5.2.6","@strapi/typescript-utils":"^5.0.0"},"peerDependencies":{"react":"^18.3.1","react-dom":"^18.3.1","@strapi/strapi":"^5.0.0","react-router-dom":"^6.26.2","styled-components":"^6.1.13","@strapi/sdk-plugin":"^5.2.6"},"_npmOperationalInternal":{"tmp":"tmp/drag-drop-content-types-strapi5_0.5.0_1730983776836_0.1644192197521741","host":"s3://npm-registry-packages"}},"0.5.1":{"name":"@cslegany/drag-drop-content-types-strapi5","version":"0.5.1","description":"This plugin add a drag and droppable list that allows you to sort content type entries.","strapi":{"kind":"plugin","name":"drag-drop-content-types","displayName":"Drag Drop Content Types","description":"This plugin add a drag and droppable list that allows you to sort content type entries."},"keywords":["strapi","plugin","strapi-plugin","drag","drop","drag and drop","drag drop content types","content types","sort","order"],"license":"MIT","type":"commonjs","exports":{"./package.json":"./package.json","./strapi-admin":{"types":"./dist/admin/src/index.d.ts","source":"./admin/src/index.ts","import":"./dist/admin/index.mjs","require":"./dist/admin/index.js","default":"./dist/admin/index.js"},"./strapi-server":{"types":"./dist/server/src/index.d.ts","source":"./server/src/index.ts","import":"./dist/server/index.mjs","require":"./dist/server/index.js","default":"./dist/server/index.js"}},"scripts":{"build":"strapi-plugin build","test:ts:back":"run -T tsc -p server/tsconfig.json","test:ts:front":"run -T tsc -p admin/tsconfig.json","verify":"strapi-plugin verify","watch":"strapi-plugin watch","watch:link":"strapi-plugin watch:link"},"dependencies":{"@dnd-kit/core":"^6.1.0","@dnd-kit/sortable":"^8.0.0","@dnd-kit/utilities":"^3.2.2","@strapi/design-system":"^2.0.0-rc.11","@strapi/icons":"^2.0.0-rc.11","array-move":"^4.0.0","react-intl":"^6.6.8","zod":"^3.23.8"},"devDependencies":{"@strapi/sdk-plugin":"^5.2.6","@strapi/strapi":"^5.0.0","@strapi/typescript-utils":"^5.0.0","@types/react":"^18.3.8","@types/react-dom":"^18.3.0","prettier":"^3.3.3","react":"^18.3.1","react-dom":"^18.3.1","react-router-dom":"^6.26.2","styled-components":"^6.1.13","typescript":"^5.6.2"},"peerDependencies":{"@strapi/sdk-plugin":"^5.2.6","@strapi/strapi":"^5.0.0","react":"^18.3.1","react-dom":"^18.3.1","react-router-dom":"^6.26.2","styled-components":"^6.1.13"},"author":{"name":"cslegany","email":"cslegany@synerinsoft.com","url":"https://synerinsoft.com/"},"maintainers":[{"name":"cslegany","email":"cslegany@synerinsoft.com"}],"_id":"@cslegany/drag-drop-content-types-strapi5@0.5.1","gitHead":"3c2b321015e40b150bedd7067706476de76821e4","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-0gIiz0tcidj7hXdMwJBdYazGzxU/bJcqHGY9VFPf4gHDyW1Xy4Il1rdL796ZqNKpjtUOv4ObZMpsAyH2ncdn4g==","shasum":"78015bde3901d17d5571ec04be2c8fd463445f89","tarball":"https://registry.npmjs.org/@cslegany/drag-drop-content-types-strapi5/-/drag-drop-content-types-strapi5-0.5.1.tgz","fileCount":38,"unpackedSize":2344219,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB+Td7ri0zPZ4OIgM5IBcweBVXLztcEm/oaNRJtlwcBBAiEAkQWOpMs1G5suIblT+rVfks+nBP0Wp2Stc3ZhSZiWS/U="}]},"_npmUser":{"name":"cslegany","email":"cslegany@synerinsoft.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/drag-drop-content-types-strapi5_0.5.1_1730997146042_0.9436389453903669"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-07T12:49:36.737Z","modified":"2024-11-07T16:32:26.547Z","0.5.0":"2024-11-07T12:49:37.105Z","0.5.1":"2024-11-07T16:32:26.403Z"},"author":{"name":"cslegany","email":"cslegany@synerinsoft.com","url":"https://synerinsoft.com/"},"license":"MIT","keywords":["strapi","plugin","strapi-plugin","drag","drop","drag and drop","drag drop content types","content types","sort","order"],"description":"This plugin add a drag and droppable list that allows you to sort content type entries.","maintainers":[{"name":"cslegany","email":"cslegany@synerinsoft.com"}],"readme":"<div align=\"center\">\r\n  <img src=\"https://user-images.githubusercontent.com/37687705/192227260-db082018-947a-4166-a3f4-983e1024dd59.png\" width=\"20%\">\r\n  <h1>Strapi plugin drag-drop-content-types</h1>\r\n</div>\r\n\r\n![dragdropcrop](https://user-images.githubusercontent.com/37687705/212884821-356ec68c-b71a-4b89-9e99-8a625f84cfbe.gif)\r\n\r\nInspired by the [Drag-Drop-Content-Type Strapi 4 plugin](https://github.com/plantagoIT/strapi-drag-drop-content-type-plugin).\r\nDrag-drop feature completely rewritten to use dndkit because react-sortable-hoc is deprecated and not compatible with React 18.\r\n\r\n## ⏳ Installation\r\n\r\nInstall with NPM.\r\n```bash\r\nnpm i @cslegany/drag-drop-content-types-strapi5\r\n```\r\nInstall with Yarn.\r\n```bash\r\nyarn add @cslegany/drag-drop-content-types-strapi5\r\n```\r\n\r\n## 🔧 Configuration\r\n\r\n### In your config\r\n1. Add the following to your `config/plugins.ts` file. Create the file, if it doesn't exist.\r\n```js\r\nexport default () => ({\r\n  // ...\r\n  'drag-drop-content-types': {\r\n    enabled: true\r\n  }\r\n})\r\n```\r\n2. Run `npm run build` and restart the app using `npm run develop`.\r\n\r\n### In the app\r\n1. Go to `Settings` → `Drag Drop Content Type` → `Configuration`.\r\n2. Specify the `Rank Field Name` used for sorting or leave the default field name `rank`.\r\n3. Add a `Number` field with `Name: myRankFieldName` and `Number format: integer` to the sortable _ContentType_.\r\n4. Configure the view of your _ContentType_ by adding `Default sort attribute → rank` and `Default sort order → ASC` to update the view after dragging.\r\n5. If needed: grant permissions for the `rank` field to your roles.\r\n\r\n#### Hints\r\n* You can set a `title` value that will be displayed in the menu instead of the default field.\r\n* A second field can be displayed in the menu via the `subtitle` setting. It can be either a string-like field or an object such as a relation, that has a `title` field as configured in the settings.\r\n* You can enable webhooks to trigger something after updating the order.\r\n\r\n### In your frontend\r\nYou can make a request in the frontend to get the ordered items. In this example the _ContentType_ is called `Foo` and ordered via the `rank` field. \r\n\r\n```\r\nhttp://localhost:1337/api/foo?sort=rank:asc\r\n```\r\n\r\n## 🤝 Contribute\r\nFeel free to fork and make pull requests to this plugin. All input is welcome - thanks for all contributions so far!\r\n\r\n\r\n## ⭐️ Support\r\nI you like this project, please give it a star ⭐️. Maybe this will help it getting integrated to strapi's core some day 😊.\r\n","readmeFilename":"README.md"}