diff --git a/composer.json b/composer.json
index cc77a1abb..5b4e0d4dc 100644
--- a/composer.json
+++ b/composer.json
@@ -17,18 +17,20 @@
"prefer-stable": true,
"require": {
"php": "^8.1|^8.2|^8.3",
- "rapidez/laravel-multi-cache": "^1.0",
"blade-ui-kit/blade-heroicons": "^2.4",
+ "http-interop/http-factory-guzzle": "^1.2",
"illuminate/database": "^11.0",
"illuminate/events": "^11.0",
"illuminate/queue": "^11.0",
"illuminate/support": "^11.0",
"justbetter/laravel-http3earlyhints": "*",
+ "laravel/scout": "^10.11",
"lcobucci/clock": "^2.0|^3.2",
"lcobucci/jwt": "^4.0|^5.3",
- "mailerlite/laravel-elasticsearch": "^11.1",
+ "matchish/laravel-scout-elasticsearch": "^7.10",
"rapidez/blade-components": "^1.5",
"rapidez/blade-directives": "^1.0",
+ "rapidez/laravel-multi-cache": "^1.0",
"tormjens/eventy": "^0.8"
},
"require-dev": {
@@ -53,7 +55,10 @@
}
},
"config": {
- "sort-packages": true
+ "sort-packages": true,
+ "allow-plugins": {
+ "php-http/discovery": true
+ }
},
"extra": {
"laravel": {
diff --git a/config/rapidez/frontend.php b/config/rapidez/frontend.php
index e37adb43f..c108189b1 100644
--- a/config/rapidez/frontend.php
+++ b/config/rapidez/frontend.php
@@ -5,7 +5,6 @@
'exposed' => [
'store',
'es_url',
- 'es_prefix',
'media_url',
'magento_url',
'notifications',
diff --git a/config/rapidez/indexer.php b/config/rapidez/indexer.php
index 517991e66..924298c11 100644
--- a/config/rapidez/indexer.php
+++ b/config/rapidez/indexer.php
@@ -1,6 +1,9 @@
[2, 3, 4],
- // Additional searchable attributes with the search weight.
- 'searchable' => [
- // 'attribute' => 4.0,
- ],
-
- // From Magento only "Yes/No, Dropdown, Multiple Select and Price" attribute types
- // can be configured as filter. If you'd like to have a filter for an attribute
- // with, for example, the type of "Text", you can specify the attribute_code here.
- 'additional_filters' => [
- // eav_attribute attribute_code. e.g. brand
+ // The Rapidez indexer will automatically start indexing any models with the Searchable trait that exist within `models.php`.
+ // If you want to add extra models you can add them here. Only Eloquent models are supported.
+ 'extra_models' => [
+ // 'book' => \App\Models\Book::class,
],
];
diff --git a/config/rapidez/searchkit.php b/config/rapidez/searchkit.php
new file mode 100644
index 000000000..86448434f
--- /dev/null
+++ b/config/rapidez/searchkit.php
@@ -0,0 +1,56 @@
+ [
+ 'name',
+ ],
+
+ // Additional attributes that are used to search the results.
+ // This will be merged with the searchable
+ // attributes configured in Magento.
+ 'search_attributes' => [
+ // ['field' => 'attribute_code', 'weight' => 4.0],
+ ],
+
+ // Attributes that are returned in the search result response.
+ // Don't want to keep track of this? An empty array will
+ // return all attributes, but that's not recommended!
+ 'result_attributes' => [
+ 'entity_id',
+ 'name',
+ 'sku',
+ 'price',
+ 'special_price',
+ 'image',
+ 'images',
+ 'url',
+ 'thumbnail',
+ 'in_stock',
+ 'children',
+ 'super_*',
+ 'reviews_count',
+ 'reviews_score',
+ ],
+
+ // Additional attributes that are used to create facets.
+ // From Magento only "Yes/No, Dropdown, Multiple Select and Price" attribute types
+ // can be configured as filter. If you'd like to have a filter for an attribute
+ // with, for example, the type of "Text", you can specify the attribute_code here.
+ 'facet_attributes' => [
+ // ['attribute' => 'brand', 'field' => 'brand.keyword', 'type' => 'string'],
+ ],
+
+ // Attributes that are used to create filters.
+ // TODO: Do we really need this? With ReactiveSearch
+ // we didn't need to keep a list to filter.
+ 'filter_attributes' => [
+ ['attribute' => 'entity_id', 'field' => 'entity_id', 'type' => 'numeric'],
+ ['attribute' => 'category_ids', 'field' => 'category_ids', 'type' => 'numeric'],
+ ['attribute' => 'visibility', 'field' => 'visibility', 'type' => 'numeric'],
+ ],
+
+ // TODO: Sorting...
+ // 'sorting' => []
+];
diff --git a/config/rapidez/system.php b/config/rapidez/system.php
index d5179d98c..09db30437 100644
--- a/config/rapidez/system.php
+++ b/config/rapidez/system.php
@@ -7,9 +7,6 @@
// Elasticsearch url.
'es_url' => env('ELASTICSEARCH_URL', 'http://localhost:9200'),
- // Elasticsearch prefix.
- 'es_prefix' => env('ELASTICSEARCH_PREFIX', 'rapidez'),
-
// Get Magento url from Database
'magento_url_from_db' => env('GET_MAGENTO_URL_FROM_DATABASE', false),
diff --git a/lang/nl.json b/lang/nl.json
index 68fee71a9..4a4501f89 100644
--- a/lang/nl.json
+++ b/lang/nl.json
@@ -112,5 +112,7 @@
"Yes": "Ja",
"You don't have anything in your cart.": "Je hebt geen producten in je winkelwagen.",
"You have filtered for:": "Je hebt gefilterd op:",
- "Your order is currently:": "Je bestelling is op dit moment:"
+ "Your order is currently:": "Je bestelling is op dit moment:",
+ "First": "Eerste",
+ "Last": "Laatste"
}
diff --git a/package.json b/package.json
index a556c625c..0668d4de8 100644
--- a/package.json
+++ b/package.json
@@ -7,9 +7,10 @@
"prod": "vite build"
},
"devDependencies": {
- "@appbaseio/reactivesearch-vue": "https://gitpkg.vercel.app/api/pkg?url=rapidez/reactivesearch/packages/vue&commit=v1.34.0-vue&scripts.postinstall=yarn%20install%20--ignore-scripts%20%26%26%20yarn%20run%20build-es&scripts.build-es=nps%20build.es",
+ "@algolia/autocomplete-js": "^1.17.9",
"@babel/core": "^7.23.9",
"@hotwired/turbo": "^8.0.2",
+ "@searchkit/instantsearch-client": "^4.14.1",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.9",
"@vitejs/plugin-vue2": "^2.2.0",
@@ -20,6 +21,7 @@
"graphql": "^16.8.1",
"graphql-combine-query": "indykoning/graphql-combine-query#feature/add-allowed-duplicates",
"graphql-tag": "^2.12.6",
+ "instantsearch.js": "^4.75.7",
"laravel-vite-plugin": "^1.0.5",
"postcss": "^8.4.29",
"postcss-import": "^16.1.0",
@@ -33,6 +35,7 @@
"vue": "^2.7",
"vue-clickaway": "^2.2.2",
"vue-cookies": "^1.8.2",
+ "vue-instantsearch": "^4.19.13",
"vue-template-compiler": "^2.7.14",
"vue-turbolinks": "^2.2.2",
"vue2-teleport": "^1.1.4"
diff --git a/resources/css/app.css b/resources/css/app.css
index 0c0cd17d2..e35303a07 100644
--- a/resources/css/app.css
+++ b/resources/css/app.css
@@ -1,6 +1,5 @@
@import 'components/vue-slider';
@import 'components/price-slider';
-@import 'components/pagination';
@import 'components/autocomplete';
@tailwind base;
diff --git a/resources/css/components/autocomplete.css b/resources/css/components/autocomplete.css
index 1ce3ace8a..cabf520bf 100644
--- a/resources/css/components/autocomplete.css
+++ b/resources/css/components/autocomplete.css
@@ -1,3 +1,4 @@
+/*Can we remove this file?*/
.search-input + div div[groupposition='right'] {
@apply size-6 right-16 cursor-pointer z-50 !-translate-y-1/2 !top-1/2 !absolute;
diff --git a/resources/css/components/pagination.css b/resources/css/components/pagination.css
deleted file mode 100644
index 1027377b5..000000000
--- a/resources/css/components/pagination.css
+++ /dev/null
@@ -1,37 +0,0 @@
-.pagination .pagination-button:first-child:nth-last-child(3),
-.pagination .pagination-button:first-child:nth-last-child(3) ~ .pagination-button {
- @apply hidden;
-}
-
-.pagination {
- @apply flex flex-wrap justify-center gap-x-2 !m-0 !my-6 max-md:gap-y-4;
-}
-
-.pagination-button {
- @apply !font-semibold !font-sans !border !border-border !rounded !bg-white !text !shadow;
-}
-
-.pagination-button.active {
- @apply !border !border-none !bg-primary !text-white !shadow-none;
-}
-
-.pagination-button:first-child {
- @apply !mr-auto max-md:w-full max-md:order-last;
-}
-
-.pagination-button:last-child {
- @apply !ml-auto max-md:w-full max-md:-order-1;
-}
-
-.pagination-button:not(:first-child):not(:last-child) {
- @apply !m-0 !size-14 max-md:flex-1 max-md:w-auto;
-}
-
-.pagination-button:first-child,
-.pagination-button:last-child {
- @apply h-14 px-6 max-md:!m-0;
-}
-
-.pagination-button[disabled] {
- @apply opacity-60;
-}
diff --git a/resources/css/components/price-slider.css b/resources/css/components/price-slider.css
index 1452735bc..4c0c37d56 100644
--- a/resources/css/components/price-slider.css
+++ b/resources/css/components/price-slider.css
@@ -1,3 +1,4 @@
+/*Can we remove this file?*/
div.vue-slider {
@apply mt-5 mb-3.5 max-w-sm;
}
diff --git a/resources/css/components/vue-slider.css b/resources/css/components/vue-slider.css
index 53a7b0acd..046893fd9 100644
--- a/resources/css/components/vue-slider.css
+++ b/resources/css/components/vue-slider.css
@@ -1,3 +1,4 @@
+/*Can we remove this file?*/
.vue-slider {
@apply mx-2;
}
diff --git a/resources/js/components/Elements/RangeSlider.vue b/resources/js/components/Elements/RangeSlider.vue
new file mode 100644
index 000000000..a2f3a8d7c
--- /dev/null
+++ b/resources/js/components/Elements/RangeSlider.vue
@@ -0,0 +1,85 @@
+
diff --git a/resources/js/components/Listing/Listing.vue b/resources/js/components/Listing/Listing.vue
index 094e4e86f..05ebf3cc1 100644
--- a/resources/js/components/Listing/Listing.vue
+++ b/resources/js/components/Listing/Listing.vue
@@ -1,27 +1,50 @@
diff --git a/resources/js/components/Recursion.vue b/resources/js/components/Recursion.vue
new file mode 100644
index 000000000..0eb4498f4
--- /dev/null
+++ b/resources/js/components/Recursion.vue
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
diff --git a/resources/js/components/Search/Autocomplete.vue b/resources/js/components/Search/Autocomplete.vue
index 0a44d3024..2edb64147 100644
--- a/resources/js/components/Search/Autocomplete.vue
+++ b/resources/js/components/Search/Autocomplete.vue
@@ -1,124 +1,94 @@