@firecms/core 3.0.0-canary.226 → 3.0.0-canary.228
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/components/EntityCollectionView/EntityCollectionView.d.ts +4 -0
- package/dist/core/EntityEditView.d.ts +5 -1
- package/dist/index.es.js +90 -78
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +90 -78
- package/dist/index.umd.js.map +1 -1
- package/dist/util/navigation_utils.d.ts +2 -1
- package/package.json +5 -5
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +18 -8
- package/src/components/common/default_entity_actions.tsx +5 -2
- package/src/core/EntityEditView.tsx +12 -4
- package/src/internal/useBuildSideEntityController.tsx +2 -3
- package/src/routes/FireCMSRoute.tsx +4 -1
- package/src/types/side_entity_controller.tsx +5 -0
- package/src/util/navigation_utils.ts +6 -2
package/dist/index.umd.js
CHANGED
|
@@ -150,6 +150,7 @@
|
|
|
150
150
|
entityId,
|
|
151
151
|
copy,
|
|
152
152
|
path,
|
|
153
|
+
fullIdPath,
|
|
153
154
|
selectedTab,
|
|
154
155
|
sideEntityController,
|
|
155
156
|
onClose,
|
|
@@ -158,7 +159,8 @@
|
|
|
158
159
|
if (openEntityMode === "side_panel") {
|
|
159
160
|
sideEntityController.open({
|
|
160
161
|
entityId,
|
|
161
|
-
path,
|
|
162
|
+
path: fullIdPath ?? path,
|
|
163
|
+
// fullIdPath,
|
|
162
164
|
copy,
|
|
163
165
|
selectedTab,
|
|
164
166
|
collection,
|
|
@@ -166,7 +168,7 @@
|
|
|
166
168
|
onClose
|
|
167
169
|
});
|
|
168
170
|
} else {
|
|
169
|
-
let to = navigation.buildUrlCollectionPath(entityId ? `${path}/${entityId}` : path);
|
|
171
|
+
let to = navigation.buildUrlCollectionPath(entityId ? `${fullIdPath ?? path}/${entityId}` : fullIdPath ?? path);
|
|
170
172
|
if (entityId && selectedTab) {
|
|
171
173
|
to += `/${selectedTab}`;
|
|
172
174
|
}
|
|
@@ -12254,7 +12256,7 @@
|
|
|
12254
12256
|
if (collection) {
|
|
12255
12257
|
addRecentId(collection.id, entity.id);
|
|
12256
12258
|
}
|
|
12257
|
-
const path = collection?.collectionGroup ?
|
|
12259
|
+
const path = collection?.collectionGroup ? collection.id : fullPath ?? collection?.id ?? entity.path;
|
|
12258
12260
|
const defaultSelectedView = resolveDefaultSelectedView(collection ? collection.defaultSelectedView : void 0, {
|
|
12259
12261
|
status: "existing",
|
|
12260
12262
|
entityId: entity.id
|
|
@@ -12264,6 +12266,7 @@
|
|
|
12264
12266
|
collection,
|
|
12265
12267
|
entityId: entity.id,
|
|
12266
12268
|
path,
|
|
12269
|
+
fullIdPath: path,
|
|
12267
12270
|
sideEntityController: context.sideEntityController,
|
|
12268
12271
|
onClose: () => unhighlightEntity?.(entity),
|
|
12269
12272
|
navigation: context.navigation,
|
|
@@ -12290,12 +12293,13 @@
|
|
|
12290
12293
|
path: entity.path,
|
|
12291
12294
|
entityId: entity.id
|
|
12292
12295
|
});
|
|
12293
|
-
const path = collection?.collectionGroup ?
|
|
12296
|
+
const path = collection?.collectionGroup ? collection.id : fullPath ?? collection?.id ?? entity.path;
|
|
12294
12297
|
navigateToEntity({
|
|
12295
12298
|
openEntityMode,
|
|
12296
12299
|
collection,
|
|
12297
12300
|
entityId: entity.id,
|
|
12298
12301
|
path,
|
|
12302
|
+
fullIdPath: path,
|
|
12299
12303
|
copy: true,
|
|
12300
12304
|
sideEntityController: context.sideEntityController,
|
|
12301
12305
|
onClose: () => unhighlightEntity?.(entity),
|
|
@@ -18463,6 +18467,7 @@
|
|
|
18463
18467
|
const DEFAULT_ENTITY_OPEN_MODE = "side_panel";
|
|
18464
18468
|
const EntityCollectionView = React.memo(function EntityCollectionView2({
|
|
18465
18469
|
fullPath: fullPathProp,
|
|
18470
|
+
fullIdPath,
|
|
18466
18471
|
parentCollectionIds,
|
|
18467
18472
|
isSubCollection,
|
|
18468
18473
|
className,
|
|
@@ -18471,11 +18476,7 @@
|
|
|
18471
18476
|
}) {
|
|
18472
18477
|
const context = useFireCMSContext();
|
|
18473
18478
|
const navigation = useNavigationController();
|
|
18474
|
-
const fullPath =
|
|
18475
|
-
console.log("aaa", {
|
|
18476
|
-
fullPathProp,
|
|
18477
|
-
fullPath
|
|
18478
|
-
});
|
|
18479
|
+
const fullPath = fullPathProp ?? collectionProp.path;
|
|
18479
18480
|
const dataSource = useDataSource();
|
|
18480
18481
|
const sideEntityController = useSideEntityController();
|
|
18481
18482
|
const authController = useAuthController();
|
|
@@ -18546,6 +18547,7 @@
|
|
|
18546
18547
|
navigateToEntity({
|
|
18547
18548
|
navigation,
|
|
18548
18549
|
path,
|
|
18550
|
+
fullIdPath,
|
|
18549
18551
|
sideEntityController,
|
|
18550
18552
|
openEntityMode,
|
|
18551
18553
|
collection: collection_1,
|
|
@@ -18562,6 +18564,7 @@
|
|
|
18562
18564
|
collection: collection_2,
|
|
18563
18565
|
entityId: void 0,
|
|
18564
18566
|
path: fullPath,
|
|
18567
|
+
fullIdPath,
|
|
18565
18568
|
sideEntityController,
|
|
18566
18569
|
navigation,
|
|
18567
18570
|
onClose: unselectNavigatedEntity
|
|
@@ -18697,6 +18700,7 @@
|
|
|
18697
18700
|
entityId: entity_3.id,
|
|
18698
18701
|
selectedTab: subcollection.id ?? subcollection.path,
|
|
18699
18702
|
path: fullPath,
|
|
18703
|
+
fullIdPath,
|
|
18700
18704
|
navigation,
|
|
18701
18705
|
sideEntityController
|
|
18702
18706
|
});
|
|
@@ -18752,7 +18756,7 @@
|
|
|
18752
18756
|
entity: entity_6,
|
|
18753
18757
|
customEntityActions: collection.entityActions
|
|
18754
18758
|
});
|
|
18755
|
-
return /* @__PURE__ */ jsxRuntime.jsx(EntityCollectionRowActions, { entity: entity_6, width: width_0, frozen, isSelected, selectionEnabled, size: size_0, highlightEntity: setHighlightedEntity, unhighlightEntity: unselectNavigatedEntity, collection, fullPath, actions: actions_0, hideId: collection?.hideIdFromCollection, onCollectionChange: updateLastDeleteTimestamp, selectionController: usedSelectionController, openEntityMode });
|
|
18759
|
+
return /* @__PURE__ */ jsxRuntime.jsx(EntityCollectionRowActions, { entity: entity_6, width: width_0, frozen, isSelected, selectionEnabled, size: size_0, highlightEntity: setHighlightedEntity, unhighlightEntity: unselectNavigatedEntity, collection, fullPath: fullIdPath ?? fullPath, actions: actions_0, hideId: collection?.hideIdFromCollection, onCollectionChange: updateLastDeleteTimestamp, selectionController: usedSelectionController, openEntityMode });
|
|
18756
18760
|
}, [updateLastDeleteTimestamp, usedSelectionController]);
|
|
18757
18761
|
const title = /* @__PURE__ */ jsxRuntime.jsx(ui.Popover, { open: popOverOpen, onOpenChange: setPopOverOpen, enabled: Boolean(collection.description), trigger: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-start", children: [
|
|
18758
18762
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle1", className: `leading-none truncate max-w-[160px] lg:max-w-[240px] ${collection.description ? "cursor-pointer" : "cursor-auto"}`, onClick: collection.description ? (e_2) => {
|
|
@@ -18794,7 +18798,7 @@
|
|
|
18794
18798
|
/* @__PURE__ */ jsxRuntime.jsx(ui.AddIcon, {}),
|
|
18795
18799
|
"Create your first entity"
|
|
18796
18800
|
] })
|
|
18797
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "label", children: "No results with the applied filter/sort" }), hoverRow, inlineEditing: checkInlineEditing(), AdditionalHeaderWidget: buildAdditionalHeaderWidget, AddColumnComponent: addColumnComponentInternal, getIdColumnWidth, additionalIDHeaderWidget: /* @__PURE__ */ jsxRuntime.jsx(EntityIdHeaderWidget, { path: fullPath, collection }), openEntityMode }, `collection_table_${fullPath}`),
|
|
18801
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "label", children: "No results with the applied filter/sort" }), hoverRow, inlineEditing: checkInlineEditing(), AdditionalHeaderWidget: buildAdditionalHeaderWidget, AddColumnComponent: addColumnComponentInternal, getIdColumnWidth, additionalIDHeaderWidget: /* @__PURE__ */ jsxRuntime.jsx(EntityIdHeaderWidget, { path: fullPath, fullIdPath: fullIdPath ?? fullPath, collection }), openEntityMode }, `collection_table_${fullPath}`),
|
|
18798
18802
|
popupCell && /* @__PURE__ */ jsxRuntime.jsx(PopupFormField, { open: Boolean(popupCell), onClose: onPopupClose, cellRect: popupCell?.cellRect, propertyKey: popupCell?.propertyKey, collection, entityId: popupCell.entityId, tableKey: tableKey.current, customFieldValidator: uniqueFieldValidator, path: resolvedFullPath, onCellValueChange: onValueChange, container: containerRef.current }, `popup_form_${popupCell?.propertyKey}_${popupCell?.entityId}`),
|
|
18799
18803
|
deleteEntityClicked && /* @__PURE__ */ jsxRuntime.jsx(DeleteEntityDialog, { entityOrEntitiesToDelete: deleteEntityClicked, path: fullPath, collection, callbacks: collection.callbacks, open: Boolean(deleteEntityClicked), onEntityDelete: internalOnEntityDelete, onMultipleEntitiesDelete: internalOnMultipleEntitiesDelete, onClose: () => setDeleteEntityClicked(void 0) })
|
|
18800
18804
|
] });
|
|
@@ -18853,10 +18857,11 @@
|
|
|
18853
18857
|
};
|
|
18854
18858
|
}
|
|
18855
18859
|
function EntityIdHeaderWidget(t0) {
|
|
18856
|
-
const $ = reactCompilerRuntime.c(
|
|
18860
|
+
const $ = reactCompilerRuntime.c(42);
|
|
18857
18861
|
const {
|
|
18858
18862
|
collection,
|
|
18859
|
-
path
|
|
18863
|
+
path,
|
|
18864
|
+
fullIdPath
|
|
18860
18865
|
} = t0;
|
|
18861
18866
|
const navigation = useNavigationController();
|
|
18862
18867
|
const [openPopup, setOpenPopup] = React.useState(false);
|
|
@@ -18885,7 +18890,7 @@
|
|
|
18885
18890
|
t4 = $[3];
|
|
18886
18891
|
}
|
|
18887
18892
|
let t5;
|
|
18888
|
-
if ($[4] !== collection || $[5] !==
|
|
18893
|
+
if ($[4] !== collection || $[5] !== fullIdPath || $[6] !== navigation || $[7] !== openEntityMode || $[8] !== path || $[9] !== searchString || $[10] !== sideEntityController) {
|
|
18889
18894
|
t5 = (e) => {
|
|
18890
18895
|
e.preventDefault();
|
|
18891
18896
|
if (!searchString) {
|
|
@@ -18899,77 +18904,79 @@
|
|
|
18899
18904
|
collection,
|
|
18900
18905
|
entityId,
|
|
18901
18906
|
path,
|
|
18907
|
+
fullIdPath,
|
|
18902
18908
|
sideEntityController,
|
|
18903
18909
|
navigation
|
|
18904
18910
|
});
|
|
18905
18911
|
};
|
|
18906
18912
|
$[4] = collection;
|
|
18907
|
-
$[5] =
|
|
18908
|
-
$[6] =
|
|
18909
|
-
$[7] =
|
|
18910
|
-
$[8] =
|
|
18911
|
-
$[9] =
|
|
18912
|
-
$[10] =
|
|
18913
|
+
$[5] = fullIdPath;
|
|
18914
|
+
$[6] = navigation;
|
|
18915
|
+
$[7] = openEntityMode;
|
|
18916
|
+
$[8] = path;
|
|
18917
|
+
$[9] = searchString;
|
|
18918
|
+
$[10] = sideEntityController;
|
|
18919
|
+
$[11] = t5;
|
|
18913
18920
|
} else {
|
|
18914
|
-
t5 = $[
|
|
18921
|
+
t5 = $[11];
|
|
18915
18922
|
}
|
|
18916
18923
|
let t6;
|
|
18917
|
-
if ($[
|
|
18924
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
18918
18925
|
t6 = (e_0) => {
|
|
18919
18926
|
setSearchString(e_0.target.value);
|
|
18920
18927
|
};
|
|
18921
|
-
$[
|
|
18928
|
+
$[12] = t6;
|
|
18922
18929
|
} else {
|
|
18923
|
-
t6 = $[
|
|
18930
|
+
t6 = $[12];
|
|
18924
18931
|
}
|
|
18925
18932
|
let t7;
|
|
18926
|
-
if ($[
|
|
18933
|
+
if ($[13] !== openPopup || $[14] !== searchString) {
|
|
18927
18934
|
t7 = /* @__PURE__ */ jsxRuntime.jsx("input", { autoFocus: openPopup, placeholder: "Find entity by ID", onChange: t6, value: searchString, className: "rounded-lg bg-white dark:bg-surface-800 flex-grow bg-transparent outline-none p-2 " + ui.focusedDisabled });
|
|
18928
|
-
$[
|
|
18929
|
-
$[
|
|
18930
|
-
$[
|
|
18935
|
+
$[13] = openPopup;
|
|
18936
|
+
$[14] = searchString;
|
|
18937
|
+
$[15] = t7;
|
|
18931
18938
|
} else {
|
|
18932
|
-
t7 = $[
|
|
18939
|
+
t7 = $[15];
|
|
18933
18940
|
}
|
|
18934
18941
|
const t8 = !searchString.trim();
|
|
18935
18942
|
let t9;
|
|
18936
|
-
if ($[
|
|
18943
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
18937
18944
|
t9 = /* @__PURE__ */ jsxRuntime.jsx(ui.KeyboardTabIcon, {});
|
|
18938
|
-
$[
|
|
18945
|
+
$[16] = t9;
|
|
18939
18946
|
} else {
|
|
18940
|
-
t9 = $[
|
|
18947
|
+
t9 = $[16];
|
|
18941
18948
|
}
|
|
18942
18949
|
let t10;
|
|
18943
|
-
if ($[
|
|
18950
|
+
if ($[17] !== t8) {
|
|
18944
18951
|
t10 = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", disabled: t8, type: "submit", children: t9 });
|
|
18945
|
-
$[
|
|
18946
|
-
$[
|
|
18952
|
+
$[17] = t8;
|
|
18953
|
+
$[18] = t10;
|
|
18947
18954
|
} else {
|
|
18948
|
-
t10 = $[
|
|
18955
|
+
t10 = $[18];
|
|
18949
18956
|
}
|
|
18950
18957
|
let t11;
|
|
18951
|
-
if ($[
|
|
18958
|
+
if ($[19] !== t10 || $[20] !== t7) {
|
|
18952
18959
|
t11 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex p-2 w-full gap-2", children: [
|
|
18953
18960
|
t7,
|
|
18954
18961
|
t10
|
|
18955
18962
|
] });
|
|
18956
|
-
$[
|
|
18957
|
-
$[
|
|
18958
|
-
$[
|
|
18963
|
+
$[19] = t10;
|
|
18964
|
+
$[20] = t7;
|
|
18965
|
+
$[21] = t11;
|
|
18959
18966
|
} else {
|
|
18960
|
-
t11 = $[
|
|
18967
|
+
t11 = $[21];
|
|
18961
18968
|
}
|
|
18962
18969
|
let t12;
|
|
18963
|
-
if ($[
|
|
18970
|
+
if ($[22] !== t11 || $[23] !== t5) {
|
|
18964
18971
|
t12 = /* @__PURE__ */ jsxRuntime.jsx("form", { noValidate: true, onSubmit: t5, className: "w-96 max-w-full", children: t11 });
|
|
18965
|
-
$[
|
|
18966
|
-
$[
|
|
18967
|
-
$[
|
|
18972
|
+
$[22] = t11;
|
|
18973
|
+
$[23] = t5;
|
|
18974
|
+
$[24] = t12;
|
|
18968
18975
|
} else {
|
|
18969
|
-
t12 = $[
|
|
18976
|
+
t12 = $[24];
|
|
18970
18977
|
}
|
|
18971
18978
|
let t13;
|
|
18972
|
-
if ($[
|
|
18979
|
+
if ($[25] !== collection || $[26] !== fullIdPath || $[27] !== navigation || $[28] !== openEntityMode || $[29] !== path || $[30] !== recentIds || $[31] !== sideEntityController) {
|
|
18973
18980
|
t13 = recentIds && recentIds.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2 p-2", children: recentIds.map((id) => /* @__PURE__ */ jsxRuntime.jsx(ReferencePreview, { reference: new EntityReference(id, path), hover: true, onClick: () => {
|
|
18974
18981
|
setOpenPopup(false);
|
|
18975
18982
|
navigateToEntity({
|
|
@@ -18977,49 +18984,51 @@
|
|
|
18977
18984
|
collection,
|
|
18978
18985
|
entityId: id,
|
|
18979
18986
|
path,
|
|
18987
|
+
fullIdPath,
|
|
18980
18988
|
sideEntityController,
|
|
18981
18989
|
navigation
|
|
18982
18990
|
});
|
|
18983
18991
|
}, includeEntityLink: false, size: "small" }, id)) });
|
|
18984
|
-
$[
|
|
18985
|
-
$[
|
|
18986
|
-
$[
|
|
18987
|
-
$[
|
|
18988
|
-
$[
|
|
18989
|
-
$[
|
|
18990
|
-
$[
|
|
18992
|
+
$[25] = collection;
|
|
18993
|
+
$[26] = fullIdPath;
|
|
18994
|
+
$[27] = navigation;
|
|
18995
|
+
$[28] = openEntityMode;
|
|
18996
|
+
$[29] = path;
|
|
18997
|
+
$[30] = recentIds;
|
|
18998
|
+
$[31] = sideEntityController;
|
|
18999
|
+
$[32] = t13;
|
|
18991
19000
|
} else {
|
|
18992
|
-
t13 = $[
|
|
19001
|
+
t13 = $[32];
|
|
18993
19002
|
}
|
|
18994
19003
|
let t14;
|
|
18995
|
-
if ($[
|
|
19004
|
+
if ($[33] !== t12 || $[34] !== t13) {
|
|
18996
19005
|
t14 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t4, children: [
|
|
18997
19006
|
t12,
|
|
18998
19007
|
t13
|
|
18999
19008
|
] });
|
|
19000
|
-
$[
|
|
19001
|
-
$[
|
|
19002
|
-
$[
|
|
19009
|
+
$[33] = t12;
|
|
19010
|
+
$[34] = t13;
|
|
19011
|
+
$[35] = t14;
|
|
19003
19012
|
} else {
|
|
19004
|
-
t14 = $[
|
|
19013
|
+
t14 = $[35];
|
|
19005
19014
|
}
|
|
19006
19015
|
let t15;
|
|
19007
|
-
if ($[
|
|
19016
|
+
if ($[36] !== openPopup || $[37] !== t14) {
|
|
19008
19017
|
t15 = /* @__PURE__ */ jsxRuntime.jsx(ui.Popover, { open: openPopup, onOpenChange: setOpenPopup, sideOffset: 0, align: "start", alignOffset: -117, trigger: t3, children: t14 });
|
|
19009
|
-
$[
|
|
19010
|
-
$[
|
|
19011
|
-
$[
|
|
19018
|
+
$[36] = openPopup;
|
|
19019
|
+
$[37] = t14;
|
|
19020
|
+
$[38] = t15;
|
|
19012
19021
|
} else {
|
|
19013
|
-
t15 = $[
|
|
19022
|
+
t15 = $[38];
|
|
19014
19023
|
}
|
|
19015
19024
|
let t16;
|
|
19016
|
-
if ($[
|
|
19025
|
+
if ($[39] !== t15 || $[40] !== t2) {
|
|
19017
19026
|
t16 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: t2, asChild: false, children: t15 });
|
|
19018
|
-
$[
|
|
19019
|
-
$[
|
|
19020
|
-
$[
|
|
19027
|
+
$[39] = t15;
|
|
19028
|
+
$[40] = t2;
|
|
19029
|
+
$[41] = t16;
|
|
19021
19030
|
} else {
|
|
19022
|
-
t16 = $[
|
|
19031
|
+
t16 = $[41];
|
|
19023
19032
|
}
|
|
19024
19033
|
return t16;
|
|
19025
19034
|
}
|
|
@@ -21275,6 +21284,7 @@
|
|
|
21275
21284
|
}
|
|
21276
21285
|
function EntityEditViewInner({
|
|
21277
21286
|
path,
|
|
21287
|
+
fullIdPath,
|
|
21278
21288
|
entityId,
|
|
21279
21289
|
selectedTab: selectedTabProp,
|
|
21280
21290
|
collection,
|
|
@@ -21372,18 +21382,19 @@
|
|
|
21372
21382
|
}), role: "tabpanel", children: /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(EntityJsonPreview, { values: formContext?.values ?? entity?.values ?? {} }) }) }, "json_view");
|
|
21373
21383
|
const subCollectionsViews = subcollections && subcollections.map((subcollection) => {
|
|
21374
21384
|
const subcollectionId = subcollection.id ?? subcollection.path;
|
|
21375
|
-
const
|
|
21385
|
+
const newFullPath = usedEntity ? `${path}/${usedEntity?.id}/${removeInitialAndTrailingSlashes(subcollectionId)}` : void 0;
|
|
21386
|
+
const newFullIdPath = fullIdPath ? `${fullIdPath}/${usedEntity?.id}/${removeInitialAndTrailingSlashes(subcollectionId)}` : void 0;
|
|
21376
21387
|
if (selectedTab !== subcollectionId) return null;
|
|
21377
21388
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1 h-full overflow-auto w-full", role: "tabpanel", children: [
|
|
21378
21389
|
globalLoading && /* @__PURE__ */ jsxRuntime.jsx(CircularProgressCenter, {}),
|
|
21379
|
-
!globalLoading && (usedEntity &&
|
|
21390
|
+
!globalLoading && (usedEntity && newFullPath ? /* @__PURE__ */ jsxRuntime.jsx(EntityCollectionView, { fullPath: newFullPath, fullIdPath: newFullIdPath, parentCollectionIds: [...parentCollectionIds, collection.id], isSubCollection: true, updateUrl: false, ...subcollection, openEntityMode: layout }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center w-full h-full p-3", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "label", children: "You need to save your entity before adding additional collections" }) }))
|
|
21380
21391
|
] }, `subcol_${subcollectionId}`);
|
|
21381
21392
|
}).filter(Boolean);
|
|
21382
21393
|
const onSideTabClick = (value_0) => {
|
|
21383
21394
|
setSelectedTab(value_0);
|
|
21384
21395
|
if (status === "existing") {
|
|
21385
21396
|
onTabChange?.({
|
|
21386
|
-
path,
|
|
21397
|
+
path: fullIdPath ?? path,
|
|
21387
21398
|
entityId,
|
|
21388
21399
|
selectedTab: value_0 === MAIN_TAB_VALUE ? void 0 : value_0,
|
|
21389
21400
|
collection
|
|
@@ -21700,6 +21711,7 @@
|
|
|
21700
21711
|
if (navigationEntry.type === "entity") {
|
|
21701
21712
|
sidePanel = {
|
|
21702
21713
|
path: navigationEntry.path,
|
|
21714
|
+
// fullIdPath: navigationEntry.path,
|
|
21703
21715
|
entityId: navigationEntry.entityId,
|
|
21704
21716
|
copy: false,
|
|
21705
21717
|
width: navigationEntry.parentCollection?.sideDialogWidth
|
|
@@ -21717,6 +21729,7 @@
|
|
|
21717
21729
|
if (newFlag) {
|
|
21718
21730
|
sidePanel = {
|
|
21719
21731
|
path: lastCollectionPath,
|
|
21732
|
+
// fullIdPath: lastCollectionPath,
|
|
21720
21733
|
copy: false
|
|
21721
21734
|
};
|
|
21722
21735
|
}
|
|
@@ -21725,10 +21738,8 @@
|
|
|
21725
21738
|
const propsToSidePanel = (props, buildUrlCollectionPath, resolveIdsFrom, smallLayout, customizationController, authController) => {
|
|
21726
21739
|
const collectionPath = removeInitialAndTrailingSlashes(props.path);
|
|
21727
21740
|
const newPath = props.entityId ? buildUrlCollectionPath(`${collectionPath}/${props.entityId}${props.selectedTab ? "/" + props.selectedTab : ""}#${SIDE_URL_HASH}`) : buildUrlCollectionPath(`${collectionPath}#${NEW_URL_HASH}`);
|
|
21728
|
-
const resolvedPath = resolveIdsFrom(props.path);
|
|
21729
21741
|
const resolvedPanelProps = {
|
|
21730
21742
|
...props,
|
|
21731
|
-
path: resolvedPath,
|
|
21732
21743
|
formProps: props.formProps
|
|
21733
21744
|
};
|
|
21734
21745
|
const entityViewWidth = getEntityViewWidth(props, smallLayout, customizationController, authController);
|
|
@@ -23230,7 +23241,7 @@
|
|
|
23230
23241
|
} else {
|
|
23231
23242
|
t8 = $[27];
|
|
23232
23243
|
}
|
|
23233
|
-
t62 = /* @__PURE__ */ jsxRuntime.jsx(EntityCollectionView, { isSubCollection: false, parentCollectionIds: t8, fullPath: collection_0.id, updateUrl: true, ...collection_0, Actions: toArray(collection_0.Actions) }, `collection_view_${collection_0.id ?? collection_0.path}`);
|
|
23244
|
+
t62 = /* @__PURE__ */ jsxRuntime.jsx(EntityCollectionView, { fullIdPath: collection_0.id, isSubCollection: false, parentCollectionIds: t8, fullPath: collection_0.id, updateUrl: true, ...collection_0, Actions: toArray(collection_0.Actions) }, `collection_view_${collection_0.id ?? collection_0.path}`);
|
|
23234
23245
|
}
|
|
23235
23246
|
$[23] = navigation;
|
|
23236
23247
|
$[24] = navigationEntries;
|
|
@@ -23319,9 +23330,10 @@
|
|
|
23319
23330
|
return /* @__PURE__ */ jsxRuntime.jsx(NotFoundPage, {});
|
|
23320
23331
|
}
|
|
23321
23332
|
const collection = isNew ? lastCollectionEntry.collection : lastEntityEntry.parentCollection;
|
|
23322
|
-
const
|
|
23333
|
+
const fullIdPath = isNew ? lastCollectionEntry.path : lastEntityEntry.path;
|
|
23334
|
+
const collectionPath = navigation.resolveIdsFrom(fullIdPath);
|
|
23323
23335
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
23324
|
-
/* @__PURE__ */ jsxRuntime.jsx(EntityEditView, { entityId: isNew ? void 0 : entityId, collection, layout: "full_screen", path: collectionPath, copy: isCopy, selectedTab: selectedTab ?? void 0, onValuesModified: (modified) => blocked.current = modified, onSaved: (params) => {
|
|
23336
|
+
/* @__PURE__ */ jsxRuntime.jsx(EntityEditView, { entityId: isNew ? void 0 : entityId, fullIdPath, collection, layout: "full_screen", path: collectionPath, copy: isCopy, selectedTab: selectedTab ?? void 0, onValuesModified: (modified) => blocked.current = modified, onSaved: (params) => {
|
|
23325
23337
|
const newSelectedTab = params.selectedTab;
|
|
23326
23338
|
const newEntityId = params.entityId;
|
|
23327
23339
|
if (newSelectedTab) {
|