@firecms/core 3.0.0-alpha.62 → 3.0.0-alpha.63

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.
Files changed (37) hide show
  1. package/dist/components/HomePage/DefaultHomePage.d.ts +11 -1
  2. package/dist/index.es.js +3974 -3977
  3. package/dist/index.es.js.map +1 -1
  4. package/dist/index.umd.js +5 -5
  5. package/dist/index.umd.js.map +1 -1
  6. package/dist/preview/PropertyPreview.d.ts +2 -1
  7. package/dist/preview/PropertyPreviewProps.d.ts +1 -6
  8. package/dist/preview/property_previews/ArrayOfMapsPreview.d.ts +1 -1
  9. package/dist/preview/property_previews/ArrayOfStorageComponentsPreview.d.ts +1 -1
  10. package/dist/preview/property_previews/ArrayOfStringsPreview.d.ts +1 -1
  11. package/dist/preview/property_previews/ArrayOneOfPreview.d.ts +1 -1
  12. package/dist/preview/property_previews/ArrayPropertyPreview.d.ts +1 -1
  13. package/dist/preview/property_previews/MapPropertyPreview.d.ts +1 -1
  14. package/dist/types/navigation.d.ts +6 -1
  15. package/dist/types/plugins.d.ts +10 -0
  16. package/dist/util/navigation_utils.d.ts +2 -2
  17. package/package.json +3 -3
  18. package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +1 -1
  19. package/src/components/EntityCollectionTable/internal/PropertyTableCell.tsx +2 -2
  20. package/src/components/EntityPreview.tsx +1 -1
  21. package/src/components/HomePage/DefaultHomePage.tsx +16 -4
  22. package/src/form/components/StorageItemPreview.tsx +1 -1
  23. package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +1 -1
  24. package/src/internal/useBuildNavigationController.tsx +21 -5
  25. package/src/preview/PropertyPreview.tsx +15 -13
  26. package/src/preview/PropertyPreviewProps.tsx +2 -2
  27. package/src/preview/components/ReferencePreview.tsx +1 -1
  28. package/src/preview/property_previews/ArrayOfMapsPreview.tsx +2 -2
  29. package/src/preview/property_previews/ArrayOfStorageComponentsPreview.tsx +2 -2
  30. package/src/preview/property_previews/ArrayOfStringsPreview.tsx +2 -2
  31. package/src/preview/property_previews/ArrayOneOfPreview.tsx +2 -2
  32. package/src/preview/property_previews/ArrayPropertyPreview.tsx +2 -2
  33. package/src/preview/property_previews/MapPropertyPreview.tsx +4 -4
  34. package/src/types/navigation.ts +7 -1
  35. package/src/types/plugins.tsx +13 -0
  36. package/src/util/join_collections.ts +5 -2
  37. package/src/util/navigation_utils.ts +5 -5
@@ -46,7 +46,7 @@ export function getLastSegment(path: string) {
46
46
  return cleanPath;
47
47
  }
48
48
 
49
- export function resolveCollectionPathAliases(path: string, allCollections: EntityCollection[]): string {
49
+ export function resolveCollectionPathIds(path: string, allCollections: EntityCollection[]): string {
50
50
 
51
51
  const cleanPath = removeInitialAndTrailingSlashes(path);
52
52
  const subpaths = cleanPath.split("/");
@@ -61,12 +61,12 @@ export function resolveCollectionPathAliases(path: string, allCollections: Entit
61
61
  }
62
62
 
63
63
  if (subpaths.length > 1) {
64
- const segmentCollection = getCollectionByPathOrAlias(resolvedAliased ?? subpaths[0], allCollections);
64
+ const segmentCollection = getCollectionByPathOrId(resolvedAliased ?? subpaths[0], allCollections);
65
65
  if (!segmentCollection?.subcollections) {
66
66
  return cleanPath;
67
67
  }
68
68
  const restOfThePath = cleanPath.split("/").slice(2).join("/");
69
- return (resolvedAliased ?? subpaths[0]) + "/" + subpaths[1] + "/" + resolveCollectionPathAliases(restOfThePath, segmentCollection.subcollections);
69
+ return (resolvedAliased ?? subpaths[0]) + "/" + subpaths[1] + "/" + resolveCollectionPathIds(restOfThePath, segmentCollection.subcollections);
70
70
  } else {
71
71
  return resolvedAliased ?? cleanPath;
72
72
  }
@@ -78,7 +78,7 @@ export function resolveCollectionPathAliases(path: string, allCollections: Entit
78
78
  * @param pathOrAlias
79
79
  * @param collections
80
80
  */
81
- export function getCollectionByPathOrAlias(pathOrAlias: string, collections: EntityCollection[]): EntityCollection | undefined {
81
+ export function getCollectionByPathOrId(pathOrAlias: string, collections: EntityCollection[]): EntityCollection | undefined {
82
82
 
83
83
  const subpaths = removeInitialAndTrailingSlashes(pathOrAlias).split("/");
84
84
  if (subpaths.length % 2 === 0) {
@@ -100,7 +100,7 @@ export function getCollectionByPathOrAlias(pathOrAlias: string, collections: Ent
100
100
  } else if (navigationEntry.subcollections) {
101
101
  const newPath = pathOrAlias.replace(subpathCombination, "").split("/").slice(2).join("/");
102
102
  if (newPath.length > 0)
103
- result = getCollectionByPathOrAlias(newPath, navigationEntry.subcollections);
103
+ result = getCollectionByPathOrId(newPath, navigationEntry.subcollections);
104
104
  }
105
105
  }
106
106
  if (result) break;