@firecms/core 3.0.0-canary.172 → 3.0.0-canary.173
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
|
@@ -13718,7 +13718,7 @@ function ArrayContainer({
|
|
|
13718
13718
|
}, [hasValue, internalIds.length, value]);
|
|
13719
13719
|
const insertInEnd = (e) => {
|
|
13720
13720
|
e.preventDefault();
|
|
13721
|
-
if (disabled || value.length >= max) return;
|
|
13721
|
+
if (disabled || (value ?? []).length >= max) return;
|
|
13722
13722
|
const id = getRandomId$1();
|
|
13723
13723
|
const newIds = [...internalIds, id];
|
|
13724
13724
|
if (onInternalIdAdded) onInternalIdAdded(id);
|
|
@@ -13726,14 +13726,14 @@ function ArrayContainer({
|
|
|
13726
13726
|
onValueChange([...value ?? [], newDefaultEntry]);
|
|
13727
13727
|
};
|
|
13728
13728
|
const remove = (index_0) => {
|
|
13729
|
-
if (value.length <= min) return;
|
|
13729
|
+
if ((value ?? []).length <= min) return;
|
|
13730
13730
|
const newIds_0 = [...internalIds];
|
|
13731
13731
|
newIds_0.splice(index_0, 1);
|
|
13732
13732
|
setInternalIds(newIds_0);
|
|
13733
13733
|
onValueChange(value.filter((_, i) => i !== index_0));
|
|
13734
13734
|
};
|
|
13735
13735
|
const copy = (index_1) => {
|
|
13736
|
-
if (value.length >= max) return;
|
|
13736
|
+
if ((value ?? []).length >= max) return;
|
|
13737
13737
|
const id_0 = getRandomId$1();
|
|
13738
13738
|
const copyingItem = value[index_1];
|
|
13739
13739
|
const newIds_1 = [...internalIds.slice(0, index_1 + 1), id_0, ...internalIds.slice(index_1 + 1)];
|
|
@@ -13742,7 +13742,7 @@ function ArrayContainer({
|
|
|
13742
13742
|
onValueChange([...value.slice(0, index_1 + 1), copyingItem, ...value.slice(index_1 + 1)]);
|
|
13743
13743
|
};
|
|
13744
13744
|
const addInIndex = (index_2) => {
|
|
13745
|
-
if (value.length >= max) return;
|
|
13745
|
+
if ((value ?? []).length >= max) return;
|
|
13746
13746
|
const id_1 = getRandomId$1();
|
|
13747
13747
|
const newIds_2 = [...internalIds.slice(0, index_2), id_1, ...internalIds.slice(index_2)];
|
|
13748
13748
|
if (onInternalIdAdded) onInternalIdAdded(id_1);
|
|
@@ -23033,10 +23033,8 @@ function EntityFullScreenRoute({
|
|
|
23033
23033
|
const collectionPath = navigation.resolveIdsFrom(isNew ? lastCollectionEntry.path : lastEntityEntry.path);
|
|
23034
23034
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23035
23035
|
/* @__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
23036
|
updateUrl(params.entityId, params.selectedTab, true, params.path, isNew);
|
|
23038
23037
|
}, onTabChange: (params_0) => {
|
|
23039
|
-
console.log("EntityEditView onTabChange", params_0);
|
|
23040
23038
|
updateUrl(params_0.entityId, params_0.selectedTab, !isNew, params_0.path, isNew);
|
|
23041
23039
|
setSelectedTab(params_0.selectedTab);
|
|
23042
23040
|
}, parentCollectionIds }, collection.id + "_" + (isNew ? "new" : entityId)),
|