@firecms/core 3.0.0-canary.282 → 3.0.0-canary.283
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 +45 -16
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +45 -16
- package/dist/index.umd.js.map +1 -1
- package/dist/preview/components/UserPreview.d.ts +1 -1
- package/package.json +5 -5
- package/src/components/PropertyConfigBadge.tsx +2 -2
- package/src/components/UserDisplay.tsx +2 -1
- package/src/form/PropertyFieldBinding.tsx +4 -0
- package/src/hooks/useBuildNavigationController.tsx +3 -2
- package/src/preview/components/UserPreview.tsx +7 -2
- package/src/preview/property_previews/ArrayPropertyPreview.tsx +1 -1
package/dist/index.es.js
CHANGED
|
@@ -5850,7 +5850,7 @@ function ArrayPropertyPreview(t0) {
|
|
|
5850
5850
|
}
|
|
5851
5851
|
let t3;
|
|
5852
5852
|
if ($[11] !== t2) {
|
|
5853
|
-
t3 = /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: t2 });
|
|
5853
|
+
t3 = /* @__PURE__ */ jsx("div", { className: "w-full flex flex-col gap-2", children: t2 });
|
|
5854
5854
|
$[11] = t2;
|
|
5855
5855
|
$[12] = t3;
|
|
5856
5856
|
} else {
|
|
@@ -6831,7 +6831,7 @@ function UserDisplay(t0) {
|
|
|
6831
6831
|
if (!user) {
|
|
6832
6832
|
let t12;
|
|
6833
6833
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6834
|
-
t12 = /* @__PURE__ */ jsx(
|
|
6834
|
+
t12 = /* @__PURE__ */ jsx(EmptyValue, {});
|
|
6835
6835
|
$[0] = t12;
|
|
6836
6836
|
} else {
|
|
6837
6837
|
t12 = $[0];
|
|
@@ -6907,7 +6907,7 @@ function UserDisplay(t0) {
|
|
|
6907
6907
|
return t8;
|
|
6908
6908
|
}
|
|
6909
6909
|
function UserPreview(t0) {
|
|
6910
|
-
const $ = c(
|
|
6910
|
+
const $ = c(8);
|
|
6911
6911
|
const {
|
|
6912
6912
|
value
|
|
6913
6913
|
} = t0;
|
|
@@ -6915,25 +6915,46 @@ function UserPreview(t0) {
|
|
|
6915
6915
|
getUser
|
|
6916
6916
|
} = useInternalUserManagementController();
|
|
6917
6917
|
if (!value) {
|
|
6918
|
-
|
|
6918
|
+
let t12;
|
|
6919
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6920
|
+
t12 = /* @__PURE__ */ jsx(EmptyValue, {});
|
|
6921
|
+
$[0] = t12;
|
|
6922
|
+
} else {
|
|
6923
|
+
t12 = $[0];
|
|
6924
|
+
}
|
|
6925
|
+
return t12;
|
|
6919
6926
|
}
|
|
6920
6927
|
let t1;
|
|
6921
|
-
if ($[
|
|
6928
|
+
if ($[1] !== getUser || $[2] !== value) {
|
|
6922
6929
|
t1 = getUser(value);
|
|
6923
|
-
$[
|
|
6924
|
-
$[
|
|
6925
|
-
$[
|
|
6930
|
+
$[1] = getUser;
|
|
6931
|
+
$[2] = value;
|
|
6932
|
+
$[3] = t1;
|
|
6926
6933
|
} else {
|
|
6927
|
-
t1 = $[
|
|
6934
|
+
t1 = $[3];
|
|
6928
6935
|
}
|
|
6929
6936
|
const user = t1;
|
|
6937
|
+
if (!user) {
|
|
6938
|
+
let t22;
|
|
6939
|
+
if ($[4] !== value) {
|
|
6940
|
+
t22 = /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", children: [
|
|
6941
|
+
"User not found: ",
|
|
6942
|
+
value
|
|
6943
|
+
] });
|
|
6944
|
+
$[4] = value;
|
|
6945
|
+
$[5] = t22;
|
|
6946
|
+
} else {
|
|
6947
|
+
t22 = $[5];
|
|
6948
|
+
}
|
|
6949
|
+
return t22;
|
|
6950
|
+
}
|
|
6930
6951
|
let t2;
|
|
6931
|
-
if ($[
|
|
6952
|
+
if ($[6] !== user) {
|
|
6932
6953
|
t2 = /* @__PURE__ */ jsx(UserDisplay, { user });
|
|
6933
|
-
$[
|
|
6934
|
-
$[
|
|
6954
|
+
$[6] = user;
|
|
6955
|
+
$[7] = t2;
|
|
6935
6956
|
} else {
|
|
6936
|
-
t2 = $[
|
|
6957
|
+
t2 = $[7];
|
|
6937
6958
|
}
|
|
6938
6959
|
return t2;
|
|
6939
6960
|
}
|
|
@@ -17778,6 +17799,13 @@ function PropertyFieldBindingInternal(t0) {
|
|
|
17778
17799
|
} = t0;
|
|
17779
17800
|
const authController = useAuthController();
|
|
17780
17801
|
const customizationController = useCustomizationController();
|
|
17802
|
+
if (propertyKey === "created_by") {
|
|
17803
|
+
console.log("Rendering field for created_by", {
|
|
17804
|
+
propertyKey,
|
|
17805
|
+
property,
|
|
17806
|
+
context
|
|
17807
|
+
});
|
|
17808
|
+
}
|
|
17781
17809
|
let t1;
|
|
17782
17810
|
if ($[0] !== authController || $[1] !== autoFocus || $[2] !== context || $[3] !== customizationController.propertyConfigs || $[4] !== disabledProp || $[5] !== includeDescription || $[6] !== index || $[7] !== minimalistView || $[8] !== onPropertyChange || $[9] !== partOfArray || $[10] !== property || $[11] !== propertyKey || $[12] !== size || $[13] !== underlyingValueHasChanged) {
|
|
17783
17811
|
t1 = (fieldProps) => {
|
|
@@ -20642,7 +20670,7 @@ function PropertyConfigBadge(t0) {
|
|
|
20642
20670
|
propertyConfig,
|
|
20643
20671
|
disabled
|
|
20644
20672
|
} = t0;
|
|
20645
|
-
const classes = "h-8 w-8
|
|
20673
|
+
const classes = "h-8 w-8 flex items-center justify-center rounded-full shadow text-white " + (disabled ? "bg-surface-400 dark:bg-surface-600" : "");
|
|
20646
20674
|
let t1;
|
|
20647
20675
|
if ($[0] !== classes || $[1] !== disabled || $[2] !== propertyConfig) {
|
|
20648
20676
|
const defaultPropertyConfig = typeof propertyConfig?.property === "object" ? getDefaultFieldConfig(propertyConfig.property) : void 0;
|
|
@@ -20657,7 +20685,7 @@ function PropertyConfigBadge(t0) {
|
|
|
20657
20685
|
} else {
|
|
20658
20686
|
t3 = $[5];
|
|
20659
20687
|
}
|
|
20660
|
-
t1 = /* @__PURE__ */ jsx("div", { className: classes, style: t3, children: propertyConfig?.Icon ? getIconForWidget(propertyConfig, "
|
|
20688
|
+
t1 = /* @__PURE__ */ jsx("div", { className: classes, style: t3, children: propertyConfig?.Icon ? getIconForWidget(propertyConfig, "small") : getIconForWidget(defaultPropertyConfig, "small") });
|
|
20661
20689
|
$[0] = classes;
|
|
20662
20690
|
$[1] = disabled;
|
|
20663
20691
|
$[2] = propertyConfig;
|
|
@@ -21993,7 +22021,8 @@ function useBuildNavigationController(props) {
|
|
|
21993
22021
|
}, []);
|
|
21994
22022
|
const isUrlCollectionPath = useCallback((path_1) => removeInitialAndTrailingSlashes(path_1 + "/").startsWith(removeInitialAndTrailingSlashes(fullCollectionPath) + "/"), [fullCollectionPath]);
|
|
21995
22023
|
const urlPathToDataPath = useCallback((path_2) => {
|
|
21996
|
-
|
|
22024
|
+
const decodedPath = decodeURIComponent(path_2);
|
|
22025
|
+
if (decodedPath.startsWith(fullCollectionPath)) return decodedPath.replace(fullCollectionPath, "");
|
|
21997
22026
|
throw Error("Expected path starting with " + fullCollectionPath);
|
|
21998
22027
|
}, [fullCollectionPath]);
|
|
21999
22028
|
const resolveIdsFrom = useCallback((path_3) => {
|