create-instantsearch-app 5.2.1 → 6.1.0
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/package.json +4 -5
- package/src/api/__tests__/__snapshots__/index.test.js.snap +4 -4
- package/src/templates/Angular InstantSearch/src/app/app.component.html.hbs +4 -1
- package/src/templates/InstantSearch.js/index.html.hbs +2 -4
- package/src/templates/InstantSearch.js/package.json +5 -11
- package/src/templates/InstantSearch.js/src/app.js.hbs +12 -6
- package/src/templates/React InstantSearch/public/index.html +1 -1
- package/src/templates/React InstantSearch/src/App.js.hbs +10 -4
- package/src/templates/React InstantSearch Hooks/.editorconfig +8 -0
- package/src/templates/React InstantSearch Hooks/.gitignore.template +23 -0
- package/src/templates/React InstantSearch Hooks/.prettierrc +5 -0
- package/src/templates/React InstantSearch Hooks/.template.js +24 -0
- package/src/templates/React InstantSearch Hooks/README.md +19 -0
- package/src/templates/React InstantSearch Hooks/favicon.png +0 -0
- package/src/templates/React InstantSearch Hooks/index.html +31 -0
- package/src/templates/React InstantSearch Hooks/package.json +20 -0
- package/src/templates/React InstantSearch Hooks/src/App.css +71 -0
- package/src/templates/React InstantSearch Hooks/src/App.tsx.hbs +110 -0
- package/src/templates/React InstantSearch Hooks/src/Panel.tsx +14 -0
- package/src/templates/React InstantSearch Hooks/src/index.tsx +5 -0
- package/src/templates/React InstantSearch widget/README.md +1 -1
- package/src/templates/React InstantSearch widget/package.json.hbs +2 -1
- package/src/templates/React InstantSearch widget/src/lib/connector.ts.hbs +6 -3
- package/src/templates/React InstantSearch widget/src/lib/widget.tsx.hbs +4 -4
- package/src/templates/React InstantSearch widget/src/types/connector.ts +17 -0
- package/src/templates/Vue InstantSearch/package.json +15 -14
- package/src/templates/Vue InstantSearch/public/index.html +1 -1
- package/src/templates/Vue InstantSearch/src/App.vue +18 -6
- package/src/templates/Vue InstantSearch 2/package.json +15 -14
- package/src/templates/Vue InstantSearch with Vue 3/README.md +2 -2
- package/src/templates/Vue InstantSearch with Vue 3/index.html +1 -1
- package/src/templates/Vue InstantSearch with Vue 3/package.json +1 -0
- package/src/templates/Vue InstantSearch with Vue 3/src/App.vue +9 -2
- package/src/utils/__tests__/__snapshots__/index.test.js.snap +1 -1
- package/src/utils/__tests__/index.test.js +2 -2
- package/CHANGELOG.md +0 -518
- package/src/templates/InstantSearch.js/manifest.webmanifest +0 -15
- package/src/templates/React InstantSearch widget/.gitignore +0 -5
|
@@ -10,23 +10,24 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"algoliasearch": "4",
|
|
13
|
-
"core-js": "
|
|
14
|
-
"vue": "2.6.
|
|
13
|
+
"core-js": "3.6.5",
|
|
14
|
+
"vue": "2.6.11",
|
|
15
15
|
"vue-instantsearch": "{{libraryVersion}}"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@
|
|
19
|
-
"@vue/cli-plugin-
|
|
20
|
-
"@vue/cli-
|
|
21
|
-
"
|
|
22
|
-
"eslint": "
|
|
23
|
-
"eslint
|
|
24
|
-
"eslint
|
|
25
|
-
"eslint-
|
|
26
|
-
"eslint-plugin-
|
|
27
|
-
"eslint-plugin-
|
|
28
|
-
"
|
|
29
|
-
"
|
|
18
|
+
"@babel/eslint-parser": "7.17.0",
|
|
19
|
+
"@vue/cli-plugin-babel": "4.5.15",
|
|
20
|
+
"@vue/cli-plugin-eslint": "4.5.15",
|
|
21
|
+
"@vue/cli-service": "4.5.15",
|
|
22
|
+
"@vue/eslint-config-prettier": "6.0.0",
|
|
23
|
+
"babel-eslint": "10.1.0",
|
|
24
|
+
"eslint": "6.7.2",
|
|
25
|
+
"eslint-config-algolia": "20.0.0",
|
|
26
|
+
"eslint-plugin-import": "2.25.4",
|
|
27
|
+
"eslint-plugin-prettier": "3.3.1",
|
|
28
|
+
"eslint-plugin-vue": "6.2.2",
|
|
29
|
+
"prettier": "2.2.1",
|
|
30
|
+
"vue-template-compiler": "2.6.11"
|
|
30
31
|
},
|
|
31
32
|
"browserslist": [
|
|
32
33
|
"> 1%",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
Do not use @7 in production, use a complete version like x.x.x, see website for latest version:
|
|
10
10
|
https://www.algolia.com/doc/guides/building-search-ui/installation/react/#load-the-style
|
|
11
11
|
-->
|
|
12
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.css@7/themes/
|
|
12
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.css@7/themes/satellite-min.css">
|
|
13
13
|
<title>{{name}}</title>
|
|
14
14
|
</head>
|
|
15
15
|
<body>
|
|
@@ -15,19 +15,28 @@
|
|
|
15
15
|
</header>
|
|
16
16
|
|
|
17
17
|
<div class="container">
|
|
18
|
-
<ais-instant-search
|
|
18
|
+
<ais-instant-search
|
|
19
|
+
:search-client="searchClient"
|
|
20
|
+
index-name="{{indexName}}"
|
|
21
|
+
>
|
|
22
|
+
<ais-configure :hits-per-page.camel="8" />
|
|
19
23
|
<div class="search-panel">
|
|
20
24
|
<div class="search-panel__filters">
|
|
21
25
|
{{#if flags.dynamicWidgets}}
|
|
22
|
-
<ais-configure :facets="['*']" :max-values-per-facet.camel="20" />
|
|
23
26
|
<ais-dynamic-widgets>
|
|
24
27
|
{{#each attributesForFaceting}}
|
|
25
|
-
<ais-
|
|
28
|
+
<ais-panel>
|
|
29
|
+
<template v-slot:header>{{this}}</template>
|
|
30
|
+
<ais-refinement-list attribute="{{this}}" />
|
|
31
|
+
</ais-panel>
|
|
26
32
|
{{/each}}
|
|
27
33
|
</ais-dynamic-widgets>
|
|
28
34
|
{{else}}
|
|
29
35
|
{{#each attributesForFaceting}}
|
|
30
|
-
<ais-
|
|
36
|
+
<ais-panel>
|
|
37
|
+
<template v-slot:header>{{this}}</template>
|
|
38
|
+
<ais-refinement-list attribute="{{this}}" />
|
|
39
|
+
</ais-panel>
|
|
31
40
|
{{/each}}
|
|
32
41
|
{{/if}}
|
|
33
42
|
</div>
|
|
@@ -41,7 +50,10 @@
|
|
|
41
50
|
<template slot="item" slot-scope="{ item }">
|
|
42
51
|
<article>
|
|
43
52
|
<h1>
|
|
44
|
-
<ais-highlight
|
|
53
|
+
<ais-highlight
|
|
54
|
+
:hit="item"
|
|
55
|
+
attribute="{{attributesToDisplay.[0]}}"
|
|
56
|
+
/>
|
|
45
57
|
</h1>
|
|
46
58
|
{{#each attributesToDisplay}}
|
|
47
59
|
{{#unless @first}}
|
|
@@ -54,7 +66,7 @@
|
|
|
54
66
|
</template>
|
|
55
67
|
</ais-hits>
|
|
56
68
|
{{else}}
|
|
57
|
-
<ais-hits/>
|
|
69
|
+
<ais-hits />
|
|
58
70
|
{{/if}}
|
|
59
71
|
|
|
60
72
|
<div class="pagination">
|
|
@@ -10,23 +10,24 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"algoliasearch": "4",
|
|
13
|
-
"core-js": "
|
|
14
|
-
"vue": "2.6.
|
|
13
|
+
"core-js": "3.6.5",
|
|
14
|
+
"vue": "2.6.11",
|
|
15
15
|
"vue-instantsearch": "{{libraryVersion}}"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@
|
|
19
|
-
"@vue/cli-plugin-
|
|
20
|
-
"@vue/cli-
|
|
21
|
-
"
|
|
22
|
-
"eslint": "
|
|
23
|
-
"eslint
|
|
24
|
-
"eslint
|
|
25
|
-
"eslint-
|
|
26
|
-
"eslint-plugin-
|
|
27
|
-
"eslint-plugin-
|
|
28
|
-
"
|
|
29
|
-
"
|
|
18
|
+
"@babel/eslint-parser": "7.17.0",
|
|
19
|
+
"@vue/cli-plugin-babel": "4.5.15",
|
|
20
|
+
"@vue/cli-plugin-eslint": "4.5.15",
|
|
21
|
+
"@vue/cli-service": "4.5.15",
|
|
22
|
+
"@vue/eslint-config-prettier": "6.0.0",
|
|
23
|
+
"babel-eslint": "10.1.0",
|
|
24
|
+
"eslint": "6.7.2",
|
|
25
|
+
"eslint-config-algolia": "20.0.0",
|
|
26
|
+
"eslint-plugin-import": "2.25.4",
|
|
27
|
+
"eslint-plugin-prettier": "3.3.1",
|
|
28
|
+
"eslint-plugin-vue": "6.2.2",
|
|
29
|
+
"prettier": "2.2.1",
|
|
30
|
+
"vue-template-compiler": "2.6.11"
|
|
30
31
|
},
|
|
31
32
|
"browserslist": [
|
|
32
33
|
"> 1%",
|
|
@@ -8,14 +8,14 @@ To run this project locally, install the dependencies and run the local server:
|
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
npm install
|
|
11
|
-
npm
|
|
11
|
+
npm start
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Alternatively, you may use [Yarn](https://http://yarnpkg.com/):
|
|
15
15
|
|
|
16
16
|
```sh
|
|
17
17
|
yarn
|
|
18
|
-
yarn
|
|
18
|
+
yarn start
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
Open http://localhost:3000 to see your app.
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
Do not use @7 in production, use a complete version like x.x.x, see website for latest version:
|
|
10
10
|
https://www.algolia.com/doc/guides/building-search-ui/installation/react/#load-the-style
|
|
11
11
|
-->
|
|
12
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.css@7/themes/
|
|
12
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.css@7/themes/satellite-min.css">
|
|
13
13
|
<title>{{name}}</title>
|
|
14
14
|
</head>
|
|
15
15
|
<body>
|
|
@@ -17,17 +17,24 @@
|
|
|
17
17
|
:search-client="searchClient"
|
|
18
18
|
index-name="{{indexName}}"
|
|
19
19
|
>
|
|
20
|
+
<ais-configure :hits-per-page.camel="8" />
|
|
20
21
|
<div class="search-panel">
|
|
21
22
|
<div class="search-panel__filters">
|
|
22
23
|
{{#if flags.dynamicWidgets}}
|
|
23
24
|
<ais-dynamic-widgets>
|
|
24
25
|
{{#each attributesForFaceting}}
|
|
25
|
-
<ais-
|
|
26
|
+
<ais-panel>
|
|
27
|
+
<template v-slot:header>{{this}}</template>
|
|
28
|
+
<ais-refinement-list attribute="{{this}}" />
|
|
29
|
+
</ais-panel>
|
|
26
30
|
{{/each}}
|
|
27
31
|
</ais-dynamic-widgets>
|
|
28
32
|
{{else}}
|
|
29
33
|
{{#each attributesForFaceting}}
|
|
30
|
-
<ais-
|
|
34
|
+
<ais-panel>
|
|
35
|
+
<template v-slot:header>{{this}}</template>
|
|
36
|
+
<ais-refinement-list attribute="{{this}}" />
|
|
37
|
+
</ais-panel>
|
|
31
38
|
{{/each}}
|
|
32
39
|
{{/if}}
|
|
33
40
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`checkAppName throws with correct error message 1`] = `
|
|
4
|
-
"Could not create a project called \\"
|
|
4
|
+
"Could not create a project called \\"./project-name\\" because of npm naming restrictions.
|
|
5
5
|
- name cannot start with a period
|
|
6
6
|
- name can only contain URL-friendly characters"
|
|
7
7
|
`;
|
|
@@ -48,7 +48,7 @@ describe('checkAppPath', () => {
|
|
|
48
48
|
expect(() =>
|
|
49
49
|
utils.checkAppPath('path')
|
|
50
50
|
).toThrowErrorMatchingInlineSnapshot(
|
|
51
|
-
`"Could not create project in destination folder \\"
|
|
51
|
+
`"Could not create project in destination folder \\"path\\" because it is not empty."`
|
|
52
52
|
);
|
|
53
53
|
});
|
|
54
54
|
|
|
@@ -71,7 +71,7 @@ describe('checkAppPath', () => {
|
|
|
71
71
|
expect(() =>
|
|
72
72
|
utils.checkAppPath('path')
|
|
73
73
|
).toThrowErrorMatchingInlineSnapshot(
|
|
74
|
-
`"Could not create project at path
|
|
74
|
+
`"Could not create project at path path because a file of the same name already exists."`
|
|
75
75
|
);
|
|
76
76
|
});
|
|
77
77
|
|