@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.umd.js
CHANGED
|
@@ -5848,7 +5848,7 @@
|
|
|
5848
5848
|
}
|
|
5849
5849
|
let t3;
|
|
5850
5850
|
if ($[11] !== t2) {
|
|
5851
|
-
t3 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2", children: t2 });
|
|
5851
|
+
t3 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full flex flex-col gap-2", children: t2 });
|
|
5852
5852
|
$[11] = t2;
|
|
5853
5853
|
$[12] = t3;
|
|
5854
5854
|
} else {
|
|
@@ -6829,7 +6829,7 @@
|
|
|
6829
6829
|
if (!user) {
|
|
6830
6830
|
let t12;
|
|
6831
6831
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6832
|
-
t12 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
6832
|
+
t12 = /* @__PURE__ */ jsxRuntime.jsx(EmptyValue, {});
|
|
6833
6833
|
$[0] = t12;
|
|
6834
6834
|
} else {
|
|
6835
6835
|
t12 = $[0];
|
|
@@ -6905,7 +6905,7 @@
|
|
|
6905
6905
|
return t8;
|
|
6906
6906
|
}
|
|
6907
6907
|
function UserPreview(t0) {
|
|
6908
|
-
const $ = reactCompilerRuntime.c(
|
|
6908
|
+
const $ = reactCompilerRuntime.c(8);
|
|
6909
6909
|
const {
|
|
6910
6910
|
value
|
|
6911
6911
|
} = t0;
|
|
@@ -6913,25 +6913,46 @@
|
|
|
6913
6913
|
getUser
|
|
6914
6914
|
} = useInternalUserManagementController();
|
|
6915
6915
|
if (!value) {
|
|
6916
|
-
|
|
6916
|
+
let t12;
|
|
6917
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6918
|
+
t12 = /* @__PURE__ */ jsxRuntime.jsx(EmptyValue, {});
|
|
6919
|
+
$[0] = t12;
|
|
6920
|
+
} else {
|
|
6921
|
+
t12 = $[0];
|
|
6922
|
+
}
|
|
6923
|
+
return t12;
|
|
6917
6924
|
}
|
|
6918
6925
|
let t1;
|
|
6919
|
-
if ($[
|
|
6926
|
+
if ($[1] !== getUser || $[2] !== value) {
|
|
6920
6927
|
t1 = getUser(value);
|
|
6921
|
-
$[
|
|
6922
|
-
$[
|
|
6923
|
-
$[
|
|
6928
|
+
$[1] = getUser;
|
|
6929
|
+
$[2] = value;
|
|
6930
|
+
$[3] = t1;
|
|
6924
6931
|
} else {
|
|
6925
|
-
t1 = $[
|
|
6932
|
+
t1 = $[3];
|
|
6926
6933
|
}
|
|
6927
6934
|
const user = t1;
|
|
6935
|
+
if (!user) {
|
|
6936
|
+
let t22;
|
|
6937
|
+
if ($[4] !== value) {
|
|
6938
|
+
t22 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "caption", color: "secondary", children: [
|
|
6939
|
+
"User not found: ",
|
|
6940
|
+
value
|
|
6941
|
+
] });
|
|
6942
|
+
$[4] = value;
|
|
6943
|
+
$[5] = t22;
|
|
6944
|
+
} else {
|
|
6945
|
+
t22 = $[5];
|
|
6946
|
+
}
|
|
6947
|
+
return t22;
|
|
6948
|
+
}
|
|
6928
6949
|
let t2;
|
|
6929
|
-
if ($[
|
|
6950
|
+
if ($[6] !== user) {
|
|
6930
6951
|
t2 = /* @__PURE__ */ jsxRuntime.jsx(UserDisplay, { user });
|
|
6931
|
-
$[
|
|
6932
|
-
$[
|
|
6952
|
+
$[6] = user;
|
|
6953
|
+
$[7] = t2;
|
|
6933
6954
|
} else {
|
|
6934
|
-
t2 = $[
|
|
6955
|
+
t2 = $[7];
|
|
6935
6956
|
}
|
|
6936
6957
|
return t2;
|
|
6937
6958
|
}
|
|
@@ -17776,6 +17797,13 @@
|
|
|
17776
17797
|
} = t0;
|
|
17777
17798
|
const authController = useAuthController();
|
|
17778
17799
|
const customizationController = useCustomizationController();
|
|
17800
|
+
if (propertyKey === "created_by") {
|
|
17801
|
+
console.log("Rendering field for created_by", {
|
|
17802
|
+
propertyKey,
|
|
17803
|
+
property,
|
|
17804
|
+
context
|
|
17805
|
+
});
|
|
17806
|
+
}
|
|
17779
17807
|
let t1;
|
|
17780
17808
|
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) {
|
|
17781
17809
|
t1 = (fieldProps) => {
|
|
@@ -20640,7 +20668,7 @@
|
|
|
20640
20668
|
propertyConfig,
|
|
20641
20669
|
disabled
|
|
20642
20670
|
} = t0;
|
|
20643
|
-
const classes = "h-8 w-8
|
|
20671
|
+
const classes = "h-8 w-8 flex items-center justify-center rounded-full shadow text-white " + (disabled ? "bg-surface-400 dark:bg-surface-600" : "");
|
|
20644
20672
|
let t1;
|
|
20645
20673
|
if ($[0] !== classes || $[1] !== disabled || $[2] !== propertyConfig) {
|
|
20646
20674
|
const defaultPropertyConfig = typeof propertyConfig?.property === "object" ? getDefaultFieldConfig(propertyConfig.property) : void 0;
|
|
@@ -20655,7 +20683,7 @@
|
|
|
20655
20683
|
} else {
|
|
20656
20684
|
t3 = $[5];
|
|
20657
20685
|
}
|
|
20658
|
-
t1 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, style: t3, children: propertyConfig?.Icon ? getIconForWidget(propertyConfig, "
|
|
20686
|
+
t1 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, style: t3, children: propertyConfig?.Icon ? getIconForWidget(propertyConfig, "small") : getIconForWidget(defaultPropertyConfig, "small") });
|
|
20659
20687
|
$[0] = classes;
|
|
20660
20688
|
$[1] = disabled;
|
|
20661
20689
|
$[2] = propertyConfig;
|
|
@@ -21991,7 +22019,8 @@
|
|
|
21991
22019
|
}, []);
|
|
21992
22020
|
const isUrlCollectionPath = React.useCallback((path_1) => removeInitialAndTrailingSlashes(path_1 + "/").startsWith(removeInitialAndTrailingSlashes(fullCollectionPath) + "/"), [fullCollectionPath]);
|
|
21993
22021
|
const urlPathToDataPath = React.useCallback((path_2) => {
|
|
21994
|
-
|
|
22022
|
+
const decodedPath = decodeURIComponent(path_2);
|
|
22023
|
+
if (decodedPath.startsWith(fullCollectionPath)) return decodedPath.replace(fullCollectionPath, "");
|
|
21995
22024
|
throw Error("Expected path starting with " + fullCollectionPath);
|
|
21996
22025
|
}, [fullCollectionPath]);
|
|
21997
22026
|
const resolveIdsFrom = React.useCallback((path_3) => {
|