create-instantsearch-app 5.0.0 → 5.1.2
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/CHANGELOG.md +24 -25
- package/package.json +3 -3
- package/src/templates/Angular InstantSearch/package.json +12 -13
- package/src/templates/Autocomplete/package.json +1 -1
- package/src/templates/InstantSearch.js/index.html.hbs +0 -2
- package/src/templates/InstantSearch.js/package.json +1 -1
- package/src/templates/InstantSearch.js widget/package.json.hbs +1 -1
- package/src/templates/JavaScript Helper 2/package.json +1 -1
- package/src/templates/React InstantSearch/.template.js +1 -1
- package/src/templates/React InstantSearch/package.json +1 -1
- package/src/templates/React InstantSearch/src/App.js.hbs +6 -6
- package/src/templates/React InstantSearch Native/App.js.hbs +14 -29
- package/src/templates/React InstantSearch Native/app.json +1 -1
- package/src/templates/React InstantSearch Native/package.json +15 -14
- package/src/templates/React InstantSearch Native/src/InfiniteHits.js.hbs +3 -3
- package/src/templates/React InstantSearch Native/src/SearchBox.js.hbs +1 -0
- package/src/templates/React InstantSearch widget/package.json.hbs +1 -1
- package/src/templates/Vue InstantSearch/.template.js +1 -1
- package/src/templates/Vue InstantSearch/package.json +1 -1
- package/src/templates/Vue InstantSearch/src/App.vue +2 -4
- package/src/templates/Vue InstantSearch 2/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,58 +1,57 @@
|
|
|
1
|
-
|
|
1
|
+
## [5.1.2](https://github.com/algolia/create-instantsearch-app/compare/5.1.1...5.1.2) (2022-02-02)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
* **
|
|
6
|
+
* **angular:** remove @types/algoliasearch dep ([#553](https://github.com/algolia/create-instantsearch-app/issues/553)) ([b280725](https://github.com/algolia/create-instantsearch-app/commit/b2807252dff74f79d887c746327f03f28f53840d))
|
|
7
|
+
* **angular:** update angular packages ([#555](https://github.com/algolia/create-instantsearch-app/issues/555)) ([9987264](https://github.com/algolia/create-instantsearch-app/commit/9987264f32582721ac2a8e7f3348fa3d54be3975))
|
|
8
|
+
* **React InstantSearch:** import RefinementList if DynamicWidgets used ([#554](https://github.com/algolia/create-instantsearch-app/issues/554)) ([402ec63](https://github.com/algolia/create-instantsearch-app/commit/402ec63261db8a60aa6927e84ec46d45eb27fef3))
|
|
7
9
|
|
|
8
10
|
|
|
9
|
-
### Code Refactoring
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
## [5.1.1](https://github.com/algolia/create-instantsearch-app/compare/5.1.0...5.1.1) (2022-01-03)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **react-native:** update template and related dependencies ([#546](https://github.com/algolia/create-instantsearch-app/issues/546)) ([858d33f](https://github.com/algolia/create-instantsearch-app/commit/858d33fb01272e8a13964a739c247743cbd855dc))
|
|
12
18
|
|
|
13
19
|
|
|
14
|
-
### BREAKING CHANGES
|
|
15
20
|
|
|
16
|
-
|
|
21
|
+
# [5.1.0](https://github.com/algolia/create-instantsearch-app/compare/5.0.1...5.1.0) (2021-12-14)
|
|
17
22
|
|
|
18
|
-
* postprocess answers
|
|
19
23
|
|
|
20
|
-
|
|
24
|
+
### Features
|
|
21
25
|
|
|
22
|
-
*
|
|
26
|
+
* **templates:** use non-experimental dynamic widgets ([#544](https://github.com/algolia/create-instantsearch-app/issues/544)) ([efda539](https://github.com/algolia/create-instantsearch-app/commit/efda5395cef7865c7b4cebe741e7ab5e8ea4b2f8))
|
|
23
27
|
|
|
24
|
-
* more info
|
|
25
28
|
|
|
26
|
-
* update to newer commander to fix the "name" issue
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
## [5.0.1](https://github.com/algolia/create-instantsearch-app/compare/5.0.0...5.0.1) (2021-12-02)
|
|
29
31
|
|
|
30
|
-
* error for empty string path
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
### Bug Fixes
|
|
33
34
|
|
|
34
|
-
*
|
|
35
|
+
* **dynamicWidgets:** allow only dynamicWidgets as attribute ([3717de6](https://github.com/algolia/create-instantsearch-app/commit/3717de6fc5811c191629d366988dcc2e05773a9c))
|
|
35
36
|
|
|
36
|
-
* silently check for existing answers on appName
|
|
37
37
|
|
|
38
|
-
* don't ask initial questions if config is set
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
# [5.0.0](https://github.com/algolia/create-instantsearch-app/compare/4.11.1...5.0.0) (2021-12-02)
|
|
41
40
|
|
|
42
|
-
* write tests
|
|
43
41
|
|
|
44
|
-
|
|
42
|
+
### Bug Fixes
|
|
45
43
|
|
|
46
|
-
*
|
|
44
|
+
* **dynamicWidgets:** prevent "ais.dynamicWidgets" attribute showing up ([#542](https://github.com/algolia/create-instantsearch-app/issues/542)) ([559f705](https://github.com/algolia/create-instantsearch-app/commit/559f705ebcef48a3794efd7a588abd187d6642c9))
|
|
47
45
|
|
|
48
|
-
* make .default apply always
|
|
49
46
|
|
|
50
|
-
|
|
47
|
+
### Code Refactoring
|
|
48
|
+
|
|
49
|
+
* **index:** rewrite answer parsing ([#541](https://github.com/algolia/create-instantsearch-app/issues/541)) ([efd2799](https://github.com/algolia/create-instantsearch-app/commit/efd279943e23545c3c0806f8e9632ae32c83c0d6))
|
|
51
50
|
|
|
52
|
-
* cover initialQuestions in tests
|
|
53
51
|
|
|
54
|
-
|
|
52
|
+
### BREAKING CHANGES
|
|
55
53
|
|
|
54
|
+
the program now asks questions if some of the parameters are sent via arguments. Before this, giving an argument would cause it not to ask any questions anymore, even if they still would be useful. You can avoid this behaviour by passing --config or --no-interactive
|
|
56
55
|
|
|
57
56
|
|
|
58
57
|
## [4.11.1](https://github.com/algolia/create-instantsearch-app/compare/4.11.0...4.11.1) (2021-11-18)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-instantsearch-app",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "⚡️ Build InstantSearch apps at the speed of thought",
|
|
6
6
|
"keywords": [
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"node": ">= 10"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@algolia/cache-in-memory": "4
|
|
40
|
-
"algoliasearch": "4
|
|
39
|
+
"@algolia/cache-in-memory": "4",
|
|
40
|
+
"algoliasearch": "4",
|
|
41
41
|
"chalk": "3.0.0",
|
|
42
42
|
"commander": "4.1.1",
|
|
43
43
|
"inquirer": "8.0.0",
|
|
@@ -10,25 +10,24 @@
|
|
|
10
10
|
},
|
|
11
11
|
"private": true,
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@angular/animations": "12.2.
|
|
14
|
-
"@angular/common": "12.2.
|
|
15
|
-
"@angular/compiler": "12.2.
|
|
16
|
-
"@angular/core": "12.2.
|
|
17
|
-
"@angular/forms": "12.2.
|
|
18
|
-
"@angular/platform-browser": "12.2.
|
|
19
|
-
"@angular/platform-browser-dynamic": "12.2.
|
|
20
|
-
"@angular/router": "12.2.
|
|
21
|
-
"algoliasearch": "4
|
|
13
|
+
"@angular/animations": "12.2.16",
|
|
14
|
+
"@angular/common": "12.2.16",
|
|
15
|
+
"@angular/compiler": "12.2.16",
|
|
16
|
+
"@angular/core": "12.2.16",
|
|
17
|
+
"@angular/forms": "12.2.16",
|
|
18
|
+
"@angular/platform-browser": "12.2.16",
|
|
19
|
+
"@angular/platform-browser-dynamic": "12.2.16",
|
|
20
|
+
"@angular/router": "12.2.16",
|
|
21
|
+
"algoliasearch": "4",
|
|
22
22
|
"angular-instantsearch": "{{libraryVersion}}",
|
|
23
23
|
"rxjs": "6.6.0",
|
|
24
24
|
"tslib": "2.3.0",
|
|
25
25
|
"zone.js": "0.11.4"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@angular-devkit/build-angular": "12.2.
|
|
29
|
-
"@angular/cli": "12.2.
|
|
30
|
-
"@angular/compiler-cli": "12.2.
|
|
31
|
-
"@types/algoliasearch": "4.0.0",
|
|
28
|
+
"@angular-devkit/build-angular": "12.2.16",
|
|
29
|
+
"@angular/cli": "12.2.16",
|
|
30
|
+
"@angular/compiler-cli": "12.2.16",
|
|
32
31
|
"@types/jasmine": "3.8.0",
|
|
33
32
|
"@types/node": "12.11.1",
|
|
34
33
|
"jasmine-core": "3.8.0",
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
|
|
32
32
|
<div class="container">
|
|
33
33
|
<div class="search-panel">
|
|
34
|
-
{{#if attributesForFaceting}}
|
|
35
34
|
<div class="search-panel__filters">
|
|
36
35
|
{{#if flags.dynamicWidgets}}
|
|
37
36
|
<div id="dynamic-widgets"></div>
|
|
@@ -42,7 +41,6 @@
|
|
|
42
41
|
{{/if}}
|
|
43
42
|
</div>
|
|
44
43
|
|
|
45
|
-
{{/if}}
|
|
46
44
|
<div class="search-panel__results">
|
|
47
45
|
<div id="searchbox"></div>
|
|
48
46
|
<div id="hits"></div>
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@testing-library/jest-dom": "5.11.9",
|
|
49
49
|
"@typescript-eslint/eslint-plugin": "4.16.1",
|
|
50
50
|
"@typescript-eslint/parser": "4.16.1",
|
|
51
|
-
"algoliasearch": "4
|
|
51
|
+
"algoliasearch": "4",
|
|
52
52
|
"algoliasearch-helper": "3.4.4",
|
|
53
53
|
"babel-jest": "26.6.3",
|
|
54
54
|
"babel-plugin-add-import-extension": "1.5.0",
|
|
@@ -6,11 +6,13 @@ import {
|
|
|
6
6
|
SearchBox,
|
|
7
7
|
{{#if flags.dynamicWidgets}}
|
|
8
8
|
Configure,
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
DynamicWidgets,
|
|
10
|
+
RefinementList,
|
|
11
|
+
{{else}}
|
|
11
12
|
{{#if attributesForFaceting}}
|
|
12
13
|
RefinementList,
|
|
13
14
|
{{/if}}
|
|
15
|
+
{{/if}}
|
|
14
16
|
Pagination,
|
|
15
17
|
{{#if attributesToDisplay}}
|
|
16
18
|
Highlight,
|
|
@@ -39,15 +41,14 @@ function App() {
|
|
|
39
41
|
<div className="container">
|
|
40
42
|
<InstantSearch searchClient={searchClient} indexName="{{indexName}}">
|
|
41
43
|
<div className="search-panel">
|
|
42
|
-
{{#if attributesForFaceting}}
|
|
43
44
|
<div className="search-panel__filters">
|
|
44
45
|
{{#if flags.dynamicWidgets}}
|
|
45
46
|
<Configure facets={['*']} maxValuesPerFacet={20} />
|
|
46
|
-
<
|
|
47
|
+
<DynamicWidgets fallbackWidget={RefinementList}>
|
|
47
48
|
{{#each attributesForFaceting}}
|
|
48
49
|
<RefinementList attribute="{{this}}" />
|
|
49
50
|
{{/each}}
|
|
50
|
-
</
|
|
51
|
+
</DynamicWidgets>
|
|
51
52
|
{{else}}
|
|
52
53
|
{{#each attributesForFaceting}}
|
|
53
54
|
<RefinementList attribute="{{this}}" />
|
|
@@ -55,7 +56,6 @@ function App() {
|
|
|
55
56
|
{{/if}}
|
|
56
57
|
</div>
|
|
57
58
|
|
|
58
|
-
{{/if}}
|
|
59
59
|
<div className="search-panel__results">
|
|
60
60
|
<SearchBox
|
|
61
61
|
className="searchbox"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, View, SafeAreaView, StatusBar } from 'react-native';
|
|
3
|
-
import algoliasearch from 'algoliasearch
|
|
3
|
+
import algoliasearch from 'algoliasearch';
|
|
4
4
|
import { InstantSearch } from 'react-instantsearch-native';
|
|
5
5
|
import SearchBox from './src/SearchBox';
|
|
6
6
|
import InfiniteHits from './src/InfiniteHits';
|
|
@@ -21,33 +21,18 @@ const styles = StyleSheet.create({
|
|
|
21
21
|
},
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
style
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<StatusBar barStyle="light-content" />
|
|
38
|
-
<View style={styles.container}>
|
|
39
|
-
<InstantSearch
|
|
40
|
-
searchClient={searchClient}
|
|
41
|
-
indexName="{{indexName}}"
|
|
42
|
-
root={this.root}
|
|
43
|
-
>
|
|
44
|
-
<SearchBox />
|
|
45
|
-
<InfiniteHits />
|
|
46
|
-
</InstantSearch>
|
|
47
|
-
</View>
|
|
48
|
-
</SafeAreaView>
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
24
|
+
const App = () => {
|
|
25
|
+
return (
|
|
26
|
+
<SafeAreaView style={styles.safe}>
|
|
27
|
+
<StatusBar barStyle="light-content" />
|
|
28
|
+
<View style={styles.container}>
|
|
29
|
+
<InstantSearch searchClient={searchClient} indexName="{{indexName}}">
|
|
30
|
+
<SearchBox />
|
|
31
|
+
<InfiniteHits />
|
|
32
|
+
</InstantSearch>
|
|
33
|
+
</View>
|
|
34
|
+
</SafeAreaView>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
52
37
|
|
|
53
38
|
export default App;
|
|
@@ -10,22 +10,23 @@
|
|
|
10
10
|
"eject": "expo eject"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"algoliasearch": "
|
|
14
|
-
"expo": "
|
|
15
|
-
"prop-types": "15.
|
|
16
|
-
"react": "
|
|
13
|
+
"algoliasearch": "4",
|
|
14
|
+
"expo": "44.0.3",
|
|
15
|
+
"prop-types": "15.8.0",
|
|
16
|
+
"react": "17.0.2",
|
|
17
17
|
"react-instantsearch-native": "{{libraryVersion}}",
|
|
18
|
-
"react-native": "
|
|
18
|
+
"react-native": "0.64.3"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"babel
|
|
22
|
-
"
|
|
23
|
-
"eslint
|
|
24
|
-
"eslint-config-
|
|
25
|
-
"eslint-
|
|
26
|
-
"eslint-plugin-
|
|
27
|
-
"eslint-plugin-
|
|
28
|
-
"
|
|
29
|
-
"
|
|
21
|
+
"@babel/core": "7.16.5",
|
|
22
|
+
"babel-preset-expo": "9.0.2",
|
|
23
|
+
"eslint": "8.5.0",
|
|
24
|
+
"eslint-config-algolia": "20.0.0",
|
|
25
|
+
"eslint-config-prettier": "8.3.0",
|
|
26
|
+
"eslint-plugin-import": "2.25.3",
|
|
27
|
+
"eslint-plugin-prettier": "4.0.0",
|
|
28
|
+
"eslint-plugin-react": "7.28.0",
|
|
29
|
+
"expo-cli": "5.0.3",
|
|
30
|
+
"prettier": "2.5.1"
|
|
30
31
|
}
|
|
31
32
|
}
|
|
@@ -20,12 +20,12 @@ const styles = StyleSheet.create({
|
|
|
20
20
|
},
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
-
const InfiniteHits = ({ hits, hasMore,
|
|
23
|
+
const InfiniteHits = ({ hits, hasMore, refineNext }) => (
|
|
24
24
|
<FlatList
|
|
25
25
|
data={hits}
|
|
26
26
|
keyExtractor={item => item.objectID}
|
|
27
27
|
ItemSeparatorComponent={() => <View style={styles.separator} />}
|
|
28
|
-
onEndReached={() => hasMore &&
|
|
28
|
+
onEndReached={() => hasMore && refineNext()}
|
|
29
29
|
renderItem={({ item }) => (
|
|
30
30
|
<View style={styles.item}>
|
|
31
31
|
{{#if attributesToDisplay}}
|
|
@@ -50,7 +50,7 @@ const InfiniteHits = ({ hits, hasMore, refine }) => (
|
|
|
50
50
|
InfiniteHits.propTypes = {
|
|
51
51
|
hits: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
52
52
|
hasMore: PropTypes.bool.isRequired,
|
|
53
|
-
|
|
53
|
+
refineNext: PropTypes.func.isRequired,
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
export default connectInfiniteHits(InfiniteHits);
|
|
@@ -17,15 +17,14 @@
|
|
|
17
17
|
<div class="container">
|
|
18
18
|
<ais-instant-search :search-client="searchClient" index-name="{{indexName}}">
|
|
19
19
|
<div class="search-panel">
|
|
20
|
-
{{#if attributesForFaceting.length}}
|
|
21
20
|
<div class="search-panel__filters">
|
|
22
21
|
{{#if flags.dynamicWidgets}}
|
|
23
22
|
<ais-configure :facets="['*']" :max-values-per-facet.camel="20" />
|
|
24
|
-
<ais-
|
|
23
|
+
<ais-dynamic-widgets>
|
|
25
24
|
{{#each attributesForFaceting}}
|
|
26
25
|
<ais-refinement-list attribute="{{this}}" />
|
|
27
26
|
{{/each}}
|
|
28
|
-
</ais-
|
|
27
|
+
</ais-dynamic-widgets>
|
|
29
28
|
{{else}}
|
|
30
29
|
{{#each attributesForFaceting}}
|
|
31
30
|
<ais-refinement-list attribute="{{this}}" />
|
|
@@ -33,7 +32,6 @@
|
|
|
33
32
|
{{/if}}
|
|
34
33
|
</div>
|
|
35
34
|
|
|
36
|
-
{{/if}}
|
|
37
35
|
<div class="search-panel__results">
|
|
38
36
|
<div class="searchbox">
|
|
39
37
|
<ais-search-box placeholder="{{searchPlaceholder}}" />
|