@firecms/core 3.0.0-canary.110 → 3.0.0-canary.111

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@firecms/core",
3
3
  "type": "module",
4
- "version": "3.0.0-canary.110",
4
+ "version": "3.0.0-canary.111",
5
5
  "description": "Awesome Firebase/Firestore-based headless open-source CMS",
6
6
  "funding": {
7
7
  "url": "https://github.com/sponsors/firecmsco"
@@ -46,9 +46,9 @@
46
46
  "./package.json": "./package.json"
47
47
  },
48
48
  "dependencies": {
49
- "@firecms/editor": "^3.0.0-canary.110",
50
- "@firecms/formex": "^3.0.0-canary.110",
51
- "@firecms/ui": "^3.0.0-canary.110",
49
+ "@firecms/editor": "^3.0.0-canary.111",
50
+ "@firecms/formex": "^3.0.0-canary.111",
51
+ "@firecms/ui": "^3.0.0-canary.111",
52
52
  "@hello-pangea/dnd": "^16.6.0",
53
53
  "@radix-ui/react-portal": "^1.1.1",
54
54
  "clsx": "^2.1.1",
@@ -100,7 +100,7 @@
100
100
  "dist",
101
101
  "src"
102
102
  ],
103
- "gitHead": "24781d95e840c68233d4529ff1f36f6cdc261f95",
103
+ "gitHead": "7a2837480574f87cdca984a23a9e645b5c66dfe7",
104
104
  "publishConfig": {
105
105
  "access": "public"
106
106
  },
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  applyPermissionsFunctionIfEmpty,
21
21
  getCollectionByPathOrId,
22
- mergeDeep,
22
+ mergeDeep, removeFunctions,
23
23
  removeInitialAndTrailingSlashes,
24
24
  resolveCollectionPathIds,
25
25
  resolvePermissions
@@ -200,6 +200,7 @@ export function useBuildNavigationController<EC extends EntityCollection, UserTy
200
200
 
201
201
  let shouldUpdateTopLevelNav = false;
202
202
  if (!areCollectionListsEqual(collectionsRef.current ?? [], resolvedCollections)) {
203
+ console.log("Collections need to be updated");
203
204
  collectionsRef.current = resolvedCollections;
204
205
  shouldUpdateTopLevelNav = true;
205
206
  }
@@ -208,10 +209,12 @@ export function useBuildNavigationController<EC extends EntityCollection, UserTy
208
209
  shouldUpdateTopLevelNav = true;
209
210
  }
210
211
  if (!equal(viewsRef.current, resolvedViews)) {
212
+ console.log("Views need to be updated");
211
213
  viewsRef.current = resolvedViews;
212
214
  shouldUpdateTopLevelNav = true;
213
215
  }
214
216
  if (!equal(adminViewsRef.current, resolvedAdminViews)) {
217
+ console.log("Admin views need to be updated");
215
218
  adminViewsRef.current = resolvedAdminViews;
216
219
  shouldUpdateTopLevelNav = true;
217
220
  }
@@ -225,8 +228,10 @@ export function useBuildNavigationController<EC extends EntityCollection, UserTy
225
228
  setNavigationLoadingError(e as any);
226
229
  }
227
230
 
228
- setNavigationLoading(false);
229
- setInitialised(true);
231
+ if (navigationLoading)
232
+ setNavigationLoading(false);
233
+ if (!initialised)
234
+ setInitialised(true);
230
235
 
231
236
  }, [
232
237
  collectionsProp,
@@ -509,5 +514,5 @@ function areCollectionsEqual(a: EntityCollection, b: EntityCollection) {
509
514
  if (!areCollectionListsEqual(subcollectionsA ?? [], subcollectionsB ?? [])) {
510
515
  return false;
511
516
  }
512
- return equal(restA, restB);
517
+ return equal(removeFunctions(restA), removeFunctions(restB));
513
518
  }