@stoker-platform/web-app 0.5.166 → 0.5.168
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 +15 -0
- package/package.json +4 -4
- package/src/DashboardChart.tsx +2 -0
- package/src/SearchAllResults.tsx +9 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @stoker-platform/web-app
|
|
2
2
|
|
|
3
|
+
## 0.5.168
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- feat: add option to disable Dashboard chart animation
|
|
8
|
+
- @stoker-platform/node-client@0.5.67
|
|
9
|
+
- @stoker-platform/utils@0.5.58
|
|
10
|
+
- @stoker-platform/web-client@0.5.68
|
|
11
|
+
|
|
12
|
+
## 0.5.167
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- fix: improve search all results sorting
|
|
17
|
+
|
|
3
18
|
## 0.5.166
|
|
4
19
|
|
|
5
20
|
### 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.168",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"scripts": {
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
52
52
|
"@react-google-maps/api": "^2.20.8",
|
|
53
53
|
"@sentry/react": "^10.56.0",
|
|
54
|
-
"@stoker-platform/node-client": "0.5.
|
|
55
|
-
"@stoker-platform/utils": "0.5.
|
|
56
|
-
"@stoker-platform/web-client": "0.5.
|
|
54
|
+
"@stoker-platform/node-client": "0.5.67",
|
|
55
|
+
"@stoker-platform/utils": "0.5.58",
|
|
56
|
+
"@stoker-platform/web-client": "0.5.68",
|
|
57
57
|
"@tanstack/react-table": "^8.21.3",
|
|
58
58
|
"@types/react": "18.3.13",
|
|
59
59
|
"@types/react-dom": "18.3.1",
|
package/src/DashboardChart.tsx
CHANGED
|
@@ -337,6 +337,7 @@ export const DashboardChart = ({ chart, title, collection }: DashboardChartProps
|
|
|
337
337
|
fill="url(#fill1)"
|
|
338
338
|
stroke="var(--chart-dark)"
|
|
339
339
|
stackId="a"
|
|
340
|
+
isAnimationActive={chart.animate ?? true}
|
|
340
341
|
/>
|
|
341
342
|
{(metricField2 || chart.formula2) && (
|
|
342
343
|
<Area
|
|
@@ -345,6 +346,7 @@ export const DashboardChart = ({ chart, title, collection }: DashboardChartProps
|
|
|
345
346
|
fill="url(#fill2)"
|
|
346
347
|
stroke="var(--chart-light)"
|
|
347
348
|
stackId="a"
|
|
349
|
+
isAnimationActive={chart.animate ?? true}
|
|
348
350
|
/>
|
|
349
351
|
)}
|
|
350
352
|
{(metricField1 || chart.formula1) && (
|
package/src/SearchAllResults.tsx
CHANGED
|
@@ -21,6 +21,7 @@ import { useGoToRecord } from "./utils/goToRecord"
|
|
|
21
21
|
import { performFullTextSearch } from "./utils/performFullTextSearch"
|
|
22
22
|
import { localFullTextSearch } from "./utils/localFullTextSearch"
|
|
23
23
|
import { useConnection } from "./providers/ConnectionProvider"
|
|
24
|
+
import { SearchResult } from "minisearch"
|
|
24
25
|
|
|
25
26
|
export function SearchAllResults({ collection, search }: { collection: CollectionSchema; search: string }) {
|
|
26
27
|
const { labels, fullTextSearch, recordTitleField, softDelete } = collection
|
|
@@ -92,10 +93,15 @@ export function SearchAllResults({ collection, search }: { collection: Collectio
|
|
|
92
93
|
const activeRecords = softDelete?.archivedField
|
|
93
94
|
? loadedDocs.filter((doc) => !doc[softDelete.archivedField])
|
|
94
95
|
: loadedDocs
|
|
95
|
-
const miniSearchResults = localFullTextSearch(
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
const miniSearchResults: SearchResult[] = localFullTextSearch(
|
|
97
|
+
collection,
|
|
98
|
+
search,
|
|
99
|
+
activeRecords,
|
|
98
100
|
)
|
|
101
|
+
const recordsById = new Map(activeRecords.map((record) => [record.id, record]))
|
|
102
|
+
const searchRecords = miniSearchResults
|
|
103
|
+
.map((result) => recordsById.get(result.id))
|
|
104
|
+
.filter((record): record is StokerRecord => record !== undefined)
|
|
99
105
|
setResults(searchRecords.slice(0, MAX_RESULTS))
|
|
100
106
|
setLoading(false)
|
|
101
107
|
} else {
|