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.mjs
CHANGED
|
@@ -1920,7 +1920,7 @@ var getSearchClient = ({ occupants, amenities }) => {
|
|
|
1920
1920
|
const fuseAmenities = new Fuse(amenities, {
|
|
1921
1921
|
threshold: 0.2,
|
|
1922
1922
|
keys: [
|
|
1923
|
-
{ name: "properties.name", "weight": 1, getFn: (obj) => Object.values(obj.properties.name) },
|
|
1923
|
+
{ name: "properties.name", "weight": 1, getFn: (obj) => Object.values(obj.properties.name || {}) },
|
|
1924
1924
|
{ name: "properties.category", "weight": 1 }
|
|
1925
1925
|
]
|
|
1926
1926
|
});
|
|
@@ -1930,17 +1930,13 @@ var getSearchClient = ({ occupants, amenities }) => {
|
|
|
1930
1930
|
includeScore: true,
|
|
1931
1931
|
shouldSort: true,
|
|
1932
1932
|
keys: [
|
|
1933
|
-
{ name: "properties.name", "weight": 4, getFn: (obj) => Object.values(obj.properties.name) },
|
|
1934
|
-
{ name: "properties.category", "weight": 0.25 },
|
|
1935
|
-
{
|
|
1936
|
-
name: "properties.local_categories",
|
|
1937
|
-
"weight": 0.25,
|
|
1938
|
-
getFn: (occ) => occ.properties.local_categories.map((cat3) => Object.values(cat3.properties.name)).flat()
|
|
1939
|
-
},
|
|
1933
|
+
{ name: "properties.name", "weight": 4, getFn: (obj) => Object.values(obj.properties.name || {}) },
|
|
1940
1934
|
{ name: "properties.keywords", "weight": 0.5 },
|
|
1935
|
+
{ name: "properties.category", "weight": 0.25 },
|
|
1936
|
+
{ name: "properties.local_category_names", "weight": 0.25 },
|
|
1941
1937
|
{ name: "properties.description", "weight": 0.25, getFn: (occ) => Object.values(occ.properties.description || {}) },
|
|
1942
|
-
{ name: "properties.
|
|
1943
|
-
{ name: "properties.
|
|
1938
|
+
{ name: "properties.unit_name", "weight": 0.25 },
|
|
1939
|
+
{ name: "properties.kiosk_name", "weight": 0.25 }
|
|
1944
1940
|
]
|
|
1945
1941
|
});
|
|
1946
1942
|
const search2 = (value) => {
|
|
@@ -2071,7 +2067,7 @@ var getDataClient = (options) => {
|
|
|
2071
2067
|
const searchFn = async (txt) => {
|
|
2072
2068
|
if (!searchClient) {
|
|
2073
2069
|
const [occupants, amenities] = await Promise.all([
|
|
2074
|
-
filterByType("occupant"
|
|
2070
|
+
filterByType("occupant"),
|
|
2075
2071
|
filterByType("amenity")
|
|
2076
2072
|
]);
|
|
2077
2073
|
const haystack = { occupants, amenities };
|