@firecms/core 3.0.0-canary.163 → 3.0.0-canary.165
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 +61 -58
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +61 -58
- package/dist/index.umd.js.map +1 -1
- package/dist/util/entities.d.ts +1 -1
- package/package.json +5 -5
- package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +3 -0
- package/src/core/DefaultAppBar.tsx +2 -3
- package/src/core/DefaultDrawer.tsx +2 -1
- package/src/util/entities.ts +3 -1
package/dist/index.umd.js
CHANGED
|
@@ -355,6 +355,7 @@
|
|
|
355
355
|
function getDefaultValuesFor(properties) {
|
|
356
356
|
if (!properties) return {};
|
|
357
357
|
return Object.entries(properties).map(([key, property]) => {
|
|
358
|
+
if (!property) return {};
|
|
358
359
|
const value = getDefaultValueFor(property);
|
|
359
360
|
return value === void 0 ? {} : {
|
|
360
361
|
[key]: value
|
|
@@ -365,6 +366,7 @@
|
|
|
365
366
|
}), {});
|
|
366
367
|
}
|
|
367
368
|
function getDefaultValueFor(property) {
|
|
369
|
+
if (!property) return void 0;
|
|
368
370
|
if (isPropertyBuilder(property)) return void 0;
|
|
369
371
|
if (property.defaultValue || property.defaultValue === null) {
|
|
370
372
|
return property.defaultValue;
|
|
@@ -6858,15 +6860,17 @@
|
|
|
6858
6860
|
const hasCollapsedActions = actions.some((a) => a.collapsed || a.collapsed === void 0);
|
|
6859
6861
|
const collapsedActions = actions.filter((a_0) => a_0.collapsed || a_0.collapsed === void 0);
|
|
6860
6862
|
const uncollapsedActions = actions.filter((a_1) => a_1.collapsed === false);
|
|
6861
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls("h-full flex items-center justify-center flex-col bg-surface-50 dark:bg-surface-900 bg-opacity-90 dark:bg-opacity-90 z-10", frozen ? "sticky left-0" : ""),
|
|
6863
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls("h-full flex items-center justify-center flex-col bg-surface-50 dark:bg-surface-900 bg-opacity-90 dark:bg-opacity-90 z-10", frozen ? "sticky left-0" : ""), onClick: React.useCallback((event) => {
|
|
6864
|
+
event.stopPropagation();
|
|
6865
|
+
}, []), style: {
|
|
6862
6866
|
width,
|
|
6863
6867
|
position: frozen ? "sticky" : "initial",
|
|
6864
6868
|
left: frozen ? 0 : "initial",
|
|
6865
6869
|
contain: "strict"
|
|
6866
6870
|
}, children: [
|
|
6867
6871
|
(hasActions || selectionEnabled) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-34 flex justify-center", children: [
|
|
6868
|
-
uncollapsedActions.map((action, index) => /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: action.name, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { onClick: (
|
|
6869
|
-
|
|
6872
|
+
uncollapsedActions.map((action, index) => /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: action.name, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { onClick: (event_0) => {
|
|
6873
|
+
event_0.stopPropagation();
|
|
6870
6874
|
action.onClick({
|
|
6871
6875
|
entity,
|
|
6872
6876
|
fullPath,
|
|
@@ -6896,8 +6900,8 @@
|
|
|
6896
6900
|
] }, index_0)) }),
|
|
6897
6901
|
selectionEnabled && /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: `Select ${entity.id}`, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Checkbox, { size: largeLayout ? "medium" : "small", checked: Boolean(isSelected), onCheckedChange }) })
|
|
6898
6902
|
] }),
|
|
6899
|
-
!hideId && size !== "xs" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[138px] text-center overflow-hidden truncate font-mono text-xs text-text-secondary dark:text-text-secondary-dark max-w-full text-ellipsis px-2", onClick: (
|
|
6900
|
-
|
|
6903
|
+
!hideId && size !== "xs" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[138px] text-center overflow-hidden truncate font-mono text-xs text-text-secondary dark:text-text-secondary-dark max-w-full text-ellipsis px-2", onClick: (event_1) => {
|
|
6904
|
+
event_1.stopPropagation();
|
|
6901
6905
|
}, children: entity ? entity.id : /* @__PURE__ */ jsxRuntime.jsx(ui.Skeleton, {}) })
|
|
6902
6906
|
] });
|
|
6903
6907
|
};
|
|
@@ -12876,7 +12880,7 @@
|
|
|
12876
12880
|
return React.useContext(AppContext);
|
|
12877
12881
|
}
|
|
12878
12882
|
const DefaultAppBar = function DefaultAppBar2(t0) {
|
|
12879
|
-
const $ = reactCompilerRuntime.c(
|
|
12883
|
+
const $ = reactCompilerRuntime.c(44);
|
|
12880
12884
|
const {
|
|
12881
12885
|
title,
|
|
12882
12886
|
endAdornment,
|
|
@@ -12960,58 +12964,57 @@
|
|
|
12960
12964
|
t5 = $[12];
|
|
12961
12965
|
}
|
|
12962
12966
|
let t6;
|
|
12963
|
-
if ($[13] !==
|
|
12964
|
-
t6 = navigation && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mr-8 hidden lg:block", children: /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Link, { className: "visited:text-inherit visited:dark:text-inherit", to: navigation?.basePath ?? "/", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-4", children: [
|
|
12967
|
+
if ($[13] !== hasDrawer || $[14] !== logo || $[15] !== navigation || $[16] !== title) {
|
|
12968
|
+
t6 = navigation && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mr-8 hidden lg:block", children: /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Link, { className: "visited:text-inherit visited:dark:text-inherit block", to: navigation?.basePath ?? "/", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-4", children: [
|
|
12965
12969
|
!hasDrawer && (logo ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: "Logo", className: ui.cls("w-[32px] h-[32px] object-contain") }) : /* @__PURE__ */ jsxRuntime.jsx(FireCMSLogo, { width: "32px", height: "32px" })),
|
|
12966
|
-
typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle1", noWrap: true,
|
|
12970
|
+
typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle1", noWrap: true, children: title }) : title
|
|
12967
12971
|
] }) }) });
|
|
12968
|
-
$[13] =
|
|
12969
|
-
$[14] =
|
|
12970
|
-
$[15] =
|
|
12971
|
-
$[16] =
|
|
12972
|
-
$[17] =
|
|
12973
|
-
$[18] = t6;
|
|
12972
|
+
$[13] = hasDrawer;
|
|
12973
|
+
$[14] = logo;
|
|
12974
|
+
$[15] = navigation;
|
|
12975
|
+
$[16] = title;
|
|
12976
|
+
$[17] = t6;
|
|
12974
12977
|
} else {
|
|
12975
|
-
t6 = $[
|
|
12978
|
+
t6 = $[17];
|
|
12976
12979
|
}
|
|
12977
12980
|
let t7;
|
|
12978
|
-
if ($[
|
|
12981
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
12979
12982
|
t7 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow" });
|
|
12980
|
-
$[
|
|
12983
|
+
$[18] = t7;
|
|
12981
12984
|
} else {
|
|
12982
|
-
t7 = $[
|
|
12985
|
+
t7 = $[18];
|
|
12983
12986
|
}
|
|
12984
12987
|
let t8;
|
|
12985
|
-
if ($[
|
|
12988
|
+
if ($[19] !== endAdornment) {
|
|
12986
12989
|
t8 = endAdornment && /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { children: endAdornment });
|
|
12987
|
-
$[
|
|
12988
|
-
$[
|
|
12990
|
+
$[19] = endAdornment;
|
|
12991
|
+
$[20] = t8;
|
|
12989
12992
|
} else {
|
|
12990
|
-
t8 = $[
|
|
12993
|
+
t8 = $[20];
|
|
12991
12994
|
}
|
|
12992
12995
|
let t9;
|
|
12993
|
-
if ($[
|
|
12996
|
+
if ($[21] !== includeModeToggle || $[22] !== mode || $[23] !== toggleMode) {
|
|
12994
12997
|
t9 = includeModeToggle && /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { color: "inherit", "aria-label": "Open drawer", onClick: toggleMode, size: "large", children: mode === "dark" ? /* @__PURE__ */ jsxRuntime.jsx(ui.DarkModeIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(ui.LightModeIcon, {}) });
|
|
12995
|
-
$[
|
|
12996
|
-
$[
|
|
12997
|
-
$[
|
|
12998
|
-
$[
|
|
12998
|
+
$[21] = includeModeToggle;
|
|
12999
|
+
$[22] = mode;
|
|
13000
|
+
$[23] = toggleMode;
|
|
13001
|
+
$[24] = t9;
|
|
12999
13002
|
} else {
|
|
13000
|
-
t9 = $[
|
|
13003
|
+
t9 = $[24];
|
|
13001
13004
|
}
|
|
13002
13005
|
let t10;
|
|
13003
|
-
if ($[
|
|
13006
|
+
if ($[25] !== user) {
|
|
13004
13007
|
t10 = user && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 py-2 mb-2", children: [
|
|
13005
13008
|
user.displayName && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body1", color: "secondary", children: user.displayName }),
|
|
13006
13009
|
user.email && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", color: "secondary", children: user.email })
|
|
13007
13010
|
] });
|
|
13008
|
-
$[
|
|
13009
|
-
$[
|
|
13011
|
+
$[25] = user;
|
|
13012
|
+
$[26] = t10;
|
|
13010
13013
|
} else {
|
|
13011
|
-
t10 = $[
|
|
13014
|
+
t10 = $[26];
|
|
13012
13015
|
}
|
|
13013
13016
|
let t11;
|
|
13014
|
-
if ($[
|
|
13017
|
+
if ($[27] !== authController || $[28] !== dropDownActions || $[29] !== navigate) {
|
|
13015
13018
|
t11 = !dropDownActions && /* @__PURE__ */ jsxRuntime.jsxs(ui.MenuItem, { onClick: async () => {
|
|
13016
13019
|
await authController.signOut();
|
|
13017
13020
|
navigate("/");
|
|
@@ -13019,30 +13022,30 @@
|
|
|
13019
13022
|
/* @__PURE__ */ jsxRuntime.jsx(ui.LogoutIcon, {}),
|
|
13020
13023
|
"Log Out"
|
|
13021
13024
|
] });
|
|
13022
|
-
$[
|
|
13023
|
-
$[
|
|
13024
|
-
$[
|
|
13025
|
-
$[
|
|
13025
|
+
$[27] = authController;
|
|
13026
|
+
$[28] = dropDownActions;
|
|
13027
|
+
$[29] = navigate;
|
|
13028
|
+
$[30] = t11;
|
|
13026
13029
|
} else {
|
|
13027
|
-
t11 = $[
|
|
13030
|
+
t11 = $[30];
|
|
13028
13031
|
}
|
|
13029
13032
|
let t12;
|
|
13030
|
-
if ($[
|
|
13033
|
+
if ($[31] !== avatarComponent || $[32] !== dropDownActions || $[33] !== t10 || $[34] !== t11) {
|
|
13031
13034
|
t12 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Menu, { trigger: avatarComponent, children: [
|
|
13032
13035
|
t10,
|
|
13033
13036
|
dropDownActions,
|
|
13034
13037
|
t11
|
|
13035
13038
|
] });
|
|
13036
|
-
$[
|
|
13037
|
-
$[
|
|
13038
|
-
$[
|
|
13039
|
-
$[
|
|
13040
|
-
$[
|
|
13039
|
+
$[31] = avatarComponent;
|
|
13040
|
+
$[32] = dropDownActions;
|
|
13041
|
+
$[33] = t10;
|
|
13042
|
+
$[34] = t11;
|
|
13043
|
+
$[35] = t12;
|
|
13041
13044
|
} else {
|
|
13042
|
-
t12 = $[
|
|
13045
|
+
t12 = $[35];
|
|
13043
13046
|
}
|
|
13044
13047
|
let t13;
|
|
13045
|
-
if ($[
|
|
13048
|
+
if ($[36] !== startAdornment || $[37] !== style || $[38] !== t12 || $[39] !== t5 || $[40] !== t6 || $[41] !== t8 || $[42] !== t9) {
|
|
13046
13049
|
t13 = /* @__PURE__ */ jsxRuntime.jsxs("div", { style, className: t5, children: [
|
|
13047
13050
|
t6,
|
|
13048
13051
|
startAdornment,
|
|
@@ -13051,16 +13054,16 @@
|
|
|
13051
13054
|
t9,
|
|
13052
13055
|
t12
|
|
13053
13056
|
] });
|
|
13054
|
-
$[
|
|
13055
|
-
$[
|
|
13056
|
-
$[
|
|
13057
|
-
$[
|
|
13058
|
-
$[
|
|
13059
|
-
$[
|
|
13060
|
-
$[
|
|
13061
|
-
$[
|
|
13057
|
+
$[36] = startAdornment;
|
|
13058
|
+
$[37] = style;
|
|
13059
|
+
$[38] = t12;
|
|
13060
|
+
$[39] = t5;
|
|
13061
|
+
$[40] = t6;
|
|
13062
|
+
$[41] = t8;
|
|
13063
|
+
$[42] = t9;
|
|
13064
|
+
$[43] = t13;
|
|
13062
13065
|
} else {
|
|
13063
|
-
t13 = $[
|
|
13066
|
+
t13 = $[43];
|
|
13064
13067
|
}
|
|
13065
13068
|
return t13;
|
|
13066
13069
|
};
|
|
@@ -22375,7 +22378,7 @@
|
|
|
22375
22378
|
}
|
|
22376
22379
|
let t3;
|
|
22377
22380
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
22378
|
-
t3 = ui.cls("cursor-pointer ml-3 mr-1");
|
|
22381
|
+
t3 = ui.cls("cursor-pointer rounded ml-3 mr-1");
|
|
22379
22382
|
$[2] = t3;
|
|
22380
22383
|
} else {
|
|
22381
22384
|
t3 = $[2];
|
|
@@ -22391,7 +22394,7 @@
|
|
|
22391
22394
|
}
|
|
22392
22395
|
let t5;
|
|
22393
22396
|
if ($[6] !== navigation.basePath || $[7] !== t4) {
|
|
22394
|
-
t5 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Home", sideOffset: 20, side: "right", children: /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Link, { to: navigation.basePath, children: t4 }) });
|
|
22397
|
+
t5 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Home", sideOffset: 20, side: "right", children: /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Link, { className: "block", to: navigation.basePath, children: t4 }) });
|
|
22395
22398
|
$[6] = navigation.basePath;
|
|
22396
22399
|
$[7] = t4;
|
|
22397
22400
|
$[8] = t5;
|