react-instantsearch 6.38.2 → 6.38.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/README.md +33 -136
- package/dist/package.json +5 -5
- package/dist/umd/Connectors.js +5 -2
- package/dist/umd/Connectors.js.map +1 -1
- package/dist/umd/Connectors.min.js +1 -1
- package/dist/umd/Connectors.min.js.map +1 -1
- package/dist/umd/Dom.js +6 -3
- package/dist/umd/Dom.js.map +1 -1
- package/dist/umd/Dom.min.js +1 -1
- package/dist/umd/Dom.min.js.map +1 -1
- package/package.json +5 -5
package/dist/README.md
CHANGED
|
@@ -4,20 +4,22 @@
|
|
|
4
4
|
</a>
|
|
5
5
|
|
|
6
6
|
<p align="center">
|
|
7
|
-
InstantSearch
|
|
7
|
+
InstantSearch is a JavaScript library for building performant and instant search experiences in vanilla JS, React, Vue and Angular with <a href="https://www.algolia.com/?utm_source=instantsearch.js&utm_campaign=repository">Algolia</a>.
|
|
8
8
|
</p>
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
[![Version][version-svg]][package-url]
|
|
14
13
|
[![License][license-image]][license-url]
|
|
15
14
|
[![Build Status][ci-svg]][ci-url]
|
|
16
|
-
[![Pull reminders][pull-reminders-svg]][pull-reminders-url]
|
|
17
15
|
|
|
18
|
-
InstantSearch
|
|
16
|
+
[InstantSearch][instantsearch-docs] is a JavaScript library that lets you create an instant-search result experience using [Algolia][algolia-website]’s search API.
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
There are multiple wrappers for popular frameworks, such as [React InstantSearch][react-instantsearch-docs], [Vue InstantSearch][vue-instantsearch-docs], and [Angular InstantSearch][angular-instantsearch-docs].
|
|
19
|
+
|
|
20
|
+
It is part of the InstantSearch family which is designed for different platforms:
|
|
21
|
+
|
|
22
|
+
**InstantSearch** | [Angular InstantSearch][instantsearch-angular-github] | [InstantSearch Android][instantsearch-android-github] | [InstantSearch iOS][instantsearch-ios-github]
|
|
21
23
|
|
|
22
24
|
<details>
|
|
23
25
|
<summary><strong>Table of contents</strong></summary>
|
|
@@ -26,15 +28,7 @@ InstantSearch.js is a vanilla JavaScript library that lets you create an instant
|
|
|
26
28
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
27
29
|
|
|
28
30
|
|
|
29
|
-
- [
|
|
30
|
-
- [Getting started](#getting-started)
|
|
31
|
-
- [Installation](#installation)
|
|
32
|
-
- [TypeScript users](#typescript-users)
|
|
33
|
-
- [Documentation](#documentation)
|
|
34
|
-
- [Demos](#demos)
|
|
35
|
-
- [Playground](#playground)
|
|
36
|
-
- [Browser support](#browser-support)
|
|
37
|
-
- [Troubleshooting](#troubleshooting)
|
|
31
|
+
- [Packages](#packages)
|
|
38
32
|
- [Contributing](#contributing)
|
|
39
33
|
- [License](#license)
|
|
40
34
|
|
|
@@ -42,116 +36,22 @@ InstantSearch.js is a vanilla JavaScript library that lets you create an instant
|
|
|
42
36
|
|
|
43
37
|
</details>
|
|
44
38
|
|
|
45
|
-
##
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
searchClient: algoliasearch('latency', '6be0576ff61c053d5f9a3225e2a90f76'),
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
search.addWidgets([
|
|
65
|
-
// 2. Create an interactive search box
|
|
66
|
-
instantsearch.widgets.searchBox({
|
|
67
|
-
container: '#searchbox',
|
|
68
|
-
placeholder: 'Search for products',
|
|
69
|
-
}),
|
|
70
|
-
|
|
71
|
-
// 3. Plug the search results into the product container
|
|
72
|
-
instantsearch.widgets.hits({
|
|
73
|
-
container: '#products',
|
|
74
|
-
templates: {
|
|
75
|
-
item: '{{#helpers.highlight}}{ "attribute": "name" }{{/helpers.highlight}}',
|
|
76
|
-
},
|
|
77
|
-
}),
|
|
78
|
-
|
|
79
|
-
// 4. Make the brands refinable
|
|
80
|
-
instantsearch.widgets.refinementList({
|
|
81
|
-
container: '#brand',
|
|
82
|
-
attribute: 'brand',
|
|
83
|
-
}),
|
|
84
|
-
]);
|
|
85
|
-
|
|
86
|
-
// 5. Start the search!
|
|
87
|
-
search.start();
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
<p align="center">
|
|
91
|
-
<a href="https://codesandbox.io/s/github/algolia/doc-code-samples/tree/master/InstantSearch.js/getting-started" title="Edit on CodeSandbox">
|
|
92
|
-
<img alt="Edit on CodeSandbox" src="https://codesandbox.io/static/img/play-codesandbox.svg">
|
|
93
|
-
</a>
|
|
94
|
-
</p>
|
|
95
|
-
|
|
96
|
-
To learn more about the library, follow the [getting started](https://www.algolia.com/doc/guides/building-search-ui/getting-started/js/) guide or check how to [add it to your own project](https://www.algolia.com/doc/guides/building-search-ui/installation/js/).
|
|
97
|
-
|
|
98
|
-
## Installation
|
|
99
|
-
|
|
100
|
-
```sh
|
|
101
|
-
npm install instantsearch.js algoliasearch
|
|
102
|
-
# or
|
|
103
|
-
yarn add instantsearch.js algoliasearch
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### TypeScript users
|
|
107
|
-
|
|
108
|
-
To use InstantSearch.js in a TypeScript environment, depending on your [`algoliasearch`](https://github.com/algolia/algoliasearch-client-javascript) version, you need to import different types.
|
|
109
|
-
|
|
110
|
-
>You still need to import these types even if you don't use InstantSearch.js with [`algoliasearch`](https://github.com/algolia/algoliasearch-client-javascript).
|
|
111
|
-
|
|
112
|
-
#### `algoliasearch` v4.x
|
|
113
|
-
|
|
114
|
-
This version uses types provided by both `algoliasearch` and `@algolia/client-search`.
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
yarn add algoliasearch@4 @algolia/client-search
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
#### `algoliasearch` v3.x
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
yarn add @types/algoliasearch@3
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
>v3.x is deprecated and will soon no longer be supported.
|
|
127
|
-
|
|
128
|
-
## Documentation
|
|
129
|
-
|
|
130
|
-
The documentation is available on the [Algolia website](https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/).
|
|
131
|
-
|
|
132
|
-
## Demos
|
|
133
|
-
|
|
134
|
-
| E-commerce | Media | Travel |
|
|
135
|
-
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
136
|
-
| <a href="https://instantsearchjs.netlify.com/examples/e-commerce/"><img src="https://www.algolia.com/doc/assets/images/build-search-ui/demos/e-commerce-2c7ed6b6.png" width="250" alt="E-commerce demo preview"></a> | <a href="https://instantsearchjs.netlify.com/examples/media/"><img src="https://www.algolia.com/doc/assets/images/build-search-ui/demos/media-articles-abc153ab.png" width="250" alt="Media demo preview"></a> | <a href="https://instantsearchjs.netlify.com/examples/tourism/"><img src="https://instantsearchjs.netlify.com/examples/tourism/capture.png" width="250" alt="Tourism demo preview"></a> |
|
|
137
|
-
|
|
138
|
-
See more demos [on the website](https://www.algolia.com/doc/guides/building-search-ui/resources/demos/js/).
|
|
139
|
-
|
|
140
|
-
## Playground
|
|
141
|
-
|
|
142
|
-
You can get to know InstantSearch.js on [this playground](https://codesandbox.io/s/github/algolia/instantsearch.js/tree/templates/instantsearch.js).
|
|
143
|
-
|
|
144
|
-
Start by [adding widgets](https://www.algolia.com/doc/guides/building-search-ui/widgets/showcase/js/) and tweaking the display. Once you feel familiar with the library, we recommend following the [getting started guide](https://www.algolia.com/doc/guides/building-search-ui/getting-started/js/).
|
|
145
|
-
|
|
146
|
-
## Browser support
|
|
147
|
-
|
|
148
|
-
We support the **last two versions of major browsers** (Chrome, Edge, Firefox, Safari).
|
|
149
|
-
|
|
150
|
-
Please refer to the [browser support](https://www.algolia.com/doc/guides/building-search-ui/installation/js/#browser-support) section in the documentation to use InstantSearch.js on other browsers.
|
|
151
|
-
|
|
152
|
-
## Troubleshooting
|
|
153
|
-
|
|
154
|
-
Encountering an issue? Before reaching out to support, we recommend heading to our [FAQ](https://www.algolia.com/doc/guides/building-search-ui/troubleshooting/faq/js/) where you will find answers for the most common issues and gotchas with the library.
|
|
39
|
+
## Packages
|
|
40
|
+
|
|
41
|
+
| Package | Version | Description |
|
|
42
|
+
| --- | --- | --- |
|
|
43
|
+
| [`create-instantsearch-app`](packages/create-instantsearch-app) | [](https://npmjs.org/package/create-instantsearch-app) | Command-line utility to quickly bootstrap a project with InstantSearch |
|
|
44
|
+
| [`instantsearch.css`](packages/instantsearch.css) | [](https://npmjs.org/package/instantsearch.css) | Default CSS themes for InstantSearch |
|
|
45
|
+
| [`instantsearch.js`](packages/instantsearch.js) | [](https://npmjs.org/package/instantsearch.js) | InstantSearch.js |
|
|
46
|
+
| [`react-instantsearch`](packages/react-instantsearch) | [](https://npmjs.org/package/react-instantsearch)| React InstantSearch (prefer using `react-instantsearch-hooks-web` instead) |
|
|
47
|
+
| [`react-instantsearch-core`](packages/react-instantsearch-core) | [](https://npmjs.org/package/react-instantsearch-core) | React InstantSearch Core (prefer using `react-instantsearch-hooks` instead) |
|
|
48
|
+
| [`react-instantsearch-dom`](packages/react-instantsearch-dom) | [](https://npmjs.org/package/react-instantsearch-dom) | React InstantSearch DOM (prefer using `react-instantsearch-hooks-web` instead) |
|
|
49
|
+
| [`react-instantsearch-dom-maps`](packages/react-instantsearch-dom-maps) | [](https://npmjs.org/package/react-instantsearch-dom-maps)| GeoSearch widget for React InstantSearch DOM |
|
|
50
|
+
| [`react-instantsearch-hooks`](packages/react-instantsearch-hooks) | [](https://npmjs.org/package/react-instantsearch-hooks) | React InstantSearch Hooks |
|
|
51
|
+
| [`react-instantsearch-hooks-server`](packages/react-instantsearch-hooks-server) | [](https://npmjs.org/package/react-instantsearch-hooks-server) | Utilities to do server-side rendering with React InstantSearch Hooks |
|
|
52
|
+
| [`react-instantsearch-hooks-web`](packages/react-instantsearch-hooks-web) | [](https://npmjs.org/package/react-instantsearch-hooks-web) | React InstantSearch Hooks bundled with UI components |
|
|
53
|
+
| [`react-instantsearch-native`](packages/react-instantsearch-native) | [](https://npmjs.org/package/react-instantsearch-native) | React InstantSearch Native (prefer using `react-instantsearch-hooks` instead) |
|
|
54
|
+
| [`vue-instantsearch`](packages/vue-instantsearch) | [](https://npmjs.org/package/vue-instantsearch) | Vue InstantSearch |
|
|
155
55
|
|
|
156
56
|
## Contributing
|
|
157
57
|
|
|
@@ -167,31 +67,28 @@ To start contributing to code, you need to:
|
|
|
167
67
|
1. [Fork the project](https://help.github.com/articles/fork-a-repo/)
|
|
168
68
|
1. [Clone the repository](https://help.github.com/articles/cloning-a-repository/)
|
|
169
69
|
1. Install the dependencies: `yarn`
|
|
170
|
-
1.
|
|
171
|
-
1. [Open the stories](http://localhost:6006)
|
|
70
|
+
1. [Pick a package to work on](#packages) and cd into it (e.g. `cd packages/react-instantsearch-hooks`)
|
|
172
71
|
|
|
173
72
|
Please read [our contribution process](CONTRIBUTING.md) to learn more.
|
|
174
73
|
|
|
175
74
|
## License
|
|
176
75
|
|
|
177
|
-
InstantSearch
|
|
76
|
+
InstantSearch is [MIT licensed][license-url].
|
|
178
77
|
|
|
179
78
|
<!-- Badges -->
|
|
180
79
|
|
|
181
|
-
[
|
|
182
|
-
[
|
|
183
|
-
[ci-svg]: https://img.shields.io/circleci/project/github/algolia/instantsearch.js.svg?style=flat-square
|
|
184
|
-
[ci-url]: https://circleci.com/gh/algolia/instantsearch.js
|
|
185
|
-
[pull-reminders-svg]: https://img.shields.io/badge/pull%20reminders-✓-success.svg?style=flat-square
|
|
186
|
-
[pull-reminders-url]: https://pullreminders.com?ref=badge
|
|
80
|
+
[ci-svg]: https://img.shields.io/circleci/project/github/algolia/instantsearch.svg?style=flat-square
|
|
81
|
+
[ci-url]: https://circleci.com/gh/algolia/instantsearch
|
|
187
82
|
[license-image]: http://img.shields.io/badge/license-MIT-green.svg?style=flat-square
|
|
188
83
|
[license-url]: LICENSE
|
|
189
84
|
|
|
190
85
|
<!-- Links -->
|
|
191
86
|
|
|
192
|
-
[algolia-website]: https://www.algolia.com/?utm_source=instantsearch.js&utm_campaign=repository
|
|
193
|
-
[
|
|
194
|
-
[
|
|
87
|
+
[algolia-website]: https://www.algolia.com/?utm_source=instantsearch.js&utm_campaign=repository "Algolia's website"
|
|
88
|
+
[instantsearch-docs]: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/?utm_source=instantsearch.js&utm_campaign=repository "InstantSearch.js documentation"
|
|
89
|
+
[react-instantsearch-docs]: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/react-hooks/?utm_source=instantsearch.js&utm_campaign=repository "React InstantSearch documentation"
|
|
90
|
+
[vue-instantsearch-docs]: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/vue/?utm_source=instantsearch.js&utm_campaign=repository "Vue InstantSearch documentation"
|
|
91
|
+
[angular-instantsearch-docs]: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/angular/?utm_source=instantsearch.js&utm_campaign=repository "Angular InstantSearch documentation"
|
|
195
92
|
[instantsearch-android-github]: https://github.com/algolia/instantsearch-android
|
|
196
93
|
[instantsearch-ios-github]: https://github.com/algolia/instantsearch-ios
|
|
197
94
|
[instantsearch-angular-github]: https://github.com/algolia/angular-instantsearch
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-instantsearch",
|
|
3
|
-
"version": "6.38.
|
|
3
|
+
"version": "6.38.3",
|
|
4
4
|
"description": "⚡ Lightning-fast search for React and React Native apps, by Algolia",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/es/index.js",
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@babel/runtime": "^7.1.2",
|
|
47
|
-
"react-instantsearch-core": "6.38.
|
|
48
|
-
"react-instantsearch-dom": "6.38.
|
|
49
|
-
"react-instantsearch-native": "6.38.
|
|
47
|
+
"react-instantsearch-core": "6.38.3",
|
|
48
|
+
"react-instantsearch-dom": "6.38.3",
|
|
49
|
+
"react-instantsearch-native": "6.38.3"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"algoliasearch": ">= 3.1 < 5",
|
|
53
53
|
"react": ">= 16.3.0 < 19"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "4c473604508a865a2488e064fdd3a415f416d14a"
|
|
56
56
|
}
|
package/dist/umd/Connectors.js
CHANGED
|
@@ -1301,7 +1301,8 @@
|
|
|
1301
1301
|
for (var key in source) {
|
|
1302
1302
|
if (
|
|
1303
1303
|
!Object.prototype.hasOwnProperty.call(source, key) ||
|
|
1304
|
-
key === '__proto__'
|
|
1304
|
+
key === '__proto__' ||
|
|
1305
|
+
key === 'constructor'
|
|
1305
1306
|
) {
|
|
1306
1307
|
continue;
|
|
1307
1308
|
}
|
|
@@ -5206,7 +5207,7 @@
|
|
|
5206
5207
|
|
|
5207
5208
|
var requestBuilder_1 = requestBuilder;
|
|
5208
5209
|
|
|
5209
|
-
var version = '3.11.
|
|
5210
|
+
var version = '3.11.2';
|
|
5210
5211
|
|
|
5211
5212
|
var escapeFacetValue$3 = escapeFacetValue_1.escapeFacetValue;
|
|
5212
5213
|
|
|
@@ -5456,8 +5457,10 @@
|
|
|
5456
5457
|
* @param {number} options.nbHits - Maximum number of answers to retrieve from the Answers Engine. Cannot be greater than 1000.
|
|
5457
5458
|
*
|
|
5458
5459
|
* @return {promise} the answer results
|
|
5460
|
+
* @deprecated answers is deprecated and will be replaced with new initiatives
|
|
5459
5461
|
*/
|
|
5460
5462
|
AlgoliaSearchHelper.prototype.findAnswers = function(options) {
|
|
5463
|
+
console.warn('[algoliasearch-helper] answers is no longer supported');
|
|
5461
5464
|
var state = this.state;
|
|
5462
5465
|
var derivedHelper = this.derivedHelpers[0];
|
|
5463
5466
|
if (!derivedHelper) {
|