@firecms/core 3.0.0-canary.160 → 3.0.0-canary.162

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 CHANGED
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { c } from "react-compiler-runtime";
3
3
  import * as React from "react";
4
4
  import React__default, { forwardRef, useState, useRef, useEffect, useContext, useCallback, useMemo, createRef, createContext, useLayoutEffect, createElement } from "react";
5
- import { getColorSchemeForSeed, CHIP_COLORS, Tooltip, IconButton, InfoIcon, Typography, ContentCopyIcon, CircleIcon, FunctionsIcon, iconKeys, coolIconKeys, Icon, ErrorIcon, cls, defaultBorderMixin, OpenInNewIcon, TextareaAutosize, focusedDisabled, MultiSelect, MultiSelectItem, Select, SelectItem, BooleanSwitch, DateTimeField, Skeleton, paperMixin, ErrorOutlineIcon, EditIcon, KeyboardTabIcon, RemoveCircleIcon, Menu, MoreVertIcon, MenuItem, Checkbox, CircularProgress, SearchBar, Badge, ArrowUpwardIcon, Popover, FilterListIcon, Button, CenteredView, AssignmentIcon, Label, ClearIcon, TextField, BooleanSwitchWithLabel, useOutsideAlerter, Dialog, DialogTitle, DialogContent, DialogActions, FileCopyIcon, ArchiveIcon, DeleteIcon, AddIcon, ExpandablePanel, Markdown, ArrowForwardIcon, Card, cardMixin, cardClickableMixin, StarIcon, StarBorderIcon, Chip, Collapse, Container, NotesIcon, Tab, CloseIcon, Tabs, Alert, FilterListOffIcon, SearchIcon, LoadingButton, Avatar, DarkModeIcon, LightModeIcon, LogoutIcon, HandleIcon, RemoveIcon, KeyboardArrowUpIcon, KeyboardArrowDownIcon, debounce, DescriptionIcon, fieldBackgroundMixin, fieldBackgroundHoverMixin, fieldBackgroundDisabledMixin, ArrowDropDownIcon, ShortTextIcon, SubjectIcon, FormatQuoteIcon, HttpIcon, EmailIcon, FlagIcon, ListIcon, ListAltIcon, NumbersIcon, FormatListNumberedIcon, UploadFileIcon, DriveFolderUploadIcon, LinkIcon, AddLinkIcon, ScheduleIcon, BallotIcon, RepeatIcon, ViewStreamIcon, Sheet, MenuIcon, ChevronLeftIcon } from "@firecms/ui";
5
+ import { getColorSchemeForSeed, CHIP_COLORS, Tooltip, IconButton, InfoIcon, Typography, ContentCopyIcon, CircleIcon, FunctionsIcon, iconKeys, coolIconKeys, Icon, ErrorIcon, cls, defaultBorderMixin, OpenInNewIcon, TextareaAutosize, focusedDisabled, MultiSelect, MultiSelectItem, Select, SelectItem, BooleanSwitch, DateTimeField, Skeleton, paperMixin, EditIcon, KeyboardTabIcon, DoNotDisturbOnIcon, Menu, MoreVertIcon, MenuItem, Checkbox, CircularProgress, SearchBar, Badge, ArrowUpwardIcon, Popover, FilterListIcon, Button, CenteredView, AssignmentIcon, Label, CloseIcon, TextField, BooleanSwitchWithLabel, useOutsideAlerter, Dialog, DialogTitle, DialogContent, DialogActions, FileCopyIcon, ArchiveIcon, DeleteIcon, AddIcon, ExpandablePanel, Markdown, ArrowForwardIcon, Card, cardMixin, cardClickableMixin, StarIcon, Chip, Collapse, Container, NotesIcon, Tab, Tabs, Alert, FilterListOffIcon, SearchIcon, LoadingButton, Avatar, DarkModeIcon, LightModeIcon, LogoutIcon, HandleIcon, RemoveIcon, KeyboardArrowUpIcon, KeyboardArrowDownIcon, debounce, DescriptionIcon, fieldBackgroundMixin, fieldBackgroundHoverMixin, fieldBackgroundDisabledMixin, ArrowDropDownIcon, ShortTextIcon, SubjectIcon, FormatQuoteIcon, HttpIcon, MailIcon, FlagIcon, ListIcon, ListAltIcon, NumbersIcon, FormatListNumberedIcon, UploadFileIcon, DriveFolderUploadIcon, LinkIcon, AddLinkIcon, ScheduleIcon, BallotIcon, RepeatIcon, ViewStreamIcon, Sheet, MenuIcon, ChevronLeftIcon } from "@firecms/ui";
6
6
  import { SnackbarProvider as SnackbarProvider$1, useSnackbar } from "notistack";
7
7
  import hash from "object-hash";
8
8
  import { useFormex, setIn, getIn, useCreateFormex, Formex, Field } from "@firecms/formex";
@@ -2273,7 +2273,6 @@ const iconSynonyms = {
2273
2273
  picture_in_picture_alt: "cropped overlap photo position shape",
2274
2274
  pie_chart: "analytics bars data diagram infographic measure metrics statistics tracking",
2275
2275
  pie_chart_outline: "analytics bars data diagram infographic measure metrics statistics tracking",
2276
- pie_chart_outlined: "graph",
2277
2276
  pin: "1 2 3 digit key login logout number password pattern security star symbol unlock",
2278
2277
  pinch: "arrows compress direction finger grasp hand navigation nip squeeze tweak",
2279
2278
  pin_drop: "destination direction gps location maps navigation place stop",
@@ -2913,6 +2912,7 @@ const map = iconKeys.map((importName) => {
2913
2912
  const iconsSearch = new Fuse(map, {
2914
2913
  isCaseSensitive: false,
2915
2914
  shouldSort: true,
2915
+ ignoreLocation: true,
2916
2916
  distance: 0,
2917
2917
  keys: ["key", "synonyms"]
2918
2918
  });
@@ -3172,6 +3172,12 @@ function getEntityImagePreviewPropertyKey(collection) {
3172
3172
  return key;
3173
3173
  }
3174
3174
  }
3175
+ for (const key in collection.properties) {
3176
+ const property = collection.properties[key];
3177
+ if (property.dataType === "array" && property.of?.dataType === "string" && property.of.storage?.acceptedFiles?.includes("image/*")) {
3178
+ return key;
3179
+ }
3180
+ }
3175
3181
  return void 0;
3176
3182
  }
3177
3183
  function flattenObject(obj, parentKey = "") {
@@ -5160,7 +5166,7 @@ function EntityTableCellActions({
5160
5166
  showError && /* @__PURE__ */ jsx(ErrorTooltip, { side: "left", title: showError.message, children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", style: {
5161
5167
  width: 32,
5162
5168
  height: 32
5163
- }, children: /* @__PURE__ */ jsx(ErrorOutlineIcon, { size: "small", color: "error" }) }) })
5169
+ }, children: /* @__PURE__ */ jsx(ErrorIcon, { size: "small", color: "error" }) }) })
5164
5170
  ] }) });
5165
5171
  }
5166
5172
  const dropZoneClasses$1 = "max-w-full box-border relative pt-[2px] items-center border border-transparent outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid";
@@ -5244,7 +5250,7 @@ function TableStorageUpload(props) {
5244
5250
  return t1;
5245
5251
  }
5246
5252
  function StorageUpload$1(t0) {
5247
- const $ = c(67);
5253
+ const $ = c(64);
5248
5254
  const {
5249
5255
  property,
5250
5256
  internalValue,
@@ -5261,8 +5267,7 @@ function StorageUpload$1(t0) {
5261
5267
  onFileUploadComplete,
5262
5268
  storagePathBuilder
5263
5269
  } = t0;
5264
- const [, setOnHover] = useState(false);
5265
- const previewSize = multipleFilesSupported && previewSizeInput === "medium" ? "small" : previewSizeInput;
5270
+ const previewSize = previewSizeInput;
5266
5271
  if (multipleFilesSupported) {
5267
5272
  const arrayProperty = property;
5268
5273
  if (Array.isArray(arrayProperty.of)) {
@@ -5375,58 +5380,43 @@ function StorageUpload$1(t0) {
5375
5380
  t5 = t6;
5376
5381
  const imageSize = t5;
5377
5382
  const showError = !disabled && error;
5378
- let t7;
5379
- let t8;
5380
- let t9;
5381
- if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
5382
- t7 = () => setOnHover(true);
5383
- t8 = () => setOnHover(true);
5384
- t9 = () => setOnHover(false);
5385
- $[17] = t7;
5386
- $[18] = t8;
5387
- $[19] = t9;
5388
- } else {
5389
- t7 = $[17];
5390
- t8 = $[18];
5391
- t9 = $[19];
5392
- }
5393
- const t10 = `justify-${hasValue ? "start" : "center"}`;
5394
- const t11 = isDragActive ? activeDropClasses$1 : "";
5395
- const t12 = isDragAccept ? acceptDropClasses$1 : "";
5396
- const t13 = isDragReject ? rejectDropClasses$1 : "";
5397
- let t14;
5398
- if ($[20] !== t10 || $[21] !== t11 || $[22] !== t12 || $[23] !== t13) {
5399
- t14 = cls(dropZoneClasses$1, "relative w-full h-full flex", t10, t11, t12, t13);
5400
- $[20] = t10;
5383
+ const t7 = `justify-${hasValue ? "start" : "center"}`;
5384
+ const t8 = isDragActive ? activeDropClasses$1 : "";
5385
+ const t9 = isDragAccept ? acceptDropClasses$1 : "";
5386
+ const t10 = isDragReject ? rejectDropClasses$1 : "";
5387
+ let t11;
5388
+ if ($[17] !== t10 || $[18] !== t7 || $[19] !== t8 || $[20] !== t9) {
5389
+ t11 = cls(dropZoneClasses$1, "relative w-full h-full flex", t7, t8, t9, t10);
5390
+ $[17] = t10;
5391
+ $[18] = t7;
5392
+ $[19] = t8;
5393
+ $[20] = t9;
5401
5394
  $[21] = t11;
5402
- $[22] = t12;
5403
- $[23] = t13;
5404
- $[24] = t14;
5405
5395
  } else {
5406
- t14 = $[24];
5396
+ t11 = $[21];
5407
5397
  }
5408
- let t15;
5409
- if ($[25] !== getInputProps) {
5410
- t15 = getInputProps();
5411
- $[25] = getInputProps;
5412
- $[26] = t15;
5398
+ let t12;
5399
+ if ($[22] !== getInputProps) {
5400
+ t12 = getInputProps();
5401
+ $[22] = getInputProps;
5402
+ $[23] = t12;
5413
5403
  } else {
5414
- t15 = $[26];
5404
+ t12 = $[23];
5415
5405
  }
5416
- let t16;
5417
- if ($[27] !== autoFocus || $[28] !== t15) {
5418
- t16 = /* @__PURE__ */ jsx("input", { autoFocus, ...t15 });
5419
- $[27] = autoFocus;
5420
- $[28] = t15;
5421
- $[29] = t16;
5406
+ let t13;
5407
+ if ($[24] !== autoFocus || $[25] !== t12) {
5408
+ t13 = /* @__PURE__ */ jsx("input", { autoFocus, ...t12 });
5409
+ $[24] = autoFocus;
5410
+ $[25] = t12;
5411
+ $[26] = t13;
5422
5412
  } else {
5423
- t16 = $[29];
5413
+ t13 = $[26];
5424
5414
  }
5425
- let t17;
5426
- if ($[30] !== entity || $[31] !== imageSize || $[32] !== internalValue || $[33] !== metadata || $[34] !== onFileUploadComplete || $[35] !== previewSize || $[36] !== renderProperty || $[37] !== storagePathBuilder) {
5427
- let t182;
5428
- if ($[39] !== entity || $[40] !== imageSize || $[41] !== metadata || $[42] !== onFileUploadComplete || $[43] !== previewSize || $[44] !== renderProperty || $[45] !== storagePathBuilder) {
5429
- t182 = (entry, index) => {
5415
+ let t14;
5416
+ if ($[27] !== entity || $[28] !== imageSize || $[29] !== internalValue || $[30] !== metadata || $[31] !== onFileUploadComplete || $[32] !== previewSize || $[33] !== renderProperty || $[34] !== storagePathBuilder) {
5417
+ let t152;
5418
+ if ($[36] !== entity || $[37] !== imageSize || $[38] !== metadata || $[39] !== onFileUploadComplete || $[40] !== previewSize || $[41] !== renderProperty || $[42] !== storagePathBuilder) {
5419
+ t152 = (entry, index) => {
5430
5420
  let child;
5431
5421
  if (entry.storagePathOrDownloadUrl) {
5432
5422
  child = /* @__PURE__ */ jsx(TableStorageItemPreview, { property: renderProperty, value: entry.storagePathOrDownloadUrl, entity, size: previewSize }, `storage_preview_${index}`);
@@ -5437,87 +5427,87 @@ function StorageUpload$1(t0) {
5437
5427
  }
5438
5428
  return child;
5439
5429
  };
5440
- $[39] = entity;
5441
- $[40] = imageSize;
5442
- $[41] = metadata;
5443
- $[42] = onFileUploadComplete;
5444
- $[43] = previewSize;
5445
- $[44] = renderProperty;
5446
- $[45] = storagePathBuilder;
5447
- $[46] = t182;
5430
+ $[36] = entity;
5431
+ $[37] = imageSize;
5432
+ $[38] = metadata;
5433
+ $[39] = onFileUploadComplete;
5434
+ $[40] = previewSize;
5435
+ $[41] = renderProperty;
5436
+ $[42] = storagePathBuilder;
5437
+ $[43] = t152;
5448
5438
  } else {
5449
- t182 = $[46];
5439
+ t152 = $[43];
5450
5440
  }
5451
- t17 = internalValue.map(t182);
5452
- $[30] = entity;
5453
- $[31] = imageSize;
5454
- $[32] = internalValue;
5455
- $[33] = metadata;
5456
- $[34] = onFileUploadComplete;
5457
- $[35] = previewSize;
5458
- $[36] = renderProperty;
5459
- $[37] = storagePathBuilder;
5460
- $[38] = t17;
5441
+ t14 = internalValue.map(t152);
5442
+ $[27] = entity;
5443
+ $[28] = imageSize;
5444
+ $[29] = internalValue;
5445
+ $[30] = metadata;
5446
+ $[31] = onFileUploadComplete;
5447
+ $[32] = previewSize;
5448
+ $[33] = renderProperty;
5449
+ $[34] = storagePathBuilder;
5450
+ $[35] = t14;
5461
5451
  } else {
5462
- t17 = $[38];
5452
+ t14 = $[35];
5463
5453
  }
5464
- let t18;
5465
- if ($[47] !== helpText || $[48] !== internalValue || $[49] !== open) {
5466
- t18 = !internalValue && /* @__PURE__ */ jsx("div", { className: "flex-grow m-2 max-w-[200px]", onClick: open, children: /* @__PURE__ */ jsx(Typography, { className: "text-surface-400 dark:text-surface-600", variant: "body2", align: "center", children: helpText }) });
5467
- $[47] = helpText;
5468
- $[48] = internalValue;
5469
- $[49] = open;
5470
- $[50] = t18;
5454
+ let t15;
5455
+ if ($[44] !== helpText || $[45] !== internalValue || $[46] !== open) {
5456
+ t15 = !internalValue && /* @__PURE__ */ jsx("div", { className: "flex-grow m-2 max-w-[200px]", onClick: open, children: /* @__PURE__ */ jsx(Typography, { className: "text-surface-400 dark:text-surface-600", variant: "body2", align: "center", children: helpText }) });
5457
+ $[44] = helpText;
5458
+ $[45] = internalValue;
5459
+ $[46] = open;
5460
+ $[47] = t15;
5471
5461
  } else {
5472
- t18 = $[50];
5462
+ t15 = $[47];
5473
5463
  }
5474
- const t19 = !disabled ? openPopup : void 0;
5475
- let t20;
5476
- if ($[51] === Symbol.for("react.memo_cache_sentinel")) {
5477
- t20 = /* @__PURE__ */ jsx(EditIcon, { size: "small", className: "text-surface-500" });
5478
- $[51] = t20;
5464
+ const t16 = !disabled ? openPopup : void 0;
5465
+ let t17;
5466
+ if ($[48] === Symbol.for("react.memo_cache_sentinel")) {
5467
+ t17 = /* @__PURE__ */ jsx(EditIcon, { size: "small", className: "text-surface-500" });
5468
+ $[48] = t17;
5479
5469
  } else {
5480
- t20 = $[51];
5470
+ t17 = $[48];
5481
5471
  }
5482
- let t21;
5483
- if ($[52] !== open) {
5484
- t21 = /* @__PURE__ */ jsx(IconButton, { color: "inherit", size: "small", onClick: open, children: t20 });
5485
- $[52] = open;
5486
- $[53] = t21;
5472
+ let t18;
5473
+ if ($[49] !== open) {
5474
+ t18 = /* @__PURE__ */ jsx(IconButton, { color: "inherit", size: "small", onClick: open, children: t17 });
5475
+ $[49] = open;
5476
+ $[50] = t18;
5487
5477
  } else {
5488
- t21 = $[53];
5478
+ t18 = $[50];
5489
5479
  }
5490
- let t22;
5491
- if ($[54] !== disabled || $[55] !== selected || $[56] !== showError || $[57] !== t19 || $[58] !== t21) {
5492
- t22 = /* @__PURE__ */ jsx(EntityTableCellActions, { showError, disabled, showExpandIcon: true, selected, openPopup: t19, children: t21 });
5493
- $[54] = disabled;
5494
- $[55] = selected;
5495
- $[56] = showError;
5496
- $[57] = t19;
5497
- $[58] = t21;
5498
- $[59] = t22;
5480
+ let t19;
5481
+ if ($[51] !== disabled || $[52] !== selected || $[53] !== showError || $[54] !== t16 || $[55] !== t18) {
5482
+ t19 = /* @__PURE__ */ jsx(EntityTableCellActions, { showError, disabled, showExpandIcon: true, selected, openPopup: t16, children: t18 });
5483
+ $[51] = disabled;
5484
+ $[52] = selected;
5485
+ $[53] = showError;
5486
+ $[54] = t16;
5487
+ $[55] = t18;
5488
+ $[56] = t19;
5499
5489
  } else {
5500
- t22 = $[59];
5490
+ t19 = $[56];
5501
5491
  }
5502
- let t23;
5503
- if ($[60] !== rootProps || $[61] !== t14 || $[62] !== t16 || $[63] !== t17 || $[64] !== t18 || $[65] !== t22) {
5504
- t23 = /* @__PURE__ */ jsxs("div", { ...rootProps, onMouseEnter: t7, onMouseMove: t8, onMouseLeave: t9, className: t14, children: [
5505
- t16,
5506
- t17,
5507
- t18,
5508
- t22
5492
+ let t20;
5493
+ if ($[57] !== rootProps || $[58] !== t11 || $[59] !== t13 || $[60] !== t14 || $[61] !== t15 || $[62] !== t19) {
5494
+ t20 = /* @__PURE__ */ jsxs("div", { ...rootProps, className: t11, children: [
5495
+ t13,
5496
+ t14,
5497
+ t15,
5498
+ t19
5509
5499
  ] });
5510
- $[60] = rootProps;
5511
- $[61] = t14;
5512
- $[62] = t16;
5513
- $[63] = t17;
5514
- $[64] = t18;
5515
- $[65] = t22;
5516
- $[66] = t23;
5500
+ $[57] = rootProps;
5501
+ $[58] = t11;
5502
+ $[59] = t13;
5503
+ $[60] = t14;
5504
+ $[61] = t15;
5505
+ $[62] = t19;
5506
+ $[63] = t20;
5517
5507
  } else {
5518
- t23 = $[66];
5508
+ t20 = $[63];
5519
5509
  }
5520
- return t23;
5510
+ return t20;
5521
5511
  }
5522
5512
  function _temp2$a(a, b) {
5523
5513
  return {
@@ -5587,21 +5577,24 @@ function EntityPreview({
5587
5577
  const titleProperty = getEntityTitlePropertyKey(resolvedCollection, customizationController.propertyConfigs);
5588
5578
  const imagePropertyKey = getEntityImagePreviewPropertyKey(resolvedCollection);
5589
5579
  const imageProperty = imagePropertyKey ? resolvedCollection.properties[imagePropertyKey] : void 0;
5580
+ const usedImageProperty = imageProperty && "of" in imageProperty ? imageProperty.of : imageProperty;
5590
5581
  const restProperties = listProperties.filter((p) => p !== titleProperty && p !== imagePropertyKey);
5582
+ const imageValue = imagePropertyKey ? getValueInPath(entity.values, imagePropertyKey) : void 0;
5583
+ const usedImageValue = imageProperty !== void 0 ? "of" in imageProperty ? (imageValue ?? []).length > 0 ? imageValue[0] : void 0 : imageValue : void 0;
5591
5584
  return /* @__PURE__ */ jsxs(EntityPreviewContainer, { onClick: disabled ? void 0 : onClick, hover: disabled ? void 0 : hover, size, children: [
5592
5585
  /* @__PURE__ */ jsxs("div", { className: cls("flex w-10 h-10 ml-1 mr-2 shrink-0", size === "small" ? "my-0.5" : "m-2 self-start"), children: [
5593
- imageProperty && /* @__PURE__ */ jsx(PropertyPreview, { property: imageProperty, propertyKey: imagePropertyKey, size: "small", value: getValueInPath(entity.values, imagePropertyKey) }),
5594
- !imageProperty && /* @__PURE__ */ jsx(IconForView, { collectionOrView: collection, color: "primary", size, className: "m-auto p-1" })
5586
+ usedImageProperty && usedImageValue && /* @__PURE__ */ jsx(PropertyPreview, { property: usedImageProperty, propertyKey: imagePropertyKey, size: "small", value: usedImageValue }),
5587
+ (!usedImageProperty || !usedImageValue) && /* @__PURE__ */ jsx(IconForView, { collectionOrView: collection, color: "primary", size, className: "m-auto p-1" })
5595
5588
  ] }),
5596
5589
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col grow-1 w-full m-1 shrink-1", style: {
5597
5590
  "maxWidth": "calc(100% - 96px)"
5598
5591
  }, children: [
5599
5592
  size !== "small" && includeId && (entity ? /* @__PURE__ */ jsx("div", { className: "block whitespace-nowrap overflow-hidden truncate", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "disabled", className: "font-mono", children: entity.id }) }) : /* @__PURE__ */ jsx(Skeleton, {})),
5600
- titleProperty && /* @__PURE__ */ jsx("div", { className: "my-0.5 text-sm font-medium", children: entity ? /* @__PURE__ */ jsx(PropertyPreview, { propertyKey: titleProperty, value: getValueInPath(entity.values, titleProperty), property: resolvedCollection.properties[titleProperty], size: "large" }) : /* @__PURE__ */ jsx(SkeletonPropertyComponent, { property: resolvedCollection.properties[titleProperty], size: "large" }) }),
5593
+ titleProperty && /* @__PURE__ */ jsx("div", { className: "truncate my-0.5 text-sm font-medium", children: entity ? /* @__PURE__ */ jsx(PropertyPreview, { propertyKey: titleProperty, value: getValueInPath(entity.values, titleProperty), property: resolvedCollection.properties[titleProperty], size: "large" }) : /* @__PURE__ */ jsx(SkeletonPropertyComponent, { property: resolvedCollection.properties[titleProperty], size: "large" }) }),
5601
5594
  restProperties && restProperties.map((key) => {
5602
5595
  const childProperty = resolvedCollection.properties[key];
5603
5596
  if (!childProperty) return null;
5604
- return /* @__PURE__ */ jsx("div", { className: restProperties.length > 1 ? "my-0.5" : "my-0", children: entity ? /* @__PURE__ */ jsx(PropertyPreview, { propertyKey: key, value: getValueInPath(entity.values, key), property: childProperty, size: "small" }) : /* @__PURE__ */ jsx(SkeletonPropertyComponent, { property: childProperty, size: "small" }) }, "ref_prev_" + key);
5597
+ return /* @__PURE__ */ jsx("div", { className: cls("truncate", restProperties.length > 1 ? "my-0.5" : "my-0"), children: entity ? /* @__PURE__ */ jsx(PropertyPreview, { propertyKey: key, value: getValueInPath(entity.values, key), property: childProperty, size: "small" }) : /* @__PURE__ */ jsx(SkeletonPropertyComponent, { property: childProperty, size: "small" }) }, "ref_prev_" + key);
5605
5598
  })
5606
5599
  ] }),
5607
5600
  entity && includeEntityLink && /* @__PURE__ */ jsx(Tooltip, { title: `See details for ${entity.id}`, className: "shrink-0", children: /* @__PURE__ */ jsx(IconButton, { color: "inherit", size: "medium", className: size !== "small" ? "self-start" : "", onClick: (e) => {
@@ -5716,6 +5709,7 @@ const EntityPreviewContainer = React.forwardRef((t0, ref) => {
5716
5709
  }
5717
5710
  return t9;
5718
5711
  });
5712
+ EntityPreviewContainer.displayName = "EntityPreviewContainer";
5719
5713
  function TableReferenceField(props) {
5720
5714
  const $ = c(9);
5721
5715
  const customizationController = useCustomizationController();
@@ -6544,7 +6538,7 @@ const EntityTableCell = React__default.memo(function EntityTableCell2(t0) {
6544
6538
  }
6545
6539
  let t24;
6546
6540
  if ($[33] !== disabled || $[34] !== disabledTooltip || $[35] !== onHover) {
6547
- t24 = disabled && onHover && disabledTooltip && /* @__PURE__ */ jsx("div", { className: "absolute top-1 right-1 text-xs", children: /* @__PURE__ */ jsx(Tooltip, { title: disabledTooltip, children: /* @__PURE__ */ jsx(RemoveCircleIcon, { size: "smallest", color: "disabled", className: "text-surface-500" }) }) });
6541
+ t24 = disabled && onHover && disabledTooltip && /* @__PURE__ */ jsx("div", { className: "absolute top-1 right-1 text-xs", children: /* @__PURE__ */ jsx(Tooltip, { title: disabledTooltip, children: /* @__PURE__ */ jsx(DoNotDisturbOnIcon, { size: "smallest", color: "disabled", className: "text-surface-500" }) }) });
6548
6542
  $[33] = disabled;
6549
6543
  $[34] = disabledTooltip;
6550
6544
  $[35] = onHover;
@@ -8352,7 +8346,7 @@ function StringNumberFilterField(t0) {
8352
8346
  t7 = !enumValues && /* @__PURE__ */ jsx(TextField, { type: dataType === "number" ? "number" : void 0, value: internalValue !== void 0 && internalValue != null ? String(internalValue) : "", onChange: (evt) => {
8353
8347
  const val_0 = dataType === "number" ? parseFloat(evt.target.value) : evt.target.value;
8354
8348
  updateFilter(operation, val_0);
8355
- }, endAdornment: internalValue && /* @__PURE__ */ jsx(IconButton, { onClick: (e) => updateFilter(operation, void 0), children: /* @__PURE__ */ jsx(ClearIcon, {}) }) });
8349
+ }, endAdornment: internalValue && /* @__PURE__ */ jsx(IconButton, { onClick: (e) => updateFilter(operation, void 0), children: /* @__PURE__ */ jsx(CloseIcon, {}) }) });
8356
8350
  $[20] = dataType;
8357
8351
  $[21] = enumValues;
8358
8352
  $[22] = internalValue;
@@ -8368,7 +8362,7 @@ function StringNumberFilterField(t0) {
8368
8362
  if (value_1 !== "") {
8369
8363
  updateFilter(operation, dataType === "number" ? parseInt(value_1) : value_1);
8370
8364
  }
8371
- }, endAdornment: internalValue && /* @__PURE__ */ jsx(IconButton, { className: "absolute right-2 top-3", onClick: (e_0) => updateFilter(operation, void 0), children: /* @__PURE__ */ jsx(ClearIcon, {}) }), renderValue: (enumKey) => {
8365
+ }, endAdornment: internalValue && /* @__PURE__ */ jsx(IconButton, { className: "absolute right-2 top-3", onClick: (e_0) => updateFilter(operation, void 0), children: /* @__PURE__ */ jsx(CloseIcon, {}) }), renderValue: (enumKey) => {
8372
8366
  if (enumKey === null) {
8373
8367
  return "Filter for null values";
8374
8368
  }
@@ -8392,7 +8386,7 @@ function StringNumberFilterField(t0) {
8392
8386
  if ($[34] !== dataType || $[35] !== enumValues || $[36] !== internalValue || $[37] !== multiple || $[38] !== name || $[39] !== operation || $[40] !== updateFilter) {
8393
8387
  t9 = enumValues && multiple && /* @__PURE__ */ jsx(MultiSelect, { position: "item-aligned", value: Array.isArray(internalValue) ? internalValue.map(_temp3$3) : [], onValueChange: (value_2) => {
8394
8388
  updateFilter(operation, dataType === "number" ? value_2.map(_temp4$2) : value_2);
8395
- }, multiple, endAdornment: internalValue && /* @__PURE__ */ jsx(IconButton, { className: "absolute right-2 top-3", onClick: (e_2) => updateFilter(operation, void 0), children: /* @__PURE__ */ jsx(ClearIcon, {}) }), children: enumValues.map((enumConfig_0) => /* @__PURE__ */ jsx(MultiSelectItem, { value: String(enumConfig_0.id), children: /* @__PURE__ */ jsx(EnumValuesChip, { enumKey: String(enumConfig_0.id), enumValues, size: "small" }) }, `select_value_${name}_${enumConfig_0.id}`)) });
8389
+ }, multiple, endAdornment: internalValue && /* @__PURE__ */ jsx(IconButton, { className: "absolute right-2 top-3", onClick: (e_2) => updateFilter(operation, void 0), children: /* @__PURE__ */ jsx(CloseIcon, {}) }), children: enumValues.map((enumConfig_0) => /* @__PURE__ */ jsx(MultiSelectItem, { value: String(enumConfig_0.id), children: /* @__PURE__ */ jsx(EnumValuesChip, { enumKey: String(enumConfig_0.id), enumValues, size: "small" }) }, `select_value_${name}_${enumConfig_0.id}`)) });
8396
8390
  $[34] = dataType;
8397
8391
  $[35] = enumValues;
8398
8392
  $[36] = internalValue;
@@ -10089,7 +10083,7 @@ function NavigationCardBinding(t0) {
10089
10083
  } else {
10090
10084
  userConfigurationPersistence.setFavouritePaths([...userConfigurationPersistence.favouritePaths, path]);
10091
10085
  }
10092
- }, children: favourite ? /* @__PURE__ */ jsx(StarIcon, { size: 18, className: "text-secondary" }) : /* @__PURE__ */ jsx(StarBorderIcon, { size: 18, className: "text-surface-400 dark:text-surface-500" }) }, "favourite")] : [];
10086
+ }, children: /* @__PURE__ */ jsx(StarIcon, { size: 18, className: favourite ? "text-secondary" : "text-surface-400 dark:text-surface-500" }) }, "favourite")] : [];
10093
10087
  if (customizationController.plugins && collection) {
10094
10088
  let t62;
10095
10089
  if ($[14] !== collection || $[15] !== context || $[16] !== path) {
@@ -10213,27 +10207,28 @@ function NavigationChip(t0) {
10213
10207
  } else {
10214
10208
  t3 = $[9];
10215
10209
  }
10216
- let t4;
10217
- if ($[10] !== favourite || $[11] !== onIconClick) {
10218
- t4 = favourite ? /* @__PURE__ */ jsx(StarIcon, { onClick: onIconClick, size: 18, className: "text-secondary" }) : /* @__PURE__ */ jsx(StarBorderIcon, { onClick: onIconClick, size: 18, className: "text-surface-400 dark:text-surface-500" });
10219
- $[10] = favourite;
10220
- $[11] = onIconClick;
10221
- $[12] = t4;
10210
+ const t4 = favourite ? "text-secondary" : "text-surface-400 dark:text-surface-500";
10211
+ let t5;
10212
+ if ($[10] !== onIconClick || $[11] !== t4) {
10213
+ t5 = /* @__PURE__ */ jsx(StarIcon, { onClick: onIconClick, size: 18, className: t4 });
10214
+ $[10] = onIconClick;
10215
+ $[11] = t4;
10216
+ $[12] = t5;
10222
10217
  } else {
10223
- t4 = $[12];
10218
+ t5 = $[12];
10224
10219
  }
10225
- let t5;
10226
- if ($[13] !== entry.name || $[14] !== entry.path || $[15] !== t3 || $[16] !== t4) {
10227
- t5 = /* @__PURE__ */ jsx(Chip, { onClick: t3, icon: t4, children: entry.name }, entry.path);
10220
+ let t6;
10221
+ if ($[13] !== entry.name || $[14] !== entry.path || $[15] !== t3 || $[16] !== t5) {
10222
+ t6 = /* @__PURE__ */ jsx(Chip, { onClick: t3, icon: t5, children: entry.name }, entry.path);
10228
10223
  $[13] = entry.name;
10229
10224
  $[14] = entry.path;
10230
10225
  $[15] = t3;
10231
- $[16] = t4;
10232
- $[17] = t5;
10226
+ $[16] = t5;
10227
+ $[17] = t6;
10233
10228
  } else {
10234
- t5 = $[17];
10229
+ t6 = $[17];
10235
10230
  }
10236
- return t5;
10231
+ return t6;
10237
10232
  }
10238
10233
  function FavouritesView(t0) {
10239
10234
  const $ = c(17);
@@ -11577,7 +11572,7 @@ function EntityEditViewInner({
11577
11572
  return /* @__PURE__ */ jsxs("div", { children: [
11578
11573
  /* @__PURE__ */ jsx(LabelWithIconAndTooltip, { propertyKey: key_0, icon: /* @__PURE__ */ jsx(NotesIcon, { size: "small" }), title: additionalField.name, className: "text-text-secondary dark:text-text-secondary-dark ml-3.5" }),
11579
11574
  /* @__PURE__ */ jsx("div", { className: cls(paperMixin, "min-h-14 p-4 md:p-6 overflow-x-scroll no-scrollbar"), children: /* @__PURE__ */ jsx(ErrorBoundary, { children: child }) })
11580
- ] });
11575
+ ] }, `additional_${key_0}`);
11581
11576
  }
11582
11577
  console.warn(`Property ${key_0} not found in collection ${resolvedCollection.name} in properties or additional fields. Skipping.`);
11583
11578
  return null;
@@ -11990,7 +11985,7 @@ function PopupFormFieldInternal({
11990
11985
  }, children: /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: (event) => {
11991
11986
  event.stopPropagation();
11992
11987
  onClose();
11993
- }, children: /* @__PURE__ */ jsx(ClearIcon, { className: "text-white", size: "small" }) }) })
11988
+ }, children: /* @__PURE__ */ jsx(CloseIcon, { className: "text-white", size: "small" }) }) })
11994
11989
  ] })
11995
11990
  ] }, `draggable_${propertyKey}_${entityId}_${open}`);
11996
11991
  return /* @__PURE__ */ jsx(Portal.Root, { asChild: true, container, children: /* @__PURE__ */ jsx(Formex, { value: formex, children: draggable }) });
@@ -13748,6 +13743,7 @@ function useBuildNavigationController(props) {
13748
13743
  let shouldUpdateTopLevelNav = false;
13749
13744
  if (!areCollectionListsEqual(collectionsRef.current ?? [], resolvedCollections)) {
13750
13745
  collectionsRef.current = resolvedCollections;
13746
+ console.log("Collections have changed", resolvedCollections);
13751
13747
  shouldUpdateTopLevelNav = true;
13752
13748
  }
13753
13749
  if (collectionsRef.current === void 0) {
@@ -15871,7 +15867,7 @@ function _temp$8(t0) {
15871
15867
  return /* @__PURE__ */ jsxs("div", { className: cls(defaultBorderMixin, "last:border-b-0 border-b"), children: [
15872
15868
  /* @__PURE__ */ jsxs("div", { className: "flex flex-row pt-0.5 pb-0.5 gap-2", children: [
15873
15869
  /* @__PURE__ */ jsx("div", { className: "min-w-[140px] w-[25%] py-1", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-mono break-words", color: "secondary", children: key }) }, `table-cell-title-${key}-${key}`),
15874
- /* @__PURE__ */ jsx("div", { className: "flex-grow max-w-[75%]", children: childValue && "toString" in childValue && /* @__PURE__ */ jsx(Typography, { children: /* @__PURE__ */ jsx(ErrorBoundary, { children: childValue.toString() }) }) })
15870
+ /* @__PURE__ */ jsx("div", { className: "flex-grow max-w-[75%]", children: childValue && /* @__PURE__ */ jsx(Typography, { children: /* @__PURE__ */ jsx(ErrorBoundary, { children: childValue.toString() }) }) })
15875
15871
  ] }),
15876
15872
  typeof childValue === "object" && /* @__PURE__ */ jsx("div", { className: cls(defaultBorderMixin, "border-l pl-4"), children: /* @__PURE__ */ jsx(KeyValuePreview, { value: childValue }) })
15877
15873
  ] }, `map_preview_table_${key}}`);
@@ -16484,7 +16480,7 @@ function SelectFieldBinding(t0) {
16484
16480
  }
16485
16481
  let t13;
16486
16482
  if ($[20] !== handleClearClick || $[21] !== property.clearable) {
16487
- t13 = property.clearable && /* @__PURE__ */ jsx(IconButton, { onClick: handleClearClick, children: /* @__PURE__ */ jsx(ClearIcon, {}) });
16483
+ t13 = property.clearable && /* @__PURE__ */ jsx(IconButton, { onClick: handleClearClick, children: /* @__PURE__ */ jsx(CloseIcon, {}) });
16488
16484
  $[20] = handleClearClick;
16489
16485
  $[21] = property.clearable;
16490
16486
  $[22] = t13;
@@ -17329,7 +17325,7 @@ function TextFieldBinding(t0) {
17329
17325
  const t7 = inputType;
17330
17326
  let t8;
17331
17327
  if ($[18] !== handleClearClick || $[19] !== property.clearable) {
17332
- t8 = property.clearable && /* @__PURE__ */ jsx(IconButton, { onClick: handleClearClick, children: /* @__PURE__ */ jsx(ClearIcon, {}) });
17328
+ t8 = property.clearable && /* @__PURE__ */ jsx(IconButton, { onClick: handleClearClick, children: /* @__PURE__ */ jsx(CloseIcon, {}) });
17333
17329
  $[18] = handleClearClick;
17334
17330
  $[19] = property.clearable;
17335
17331
  $[20] = t8;
@@ -19883,7 +19879,7 @@ const DEFAULT_FIELD_CONFIGS = {
19883
19879
  key: "email",
19884
19880
  name: "Email",
19885
19881
  description: "Text with email validation",
19886
- Icon: EmailIcon,
19882
+ Icon: MailIcon,
19887
19883
  color: "#154fb3",
19888
19884
  property: {
19889
19885
  dataType: "string",
@@ -22383,7 +22379,7 @@ function DrawerLogo(t0) {
22383
22379
  }
22384
22380
  let t4;
22385
22381
  if ($[3] !== drawerOpen || $[4] !== logo) {
22386
- t4 = logo ? /* @__PURE__ */ jsx("img", { src: logo, alt: "Logo", className: cls("max-w-full max-h-full", drawerOpen ?? "w-[112px] h-[112px]") }) : /* @__PURE__ */ jsx(FireCMSLogo, {});
22382
+ t4 = logo ? /* @__PURE__ */ jsx("img", { src: logo, alt: "Logo", className: cls("max-w-full max-h-full transition-all", drawerOpen ? "w-[96px] h-[96px]" : "w-[32px] h-[32px]") }) : /* @__PURE__ */ jsx(FireCMSLogo, {});
22387
22383
  $[3] = drawerOpen;
22388
22384
  $[4] = logo;
22389
22385
  $[5] = t4;