@stoker-platform/web-app 0.5.205 → 0.5.206

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @stoker-platform/web-app
2
2
 
3
+ ## 0.5.206
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: update Algolia search filters to match web app filters
8
+
3
9
  ## 0.5.205
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/web-app",
3
- "version": "0.5.205",
3
+ "version": "0.5.206",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "scripts": {
@@ -534,7 +534,11 @@ function Collection({
534
534
  hitsPerPage = batchSize
535
535
  }
536
536
  const constraints = getFilterConstraints(latestFilters, false, true) as [string, "==" | "in", unknown][]
537
- const objectIDs = await performFullTextSearch(collection, search, hitsPerPage, constraints)
537
+ const assigning =
538
+ queryIsAssigning && assignable && relationList && relationCollection && relationParent?.id
539
+ ? { collection: relationCollection.labels.collection, id: relationParent.id }
540
+ : undefined
541
+ const objectIDs = await performFullTextSearch(collection, search, hitsPerPage, constraints, assigning)
538
542
  searchResults.current = { ...searchResults.current, [key]: objectIDs }
539
543
  if (
540
544
  objectIDs.length > 0 &&
@@ -7,6 +7,7 @@ export const performFullTextSearch = async (
7
7
  search: string,
8
8
  hitsPerPage: number,
9
9
  constraints?: [string, "==" | "in", unknown][],
10
+ assigning?: { collection: string; id: string },
10
11
  ) => {
11
12
  const { labels } = collection
12
13
  const firebaseFunctions = getFunctions(getApp(), import.meta.env.STOKER_FB_FUNCTIONS_REGION)
@@ -16,6 +17,7 @@ export const performFullTextSearch = async (
16
17
  query: search,
17
18
  hitsPerPage,
18
19
  constraints,
20
+ assigning,
19
21
  })) as { data: string[] }
20
22
  return results.data
21
23
  }