@stoker-platform/web-app 0.5.25 → 0.5.27

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,19 @@
1
1
  # @stoker-platform/web-app
2
2
 
3
+ ## 0.5.27
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @stoker-platform/web-client@0.5.13
9
+
10
+ ## 0.5.26
11
+
12
+ ### Patch Changes
13
+
14
+ - fix: fix Dashboard chart flicker
15
+ - fix: improve card sorting field selector labels
16
+
3
17
  ## 0.5.25
4
18
 
5
19
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/web-app",
3
- "version": "0.5.25",
3
+ "version": "0.5.27",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "scripts": {
@@ -53,7 +53,7 @@
53
53
  "@sentry/react": "^10.38.0",
54
54
  "@stoker-platform/node-client": "0.5.18",
55
55
  "@stoker-platform/utils": "0.5.12",
56
- "@stoker-platform/web-client": "0.5.12",
56
+ "@stoker-platform/web-client": "0.5.13",
57
57
  "@tanstack/react-table": "^8.21.3",
58
58
  "@types/react": "18.3.13",
59
59
  "@types/react-dom": "18.3.1",
@@ -1821,6 +1821,17 @@ function Collection({
1821
1821
  <ScrollArea className={sortingHeight}>
1822
1822
  <div>
1823
1823
  {sortingFields.map((field: CollectionField) => {
1824
+ const fieldCustomization = getFieldCustomization(
1825
+ field,
1826
+ customization,
1827
+ )
1828
+ const label =
1829
+ tryFunction(fieldCustomization.admin?.label) ||
1830
+ field.name
1831
+ const condition =
1832
+ fieldCustomization.admin?.condition?.list
1833
+ if (condition !== undefined && !tryFunction(condition))
1834
+ return null
1824
1835
  return (
1825
1836
  <DropdownMenuItem
1826
1837
  key={field.name}
@@ -1859,7 +1870,7 @@ function Collection({
1859
1870
  {order?.field === field.name && (
1860
1871
  <Check className="absolute h-3.5 w-3.5 mr-1" />
1861
1872
  )}
1862
- <span className="ml-5">{field.name}</span>
1873
+ <span className="ml-5">{label}</span>
1863
1874
  </DropdownMenuItem>
1864
1875
  )
1865
1876
  })}
@@ -87,7 +87,6 @@ export const DashboardChart = ({ chart, title, collection }: DashboardChartProps
87
87
 
88
88
  const cacheLoaded = useCallback(() => {
89
89
  setIsCacheLoading(false)
90
- getData(collectionSchema, constraints, debouncedSetIsLoading, setResults, setUnsubscribe)
91
90
  }, [constraints])
92
91
 
93
92
  useEffect(() => {
@@ -62,9 +62,7 @@ export const DashboardMetric = ({ metric, title, collection }: DashboardMetricPr
62
62
 
63
63
  useEffect(() => {
64
64
  debouncedSetIsLoading(true)
65
- if (!(isPreloadCacheEnabled && isCacheLoading)) {
66
- getData(collectionSchema, constraints, debouncedSetIsLoading, setResults, setUnsubscribe)
67
- }
65
+ getData(collectionSchema, constraints, debouncedSetIsLoading, setResults, setUnsubscribe)
68
66
  return () => {
69
67
  unsubscribe?.forEach((unsubscribe) => unsubscribe())
70
68
  if (loadingTimeoutRef.current) {
@@ -79,7 +77,6 @@ export const DashboardMetric = ({ metric, title, collection }: DashboardMetricPr
79
77
 
80
78
  const cacheLoaded = useCallback(() => {
81
79
  setIsCacheLoading(false)
82
- getData(collectionSchema, constraints, debouncedSetIsLoading, setResults, setUnsubscribe)
83
80
  }, [constraints])
84
81
 
85
82
  useEffect(() => {
@@ -95,9 +95,7 @@ export const DashboardReminder = ({ reminder, title, collection }: DashboardRemi
95
95
  }
96
96
  initialize()
97
97
  debouncedSetIsLoading(true)
98
- if (!(isPreloadCacheEnabled && isCacheLoading)) {
99
- getData(collectionSchema, constraints, debouncedSetIsLoading, setResults, setUnsubscribe)
100
- }
98
+ getData(collectionSchema, constraints, debouncedSetIsLoading, setResults, setUnsubscribe)
101
99
  return () => {
102
100
  unsubscribe?.forEach((unsubscribe) => unsubscribe())
103
101
  if (loadingTimeoutRef.current) {
@@ -112,7 +110,6 @@ export const DashboardReminder = ({ reminder, title, collection }: DashboardRemi
112
110
 
113
111
  const cacheLoaded = useCallback(() => {
114
112
  setIsCacheLoading(false)
115
- getData(collectionSchema, constraints, debouncedSetIsLoading, setResults, setUnsubscribe)
116
113
  }, [constraints])
117
114
 
118
115
  useEffect(() => {
@@ -205,7 +202,6 @@ export const DashboardReminder = ({ reminder, title, collection }: DashboardRemi
205
202
  .sort((a, b) => {
206
203
  if (!sorting) return 0
207
204
  const sortingField = getField(fields, sorting.field)
208
- console.log(sorting.field, sortingField)
209
205
  const fieldCustomization = getFieldCustomization(
210
206
  sortingField,
211
207
  customization,