{"_id":"@coveops/no-results-recommendations","_rev":"40-02ad162ea686bac4e237781bf14a9762","name":"@coveops/no-results-recommendations","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@coveops/no-results-recommendations","version":"1.0.0","keywords":[],"author":"","license":"Apache-2.0","_id":"@coveops/no-results-recommendations@1.0.0","maintainers":[{"name":"coveoit","email":"itaccounts@coveo.com"},{"name":"yass1408","email":"yassine_lakhdar@hotmail.com"},{"name":"gfoumbi","email":"gfoumbi@coveo.com"},{"name":"rvundavalli","email":"rvundavalli@coveo.com"},{"name":"jwolfe-coveo","email":"jwolfe@coveo.com"},{"name":"sfecteau","email":"sfecteau@coveo.com"},{"name":"mthusscoveo","email":"mthuss@coveo.com"},{"name":"jfleurent","email":"jfleurent@coveo.com"},{"name":"eqcoveo","email":"equinn@coveo.com"},{"name":"jmdro","email":"jmdrolet@coveo.com"},{"name":"davebouffard","email":"dbouffard@coveo.com"},{"name":"jfallaire","email":"jeanfrancois.allaire@gmail.com"},{"name":"achouan","email":"achouan@coveo.com"},{"name":"hsinghcoveo","email":"hsingh@coveo.com"},{"name":"wnijmeijer","email":"wnijmeijer@coveo.com"},{"name":"lgcarrierbedard","email":"lgcarrier@coveo.com"},{"name":"elafleur_coveo","email":"elafleur@coveo.com"},{"name":"plavigueur","email":"plavigueur@coveo.com"},{"name":"eaubin","email":"eaubin@coveo.com"},{"name":"alavigne81","email":"alavigne@coveo.com"}],"dist":{"shasum":"789c81e0587fed3c52a7f972a36bb5b520444bf9","tarball":"https://registry.npmjs.org/@coveops/no-results-recommendations/-/no-results-recommendations-1.0.0.tgz","fileCount":9,"integrity":"sha512-baUU5pTH5g0Jy4kKhi2GXgnf56omNz4iphroPN6MNn6KP4OW4/QP2TFAJAoJqfaD2MqDzstN9BnPDYlKqGAs6w==","signatures":[{"sig":"MEUCIQDH908CiEDlz8eYe3J5kVB/l5hiBvYp/0WK4/nYkaPk7wIgV3YJR7RS7CdfVfz7ght+/S9OJz8JtLJQiee4u2ZAGGQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42270,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFD29CRA9TVsSAnZWagAAqHkP/jXuCJyKe0NvpzmjGT+2\nxPpwLpgRQ4qYH0bFy/UzwVg2ZnzU4J7AQmBHb7rKVmQI4ldZJ4O32JikzXzk\ndQNitg3k6jtZAQtVnalptQ+iFYch+WRYHtV1gruDx7xSOc+UBt9O8jK68qf3\ntdvk1J4xUL4M5DfBI3oijd9jEwvhI5iuE0baPmVYlSwVaJFjTi5gzPBfMB1W\n6fN66KAbYb7Brbr/hwDwWJKUEVckzIaitRrNfUR9fptzIA45jgYOIeEEUbA5\nEbXgt9YhwdFjpsd8M/NR9jvLb+p7Lno6ZJPK1pif16EPBMAnfTJvO8HIEptO\nTa+fn/cWPNuA04NSSFVbl4mBc8HdX6mQ+XJV/RQZWnNaXAecgCRKY3f4W3A5\n6O48lTvvseSYr6B/LxAfqIjJ+4MNzk2SaKuRYrwHFGZFwUKqhd1YIN3bKJxh\nwt83LFTDJikALsfHUAiO0uvIoSEN3amNZR8gkGX5ZsBg86tx9YLAa5wZVE+M\nuIOLzMtdfiso8kUg44I4L5hAwMX1vL+ibveMAB28hIoQ1kC1AqbbZXv+BZaO\noAHs6KronFNFurtEa497sbTWi8CdUuwE1bq46V05gXHQwPtqsDK5kjJ7vydS\nAAKBKKndsULEZuF2OypYl3amBO4Opj3yz74nv2YfJ+VYU58VsqFtyKXTXcaj\n6x6R\r\n=m3XM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"d19d05b865045c10a31a4e85b6668c66d5586616","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"coveops build NoResultsRecommendation --template typescript","serve":"coveops serve","watch":"coveops build NoResultsRecommendation --template typescript --watch","precompile":"npm run build"},"_npmUser":{"name":"jmdro","email":"jmdrolet@coveo.com"},"_npmVersion":"6.14.6","description":"Adding recommendations on no results page","directories":{},"_nodeVersion":"12.18.3","dependencies":{"coveo-search-ui":"^2.10082.5","@coveops/turbo-core":"^1.1.1"},"_hasShrinkwrap":false,"devDependencies":{"@coveops/cli":"^0.14.0"},"_npmOperationalInternal":{"tmp":"tmp/no-results-recommendations_1.0.0_1611939261254_0.12135615800946087","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@coveops/no-results-recommendations","version":"1.0.1","keywords":[],"author":"","license":"Apache-2.0","_id":"@coveops/no-results-recommendations@1.0.1","maintainers":[{"name":"coveoit","email":"itaccounts@coveo.com"},{"name":"yass1408","email":"yassine_lakhdar@hotmail.com"},{"name":"gfoumbi","email":"gfoumbi@coveo.com"},{"name":"rvundavalli","email":"rvundavalli@coveo.com"},{"name":"jwolfe-coveo","email":"jwolfe@coveo.com"},{"name":"sfecteau","email":"sfecteau@coveo.com"},{"name":"mthusscoveo","email":"mthuss@coveo.com"},{"name":"jfleurent","email":"jfleurent@coveo.com"},{"name":"eqcoveo","email":"equinn@coveo.com"},{"name":"jmdro","email":"jmdrolet@coveo.com"},{"name":"davebouffard","email":"dbouffard@coveo.com"},{"name":"jfallaire","email":"jeanfrancois.allaire@gmail.com"},{"name":"achouan","email":"achouan@coveo.com"},{"name":"hsinghcoveo","email":"hsingh@coveo.com"},{"name":"wnijmeijer","email":"wnijmeijer@coveo.com"},{"name":"lgcarrierbedard","email":"lgcarrier@coveo.com"},{"name":"elafleur_coveo","email":"elafleur@coveo.com"},{"name":"plavigueur","email":"plavigueur@coveo.com"},{"name":"eaubin","email":"eaubin@coveo.com"},{"name":"alavigne81","email":"alavigne@coveo.com"}],"dist":{"shasum":"3528a35e151616020238776616bc0ff146768d66","tarball":"https://registry.npmjs.org/@coveops/no-results-recommendations/-/no-results-recommendations-1.0.1.tgz","fileCount":9,"integrity":"sha512-ZsxPf6UURAo2Ob0WofIQPgLUEBKnoH7vxpoYNQwm3MwarqEIU8UWst2ea75wH0K0oljYSmjpwCtjZnR+DDWuMQ==","signatures":[{"sig":"MEUCIFpy0PTxSrTng6Lc3SKxbc5Z2DTDJU3NYfCF1pAZ5j6xAiEAugqzooqFqN4qCwvWlCCh+yIbDmqCZ5T8h47HMCYF+WU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42273,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGBziCRA9TVsSAnZWagAA+PcP/2Zki/013FjzVsFocJQy\nQLWNbwAYqIdr+x+cevrwd0KfMH1gpiqIDy1ft7hOFHUx8lz5GHeVkMriuISJ\n/byXfC+pl5C7CCCyP5ixBbcxJ0V9yFp9oBawgvNpAQkGr86/UQnSwTHuoMdz\nwRc0XBeKQmljyFbOye/D926vqqW6g2h3p1GwueXrjVMJMvKVP4Hb5164iZcW\nUwgbt0UQzISCSk88waOElZtNS/mTAjOpryjcy2gMD5B99SMkYHnCZ35ashIO\nEp7ZxrXSNOl+PCAmG09qa9aTBM/I/tJx3GM3NBbq3nTbM7+WYlloWF/x6yiO\n0l0lu1zgKH4otMVrw5hVPrdIVdkRCCwV0oTiJy8iT062/OT4MDup6lXF2bZ7\nYwTvelkW44AhcCOmxo/1ezVIGB0qXuD+bs+xMHp4qgfLt5UB5mBqm5X+kfYR\nudWxn1W1/VeFhaeXPmBo7fcb3rP/g0vGxz734fAsKOwig5+NCi6pS1fCQ/R8\nTZu9ZxPN7N+0aY3Z3uGWBTQ/G38KMWoMbgL42kTjkqz/e+Wwule2zttXyVn8\nrrR1BSfbS2e+4UE+qwzWL5cmhKSCW9F6aFN7bRxGXP5WpNri2w9fYB/MNDi2\nyo2Vp3O4qcWuvgkVEeh0E+7UKiK+n1F9AlhggYp5U8/62HgXu8hmD/tRfH42\nZlmi\r\n=CB0F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"5c14c267fa8309fce3a851c2144b813f591a9d1f","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"coveops build NoResultsRecommendation --template typescript","serve":"coveops serve","watch":"coveops build NoResultsRecommendation --template typescript --watch","precompile":"npm run build"},"_npmUser":{"name":"jmdro","email":"jmdrolet@coveo.com"},"_npmVersion":"6.14.6","description":"Adding recommendations on no results page","directories":{},"_nodeVersion":"12.18.3","dependencies":{"coveo-search-ui":"^2.10082.5","@coveops/turbo-core":"^1.1.1"},"_hasShrinkwrap":false,"devDependencies":{"@coveops/cli":"^0.14.0"},"_npmOperationalInternal":{"tmp":"tmp/no-results-recommendations_1.0.1_1612192993705_0.07718794562972353","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-01-29T16:54:21.040Z","modified":"2026-05-13T17:46:25.102Z","1.0.0":"2021-01-29T16:54:21.401Z","1.0.1":"2021-02-01T15:23:13.912Z"},"license":"Apache-2.0","keywords":[],"description":"Adding recommendations on no results page","maintainers":[{"email":"jfleurent@coveo.com","name":"jfleurent"},{"email":"jmdrolet@coveo.com","name":"jmdro"},{"email":"jeanfrancois.allaire@gmail.com","name":"jfallaire"},{"email":"achouan@coveo.com","name":"achouan"},{"email":"lpblais@coveo.com","name":"lpblais-coveo"},{"email":"watallah@coveo.com","name":"watallah"},{"email":"eshahneh@coveo.com","name":"ehsanshahneh"},{"email":"belbizri@coveo.com","name":"belbizri"},{"email":"jpurohit@coveo.com","name":"jpurohit_coveo"},{"email":"acherney2@coveo.com","name":"acherney2c"},{"email":"jcharron@coveo.com","name":"jcharron-coveo"},{"email":"oa-npmcoveops@oacvo.com","name":"oa-npmcoveops"}],"readme":"# NoResultsRecommendation\n\nThe `NoResultsRecommendation` is a wrapper for `Recommendation` component to display recommendations on a Coveo no results page. The component listens to the main search interface and wait for the no results page to be displayed before initializing the child `Recommendation` component. \n\nThe component also takes care of showing/hiding the `Recommendation` component based on the \"no results\" state of the main search interface without triggering additional queries.\n\nDisclaimer: This component was built by the community at large and is not an official Coveo JSUI Component. Use this component at your own risk.\n\n## Getting Started\n\n1. Install the component into your project.\n\n```\nnpm i @coveops/no-results-recommendations\n```\n\n2. Use the Component or extend it\n\nTypescript:\n\n```javascript\nimport { NoResultsRecommendation, INoResultsRecommendationOptions } from '@coveops/no-results-recommendations';\n```\n\nJavascript\n\n```javascript\nconst NoResultsRecommendation = require('@coveops/no-results-recommendations').NoResultsRecommendation;\n```\n\n3. You can also expose the component alongside other components being built in your project.\n\n```javascript\nexport * from '@coveops/no-results-recommendations'\n```\n\n4. Or for quick testing, you can add the script from unpkg\n\n```html\n<script src=\"https://unpkg.com/@coveops/no-results-recommendations@latest/dist/index.min.js\"></script>\n```\n\n> Disclaimer: Unpkg should be used for testing but not for production.\n\n5. Include the component in your template as follows:\n\nPlace the component in your markup:\n\n```html\n<div class=\"CoveoNoResultsRecommendation\">\n    <div class=\"CoveoRecommendation\">\n    <div class=\"coveo-recommendation-header\">\n        <div class=\"coveo-recommendation-title\" style=\"padding-left: 15px;\">Recommendations</div>\n    </div>\n    <div class=\"coveo-recommendation-body\">\n        <div class=\"CoveoResultList\" data-layout=\"list\">\n        <script id=\"Default\" class=\"result-template\" type=\"text/html\" data-layout=\"list\">\n            <div class=\"coveo-result-row\" style=\"display: flex; align-items: center;\">\n                <div class=\"coveo-result-cell\" style=\"margin-left: 10px;margin-right: 10px;height: 30px;\">\n                    <div class=\"CoveoIcon\" data-small=\"true\" data-with-label=\"false\"></div>\n                </div>\n                <div class=\"coveo-result-cell\">\n                    <a class=\"CoveoResultLink\" data-open-in-sub-tab=\"true\" data-always-open-in-new-window=\"true\"></a>\n                </div>\n            </div>\n            </div>\n            </script>\n        </div>\n    </div>\n    </div>\n</div>\n```\n\n## Options\n\n\n`NoResultsRecommendation` is responsible of the initilization of his child `Recommendation` component. It means all options you want to pass to your `Recommendation` component need to be passed to your `NoResultsRecommendation` component.\n\n\n```javascript\n<script>\n    document.addEventListener('DOMContentLoaded', function () {\n      // Coveo.SearchEndpoint.endpoints['default'].options.queryStringArguments.viewAllContent = 'true';\n      Coveo.init(document.getElementById('search'), {\n        Analytics: {\n          searchHub: demoConfig.searchHub,\n        },\n        SearchInterface: {\n          pipeline: 'default'\n        },\n        NoResultsRecommendation: {\n          SearchInterface: {\n            pipeline: 'default',\n            resultsPerPage: 3\n          } \n        }\n      });\n    })\n  </script>\n```\n\n> Note: You need to use `SearchInterface` for the options instead of `Recommendation` because for some reasons Coveo framework will override `Recommendation` options by default settings.\n\n\n## Extending\n\nExtending the component can be done as follows:\n\n```javascript\nimport { NoResultsRecommendation, INoResultsRecommendationOptions } from \"@coveops/no-results-recommendations\";\n\nexport interface IExtendedNoResultsRecommendationOptions extends INoResultsRecommendationOptions {}\n\nexport class ExtendedNoResultsRecommendation extends NoResultsRecommendation {}\n```\n\n## Contribute\n\n1. Clone the project\n2. Copy `.env.dist` to `.env` and update the COVEO_ORG_ID and COVEO_TOKEN fields in the `.env` file to use your Coveo credentials and SERVER_PORT to configure the port of the sandbox - it will use 8080 by default.\n3. Build the code base: `npm run build`\n4. Serve the sandbox for live development `npm run serve`","readmeFilename":"README.md"}