{"_id":"@adapt-retail/adapt-event","_rev":"4-540f43e6a3024c45fcd2c2c5eeb3b7c0","name":"@adapt-retail/adapt-event","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@adapt-retail/adapt-event","version":"0.1.0","description":"Dispatch events eventa to adapt and other.","main":"dist/index.js","scripts":{"test":"npm run build && ava","tdd":"executor 'npm run test' --watch='**/*.js' --ignore='node_modules/' --ignore='dist/'","build":"babel src -d dist","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/AdaptRetail/adapt-event.git"},"keywords":["adapt-retail","adapt","banners","instore-tv","template"],"author":{"name":"Lasse S. Haslev"},"license":"ISC","bugs":{"url":"https://github.com/AdaptRetail/adapt-event/issues"},"homepage":"https://github.com/AdaptRetail/adapt-event#readme","devDependencies":{"@lassehaslev/executor":"^1.0.1","ava":"^0.25.0","babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","browser-env":"^3.2.5","sinon":"^4.4.2"},"ava":{"require":["./test/helpers/setup-browser-env.js","./test/helpers/adapt-event.js"]},"gitHead":"e6e534b25d7d483bf79f7db0156a0c899f856d85","_id":"@adapt-retail/adapt-event@0.1.0","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"lassehaslev","email":"lasse@haslev.no"},"dist":{"integrity":"sha512-crVh/M3lcd9dXRfMKOwTb/p6wNEFpcfU5lS7D3j9ukC60wEuV5G9KQt+puHQH60meTLz0yu1qGrarjN60TenjA==","shasum":"76fb42388b4de5d3b8b559446013216d5fc03fef","tarball":"https://registry.npmjs.org/@adapt-retail/adapt-event/-/adapt-event-0.1.0.tgz","fileCount":14,"unpackedSize":28055,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDSSkImzoGcZBbUnPkQpTxXX0CoDkVvUsJxsYcwGmUNvAiACE/pqlvVJptURJPSwUS2RIN6kriFj/XW2VToU2YzOCg=="}]},"maintainers":[{"name":"adapt-retail-owner","email":"lasse.haslev@kodient.com"},{"name":"lassehaslev","email":"lasse@haslev.no"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/adapt-event_0.1.0_1519644717519_0.6712448222918315"},"_hasShrinkwrap":false},"0.2.0":{"name":"@adapt-retail/adapt-event","version":"0.2.0","description":"Dispatch events eventa to adapt and other.","main":"dist/index.js","scripts":{"test":"npm run build && ava","tdd":"executor 'npm run test' --watch='**/*.js' --ignore='node_modules/' --ignore='dist/'","build":"babel src -d dist","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/AdaptRetail/adapt-event.git"},"keywords":["adapt-retail","adapt","banners","instore-tv","template"],"author":{"name":"Lasse S. Haslev"},"license":"ISC","bugs":{"url":"https://github.com/AdaptRetail/adapt-event/issues"},"homepage":"https://github.com/AdaptRetail/adapt-event#readme","devDependencies":{"@lassehaslev/executor":"^1.0.1","ava":"^0.25.0","babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","browser-env":"^3.2.5","sinon":"^4.4.2"},"ava":{"require":["./test/helpers/setup-browser-env.js","./test/helpers/adapt-event.js"]},"gitHead":"c685a382d4596a350ab6df8c2d157a703fdd5554","_id":"@adapt-retail/adapt-event@0.2.0","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"lassehaslev","email":"lasse@haslev.no"},"dist":{"integrity":"sha512-DbKEjKwaChn7oIR0cGhTOYyRFzuD6du+wXAQUnQ2IwJ8XH4rUn/RRTqBWnYCqrTfFBiYGhrG17hTmwep2BAYlw==","shasum":"bbc0304e7ebd957559a997b132cd419c339338c0","tarball":"https://registry.npmjs.org/@adapt-retail/adapt-event/-/adapt-event-0.2.0.tgz","fileCount":18,"unpackedSize":43587,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBYIy5niMhyEdm3mQkMPi5Hfcf2f2CLUNoafD/0l7iBnAiBqCvKIbKcKa0CzoYwmrMxVEXG8wPOqt0prrH4J/W7UXA=="}]},"maintainers":[{"name":"adapt-retail-owner","email":"lasse.haslev@kodient.com"},{"name":"lassehaslev","email":"lasse@haslev.no"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/adapt-event_0.2.0_1519896509150_0.32633344026623834"},"_hasShrinkwrap":false},"0.2.1":{"name":"@adapt-retail/adapt-event","version":"0.2.1","description":"Dispatch events eventa to adapt and other.","main":"dist/index.js","scripts":{"test":"npm run build && ava","tdd":"executor 'npm run test' --watch='**/*.js' --ignore='node_modules/' --ignore='dist/'","build":"babel src -d dist","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/AdaptRetail/adapt-event.git"},"keywords":["adapt-retail","adapt","banners","instore-tv","template"],"author":{"name":"Lasse S. Haslev"},"license":"ISC","bugs":{"url":"https://github.com/AdaptRetail/adapt-event/issues"},"homepage":"https://github.com/AdaptRetail/adapt-event#readme","devDependencies":{"@lassehaslev/executor":"^1.0.1","ava":"^0.25.0","babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","browser-env":"^3.2.5","sinon":"^4.4.2"},"ava":{"require":["./test/helpers/setup-browser-env.js","./test/helpers/adapt-event.js"]},"gitHead":"4959bad4ea66b089147bc809af0382735d4549e6","_id":"@adapt-retail/adapt-event@0.2.1","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"lassehaslev","email":"lasse@haslev.no"},"dist":{"integrity":"sha512-ThKsAWGinyVposA8v75s3lZv/fhTl9srHbv43yWL7ZCxvnupX3xP41wFvyolOFKdcNSVbEVaxa8ispnwQ5f2tg==","shasum":"f74efd68865722e4d8aec72a32e019aa837d1957","tarball":"https://registry.npmjs.org/@adapt-retail/adapt-event/-/adapt-event-0.2.1.tgz","fileCount":17,"unpackedSize":41967,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrtK2iWekeWPCcOHNCJw3K5py7jE+9cyQtab+P9TG6XwIgaOKP5erlKxk2K+IYflcA2LtmJC5JOXbnXuWyJ3nIfTU="}]},"maintainers":[{"name":"adapt-retail-owner","email":"lasse.haslev@kodient.com"},{"name":"lassehaslev","email":"lasse@haslev.no"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/adapt-event_0.2.1_1519904594183_0.9805680035222888"},"_hasShrinkwrap":false}},"time":{"created":"2018-02-26T11:31:57.452Z","0.1.0":"2018-02-26T11:31:57.579Z","modified":"2022-04-04T11:25:48.380Z","0.2.0":"2018-03-01T09:28:29.283Z","0.2.1":"2018-03-01T11:43:14.285Z"},"maintainers":[{"name":"adapt-retail-owner","email":"lasse.haslev@kodient.com"},{"name":"lassehaslev","email":"lasse@haslev.no"}],"description":"Dispatch events eventa to adapt and other.","homepage":"https://github.com/AdaptRetail/adapt-event#readme","keywords":["adapt-retail","adapt","banners","instore-tv","template"],"repository":{"type":"git","url":"git+https://github.com/AdaptRetail/adapt-event.git"},"author":{"name":"Lasse S. Haslev"},"bugs":{"url":"https://github.com/AdaptRetail/adapt-event/issues"},"license":"ISC","readme":"# @adapt-retail/adapt-data\n> ⚠️ This package has not been released as a stable release, and changes may occur.\n\n> Easy dispatching of events in [Adapt Retail](https://adaptretail.com).\n\n- [Install](#install)\n- [Usage](#usage)\n    - [Import](#import)\n    - [Dispatch events](#dispatch-event)\n- [Plugins](#plugins)\n    - [Default plugins](#default-plugins)\n- [Development](#development)\n    \n\n<a name=\"install\"></a>\n## Install\n\n```bash\nnpm install @adapt-retail/adapt-event\n```\n\n<a name=\"usage\"></a>\n## Usage\n\nThe event class will help you dispatch events in Adapt Retail.\nYou can use it to track whatever event you like, but we got some preconfigured events for you.\n\n<a name=\"import\"></a>\n### Import to project\n\nWhen installed, simply import the package with normal node syntax.\n\n```js\n// EcmaScript6 and up\nimport AdaptEvent from '@adapt-retail/adapt-event';\n```\n\n<a name=\"dispatch-event\"></a>\n### Dispatching events\n\n```js\n/*\n * @param event\n * @param description (optional)\n * @param position (optional)\n * \n * @return void\n */\nAdaptEvent.dispatch( 'Event name', 'Description' );\n```\n\nIf you dispatching an MouseEvent, add the event as the third parameter\nto track where the click occur.\n```js\nvar logo = document.querySelector( '.logo' );\n\nlogo.addEventListener( 'click', function( event ) {\n    AdaptEvent.dispatch( 'click', 'on-logo', event );\n} );\n```\n\n<a name=\"plugins\"></a>\n## Plugins\nIt is possible to extend the functionality of the AdaptEvent using plugins.\nThis could be f.eks. extending the event to match other display networks, such as Google Double Click and AdForm.\n> Read how to build your own [in the documentation](https://github.com/AdaptRetail/adapt-event/wiki/Plugins)\n\n```js\nAdaptEvent.addPlugin( new Plugin );\n```\n\n<a name=\"default-plugins\"></a>\n#### Default plugins\n\nWe are also including some default plugins to make your life easier.\n\n> Read more [in the documentation](https://github.com/AdaptRetail/adapt-event/wiki/Adapt-Click-Events)\n\n```js\n// Import and add plugin\nimport {\n    AdaptEvent,\n    AdaptClickEvent,\n    AdaptGoogleAnalythics\n} from '@adapt-retail/adapt-event';\n\nAdaptEvent.addPlugin( new AdaptClickEvent );\nAdaptEvent.addPlugin( new AdaptGoogleAnalythics );\n\n\n// Track a click \ndocument.querySelector( '.logo' ).adaptClick( function( event ) {\n    ...\n}, 'a-click', 'logo' );\n\n// Track click and navigate to url\ndocument.querySelector( '.logo' )\n    .adaptClickAndNavigate( 'https://adaptretail.com', 'navigate', 'from-logo' );\n```\n\n\n<a name=\"development\"></a>\n## Development\n```bash\n# Install dependencies\nnpm install\n\n# Run test suit\nnpm run test\n\n# Run test suite on file change\nnpm run tdd\n```\n","readmeFilename":"README.md"}