{"_id":"@coveops/collapsible-contents","_rev":"41-75a64317b8ffbab6aec9c44c5d239e0c","name":"@coveops/collapsible-contents","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@coveops/collapsible-contents","version":"1.0.0","keywords":[],"author":"","license":"Apache-2.0","_id":"@coveops/collapsible-contents@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":"9d91791db4f2ba78e21f5309a6e0c07f173784ba","tarball":"https://registry.npmjs.org/@coveops/collapsible-contents/-/collapsible-contents-1.0.0.tgz","fileCount":12,"integrity":"sha512-K1G4BpNvGi1zAloQPDHckgcPGr27ReTzNdm0SlSz3qInrAap2mbwNSdlcO0M77U+5nyLuS007h0beEjibqVvPQ==","signatures":[{"sig":"MEUCIElSyOrvzYxdi2Bpx94bg++Jl0Iaxc4ukPm4+bnVCWmwAiEAr7wCLwVpvVnPrpb07/F1yVkVX+TJgiNJXhgIDj3NcMc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61841,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+7WxCRA9TVsSAnZWagAAXpUP/ip2H0dAiEF3D710Mn88\nuPxxU9q+04raqV5jf6zssw2O6p8+ybYq2TyatXYrXSZJUXtk5z0X0UmJVho4\n8AFXi3rYrlArhkmnHbad2U0URE5Pv+4UntLQqgZ96vY4Xnxp8UczYnSCuY+D\nsQ5dqLRig0qZ3OR5vIaj5yAXw79NjPKwr4Z5DUvGe3IdxSOFw69Tf3zRabd5\nahDDYNX5BUYjmnYn6x0oBE8Tmpz1nv3R0krC4BjcILuv8vWXfeolTva8sqU/\nKLzU8y6yHOpsPyxKnF/KQdLoASDm8r/Pf8E4p53uS5D/cHhf6Ae+21t/nMum\nQ+Nt7lQLQveTEI2I43LKb3y6gXyrN43bcViuM6qlSqLQTftq1ylQf7roP2bO\nlBUZNCaFbPmTWRbC3J9IoQDSaN2mJ5VuHYUxZLmvMc8dn+vDqQleHxacvT9h\nQel0MCQxWGYbN5hPKXJo05j0kvc75d5HE3pABLQsk1ntxHMJRQD5a5CIhf7M\nchzfAOPsrbvWgwq4lScxhnd8d32AXObPSrfrp2zpi2LwJpLAFWdi2NvW8nGo\nkc67VTNyCzGtaRTJHm1J9iNuTXd4nHupsfVwcI/sLE31iK0a3I8r9u254GuS\nlOM/8199aIoIxyYXhU4do6ET+NiwlmlrepfRukCvolr8IxtgCK9laPBvvxNQ\nDYgT\r\n=3ZiR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"19a03bd45dc0faaf167b7599359c856bf308332c","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"coveops build CollapsibleContents --template typescript","serve":"coveops serve","watch":"coveops build CollapsibleContents --template typescript --watch","precompile":"npm run build"},"_npmUser":{"name":"jwolfe-coveo","email":"jwolfe@coveo.com"},"_npmVersion":"6.10.2","description":"This package comes with two components:","directories":{},"_nodeVersion":"12.9.1","dependencies":{"coveo-search-ui":"^2.10081.5","@coveops/turbo-core":"^1.1.1","@coveops/localization-manager":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@coveops/cli":"^0.13.2"},"_npmOperationalInternal":{"tmp":"tmp/collapsible-contents_1.0.0_1610331568756_0.9672817809794734","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@coveops/collapsible-contents","version":"1.0.1","keywords":[],"author":"","license":"Apache-2.0","_id":"@coveops/collapsible-contents@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":"5146ae06393fa3d2630d563444f7e33282a8f3bc","tarball":"https://registry.npmjs.org/@coveops/collapsible-contents/-/collapsible-contents-1.0.1.tgz","fileCount":12,"integrity":"sha512-fRHiJZDVwGeYt7rfYAie2LTfW0PTyEmd60XL3Jixvjk1RTWzdCwEzRF+G3VJZCXBwDbH/gy7swirAQLnLdDMBQ==","signatures":[{"sig":"MEUCIBf0auCi2bVpjBGQ9NdlgCen4xgJMcGCTpJFmrYE8LAgAiEAghHaaNAqY+zH7xm+IIebxGF9w4YsqcIVDfJUe3JobPE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61842,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+7iACRA9TVsSAnZWagAA0mYP/i1BN4wTmQm6XGBLprez\nD+kujJ7x+cNXXgF+rG5w/XyUlAyydmtKQIipVCl9ISftmWvYXrmv9hSDduQ5\nsps5vwIdcUYEqxnoqPcJS2SYj6Trkb2GH90mqQI/m7fyzMnqzNAtDjJ6G/7q\ngVNoTZtQZs5D+Vnk1xPT3yPfV8Ov4KySfknF6vHrN2banjPSSlQJAqfoJaaA\n19r2p6wAxhFcUGHHYm78FiMV/nyJCAd5xeXEgl3dKmP9WjmFHbeVk+IXm7S6\nf6jTezj6LDMawLWRZQQJa+ZFKVxgdoBATwgiqjYqiOAxMAaQ0L3pMzmT1u7t\nrhIztGLelbX6KPhFzHa3i7lSfVpuQB3Y3YziXn5afuYAgjlubk0Vf2a0Q/0C\n6AFm0TuXtHYz6ncZE9Saz13OqOY6hmrr2oO+QUyXOPE/hwbLXwzIA9Eg/Odn\nwLHrHfwSrI99Zf9tS3l88ffOFRyFHNkjxkNeBNiykiX15ax33RwDIKb9bK4X\nsUIcmjc9PMO0hPPm0KQdsTL2Wb/aJT7wsF13VcMztC0CTpwM3PFgj6tFiXgX\ni86Knu5qRaUsbq3Lxuv1rScNQMe+VHjqu+E/Xic5Njc92Jg55OARtTP/ffoA\nJeJZrcP0NToOPUoRdPcZkDlEMffoXQgSQtENEC13DuaFwc0WnnFqANdQ0/QU\nfGZk\r\n=SVIg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"798567d24371949bbaa59c0b7b3e3c62386dc056","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"coveops build CollapsibleContents --template typescript","serve":"coveops serve","watch":"coveops build CollapsibleContents --template typescript --watch","precompile":"npm run build"},"_npmUser":{"name":"jwolfe-coveo","email":"jwolfe@coveo.com"},"_npmVersion":"6.10.2","description":"This package comes with two components:","directories":{},"_nodeVersion":"12.9.1","dependencies":{"coveo-search-ui":"^2.10081.5","@coveops/turbo-core":"^1.1.1","@coveops/localization-manager":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@coveops/cli":"^0.13.2"},"_npmOperationalInternal":{"tmp":"tmp/collapsible-contents_1.0.1_1610332287486_0.24594482685188646","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@coveops/collapsible-contents","version":"1.0.2","keywords":[],"author":"","license":"Apache-2.0","_id":"@coveops/collapsible-contents@1.0.2","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":"ef4beaa0e7b95f1619bb5c21bef7cf0847de585f","tarball":"https://registry.npmjs.org/@coveops/collapsible-contents/-/collapsible-contents-1.0.2.tgz","fileCount":12,"integrity":"sha512-2DK4PfKJEcO2tKk+KGQllR1aekFtfNNRzbTHjFtChMXKDqag8ousP7O/3uFGkAX4z628895/Ex9oeFGQiMcUjA==","signatures":[{"sig":"MEYCIQDeYymuHX1CEc1gbldg0slxKzN/vyVzoJ+OSahEY8F2JgIhAIi6FdLcNDhpioV+WiGOIcW0kpkyZEceLEPkYbIMnIlu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+7j/CRA9TVsSAnZWagAAJyAP/jSjHBzq0Y1wHNz48Yas\nvtqg9YdQciDTz5vi28Ot5qWjoDUhtX9ORnzOqJMPIsSc/fpLSkScibP8MxNO\nM3G2t1wZehiA0W+KzR1RVdqg/yqonZIDHKiRpBg3egIZBYDQfH0dRnSi8Dts\nNTuAuYpWcx340pZNMAoRuPrwoOcTgqFGd/VDFMNgd1oJAn2IZr+hepGjMBLz\nj91Z0gHthIJAqJ3BFYyLYkYt2uIQ4EQrc8GMyqFQ6Yo+zYAi1HajkgCismVk\nPjBkjtP6nLwGtH6nhzS3pg0+kysGW+OyVV+MBjD7O4zxTiWA8TLYYCP5+x80\n9PrT49za3kJfwcoYnLbwbuy1qJzO9swpQA5wwqFY4+Bhug8s/7RxavRit6a+\nHgAkcp9SwgWJfLbeK7WgbtANJN3TsoUvnYGre5N4fwcoOWaXjzFWLMdm+gJJ\nW2rBLC5tTZ2j4QUTEsFH/JICDlCI46lN1AUjLN2TdWAzkpoLNg6FDGcXyD+e\ngiTPmQKpAdPDVw2IcoBYGPy0HeOX8nUd/qQdxz3On8UoilqpWRu0hKO9fBsb\ngwFzAuFxkC2yvn88vqiEeQwSFZYoAYiUmnme5asC39yFJIou/h/eEtji5GF0\nnD91Rks4BlaEYx8rr9S/VMehur3G2bYI9yv7P8hQUPI4ZhdbnZXDlVaqdI5y\nrP9r\r\n=v+R/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"9b22d75b06c2f84460a5f58ed33d281e4b3520a6","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"coveops build CollapsibleContents --template typescript","serve":"coveops serve","watch":"coveops build CollapsibleContents --template typescript --watch","precompile":"npm run build"},"_npmUser":{"name":"jwolfe-coveo","email":"jwolfe@coveo.com"},"_npmVersion":"6.10.2","description":"This package comes with two components:","directories":{},"_nodeVersion":"12.9.1","dependencies":{"coveo-search-ui":"^2.10081.5","@coveops/turbo-core":"^1.1.1","@coveops/localization-manager":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@coveops/cli":"^0.13.2"},"_npmOperationalInternal":{"tmp":"tmp/collapsible-contents_1.0.2_1610332415410_0.4771374308662346","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-01-11T02:19:28.565Z","modified":"2026-05-13T17:46:07.114Z","1.0.0":"2021-01-11T02:19:28.878Z","1.0.1":"2021-01-11T02:31:27.675Z","1.0.2":"2021-01-11T02:33:35.569Z"},"license":"Apache-2.0","keywords":[],"description":"This package comes with two components:","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":"# CollapsibleContents\n\nThis package comes with two components:\n\n* `CollapsibleContents`: A component which makes contents in its child elements collapsible\n* `CompactView`: A component that acts as a global state toggle\n\nThis package also comes with a utility responsible for managing the state when the components are used together.\n\n* `CompactViewStateProvider`\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/collapsible-contents\n```\n\n2. Use the Component or extend it\n\nTypescript:\n\n```javascript\nimport { CollapsibleContents, ICollapsibleContentsOptions } from '@coveops/collapsible-contents';\n```\n\nJavascript\n\n```javascript\nconst CollapsibleContents = require('@coveops/collapsible-contents').CollapsibleContents;\n```\n\n3. You can also expose the component alongside other components being built in your project.\n\n```javascript\nexport * from '@coveops/collapsible-contents'\n```\n\n4. Or for quick testing, you can add the script from unpkg\n\n```html\n<script src=\"https://unpkg.com/@coveops/collapsible-contents@latest/dist/index.min.js\"></script>\n```\n\n> Disclaimer: Unpkg should be used for testing but not for production.\n\n5. Include the CSS in the root `index.scss`\n\n```css\n@import '../../node_modules/@coveops/collapsible-contents/dist/css/index.css';\n```\n\nOr for quick testing, you can add the styles from unpkg\n\n```css\n <link rel=\"stylesheet\" href=\"https://unpkg.com/@coveops/collapsible-contents@latest/dist/css/index.css\" />\n```\n\n6. Include the component in your template as follows:\n\nPlace the CollapsibleContents component in your markup:\n\n```html\n<div class=\"CoveoCollapsibleContents\"></div>\n```\n\n### Options\n\n| Field | Type | Default | Description |\n| --- | --- | --- | --- |\n| persistState | boolean | true | Toggles whether the global toggled state should be synchronized with localstorage. |\n| collapsedMaxHeight | string | 0px | Sets the max height to use when the contents are minimized. To achieve a toggle based on number of lines, you can pass `calc(1.25em * 2)` where 1.25 is the line-height and 2 is the number of lines that are desired when the component is minimized. |\n| collapseSymbol | string | svg: arrow up | The symbol to use to indicate the user can collapse the contents. |\n| expandSymbol | string | svg: arrow down | The symbol to use to indicate the user can expand the contents. |\n| defaultState | string | minimized | The default state to use when a new user loads the UX for the first time. |\n| toggleFloat | string | right | The default placement of the toggle. Takes values compatible with the float css property. |\n\nPlace the CompactView component in your markup:\n\n```html\n<div class=\"CoveoCompactView\"></div>\n```\n\n### Options\n\n| Field | Type | Default | Description |\n| --- | --- | --- | --- |\n| minimizedByDefault | boolean | true | Allows default behavior to be tweaked to initialize the component. |\n| expandedCaption | string | Compact View | The caption to use to indicate the user can collapse all CollapsibleContents components. |\n| minimizedCaption | string | Default View | The caption to use to indicate the user can expand all CollapsibleContents components. |\n| target | string | .CoveoCollapsibleContents | The target class to search for in the code, ideally unique to the group that uses this toggle. By default, the component will toggle all CollapsibleContents elements on the page - even nested ones. |\n\nSee `pages/index.html`\n\n## Extending\n\nExtending the component can be done as follows:\n\n```javascript\nimport { CollapsibleContents, ICollapsibleContentsOptions } from \"@coveops/collapsible-contents\";\n\nexport interface IExtendedCollapsibleContentsOptions extends ICollapsibleContentsOptions {}\n\nexport class ExtendedCollapsibleContents extends CollapsibleContents {}\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"}