@stoker-platform/web-app 0.5.178 → 0.5.179
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 +9 -0
- package/package.json +4 -4
- package/src/Collection.tsx +6 -1
- package/src/Record.tsx +1 -0
- package/src/RecordSidebar.tsx +14 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @stoker-platform/web-app
|
|
2
2
|
|
|
3
|
+
## 0.5.179
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- feat: add relation list parameter to titles method
|
|
8
|
+
- @stoker-platform/node-client@0.5.72
|
|
9
|
+
- @stoker-platform/utils@0.5.63
|
|
10
|
+
- @stoker-platform/web-client@0.5.74
|
|
11
|
+
|
|
3
12
|
## 0.5.178
|
|
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.
|
|
3
|
+
"version": "0.5.179",
|
|
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.72",
|
|
55
|
+
"@stoker-platform/utils": "0.5.63",
|
|
56
|
+
"@stoker-platform/web-client": "0.5.74",
|
|
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/Collection.tsx
CHANGED
|
@@ -783,7 +783,12 @@ function Collection({
|
|
|
783
783
|
labels.collection,
|
|
784
784
|
"admin",
|
|
785
785
|
]
|
|
786
|
-
const titles = await getCachedConfigValue(
|
|
786
|
+
const titles = await getCachedConfigValue(
|
|
787
|
+
customization,
|
|
788
|
+
[...collectionAdminPath, "titles"],
|
|
789
|
+
[relationList ? "relation-list" : undefined, relationCollection, relationParent],
|
|
790
|
+
true,
|
|
791
|
+
)
|
|
787
792
|
setCollectionTitle(titles?.collection || labels.collection)
|
|
788
793
|
setRecordTitle(titles?.record || labels.record)
|
|
789
794
|
if (!itemsPerPageOverride) {
|
package/src/Record.tsx
CHANGED
|
@@ -208,6 +208,7 @@ export const Record = ({ collection }: { collection: CollectionSchema }) => {
|
|
|
208
208
|
<CardContent className="px-0">
|
|
209
209
|
<SidebarProvider defaultOpen={true} open={true} className="flex flex-col lg:flex-row">
|
|
210
210
|
<RecordSidebar
|
|
211
|
+
record={record}
|
|
211
212
|
collection={collection}
|
|
212
213
|
customRecordPages={customRecordPages}
|
|
213
214
|
isAssigning={isAssigning}
|
package/src/RecordSidebar.tsx
CHANGED
|
@@ -10,7 +10,13 @@ import {
|
|
|
10
10
|
} from "./components/ui/sidebar"
|
|
11
11
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "./components/ui/dropdown-menu"
|
|
12
12
|
import { useLocation, useNavigate, useParams } from "react-router"
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
Assignable,
|
|
15
|
+
CollectionPermissions,
|
|
16
|
+
CollectionSchema,
|
|
17
|
+
CustomRecordPage,
|
|
18
|
+
StokerRecord,
|
|
19
|
+
} from "@stoker-platform/types"
|
|
14
20
|
import { collectionAccess, getField, isRelationField, tryFunction, tryPromise } from "@stoker-platform/utils"
|
|
15
21
|
import { getCurrentUserPermissions, getCollectionConfigModule, getSchema } from "@stoker-platform/web-client"
|
|
16
22
|
import { runViewTransition } from "./utils/runViewTransition"
|
|
@@ -24,11 +30,13 @@ interface SidebarItem {
|
|
|
24
30
|
}
|
|
25
31
|
|
|
26
32
|
export const RecordSidebar = ({
|
|
33
|
+
record,
|
|
27
34
|
collection,
|
|
28
35
|
customRecordPages,
|
|
29
36
|
isAssigning,
|
|
30
37
|
setIsAssigning,
|
|
31
38
|
}: {
|
|
39
|
+
record: StokerRecord
|
|
32
40
|
collection: CollectionSchema
|
|
33
41
|
customRecordPages?: CustomRecordPage[]
|
|
34
42
|
isAssigning: Record<string, boolean>
|
|
@@ -54,7 +62,11 @@ export const RecordSidebar = ({
|
|
|
54
62
|
const relationCollection = schema.collections[relationList.collection]
|
|
55
63
|
if (!relationCollection) return
|
|
56
64
|
const relationCustomization = getCollectionConfigModule(relationCollection.labels.collection)
|
|
57
|
-
const titles = await tryPromise(relationCustomization.admin?.titles
|
|
65
|
+
const titles = await tryPromise(relationCustomization.admin?.titles, [
|
|
66
|
+
"relation-list",
|
|
67
|
+
collection,
|
|
68
|
+
record,
|
|
69
|
+
])
|
|
58
70
|
const title = titles?.collection || relationList.collection
|
|
59
71
|
setRelationTitles((prev) => ({
|
|
60
72
|
...prev,
|