{"_id":"@banoulka/ux-cart","_rev":"3-c10b4ce1a0fed8c42d1718ed12fd4b24","name":"@banoulka/ux-cart","dist-tags":{"latest":"1.0.1"},"versions":{"0.1.0":{"name":"@banoulka/ux-cart","version":"0.1.0","description":"UX Assignment 1","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"N Bamford"},"license":"ISC","gitHead":"fcbbca11c07fea9ae2ea9c615373aa176ed822a9","_id":"@banoulka/ux-cart@0.1.0","_nodeVersion":"10.15.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-oJnCL5CA9GRWolEfQKjtqNlPRGjs9vPD+oARsSrIw7ZAAonpwgWRFVTV9RL9VRVS8u9ydqSZ+DmzItc7MBMT4w==","shasum":"4f10c3eec4493f74c64822262809ef3c0157536b","tarball":"https://registry.npmjs.org/@banoulka/ux-cart/-/ux-cart-0.1.0.tgz","fileCount":4,"unpackedSize":2148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfwny1CRA9TVsSAnZWagAAOjoP/iCgkAKuPIsEkJ5FewoU\nw8T+X9wxm4NHeYt2PbaANtycvNi0dMYvM9umNG6zbbaEPAChb81TWszjvj4y\nENs/ga2eDO3et7PxAIHPjx0R97EFlz4cd8bt1b/HGqZdsKuBfCmCAeI6zCcb\nJU7iaDCToBKixUC6FH7WA6Ug82ZRMcy+OV34PD4GxmuHkMT8xwuwaf5Pclm9\nKsVEaVXy1Kt9NVB2uU8W2UwbgkWw5s4ZsRS2e++MKncJ4KQto7AHPPX1Heyh\n7qNWPaYCgPAdg51wNdmbyykkhJiAsUshtdoPyatg8ccvNk97sHwvkGzfxi19\nMmEc+afllG9q9noWRZRy+AMiz+SKV2Am9oJcWe9rGFIfe9KqVoQWuF4ljbh7\n2UF/iX/In/5U/ZnKb6KGR98MijD1pbZKTkZkEQtGbvcWKMBCdDTr7TxWFhJh\nztjESnCcQ8rhcQpC7vogGHgLIVhUAxkeWgnE8PJKhhEFDk/1qpLsjqJ2NH2m\ne7y6wJ791c0D9+AUQZfKwgALpHcrP7ASeRwGimBrlprRnsJeqC7PA8PV3uvn\nf8qBgAQ1u6NYexeTBnDUDnIca9dvHEini6zOGjPaAvlBOH2eXfyQtksg9Un6\nAA7A5F0DSx+BCO19XKpAikzGCtnKbGjXNx573J0DtSvvn83jNM1tl2CHbIqE\ncBfy\r\n=14I6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH+IB8c/QSTti7WbTi/kTmDPLHJ18kkHbWmh8iH7k2CTAiBRcpseZ+MMN25YSPS0SsrU86UeBhIjs7v9C7NRsPzLFQ=="}]},"_npmUser":{"name":"banoulka","email":"nathanbammy@hotmail.co.uk"},"directories":{},"maintainers":[{"name":"banoulka","email":"nathanbammy@hotmail.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ux-cart_0.1.0_1606581428893_0.3464231709265777"},"_hasShrinkwrap":false},"1.0.0":{"name":"@banoulka/ux-cart","version":"1.0.0","description":"UX Assignment 1","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"webpack","dev":"webpack --watch","demo":"@php -S localhost:8000"},"author":{"name":"N Bamford"},"license":"ISC","devDependencies":{},"dependencies":{},"gitHead":"f3d2ad30c650205cd6cc1fe775a11d85f0745c35","_id":"@banoulka/ux-cart@1.0.0","_nodeVersion":"10.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-FrRlITl5xruN2HikRVvMAdpCFnsLc2pSArYhjnJwHZlf1QbKIT+ngOZdZnwl1jzwNRkJQMVASKGbHdTNnowfpQ==","shasum":"c60154bea642fa3e8300f0348728fa6fc9687385","tarball":"https://registry.npmjs.org/@banoulka/ux-cart/-/ux-cart-1.0.0.tgz","fileCount":27,"unpackedSize":37944,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/5WNCRA9TVsSAnZWagAA6zIP/16+/6TG6IGWMwfN/Cyj\nPhXzeeocUHpi/xYvX9Nlp0EBiRIK0WUDg3y/2isBhbg1n9emrER8CaQwZ5g5\nTIzcxvgEzpLvW4l23u4sz/rfAumciZereGVDRCAbdDOJd7EZBDxKSB8qj9Wo\nUa/XEel+Me0yidgl0CD3kardvnvqyZeVqYhh7bROFccesiUTce0QZO40CsK1\nrcGku4TsfoK92+fFDsG2jxO5f1jpV9COW7eZ0UiXS0idb8kr4o4aqF6B/k6t\noEf75al7+a8KV5DnJIEnBkkDePiLmpQgoHJyIlhUqZjfhrRpsb8zpruwgqhu\nnTuFwRR1bOfvklwROov44fh+453RVVJxe+ME1pUKh913yGzBQtA1dk0uaXI8\nYOtyTJFEImrag/D3OAQ67emc372X7pT7D8E/PeKialP6r3hB11mAGzJ6KsHV\nBeCecC/2eGNSxb7sXVHKEvDE2Xnn+AEaO9WBu/t8J2CLDWUQIc41MiYlVa9A\np4yh9xkWVKY7hKbTFJZEGVrDq56QFg/1UL66hn4T/KXRxuGr3Ss6YG404Q55\n4XFLyRH89EKPgtey0eMUXst8umxU9y67EGcl/OLCQ1kkuIY4ltdXfaNtMsZn\nAtRjjDyZDawe0HPvS1IyOpfObDLK3tRaogeCKbm3thxpmHgSspd1CduuTmrc\ntiwV\r\n=vuWE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEMOYPCXoylxeAWLYiUpoLF6mplUQsgPDE8D95dErrJdAiEA5NgOtFJseARQ+Zyq4JhhYMDdW0WbmXzSMTmx2P/Unao="}]},"_npmUser":{"name":"banoulka","email":"nathanbammy@hotmail.co.uk"},"directories":{},"maintainers":[{"name":"banoulka","email":"nathanbammy@hotmail.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ux-cart_1.0.0_1610585484662_0.05568594675142036"},"_hasShrinkwrap":false},"1.0.1":{"name":"@banoulka/ux-cart","version":"1.0.1","description":"UX Assignment 1","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"webpack","dev":"webpack --watch","demo":"@php -S localhost:8000"},"author":{"name":"N Bamford"},"license":"ISC","devDependencies":{},"dependencies":{},"gitHead":"f759cf80841bcd900cccb16dca2c8dd33031f93e","_id":"@banoulka/ux-cart@1.0.1","_nodeVersion":"10.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-fty2+/+s5fhQrZi4L1ihTc61+RHnyKEbf1d7sqvjuXPZEfguxug6wTHwBKTSBTiF4fPwDJN7yoIebdDL6gAwPQ==","shasum":"745e0bb1bf1ada66fbd2dadc992299455776fcc0","tarball":"https://registry.npmjs.org/@banoulka/ux-cart/-/ux-cart-1.0.1.tgz","fileCount":27,"unpackedSize":39246,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/6lsCRA9TVsSAnZWagAAwhIP+wdEQglWwAYIMFEWoMtU\n3R1a7RIQ+wvCC06FTQF3bVxMPaFHizkIdxfzGDYCRFthhzukLb7KajZfpDaN\n5HX38sJun9vTnohR2RiZ9/4jmimSH3i9VDYB5BdwMsUJBjIfV2jLmw+eoFXJ\nw+b848rxc4qdCc0dTiXgSbG7H/z5HR5ObNaeFpNKgoDxPz5RT68Ak2mUXoh0\nu4kHBg4rBbn+j9tGsNZYibAXyAbfK0Jtu+kw7/AvswRv+KLXmg0PMzujnzCH\npvRRemn+pz6umUp9TsFN1AKu5U+WYJXcrRLUcJP5bNDHt5mj1FhtjvVbXahC\nouQhbi2FLGz94PXHBTshOWNRIreDq+5RyKaFqzsuRlYiVixR/Kgb5+GjSa9q\nVAnhwm4lSjpdoD9vOY2pOI0Lfg+EnQjC1q8R/YBzKXoAGTZZH68LcIcBHWs4\nWtyH/y0i7RoycX4Tz14PajWy3iA8+unPFfyzD/Qs5PozzztqGBZ5ZLdLgkAv\nE49YG5lwOvfBi0OmWT7Sq1rdHrvdyZf3BKhfeGoruibaLKdP0jt2VrCuqWpl\nGX4GzDXufuWt865LQg2yffNHwBxudkQCMZCfMVd8IfTUcZJXS0coF5CY6TpQ\nVBCp+pnTIfm/SiBgsr1sta3aiTg3BGwfmt1kuYixlK1wsn6rAMDL+m4eeU2m\nDzAf\r\n=tQ1U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/qdJml0bTVJH+ErnTDTWNKXqd69kcCd8sFEx4WS2iXgIgMRQ63lDwPpI8690M0kWfcZcwvTrh41eLjQBY89AK3TI="}]},"_npmUser":{"name":"banoulka","email":"nathanbammy@hotmail.co.uk"},"directories":{},"maintainers":[{"name":"banoulka","email":"nathanbammy@hotmail.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ux-cart_1.0.1_1610590572019_0.20055526452416217"},"_hasShrinkwrap":false}},"time":{"created":"2020-11-28T16:37:08.858Z","0.1.0":"2020-11-28T16:37:09.081Z","modified":"2022-04-04T17:42:31.353Z","1.0.0":"2021-01-14T00:51:24.799Z","1.0.1":"2021-01-14T02:16:12.193Z"},"maintainers":[{"name":"banoulka","email":"nathanbammy@hotmail.co.uk"}],"description":"UX Assignment 1","author":{"name":"N Bamford"},"license":"ISC","readme":"# ux-cart\r\n\r\n![GitHub license](https://img.shields.io/badge/license-MIT-green.svg)\r\n![npm (scoped)](https://img.shields.io/npm/v/@banoulka/ux-cart?color=blue)\r\n![GitHub repo size](https://img.shields.io/github/repo-size/banoulka/ux-cart?color=orange&label=install%20size)\r\n\r\nUX-Cart is a cart tracking application that is for a research project answering the question:\r\n\r\n> \\<Insert Question Here>\r\n><br />\r\n\r\n## Contents\r\n\r\n- [Installation](#installation)\r\n- [Requirements](#requirements)\r\n- [Usage](#usage)\r\n- [Options](#options)\r\n- [Examples](#examples)\r\n- [Demo](#demo)\r\n\r\n<br />\r\n\r\n## Installation\r\n\r\nUsing npm:\r\n\r\n```shell script\r\n$ npm install @banoulka/ux-cart\r\n```\r\n\r\n<!-- Using personal CDN:\r\n```html\r\n<script src=\"https://unpkg.com/axios/dist/axios.min.js\"></script>\r\n``` -->\r\n\r\nOnce package is installed a link should be placed in the `<head>`tag of the html page. Copy and paste the link below:\r\n\r\n```html\r\n<script src=\"<SOURCE>\" defer />\r\n```\r\n\r\nBootstrap is optional but increases styles and viewing across all pages, follow\r\nbootstrap for their setup.\r\n\r\n```html\r\n<link\r\n\trel=\"stylesheet\"\r\n\thref=\"https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css\"\r\n\tintegrity=\"sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN\"\r\n\tcrossorigin=\"anonymous\"\r\n/>\r\n```\r\n\r\n<br />\r\n\r\n## Requirements\r\n\r\nTo use this product cart application tracker, you need to have\r\na full cart system to provide with. Provide your own buttons out of a possibility\r\nof 3.\r\n\r\n* Paypal checkout\r\n* Apple pay checkout\r\n* Credit / Debit card system\r\n\r\nTo set, see [options](#options).\r\n\r\n<br />\r\n\r\n## Usage\r\n\r\nTo use the application it should be initialized by the following code.\r\n\r\nIn javascript a new object can be created and initialised with\r\n\r\n```javascript\r\nconst ux = UX.init();\r\n```\r\n\r\n<br />\r\n\r\n## Options\r\n\r\nOptions can be added by passing an object with the different keys setup. A list of options\r\ncan be seen below.\r\n\r\nOptions with * can be optional.\r\n\r\nTo see `storageType` modes, check [modes](#modes).\r\n\r\n```javascript\r\nUX.init({\r\n    total, // The total amount for the cart\r\n    cart, // The list of products as an array\r\n    parentId: '', // The page container to render different pages\r\n        storageType, // * The storage type for the results.\r\n\r\n        // Required if using 'api'\r\n        endpoint, // * The endpoint for the 'api' storage option. \r\n       \r\n        payCardId: '', // * The paypal button id to use\r\n        payAppleId: '', // * The apple pay button id to find\r\n        payPaypalId: '', // * The paypal button id to find\r\n});\r\n```\r\n\r\n<br />\r\n\r\n## Modes\r\n\r\nUX Cart comes with a couple of different options for storage results.\r\nSee [endpoint](#endpoint) for what data is sent.\r\n\r\n##### API:\r\n`storageType: UX.storeOptions.api`\r\n\r\nYour own endpoint can be provided that will handle and store the\r\nresults.\r\n> Your api must be able to recieve requests and store them\r\n\r\n##### Local Storage:\r\n`storageType: UX.storeOptions.local`\r\n\r\nThe ux cart application can store the results as a `json`\r\nresults object in local storage.\r\n\r\n##### File Download:\r\nThe results can be downloaded as a text file\r\n\r\n`storageType: UX.storeOptions.textFile`\r\n\r\nor an Excel spreadsheet\r\n\r\n`storageType: UX.storeOptions.excelFile`\r\n\r\n##### Console Log:\r\nThe results can be logged to the console for future use\r\n\r\n`storageType: UX.storeOptions.console`\r\n\r\n##### No option:\r\nNo option can be selected or the option can be optional\r\n\r\n`storageType: UX.storeOptions.none`\r\n\r\n##### Other:\r\nIf you want any other results a function can be called to\r\ncollect the data as object\r\n\r\n```javascript\r\nconst results = UX.collect();\r\n\r\n// Collecting the different types of results, JS Destruct\r\nconst { error, timeSeconds, modeSelected } = results;\r\n```\r\n\r\n<br />\r\n\r\n## Endpoint:\r\n\r\nThe UX Cart application can process the results in different modes,\r\nfor each of those a list of what data is sent to the endpoint, localstorage,\r\nand as a txt / excel file.\r\n\r\n- `timeSeconds` - The amount of time the process took\r\n- `modeSelected` - The selected payment mode\r\n- `errors` - The amount of times the user went back\r\n\r\n## Examples\r\n\r\nA couple of different example options for the config setup can be\r\nseen below.\r\n\r\nThe first is using the paypal and credit buttons with an api endpoint\r\n```javascript\r\nUX.init({\r\n    total, // The total amount for the cart\r\n    cart, // The list of products as an array\r\n    storageType: UX.storeOptions.api,\r\n    parentId: 'page-container',\r\n    payCardId: 'card-btn', \r\n    payPaypalId: 'paypal-btn',\r\n});\r\n```\r\n\r\n\r\nThe second is using text download and all 3 buttons\r\n```javascript\r\nUX.init({\r\n    total, // The total amount for the cart\r\n    cart, // The list of products as an array\r\n    storageType: UX.storeOptions.textFile,\r\n    parentId: 'checkout-page',\r\n    payCardId: 'buy-debit', \r\n    payPaypalId: 'buy-paypal',\r\n    payAppleId: 'buy-apple',\r\n});\r\n```\r\n\r\n## Demo\r\n\r\nThis cart comes with a demo php server to test the functionality.\r\nTo start the website navigate to the downloaded folder and run\r\n```shell script\r\n$ npm run demo\r\n```\r\nto start the webserver and navigate to\r\n\r\n```http request\r\nlocalhost:8000/demo\r\n```\r\n\r\nTo edit the demo configuration navigate to the __demo/checkout.js__\r\nand edit the UX configuration on __line 33__\r\n\r\n```javascript\r\n// Initialize the UX class\r\nUX.init({\r\n    cart,\r\n    total,\r\n    storageType: UX.options.console,\r\n    endpoint: '/storeResult.php',\r\n    payCardId: 'pay-card',\r\n    payAppleId: 'pay-apple',\r\n    payPaypalId: 'pay-paypal',\r\n    parentId: 'page-container'\r\n});\r\n```","readmeFilename":"README.md"}