@firecms/core 3.0.0-canary.198 → 3.0.0-canary.199
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/dist/index.es.js +17 -5
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +17 -5
- package/dist/index.umd.js.map +1 -1
- package/dist/util/navigation_from_path.d.ts +1 -0
- package/package.json +5 -5
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +1 -1
- package/src/form/EntityForm.tsx +67 -68
- package/src/internal/useBuildSideEntityController.tsx +0 -2
- package/src/routes/FireCMSRoute.tsx +14 -1
- package/src/util/navigation_from_path.ts +4 -5
package/dist/index.es.js
CHANGED
|
@@ -14617,7 +14617,7 @@ const EntityCollectionView = React__default.memo(function EntityCollectionView2(
|
|
|
14617
14617
|
...entity_1.values
|
|
14618
14618
|
}, propertyKey, value_0);
|
|
14619
14619
|
const saveProps = {
|
|
14620
|
-
path: fullPath,
|
|
14620
|
+
path: entity_1.path ?? fullPath,
|
|
14621
14621
|
entityId: entity_1.id,
|
|
14622
14622
|
values: updatedValues,
|
|
14623
14623
|
previousValues: entity_1.values,
|
|
@@ -21199,11 +21199,11 @@ function getNavigationEntriesFromPath(props) {
|
|
|
21199
21199
|
const entityViews = collection.entityViews;
|
|
21200
21200
|
const customView = entityViews && entityViews.map((entry) => resolveEntityView(entry, props.contextEntityViews)).filter(Boolean).find((entry) => entry.key === newPath);
|
|
21201
21201
|
if (customView) {
|
|
21202
|
-
const path2 = currentFullPath && currentFullPath.length > 0 ? currentFullPath + "/" + customView.key : customView.key;
|
|
21203
21202
|
result.push({
|
|
21204
21203
|
type: "custom_view",
|
|
21205
|
-
path:
|
|
21206
|
-
|
|
21204
|
+
path: collectionPath,
|
|
21205
|
+
entityId,
|
|
21206
|
+
fullPath: fullPath + "/" + customView.key,
|
|
21207
21207
|
view: customView
|
|
21208
21208
|
});
|
|
21209
21209
|
} else if (collection.subcollections) {
|
|
@@ -23481,6 +23481,18 @@ function _temp2$1(entry_1) {
|
|
|
23481
23481
|
function _temp$1(entry_0) {
|
|
23482
23482
|
return entry_0.path;
|
|
23483
23483
|
}
|
|
23484
|
+
function getSelectedTabFromUrl(isNew, lastCustomView) {
|
|
23485
|
+
if (isNew) {
|
|
23486
|
+
return void 0;
|
|
23487
|
+
} else if (lastCustomView) {
|
|
23488
|
+
if (lastCustomView.type === "custom_view") {
|
|
23489
|
+
return lastCustomView.view.key;
|
|
23490
|
+
} else if (lastCustomView.type === "collection") {
|
|
23491
|
+
return lastCustomView.id ?? lastCustomView.path;
|
|
23492
|
+
}
|
|
23493
|
+
}
|
|
23494
|
+
return void 0;
|
|
23495
|
+
}
|
|
23484
23496
|
function EntityFullScreenRoute({
|
|
23485
23497
|
pathname,
|
|
23486
23498
|
navigationEntries,
|
|
@@ -23495,7 +23507,7 @@ function EntityFullScreenRoute({
|
|
|
23495
23507
|
const navigationEntriesAfterEntity = lastEntityEntry ? navigationEntries.slice(navigationEntries.indexOf(lastEntityEntry) + 1) : [];
|
|
23496
23508
|
const lastCustomView = navigationEntriesAfterEntity.findLast((entry_0) => entry_0.type === "custom_view" || entry_0.type === "collection");
|
|
23497
23509
|
const entityId = lastEntityEntry?.entityId;
|
|
23498
|
-
const urlTab = isNew
|
|
23510
|
+
const urlTab = getSelectedTabFromUrl(isNew, lastCustomView);
|
|
23499
23511
|
const [selectedTab, setSelectedTab] = useState(urlTab);
|
|
23500
23512
|
const parentCollectionIds = navigation.getParentCollectionIds(navigationPath);
|
|
23501
23513
|
useEffect(() => {
|