@stoker-platform/web-app 0.5.33 → 0.5.35

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.35
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: prevent undefined toast message
8
+ - Updated dependencies
9
+ - @stoker-platform/web-client@0.5.17
10
+
11
+ ## 0.5.34
12
+
13
+ ### Patch Changes
14
+
15
+ - 9bc227d: fix: ignore inaccesible collections in record sidebar
16
+
3
17
  ## 0.5.33
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.33",
3
+ "version": "0.5.35",
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.21",
55
55
  "@stoker-platform/utils": "0.5.15",
56
- "@stoker-platform/web-client": "0.5.16",
56
+ "@stoker-platform/web-client": "0.5.17",
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/Form.tsx CHANGED
@@ -3862,11 +3862,11 @@ function RecordForm({
3862
3862
  docId,
3863
3863
  onValid,
3864
3864
  )
3865
- .then(() => {
3865
+ .then((record: Partial<StokerRecord>) => {
3866
3866
  if (serverWrite || isServerReadOnly) {
3867
3867
  toast({
3868
3868
  // eslint-disable-next-line security/detect-object-injection
3869
- description: `${recordTitle} ${recordTitleField ? values[recordTitleField] : id} created successfully.`,
3869
+ description: `${recordTitle} ${record[recordTitleField] ? record[recordTitleField] : ""} created successfully.`,
3870
3870
  })
3871
3871
  suppressDraftSaveRef.current = true
3872
3872
  localStorage.removeItem(`stoker-draft-${labels.collection}`)
@@ -3921,7 +3921,7 @@ function RecordForm({
3921
3921
  } else {
3922
3922
  toast({
3923
3923
  // eslint-disable-next-line security/detect-object-injection
3924
- description: `${recordTitle} ${recordTitleField ? values[recordTitleField] || "" : id} failed to create.`,
3924
+ description: `${recordTitle} ${values[recordTitleField] ? values[recordTitleField] : ""} failed to create.`,
3925
3925
  variant: "destructive",
3926
3926
  })
3927
3927
  }
@@ -3932,7 +3932,7 @@ function RecordForm({
3932
3932
  if (!(serverWrite || isServerReadOnly)) {
3933
3933
  toast({
3934
3934
  // eslint-disable-next-line security/detect-object-injection
3935
- description: `${recordTitle} ${recordTitleField ? values[recordTitleField] || "" : id} created.`,
3935
+ description: `${recordTitle} ${values[recordTitleField] ? values[recordTitleField] : ""} created.`,
3936
3936
  })
3937
3937
  suppressDraftSaveRef.current = true
3938
3938
  localStorage.removeItem(`stoker-draft-${labels.collection}`)
@@ -43,6 +43,7 @@ export const RecordSidebar = ({
43
43
  if (collection.relationLists) {
44
44
  collection.relationLists.forEach(async (relationList) => {
45
45
  const relationCollection = schema.collections[relationList.collection]
46
+ if (!relationCollection) return
46
47
  const relationCustomization = getCollectionConfigModule(relationCollection.labels.collection)
47
48
  const titles = await tryPromise(relationCustomization.admin?.titles)
48
49
  const title = titles?.collection || relationList.collection