@stoker-platform/web-app 0.5.23 → 0.5.26

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,24 @@
1
1
  # @stoker-platform/web-app
2
2
 
3
+ ## 0.5.26
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: fix Dashboard chart flicker
8
+ - fix: improve card sorting field selector labels
9
+
10
+ ## 0.5.25
11
+
12
+ ### Patch Changes
13
+
14
+ - fix: remove vite.config.ts comment
15
+
16
+ ## 0.5.24
17
+
18
+ ### Patch Changes
19
+
20
+ - fix: disable zoom for inputs and fix textarea scroll trap
21
+
3
22
  ## 0.5.23
4
23
 
5
24
  ### Patch Changes
package/index.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
6
6
 
7
7
  <title>Stoker</title>
8
8
  <meta name="description" content="The Stoker Starter Project web app." />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/web-app",
3
- "version": "0.5.23",
3
+ "version": "0.5.26",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "scripts": {
package/src/App.css CHANGED
@@ -4,6 +4,7 @@
4
4
  overflow-y: hidden;
5
5
  }
6
6
  }
7
+
7
8
  @media screen and (max-width: 1023px) {
8
9
  .fc-toolbar.fc-header-toolbar {
9
10
  font-size: 85%;
@@ -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,
package/src/Form.tsx CHANGED
@@ -653,7 +653,7 @@ function StringField({
653
653
  ref={(textarea) => {
654
654
  if (textarea) {
655
655
  textarea.style.height = "0px"
656
- textarea.style.height = textarea.scrollHeight + "px"
656
+ textarea.style.height = textarea.scrollHeight + 10 + "px"
657
657
  }
658
658
  }}
659
659
  disabled={isDisabled}