@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.umd.js
CHANGED
|
@@ -14619,7 +14619,7 @@
|
|
|
14619
14619
|
...entity_1.values
|
|
14620
14620
|
}, propertyKey, value_0);
|
|
14621
14621
|
const saveProps = {
|
|
14622
|
-
path: fullPath,
|
|
14622
|
+
path: entity_1.path ?? fullPath,
|
|
14623
14623
|
entityId: entity_1.id,
|
|
14624
14624
|
values: updatedValues,
|
|
14625
14625
|
previousValues: entity_1.values,
|
|
@@ -21201,11 +21201,11 @@
|
|
|
21201
21201
|
const entityViews = collection.entityViews;
|
|
21202
21202
|
const customView = entityViews && entityViews.map((entry) => resolveEntityView(entry, props.contextEntityViews)).filter(Boolean).find((entry) => entry.key === newPath);
|
|
21203
21203
|
if (customView) {
|
|
21204
|
-
const path2 = currentFullPath && currentFullPath.length > 0 ? currentFullPath + "/" + customView.key : customView.key;
|
|
21205
21204
|
result.push({
|
|
21206
21205
|
type: "custom_view",
|
|
21207
|
-
path:
|
|
21208
|
-
|
|
21206
|
+
path: collectionPath,
|
|
21207
|
+
entityId,
|
|
21208
|
+
fullPath: fullPath + "/" + customView.key,
|
|
21209
21209
|
view: customView
|
|
21210
21210
|
});
|
|
21211
21211
|
} else if (collection.subcollections) {
|
|
@@ -23483,6 +23483,18 @@
|
|
|
23483
23483
|
function _temp$1(entry_0) {
|
|
23484
23484
|
return entry_0.path;
|
|
23485
23485
|
}
|
|
23486
|
+
function getSelectedTabFromUrl(isNew, lastCustomView) {
|
|
23487
|
+
if (isNew) {
|
|
23488
|
+
return void 0;
|
|
23489
|
+
} else if (lastCustomView) {
|
|
23490
|
+
if (lastCustomView.type === "custom_view") {
|
|
23491
|
+
return lastCustomView.view.key;
|
|
23492
|
+
} else if (lastCustomView.type === "collection") {
|
|
23493
|
+
return lastCustomView.id ?? lastCustomView.path;
|
|
23494
|
+
}
|
|
23495
|
+
}
|
|
23496
|
+
return void 0;
|
|
23497
|
+
}
|
|
23486
23498
|
function EntityFullScreenRoute({
|
|
23487
23499
|
pathname,
|
|
23488
23500
|
navigationEntries,
|
|
@@ -23497,7 +23509,7 @@
|
|
|
23497
23509
|
const navigationEntriesAfterEntity = lastEntityEntry ? navigationEntries.slice(navigationEntries.indexOf(lastEntityEntry) + 1) : [];
|
|
23498
23510
|
const lastCustomView = navigationEntriesAfterEntity.findLast((entry_0) => entry_0.type === "custom_view" || entry_0.type === "collection");
|
|
23499
23511
|
const entityId = lastEntityEntry?.entityId;
|
|
23500
|
-
const urlTab = isNew
|
|
23512
|
+
const urlTab = getSelectedTabFromUrl(isNew, lastCustomView);
|
|
23501
23513
|
const [selectedTab, setSelectedTab] = React.useState(urlTab);
|
|
23502
23514
|
const parentCollectionIds = navigation.getParentCollectionIds(navigationPath);
|
|
23503
23515
|
React.useEffect(() => {
|