@firecms/core 3.0.0-canary.163 → 3.0.0-canary.164

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.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;
@@ -12876,7 +12878,7 @@
12876
12878
  return React.useContext(AppContext);
12877
12879
  }
12878
12880
  const DefaultAppBar = function DefaultAppBar2(t0) {
12879
- const $ = reactCompilerRuntime.c(45);
12881
+ const $ = reactCompilerRuntime.c(44);
12880
12882
  const {
12881
12883
  title,
12882
12884
  endAdornment,
@@ -12960,58 +12962,57 @@
12960
12962
  t5 = $[12];
12961
12963
  }
12962
12964
  let t6;
12963
- if ($[13] !== drawerOpen || $[14] !== hasDrawer || $[15] !== logo || $[16] !== navigation || $[17] !== title) {
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: [
12965
+ if ($[13] !== hasDrawer || $[14] !== logo || $[15] !== navigation || $[16] !== title) {
12966
+ 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
12967
  !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, className: ui.cls("transition-all", drawerOpen ? "ml-2" : ""), children: title }) : title
12968
+ typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle1", noWrap: true, children: title }) : title
12967
12969
  ] }) }) });
12968
- $[13] = drawerOpen;
12969
- $[14] = hasDrawer;
12970
- $[15] = logo;
12971
- $[16] = navigation;
12972
- $[17] = title;
12973
- $[18] = t6;
12970
+ $[13] = hasDrawer;
12971
+ $[14] = logo;
12972
+ $[15] = navigation;
12973
+ $[16] = title;
12974
+ $[17] = t6;
12974
12975
  } else {
12975
- t6 = $[18];
12976
+ t6 = $[17];
12976
12977
  }
12977
12978
  let t7;
12978
- if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
12979
+ if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
12979
12980
  t7 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow" });
12980
- $[19] = t7;
12981
+ $[18] = t7;
12981
12982
  } else {
12982
- t7 = $[19];
12983
+ t7 = $[18];
12983
12984
  }
12984
12985
  let t8;
12985
- if ($[20] !== endAdornment) {
12986
+ if ($[19] !== endAdornment) {
12986
12987
  t8 = endAdornment && /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { children: endAdornment });
12987
- $[20] = endAdornment;
12988
- $[21] = t8;
12988
+ $[19] = endAdornment;
12989
+ $[20] = t8;
12989
12990
  } else {
12990
- t8 = $[21];
12991
+ t8 = $[20];
12991
12992
  }
12992
12993
  let t9;
12993
- if ($[22] !== includeModeToggle || $[23] !== mode || $[24] !== toggleMode) {
12994
+ if ($[21] !== includeModeToggle || $[22] !== mode || $[23] !== toggleMode) {
12994
12995
  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
- $[22] = includeModeToggle;
12996
- $[23] = mode;
12997
- $[24] = toggleMode;
12998
- $[25] = t9;
12996
+ $[21] = includeModeToggle;
12997
+ $[22] = mode;
12998
+ $[23] = toggleMode;
12999
+ $[24] = t9;
12999
13000
  } else {
13000
- t9 = $[25];
13001
+ t9 = $[24];
13001
13002
  }
13002
13003
  let t10;
13003
- if ($[26] !== user) {
13004
+ if ($[25] !== user) {
13004
13005
  t10 = user && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 py-2 mb-2", children: [
13005
13006
  user.displayName && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body1", color: "secondary", children: user.displayName }),
13006
13007
  user.email && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", color: "secondary", children: user.email })
13007
13008
  ] });
13008
- $[26] = user;
13009
- $[27] = t10;
13009
+ $[25] = user;
13010
+ $[26] = t10;
13010
13011
  } else {
13011
- t10 = $[27];
13012
+ t10 = $[26];
13012
13013
  }
13013
13014
  let t11;
13014
- if ($[28] !== authController || $[29] !== dropDownActions || $[30] !== navigate) {
13015
+ if ($[27] !== authController || $[28] !== dropDownActions || $[29] !== navigate) {
13015
13016
  t11 = !dropDownActions && /* @__PURE__ */ jsxRuntime.jsxs(ui.MenuItem, { onClick: async () => {
13016
13017
  await authController.signOut();
13017
13018
  navigate("/");
@@ -13019,30 +13020,30 @@
13019
13020
  /* @__PURE__ */ jsxRuntime.jsx(ui.LogoutIcon, {}),
13020
13021
  "Log Out"
13021
13022
  ] });
13022
- $[28] = authController;
13023
- $[29] = dropDownActions;
13024
- $[30] = navigate;
13025
- $[31] = t11;
13023
+ $[27] = authController;
13024
+ $[28] = dropDownActions;
13025
+ $[29] = navigate;
13026
+ $[30] = t11;
13026
13027
  } else {
13027
- t11 = $[31];
13028
+ t11 = $[30];
13028
13029
  }
13029
13030
  let t12;
13030
- if ($[32] !== avatarComponent || $[33] !== dropDownActions || $[34] !== t10 || $[35] !== t11) {
13031
+ if ($[31] !== avatarComponent || $[32] !== dropDownActions || $[33] !== t10 || $[34] !== t11) {
13031
13032
  t12 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Menu, { trigger: avatarComponent, children: [
13032
13033
  t10,
13033
13034
  dropDownActions,
13034
13035
  t11
13035
13036
  ] });
13036
- $[32] = avatarComponent;
13037
- $[33] = dropDownActions;
13038
- $[34] = t10;
13039
- $[35] = t11;
13040
- $[36] = t12;
13037
+ $[31] = avatarComponent;
13038
+ $[32] = dropDownActions;
13039
+ $[33] = t10;
13040
+ $[34] = t11;
13041
+ $[35] = t12;
13041
13042
  } else {
13042
- t12 = $[36];
13043
+ t12 = $[35];
13043
13044
  }
13044
13045
  let t13;
13045
- if ($[37] !== startAdornment || $[38] !== style || $[39] !== t12 || $[40] !== t5 || $[41] !== t6 || $[42] !== t8 || $[43] !== t9) {
13046
+ if ($[36] !== startAdornment || $[37] !== style || $[38] !== t12 || $[39] !== t5 || $[40] !== t6 || $[41] !== t8 || $[42] !== t9) {
13046
13047
  t13 = /* @__PURE__ */ jsxRuntime.jsxs("div", { style, className: t5, children: [
13047
13048
  t6,
13048
13049
  startAdornment,
@@ -13051,16 +13052,16 @@
13051
13052
  t9,
13052
13053
  t12
13053
13054
  ] });
13054
- $[37] = startAdornment;
13055
- $[38] = style;
13056
- $[39] = t12;
13057
- $[40] = t5;
13058
- $[41] = t6;
13059
- $[42] = t8;
13060
- $[43] = t9;
13061
- $[44] = t13;
13055
+ $[36] = startAdornment;
13056
+ $[37] = style;
13057
+ $[38] = t12;
13058
+ $[39] = t5;
13059
+ $[40] = t6;
13060
+ $[41] = t8;
13061
+ $[42] = t9;
13062
+ $[43] = t13;
13062
13063
  } else {
13063
- t13 = $[44];
13064
+ t13 = $[43];
13064
13065
  }
13065
13066
  return t13;
13066
13067
  };
@@ -22375,7 +22376,7 @@
22375
22376
  }
22376
22377
  let t3;
22377
22378
  if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
22378
- t3 = ui.cls("cursor-pointer ml-3 mr-1");
22379
+ t3 = ui.cls("cursor-pointer rounded ml-3 mr-1");
22379
22380
  $[2] = t3;
22380
22381
  } else {
22381
22382
  t3 = $[2];
@@ -22391,7 +22392,7 @@
22391
22392
  }
22392
22393
  let t5;
22393
22394
  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 }) });
22395
+ 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
22396
  $[6] = navigation.basePath;
22396
22397
  $[7] = t4;
22397
22398
  $[8] = t5;