@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 +48 -15
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +48 -15
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -3
- package/src/app/Scaffold.tsx +13 -1
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +5 -2
- package/src/hooks/useBuildNavigationController.tsx +5 -1
- package/src/util/resolutions.ts +3 -0
package/dist/index.umd.js
CHANGED
|
@@ -826,8 +826,13 @@
|
|
|
826
826
|
...a,
|
|
827
827
|
...b
|
|
828
828
|
}), {});
|
|
829
|
+
const {
|
|
830
|
+
properties: overrideProps,
|
|
831
|
+
...restOverrides
|
|
832
|
+
} = collectionOverride ?? {};
|
|
829
833
|
return {
|
|
830
834
|
...collection,
|
|
835
|
+
...restOverrides,
|
|
831
836
|
properties: cleanedProperties,
|
|
832
837
|
originalCollection: collection
|
|
833
838
|
};
|
|
@@ -12330,7 +12335,7 @@
|
|
|
12330
12335
|
newValue.splice(fromIndex, 1);
|
|
12331
12336
|
newValue.splice(toIndex, 0, item);
|
|
12332
12337
|
setInternalValue(newValue);
|
|
12333
|
-
const fieldValue = newValue.filter(_temp3$4).map(_temp4$
|
|
12338
|
+
const fieldValue = newValue.filter(_temp3$4).map(_temp4$4);
|
|
12334
12339
|
onChange(fieldValue);
|
|
12335
12340
|
};
|
|
12336
12341
|
$[0] = multipleFilesSupported;
|
|
@@ -12524,7 +12529,7 @@
|
|
|
12524
12529
|
function _temp5$2(v_0) {
|
|
12525
12530
|
return !!v_0.storagePathOrDownloadUrl;
|
|
12526
12531
|
}
|
|
12527
|
-
function _temp4$
|
|
12532
|
+
function _temp4$4(e_0) {
|
|
12528
12533
|
return e_0.storagePathOrDownloadUrl;
|
|
12529
12534
|
}
|
|
12530
12535
|
function _temp3$4(e) {
|
|
@@ -18759,7 +18764,7 @@
|
|
|
18759
18764
|
let t11;
|
|
18760
18765
|
if ($[40] !== dataType || $[41] !== enumValues || $[42] !== internalValue || $[43] !== isNullOperation || $[44] !== multiple || $[45] !== name || $[46] !== operation || $[47] !== updateFilter) {
|
|
18761
18766
|
t11 = enumValues && multiple && /* @__PURE__ */ jsxRuntime.jsx(ui.MultiSelect, { size: "medium", position: "item-aligned", value: Array.isArray(internalValue) ? internalValue.map(_temp3$3) : [], disabled: isNullOperation, onValueChange: (value_2) => {
|
|
18762
|
-
updateFilter(operation, dataType === "number" ? value_2.map(_temp4$
|
|
18767
|
+
updateFilter(operation, dataType === "number" ? value_2.map(_temp4$3) : value_2);
|
|
18763
18768
|
}, multiple, endAdornment: internalValue && /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { className: "absolute right-2 top-3", onClick: (e_2) => updateFilter(operation, void 0), children: /* @__PURE__ */ jsxRuntime.jsx(ui.CloseIcon, {}) }), children: enumValues.map((enumConfig_0) => /* @__PURE__ */ jsxRuntime.jsx(ui.MultiSelectItem, { value: String(enumConfig_0.id), children: /* @__PURE__ */ jsxRuntime.jsx(EnumValuesChip, { enumKey: String(enumConfig_0.id), enumValues, size: "small" }) }, `select_value_${name}_${enumConfig_0.id}`)) });
|
|
18764
18769
|
$[40] = dataType;
|
|
18765
18770
|
$[41] = enumValues;
|
|
@@ -18801,7 +18806,7 @@
|
|
|
18801
18806
|
}
|
|
18802
18807
|
return t13;
|
|
18803
18808
|
}
|
|
18804
|
-
function _temp4$
|
|
18809
|
+
function _temp4$3(v) {
|
|
18805
18810
|
return parseInt(v);
|
|
18806
18811
|
}
|
|
18807
18812
|
function _temp3$3(e_1) {
|
|
@@ -25513,7 +25518,12 @@
|
|
|
25513
25518
|
const scrollRestoration = useScrollRestoration();
|
|
25514
25519
|
const collection = React.useMemo(() => {
|
|
25515
25520
|
const userOverride = userConfigPersistence?.getCollectionConfig(fullPath);
|
|
25516
|
-
|
|
25521
|
+
if (!userOverride) return collectionProp;
|
|
25522
|
+
const {
|
|
25523
|
+
properties,
|
|
25524
|
+
...rest
|
|
25525
|
+
} = userOverride;
|
|
25526
|
+
return mergeDeep(collectionProp, rest);
|
|
25517
25527
|
}, [collectionProp, fullPath, userConfigPersistence?.getCollectionConfig]);
|
|
25518
25528
|
const openEntityMode = collection?.openEntityMode ?? DEFAULT_ENTITY_OPEN_MODE;
|
|
25519
25529
|
const collectionRef = React.useRef(collection);
|
|
@@ -25767,11 +25777,12 @@
|
|
|
25767
25777
|
collection,
|
|
25768
25778
|
path: fullPath,
|
|
25769
25779
|
propertyConfigs: customizationController.propertyConfigs,
|
|
25770
|
-
authController
|
|
25771
|
-
|
|
25780
|
+
authController,
|
|
25781
|
+
userConfigPersistence
|
|
25782
|
+
}), [collection, fullPath, userConfigPersistence]);
|
|
25772
25783
|
const hasEnumProperty = React.useMemo(() => {
|
|
25773
|
-
const
|
|
25774
|
-
return Object.values(
|
|
25784
|
+
const properties_0 = resolvedCollection.properties;
|
|
25785
|
+
return Object.values(properties_0).some((prop) => prop && prop.dataType === "string" && prop.enumValues);
|
|
25775
25786
|
}, [resolvedCollection.properties]);
|
|
25776
25787
|
const enabledViews = React.useMemo(() => {
|
|
25777
25788
|
const configured = collection.enabledViews ?? ["table", "cards", "kanban"];
|
|
@@ -25782,8 +25793,8 @@
|
|
|
25782
25793
|
}, [collection.enabledViews, hasEnumProperty]);
|
|
25783
25794
|
const kanbanPropertyOptions = React.useMemo(() => {
|
|
25784
25795
|
const options = [];
|
|
25785
|
-
const
|
|
25786
|
-
for (const [key_0, property_0] of Object.entries(
|
|
25796
|
+
const properties_1 = resolvedCollection.properties;
|
|
25797
|
+
for (const [key_0, property_0] of Object.entries(properties_1)) {
|
|
25787
25798
|
const prop_0 = property_0;
|
|
25788
25799
|
if (prop_0 && prop_0.dataType === "string" && prop_0.enumValues) {
|
|
25789
25800
|
options.push({
|
|
@@ -28086,7 +28097,14 @@
|
|
|
28086
28097
|
if (!collections_0) return void 0;
|
|
28087
28098
|
const baseCollection = getCollectionByPathOrId(removeInitialAndTrailingSlashes(idOrPath), collections_0);
|
|
28088
28099
|
const userOverride = includeUserOverride ? userConfigPersistence?.getCollectionConfig(idOrPath) : void 0;
|
|
28089
|
-
|
|
28100
|
+
let overriddenCollection = baseCollection;
|
|
28101
|
+
if (baseCollection && userOverride) {
|
|
28102
|
+
const {
|
|
28103
|
+
properties,
|
|
28104
|
+
...rest
|
|
28105
|
+
} = userOverride;
|
|
28106
|
+
overriddenCollection = mergeDeep(baseCollection, rest);
|
|
28107
|
+
}
|
|
28090
28108
|
let result = overriddenCollection;
|
|
28091
28109
|
if (overriddenCollection) {
|
|
28092
28110
|
const subcollections = overriddenCollection.subcollections;
|
|
@@ -30027,7 +30045,7 @@
|
|
|
30027
30045
|
replace: true,
|
|
30028
30046
|
state: {
|
|
30029
30047
|
base_location: baseLocation,
|
|
30030
|
-
panels: updatedPanels.map(_temp4$
|
|
30048
|
+
panels: updatedPanels.map(_temp4$2)
|
|
30031
30049
|
}
|
|
30032
30050
|
});
|
|
30033
30051
|
}
|
|
@@ -30125,7 +30143,7 @@
|
|
|
30125
30143
|
function _temp5$1(p_3) {
|
|
30126
30144
|
return p_3.key;
|
|
30127
30145
|
}
|
|
30128
|
-
function _temp4$
|
|
30146
|
+
function _temp4$2(p_2) {
|
|
30129
30147
|
return p_2.key;
|
|
30130
30148
|
}
|
|
30131
30149
|
function _temp3$2(p_1) {
|
|
@@ -32271,7 +32289,7 @@
|
|
|
32271
32289
|
const otherChildren = t3;
|
|
32272
32290
|
const includeDrawer = drawerChildren.length > 0;
|
|
32273
32291
|
const largeLayout = useLargeLayout();
|
|
32274
|
-
const [drawerOpen, setDrawerOpen] = React.useState(
|
|
32292
|
+
const [drawerOpen, setDrawerOpen] = React.useState(_temp4$1);
|
|
32275
32293
|
const [onHover, setOnHover] = React.useState(false);
|
|
32276
32294
|
let t4;
|
|
32277
32295
|
if ($[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -32293,6 +32311,10 @@
|
|
|
32293
32311
|
if ($[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
32294
32312
|
t6 = () => {
|
|
32295
32313
|
setDrawerOpen(true);
|
|
32314
|
+
try {
|
|
32315
|
+
localStorage.setItem("firecms_drawer_open", "true");
|
|
32316
|
+
} catch {
|
|
32317
|
+
}
|
|
32296
32318
|
};
|
|
32297
32319
|
$[8] = t6;
|
|
32298
32320
|
} else {
|
|
@@ -32303,6 +32325,10 @@
|
|
|
32303
32325
|
if ($[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
32304
32326
|
t7 = () => {
|
|
32305
32327
|
setDrawerOpen(false);
|
|
32328
|
+
try {
|
|
32329
|
+
localStorage.setItem("firecms_drawer_open", "false");
|
|
32330
|
+
} catch {
|
|
32331
|
+
}
|
|
32306
32332
|
};
|
|
32307
32333
|
$[9] = t7;
|
|
32308
32334
|
} else {
|
|
@@ -32655,6 +32681,13 @@
|
|
|
32655
32681
|
function _temp3$1(child_1) {
|
|
32656
32682
|
return child_1.type.componentType !== "Drawer" && child_1.type.componentType !== "AppBar";
|
|
32657
32683
|
}
|
|
32684
|
+
function _temp4$1() {
|
|
32685
|
+
try {
|
|
32686
|
+
return localStorage.getItem("firecms_drawer_open") === "true";
|
|
32687
|
+
} catch {
|
|
32688
|
+
return false;
|
|
32689
|
+
}
|
|
32690
|
+
}
|
|
32658
32691
|
const en = {
|
|
32659
32692
|
// ─── Form actions ────────────────────────────────────────────
|
|
32660
32693
|
save: "Save",
|