{"_id":"@coveops/show-if-field-value","_rev":"38-efa15e46f9603f2679112f049fbf6071","name":"@coveops/show-if-field-value","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@coveops/show-if-field-value","version":"1.0.0","keywords":[],"author":"","license":"Apache-2.0","_id":"@coveops/show-if-field-value@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"}],"dist":{"shasum":"866d1938eb2f97f88cb1904904f50ca573352231","tarball":"https://registry.npmjs.org/@coveops/show-if-field-value/-/show-if-field-value-1.0.0.tgz","fileCount":9,"integrity":"sha512-JT9UGgLwHdYJlNP3jGloQJrR/a/v9Q6Rb5zY5lpjkl932oZFIlwWhJS5W7Gjr9G8wwl8rIPuF5JowOh0e0xVMA==","signatures":[{"sig":"MEUCIQC7iDFfURvhX1F5AG2cBqOwLisqZcD07rdmsz4bSzqPXQIgCw+Khaw4XHO3GgJnW46BjZs78QAseBfv6OGFi9aNFXY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38123,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJXAkCRA9TVsSAnZWagAA8CQP/006Ua6LCEXNHwsluaQN\ndk4BnQX3lTJxreXaztt5l71+WReNGFC5OqLarzkvumDhVWjX2bVIOC1/Tcyz\neRlFxVwUJGXviyo49xIV/I4KqgZ9w12pD+XwhPpOHUoiURnvCf1bUGQXiroL\nWMbNhnwZQnqCs34XSv/Zv+Xz+Ahm42PEuGtBND3xiCmO7l4KMIX88Fzju4k8\nNa/aPeAfqTN5eXwG8fAmuRfB2UHp+vYM78hQZwzPSCEWNTzvlxvabxp5PEIL\npr/y2KZC9hvYXGXsJYSq42r6K4ZrM0dnYR8uNYzgVdvP9AgNCEIsBf4j8keX\nfWG/gUb6tNQ2XBFQtpAKs+A+YwqM8mt9iZjwDJYCQJItmGGy6JzxUeWuRj25\nxtFEPDz0/99gdoCcnhwaaOG66VUMPqm7Z+TCTwwRtw9l9x73TgPnQsuFpvsi\nKqSH5xwfKlJ1FPd6ZaKh49m7gCvPZQibF7UYXGJOEXgvbPzWg3OGdTEsjmLZ\nB+kcmsL8d12we3vExZxVTqJBxL7FM/0xDj21jRHF9kIrrpr6ZGGRHK2R0Ozz\nohJTRBhFLw74Dl6m/MLmgwBTQ2OU5MM0T963Zm36haJqbgw+3uMm+HZQITJJ\nJ1PBFY04iUOsmK9SlmnRaD1yWts8oamCLE+5mwCF5+FqOs0n2CpArVtIlVKz\nFHZw\r\n=OVB/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"82b524093725a9e6b40019028d4bdc6a35ba1caa","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"coveops build TestComponent --template typescript","serve":"coveops serve","watch":"coveops build TestComponent --template typescript --watch","precompile":"npm run build"},"_npmUser":{"name":"jwolfe-coveo","email":"jwolfe@coveo.com"},"_npmVersion":"6.10.2","description":"Disclaimer: This component was built by the community at large and is not an official Coveo JSUI Component. Use this component at your own risk.","directories":{},"_nodeVersion":"12.9.1","dependencies":{"coveo-search-ui":"^2.10082.8","@coveops/turbo-core":"^1.1.1","@coveops/localization-manager":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@coveops/cli":"^0.14.2"},"_npmOperationalInternal":{"tmp":"tmp/show-if-field-value_1.0.0_1613066276031_0.2488753579678653","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-02-11T17:57:55.814Z","modified":"2026-05-13T17:46:54.391Z","1.0.0":"2021-02-11T17:57:56.139Z"},"license":"Apache-2.0","keywords":[],"description":"Disclaimer: This component was built by the community at large and is not an official Coveo JSUI Component. Use this component at your own risk.","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":"# ShowIfFieldValue\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\nPurpose: \n\nIn a Result Template, show or hide markup if a specified field and value matches the component's options.\n\nOptions:\n\n- field: field you want to display on the result template\n- fieldValue: the value to match for the content of the element to be displayed\n\n```html\n<div class=\"CoveoShowIfFieldValue\" data-field=\"@filetype\" data-field-value=\"lithiummessage\">\n    show this message if result's @filetype field value is \"lithiummessage\"\n</div>\n```\n\n## Getting Started\n\n1. Install the component into your project.\n\n```\nnpm i @coveops/show-if-field-value\n```\n\n2. Use the Component or extend it\n\nTypescript:\n\n```javascript\nimport { ShowIfFieldValue, IShowIfFieldValueOptions } from '@coveops/show-if-field-value';\n```\n\nJavascript\n\n```javascript\nconst ShowIfFieldValue = require('@coveops/show-if-field-value').ShowIfFieldValue;\n```\n\n3. You can also expose the component alongside other components being built in your project.\n\n```javascript\nexport * from '@coveops/show-if-field-value'\n```\n\n4. Or for quick testing, you can add the script from unpkg\n\n```html\n<script src=\"https://unpkg.com/@coveops/show-if-field-value@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, inside a Result Template:\n\n```html\n<div class=\"CoveoShowIfFieldValue\"></div>\n```\n\n## Extending\n\nExtending the component can be done as follows:\n\n```javascript\nimport { ShowIfFieldValue, IShowIfFieldValueOptions } from \"@coveops/show-if-field-value\";\n\nexport interface IExtendedTestComponentOptions extends IShowIfFieldValueOptions {}\n\nexport class ExtendedTestComponent extends ShowIfFieldValue {}\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"}