@firecms/core 3.0.0-canary.172 → 3.0.0-canary.174
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
CHANGED
|
@@ -12066,10 +12066,9 @@ function EntityEditViewInner({
|
|
|
12066
12066
|
/* @__PURE__ */ jsx("div", { role: "tabpanel", hidden: !mainViewVisible, id: `form_${path}`, className: cls("relative flex flex-row max-w-4xl lg:max-w-3xl xl:max-w-4xl 2xl:max-w-5xl w-full h-fit", {
|
|
12067
12067
|
"hidden": !mainViewVisible
|
|
12068
12068
|
}), children: globalLoading ? /* @__PURE__ */ jsx("div", { className: "w-full pt-12 pb-16 px-4 sm:px-8 md:px-10", children: /* @__PURE__ */ jsx(CircularProgressCenter, {}) }) : entityView }),
|
|
12069
|
-
mainViewVisible && shouldShowEntityActions && !actionsAtTheBottom && dialogActions,
|
|
12070
12069
|
customViewsView,
|
|
12071
12070
|
subCollectionsViews,
|
|
12072
|
-
shouldShowEntityActions &&
|
|
12071
|
+
shouldShowEntityActions && dialogActions
|
|
12073
12072
|
] })
|
|
12074
12073
|
] });
|
|
12075
12074
|
if (plugins) {
|
|
@@ -13718,7 +13717,7 @@ function ArrayContainer({
|
|
|
13718
13717
|
}, [hasValue, internalIds.length, value]);
|
|
13719
13718
|
const insertInEnd = (e) => {
|
|
13720
13719
|
e.preventDefault();
|
|
13721
|
-
if (disabled || value.length >= max) return;
|
|
13720
|
+
if (disabled || (value ?? []).length >= max) return;
|
|
13722
13721
|
const id = getRandomId$1();
|
|
13723
13722
|
const newIds = [...internalIds, id];
|
|
13724
13723
|
if (onInternalIdAdded) onInternalIdAdded(id);
|
|
@@ -13726,14 +13725,14 @@ function ArrayContainer({
|
|
|
13726
13725
|
onValueChange([...value ?? [], newDefaultEntry]);
|
|
13727
13726
|
};
|
|
13728
13727
|
const remove = (index_0) => {
|
|
13729
|
-
if (value.length <= min) return;
|
|
13728
|
+
if ((value ?? []).length <= min) return;
|
|
13730
13729
|
const newIds_0 = [...internalIds];
|
|
13731
13730
|
newIds_0.splice(index_0, 1);
|
|
13732
13731
|
setInternalIds(newIds_0);
|
|
13733
13732
|
onValueChange(value.filter((_, i) => i !== index_0));
|
|
13734
13733
|
};
|
|
13735
13734
|
const copy = (index_1) => {
|
|
13736
|
-
if (value.length >= max) return;
|
|
13735
|
+
if ((value ?? []).length >= max) return;
|
|
13737
13736
|
const id_0 = getRandomId$1();
|
|
13738
13737
|
const copyingItem = value[index_1];
|
|
13739
13738
|
const newIds_1 = [...internalIds.slice(0, index_1 + 1), id_0, ...internalIds.slice(index_1 + 1)];
|
|
@@ -13742,7 +13741,7 @@ function ArrayContainer({
|
|
|
13742
13741
|
onValueChange([...value.slice(0, index_1 + 1), copyingItem, ...value.slice(index_1 + 1)]);
|
|
13743
13742
|
};
|
|
13744
13743
|
const addInIndex = (index_2) => {
|
|
13745
|
-
if (value.length >= max) return;
|
|
13744
|
+
if ((value ?? []).length >= max) return;
|
|
13746
13745
|
const id_1 = getRandomId$1();
|
|
13747
13746
|
const newIds_2 = [...internalIds.slice(0, index_2), id_1, ...internalIds.slice(index_2)];
|
|
13748
13747
|
if (onInternalIdAdded) onInternalIdAdded(id_1);
|
|
@@ -23033,10 +23032,8 @@ function EntityFullScreenRoute({
|
|
|
23033
23032
|
const collectionPath = navigation.resolveIdsFrom(isNew ? lastCollectionEntry.path : lastEntityEntry.path);
|
|
23034
23033
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23035
23034
|
/* @__PURE__ */ jsx(EntityEditView, { entityId: isNew ? void 0 : entityId, collection, layout: "full_screen", path: collectionPath, selectedTab: selectedTab ?? void 0, onValuesModified: (modified) => blocked.current = modified, onSaved: (params) => {
|
|
23036
|
-
console.log("EntityEditView Saved", params);
|
|
23037
23035
|
updateUrl(params.entityId, params.selectedTab, true, params.path, isNew);
|
|
23038
23036
|
}, onTabChange: (params_0) => {
|
|
23039
|
-
console.log("EntityEditView onTabChange", params_0);
|
|
23040
23037
|
updateUrl(params_0.entityId, params_0.selectedTab, !isNew, params_0.path, isNew);
|
|
23041
23038
|
setSelectedTab(params_0.selectedTab);
|
|
23042
23039
|
}, parentCollectionIds }, collection.id + "_" + (isNew ? "new" : entityId)),
|