@stoker-platform/web-app 0.5.160 → 0.5.162
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 +19 -0
- package/package.json +14 -14
- package/src/Form.tsx +1 -6
- package/src/utils/localFullTextSearch.ts +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @stoker-platform/web-app
|
|
2
2
|
|
|
3
|
+
## 0.5.162
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix: improve local full text search filtering
|
|
8
|
+
- @stoker-platform/node-client@0.5.65
|
|
9
|
+
- @stoker-platform/utils@0.5.56
|
|
10
|
+
- @stoker-platform/web-client@0.5.66
|
|
11
|
+
|
|
12
|
+
## 0.5.161
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- chore: update dependencies
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
- @stoker-platform/node-client@0.5.64
|
|
19
|
+
- @stoker-platform/web-client@0.5.65
|
|
20
|
+
- @stoker-platform/utils@0.5.55
|
|
21
|
+
|
|
3
22
|
## 0.5.160
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stoker-platform/web-app",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.162",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"scripts": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@fullcalendar/resource-timegrid": "^6.1.20",
|
|
29
29
|
"@fullcalendar/resource-timeline": "^6.1.20",
|
|
30
30
|
"@fullcalendar/timegrid": "^6.1.20",
|
|
31
|
-
"@hookform/resolvers": "^5.
|
|
31
|
+
"@hookform/resolvers": "^5.4.0",
|
|
32
32
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
33
33
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
34
34
|
"@radix-ui/react-dialog": "^1.1.14",
|
|
@@ -50,22 +50,22 @@
|
|
|
50
50
|
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
51
51
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
52
52
|
"@react-google-maps/api": "^2.20.8",
|
|
53
|
-
"@sentry/react": "^10.
|
|
54
|
-
"@stoker-platform/node-client": "0.5.
|
|
55
|
-
"@stoker-platform/utils": "0.5.
|
|
56
|
-
"@stoker-platform/web-client": "0.5.
|
|
53
|
+
"@sentry/react": "^10.56.0",
|
|
54
|
+
"@stoker-platform/node-client": "0.5.65",
|
|
55
|
+
"@stoker-platform/utils": "0.5.56",
|
|
56
|
+
"@stoker-platform/web-client": "0.5.66",
|
|
57
57
|
"@tanstack/react-table": "^8.21.3",
|
|
58
58
|
"@types/react": "18.3.13",
|
|
59
59
|
"@types/react-dom": "18.3.1",
|
|
60
60
|
"@vitejs/plugin-react": "^5.2.0",
|
|
61
61
|
"ai": "^5.0.44",
|
|
62
|
-
"algoliasearch": "^5.
|
|
62
|
+
"algoliasearch": "^5.53.0",
|
|
63
63
|
"class-variance-authority": "^0.7.1",
|
|
64
64
|
"clsx": "^2.1.1",
|
|
65
65
|
"cmdk": "^1.1.1",
|
|
66
66
|
"date-fns": "^3.6.0",
|
|
67
|
-
"firebase": "^12.
|
|
68
|
-
"lucide-react": "^1.
|
|
67
|
+
"firebase": "^12.14.0",
|
|
68
|
+
"lucide-react": "^1.17.0",
|
|
69
69
|
"minisearch": "^7.2.0",
|
|
70
70
|
"moment-timezone": "latest",
|
|
71
71
|
"qrcode.react": "^4.2.0",
|
|
@@ -73,14 +73,14 @@
|
|
|
73
73
|
"quill-table-better": "^1.2.3",
|
|
74
74
|
"react": "18.3.1",
|
|
75
75
|
"react-csv": "^2.2.2",
|
|
76
|
-
"react-day-picker": "^8.10.
|
|
76
|
+
"react-day-picker": "^8.10.2",
|
|
77
77
|
"react-dnd": "^16.0.1",
|
|
78
78
|
"react-dnd-html5-backend": "^16.0.1",
|
|
79
79
|
"react-dom": "18.3.1",
|
|
80
80
|
"react-helmet": "^6.1.0",
|
|
81
|
-
"react-hook-form": "^7.
|
|
81
|
+
"react-hook-form": "^7.77.0",
|
|
82
82
|
"react-resizable-panels": "^3.0.6",
|
|
83
|
-
"react-router": "^7.
|
|
83
|
+
"react-router": "^7.16.0",
|
|
84
84
|
"react-window": "^1.8.11",
|
|
85
85
|
"react-window-infinite-loader": "^1.0.10",
|
|
86
86
|
"recharts": "^2.15.4",
|
|
@@ -105,9 +105,9 @@
|
|
|
105
105
|
"@types/react-window-infinite-loader": "^1.0.9",
|
|
106
106
|
"@vite-pwa/assets-generator": "^1.0.2",
|
|
107
107
|
"autoprefixer": "^10.5.0",
|
|
108
|
-
"postcss": "^8.5.
|
|
108
|
+
"postcss": "^8.5.15",
|
|
109
109
|
"tailwindcss": "^3.4.19",
|
|
110
|
-
"vite-plugin-pwa": "^1.
|
|
110
|
+
"vite-plugin-pwa": "^1.3.0"
|
|
111
111
|
},
|
|
112
112
|
"stokerExternalPackages": {
|
|
113
113
|
"moment-timezone": "latest"
|
package/src/Form.tsx
CHANGED
|
@@ -171,7 +171,6 @@ import {
|
|
|
171
171
|
import { FiltersProvider } from "./providers/FiltersProvider"
|
|
172
172
|
import Collection from "./Collection"
|
|
173
173
|
import { Separator } from "./components/ui/separator"
|
|
174
|
-
import { SearchResult } from "minisearch"
|
|
175
174
|
import { sortList } from "./utils/sortList"
|
|
176
175
|
import MonthPicker from "./components/ui/month-picker"
|
|
177
176
|
|
|
@@ -2050,11 +2049,7 @@ function RelationField({
|
|
|
2050
2049
|
data.records.filter((doc) => {
|
|
2051
2050
|
if (!isCollectionPreloadCacheEnabled) return true
|
|
2052
2051
|
if (!fieldCustomization.admin?.filterResults) return true
|
|
2053
|
-
return !!fieldCustomization.admin?.filterResults?.(
|
|
2054
|
-
doc as unknown as SearchResult,
|
|
2055
|
-
collection,
|
|
2056
|
-
record,
|
|
2057
|
-
)
|
|
2052
|
+
return !!fieldCustomization.admin?.filterResults?.(doc, collection, record)
|
|
2058
2053
|
}),
|
|
2059
2054
|
).then((data) => {
|
|
2060
2055
|
setData(data.slice(0, numberOfResults))
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { CollectionSchema, StokerRecord } from "@stoker-platform/types"
|
|
2
|
-
import MiniSearch, { Options
|
|
2
|
+
import MiniSearch, { Options } from "minisearch"
|
|
3
3
|
|
|
4
4
|
export const localFullTextSearch = (
|
|
5
5
|
collection: CollectionSchema,
|
|
6
6
|
query: string,
|
|
7
7
|
list: StokerRecord[],
|
|
8
|
-
filter?: (result:
|
|
8
|
+
filter?: (result: StokerRecord) => boolean,
|
|
9
9
|
tokenize?: boolean,
|
|
10
10
|
) => {
|
|
11
11
|
const { recordTitleField, fullTextSearch } = collection
|
|
@@ -17,14 +17,15 @@ export const localFullTextSearch = (
|
|
|
17
17
|
fuzzy: 0.2,
|
|
18
18
|
prefix: true,
|
|
19
19
|
}),
|
|
20
|
-
filter,
|
|
21
20
|
},
|
|
22
21
|
}
|
|
22
|
+
if (filter) {
|
|
23
|
+
list = list.filter((record) => filter(record))
|
|
24
|
+
}
|
|
23
25
|
if (tokenize) {
|
|
24
26
|
miniSearchConfig.tokenize = (string) => [string]
|
|
25
27
|
}
|
|
26
28
|
const miniSearch = new MiniSearch(miniSearchConfig)
|
|
27
|
-
// eslint-disable-next-line security/detect-object-injection
|
|
28
29
|
miniSearch.addAll(list)
|
|
29
30
|
const results = miniSearch.search(query)
|
|
30
31
|
return results
|