@stoker-platform/web-app 0.5.93 → 0.5.95

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,21 @@
1
1
  # @stoker-platform/web-app
2
2
 
3
+ ## 0.5.95
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: delay record sidebar display until initialised
8
+
9
+ ## 0.5.94
10
+
11
+ ### Patch Changes
12
+
13
+ - feat: rename addToAuthToken option to saveToAuthToken
14
+ - Updated dependencies
15
+ - @stoker-platform/node-client@0.5.52
16
+ - @stoker-platform/web-client@0.5.53
17
+ - @stoker-platform/utils@0.5.44
18
+
3
19
  ## 0.5.93
4
20
 
5
21
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/web-app",
3
- "version": "0.5.93",
3
+ "version": "0.5.95",
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.51",
55
- "@stoker-platform/utils": "0.5.43",
56
- "@stoker-platform/web-client": "0.5.52",
54
+ "@stoker-platform/node-client": "0.5.52",
55
+ "@stoker-platform/utils": "0.5.44",
56
+ "@stoker-platform/web-client": "0.5.53",
57
57
  "@tanstack/react-table": "^8.21.3",
58
58
  "@types/react": "18.3.13",
59
59
  "@types/react-dom": "18.3.1",
@@ -45,6 +45,7 @@ export const RecordSidebar = ({
45
45
  const [relationTitles, setRelationTitles] = useState<Record<string, string>>({})
46
46
  const [relationIcons, setRelationIcons] = useState<Record<string, React.FC>>({})
47
47
  const [assignable, setAssignable] = useState<Assignable[]>([])
48
+ const [isInitialized, setIsInitialized] = useState(false)
48
49
 
49
50
  useEffect(() => {
50
51
  ;(async () => {
@@ -68,6 +69,7 @@ export const RecordSidebar = ({
68
69
  const assignable = await tryPromise(customization.admin?.assignable)
69
70
  setAssignable(assignable)
70
71
  }
72
+ setIsInitialized(true)
71
73
  })()
72
74
  }, [])
73
75
 
@@ -126,6 +128,8 @@ export const RecordSidebar = ({
126
128
  const anyCustomActive = customItems.some((item) => location.pathname.includes(item.page))
127
129
  const anyRelationActive = relationItems.some((item) => location.pathname.includes(item.page))
128
130
 
131
+ if (!isInitialized) return null
132
+
129
133
  return (
130
134
  <Sidebar
131
135
  collapsible="none"
@@ -9,7 +9,7 @@ export const isServerCreate = (collection: CollectionSchema, user?: UserData) =>
9
9
  export const isServerUpdate = (collection: CollectionSchema, record: Partial<StokerRecord>, user?: UserData) => {
10
10
  const { auth, access, fields } = collection
11
11
  const { serverWriteOnly } = access
12
- const tokenFields = fields.filter((field) => field.addToAuthToken)
12
+ const tokenFields = fields.filter((field) => field.saveToAuthToken)
13
13
  return !!(
14
14
  serverWriteOnly ||
15
15
  (auth && user?.operation) ||