create-instantsearch-app 6.4.2 → 7.0.1
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/README.md +4 -5
- package/package.json +3 -2
- package/src/api/__tests__/__snapshots__/index.test.js.snap +4 -4
- package/src/api/__tests__/resolve-template.test.js +0 -28
- package/src/api/resolve-template.js +1 -28
- package/src/templates/React InstantSearch/.editorconfig +0 -1
- package/src/templates/React InstantSearch/.gitignore.template +20 -18
- package/src/templates/React InstantSearch/.template.js +4 -3
- package/src/templates/React InstantSearch/README.md +0 -2
- package/src/templates/React InstantSearch/package.json +8 -21
- package/src/templates/React InstantSearch/src/App.css +11 -0
- package/src/templates/{React InstantSearch Hooks → React InstantSearch}/src/App.tsx.hbs +3 -3
- package/src/templates/React InstantSearch Native/.gitignore.template +13 -16
- package/src/templates/React InstantSearch Native/.template.js +2 -1
- package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/App.tsx.hbs +1 -1
- package/src/templates/React InstantSearch Native/app.json +24 -1
- package/src/templates/React InstantSearch Native/package.json +14 -16
- package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/src/InfiniteHits.tsx +1 -1
- package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/src/SearchBox.tsx.hbs +1 -1
- package/src/utils/__tests__/index.test.js +8 -5
- package/src/templates/Autocomplete.js 0/.editorconfig +0 -9
- package/src/templates/Autocomplete.js 0/.eslintignore +0 -3
- package/src/templates/Autocomplete.js 0/.eslintrc.js +0 -3
- package/src/templates/Autocomplete.js 0/.gitignore.template +0 -22
- package/src/templates/Autocomplete.js 0/.prettierrc +0 -5
- package/src/templates/Autocomplete.js 0/.template.js +0 -13
- package/src/templates/Autocomplete.js 0/README.md +0 -21
- package/src/templates/Autocomplete.js 0/favicon.png +0 -0
- package/src/templates/Autocomplete.js 0/index.html.hbs +0 -46
- package/src/templates/Autocomplete.js 0/manifest.webmanifest +0 -15
- package/src/templates/Autocomplete.js 0/package.json +0 -26
- package/src/templates/Autocomplete.js 0/src/app.css +0 -85
- package/src/templates/Autocomplete.js 0/src/app.js.hbs +0 -31
- package/src/templates/Autocomplete.js 0/src/index.css +0 -7
- package/src/templates/InstantSearch.js 2/.editorconfig +0 -9
- package/src/templates/InstantSearch.js 2/.eslintignore +0 -3
- package/src/templates/InstantSearch.js 2/.eslintrc.js +0 -3
- package/src/templates/InstantSearch.js 2/.gitignore.template +0 -22
- package/src/templates/InstantSearch.js 2/.prettierrc +0 -5
- package/src/templates/InstantSearch.js 2/.template.js +0 -14
- package/src/templates/InstantSearch.js 2/README.md +0 -21
- package/src/templates/InstantSearch.js 2/favicon.png +0 -0
- package/src/templates/InstantSearch.js 2/index.html.hbs +0 -56
- package/src/templates/InstantSearch.js 2/manifest.webmanifest +0 -15
- package/src/templates/InstantSearch.js 2/package.json +0 -22
- package/src/templates/InstantSearch.js 2/src/app.css +0 -75
- package/src/templates/InstantSearch.js 2/src/app.js.hbs +0 -54
- package/src/templates/InstantSearch.js 2/src/index.css +0 -10
- package/src/templates/JavaScript Helper 2/.editorconfig +0 -9
- package/src/templates/JavaScript Helper 2/.eslintignore +0 -3
- package/src/templates/JavaScript Helper 2/.eslintrc.js +0 -3
- package/src/templates/JavaScript Helper 2/.gitignore.template +0 -22
- package/src/templates/JavaScript Helper 2/.prettierrc +0 -5
- package/src/templates/JavaScript Helper 2/.template.js +0 -14
- package/src/templates/JavaScript Helper 2/README.md +0 -21
- package/src/templates/JavaScript Helper 2/favicon.png +0 -0
- package/src/templates/JavaScript Helper 2/index.html.hbs +0 -42
- package/src/templates/JavaScript Helper 2/manifest.webmanifest +0 -15
- package/src/templates/JavaScript Helper 2/package.json +0 -26
- package/src/templates/JavaScript Helper 2/src/app.css +0 -74
- package/src/templates/JavaScript Helper 2/src/app.js.hbs +0 -44
- package/src/templates/JavaScript Helper 2/src/index.css +0 -10
- package/src/templates/React InstantSearch/.eslintrc.js +0 -3
- package/src/templates/React InstantSearch/public/favicon.png +0 -0
- package/src/templates/React InstantSearch/public/index.html +0 -29
- package/src/templates/React InstantSearch/public/manifest.json +0 -15
- package/src/templates/React InstantSearch/src/App.js.hbs +0 -112
- package/src/templates/React InstantSearch/src/index.css +0 -10
- package/src/templates/React InstantSearch/src/index.js +0 -6
- package/src/templates/React InstantSearch Hooks/.editorconfig +0 -8
- package/src/templates/React InstantSearch Hooks/.gitignore.template +0 -23
- package/src/templates/React InstantSearch Hooks/.prettierrc +0 -5
- package/src/templates/React InstantSearch Hooks/.template.js +0 -25
- package/src/templates/React InstantSearch Hooks/README.md +0 -19
- package/src/templates/React InstantSearch Hooks/package.json +0 -21
- package/src/templates/React InstantSearch Hooks/src/App.css +0 -71
- package/src/templates/React InstantSearch Hooks Native/.gitignore.template +0 -14
- package/src/templates/React InstantSearch Hooks Native/.template.js +0 -34
- package/src/templates/React InstantSearch Hooks Native/README.md +0 -19
- package/src/templates/React InstantSearch Hooks Native/app.json +0 -30
- package/src/templates/React InstantSearch Hooks Native/babel.config.js +0 -6
- package/src/templates/React InstantSearch Hooks Native/package.json +0 -30
- package/src/templates/React InstantSearch Native/.editorconfig +0 -9
- package/src/templates/React InstantSearch Native/.eslintrc.js +0 -3
- package/src/templates/React InstantSearch Native/.prettierrc +0 -5
- package/src/templates/React InstantSearch Native/.watchmanconfig +0 -1
- package/src/templates/React InstantSearch Native/App.js.hbs +0 -38
- package/src/templates/React InstantSearch Native/src/Highlight.js +0 -36
- package/src/templates/React InstantSearch Native/src/InfiniteHits.js.hbs +0 -56
- package/src/templates/React InstantSearch Native/src/SearchBox.js.hbs +0 -42
- package/src/templates/React InstantSearch widget/.eslintignore +0 -2
- package/src/templates/React InstantSearch widget/.eslintrc.cjs +0 -13
- package/src/templates/React InstantSearch widget/.prettierrc +0 -5
- package/src/templates/React InstantSearch widget/.template.js +0 -21
- package/src/templates/React InstantSearch widget/CONTRIBUTING.md +0 -49
- package/src/templates/React InstantSearch widget/LICENSE.md.hbs +0 -21
- package/src/templates/React InstantSearch widget/README.md +0 -85
- package/src/templates/React InstantSearch widget/babel.config.cjs +0 -8
- package/src/templates/React InstantSearch widget/example/index.html.hbs +0 -12
- package/src/templates/React InstantSearch widget/example/index.tsx.hbs +0 -22
- package/src/templates/React InstantSearch widget/package.json.hbs +0 -81
- package/src/templates/React InstantSearch widget/src/index.tsx.hbs +0 -3
- package/src/templates/React InstantSearch widget/src/lib/__tests__/dummy-test.tsx.hbs +0 -39
- package/src/templates/React InstantSearch widget/src/lib/component.tsx.hbs +0 -15
- package/src/templates/React InstantSearch widget/src/lib/connector.ts.hbs +0 -35
- package/src/templates/React InstantSearch widget/src/lib/widget.tsx.hbs +0 -14
- package/src/templates/React InstantSearch widget/src/types/connector.ts +0 -17
- package/src/templates/React InstantSearch widget/tsconfig.declaration.json +0 -10
- package/src/templates/React InstantSearch widget/tsconfig.json +0 -20
- package/src/templates/React InstantSearch widget/vite.config.ts +0 -34
- package/src/templates/Vue InstantSearch 1/.editorconfig +0 -9
- package/src/templates/Vue InstantSearch 1/.eslintrc.js +0 -9
- package/src/templates/Vue InstantSearch 1/.gitignore.template +0 -21
- package/src/templates/Vue InstantSearch 1/.prettierrc +0 -5
- package/src/templates/Vue InstantSearch 1/.template.js +0 -14
- package/src/templates/Vue InstantSearch 1/README.md +0 -21
- package/src/templates/Vue InstantSearch 1/babel.config.js +0 -3
- package/src/templates/Vue InstantSearch 1/package.json +0 -35
- package/src/templates/Vue InstantSearch 1/public/favicon.png +0 -0
- package/src/templates/Vue InstantSearch 1/public/index.html +0 -22
- package/src/templates/Vue InstantSearch 1/src/App.vue +0 -167
- package/src/templates/Vue InstantSearch 1/src/main.js +0 -11
- package/src/templates/Vue InstantSearch 2/.editorconfig +0 -9
- package/src/templates/Vue InstantSearch 2/.eslintrc.js +0 -9
- package/src/templates/Vue InstantSearch 2/.gitignore.template +0 -21
- package/src/templates/Vue InstantSearch 2/.prettierrc +0 -5
- package/src/templates/Vue InstantSearch 2/.template.js +0 -15
- package/src/templates/Vue InstantSearch 2/README.md +0 -21
- package/src/templates/Vue InstantSearch 2/babel.config.js +0 -3
- package/src/templates/Vue InstantSearch 2/package.json +0 -37
- package/src/templates/Vue InstantSearch 2/public/favicon.png +0 -0
- package/src/templates/Vue InstantSearch 2/public/index.html +0 -22
- package/src/templates/Vue InstantSearch 2/src/App.vue +0 -147
- package/src/templates/Vue InstantSearch 2/src/main.js +0 -11
- package/src/utils/__tests__/__snapshots__/index.test.js.snap +0 -7
- /package/src/templates/{React InstantSearch Hooks → React InstantSearch}/favicon.png +0 -0
- /package/src/templates/{React InstantSearch Hooks → React InstantSearch}/index.html +0 -0
- /package/src/templates/{React InstantSearch Hooks → React InstantSearch}/src/Panel.tsx +0 -0
- /package/src/templates/{React InstantSearch Hooks → React InstantSearch}/src/index.tsx +0 -0
- /package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/.expo-shared/assets.json +0 -0
- /package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/assets/adaptive-icon.png +0 -0
- /package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/assets/favicon.png +0 -0
- /package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/assets/icon.png +0 -0
- /package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/assets/splash.png +0 -0
- /package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/src/Highlight.tsx +0 -0
- /package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/tsconfig.json +0 -0
- /package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/types/ProductHit.ts +0 -0
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
|
|
3
|
-
import reactRefresh from '@vitejs/plugin-react-refresh';
|
|
4
|
-
import vite from 'vite';
|
|
5
|
-
|
|
6
|
-
// import { defineConfig } from 'vite' -> fails when type:module in package.json
|
|
7
|
-
// it seems related to https://github.com/vitejs/vite/issues/1560
|
|
8
|
-
// so far this is the workaround.
|
|
9
|
-
const { defineConfig } = vite;
|
|
10
|
-
|
|
11
|
-
// https://vitejs.dev/config/
|
|
12
|
-
export default defineConfig({
|
|
13
|
-
plugins: [reactRefresh()],
|
|
14
|
-
build: {
|
|
15
|
-
lib: {
|
|
16
|
-
entry: path.resolve(__dirname, 'src/index.tsx'),
|
|
17
|
-
name: '{{ pascalCaseName }}',
|
|
18
|
-
fileName: 'index',
|
|
19
|
-
formats: ['es', 'cjs', 'umd'],
|
|
20
|
-
},
|
|
21
|
-
rollupOptions: {
|
|
22
|
-
// make sure to externalize deps that shouldn't be bundled
|
|
23
|
-
// into your library
|
|
24
|
-
external: ['react', 'react-dom', 'react-instantsearch-dom'],
|
|
25
|
-
output: {
|
|
26
|
-
globals: {
|
|
27
|
-
react: 'React',
|
|
28
|
-
'react-dom': 'ReactDOM',
|
|
29
|
-
'react-instantsearch-dom': 'ReactInstantSearchDOM',
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
// extends from 'prettier/vue' until we update the Algolia configuration
|
|
3
|
-
extends: ['algolia/vue', 'prettier/vue'],
|
|
4
|
-
rules: {
|
|
5
|
-
'import/no-commonjs': 'off',
|
|
6
|
-
// enable the rule until we update the Algolia configuration
|
|
7
|
-
'vue/component-name-in-template-casing': ['error', 'kebab-case'],
|
|
8
|
-
},
|
|
9
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
.DS_Store
|
|
2
|
-
node_modules
|
|
3
|
-
/dist
|
|
4
|
-
|
|
5
|
-
# local env files
|
|
6
|
-
.env.local
|
|
7
|
-
.env.*.local
|
|
8
|
-
|
|
9
|
-
# Log files
|
|
10
|
-
npm-debug.log*
|
|
11
|
-
yarn-debug.log*
|
|
12
|
-
yarn-error.log*
|
|
13
|
-
|
|
14
|
-
# Editor directories and files
|
|
15
|
-
.idea
|
|
16
|
-
.vscode
|
|
17
|
-
*.suo
|
|
18
|
-
*.ntvs*
|
|
19
|
-
*.njsproj
|
|
20
|
-
*.sln
|
|
21
|
-
*.sw?
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const install = require('../../tasks/node/install');
|
|
2
|
-
const teardown = require('../../tasks/node/teardown');
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
libraryName: 'vue-instantsearch',
|
|
6
|
-
templateName: 'vue-instantsearch-1.x',
|
|
7
|
-
supportedVersion: '>= 1.0.0 < 2.0.0',
|
|
8
|
-
appName: 'vue-instantsearch-app',
|
|
9
|
-
keywords: ['algolia', 'InstantSearch', 'Vue', 'vue-instantsearch'],
|
|
10
|
-
tasks: {
|
|
11
|
-
install,
|
|
12
|
-
teardown,
|
|
13
|
-
},
|
|
14
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# {{name}}
|
|
2
|
-
|
|
3
|
-
_This project was generated with [create-instantsearch-app](https://github.com/algolia/instantsearch/tree/master/packages/create-instantsearch-app) by [Algolia](https://algolia.com)._
|
|
4
|
-
|
|
5
|
-
## Get started
|
|
6
|
-
|
|
7
|
-
To run this project locally, install the dependencies and run the local server:
|
|
8
|
-
|
|
9
|
-
```sh
|
|
10
|
-
npm install
|
|
11
|
-
npm start
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
Alternatively, you may use [Yarn](https://http://yarnpkg.com/):
|
|
15
|
-
|
|
16
|
-
```sh
|
|
17
|
-
yarn
|
|
18
|
-
yarn start
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Open http://localhost:3000 to see your app.
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{name}}",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"scripts": {
|
|
6
|
-
"start": "vue-cli-service serve --port 3000",
|
|
7
|
-
"build": "vue-cli-service build",
|
|
8
|
-
"lint": "vue-cli-service lint",
|
|
9
|
-
"lint:fix": "npm run lint -- --fix"
|
|
10
|
-
},
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"core-js": "2.6.9",
|
|
13
|
-
"vue": "2.6.10",
|
|
14
|
-
"vue-instantsearch": "{{libraryVersion}}"
|
|
15
|
-
},
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"@vue/cli-plugin-babel": "3.6.0",
|
|
18
|
-
"@vue/cli-plugin-eslint": "3.6.0",
|
|
19
|
-
"@vue/cli-service": "3.6.0",
|
|
20
|
-
"babel-eslint": "10.0.2",
|
|
21
|
-
"eslint": "5.7.0",
|
|
22
|
-
"eslint-config-algolia": "13.2.3",
|
|
23
|
-
"eslint-config-prettier": "4.1.0",
|
|
24
|
-
"eslint-plugin-import": "2.19.1",
|
|
25
|
-
"eslint-plugin-prettier": "3.1.2",
|
|
26
|
-
"eslint-plugin-vue": "5.2.2",
|
|
27
|
-
"prettier": "1.19.1",
|
|
28
|
-
"vue-template-compiler": "2.6.10"
|
|
29
|
-
},
|
|
30
|
-
"browserslist": [
|
|
31
|
-
"> 1%",
|
|
32
|
-
"last 2 versions",
|
|
33
|
-
"not ie <= 8"
|
|
34
|
-
]
|
|
35
|
-
}
|
|
Binary file
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
7
|
-
<link rel="icon" href="<%= BASE_URL %>favicon.png">
|
|
8
|
-
<!--
|
|
9
|
-
Do not use @7 in production, use a complete version like x.x.x, see website for latest version:
|
|
10
|
-
https://www.algolia.com/doc/guides/building-search-ui/installation/react/#load-the-style
|
|
11
|
-
-->
|
|
12
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.css@7/themes/algolia-min.css">
|
|
13
|
-
<title>{{name}}</title>
|
|
14
|
-
</head>
|
|
15
|
-
<body>
|
|
16
|
-
<noscript>
|
|
17
|
-
<strong>We're sorry but {{name}} doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
|
18
|
-
</noscript>
|
|
19
|
-
<div id="app"></div>
|
|
20
|
-
<!-- built files will be auto injected -->
|
|
21
|
-
</body>
|
|
22
|
-
</html>
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<header class="header">
|
|
4
|
-
<h1 class="header-title">
|
|
5
|
-
<a href="/">{{name}}</a>
|
|
6
|
-
</h1>
|
|
7
|
-
<p class="header-subtitle">
|
|
8
|
-
using
|
|
9
|
-
<a href="https://github.com/algolia/instantsearch/tree/master/packages/vue-instantsearch">
|
|
10
|
-
Vue InstantSearch
|
|
11
|
-
</a>
|
|
12
|
-
</p>
|
|
13
|
-
</header>
|
|
14
|
-
|
|
15
|
-
<div class="container">
|
|
16
|
-
<ais-index app-id="{{appId}}" api-key="{{apiKey}}" index-name="{{indexName}}">
|
|
17
|
-
<div class="search-panel">
|
|
18
|
-
{{#if attributesForFaceting.length}}
|
|
19
|
-
<div class="search-panel__filters">
|
|
20
|
-
{{#each attributesForFaceting}}
|
|
21
|
-
<ais-refinement-list attribute-name="{{this}}"></ais-refinement-list>
|
|
22
|
-
{{/each}}
|
|
23
|
-
</div>
|
|
24
|
-
|
|
25
|
-
{{/if}}
|
|
26
|
-
<div class="search-panel__results">
|
|
27
|
-
<div class="searchbox">
|
|
28
|
-
<ais-search-box
|
|
29
|
-
placeholder="{{searchPlaceholder}}"
|
|
30
|
-
class="ais-SearchBox-form"
|
|
31
|
-
:class-names="{
|
|
32
|
-
'ais-search-box': 'ais-SearchBox',
|
|
33
|
-
'ais-input': 'ais-SearchBox-input',
|
|
34
|
-
'ais-clear': 'ais-SearchBox-reset',
|
|
35
|
-
'ais-clear--disabled': 'ais-SearchBox-reset--disabled',
|
|
36
|
-
'ais-search-box__submit': 'ais-SearchBox-submit',
|
|
37
|
-
'ais-search-box__loading-indicator':
|
|
38
|
-
'ais-SearchBox-loadingIndicator',
|
|
39
|
-
}"
|
|
40
|
-
/>
|
|
41
|
-
</div>
|
|
42
|
-
|
|
43
|
-
{{#if attributesToDisplay}}
|
|
44
|
-
<ais-results class="ais-Hits-list">
|
|
45
|
-
<template slot-scope="{ result }">
|
|
46
|
-
<article class="ais-Hits-item">
|
|
47
|
-
<h1>
|
|
48
|
-
<ais-highlight
|
|
49
|
-
:result="result"
|
|
50
|
-
attribute-name="{{attributesToDisplay.[0]}}"
|
|
51
|
-
/>
|
|
52
|
-
</h1>
|
|
53
|
-
{{#each attributesToDisplay}}
|
|
54
|
-
{{#unless @first}}
|
|
55
|
-
<p>
|
|
56
|
-
<ais-highlight
|
|
57
|
-
:result="result"
|
|
58
|
-
attribute-name="{{this}}"
|
|
59
|
-
/>
|
|
60
|
-
</p>
|
|
61
|
-
{{/unless}}
|
|
62
|
-
{{/each}}
|
|
63
|
-
</article>
|
|
64
|
-
</template>
|
|
65
|
-
</ais-results>
|
|
66
|
-
{{else}}
|
|
67
|
-
<ais-results class="ais-Hits-list" />
|
|
68
|
-
{{/if}}
|
|
69
|
-
|
|
70
|
-
<div class="pagination">
|
|
71
|
-
<ais-pagination
|
|
72
|
-
:class-names="{
|
|
73
|
-
'ais-pagination': 'ais-Pagination-list',
|
|
74
|
-
'ais-pagination__item': 'ais-Pagination-item',
|
|
75
|
-
'ais-pagination__item--active':
|
|
76
|
-
'ais-Pagination-item--selected',
|
|
77
|
-
'ais-pagination__item--next': 'ais-Pagination-item--next',
|
|
78
|
-
'ais-pagination__item--previous':
|
|
79
|
-
'ais-Pagination-item--previous',
|
|
80
|
-
'ais-pagination__item--disabled':
|
|
81
|
-
'ais-Pagination-item--disabled',
|
|
82
|
-
'ais-pagination__item--first': 'ais-Pagination-item--first',
|
|
83
|
-
'ais-pagination__item--last': 'ais-Pagination-item--last',
|
|
84
|
-
'ais-pagination__link': 'ais-Pagination-link',
|
|
85
|
-
}"
|
|
86
|
-
/>
|
|
87
|
-
</div>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
</ais-index>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
</template>
|
|
94
|
-
|
|
95
|
-
<style>
|
|
96
|
-
body,
|
|
97
|
-
h1 {
|
|
98
|
-
margin: 0;
|
|
99
|
-
padding: 0;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
body {
|
|
103
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
|
|
104
|
-
Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
em {
|
|
108
|
-
background: cyan;
|
|
109
|
-
font-style: normal;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.header {
|
|
113
|
-
display: flex;
|
|
114
|
-
align-items: center;
|
|
115
|
-
min-height: 50px;
|
|
116
|
-
padding: 0.5rem 1rem;
|
|
117
|
-
background-image: linear-gradient(to right, #4dba87, #2f9088);
|
|
118
|
-
color: #fff;
|
|
119
|
-
margin-bottom: 1rem;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.header a {
|
|
123
|
-
color: #fff;
|
|
124
|
-
text-decoration: none;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.header-title {
|
|
128
|
-
font-size: 1.2rem;
|
|
129
|
-
font-weight: normal;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.header-title::after {
|
|
133
|
-
content: ' ▸ ';
|
|
134
|
-
padding: 0 0.5rem;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.header-subtitle {
|
|
138
|
-
font-size: 1.2rem;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.container {
|
|
142
|
-
max-width: 1200px;
|
|
143
|
-
margin: 0 auto;
|
|
144
|
-
padding: 1rem;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.search-panel {
|
|
148
|
-
display: flex;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.search-panel__filters {
|
|
152
|
-
flex: 1;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.search-panel__results {
|
|
156
|
-
flex: 3;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.searchbox {
|
|
160
|
-
margin-bottom: 2rem;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.pagination {
|
|
164
|
-
margin: 2rem auto;
|
|
165
|
-
text-align: center;
|
|
166
|
-
}
|
|
167
|
-
</style>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
// extends from 'prettier/vue' until we update the Algolia configuration
|
|
3
|
-
extends: ['algolia/vue', 'prettier/vue'],
|
|
4
|
-
rules: {
|
|
5
|
-
'import/no-commonjs': 'off',
|
|
6
|
-
// enable the rule until we update the Algolia configuration
|
|
7
|
-
'vue/component-name-in-template-casing': ['error', 'kebab-case'],
|
|
8
|
-
},
|
|
9
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
.DS_Store
|
|
2
|
-
node_modules
|
|
3
|
-
/dist
|
|
4
|
-
|
|
5
|
-
# local env files
|
|
6
|
-
.env.local
|
|
7
|
-
.env.*.local
|
|
8
|
-
|
|
9
|
-
# Log files
|
|
10
|
-
npm-debug.log*
|
|
11
|
-
yarn-debug.log*
|
|
12
|
-
yarn-error.log*
|
|
13
|
-
|
|
14
|
-
# Editor directories and files
|
|
15
|
-
.idea
|
|
16
|
-
.vscode
|
|
17
|
-
*.suo
|
|
18
|
-
*.ntvs*
|
|
19
|
-
*.njsproj
|
|
20
|
-
*.sln
|
|
21
|
-
*.sw?
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const install = require('../../tasks/node/install');
|
|
2
|
-
const teardown = require('../../tasks/node/teardown');
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
category: 'Web',
|
|
6
|
-
libraryName: 'vue-instantsearch',
|
|
7
|
-
templateName: 'vue-instantsearch-2.x',
|
|
8
|
-
supportedVersion: '>= 2.0.0 < 3.0.0',
|
|
9
|
-
appName: 'vue-instantsearch-app',
|
|
10
|
-
keywords: ['algolia', 'InstantSearch', 'Vue', 'vue-instantsearch'],
|
|
11
|
-
tasks: {
|
|
12
|
-
install,
|
|
13
|
-
teardown,
|
|
14
|
-
},
|
|
15
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# {{name}}
|
|
2
|
-
|
|
3
|
-
_This project was generated with [create-instantsearch-app](https://github.com/algolia/instantsearch/tree/master/packages/create-instantsearch-app) by [Algolia](https://algolia.com)._
|
|
4
|
-
|
|
5
|
-
## Get started
|
|
6
|
-
|
|
7
|
-
To run this project locally, install the dependencies and run the local server:
|
|
8
|
-
|
|
9
|
-
```sh
|
|
10
|
-
npm install
|
|
11
|
-
npm start
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
Alternatively, you may use [Yarn](https://http://yarnpkg.com/):
|
|
15
|
-
|
|
16
|
-
```sh
|
|
17
|
-
yarn
|
|
18
|
-
yarn start
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Open http://localhost:3000 to see your app.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{name}}",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"scripts": {
|
|
6
|
-
"start": "vue-cli-service serve --port 3000",
|
|
7
|
-
"build": "vue-cli-service build",
|
|
8
|
-
"lint": "vue-cli-service lint",
|
|
9
|
-
"lint:fix": "npm run lint -- --fix"
|
|
10
|
-
},
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"algoliasearch": "4",
|
|
13
|
-
"core-js": "3.6.5",
|
|
14
|
-
"vue": "2.6.11",
|
|
15
|
-
"vue-instantsearch": "{{libraryVersion}}"
|
|
16
|
-
},
|
|
17
|
-
"devDependencies": {
|
|
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"
|
|
31
|
-
},
|
|
32
|
-
"browserslist": [
|
|
33
|
-
"> 1%",
|
|
34
|
-
"last 2 versions",
|
|
35
|
-
"not ie <= 8"
|
|
36
|
-
]
|
|
37
|
-
}
|
|
Binary file
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
7
|
-
<link rel="icon" href="<%= BASE_URL %>favicon.png">
|
|
8
|
-
<!--
|
|
9
|
-
Do not use @7 in production, use a complete version like x.x.x, see website for latest version:
|
|
10
|
-
https://www.algolia.com/doc/guides/building-search-ui/installation/react/#load-the-style
|
|
11
|
-
-->
|
|
12
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.css@7/themes/algolia-min.css">
|
|
13
|
-
<title>{{name}}</title>
|
|
14
|
-
</head>
|
|
15
|
-
<body>
|
|
16
|
-
<noscript>
|
|
17
|
-
<strong>We're sorry but {{name}} doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
|
18
|
-
</noscript>
|
|
19
|
-
<div id="app"></div>
|
|
20
|
-
<!-- built files will be auto injected -->
|
|
21
|
-
</body>
|
|
22
|
-
</html>
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<header class="header">
|
|
4
|
-
<h1 class="header-title">
|
|
5
|
-
<a href="/">
|
|
6
|
-
{{name}}
|
|
7
|
-
</a>
|
|
8
|
-
</h1>
|
|
9
|
-
<p class="header-subtitle">
|
|
10
|
-
using
|
|
11
|
-
<a href="https://github.com/algolia/instantsearch/tree/master/packages/vue-instantsearch">
|
|
12
|
-
Vue InstantSearch
|
|
13
|
-
</a>
|
|
14
|
-
</p>
|
|
15
|
-
</header>
|
|
16
|
-
|
|
17
|
-
<div class="container">
|
|
18
|
-
<ais-instant-search :search-client="searchClient" index-name="{{indexName}}">
|
|
19
|
-
<div class="search-panel">
|
|
20
|
-
{{#if attributesForFaceting.length}}
|
|
21
|
-
<div class="search-panel__filters">
|
|
22
|
-
{{#each attributesForFaceting}}
|
|
23
|
-
<ais-refinement-list attribute="{{this}}" />
|
|
24
|
-
{{/each}}
|
|
25
|
-
</div>
|
|
26
|
-
|
|
27
|
-
{{/if}}
|
|
28
|
-
<div class="search-panel__results">
|
|
29
|
-
<div class="searchbox">
|
|
30
|
-
<ais-search-box placeholder="{{searchPlaceholder}}" />
|
|
31
|
-
</div>
|
|
32
|
-
{{#if attributesToDisplay}}
|
|
33
|
-
<ais-hits>
|
|
34
|
-
<template slot="item" slot-scope="{ item }">
|
|
35
|
-
<article>
|
|
36
|
-
<h1>
|
|
37
|
-
<ais-highlight :hit="item" attribute="{{attributesToDisplay.[0]}}" />
|
|
38
|
-
</h1>
|
|
39
|
-
{{#each attributesToDisplay}}
|
|
40
|
-
{{#unless @first}}
|
|
41
|
-
<p>
|
|
42
|
-
<ais-highlight :hit="item" attribute="{{this}}" />
|
|
43
|
-
</p>
|
|
44
|
-
{{/unless}}
|
|
45
|
-
{{/each}}
|
|
46
|
-
</article>
|
|
47
|
-
</template>
|
|
48
|
-
</ais-hits>
|
|
49
|
-
{{else}}
|
|
50
|
-
<ais-hits/>
|
|
51
|
-
{{/if}}
|
|
52
|
-
|
|
53
|
-
<div class="pagination">
|
|
54
|
-
<ais-pagination />
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
</ais-instant-search>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
</template>
|
|
62
|
-
|
|
63
|
-
<script>
|
|
64
|
-
import algoliasearch from 'algoliasearch/lite';
|
|
65
|
-
|
|
66
|
-
export default {
|
|
67
|
-
data() {
|
|
68
|
-
return {
|
|
69
|
-
searchClient: algoliasearch('{{appId}}', '{{apiKey}}'),
|
|
70
|
-
};
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
</script>
|
|
74
|
-
|
|
75
|
-
<style>
|
|
76
|
-
body,
|
|
77
|
-
h1 {
|
|
78
|
-
margin: 0;
|
|
79
|
-
padding: 0;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
body {
|
|
83
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
|
|
84
|
-
Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
em {
|
|
88
|
-
background: cyan;
|
|
89
|
-
font-style: normal;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.header {
|
|
93
|
-
display: flex;
|
|
94
|
-
align-items: center;
|
|
95
|
-
min-height: 50px;
|
|
96
|
-
padding: 0.5rem 1rem;
|
|
97
|
-
background-image: linear-gradient(to right, #4dba87, #2f9088);
|
|
98
|
-
color: #fff;
|
|
99
|
-
margin-bottom: 1rem;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.header a {
|
|
103
|
-
color: #fff;
|
|
104
|
-
text-decoration: none;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.header-title {
|
|
108
|
-
font-size: 1.2rem;
|
|
109
|
-
font-weight: normal;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.header-title::after {
|
|
113
|
-
content: ' ▸ ';
|
|
114
|
-
padding: 0 0.5rem;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.header-subtitle {
|
|
118
|
-
font-size: 1.2rem;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.container {
|
|
122
|
-
max-width: 1200px;
|
|
123
|
-
margin: 0 auto;
|
|
124
|
-
padding: 1rem;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.search-panel {
|
|
128
|
-
display: flex;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.search-panel__filters {
|
|
132
|
-
flex: 1;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.search-panel__results {
|
|
136
|
-
flex: 3;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.searchbox {
|
|
140
|
-
margin-bottom: 2rem;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.pagination {
|
|
144
|
-
margin: 2rem auto;
|
|
145
|
-
text-align: center;
|
|
146
|
-
}
|
|
147
|
-
</style>
|