@firecms/core 3.3.0-canary.102f274 → 3.3.0-canary.3afa809

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
@@ -849,8 +849,13 @@ const resolveCollection = ({
849
849
  ...a,
850
850
  ...b
851
851
  }), {});
852
+ const {
853
+ properties: overrideProps,
854
+ ...restOverrides
855
+ } = collectionOverride ?? {};
852
856
  return {
853
857
  ...collection,
858
+ ...restOverrides,
854
859
  properties: cleanedProperties,
855
860
  originalCollection: collection
856
861
  };
@@ -12353,7 +12358,7 @@ function StorageUpload(t0) {
12353
12358
  newValue.splice(fromIndex, 1);
12354
12359
  newValue.splice(toIndex, 0, item);
12355
12360
  setInternalValue(newValue);
12356
- const fieldValue = newValue.filter(_temp3$4).map(_temp4$3);
12361
+ const fieldValue = newValue.filter(_temp3$4).map(_temp4$4);
12357
12362
  onChange(fieldValue);
12358
12363
  };
12359
12364
  $[0] = multipleFilesSupported;
@@ -12547,7 +12552,7 @@ function _temp6$2(v_1) {
12547
12552
  function _temp5$2(v_0) {
12548
12553
  return !!v_0.storagePathOrDownloadUrl;
12549
12554
  }
12550
- function _temp4$3(e_0) {
12555
+ function _temp4$4(e_0) {
12551
12556
  return e_0.storagePathOrDownloadUrl;
12552
12557
  }
12553
12558
  function _temp3$4(e) {
@@ -18782,7 +18787,7 @@ function StringNumberFilterField(t0) {
18782
18787
  let t11;
18783
18788
  if ($[40] !== dataType || $[41] !== enumValues || $[42] !== internalValue || $[43] !== isNullOperation || $[44] !== multiple || $[45] !== name || $[46] !== operation || $[47] !== updateFilter) {
18784
18789
  t11 = enumValues && multiple && /* @__PURE__ */ jsx(MultiSelect, { size: "medium", position: "item-aligned", value: Array.isArray(internalValue) ? internalValue.map(_temp3$3) : [], disabled: isNullOperation, onValueChange: (value_2) => {
18785
- updateFilter(operation, dataType === "number" ? value_2.map(_temp4$2) : value_2);
18790
+ updateFilter(operation, dataType === "number" ? value_2.map(_temp4$3) : value_2);
18786
18791
  }, multiple, endAdornment: internalValue && /* @__PURE__ */ jsx(IconButton, { className: "absolute right-2 top-3", onClick: (e_2) => updateFilter(operation, void 0), children: /* @__PURE__ */ jsx(CloseIcon, {}) }), children: enumValues.map((enumConfig_0) => /* @__PURE__ */ jsx(MultiSelectItem, { value: String(enumConfig_0.id), children: /* @__PURE__ */ jsx(EnumValuesChip, { enumKey: String(enumConfig_0.id), enumValues, size: "small" }) }, `select_value_${name}_${enumConfig_0.id}`)) });
18787
18792
  $[40] = dataType;
18788
18793
  $[41] = enumValues;
@@ -18824,7 +18829,7 @@ function StringNumberFilterField(t0) {
18824
18829
  }
18825
18830
  return t13;
18826
18831
  }
18827
- function _temp4$2(v) {
18832
+ function _temp4$3(v) {
18828
18833
  return parseInt(v);
18829
18834
  }
18830
18835
  function _temp3$3(e_1) {
@@ -25536,7 +25541,12 @@ const EntityCollectionView$1 = React__default.memo(function EntityCollectionView
25536
25541
  const scrollRestoration = useScrollRestoration();
25537
25542
  const collection = useMemo(() => {
25538
25543
  const userOverride = userConfigPersistence?.getCollectionConfig(fullPath);
25539
- return userOverride ? mergeDeep(collectionProp, userOverride) : collectionProp;
25544
+ if (!userOverride) return collectionProp;
25545
+ const {
25546
+ properties,
25547
+ ...rest
25548
+ } = userOverride;
25549
+ return mergeDeep(collectionProp, rest);
25540
25550
  }, [collectionProp, fullPath, userConfigPersistence?.getCollectionConfig]);
25541
25551
  const openEntityMode = collection?.openEntityMode ?? DEFAULT_ENTITY_OPEN_MODE;
25542
25552
  const collectionRef = React__default.useRef(collection);
@@ -25790,11 +25800,12 @@ const EntityCollectionView$1 = React__default.memo(function EntityCollectionView
25790
25800
  collection,
25791
25801
  path: fullPath,
25792
25802
  propertyConfigs: customizationController.propertyConfigs,
25793
- authController
25794
- }), [collection, fullPath]);
25803
+ authController,
25804
+ userConfigPersistence
25805
+ }), [collection, fullPath, userConfigPersistence]);
25795
25806
  const hasEnumProperty = useMemo(() => {
25796
- const properties = resolvedCollection.properties;
25797
- return Object.values(properties).some((prop) => prop && prop.dataType === "string" && prop.enumValues);
25807
+ const properties_0 = resolvedCollection.properties;
25808
+ return Object.values(properties_0).some((prop) => prop && prop.dataType === "string" && prop.enumValues);
25798
25809
  }, [resolvedCollection.properties]);
25799
25810
  const enabledViews = useMemo(() => {
25800
25811
  const configured = collection.enabledViews ?? ["table", "cards", "kanban"];
@@ -25805,8 +25816,8 @@ const EntityCollectionView$1 = React__default.memo(function EntityCollectionView
25805
25816
  }, [collection.enabledViews, hasEnumProperty]);
25806
25817
  const kanbanPropertyOptions = useMemo(() => {
25807
25818
  const options = [];
25808
- const properties_0 = resolvedCollection.properties;
25809
- for (const [key_0, property_0] of Object.entries(properties_0)) {
25819
+ const properties_1 = resolvedCollection.properties;
25820
+ for (const [key_0, property_0] of Object.entries(properties_1)) {
25810
25821
  const prop_0 = property_0;
25811
25822
  if (prop_0 && prop_0.dataType === "string" && prop_0.enumValues) {
25812
25823
  options.push({
@@ -28109,7 +28120,14 @@ function useBuildNavigationController(props) {
28109
28120
  if (!collections_0) return void 0;
28110
28121
  const baseCollection = getCollectionByPathOrId(removeInitialAndTrailingSlashes(idOrPath), collections_0);
28111
28122
  const userOverride = includeUserOverride ? userConfigPersistence?.getCollectionConfig(idOrPath) : void 0;
28112
- const overriddenCollection = baseCollection ? mergeDeep(baseCollection, userOverride ?? {}) : void 0;
28123
+ let overriddenCollection = baseCollection;
28124
+ if (baseCollection && userOverride) {
28125
+ const {
28126
+ properties,
28127
+ ...rest
28128
+ } = userOverride;
28129
+ overriddenCollection = mergeDeep(baseCollection, rest);
28130
+ }
28113
28131
  let result = overriddenCollection;
28114
28132
  if (overriddenCollection) {
28115
28133
  const subcollections = overriddenCollection.subcollections;
@@ -30050,7 +30068,7 @@ function useBuildSideDialogsController() {
30050
30068
  replace: true,
30051
30069
  state: {
30052
30070
  base_location: baseLocation,
30053
- panels: updatedPanels.map(_temp4$1)
30071
+ panels: updatedPanels.map(_temp4$2)
30054
30072
  }
30055
30073
  });
30056
30074
  }
@@ -30148,7 +30166,7 @@ function _temp6$1(p_4) {
30148
30166
  function _temp5$1(p_3) {
30149
30167
  return p_3.key;
30150
30168
  }
30151
- function _temp4$1(p_2) {
30169
+ function _temp4$2(p_2) {
30152
30170
  return p_2.key;
30153
30171
  }
30154
30172
  function _temp3$2(p_1) {
@@ -32294,7 +32312,7 @@ const Scaffold = React__default.memo(function Scaffold2(props) {
32294
32312
  const otherChildren = t3;
32295
32313
  const includeDrawer = drawerChildren.length > 0;
32296
32314
  const largeLayout = useLargeLayout();
32297
- const [drawerOpen, setDrawerOpen] = React__default.useState(false);
32315
+ const [drawerOpen, setDrawerOpen] = React__default.useState(_temp4$1);
32298
32316
  const [onHover, setOnHover] = React__default.useState(false);
32299
32317
  let t4;
32300
32318
  if ($[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
@@ -32316,6 +32334,10 @@ const Scaffold = React__default.memo(function Scaffold2(props) {
32316
32334
  if ($[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
32317
32335
  t6 = () => {
32318
32336
  setDrawerOpen(true);
32337
+ try {
32338
+ localStorage.setItem("firecms_drawer_open", "true");
32339
+ } catch {
32340
+ }
32319
32341
  };
32320
32342
  $[8] = t6;
32321
32343
  } else {
@@ -32326,6 +32348,10 @@ const Scaffold = React__default.memo(function Scaffold2(props) {
32326
32348
  if ($[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
32327
32349
  t7 = () => {
32328
32350
  setDrawerOpen(false);
32351
+ try {
32352
+ localStorage.setItem("firecms_drawer_open", "false");
32353
+ } catch {
32354
+ }
32329
32355
  };
32330
32356
  $[9] = t7;
32331
32357
  } else {
@@ -32678,6 +32704,13 @@ function _temp2$1(child_0) {
32678
32704
  function _temp3$1(child_1) {
32679
32705
  return child_1.type.componentType !== "Drawer" && child_1.type.componentType !== "AppBar";
32680
32706
  }
32707
+ function _temp4$1() {
32708
+ try {
32709
+ return localStorage.getItem("firecms_drawer_open") === "true";
32710
+ } catch {
32711
+ return false;
32712
+ }
32713
+ }
32681
32714
  const en = {
32682
32715
  // ─── Form actions ────────────────────────────────────────────
32683
32716
  save: "Save",