@stoker-platform/web-app 0.5.101 → 0.5.102

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,14 @@
1
1
  # @stoker-platform/web-app
2
2
 
3
+ ## 0.5.102
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: add showMetrics option to relation lists
8
+ - @stoker-platform/node-client@0.5.58
9
+ - @stoker-platform/utils@0.5.49
10
+ - @stoker-platform/web-client@0.5.58
11
+
3
12
  ## 0.5.101
4
13
 
5
14
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/web-app",
3
- "version": "0.5.101",
3
+ "version": "0.5.102",
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.50.0",
54
- "@stoker-platform/node-client": "0.5.57",
55
- "@stoker-platform/utils": "0.5.48",
56
- "@stoker-platform/web-client": "0.5.57",
54
+ "@stoker-platform/node-client": "0.5.58",
55
+ "@stoker-platform/utils": "0.5.49",
56
+ "@stoker-platform/web-client": "0.5.58",
57
57
  "@tanstack/react-table": "^8.21.3",
58
58
  "@types/react": "18.3.13",
59
59
  "@types/react-dom": "18.3.1",
@@ -2440,7 +2440,7 @@ function Collection({
2440
2440
  search={search}
2441
2441
  defaultSort={defaultSort}
2442
2442
  setOptimisticList={setOptimisticList}
2443
- relationList={!!relationList}
2443
+ relationList={relationList}
2444
2444
  relationCollection={relationCollection}
2445
2445
  relationParent={relationParent}
2446
2446
  formList={formList}
package/src/List.tsx CHANGED
@@ -6,6 +6,7 @@ import {
6
6
  CollectionSchema,
7
7
  FormList,
8
8
  Metric,
9
+ RelationList,
9
10
  RowHighlight,
10
11
  StokerCollection,
11
12
  StokerPermissions,
@@ -121,7 +122,7 @@ interface ListProps {
121
122
  }
122
123
  | undefined
123
124
  setOptimisticList: () => void
124
- relationList?: boolean
125
+ relationList?: RelationList
125
126
  relationCollection?: CollectionSchema
126
127
  relationParent?: StokerRecord
127
128
  formList?: FormList
@@ -1329,13 +1330,13 @@ export function List({
1329
1330
  <ScrollArea
1330
1331
  className={cn(
1331
1332
  !relationList && !formList && "min-h-screen xl:min-h-full xl:h-[calc(100vh-252px)]",
1332
- relationList && hasBreadcrumbs && "xl:h-[calc(100vh-352px-73px)]",
1333
- relationList && !hasBreadcrumbs && "xl:h-[calc(100vh-352px)]",
1333
+ !!relationList && hasBreadcrumbs && "xl:h-[calc(100vh-352px-73px)]",
1334
+ !!relationList && !hasBreadcrumbs && "xl:h-[calc(100vh-352px)]",
1334
1335
  formList && "h-[264px] xl:h-[316px]",
1335
1336
  )}
1336
1337
  >
1337
1338
  <CardContent>
1338
- {metrics && hasMetrics && !relationList && (
1339
+ {metrics && hasMetrics && !formList && (!relationList || relationList.showMetrics) && (
1339
1340
  <div className="hidden lg:flex flex-row gap-4 mb-4 mt-4 max-w-[calc(100vw-96px)]">
1340
1341
  {metrics.map((metric: Metric | Chart, index: number) => {
1341
1342
  const hideThirdMetric = index >= 2 && hasChart ? "hidden xl:grid" : undefined