{"_id":"@ignitesales/itemcart","_rev":"42-63b74ddcea5a8ec77d4c8de29ef53510","name":"@ignitesales/itemcart","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@ignitesales/itemcart","version":"1.0.0","keywords":["cart","basket","item","simple"],"author":{"name":"Ignite Sales | Jarmell James"},"license":"MIT","_id":"@ignitesales/itemcart@1.0.0","maintainers":[{"name":"alexbib","email":"a_bibikov@yahoo.com"},{"name":"jjames_ignitesales","email":"jjames@ignitesales.com"},{"name":"arussell-ignite","email":"arussell@ignitesales.com"},{"name":"aholmes-ignite","email":"aholmes@ignitesales.com"}],"homepage":"https://bitbucket.org/ignitesales/item-cart#readme","dist":{"shasum":"a24324f36729da7ce2d3c5c066dde9f0deca7590","tarball":"https://registry.npmjs.org/@ignitesales/itemcart/-/itemcart-1.0.0.tgz","fileCount":7,"integrity":"sha512-irZyUCNN0KsNt/ogLDB4PjrhKB3iedniivD+CG4vv08emfSVluBOvaAPyYAwhwwTf9nxiSBAenqYMtX+jNYRmQ==","signatures":[{"sig":"MEUCIQCHUPLK1YYIbkFhaUqCRZZZQOFoah4z3AZZy+40Fz3QsQIgKuc//340XwzfWEEa0t0QPctrjYbEN6SoiWaimhyVhVg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277617,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZ2zCCRA9TVsSAnZWagAA81oP/0hkoS6vi/Hhc9FJGBWg\nTIx5SDlDHaMpBlvUAZsROYomEjKIN2OBVuKm+Tf3QR9wSqKhNyeoIwct4d/m\ntNDcHwmcENoV+CORKAaXmRxDZ2IQjswxlM5IKpfhvsjFFIPLTtRbEaYiCSmB\ntfCFJixTIi8XTnNcMuQosTS4x2RrGDrLsdPhxrdBhy0KiUJaxbyrBNv00gBB\nd09DJHzEzLhzGq+1/e4qszKzOjyAPkdBguyhOF8+gp2GBwgwrZF2aPZ3tM8r\ngqpczprLpg4Mjt6nu9XBDqX/YZA+qFVV7l3t9HF85Y89bWao/Z2UcYKAi08D\n5mAm7u/kHrTLqHXpIWb2ycifcO1eCZ/G0DOnxiJIUzc1Z1/Rd1WigdQ/xKHs\nHD1jPe+AYpXZegay+ZxzpuZ+pp/Hi0HnhVPGAEPQzz7kIy3ODEvkwEBXd8Ku\nheTP1wZWqtXxA4AwmpwFtNeSIdI3dBR8CHUv/MTHaf0z4VQbyPaWIK5txj6t\nrVzMg7jhz3ixSpG9q9oDtLJGF8muK1NMrIZxDOy4SmosTYAkKMsCZWM4/DeR\nOVlp+mVf1DUq0vhyXtx0fIrP3BkwqNLdPR9Qm95q/R3zeuaCwsJlCaI4JI6V\nB/MispMRe5kVkXDRKAj2evegS3jenU04PnLcx/fyH7j2vmW038tjYEYIAU+I\nJHKS\r\n=fBO/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/item-cart.js","gitHead":"5939bf573e4095f620b7752882e3bcdf30ac76b4","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"npm run build-js && npm run build-css","clean":"rimraf dist","build-js":"webpack --config ./webpack.config.js","build-css":"node-sass --include-path scss src/item-cart.scss dist/item-cart.css","watch-css":"nodemon -e scss -x \"npm run build-css\""},"_npmUser":{"name":"jjames_ignitesales","email":"jjames@ignitesales.com"},"deprecated":"moving to jquery-item-cart","repository":{"url":"git+https://jarmellj-ignitesales@bitbucket.org/ignitesales/item-cart.git","type":"git"},"_npmVersion":"6.7.0","description":"A script to easily add/remove elements to a cart. ","directories":{},"_nodeVersion":"11.10.0","dependencies":{"jquery":"2.1.1"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^2.6.3","nodemon":"^1.18.10","webpack":"^4.29.4","node-sass":"^4.11.0","webpack-cli":"^3.2.3"},"_npmOperationalInternal":{"tmp":"tmp/itemcart_1.0.0_1550281921516_0.6223488645147706","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@ignitesales/itemcart","version":"1.0.1","keywords":["cart","basket","item","simple"],"author":{"name":"Ignite Sales | Jarmell James"},"license":"MIT","_id":"@ignitesales/itemcart@1.0.1","maintainers":[{"name":"aholmes-ignite","email":"aholmes@ignitesales.com"},{"name":"alexbib","email":"a_bibikov@yahoo.com"},{"name":"arussell-ignite","email":"arussell@ignitesales.com"},{"name":"jjames_ignitesales","email":"jjames@ignitesales.com"}],"homepage":"https://bitbucket.org/ignitesales/item-cart#readme","dist":{"shasum":"cb076c663b7d2865a442448b97735a0d440d7b39","tarball":"https://registry.npmjs.org/@ignitesales/itemcart/-/itemcart-1.0.1.tgz","fileCount":7,"integrity":"sha512-uZ36a+klMDz0/8ruZ2/6Tbttkw4SMiizRe4nljARtOvZfUFN9uM8zZj+pTAjdXUzrcl9/+GgOalTxUrghGtJJQ==","signatures":[{"sig":"MEUCIGLg+eJcmegURbt8hUzWK367de6C5W2WizawszPCD8DpAiEA0esVNKVvr244yAG5fcFW/iSDImt7eBubHaHJOF4lx+I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277641,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZ2/5CRA9TVsSAnZWagAAtukP/RNbSu+0vN+X75cyJW90\nHOtyDB/DZ6RHEOqiF1zwthdefNfPAFJOCT8PIihIiXq9+EKKIvGrvdCYmVAM\nx2dUYxQ+CuQTQuJU9dMS+PbznLFMyCzYcGu44/0BxY+yXVNy+iZNSKiGB6dT\nDTui5fb6R29N4jI39ZFdY+3+PqqK785bmFam/UI56cN0cPvZPSow6u7SZLN6\nbyZZvRX81cJ3iyCURow3XHSy1HKJIhMcTjBWVHzn+ENL1xL7kaz6ucina7m1\nGB8P0m3XgRusRqPK4PB6q2js6ofcD1Ls7FWeZ6ZwB1NVg5qk1AJfPcdwP7bD\nu8/mvb1G08SliK0/Y0dzqtj07HXJCuh3KN1hBLBGQyJj3h2YPpixQYiLT/y6\nu/BrTjn05TB9lnT1BagAZKGCnXeFdw+cFF0IRn0EN5/U2MQw6QHRom8jU98P\nT2VdtKf9pV5wLzMa+pFLP7IexqXpN7m+PdaSJX4ejBOzDpeAA1goe7/S49UV\nHUGRHe94iOobYxU1qXDBpgK06LUBbyBYFP+2mQn9SnlSfVoBrIPkNMiAj4jn\nQFA3IqReidYURzKSYyFA5SS3p/piCdoO0JxQ8jOJ/jiEkhjbn7HMP4tg5YpP\nvLh4aOl8fdO0eqzR+agcF4gb+dqbO4bjb9dWVXqldO3zKAmngZCLg0pp0b7G\nIQTU\r\n=RwjB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/item-cart.js","gitHead":"67cea15683f51f2fb101f4c95b377dcd800dfbd3","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"npm run build-js && npm run build-css","clean":"rimraf dist","build-js":"webpack --config ./webpack.config.js","build-css":"node-sass --include-path scss src/item-cart.scss dist/item-cart.css","watch-css":"nodemon -e scss -x \"npm run build-css\""},"_npmUser":{"name":"jjames_ignitesales","email":"jjames@ignitesales.com"},"deprecated":"moving to jquery-item-cart","repository":{"url":"git+https://jarmellj-ignitesales@bitbucket.org/ignitesales/item-cart.git","type":"git"},"_npmVersion":"6.7.0","description":"A script to easily add/remove elements to a cart. ","directories":{},"_nodeVersion":"11.10.0","dependencies":{"jquery":"2.1.1"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^2.6.3","nodemon":"^1.18.10","webpack":"^4.29.4","node-sass":"^4.11.0","webpack-cli":"^3.2.3"},"_npmOperationalInternal":{"tmp":"tmp/itemcart_1.0.1_1550282744608_0.3013516182360205","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@ignitesales/itemcart","version":"1.0.2","keywords":["cart","basket","item","simple"],"author":{"name":"Ignite Sales | Jarmell James"},"license":"MIT","_id":"@ignitesales/itemcart@1.0.2","maintainers":[{"name":"aholmes-ignite","email":"aholmes@ignitesales.com"},{"name":"alexbib","email":"a_bibikov@yahoo.com"},{"name":"arussell-ignite","email":"arussell@ignitesales.com"},{"name":"jjames_ignitesales","email":"jjames@ignitesales.com"}],"homepage":"https://bitbucket.org/ignitesales/item-cart#readme","dist":{"shasum":"8122b0ca505d63b654d0a21e76e2216dd0af1725","tarball":"https://registry.npmjs.org/@ignitesales/itemcart/-/itemcart-1.0.2.tgz","fileCount":7,"integrity":"sha512-Mec6ZrKPzIe05Q4zVOKHUh28fv9s8xaTjo6XyF9ppu7QynTfHtuckdr0jDVVJK9fcs82O8/GrBh34c7EF53Uww==","signatures":[{"sig":"MEUCIQDb5aKSnGurrrrFK3M6rnhjkmcUIkUQEY3R4ZZVrlHVfgIgbDZ+EJCmKU/KMoK3Dcu1idUT876n3mAVUa8fhtEQnNs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277667,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZ3dPCRA9TVsSAnZWagAAMo4QAJJ5mXF20BV6mGMUxDDb\nm+k37LZGRAftRGr73EWWMwt9+IRHPN7I6yZqYmmYp2P5L29ZTj9Zuj72TdhU\n9yCJZ68+Wc5538NS6SnC0Rtpkx3r+bwtzotJ2ivYGuC0vMrwe1RczerJ3Odl\nTUE1PcwMwNnk4xb1ghqtmgP7aJ8jSnlivQpllcOSBzgVZS2ifvNXDXrRIhJk\nU5NWz+m1CqO4RnCiVLEq6fwP8mMghL0tyXiZAgphpcfQvw4Ac2y2/nOM7NJ/\nk/mSbs4Gk3Gl6vCD2J5Eh8X/wUjvec49ehd8vy5dVQXqt7eS+X0uqx1vF5HK\nDfAgWw3H/r6aaU2m61AIcn2OtXqEhy1KfxYuo7G95GAv3IIPzUN3M8u1smIa\nfRwQRFfapEi0DIFbfCMqni9flMsOi0AxgKyWb+2zjDt7icQ3B7pFm31wTRwr\nGS6OcDVxM/KehfVO90Iifh+J/hUnQceZxDQ7c0/KGhxEfk+KZOxhrHjX6eM8\n3J0w1MgCII68WB9S2t5QXNaI/nIOQrz6kYg6uK6GCg5gECxupCaQD7220QvU\neey1yEYmotu/rZBPMsvefsFJvlgD8gRD+vFUFGDAJjqkJ+sotOvifPB97lIX\nYKZ1UFaxgIATfY9k29CTkFOtocha8VzmxOKODWf1FlQJJJ8Qgrat+neU8oa9\nqg9M\r\n=4bEs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/item-cart.js","gitHead":"311d8f6ed147550de2afd9007cae388787713df7","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"npm run build-js && npm run build-css","clean":"rimraf dist","build-js":"webpack --config ./webpack.config.js","build-css":"node-sass --include-path scss src/item-cart.scss dist/item-cart.css","watch-css":"nodemon -e scss -x \"npm run build-css\""},"_npmUser":{"name":"jjames_ignitesales","email":"jjames@ignitesales.com"},"deprecated":"moving to jquery-item-cart","repository":{"url":"git+https://jarmellj-ignitesales@bitbucket.org/ignitesales/item-cart.git","type":"git"},"_npmVersion":"6.7.0","description":"A script to easily add/remove elements to a cart. ","directories":{},"_nodeVersion":"11.10.0","dependencies":{"jquery":"2.1.1"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^2.6.3","nodemon":"^1.18.10","webpack":"^4.29.4","node-sass":"^4.11.0","webpack-cli":"^3.2.3"},"_npmOperationalInternal":{"tmp":"tmp/itemcart_1.0.2_1550284623365_0.16725168279369762","host":"s3://npm-registry-packages"}}},"time":{"created":"2019-02-16T01:52:01.448Z","modified":"2026-09-30T13:01:03.712Z","1.0.0":"2019-02-16T01:52:01.742Z","1.0.1":"2019-02-16T02:05:44.983Z","1.0.2":"2019-02-16T02:37:03.487Z"},"author":{"name":"Ignite Sales | Jarmell James"},"license":"MIT","homepage":"https://bitbucket.org/ignitesales/item-cart#readme","keywords":["cart","basket","item","simple"],"repository":{"url":"git+https://jarmellj-ignitesales@bitbucket.org/ignitesales/item-cart.git","type":"git"},"description":"A script to easily add/remove elements to a cart. ","maintainers":[{"email":"devops@ignitesales.com","name":"ignite-cicd"},{"email":"jclark@ignitesales.com","name":"jclark-ignite"},{"email":"oacevedo@ignitesales.com","name":"oacevedo"},{"email":"ldimar@ignitesales.com","name":"ldimar"},{"email":"jholsomback@ignitesales.com","name":"jholsomback"}],"readme":"# Item Cart\n\n> A simple javascript cart manager. Add / remove items to a cart with ease.\n\n#### With item-cart you can:\n* Add elements (based on className) to a cart element (based on ID)\n* Easily remove elements\n\n## Installation\n\n#### NPM:\n```bash\nnpm install @ignitesales/item-cart\n```\n\n## Usage\nMarkup for the cart is pretty simple. You need a element that holds the items (referred to as the shelf), and an element that will be the cart, where items will be copied to when added.\n\nTo indicate items that should already be in the cart upon rendering the page, add \"item-active\" to the elements className.\n\n#### HTML:\n```html\n<head>\n    <script src=\"https://code.jquery.com/jquery-2.2.4.min.js\"></script>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"/node_modules/@ignitesales/itemcart/dist/item-cart.css\">\n</head>\n<body>\n\n    ...\n    <!-- Example Cart Markup -->\n    <div id=\"shelf\">\n    <div class=\"itemCart-element\">Item #1</div>\n    <div class=\"itemCart-element\">Item #2</div>\n    <div class=\"itemCart-element item-active\">Item #3</div>\n    </div>\n    <div id=\"cart\"></div>\n    ...\n  \n    <!-- Bottom of body -->\n    <script src=\"/node_modules/@ignitesales/itemcart/dist/item-cart.js\" ></script>\n    <script>\n    var itemCart = ItemCart({\n        shelfId: \"shelf\",\n        cartId: \"cart\",\n        defaultAddBtn: true,\n        defaultRemoveBtn: true\n    });\n    </script>\n</body>\n```\n\n#### ES6:\n```js\nimport ItemCart from '@ignitesales/item-cart'\n\nconst itemCart = ItemCart({\n    shelfId: \"shelf\",\n    cartId: \"cart\",\n    defaultAddBtn: true,\n    defaultRemoveBtn: true\n})\n```\n\n## Methods\n\n#### ItemCart(options)\nCreate a new instance of 'ItemCart'.\n\n- `options` (Object) - Options to customize a new instance of ItemCart:\n    - `sheflId` | *String* | [Required] - ID of the element which holds items that can be added to cart\n    - `cartId` | *String* | [Required] - ID of the cart element where items will be added\n    - `itemsClass` | *String* | [Optional] - className for the elements that can be copied to cart. These elements should be children of the _option.shelfId_ selector. Default: `itemCart-element`\n    - `addItemClass` | *String* | [Optional] - className for the button that will add elements to the cart. Element must be a child of the _option.itemsClass_ selector. Default: `itemCartAddBtn`\n    - `removeItemClass` | *String* | [Optional] -  className for the button that will remove elements from the cart. Element must be a child of the _option.itemsClass_ selector. Default: `itemCartRemoveBtn`\n    - `defaultAddBtn` | Boolean | [Optional] - if true, a button for adding to the cart will be attached to all shelf items. Default: `false`\n    - `defaultRemoveBtn` | Boolean | [Optional] - if true, a button for remove from the cart will be attached to all shelf items. Default: `false`\n    - `cartMap` | Object (String : String) | [Optional] - a map of strings to strings. Left string value indicates the className of an item. The right string indicates the ID of a cart section. This can be used to move certain shelf items to a specific area of the cart (i.e. section off cart elements by their own category). Otherwise, new items added to the cart will be appended to the bottom of the cart.\n    - `clearCartBtnId` | String | [Optional] - ID for a button that will clear the cart.\n    \n```js\nconst itemCart = ItemCart({\n  shelfId: \"shelf\",\n  cartId: \"cart\",\n  defaultAddBtn: true,\n  defaultRemoveBtn: true,\n  cartMap: {\n      \"musicItem\" :     \"entertainment\",\n      \"gameItem\" :      \"electronics\",\n      \"foodItem\" :      \"entertainment\",\n      \"movieItem\" :     \"entertainment\",\n  },\n  clearCartBtnId: \"clearCart\"\n});\n```\n\n#### ItemCart.render();\nRe-renders the cart elements. Items in the shelf that have \"item-active\" className will automatically be added to the cart during the render.\n\n```js\nitemCart.render();\n```\n\n## License\nMIT License. Copyright &copy; 2019 [Ignite Sales](http://ignitesales.com/)\n","readmeFilename":"README.md"}