create-instantsearch-app 6.4.2 → 7.0.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/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,74 +0,0 @@
|
|
|
1
|
-
em {
|
|
2
|
-
background: cyan;
|
|
3
|
-
font-style: normal;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.header {
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
min-height: 50px;
|
|
10
|
-
padding: 0.5rem 1rem;
|
|
11
|
-
background-image: linear-gradient(73deg, #3369e7, #1cc7d0);
|
|
12
|
-
color: #fff;
|
|
13
|
-
margin-bottom: 1rem;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.header a {
|
|
17
|
-
color: #fff;
|
|
18
|
-
text-decoration: none;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.header-title {
|
|
22
|
-
font-size: 1.2rem;
|
|
23
|
-
font-weight: normal;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.header-title::after {
|
|
27
|
-
content: ' ▸ ';
|
|
28
|
-
padding: 0 0.5rem;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.header-subtitle {
|
|
32
|
-
font-size: 1.2rem;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.container {
|
|
36
|
-
max-width: 1200px;
|
|
37
|
-
margin: 0 auto;
|
|
38
|
-
padding: 1rem;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.container-app {
|
|
42
|
-
display: grid;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
#searchBox input[type='search'] {
|
|
46
|
-
width: 100%;
|
|
47
|
-
padding: 12px;
|
|
48
|
-
font: inherit;
|
|
49
|
-
border-radius: 2px;
|
|
50
|
-
border: 1px solid rgba(150, 150, 150, 0.16);
|
|
51
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.16);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.ais-hits {
|
|
55
|
-
display: grid;
|
|
56
|
-
grid-template-columns: 49% 49%;
|
|
57
|
-
grid-gap: 2%;
|
|
58
|
-
padding: 0;
|
|
59
|
-
margin: 0;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.ais-hits--item {
|
|
63
|
-
list-style: none;
|
|
64
|
-
padding: 1rem;
|
|
65
|
-
background: #fff;
|
|
66
|
-
border-radius: 4px;
|
|
67
|
-
border: 1px solid rgba(150, 150, 150, 0.16);
|
|
68
|
-
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.16);
|
|
69
|
-
margin-bottom: 1rem;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
#searchBox {
|
|
73
|
-
margin-bottom: 2rem;
|
|
74
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import algoliasearch from 'algoliasearch';
|
|
2
|
-
import algoliasearchHelper from 'algoliasearch-helper';
|
|
3
|
-
|
|
4
|
-
const client = algoliasearch('{{appId}}', '{{apiKey}}');
|
|
5
|
-
const helper = algoliasearchHelper(client, '{{indexName}}');
|
|
6
|
-
|
|
7
|
-
const $searchBox = document.querySelector('#searchBox input[type=search]');
|
|
8
|
-
const $hits = document.querySelector('#hits');
|
|
9
|
-
|
|
10
|
-
$searchBox.addEventListener('input', event => {
|
|
11
|
-
const query = event.target.value;
|
|
12
|
-
|
|
13
|
-
helper.setQuery(query).search();
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
helper.on('result', result => {
|
|
17
|
-
// Please sanitize user-provided data when using `innerHTML` to avoid XSS
|
|
18
|
-
$hits.innerHTML = `
|
|
19
|
-
<ol class="ais-hits">
|
|
20
|
-
${result.hits
|
|
21
|
-
.map(
|
|
22
|
-
hit =>
|
|
23
|
-
`<li class="ais-hits--item">
|
|
24
|
-
<article>
|
|
25
|
-
{{#if attributesToDisplay}}
|
|
26
|
-
<h1>${hit._highlightResult.{{attributesToDisplay.[0]}}.value}</h1>
|
|
27
|
-
{{#each attributesToDisplay}}
|
|
28
|
-
{{#unless @first}}
|
|
29
|
-
<p>${hit._highlightResult.{{this}}.value}</p>
|
|
30
|
-
{{/unless}}
|
|
31
|
-
{{/each}}
|
|
32
|
-
{{else}}
|
|
33
|
-
<p>
|
|
34
|
-
<code>${JSON.stringify(hit).slice(0, 100)}...</code>
|
|
35
|
-
</p>
|
|
36
|
-
{{/if}}
|
|
37
|
-
</article>
|
|
38
|
-
</li>`
|
|
39
|
-
)
|
|
40
|
-
.join('')}
|
|
41
|
-
</ol>`;
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
helper.search();
|
|
Binary file
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="utf-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
7
|
-
<meta name="theme-color" content="#000000">
|
|
8
|
-
|
|
9
|
-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
|
|
10
|
-
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.png">
|
|
11
|
-
|
|
12
|
-
<!--
|
|
13
|
-
Do not use @7 in production, use a complete version like x.x.x, see website for latest version:
|
|
14
|
-
https://www.algolia.com/doc/guides/building-search-ui/installation/react/#load-the-style
|
|
15
|
-
-->
|
|
16
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.css@7/themes/satellite-min.css">
|
|
17
|
-
|
|
18
|
-
<title>{{name}}</title>
|
|
19
|
-
</head>
|
|
20
|
-
|
|
21
|
-
<body>
|
|
22
|
-
<noscript>
|
|
23
|
-
You need to enable JavaScript to run this app.
|
|
24
|
-
</noscript>
|
|
25
|
-
|
|
26
|
-
<div id="root"></div>
|
|
27
|
-
</body>
|
|
28
|
-
|
|
29
|
-
</html>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"short_name": "{{name}}",
|
|
3
|
-
"name": "{{name}} Sample",
|
|
4
|
-
"icons": [
|
|
5
|
-
{
|
|
6
|
-
"src": "favicon.png",
|
|
7
|
-
"sizes": "64x64 32x32 24x24 16x16",
|
|
8
|
-
"type": "image/x-icon"
|
|
9
|
-
}
|
|
10
|
-
],
|
|
11
|
-
"start_url": "./index.html",
|
|
12
|
-
"display": "standalone",
|
|
13
|
-
"theme_color": "#000000",
|
|
14
|
-
"background_color": "#ffffff"
|
|
15
|
-
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import algoliasearch from 'algoliasearch/lite';
|
|
3
|
-
import {
|
|
4
|
-
InstantSearch,
|
|
5
|
-
Configure,
|
|
6
|
-
Hits,
|
|
7
|
-
SearchBox,
|
|
8
|
-
{{#if flags.dynamicWidgets}}
|
|
9
|
-
DynamicWidgets,
|
|
10
|
-
Panel,
|
|
11
|
-
RefinementList,
|
|
12
|
-
{{else}}
|
|
13
|
-
{{#if attributesForFaceting}}
|
|
14
|
-
Panel,
|
|
15
|
-
RefinementList,
|
|
16
|
-
{{/if}}
|
|
17
|
-
{{/if}}
|
|
18
|
-
Pagination,
|
|
19
|
-
{{#if attributesToDisplay}}
|
|
20
|
-
Highlight,
|
|
21
|
-
{{/if}}
|
|
22
|
-
} from 'react-instantsearch-dom';
|
|
23
|
-
import PropTypes from 'prop-types';
|
|
24
|
-
import './App.css';
|
|
25
|
-
|
|
26
|
-
const searchClient = algoliasearch('{{appId}}', '{{apiKey}}');
|
|
27
|
-
|
|
28
|
-
function App() {
|
|
29
|
-
return (
|
|
30
|
-
<div>
|
|
31
|
-
<header className="header">
|
|
32
|
-
<h1 className="header-title">
|
|
33
|
-
<a href="/">{{name}}</a>
|
|
34
|
-
</h1>
|
|
35
|
-
<p className="header-subtitle">
|
|
36
|
-
using{' '}
|
|
37
|
-
<a href="https://github.com/algolia/instantsearch/tree/master/packages/react-instantsearch">
|
|
38
|
-
React InstantSearch
|
|
39
|
-
</a>
|
|
40
|
-
</p>
|
|
41
|
-
</header>
|
|
42
|
-
|
|
43
|
-
<div className="container">
|
|
44
|
-
<InstantSearch searchClient={searchClient} indexName="{{indexName}}">
|
|
45
|
-
<Configure hitsPerPage={8} />
|
|
46
|
-
<div className="search-panel">
|
|
47
|
-
<div className="search-panel__filters">
|
|
48
|
-
{{#if flags.dynamicWidgets}}
|
|
49
|
-
<DynamicWidgets fallbackWidget={RefinementList}>
|
|
50
|
-
{{#each attributesForFaceting}}
|
|
51
|
-
<Panel header="{{this}}">
|
|
52
|
-
<RefinementList attribute="{{this}}" />
|
|
53
|
-
</Panel>
|
|
54
|
-
{{/each}}
|
|
55
|
-
</DynamicWidgets>
|
|
56
|
-
{{else}}
|
|
57
|
-
{{#each attributesForFaceting}}
|
|
58
|
-
<Panel header="{{this}}">
|
|
59
|
-
<RefinementList attribute="{{this}}" />
|
|
60
|
-
</Panel>
|
|
61
|
-
{{/each}}
|
|
62
|
-
{{/if}}
|
|
63
|
-
</div>
|
|
64
|
-
|
|
65
|
-
<div className="search-panel__results">
|
|
66
|
-
<SearchBox
|
|
67
|
-
className="searchbox"
|
|
68
|
-
translations=\{{
|
|
69
|
-
placeholder: '{{searchPlaceholder}}',
|
|
70
|
-
}}
|
|
71
|
-
/>
|
|
72
|
-
<Hits hitComponent={Hit} />
|
|
73
|
-
|
|
74
|
-
<div className="pagination">
|
|
75
|
-
<Pagination />
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
</InstantSearch>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function Hit(props) {
|
|
86
|
-
return (
|
|
87
|
-
<article>
|
|
88
|
-
{{#if attributesToDisplay}}
|
|
89
|
-
<h1>
|
|
90
|
-
<Highlight attribute="{{attributesToDisplay.[0]}}" hit={props.hit} />
|
|
91
|
-
</h1>
|
|
92
|
-
{{#each attributesToDisplay}}
|
|
93
|
-
{{#unless @first}}
|
|
94
|
-
<p>
|
|
95
|
-
<Highlight attribute="{{this}}" hit={props.hit} />
|
|
96
|
-
</p>
|
|
97
|
-
{{/unless}}
|
|
98
|
-
{{/each}}
|
|
99
|
-
{{else}}
|
|
100
|
-
<p>
|
|
101
|
-
<code>{JSON.stringify(props.hit).slice(0, 100)}...</code>
|
|
102
|
-
</p>
|
|
103
|
-
{{/if}}
|
|
104
|
-
</article>
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
Hit.propTypes = {
|
|
109
|
-
hit: PropTypes.object.isRequired,
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
export default App;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Logs
|
|
2
|
-
logs
|
|
3
|
-
*.log
|
|
4
|
-
npm-debug.log*
|
|
5
|
-
yarn-debug.log*
|
|
6
|
-
yarn-error.log*
|
|
7
|
-
pnpm-debug.log*
|
|
8
|
-
lerna-debug.log*
|
|
9
|
-
|
|
10
|
-
node_modules
|
|
11
|
-
dist
|
|
12
|
-
.parcel-cache
|
|
13
|
-
*.local
|
|
14
|
-
|
|
15
|
-
# Editor directories and files
|
|
16
|
-
.vscode
|
|
17
|
-
.idea
|
|
18
|
-
.DS_Store
|
|
19
|
-
*.suo
|
|
20
|
-
*.ntvs*
|
|
21
|
-
*.njsproj
|
|
22
|
-
*.sln
|
|
23
|
-
*.sw?
|
|
@@ -1,25 +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: 'react-instantsearch-hooks-web',
|
|
7
|
-
supportedVersion: '>= 6.0.0 < 7.0.0',
|
|
8
|
-
flags: {
|
|
9
|
-
dynamicWidgets: '>=6.16',
|
|
10
|
-
insights: '>=6.43',
|
|
11
|
-
},
|
|
12
|
-
templateName: 'react-instantsearch-hooks',
|
|
13
|
-
appName: 'react-instantsearch-hooks-app',
|
|
14
|
-
keywords: [
|
|
15
|
-
'algolia',
|
|
16
|
-
'InstantSearch',
|
|
17
|
-
'React',
|
|
18
|
-
'Hooks',
|
|
19
|
-
'react-instantsearch-hooks',
|
|
20
|
-
],
|
|
21
|
-
tasks: {
|
|
22
|
-
install,
|
|
23
|
-
teardown,
|
|
24
|
-
},
|
|
25
|
-
};
|
|
@@ -1,19 +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
|
-
```
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{name}}",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"scripts": {
|
|
6
|
-
"build": "parcel build index.html",
|
|
7
|
-
"start": "parcel index.html"
|
|
8
|
-
},
|
|
9
|
-
"dependencies": {
|
|
10
|
-
"algoliasearch": "4",
|
|
11
|
-
"react": "18.1.0",
|
|
12
|
-
"react-dom": "18.1.0",
|
|
13
|
-
"react-instantsearch-hooks-web": "{{libraryVersion}}"
|
|
14
|
-
},
|
|
15
|
-
"devDependencies": {
|
|
16
|
-
"@types/react": "18.0.15",
|
|
17
|
-
"@types/react-dom": "18.0.6",
|
|
18
|
-
"parcel": "2.5.0",
|
|
19
|
-
"typescript": "4.7.4"
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
body,
|
|
2
|
-
h1 {
|
|
3
|
-
margin: 0;
|
|
4
|
-
padding: 0;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
body {
|
|
8
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
|
|
9
|
-
Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
em {
|
|
13
|
-
background: cyan;
|
|
14
|
-
font-style: normal;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.header {
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
min-height: 50px;
|
|
21
|
-
padding: 0.5rem 1rem;
|
|
22
|
-
background-image: linear-gradient(to right, #8e43e7, #00aeff);
|
|
23
|
-
color: #fff;
|
|
24
|
-
margin-bottom: 1rem;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.header a {
|
|
28
|
-
color: #fff;
|
|
29
|
-
text-decoration: none;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.header-title {
|
|
33
|
-
font-size: 1.2rem;
|
|
34
|
-
font-weight: normal;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.header-title::after {
|
|
38
|
-
content: ' ▸ ';
|
|
39
|
-
padding: 0 0.5rem;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.header-subtitle {
|
|
43
|
-
font-size: 1.2rem;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.container {
|
|
47
|
-
max-width: 1200px;
|
|
48
|
-
margin: 0 auto;
|
|
49
|
-
padding: 1rem;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.search-panel {
|
|
53
|
-
display: flex;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.search-panel__filters {
|
|
57
|
-
flex: 1;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.search-panel__results {
|
|
61
|
-
flex: 3;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.searchbox {
|
|
65
|
-
margin-bottom: 2rem;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.pagination {
|
|
69
|
-
margin: 2rem auto;
|
|
70
|
-
text-align: center;
|
|
71
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
const chalk = require('chalk');
|
|
2
|
-
const install = require('../../tasks/node/install');
|
|
3
|
-
const teardown = require('../../tasks/node/teardown');
|
|
4
|
-
|
|
5
|
-
module.exports = {
|
|
6
|
-
category: 'Mobile',
|
|
7
|
-
libraryName: 'react-instantsearch-hooks',
|
|
8
|
-
templateName: 'react-instantsearch-hooks-native',
|
|
9
|
-
appName: 'react-instantsearch-hooks-native-app',
|
|
10
|
-
keywords: [
|
|
11
|
-
'algolia',
|
|
12
|
-
'instantSearch',
|
|
13
|
-
'react',
|
|
14
|
-
'react-native',
|
|
15
|
-
'react-instantsearch-hooks-native',
|
|
16
|
-
],
|
|
17
|
-
tasks: {
|
|
18
|
-
setup(config) {
|
|
19
|
-
if (!config.silent && config.attributesForFaceting) {
|
|
20
|
-
console.log();
|
|
21
|
-
console.log(
|
|
22
|
-
`⚠️ The ${chalk.cyan(
|
|
23
|
-
'attributesForFaceting'
|
|
24
|
-
)} option is not supported in this template.`
|
|
25
|
-
);
|
|
26
|
-
console.log();
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return Promise.resolve();
|
|
30
|
-
},
|
|
31
|
-
install,
|
|
32
|
-
teardown,
|
|
33
|
-
},
|
|
34
|
-
};
|
|
@@ -1,19 +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
|
-
```
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"expo": {
|
|
3
|
-
"name": "{{name}}",
|
|
4
|
-
"slug": "{{name}}",
|
|
5
|
-
"version": "1.0.0",
|
|
6
|
-
"orientation": "portrait",
|
|
7
|
-
"icon": "./assets/icon.png",
|
|
8
|
-
"splash": {
|
|
9
|
-
"image": "./assets/splash.png",
|
|
10
|
-
"resizeMode": "contain",
|
|
11
|
-
"backgroundColor": "#ffffff"
|
|
12
|
-
},
|
|
13
|
-
"updates": {
|
|
14
|
-
"fallbackToCacheTimeout": 0
|
|
15
|
-
},
|
|
16
|
-
"assetBundlePatterns": ["**/*"],
|
|
17
|
-
"ios": {
|
|
18
|
-
"supportsTablet": true
|
|
19
|
-
},
|
|
20
|
-
"android": {
|
|
21
|
-
"adaptiveIcon": {
|
|
22
|
-
"foregroundImage": "./assets/adaptive-icon.png",
|
|
23
|
-
"backgroundColor": "#FFFFFF"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"web": {
|
|
27
|
-
"favicon": "./assets/favicon.png"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{name}}",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"main": "node_modules/expo/AppEntry.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"start": "expo start",
|
|
8
|
-
"android": "expo start --android",
|
|
9
|
-
"ios": "expo start --ios",
|
|
10
|
-
"web": "expo start --web",
|
|
11
|
-
"eject": "expo eject"
|
|
12
|
-
},
|
|
13
|
-
"dependencies": {
|
|
14
|
-
"algoliasearch": "4.12.1",
|
|
15
|
-
"expo": "~44.0.0",
|
|
16
|
-
"expo-status-bar": "~1.2.0",
|
|
17
|
-
"react": "17.0.1",
|
|
18
|
-
"react-dom": "17.0.1",
|
|
19
|
-
"react-instantsearch-hooks": "{{libraryVersion}}",
|
|
20
|
-
"react-native": "0.64.3",
|
|
21
|
-
"react-native-web": "0.17.1"
|
|
22
|
-
},
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"@babel/core": "^7.12.9",
|
|
25
|
-
"@types/react": "~17.0.21",
|
|
26
|
-
"@types/react-native": "~0.64.12",
|
|
27
|
-
"expo-cli": "5.5.1",
|
|
28
|
-
"typescript": "~4.3.5"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|