@stoker-platform/web-app 0.5.247 → 0.5.249

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,22 @@
1
1
  # @stoker-platform/web-app
2
2
 
3
+ ## 0.5.249
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: add Dashboard Reminder length option
8
+ - @stoker-platform/node-client@0.5.105
9
+ - @stoker-platform/utils@0.5.91
10
+ - @stoker-platform/web-client@0.5.108
11
+
12
+ ## 0.5.248
13
+
14
+ ### Patch Changes
15
+
16
+ - @stoker-platform/node-client@0.5.104
17
+ - @stoker-platform/utils@0.5.90
18
+ - @stoker-platform/web-client@0.5.107
19
+
3
20
  ## 0.5.247
4
21
 
5
22
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/web-app",
3
- "version": "0.5.247",
3
+ "version": "0.5.249",
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.16",
52
52
  "@react-google-maps/api": "^2.20.8",
53
53
  "@sentry/react": "^10.70.0",
54
- "@stoker-platform/node-client": "0.5.103",
55
- "@stoker-platform/utils": "0.5.89",
56
- "@stoker-platform/web-client": "0.5.106",
54
+ "@stoker-platform/node-client": "0.5.105",
55
+ "@stoker-platform/utils": "0.5.91",
56
+ "@stoker-platform/web-client": "0.5.108",
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/Dashboard.tsx CHANGED
@@ -100,7 +100,19 @@ export const Dashboard = () => {
100
100
  let cols = ""
101
101
  if (dashboardItem.kind === "metric") cols = "md:col-span-1"
102
102
  if (dashboardItem.kind === "chart") cols = "md:col-span-4"
103
- if (dashboardItem.kind === "reminder") cols = "lg:col-span-2"
103
+ if (dashboardItem.kind === "reminder") {
104
+ const reminderCols = {
105
+ 1: "lg:col-span-2",
106
+ 2: "lg:col-span-4",
107
+ 3: "lg:col-span-6",
108
+ } as const
109
+ const length =
110
+ dashboardItem.length === 2 || dashboardItem.length === 3
111
+ ? dashboardItem.length
112
+ : 1
113
+ // eslint-disable-next-line security/detect-object-injection
114
+ cols = reminderCols[length]
115
+ }
104
116
  return (
105
117
  <div key={`dashboard-${index}`} className={cn("col-span-3", cols)}>
106
118
  {dashboardItem.kind === "metric" && isPreloadCacheEnabled && (