venue-js 1.4.0-next.12 → 1.4.0-next.14
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/dist/data/index.d.mts +845 -0
- package/dist/data/index.d.ts +845 -0
- package/dist/data/index.js +2153 -0
- package/dist/data/index.js.map +1 -0
- package/dist/data/index.mjs +2116 -0
- package/dist/data/index.mjs.map +1 -0
- package/dist/index.d.mts +9 -844
- package/dist/index.d.ts +9 -844
- package/dist/index.js +7 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2004,7 +2004,7 @@ var getSearchClient = ({ occupants, amenities }) => {
|
|
|
2004
2004
|
const fuseAmenities = new Fuse(amenities, {
|
|
2005
2005
|
threshold: 0.2,
|
|
2006
2006
|
keys: [
|
|
2007
|
-
{ name: "properties.name", "weight": 1, getFn: (obj) => Object.values(obj.properties.name) },
|
|
2007
|
+
{ name: "properties.name", "weight": 1, getFn: (obj) => Object.values(obj.properties.name || {}) },
|
|
2008
2008
|
{ name: "properties.category", "weight": 1 }
|
|
2009
2009
|
]
|
|
2010
2010
|
});
|
|
@@ -2014,17 +2014,13 @@ var getSearchClient = ({ occupants, amenities }) => {
|
|
|
2014
2014
|
includeScore: true,
|
|
2015
2015
|
shouldSort: true,
|
|
2016
2016
|
keys: [
|
|
2017
|
-
{ name: "properties.name", "weight": 4, getFn: (obj) => Object.values(obj.properties.name) },
|
|
2018
|
-
{ name: "properties.category", "weight": 0.25 },
|
|
2019
|
-
{
|
|
2020
|
-
name: "properties.local_categories",
|
|
2021
|
-
"weight": 0.25,
|
|
2022
|
-
getFn: (occ) => occ.properties.local_categories.map((cat3) => Object.values(cat3.properties.name)).flat()
|
|
2023
|
-
},
|
|
2017
|
+
{ name: "properties.name", "weight": 4, getFn: (obj) => Object.values(obj.properties.name || {}) },
|
|
2024
2018
|
{ name: "properties.keywords", "weight": 0.5 },
|
|
2019
|
+
{ name: "properties.category", "weight": 0.25 },
|
|
2020
|
+
{ name: "properties.local_category_names", "weight": 0.25 },
|
|
2025
2021
|
{ name: "properties.description", "weight": 0.25, getFn: (occ) => Object.values(occ.properties.description || {}) },
|
|
2026
|
-
{ name: "properties.
|
|
2027
|
-
{ name: "properties.
|
|
2022
|
+
{ name: "properties.unit_name", "weight": 0.25 },
|
|
2023
|
+
{ name: "properties.kiosk_name", "weight": 0.25 }
|
|
2028
2024
|
]
|
|
2029
2025
|
});
|
|
2030
2026
|
const search2 = (value) => {
|
|
@@ -2155,7 +2151,7 @@ var getDataClient = (options) => {
|
|
|
2155
2151
|
const searchFn = async (txt) => {
|
|
2156
2152
|
if (!searchClient) {
|
|
2157
2153
|
const [occupants, amenities] = await Promise.all([
|
|
2158
|
-
filterByType("occupant"
|
|
2154
|
+
filterByType("occupant"),
|
|
2159
2155
|
filterByType("amenity")
|
|
2160
2156
|
]);
|
|
2161
2157
|
const haystack = { occupants, amenities };
|