Gathering detailed insights and metrics for coveo-search-ui
Gathering detailed insights and metrics for coveo-search-ui
Gathering detailed insights and metrics for coveo-search-ui
Gathering detailed insights and metrics for coveo-search-ui
npm install coveo-search-ui
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
131 Stars
3,641 Commits
77 Forks
15 Watching
86 Branches
78 Contributors
Updated on 23 Oct 2024
Minified
Minified + Gzipped
TypeScript (50.49%)
JavaScript (38.95%)
HTML (8.42%)
SCSS (1.93%)
Shell (0.09%)
EJS (0.09%)
Handlebars (0.02%)
Cumulative downloads
Total Downloads
Last day
-12.6%
749
Compared to previous day
Last week
-3%
3,541
Compared to previous week
Last month
-13.4%
16,876
Compared to previous month
Last year
4.9%
259,565
Compared to previous year
14
80
Coveo JavaScript Search UI Framework
The JavaScript Search Framework is currently in maintenance mode.
To create a new project, we recommend checking out the Atomic and Headless frameworks.
You should install the Coveo JavaScript Search UI Framework as an npm package:
npm install --save coveo-search-ui
All resources will be available under node_modules/coveo-search-ui/bin
. You can include those in your pages with <script>
tags. This will make the variable Coveo
globally available in your page.
If you are using a module bundler (Browserify, Webpack, rollup, etc.), you can use require('coveo-search-ui')
or import * as Coveo from 'coveo-search-ui'
.
Alternatively, you can download the Coveo JavaScript Search UI Framework (see Downloading the JavaScript Search Framework).
Since the April 2017 release, it is possible to access the resources of any specific Coveo JavaScript Search Framework
official release (from version 1.2537
on) through a content delivery network (CDN).
You can simply use a URL such as https://static.cloud.coveo.com/searchui/v[VERSION]/[PATH_TO_FILE]
, where you
replace [VERSION]
by the actual release version number you wish to use and [PATH_TO_FILE]
by the path of the file
you require.
For quick access to the latest CDN links, see JavaScript Search Framework CDN Links.
Example:
The following tags include the
1.2537
version (April 2017 release) of theCoveoJsSearch.min.js
,templateNew.js
andCoveoFullSearchNewDesign.css
files.<head> [ ... ] <script src="https://static.cloud.coveo.com/searchui/v1.2537/js/CoveoJsSearch.min.js"></script> <script src="https://static.cloud.coveo.com/searchui/v1.2537/js/templates/templatesNew.js"></script> <link rel="stylesheet" href="https://static.cloud.coveo.com/searchui/v1.2537/css/CoveoFullSearchNewDesign.css" /> [ ... ] </head>
<!-- Include the library scripts. -->
<script src="js/CoveoJsSearch.js"></script>
<script src="js/templates/templates.js"></script>
<!-- Each DOM element with a class starting with "Coveo" (uppercase) will instantiate a component. -->
<body id="search" class='CoveoSearchInterface'>
<!-- Each DOM element with a class starting with "coveo-" (lowercase) is strictly for CSS/alignment purpose. -->
<div class='coveo-search-section'>
<!-- Any Coveo component can be removed (or added); none is actually required for the page to "load". -->
<div class="CoveoSearchbox"></div>
</div>
<!-- The "data-" attributes of each component allow you to pass options to this specific component instance. -->
<div class="CoveoFacet" data-title="Author" data-field="@author" data-tab="All"></div>
<div class="CoveoFacet" data-title="Year" data-field="@year" data-tab="All"></div>
<script>
// The following line shows you how you could configure an endpoint against which to perform your search.
// Coveo.SearchEndpoint.configureCloudEndpoint('MyCoveoCloudEndpointName', 'my-authentication-token');
// We provide a sample endpoint with public sources for demo purposes.
Coveo.SearchEndpoint.configureSampleEndpoint();
// Initialize the framework by targeting the root in the interface.
// It does not have to be the document body.
Coveo.init(document.body);
</script>
</body>
You can find more examples of fully configured pages in the ./pages
folder.
A tutorial is available to help you get started (see Coveo JavaScript Search UI Framework Getting Started Tutorial).
You should have node 10.x installed to build this project.
npm install -g yarn
yarn global add gulp
yarn install
gulp
gulp default
: Builds the entire project (CSS, templates, TypeScript, etc.)gulp compile
: Builds only the TypeScript code and generates its output in the ./bin
folder.gulp unitTests
: Builds and runs the unit tests.gulp doc
: Generates the documentation website for the project.gulp dev
: Starts a webpack dev server for the project.gulp devTest
: Starts a webpack dev server for the unit tests.Make sure you were able to run gulp
entirely without any errors first. Then you can start the dev-server:
gulp dev
This will start a webpack-dev-server instance (see Webpack Dev Server).
You can now load http://localhost:8080/index.html in a web browser.
Any time you hit Save in a source file, the bundle will be recompiled and the dev page will reload.
If you need to modify the content of the search page (i.e., the markup itself, not the TypeScript code), modify the
index.html
page under ./bin
. This page is not committed to the repository, so you do not have to worry about
breaking anything. However, if you feel like you have a good reason to modify the original index.html
, feel free to
do so.
You might need to assign more memory to Webpack if you see errors about heap out of memory
. To do so, use this command :
node --max_old_space_size=8192 ./node_modules/gulp/bin/gulp.js dev;
Tests are written using Jasmine. You can use npm run test
to run
the tests in Chrome Headless.
If you wish to write new unit tests, you can do so by starting a new webpack-dev-server instance.
To start the server, run gulp devTest
.
Load http://localhost:8081/tests/SpecRunner.html.
Every time you hit Save in a source file, the dev server will reload and re-run your tests.
Code coverage will be reported in ./bin/coverage
Tests are written using Axe core. You can use npm run accessibilityTests
to run
the tests in Chrome Headless.
If you wish to write new tests, you can do so by starting a new webpack-dev-server instance.
To start the server, run gulp devAccessibilityTest
.
Load http://localhost:8082/tests/Accessibility.html.
General reference documentation is generated using TypeDoc (see Coveo JavaScript Search UI Framework - Reference Documentation). The generated reference documentation lists and describes all available options and public methods for each component.
Handwritten documentation with more examples is also available (see Coveo JavaScript Search UI Framework Home).
A tutorial is also available (see Coveo JavaScript Search UI Framework Getting Started Tutorial). If you are new to the Coveo JavaScript Search UI Framework, you should definitely consult this tutorial, as it contains valuable information.
You can also use Coveo Search to find answers to any specific issues/questions (see the Coveo Community Portal).
Please use the Coveo community to ask questions or to search for existing solutions.
No vulnerabilities found.
Reason
all changesets reviewed
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
SAST tool is not run on all commits -- score normalized to 9
Details
Reason
7 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
Project has not signed or included provenance with any releases.
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
98 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More