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