@firecms/core 3.5.2-canary.c5764a3 → 3.5.2

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.
Files changed (51) hide show
  1. package/dist/components/EntityCollectionView/CollectionCountBadge.d.ts +8 -0
  2. package/dist/components/EntityCollectionView/CollectionPathTitle.d.ts +24 -0
  3. package/dist/components/EntityCollectionView/EntityCollectionView.d.ts +5 -0
  4. package/dist/components/EntityCollectionView/EntityIdHeaderWidget.d.ts +12 -0
  5. package/dist/components/EntityCollectionView/utils.d.ts +4 -3
  6. package/dist/{de-CUF9f7S-.js → de-CNfJQcnh.js} +1 -1
  7. package/dist/{de-CUF9f7S-.js.map → de-CNfJQcnh.js.map} +1 -1
  8. package/dist/{editor-WZytSO_1.js → editor-D0A5yaaJ.js} +1 -1
  9. package/dist/{editor-WZytSO_1.js.map → editor-D0A5yaaJ.js.map} +1 -1
  10. package/dist/{fr-DmkMX6hp.js → fr-CBtSvDVp.js} +1 -1
  11. package/dist/{fr-DmkMX6hp.js.map → fr-CBtSvDVp.js.map} +1 -1
  12. package/dist/{hi-BKuaMr7w.js → hi-Delc4l61.js} +1 -1
  13. package/dist/{hi-BKuaMr7w.js.map → hi-Delc4l61.js.map} +1 -1
  14. package/dist/index.es.js +624 -579
  15. package/dist/index.es.js.map +1 -1
  16. package/dist/index.umd.js +616 -571
  17. package/dist/index.umd.js.map +1 -1
  18. package/dist/internal/useLeavePageConfirmation.d.ts +11 -0
  19. package/dist/{it-BwQflFGz.js → it-CdsoaRVO.js} +1 -1
  20. package/dist/{it-BwQflFGz.js.map → it-CdsoaRVO.js.map} +1 -1
  21. package/dist/{pl-BPsAvZvc.js → pl-DoTvWcwp.js} +1 -1
  22. package/dist/{pl-BPsAvZvc.js.map → pl-DoTvWcwp.js.map} +1 -1
  23. package/dist/preview/components/__tests__/DatePreview.test.d.ts +1 -0
  24. package/dist/{pt-D5q7OQp1.js → pt-DCfk8Nkq.js} +1 -1
  25. package/dist/{pt-D5q7OQp1.js.map → pt-DCfk8Nkq.js.map} +1 -1
  26. package/dist/types/locales.d.ts +1 -1
  27. package/dist/types/side_dialogs_controller.d.ts +4 -2
  28. package/dist/util/__tests__/locales.test.d.ts +1 -0
  29. package/dist/util/date_fns_locales.d.ts +13 -0
  30. package/package.json +3 -3
  31. package/src/components/EntityCollectionView/CollectionCountBadge.tsx +17 -0
  32. package/src/components/EntityCollectionView/CollectionPathTitle.tsx +68 -0
  33. package/src/components/EntityCollectionView/EntityCollectionView.tsx +12 -111
  34. package/src/components/EntityCollectionView/EntityIdHeaderWidget.tsx +166 -0
  35. package/src/components/EntityCollectionView/utils.ts +13 -7
  36. package/src/components/common/default_entity_actions.tsx +2 -1
  37. package/src/core/DefaultAppBar.tsx +12 -9
  38. package/src/core/EntityEditView.tsx +26 -1
  39. package/src/core/SideDialogs.tsx +6 -13
  40. package/src/form/field_bindings/BlockFieldBinding.tsx +2 -1
  41. package/src/hooks/useReferenceDialog.tsx +2 -2
  42. package/src/internal/useBuildSideDialogsController.tsx +44 -2
  43. package/src/internal/useLeavePageConfirmation.ts +25 -0
  44. package/src/preview/components/DatePreview.tsx +14 -2
  45. package/src/preview/components/__tests__/DatePreview.test.tsx +39 -0
  46. package/src/types/locales.ts +2 -0
  47. package/src/types/side_dialogs_controller.tsx +4 -2
  48. package/src/util/__tests__/locales.test.ts +46 -0
  49. package/src/util/date_fns_locales.ts +28 -0
  50. package/dist/internal/useUnsavedChangesDialog.d.ts +0 -12
  51. package/src/internal/useUnsavedChangesDialog.tsx +0 -142
package/dist/index.es.js CHANGED
@@ -4805,7 +4805,7 @@ function getLoadedDateFnsLocale(locale) {
4805
4805
  }
4806
4806
  function useDateFnsLocale(locale) {
4807
4807
  const $ = c(7);
4808
- const [, forceUpdate] = useReducer(_temp$A, 0);
4808
+ const [, forceUpdate] = useReducer(_temp$C, 0);
4809
4809
  let t0;
4810
4810
  if ($[0] !== forceUpdate || $[1] !== locale) {
4811
4811
  t0 = () => {
@@ -4848,9 +4848,19 @@ function useDateFnsLocale(locale) {
4848
4848
  }
4849
4849
  return t2;
4850
4850
  }
4851
- function _temp$A(count) {
4851
+ function _temp$C(count) {
4852
4852
  return count + 1;
4853
4853
  }
4854
+ const supportedLocales = new Map([...Object.keys(loaders), "en", "fil"].map((locale) => [locale.toLowerCase(), locale]));
4855
+ function resolveLocale(value) {
4856
+ if (typeof value !== "string") return void 0;
4857
+ const parts = value.trim().split(/[-_\s]+/).filter(Boolean);
4858
+ if (parts.length === 0) return void 0;
4859
+ return supportedLocales.get(parts.join("").toLowerCase()) ?? supportedLocales.get(parts[0].toLowerCase());
4860
+ }
4861
+ function localeToLanguageTag(locale) {
4862
+ return locale.replace(/^([a-z]{2,3})([A-Z][A-Za-z]+)$/, "$1-$2");
4863
+ }
4854
4864
  const CONTAINER_FULL_WIDTH = "100vw";
4855
4865
  const ADDITIONAL_TAB_WIDTH = "55vw";
4856
4866
  const FORM_CONTAINER_WIDTH = "768px";
@@ -5065,7 +5075,7 @@ function useCollectionFetch(t0) {
5065
5075
  }
5066
5076
  setDataLoading(false);
5067
5077
  setDataLoadingError(void 0);
5068
- setData(entities.map(_temp$z));
5078
+ setData(entities.map(_temp$B));
5069
5079
  setNoMoreToLoad(!itemCount || entities.length < itemCount);
5070
5080
  };
5071
5081
  const onError = (error) => {
@@ -5100,7 +5110,7 @@ function useCollectionFetch(t0) {
5100
5110
  orderBy: sortByProperty,
5101
5111
  order: currentSort
5102
5112
  }).then(onEntitiesUpdate).catch(onError);
5103
- return _temp2$g;
5113
+ return _temp2$h;
5104
5114
  }
5105
5115
  };
5106
5116
  $[8] = collection;
@@ -5149,9 +5159,9 @@ function useCollectionFetch(t0) {
5149
5159
  }
5150
5160
  return t6;
5151
5161
  }
5152
- function _temp2$g() {
5162
+ function _temp2$h() {
5153
5163
  }
5154
- function _temp$z(e_1) {
5164
+ function _temp$B(e_1) {
5155
5165
  return {
5156
5166
  ...e_1
5157
5167
  };
@@ -5364,7 +5374,7 @@ function useEntityFetch(t0) {
5364
5374
  setEntity(CACHE[entityCacheKey(path, entityId)]);
5365
5375
  setDataLoading(false);
5366
5376
  setDataLoadingError(void 0);
5367
- return _temp$y;
5377
+ return _temp$A;
5368
5378
  } else {
5369
5379
  if (entityId && path && collection) {
5370
5380
  if (dataSource.listenEntity) {
@@ -5385,7 +5395,7 @@ function useEntityFetch(t0) {
5385
5395
  databaseId,
5386
5396
  collection
5387
5397
  }).then(onEntityUpdate).catch(onError);
5388
- return _temp2$f;
5398
+ return _temp2$g;
5389
5399
  }
5390
5400
  } else {
5391
5401
  onEntityUpdate(void 0);
@@ -5433,9 +5443,9 @@ function useEntityFetch(t0) {
5433
5443
  }
5434
5444
  function _temp3$6() {
5435
5445
  }
5436
- function _temp2$f() {
5446
+ function _temp2$g() {
5437
5447
  }
5438
- function _temp$y() {
5448
+ function _temp$A() {
5439
5449
  }
5440
5450
  async function saveEntityWithCallbacks({
5441
5451
  collection,
@@ -6090,7 +6100,7 @@ function ImagePreview(t0) {
6090
6100
  }
6091
6101
  let t9;
6092
6102
  if ($[19] !== url) {
6093
- t9 = /* @__PURE__ */ jsx(Tooltip, { title: "Open image in new tab", side: "bottom", children: /* @__PURE__ */ jsx(IconButton, { className: "invisible group-hover:visible", variant: "filled", component: "a", href: url, rel: "noopener noreferrer", target: "_blank", size: "smallest", onClick: _temp$x, children: t8 }) });
6103
+ t9 = /* @__PURE__ */ jsx(Tooltip, { title: "Open image in new tab", side: "bottom", children: /* @__PURE__ */ jsx(IconButton, { className: "invisible group-hover:visible", variant: "filled", component: "a", href: url, rel: "noopener noreferrer", target: "_blank", size: "smallest", onClick: _temp$z, children: t8 }) });
6094
6104
  $[19] = url;
6095
6105
  $[20] = t9;
6096
6106
  } else {
@@ -6124,7 +6134,7 @@ function ImagePreview(t0) {
6124
6134
  }
6125
6135
  return t11;
6126
6136
  }
6127
- function _temp$x(e_0) {
6137
+ function _temp$z(e_0) {
6128
6138
  return e_0.stopPropagation();
6129
6139
  }
6130
6140
  const FIRECMS_NS$1 = "firecms_core";
@@ -6191,7 +6201,7 @@ function UrlComponentPreview(t0) {
6191
6201
  }
6192
6202
  let t3;
6193
6203
  if ($[2] !== url) {
6194
- t3 = /* @__PURE__ */ jsxs("a", { className: "flex gap-4 break-words items-center font-medium text-primary visited:text-primary dark:visited:text-primary dark:text-primary", href: url, rel: "noopener noreferrer", onMouseDown: _temp$w, target: "_blank", children: [
6204
+ t3 = /* @__PURE__ */ jsxs("a", { className: "flex gap-4 break-words items-center font-medium text-primary visited:text-primary dark:visited:text-primary dark:text-primary", href: url, rel: "noopener noreferrer", onMouseDown: _temp$y, target: "_blank", children: [
6195
6205
  t2,
6196
6206
  url
6197
6207
  ] });
@@ -6293,7 +6303,7 @@ function UrlComponentPreview(t0) {
6293
6303
  }
6294
6304
  let t7;
6295
6305
  if ($[27] !== t4 || $[28] !== t6 || $[29] !== url) {
6296
- t7 = /* @__PURE__ */ jsxs("a", { href: url, rel: "noopener noreferrer", target: "_blank", onClick: _temp2$e, className: "flex flex-col items-center justify-center", style: t4, children: [
6306
+ t7 = /* @__PURE__ */ jsxs("a", { href: url, rel: "noopener noreferrer", target: "_blank", onClick: _temp2$f, className: "flex flex-col items-center justify-center", style: t4, children: [
6297
6307
  t5,
6298
6308
  t6
6299
6309
  ] });
@@ -6318,10 +6328,10 @@ function UrlComponentPreview(t0) {
6318
6328
  }
6319
6329
  }
6320
6330
  }
6321
- function _temp2$e(e_0) {
6331
+ function _temp2$f(e_0) {
6322
6332
  return e_0.stopPropagation();
6323
6333
  }
6324
- function _temp$w(e) {
6334
+ function _temp$y(e) {
6325
6335
  e.preventDefault();
6326
6336
  }
6327
6337
  function VideoPreview(t0) {
@@ -6455,7 +6465,7 @@ function SkeletonPropertyComponent(t0) {
6455
6465
  if (Array.isArray(arrayProperty.of)) {
6456
6466
  let t1;
6457
6467
  if ($[6] !== arrayProperty.of) {
6458
- t1 = arrayProperty.of.map(_temp$v);
6468
+ t1 = arrayProperty.of.map(_temp$x);
6459
6469
  $[6] = arrayProperty.of;
6460
6470
  $[7] = t1;
6461
6471
  } else {
@@ -6593,7 +6603,7 @@ function SkeletonPropertyComponent(t0) {
6593
6603
  }
6594
6604
  return content || null;
6595
6605
  }
6596
- function _temp$v(p, i) {
6606
+ function _temp$x(p, i) {
6597
6607
  return renderGenericArrayCell(p, i);
6598
6608
  }
6599
6609
  function renderMap(property, size) {
@@ -7733,6 +7743,13 @@ function ArrayOneOfPreview(t0) {
7733
7743
  }
7734
7744
  return t3;
7735
7745
  }
7746
+ function dateTimeFormat(locale, options) {
7747
+ try {
7748
+ return new Intl.DateTimeFormat(locale ? localeToLanguageTag(locale) : "en-US", options);
7749
+ } catch {
7750
+ return new Intl.DateTimeFormat("en-US", options);
7751
+ }
7752
+ }
7736
7753
  function DatePreview(t0) {
7737
7754
  const $ = c(22);
7738
7755
  const {
@@ -7766,7 +7783,7 @@ function DatePreview(t0) {
7766
7783
  options.hour = "2-digit";
7767
7784
  options.minute = "2-digit";
7768
7785
  }
7769
- const formatter = new Intl.DateTimeFormat(customizationController?.locale ?? "en-US", options);
7786
+ const formatter = dateTimeFormat(customizationController?.locale, options);
7770
7787
  t22 = formatter.format(date);
7771
7788
  $[1] = customizationController?.locale;
7772
7789
  $[2] = date;
@@ -7784,7 +7801,7 @@ function DatePreview(t0) {
7784
7801
  timeZoneName: "short"
7785
7802
  });
7786
7803
  const parts = tzFormatter.formatToParts(date);
7787
- t32 = parts.find(_temp$u)?.value ?? "";
7804
+ t32 = parts.find(_temp$w)?.value ?? "";
7788
7805
  $[6] = date;
7789
7806
  $[7] = timezone;
7790
7807
  $[8] = t32;
@@ -7855,7 +7872,7 @@ function DatePreview(t0) {
7855
7872
  }
7856
7873
  return t3;
7857
7874
  }
7858
- function _temp$u(p) {
7875
+ function _temp$w(p) {
7859
7876
  return p.type === "timeZoneName";
7860
7877
  }
7861
7878
  function MapPropertyPreview(t0) {
@@ -7950,7 +7967,7 @@ function KeyValuePreview(t0) {
7950
7967
  }
7951
7968
  let t1;
7952
7969
  if ($[1] !== value) {
7953
- t1 = Object.entries(value).map(_temp$t);
7970
+ t1 = Object.entries(value).map(_temp$v);
7954
7971
  $[1] = value;
7955
7972
  $[2] = t1;
7956
7973
  } else {
@@ -7966,7 +7983,7 @@ function KeyValuePreview(t0) {
7966
7983
  }
7967
7984
  return t2;
7968
7985
  }
7969
- function _temp$t(t0) {
7986
+ function _temp$v(t0) {
7970
7987
  const [key, childValue] = t0;
7971
7988
  const isTimestampObj = childValue && typeof childValue === "object" && (childValue instanceof Date || "_seconds" in childValue && "_nanoseconds" in childValue && typeof childValue._seconds === "number" && typeof childValue._nanoseconds === "number" || "seconds" in childValue && "nanoseconds" in childValue && typeof childValue.seconds === "number" && typeof childValue.nanoseconds === "number");
7972
7989
  const isScalar = childValue && (typeof childValue !== "object" || isTimestampObj);
@@ -9289,7 +9306,7 @@ function VirtualTableSelect(props) {
9289
9306
  console.trace("onChange");
9290
9307
  if (valueType === "number") {
9291
9308
  if (multiple) {
9292
- const newValue = updatedValue.map(_temp$s);
9309
+ const newValue = updatedValue.map(_temp$u);
9293
9310
  updateValue(newValue);
9294
9311
  } else {
9295
9312
  updateValue(parseFloat(updatedValue));
@@ -9342,7 +9359,7 @@ function VirtualTableSelect(props) {
9342
9359
  const handleOpenChange = t4;
9343
9360
  let t5;
9344
9361
  if ($[11] !== disabled || $[12] !== enumValues || $[13] !== internalValue || $[14] !== multiple || $[15] !== onChange || $[16] !== renderValue || $[17] !== small || $[18] !== validValue) {
9345
- t5 = multiple ? /* @__PURE__ */ jsx(MultiSelect, { inputRef: ref, className: "w-full h-full p-0 bg-transparent outline-none", position: "item-aligned", disabled, includeClear: false, useChips: false, value: validValue ? internalValue.map(_temp2$d) : [], onValueChange: onChange, onOpenChange: handleOpenChange, children: enumValues?.map((enumConfig) => /* @__PURE__ */ jsx(MultiSelectItem, { value: String(enumConfig.id), children: /* @__PURE__ */ jsx(EnumValuesChip, { enumKey: enumConfig.id, enumValues, size: small ? "small" : "medium" }) }, enumConfig.id)) }) : /* @__PURE__ */ jsx(Select, { inputRef: ref, size: "large", fullWidth: true, className: "w-full h-full p-0 bg-transparent outline-none [&_button]:ring-0 [&_button]:ring-offset-0", inputClassName: "ring-0 ring-offset-0 focus:ring-0 focus-visible:ring-0 outline-none focus:outline-none focus-visible:outline-none focus-visible:ring-offset-0", position: "item-aligned", disabled, padding: false, value: validValue ? internalValue?.toString() : "", onValueChange: onChange, onOpenChange: handleOpenChange, renderValue, children: enumValues?.map((enumConfig_0) => /* @__PURE__ */ jsx(SelectItem, { value: String(enumConfig_0.id), children: /* @__PURE__ */ jsx(EnumValuesChip, { enumKey: enumConfig_0.id, enumValues, size: small ? "small" : "medium" }) }, enumConfig_0.id)) });
9362
+ t5 = multiple ? /* @__PURE__ */ jsx(MultiSelect, { inputRef: ref, className: "w-full h-full p-0 bg-transparent outline-none", position: "item-aligned", disabled, includeClear: false, useChips: false, value: validValue ? internalValue.map(_temp2$e) : [], onValueChange: onChange, onOpenChange: handleOpenChange, children: enumValues?.map((enumConfig) => /* @__PURE__ */ jsx(MultiSelectItem, { value: String(enumConfig.id), children: /* @__PURE__ */ jsx(EnumValuesChip, { enumKey: enumConfig.id, enumValues, size: small ? "small" : "medium" }) }, enumConfig.id)) }) : /* @__PURE__ */ jsx(Select, { inputRef: ref, size: "large", fullWidth: true, className: "w-full h-full p-0 bg-transparent outline-none [&_button]:ring-0 [&_button]:ring-offset-0", inputClassName: "ring-0 ring-offset-0 focus:ring-0 focus-visible:ring-0 outline-none focus:outline-none focus-visible:outline-none focus-visible:ring-offset-0", position: "item-aligned", disabled, padding: false, value: validValue ? internalValue?.toString() : "", onValueChange: onChange, onOpenChange: handleOpenChange, renderValue, children: enumValues?.map((enumConfig_0) => /* @__PURE__ */ jsx(SelectItem, { value: String(enumConfig_0.id), children: /* @__PURE__ */ jsx(EnumValuesChip, { enumKey: enumConfig_0.id, enumValues, size: small ? "small" : "medium" }) }, enumConfig_0.id)) });
9346
9363
  $[11] = disabled;
9347
9364
  $[12] = enumValues;
9348
9365
  $[13] = internalValue;
@@ -9357,10 +9374,10 @@ function VirtualTableSelect(props) {
9357
9374
  }
9358
9375
  return t5;
9359
9376
  }
9360
- function _temp2$d(v_0) {
9377
+ function _temp2$e(v_0) {
9361
9378
  return v_0.toString();
9362
9379
  }
9363
- function _temp$s(v) {
9380
+ function _temp$u(v) {
9364
9381
  return parseFloat(v);
9365
9382
  }
9366
9383
  function VirtualTableNumberInput(props) {
@@ -9556,7 +9573,7 @@ function VirtualTableUserSelect(props) {
9556
9573
  const renderValue = t3;
9557
9574
  let t4;
9558
9575
  if ($[7] !== disabled || $[8] !== internalValue || $[9] !== multiple || $[10] !== onChange || $[11] !== renderValue || $[12] !== users || $[13] !== validValue) {
9559
- t4 = multiple ? /* @__PURE__ */ jsx(MultiSelect, { inputRef: ref, className: "w-full h-full p-0 bg-transparent", position: "item-aligned", disabled, includeClear: false, useChips: false, value: validValue ? internalValue : [], onValueChange: onChange, children: users?.map(_temp$r) }) : /* @__PURE__ */ jsx(Select, { inputRef: ref, size: "large", fullWidth: true, className: "w-full h-full p-0 bg-transparent", position: "item-aligned", disabled, padding: false, value: validValue ? internalValue : "", onValueChange: onChange, renderValue, children: users?.map(_temp2$c) });
9576
+ t4 = multiple ? /* @__PURE__ */ jsx(MultiSelect, { inputRef: ref, className: "w-full h-full p-0 bg-transparent", position: "item-aligned", disabled, includeClear: false, useChips: false, value: validValue ? internalValue : [], onValueChange: onChange, children: users?.map(_temp$t) }) : /* @__PURE__ */ jsx(Select, { inputRef: ref, size: "large", fullWidth: true, className: "w-full h-full p-0 bg-transparent", position: "item-aligned", disabled, padding: false, value: validValue ? internalValue : "", onValueChange: onChange, renderValue, children: users?.map(_temp2$d) });
9560
9577
  $[7] = disabled;
9561
9578
  $[8] = internalValue;
9562
9579
  $[9] = multiple;
@@ -9570,10 +9587,10 @@ function VirtualTableUserSelect(props) {
9570
9587
  }
9571
9588
  return t4;
9572
9589
  }
9573
- function _temp2$c(user_1) {
9590
+ function _temp2$d(user_1) {
9574
9591
  return /* @__PURE__ */ jsx(SelectItem, { value: user_1.uid, children: /* @__PURE__ */ jsx(UserDisplay, { user: user_1 }) }, user_1.uid);
9575
9592
  }
9576
- function _temp$r(user_0) {
9593
+ function _temp$t(user_0) {
9577
9594
  return /* @__PURE__ */ jsx(MultiSelectItem, { value: user_0.uid, children: /* @__PURE__ */ jsx(UserDisplay, { user: user_0 }) }, user_0.uid);
9578
9595
  }
9579
9596
  class ErrorBoundary extends React__default.Component {
@@ -9821,7 +9838,7 @@ function useStorageUploadController(t0) {
9821
9838
  newValue = [...internalValue];
9822
9839
  newValue = removeDuplicates(newValue);
9823
9840
  setInternalValue(newValue);
9824
- const fieldValue = newValue.filter(_temp$q).map(_temp2$b);
9841
+ const fieldValue = newValue.filter(_temp$s).map(_temp2$c);
9825
9842
  if (multipleFilesSupported) {
9826
9843
  onChange(fieldValue);
9827
9844
  } else {
@@ -9939,10 +9956,10 @@ function useStorageUploadController(t0) {
9939
9956
  }
9940
9957
  return t11;
9941
9958
  }
9942
- function _temp2$b(e_0) {
9959
+ function _temp2$c(e_0) {
9943
9960
  return e_0.storagePathOrDownloadUrl;
9944
9961
  }
9945
- function _temp$q(e) {
9962
+ function _temp$s(e) {
9946
9963
  return !!e.storagePathOrDownloadUrl;
9947
9964
  }
9948
9965
  function getInternalInitialValue(multipleFilesSupported, value, metadata, size) {
@@ -10233,7 +10250,7 @@ function StorageUpload$1(t0) {
10233
10250
  const snackbarContext = useSnackbarController();
10234
10251
  let t1;
10235
10252
  if ($[0] !== storage.acceptedFiles) {
10236
- t1 = storage.acceptedFiles ? storage.acceptedFiles.map(_temp$p).reduce(_temp2$a, {}) : void 0;
10253
+ t1 = storage.acceptedFiles ? storage.acceptedFiles.map(_temp$r).reduce(_temp2$b, {}) : void 0;
10237
10254
  $[0] = storage.acceptedFiles;
10238
10255
  $[1] = t1;
10239
10256
  } else {
@@ -10456,13 +10473,13 @@ function StorageUpload$1(t0) {
10456
10473
  }
10457
10474
  return t20;
10458
10475
  }
10459
- function _temp2$a(a, b) {
10476
+ function _temp2$b(a, b) {
10460
10477
  return {
10461
10478
  ...a,
10462
10479
  ...b
10463
10480
  };
10464
10481
  }
10465
- function _temp$p(e) {
10482
+ function _temp$r(e) {
10466
10483
  return {
10467
10484
  [e]: []
10468
10485
  };
@@ -10572,7 +10589,7 @@ const TableReferenceFieldInternal = React__default.memo(function TableReferenceF
10572
10589
  let t1;
10573
10590
  if ($[2] !== updateValue) {
10574
10591
  t1 = (entities) => {
10575
- updateValue(entities.filter(Boolean).map(_temp$o));
10592
+ updateValue(entities.filter(Boolean).map(_temp$q));
10576
10593
  };
10577
10594
  $[2] = updateValue;
10578
10595
  $[3] = t1;
@@ -10582,7 +10599,7 @@ const TableReferenceFieldInternal = React__default.memo(function TableReferenceF
10582
10599
  const onMultipleEntitiesSelected = t1;
10583
10600
  let t2;
10584
10601
  if ($[4] !== internalValue) {
10585
- t2 = internalValue ? Array.isArray(internalValue) ? internalValue.map(_temp2$9) : internalValue.id ? [internalValue.id] : [] : [];
10602
+ t2 = internalValue ? Array.isArray(internalValue) ? internalValue.map(_temp2$a) : internalValue.id ? [internalValue.id] : [] : [];
10586
10603
  $[4] = internalValue;
10587
10604
  $[5] = t2;
10588
10605
  } else {
@@ -10744,10 +10761,10 @@ const TableReferenceFieldInternal = React__default.memo(function TableReferenceF
10744
10761
  }
10745
10762
  return t10;
10746
10763
  }, equal);
10747
- function _temp$o(e) {
10764
+ function _temp$q(e) {
10748
10765
  return getReferenceFrom(e);
10749
10766
  }
10750
- function _temp2$9(ref) {
10767
+ function _temp2$a(ref) {
10751
10768
  return ref.id;
10752
10769
  }
10753
10770
  yup.addMethod(yup.array, "uniqueInArray", function(mapper = (a) => a, message) {
@@ -12402,7 +12419,7 @@ function StorageItemPreview(t0) {
12402
12419
  }
12403
12420
  let t5;
12404
12421
  if ($[15] !== placeholder) {
12405
- t5 = placeholder && /* @__PURE__ */ jsx("div", { onClick: _temp$n, className: "flex flex-col items-center justify-center w-full h-full", children: /* @__PURE__ */ jsx(DescriptionIcon, { className: "text-surface-700 dark:text-surface-300" }) });
12422
+ t5 = placeholder && /* @__PURE__ */ jsx("div", { onClick: _temp$p, className: "flex flex-col items-center justify-center w-full h-full", children: /* @__PURE__ */ jsx(DescriptionIcon, { className: "text-surface-700 dark:text-surface-300" }) });
12406
12423
  $[15] = placeholder;
12407
12424
  $[16] = t5;
12408
12425
  } else {
@@ -12425,7 +12442,7 @@ function StorageItemPreview(t0) {
12425
12442
  }
12426
12443
  return t6;
12427
12444
  }
12428
- function _temp$n(e) {
12445
+ function _temp$p(e) {
12429
12446
  return e.stopPropagation();
12430
12447
  }
12431
12448
  const dropZoneClasses = "box-border relative pt-[2px] items-center border border-transparent min-h-[254px] outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid";
@@ -12653,7 +12670,7 @@ function SortableStorageItem(t0) {
12653
12670
  t4 = $[7];
12654
12671
  }
12655
12672
  const style = t4;
12656
- const getImageSizeNumber = _temp$m;
12673
+ const getImageSizeNumber = _temp$o;
12657
12674
  let child;
12658
12675
  if (entry.storagePathOrDownloadUrl) {
12659
12676
  const t52 = `storage_preview_${entry.storagePathOrDownloadUrl}`;
@@ -12728,7 +12745,7 @@ function SortableStorageItem(t0) {
12728
12745
  }
12729
12746
  return t6;
12730
12747
  }
12731
- function _temp$m(previewSize) {
12748
+ function _temp$o(previewSize) {
12732
12749
  switch (previewSize) {
12733
12750
  case "small": {
12734
12751
  return 40;
@@ -12765,7 +12782,7 @@ function FileDropComponent(t0) {
12765
12782
  const snackbarContext = useSnackbarController();
12766
12783
  let t1;
12767
12784
  if ($[0] !== storage.acceptedFiles) {
12768
- t1 = storage.acceptedFiles ? storage.acceptedFiles.reduce(_temp2$8, {}) : void 0;
12785
+ t1 = storage.acceptedFiles ? storage.acceptedFiles.reduce(_temp2$9, {}) : void 0;
12769
12786
  $[0] = storage.acceptedFiles;
12770
12787
  $[1] = t1;
12771
12788
  } else {
@@ -12958,7 +12975,7 @@ function FileDropComponent(t0) {
12958
12975
  }
12959
12976
  return t21;
12960
12977
  }
12961
- function _temp2$8(acc, ext) {
12978
+ function _temp2$9(acc, ext) {
12962
12979
  return {
12963
12980
  ...acc,
12964
12981
  [ext]: []
@@ -14501,7 +14518,7 @@ function MapFieldBinding(t0) {
14501
14518
  } else {
14502
14519
  t42 = $[20];
14503
14520
  }
14504
- t3 = Object.entries(mapProperties).filter(_temp$l).map(t42);
14521
+ t3 = Object.entries(mapProperties).filter(_temp$n).map(t42);
14505
14522
  $[6] = autoFocus;
14506
14523
  $[7] = context;
14507
14524
  $[8] = disabled;
@@ -14580,7 +14597,7 @@ function MapFieldBinding(t0) {
14580
14597
  }
14581
14598
  return t10;
14582
14599
  }
14583
- function _temp$l(t0) {
14600
+ function _temp$n(t0) {
14584
14601
  const [, property_0] = t0;
14585
14602
  return !isHidden(property_0);
14586
14603
  }
@@ -15875,10 +15892,11 @@ function BlockFieldBinding({
15875
15892
  setValue(null);
15876
15893
  }, children: /* @__PURE__ */ jsx(CloseIcon, { size: "small" }) })
15877
15894
  ] });
15895
+ const canAddElements = !property.disabled && !isSubmitting && !disabled && (property.canAddElements ?? true);
15878
15896
  const firstOneOfKey = Object.keys(property.oneOf.properties)[0];
15879
15897
  const body = /* @__PURE__ */ jsx(ArrayContainer, { value, className: "flex flex-col gap-3", droppableId: propertyKey, addLabel: property.name ? t("add_to_field", {
15880
15898
  fieldName: property.name
15881
- }) : t("add_entry"), buildEntry, onInternalIdAdded: setLastAddedId, disabled: isSubmitting || Boolean(property.disabled), canAddElements: !property.disabled, onValueChange: (value_0) => setFieldValue(propertyKey, value_0), newDefaultEntry: {
15899
+ }) : t("add_entry"), buildEntry, onInternalIdAdded: setLastAddedId, disabled: isSubmitting || Boolean(property.disabled), canAddElements, onValueChange: (value_0) => setFieldValue(propertyKey, value_0), newDefaultEntry: {
15882
15900
  [property.oneOf.typeField ?? DEFAULT_ONE_OF_TYPE]: firstOneOfKey,
15883
15901
  [property.oneOf.valueField ?? DEFAULT_ONE_OF_VALUE]: getDefaultValueFor(property.oneOf.properties[firstOneOfKey])
15884
15902
  } });
@@ -15954,7 +15972,7 @@ function BlockEntry(t0) {
15954
15972
  const property = t4;
15955
15973
  let t5;
15956
15974
  if ($[9] !== properties) {
15957
- t5 = Object.entries(properties).map(_temp$k);
15975
+ t5 = Object.entries(properties).map(_temp$m);
15958
15976
  $[9] = properties;
15959
15977
  $[10] = t5;
15960
15978
  } else {
@@ -16047,7 +16065,7 @@ function BlockEntry(t0) {
16047
16065
  }
16048
16066
  return t11;
16049
16067
  }
16050
- function _temp$k(t0) {
16068
+ function _temp$m(t0) {
16051
16069
  const [key, property_0] = t0;
16052
16070
  return {
16053
16071
  id: key,
@@ -16100,7 +16118,7 @@ function CircularProgressCenter(t0) {
16100
16118
  }
16101
16119
  return t3;
16102
16120
  }
16103
- const FireCMSEditor$1 = lazyEager(() => import("./editor-WZytSO_1.js"), "FireCMSEditor");
16121
+ const FireCMSEditor$1 = lazyEager(() => import("./editor-D0A5yaaJ.js"), "FireCMSEditor");
16104
16122
  function MarkdownEditorFieldBinding$1({
16105
16123
  property,
16106
16124
  propertyKey,
@@ -19380,7 +19398,7 @@ const SafeLinkRenderer = (t0) => {
19380
19398
  let t1;
19381
19399
  if ($[0] !== text) {
19382
19400
  const urlRegex = /https?:\/\/[^\s]+/g;
19383
- t1 = text.replace(urlRegex, _temp$j);
19401
+ t1 = text.replace(urlRegex, _temp$l);
19384
19402
  $[0] = text;
19385
19403
  $[1] = t1;
19386
19404
  } else {
@@ -19399,7 +19417,7 @@ const SafeLinkRenderer = (t0) => {
19399
19417
  }
19400
19418
  return t2;
19401
19419
  };
19402
- function _temp$j(url) {
19420
+ function _temp$l(url) {
19403
19421
  return `<a href="${url}" class="underline" target="_blank">Link</a><br/>`;
19404
19422
  }
19405
19423
  const operationLabels$2 = {
@@ -19712,7 +19730,7 @@ function StringNumberFilterField(t0) {
19712
19730
  }
19713
19731
  let t9;
19714
19732
  if ($[24] !== possibleOperations) {
19715
- t9 = possibleOperations.map(_temp2$7);
19733
+ t9 = possibleOperations.map(_temp2$8);
19716
19734
  $[24] = possibleOperations;
19717
19735
  $[25] = t9;
19718
19736
  } else {
@@ -19720,7 +19738,7 @@ function StringNumberFilterField(t0) {
19720
19738
  }
19721
19739
  let t10;
19722
19740
  if ($[26] !== operation || $[27] !== t8 || $[28] !== t9) {
19723
- t10 = /* @__PURE__ */ jsx("div", { className: "w-[100px]", children: /* @__PURE__ */ jsx(Select, { value: operation, size: "medium", fullWidth: true, position: "item-aligned", onValueChange: t8, renderValue: _temp$i, children: t9 }) });
19741
+ t10 = /* @__PURE__ */ jsx("div", { className: "w-[100px]", children: /* @__PURE__ */ jsx(Select, { value: operation, size: "medium", fullWidth: true, position: "item-aligned", onValueChange: t8, renderValue: _temp$k, children: t9 }) });
19724
19742
  $[26] = operation;
19725
19743
  $[27] = t8;
19726
19744
  $[28] = t9;
@@ -19822,10 +19840,10 @@ function _temp4$2(v) {
19822
19840
  function _temp3$4(e_1) {
19823
19841
  return String(e_1);
19824
19842
  }
19825
- function _temp2$7(op_2) {
19843
+ function _temp2$8(op_2) {
19826
19844
  return /* @__PURE__ */ jsx(SelectItem, { value: op_2, children: operationLabels$1[op_2] }, op_2);
19827
19845
  }
19828
- function _temp$i(op_1) {
19846
+ function _temp$k(op_1) {
19829
19847
  return operationLabels$1[op_1];
19830
19848
  }
19831
19849
  function BooleanFilterField(t0) {
@@ -19988,7 +20006,7 @@ function DateTimeFilterField(t0) {
19988
20006
  }
19989
20007
  let t7;
19990
20008
  if ($[15] !== possibleOperations) {
19991
- t7 = possibleOperations.map(_temp2$6);
20009
+ t7 = possibleOperations.map(_temp2$7);
19992
20010
  $[15] = possibleOperations;
19993
20011
  $[16] = t7;
19994
20012
  } else {
@@ -19996,7 +20014,7 @@ function DateTimeFilterField(t0) {
19996
20014
  }
19997
20015
  let t8;
19998
20016
  if ($[17] !== operation || $[18] !== t6 || $[19] !== t7) {
19999
- t8 = /* @__PURE__ */ jsx("div", { className: "w-[100px]", children: /* @__PURE__ */ jsx(Select, { value: operation, size: "medium", fullWidth: true, onValueChange: t6, renderValue: _temp$h, children: t7 }) });
20017
+ t8 = /* @__PURE__ */ jsx("div", { className: "w-[100px]", children: /* @__PURE__ */ jsx(Select, { value: operation, size: "medium", fullWidth: true, onValueChange: t6, renderValue: _temp$j, children: t7 }) });
20000
20018
  $[17] = operation;
20001
20019
  $[18] = t6;
20002
20020
  $[19] = t7;
@@ -20043,10 +20061,10 @@ function DateTimeFilterField(t0) {
20043
20061
  }
20044
20062
  return t12;
20045
20063
  }
20046
- function _temp2$6(op_2) {
20064
+ function _temp2$7(op_2) {
20047
20065
  return /* @__PURE__ */ jsx(SelectItem, { value: op_2, children: operationLabels[op_2] }, op_2);
20048
20066
  }
20049
- function _temp$h(op_1) {
20067
+ function _temp$j(op_1) {
20050
20068
  return operationLabels[op_1];
20051
20069
  }
20052
20070
  const SelectableTable = function SelectableTable2({
@@ -20809,7 +20827,7 @@ function useTableSearchHelper(t0) {
20809
20827
  parentCollectionIds
20810
20828
  };
20811
20829
  const searchBlocked = customizationController.plugins?.find((p) => p.collectionView?.blockSearch?.(props));
20812
- const addTextSearchClickListener = Boolean(dataSource?.initTextSearch) || customizationController.plugins?.find(_temp$g);
20830
+ const addTextSearchClickListener = Boolean(dataSource?.initTextSearch) || customizationController.plugins?.find(_temp$i);
20813
20831
  if (addTextSearchClickListener) {
20814
20832
  onTextSearchClick = addTextSearchClickListener ? () => {
20815
20833
  setTextSearchLoading(true);
@@ -20905,7 +20923,7 @@ function useTableSearchHelper(t0) {
20905
20923
  }
20906
20924
  return t3;
20907
20925
  }
20908
- function _temp$g(p_0) {
20926
+ function _temp$i(p_0) {
20909
20927
  return Boolean(p_0.collectionView?.onTextSearchClick);
20910
20928
  }
20911
20929
  function DeleteEntityDialog({
@@ -21072,20 +21090,25 @@ function removeLocalStorageItem(key) {
21072
21090
  } catch {
21073
21091
  }
21074
21092
  }
21075
- function addRecentId(collectionId, id) {
21076
- const recentIds = getRecentIds(collectionId);
21093
+ function addRecentId(key, id) {
21094
+ const recentIds = getRecentIds(key);
21077
21095
  const newRecentIds = [id, ...recentIds.filter((i) => i !== id)];
21078
21096
  if (newRecentIds.length > 5) {
21079
21097
  newRecentIds.pop();
21080
21098
  }
21081
- saveSearchedIdsLocally(collectionId, newRecentIds);
21099
+ saveSearchedIdsLocally(key, newRecentIds);
21082
21100
  return newRecentIds;
21083
21101
  }
21084
- function saveSearchedIdsLocally(collectionId, ids) {
21085
- setLocalStorageItem("recent_id_searches::" + collectionId, JSON.stringify(ids));
21102
+ function saveSearchedIdsLocally(key, ids) {
21103
+ setLocalStorageItem("recent_id_searches::" + key, JSON.stringify(ids));
21086
21104
  }
21087
- function getRecentIds(collectionId) {
21088
- return getLocalStorageJSON("recent_id_searches::" + collectionId, []);
21105
+ function getRecentIds(key) {
21106
+ return getLocalStorageJSON("recent_id_searches::" + key, []);
21107
+ }
21108
+ function removeRecentIds(key, ids) {
21109
+ const remaining = getRecentIds(key).filter((id) => !ids.includes(id));
21110
+ saveSearchedIdsLocally(key, remaining);
21111
+ return remaining;
21089
21112
  }
21090
21113
  const editEntityAction = {
21091
21114
  icon: /* @__PURE__ */ jsx(EditIcon, { size: "small" }),
@@ -21115,7 +21138,7 @@ const editEntityAction = {
21115
21138
  entityId: entity.id
21116
21139
  });
21117
21140
  if (collection) {
21118
- addRecentId(collection.id, entity.id);
21141
+ addRecentId(fullIdPath ?? fullPath ?? collection.id, entity.id);
21119
21142
  }
21120
21143
  const path = collection?.collectionGroup ? entity.path : fullPath ?? collection?.path ?? entity.path;
21121
21144
  const resolvedPathSegments = collection?.collectionGroup ? entity.pathSegments : pathSegments ?? entity.pathSegments;
@@ -21568,7 +21591,7 @@ function FavouritesView(t0) {
21568
21591
  T0 = Collapse;
21569
21592
  t4 = favouriteCollections.length > 0;
21570
21593
  t2 = "flex flex-row flex-wrap gap-2 pb-2 min-h-[32px]";
21571
- t3 = favouriteCollections.map(_temp$f);
21594
+ t3 = favouriteCollections.map(_temp$h);
21572
21595
  $[2] = navigationController;
21573
21596
  $[3] = t1;
21574
21597
  $[4] = T0;
@@ -21602,7 +21625,7 @@ function FavouritesView(t0) {
21602
21625
  }
21603
21626
  return t6;
21604
21627
  }
21605
- function _temp$f(entry_0) {
21628
+ function _temp$h(entry_0) {
21606
21629
  return /* @__PURE__ */ jsx(NavigationChip, { entry: entry_0 }, entry_0.path);
21607
21630
  }
21608
21631
  const scrollsMap = {};
@@ -21839,7 +21862,7 @@ const NavigationCard = React__default.memo(function NavigationCard2(t0) {
21839
21862
  }
21840
21863
  let t4;
21841
21864
  if ($[4] !== actions) {
21842
- t4 = /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5", onClick: _temp$e, children: actions });
21865
+ t4 = /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5", onClick: _temp$g, children: actions });
21843
21866
  $[4] = actions;
21844
21867
  $[5] = t4;
21845
21868
  } else {
@@ -21926,7 +21949,7 @@ const NavigationCard = React__default.memo(function NavigationCard2(t0) {
21926
21949
  }
21927
21950
  return t12;
21928
21951
  });
21929
- function _temp$e(event) {
21952
+ function _temp$g(event) {
21930
21953
  event.preventDefault();
21931
21954
  event.stopPropagation();
21932
21955
  }
@@ -24293,7 +24316,7 @@ const BoardColumn = memo(function BoardColumn2(t0) {
24293
24316
  let t19;
24294
24317
  let t20;
24295
24318
  if ($[19] !== items) {
24296
- t20 = items.map(_temp$d);
24319
+ t20 = items.map(_temp$f);
24297
24320
  $[19] = items;
24298
24321
  $[20] = t20;
24299
24322
  } else {
@@ -24399,7 +24422,7 @@ const BoardColumn = memo(function BoardColumn2(t0) {
24399
24422
  }
24400
24423
  return t29;
24401
24424
  });
24402
- function _temp$d(i) {
24425
+ function _temp$f(i) {
24403
24426
  return i.id;
24404
24427
  }
24405
24428
  function Board(t0) {
@@ -26571,7 +26594,7 @@ function EntityCollectionViewStartActions(t0) {
26571
26594
  }
26572
26595
  let t7;
26573
26596
  if ($[30] !== collection.forceFilter || $[31] !== filtersDialogOpen || $[32] !== resolvedProperties || $[33] !== tableController) {
26574
- t7 = resolvedProperties && tableController.setFilterValues && /* @__PURE__ */ jsx(FiltersDialog, { open: filtersDialogOpen, onOpenChange: setFiltersDialogOpen, properties: resolvedProperties, filterValues: tableController.filterValues, setFilterValues: (filterValues_0) => tableController.setFilterValues?.(filterValues_0 ?? {}), forceFilter: collection.forceFilter, allowedFilters: tableController.allowedFilters?.map(_temp$c) });
26597
+ t7 = resolvedProperties && tableController.setFilterValues && /* @__PURE__ */ jsx(FiltersDialog, { open: filtersDialogOpen, onOpenChange: setFiltersDialogOpen, properties: resolvedProperties, filterValues: tableController.filterValues, setFilterValues: (filterValues_0) => tableController.setFilterValues?.(filterValues_0 ?? {}), forceFilter: collection.forceFilter, allowedFilters: tableController.allowedFilters?.map(_temp$e) });
26575
26598
  $[30] = collection.forceFilter;
26576
26599
  $[31] = filtersDialogOpen;
26577
26600
  $[32] = resolvedProperties;
@@ -26594,9 +26617,104 @@ function EntityCollectionViewStartActions(t0) {
26594
26617
  }
26595
26618
  return t8;
26596
26619
  }
26597
- function _temp$c(key_0) {
26620
+ function _temp$e(key_0) {
26598
26621
  return key_0.toString();
26599
26622
  }
26623
+ const DEFAULT_ENTITY_OPEN_MODE$1 = "side_panel";
26624
+ function EntityIdHeaderWidget({
26625
+ collection,
26626
+ path,
26627
+ pathSegments,
26628
+ fullIdPath
26629
+ }) {
26630
+ const navigation = useNavigationController();
26631
+ const dataSource = useDataSource();
26632
+ const [openPopup, setOpenPopup] = React__default.useState(false);
26633
+ const [searchString, setSearchString] = React__default.useState("");
26634
+ const [recentIds, setRecentIds] = React__default.useState([]);
26635
+ const latestCheck = useRef(0);
26636
+ const sideEntityController = useSideEntityController();
26637
+ const {
26638
+ t
26639
+ } = useTranslation();
26640
+ const resolvedPath = navigation.resolveIdsFrom(path, pathSegments);
26641
+ const resolvedPathSegments = pathSegments ? navigation.resolveSegmentsFrom?.(pathSegments) ?? pathSegments : void 0;
26642
+ const entityExists = useCallback(async (entityId) => {
26643
+ try {
26644
+ const entity = await dataSource.fetchEntity({
26645
+ path: resolvedPath,
26646
+ pathSegments: resolvedPathSegments,
26647
+ entityId,
26648
+ collection
26649
+ });
26650
+ return Boolean(entity?.values);
26651
+ } catch (e) {
26652
+ return void 0;
26653
+ }
26654
+ }, [dataSource, resolvedPath, resolvedPathSegments, collection]);
26655
+ const refreshRecentIds = () => {
26656
+ const ids = getRecentIds(fullIdPath);
26657
+ const check = ++latestCheck.current;
26658
+ Promise.all(ids.map(entityExists)).then((results) => {
26659
+ if (check !== latestCheck.current) return;
26660
+ const missing = ids.filter((_, i) => results[i] === false);
26661
+ if (missing.length > 0) removeRecentIds(fullIdPath, missing);
26662
+ setRecentIds(ids.filter((__0, i_0) => results[i_0] === true));
26663
+ });
26664
+ };
26665
+ const openEntityMode = collection?.openEntityMode ?? DEFAULT_ENTITY_OPEN_MODE$1;
26666
+ return /* @__PURE__ */ jsx(Tooltip, { title: !openPopup ? t("find_by_id") : void 0, asChild: false, children: /* @__PURE__ */ jsx(Popover, { open: openPopup, onOpenChange: (open) => {
26667
+ if (open) refreshRecentIds();
26668
+ setOpenPopup(open);
26669
+ }, sideOffset: 0, align: "start", alignOffset: -117, trigger: /* @__PURE__ */ jsx(IconButton, { size: "small", children: /* @__PURE__ */ jsx(SearchIcon, { size: "small" }) }), children: /* @__PURE__ */ jsxs("div", { className: cls("my-2 rounded-lg bg-surface-50 dark:bg-surface-950 text-surface-900 dark:text-white"), children: [
26670
+ /* @__PURE__ */ jsx("form", { noValidate: true, onSubmit: (e_0) => {
26671
+ e_0.preventDefault();
26672
+ const entityId_0 = searchString.trim();
26673
+ if (!entityId_0) return;
26674
+ setOpenPopup(false);
26675
+ entityExists(entityId_0).then((exists) => {
26676
+ if (exists) addRecentId(fullIdPath, entityId_0);
26677
+ });
26678
+ navigateToEntity({
26679
+ openEntityMode,
26680
+ collection,
26681
+ entityId: entityId_0,
26682
+ path,
26683
+ pathSegments,
26684
+ fullIdPath,
26685
+ sideEntityController,
26686
+ navigation
26687
+ });
26688
+ }, className: "w-96 max-w-full", children: /* @__PURE__ */ jsxs("div", { className: "flex p-2 w-full gap-2", children: [
26689
+ /* @__PURE__ */ jsx(
26690
+ "input",
26691
+ {
26692
+ autoFocus: openPopup,
26693
+ placeholder: t("find_entity_by_id"),
26694
+ onChange: (e_1) => {
26695
+ setSearchString(e_1.target.value);
26696
+ },
26697
+ value: searchString,
26698
+ className: "rounded-lg bg-white dark:bg-surface-800 flex-grow bg-transparent outline-none p-2 " + focusedDisabled
26699
+ }
26700
+ ),
26701
+ /* @__PURE__ */ jsx(Button, { variant: "text", disabled: !searchString.trim(), type: "submit", children: /* @__PURE__ */ jsx(KeyboardTabIcon, {}) })
26702
+ ] }) }),
26703
+ recentIds && recentIds.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 p-2", children: recentIds.map((id) => /* @__PURE__ */ jsx(ReferencePreview, { reference: new EntityReference(id, path, void 0, pathSegments), hover: true, onClick: () => {
26704
+ setOpenPopup(false);
26705
+ navigateToEntity({
26706
+ openEntityMode,
26707
+ collection,
26708
+ entityId: id,
26709
+ path,
26710
+ pathSegments,
26711
+ fullIdPath,
26712
+ sideEntityController,
26713
+ navigation
26714
+ });
26715
+ }, includeEntityLink: false, size: "small" }, id)) })
26716
+ ] }) }) });
26717
+ }
26600
26718
  const collectionScrollCache = /* @__PURE__ */ new Map();
26601
26719
  function useScrollRestoration() {
26602
26720
  const updateCollectionScroll = ({
@@ -26637,6 +26755,7 @@ const EntityCollectionView$1 = React__default.memo(function EntityCollectionView
26637
26755
  isSubCollection,
26638
26756
  className,
26639
26757
  updateUrl,
26758
+ onCountChange,
26640
26759
  ...collectionProp
26641
26760
  }) {
26642
26761
  const context = useFireCMSContext();
@@ -26774,7 +26893,7 @@ const EntityCollectionView$1 = React__default.memo(function EntityCollectionView
26774
26893
  entityId: clickedEntity.id
26775
26894
  });
26776
26895
  if (collection_1) {
26777
- addRecentId(collection_1.id, clickedEntity.id);
26896
+ addRecentId(fullIdPath ?? fullPath, clickedEntity.id);
26778
26897
  }
26779
26898
  const isCollectionGroup = Boolean(collection_1?.collectionGroup);
26780
26899
  const path = isCollectionGroup ? clickedEntity.path : fullPath ?? clickedEntity.path;
@@ -27102,8 +27221,9 @@ const EntityCollectionView$1 = React__default.memo(function EntityCollectionView
27102
27221
  useEffect(() => {
27103
27222
  if (docsCount !== void 0) {
27104
27223
  breadcrumbs.updateCount(fullPath, docsCount);
27224
+ onCountChange?.(docsCount);
27105
27225
  }
27106
- }, [docsCount, fullPath, breadcrumbs.updateCount]);
27226
+ }, [docsCount, fullPath, breadcrumbs.updateCount, onCountChange]);
27107
27227
  const countFetcher = /* @__PURE__ */ jsx(EntitiesCount, { fullPath, pathSegments, collection, filter: tableController.filterValues, sortBy: tableController.sortBy, onCountChange: setDocsCount });
27108
27228
  const buildAdditionalHeaderWidget = useCallback(({
27109
27229
  property: property_2,
@@ -27249,207 +27369,6 @@ function buildPropertyWidthOverwrite(key, width) {
27249
27369
  }
27250
27370
  };
27251
27371
  }
27252
- function EntityIdHeaderWidget(t0) {
27253
- const $ = c(50);
27254
- const {
27255
- collection,
27256
- path,
27257
- pathSegments,
27258
- fullIdPath
27259
- } = t0;
27260
- const navigation = useNavigationController();
27261
- const [openPopup, setOpenPopup] = React__default.useState(false);
27262
- const [searchString, setSearchString] = React__default.useState("");
27263
- let t1;
27264
- if ($[0] !== collection.id) {
27265
- t1 = getRecentIds(collection.id);
27266
- $[0] = collection.id;
27267
- $[1] = t1;
27268
- } else {
27269
- t1 = $[1];
27270
- }
27271
- const [recentIds, setRecentIds] = React__default.useState(t1);
27272
- const sideEntityController = useSideEntityController();
27273
- const {
27274
- t
27275
- } = useTranslation();
27276
- const openEntityMode = collection?.openEntityMode ?? DEFAULT_ENTITY_OPEN_MODE;
27277
- let t2;
27278
- if ($[2] !== openPopup || $[3] !== t) {
27279
- t2 = !openPopup ? t("find_by_id") : void 0;
27280
- $[2] = openPopup;
27281
- $[3] = t;
27282
- $[4] = t2;
27283
- } else {
27284
- t2 = $[4];
27285
- }
27286
- let t3;
27287
- let t4;
27288
- if ($[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
27289
- t3 = /* @__PURE__ */ jsx(IconButton, { size: "small", children: /* @__PURE__ */ jsx(SearchIcon, { size: "small" }) });
27290
- t4 = cls("my-2 rounded-lg bg-surface-50 dark:bg-surface-950 text-surface-900 dark:text-white");
27291
- $[5] = t3;
27292
- $[6] = t4;
27293
- } else {
27294
- t3 = $[5];
27295
- t4 = $[6];
27296
- }
27297
- let t5;
27298
- if ($[7] !== collection || $[8] !== fullIdPath || $[9] !== navigation || $[10] !== openEntityMode || $[11] !== path || $[12] !== pathSegments || $[13] !== searchString || $[14] !== sideEntityController) {
27299
- t5 = (e) => {
27300
- e.preventDefault();
27301
- if (!searchString) {
27302
- return;
27303
- }
27304
- setOpenPopup(false);
27305
- const entityId = searchString.trim();
27306
- setRecentIds(addRecentId(collection.id, entityId));
27307
- navigateToEntity({
27308
- openEntityMode,
27309
- collection,
27310
- entityId,
27311
- path,
27312
- pathSegments,
27313
- fullIdPath,
27314
- sideEntityController,
27315
- navigation
27316
- });
27317
- };
27318
- $[7] = collection;
27319
- $[8] = fullIdPath;
27320
- $[9] = navigation;
27321
- $[10] = openEntityMode;
27322
- $[11] = path;
27323
- $[12] = pathSegments;
27324
- $[13] = searchString;
27325
- $[14] = sideEntityController;
27326
- $[15] = t5;
27327
- } else {
27328
- t5 = $[15];
27329
- }
27330
- let t6;
27331
- if ($[16] !== t) {
27332
- t6 = t("find_entity_by_id");
27333
- $[16] = t;
27334
- $[17] = t6;
27335
- } else {
27336
- t6 = $[17];
27337
- }
27338
- let t7;
27339
- if ($[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
27340
- t7 = (e_0) => {
27341
- setSearchString(e_0.target.value);
27342
- };
27343
- $[18] = t7;
27344
- } else {
27345
- t7 = $[18];
27346
- }
27347
- let t8;
27348
- if ($[19] !== openPopup || $[20] !== searchString || $[21] !== t6) {
27349
- t8 = /* @__PURE__ */ jsx("input", { autoFocus: openPopup, placeholder: t6, onChange: t7, value: searchString, className: "rounded-lg bg-white dark:bg-surface-800 flex-grow bg-transparent outline-none p-2 " + focusedDisabled });
27350
- $[19] = openPopup;
27351
- $[20] = searchString;
27352
- $[21] = t6;
27353
- $[22] = t8;
27354
- } else {
27355
- t8 = $[22];
27356
- }
27357
- const t9 = !searchString.trim();
27358
- let t10;
27359
- if ($[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
27360
- t10 = /* @__PURE__ */ jsx(KeyboardTabIcon, {});
27361
- $[23] = t10;
27362
- } else {
27363
- t10 = $[23];
27364
- }
27365
- let t11;
27366
- if ($[24] !== t9) {
27367
- t11 = /* @__PURE__ */ jsx(Button, { variant: "text", disabled: t9, type: "submit", children: t10 });
27368
- $[24] = t9;
27369
- $[25] = t11;
27370
- } else {
27371
- t11 = $[25];
27372
- }
27373
- let t12;
27374
- if ($[26] !== t11 || $[27] !== t8) {
27375
- t12 = /* @__PURE__ */ jsxs("div", { className: "flex p-2 w-full gap-2", children: [
27376
- t8,
27377
- t11
27378
- ] });
27379
- $[26] = t11;
27380
- $[27] = t8;
27381
- $[28] = t12;
27382
- } else {
27383
- t12 = $[28];
27384
- }
27385
- let t13;
27386
- if ($[29] !== t12 || $[30] !== t5) {
27387
- t13 = /* @__PURE__ */ jsx("form", { noValidate: true, onSubmit: t5, className: "w-96 max-w-full", children: t12 });
27388
- $[29] = t12;
27389
- $[30] = t5;
27390
- $[31] = t13;
27391
- } else {
27392
- t13 = $[31];
27393
- }
27394
- let t14;
27395
- if ($[32] !== collection || $[33] !== fullIdPath || $[34] !== navigation || $[35] !== openEntityMode || $[36] !== path || $[37] !== pathSegments || $[38] !== recentIds || $[39] !== sideEntityController) {
27396
- t14 = recentIds && recentIds.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 p-2", children: recentIds.map((id) => /* @__PURE__ */ jsx(ReferencePreview, { reference: new EntityReference(id, path, void 0, pathSegments), hover: true, onClick: () => {
27397
- setOpenPopup(false);
27398
- navigateToEntity({
27399
- openEntityMode,
27400
- collection,
27401
- entityId: id,
27402
- path,
27403
- pathSegments,
27404
- fullIdPath,
27405
- sideEntityController,
27406
- navigation
27407
- });
27408
- }, includeEntityLink: false, size: "small" }, id)) });
27409
- $[32] = collection;
27410
- $[33] = fullIdPath;
27411
- $[34] = navigation;
27412
- $[35] = openEntityMode;
27413
- $[36] = path;
27414
- $[37] = pathSegments;
27415
- $[38] = recentIds;
27416
- $[39] = sideEntityController;
27417
- $[40] = t14;
27418
- } else {
27419
- t14 = $[40];
27420
- }
27421
- let t15;
27422
- if ($[41] !== t13 || $[42] !== t14) {
27423
- t15 = /* @__PURE__ */ jsxs("div", { className: t4, children: [
27424
- t13,
27425
- t14
27426
- ] });
27427
- $[41] = t13;
27428
- $[42] = t14;
27429
- $[43] = t15;
27430
- } else {
27431
- t15 = $[43];
27432
- }
27433
- let t16;
27434
- if ($[44] !== openPopup || $[45] !== t15) {
27435
- t16 = /* @__PURE__ */ jsx(Popover, { open: openPopup, onOpenChange: setOpenPopup, sideOffset: 0, align: "start", alignOffset: -117, trigger: t3, children: t15 });
27436
- $[44] = openPopup;
27437
- $[45] = t15;
27438
- $[46] = t16;
27439
- } else {
27440
- t16 = $[46];
27441
- }
27442
- let t17;
27443
- if ($[47] !== t16 || $[48] !== t2) {
27444
- t17 = /* @__PURE__ */ jsx(Tooltip, { title: t2, asChild: false, children: t16 });
27445
- $[47] = t16;
27446
- $[48] = t2;
27447
- $[49] = t17;
27448
- } else {
27449
- t17 = $[49];
27450
- }
27451
- return t17;
27452
- }
27453
27372
  const EntityCollectionView$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
27454
27373
  __proto__: null,
27455
27374
  EntityCollectionView: EntityCollectionView$1
@@ -27869,7 +27788,7 @@ function DrawerNavigationGroup(t0) {
27869
27788
  }
27870
27789
  let t10;
27871
27790
  if ($[11] !== headerActions) {
27872
- t10 = headerActions && /* @__PURE__ */ jsx("div", { onClick: _temp$b, children: headerActions });
27791
+ t10 = headerActions && /* @__PURE__ */ jsx("div", { onClick: _temp$d, children: headerActions });
27873
27792
  $[11] = headerActions;
27874
27793
  $[12] = t10;
27875
27794
  } else {
@@ -27949,7 +27868,7 @@ function DrawerNavigationGroup(t0) {
27949
27868
  }
27950
27869
  return t16;
27951
27870
  }
27952
- function _temp$b(e) {
27871
+ function _temp$d(e) {
27953
27872
  return e.stopPropagation();
27954
27873
  }
27955
27874
  function DefaultDrawer(t0) {
@@ -27994,10 +27913,10 @@ function DefaultDrawer(t0) {
27994
27913
  navigationEntries,
27995
27914
  groups
27996
27915
  } = navigation.topLevelNavigation;
27997
- const adminViews = navigationEntries.filter(_temp$a) ?? [];
27916
+ const adminViews = navigationEntries.filter(_temp$c) ?? [];
27998
27917
  let t2;
27999
27918
  if ($[1] !== groups) {
28000
- t2 = groups.filter(_temp2$5);
27919
+ t2 = groups.filter(_temp2$6);
28001
27920
  $[1] = groups;
28002
27921
  $[2] = t2;
28003
27922
  } else {
@@ -28134,10 +28053,10 @@ function DefaultDrawer(t0) {
28134
28053
  }
28135
28054
  return t14;
28136
28055
  }
28137
- function _temp2$5(g) {
28056
+ function _temp2$6(g) {
28138
28057
  return g !== "Admin";
28139
28058
  }
28140
- function _temp$a(e) {
28059
+ function _temp$c(e) {
28141
28060
  return e.type === "admin";
28142
28061
  }
28143
28062
  function DrawerToggle() {
@@ -28268,8 +28187,149 @@ function DrawerLogo(t0) {
28268
28187
  }
28269
28188
  return t2;
28270
28189
  }
28190
+ function CollectionCountBadge(t0) {
28191
+ const $ = c(3);
28192
+ const {
28193
+ count
28194
+ } = t0;
28195
+ if (count === void 0) {
28196
+ return null;
28197
+ }
28198
+ if (count === null) {
28199
+ let t12;
28200
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
28201
+ t12 = /* @__PURE__ */ jsx(Skeleton, { className: "w-8 h-4 rounded-md" });
28202
+ $[0] = t12;
28203
+ } else {
28204
+ t12 = $[0];
28205
+ }
28206
+ return t12;
28207
+ }
28208
+ let t1;
28209
+ if ($[1] !== count) {
28210
+ t1 = /* @__PURE__ */ jsx("span", { className: "text-xs text-surface-accent-500 dark:text-surface-accent-400 bg-surface-100 dark:bg-surface-700 px-1 py-0 rounded", children: count });
28211
+ $[1] = count;
28212
+ $[2] = t1;
28213
+ } else {
28214
+ t1 = $[2];
28215
+ }
28216
+ return t1;
28217
+ }
28218
+ function PathTitle(t0) {
28219
+ const $ = c(15);
28220
+ const {
28221
+ parents,
28222
+ name,
28223
+ count,
28224
+ className
28225
+ } = t0;
28226
+ let t1;
28227
+ if ($[0] !== className) {
28228
+ t1 = cls("flex flex-col", className);
28229
+ $[0] = className;
28230
+ $[1] = t1;
28231
+ } else {
28232
+ t1 = $[1];
28233
+ }
28234
+ let t2;
28235
+ if ($[2] !== parents) {
28236
+ t2 = parents.length > 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", noWrap: true, children: parents.join(" / ") });
28237
+ $[2] = parents;
28238
+ $[3] = t2;
28239
+ } else {
28240
+ t2 = $[3];
28241
+ }
28242
+ let t3;
28243
+ if ($[4] !== name) {
28244
+ t3 = /* @__PURE__ */ jsx(Typography, { variant: "body2", noWrap: true, className: "font-medium", children: name });
28245
+ $[4] = name;
28246
+ $[5] = t3;
28247
+ } else {
28248
+ t3 = $[5];
28249
+ }
28250
+ let t4;
28251
+ if ($[6] !== count) {
28252
+ t4 = /* @__PURE__ */ jsx(CollectionCountBadge, { count });
28253
+ $[6] = count;
28254
+ $[7] = t4;
28255
+ } else {
28256
+ t4 = $[7];
28257
+ }
28258
+ let t5;
28259
+ if ($[8] !== t3 || $[9] !== t4) {
28260
+ t5 = /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center gap-2 min-w-0", children: [
28261
+ t3,
28262
+ t4
28263
+ ] });
28264
+ $[8] = t3;
28265
+ $[9] = t4;
28266
+ $[10] = t5;
28267
+ } else {
28268
+ t5 = $[10];
28269
+ }
28270
+ let t6;
28271
+ if ($[11] !== t1 || $[12] !== t2 || $[13] !== t5) {
28272
+ t6 = /* @__PURE__ */ jsxs("div", { className: t1, children: [
28273
+ t2,
28274
+ t5
28275
+ ] });
28276
+ $[11] = t1;
28277
+ $[12] = t2;
28278
+ $[13] = t5;
28279
+ $[14] = t6;
28280
+ } else {
28281
+ t6 = $[14];
28282
+ }
28283
+ return t6;
28284
+ }
28285
+ function CollectionPathTitle(t0) {
28286
+ const $ = c(9);
28287
+ const {
28288
+ path,
28289
+ name,
28290
+ count
28291
+ } = t0;
28292
+ const navigation = useNavigationController();
28293
+ let t1;
28294
+ let t2;
28295
+ if ($[0] !== navigation.collections) {
28296
+ t2 = navigation.collections ?? [];
28297
+ $[0] = navigation.collections;
28298
+ $[1] = t2;
28299
+ } else {
28300
+ t2 = $[1];
28301
+ }
28302
+ let t3;
28303
+ if ($[2] !== path || $[3] !== t2) {
28304
+ t3 = getNavigationEntriesFromPath({
28305
+ path,
28306
+ collections: t2
28307
+ }).slice(0, -1).map(_temp$b);
28308
+ $[2] = path;
28309
+ $[3] = t2;
28310
+ $[4] = t3;
28311
+ } else {
28312
+ t3 = $[4];
28313
+ }
28314
+ t1 = t3;
28315
+ const parents = t1;
28316
+ let t4;
28317
+ if ($[5] !== count || $[6] !== name || $[7] !== parents) {
28318
+ t4 = /* @__PURE__ */ jsx(PathTitle, { parents, name, count, className: "shrink-0 mx-2 max-w-[140px] sm:max-w-[240px] lg:max-w-[320px]" });
28319
+ $[5] = count;
28320
+ $[6] = name;
28321
+ $[7] = parents;
28322
+ $[8] = t4;
28323
+ } else {
28324
+ t4 = $[8];
28325
+ }
28326
+ return t4;
28327
+ }
28328
+ function _temp$b(entry) {
28329
+ return entry.type === "entity" ? entry.entityId : entry.type === "collection" ? entry.collection.name : entry.view.name;
28330
+ }
28271
28331
  const DefaultAppBar = function DefaultAppBar2(t0) {
28272
- const $ = c(54);
28332
+ const $ = c(58);
28273
28333
  const {
28274
28334
  title,
28275
28335
  endAdornment,
@@ -28290,6 +28350,7 @@ const DefaultAppBar = function DefaultAppBar2(t0) {
28290
28350
  const logo = logoProp ?? appLogo;
28291
28351
  const navigation = useNavigationController();
28292
28352
  const breadcrumbs = useBreadcrumbsController();
28353
+ const lastBreadcrumb = breadcrumbs.breadcrumbs?.[breadcrumbs.breadcrumbs.length - 1];
28293
28354
  const authController = useAuthController();
28294
28355
  const {
28295
28356
  mode,
@@ -28380,30 +28441,39 @@ const DefaultAppBar = function DefaultAppBar2(t0) {
28380
28441
  }
28381
28442
  let t8;
28382
28443
  if ($[21] !== breadcrumbs.breadcrumbs) {
28383
- t8 = (breadcrumbs.breadcrumbs ?? []).length > 0 && /* @__PURE__ */ jsx("div", { className: "mr-8 hidden lg:block", children: /* @__PURE__ */ jsx("div", { className: "flex flex-row gap-2 items-center", children: breadcrumbs.breadcrumbs.map(_temp$9) }) });
28444
+ t8 = (breadcrumbs.breadcrumbs ?? []).length > 0 && /* @__PURE__ */ jsx("div", { className: "mr-8 hidden lg:block", children: /* @__PURE__ */ jsx("div", { className: "flex flex-row gap-2 items-center", children: breadcrumbs.breadcrumbs.map(_temp$a) }) });
28384
28445
  $[21] = breadcrumbs.breadcrumbs;
28385
28446
  $[22] = t8;
28386
28447
  } else {
28387
28448
  t8 = $[22];
28388
28449
  }
28389
28450
  let t9;
28390
- if ($[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
28391
- t9 = /* @__PURE__ */ jsx("div", { className: "flex-grow" });
28392
- $[23] = t9;
28451
+ if ($[23] !== breadcrumbs.breadcrumbs || $[24] !== lastBreadcrumb) {
28452
+ t9 = lastBreadcrumb && /* @__PURE__ */ jsx(PathTitle, { className: "lg:hidden min-w-0 mr-2", parents: breadcrumbs.breadcrumbs.slice(0, -1).map(_temp2$5), name: lastBreadcrumb.title, count: lastBreadcrumb.count });
28453
+ $[23] = breadcrumbs.breadcrumbs;
28454
+ $[24] = lastBreadcrumb;
28455
+ $[25] = t9;
28393
28456
  } else {
28394
- t9 = $[23];
28457
+ t9 = $[25];
28395
28458
  }
28396
28459
  let t10;
28397
- if ($[24] !== endAdornment) {
28398
- t10 = endAdornment && /* @__PURE__ */ jsx(ErrorBoundary, { children: endAdornment });
28399
- $[24] = endAdornment;
28400
- $[25] = t10;
28460
+ if ($[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
28461
+ t10 = /* @__PURE__ */ jsx("div", { className: "flex-grow" });
28462
+ $[26] = t10;
28401
28463
  } else {
28402
- t10 = $[25];
28464
+ t10 = $[26];
28403
28465
  }
28404
28466
  let t11;
28405
- if ($[26] !== includeModeToggle || $[27] !== mode || $[28] !== setMode || $[29] !== t) {
28406
- t11 = includeModeToggle && /* @__PURE__ */ jsxs(Menu, { trigger: /* @__PURE__ */ jsx(IconButton, { color: "inherit", "aria-label": "Open drawer", children: mode === "dark" ? /* @__PURE__ */ jsx(DarkModeIcon, { size: "small" }) : /* @__PURE__ */ jsx(LightModeIcon, { size: "small" }) }), children: [
28467
+ if ($[27] !== endAdornment) {
28468
+ t11 = endAdornment && /* @__PURE__ */ jsx(ErrorBoundary, { children: endAdornment });
28469
+ $[27] = endAdornment;
28470
+ $[28] = t11;
28471
+ } else {
28472
+ t11 = $[28];
28473
+ }
28474
+ let t12;
28475
+ if ($[29] !== includeModeToggle || $[30] !== mode || $[31] !== setMode || $[32] !== t) {
28476
+ t12 = includeModeToggle && /* @__PURE__ */ jsxs(Menu, { trigger: /* @__PURE__ */ jsx(IconButton, { color: "inherit", "aria-label": "Open drawer", children: mode === "dark" ? /* @__PURE__ */ jsx(DarkModeIcon, { size: "small" }) : /* @__PURE__ */ jsx(LightModeIcon, { size: "small" }) }), children: [
28407
28477
  /* @__PURE__ */ jsxs(MenuItem, { onClick: () => setMode("dark"), children: [
28408
28478
  /* @__PURE__ */ jsx(DarkModeIcon, { size: "smallest" }),
28409
28479
  " ",
@@ -28420,101 +28490,106 @@ const DefaultAppBar = function DefaultAppBar2(t0) {
28420
28490
  t("system_mode")
28421
28491
  ] })
28422
28492
  ] });
28423
- $[26] = includeModeToggle;
28424
- $[27] = mode;
28425
- $[28] = setMode;
28426
- $[29] = t;
28427
- $[30] = t11;
28493
+ $[29] = includeModeToggle;
28494
+ $[30] = mode;
28495
+ $[31] = setMode;
28496
+ $[32] = t;
28497
+ $[33] = t12;
28428
28498
  } else {
28429
- t11 = $[30];
28499
+ t12 = $[33];
28430
28500
  }
28431
- let t12;
28432
- if ($[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
28433
- t12 = /* @__PURE__ */ jsx(LanguageToggle, {});
28434
- $[31] = t12;
28501
+ let t13;
28502
+ if ($[34] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
28503
+ t13 = /* @__PURE__ */ jsx(LanguageToggle, {});
28504
+ $[34] = t13;
28435
28505
  } else {
28436
- t12 = $[31];
28506
+ t13 = $[34];
28437
28507
  }
28438
- let t13;
28439
- if ($[32] !== user) {
28440
- t13 = user && /* @__PURE__ */ jsxs("div", { className: "px-4 py-2 mb-2", children: [
28508
+ let t14;
28509
+ if ($[35] !== user) {
28510
+ t14 = user && /* @__PURE__ */ jsxs("div", { className: "px-4 py-2 mb-2", children: [
28441
28511
  user.displayName && /* @__PURE__ */ jsx(Typography, { variant: "body1", color: "secondary", children: user.displayName }),
28442
28512
  user.email && /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "secondary", children: user.email })
28443
28513
  ] });
28444
- $[32] = user;
28445
- $[33] = t13;
28514
+ $[35] = user;
28515
+ $[36] = t14;
28446
28516
  } else {
28447
- t13 = $[33];
28517
+ t14 = $[36];
28448
28518
  }
28449
- let t14;
28450
- if ($[34] !== authController || $[35] !== dropDownActions || $[36] !== navigate || $[37] !== t) {
28451
- t14 = !dropDownActions && /* @__PURE__ */ jsxs(MenuItem, { onClick: async () => {
28519
+ let t15;
28520
+ if ($[37] !== authController || $[38] !== dropDownActions || $[39] !== navigate || $[40] !== t) {
28521
+ t15 = !dropDownActions && /* @__PURE__ */ jsxs(MenuItem, { onClick: async () => {
28452
28522
  await authController.signOut();
28453
28523
  navigate("/");
28454
28524
  }, children: [
28455
28525
  /* @__PURE__ */ jsx(LogoutIcon, {}),
28456
28526
  t("log_out")
28457
28527
  ] });
28458
- $[34] = authController;
28459
- $[35] = dropDownActions;
28460
- $[36] = navigate;
28461
- $[37] = t;
28462
- $[38] = t14;
28528
+ $[37] = authController;
28529
+ $[38] = dropDownActions;
28530
+ $[39] = navigate;
28531
+ $[40] = t;
28532
+ $[41] = t15;
28463
28533
  } else {
28464
- t14 = $[38];
28534
+ t15 = $[41];
28465
28535
  }
28466
- let t15;
28467
- if ($[39] !== avatarComponent || $[40] !== dropDownActions || $[41] !== t13 || $[42] !== t14) {
28468
- t15 = /* @__PURE__ */ jsxs(Menu, { trigger: avatarComponent, children: [
28469
- t13,
28536
+ let t16;
28537
+ if ($[42] !== avatarComponent || $[43] !== dropDownActions || $[44] !== t14 || $[45] !== t15) {
28538
+ t16 = /* @__PURE__ */ jsxs(Menu, { trigger: avatarComponent, children: [
28539
+ t14,
28470
28540
  dropDownActions,
28471
- t14
28541
+ t15
28472
28542
  ] });
28473
- $[39] = avatarComponent;
28474
- $[40] = dropDownActions;
28475
- $[41] = t13;
28476
- $[42] = t14;
28477
- $[43] = t15;
28543
+ $[42] = avatarComponent;
28544
+ $[43] = dropDownActions;
28545
+ $[44] = t14;
28546
+ $[45] = t15;
28547
+ $[46] = t16;
28478
28548
  } else {
28479
- t15 = $[43];
28549
+ t16 = $[46];
28480
28550
  }
28481
- let t16;
28482
- if ($[44] !== startAdornment || $[45] !== style || $[46] !== t10 || $[47] !== t11 || $[48] !== t15 || $[49] !== t5 || $[50] !== t6 || $[51] !== t7 || $[52] !== t8) {
28483
- t16 = /* @__PURE__ */ jsxs("div", { style, className: t5, children: [
28551
+ let t17;
28552
+ if ($[47] !== startAdornment || $[48] !== style || $[49] !== t11 || $[50] !== t12 || $[51] !== t16 || $[52] !== t5 || $[53] !== t6 || $[54] !== t7 || $[55] !== t8 || $[56] !== t9) {
28553
+ t17 = /* @__PURE__ */ jsxs("div", { style, className: t5, children: [
28484
28554
  t6,
28485
28555
  t7,
28486
28556
  t8,
28487
- startAdornment,
28488
28557
  t9,
28558
+ startAdornment,
28489
28559
  t10,
28490
28560
  t11,
28491
28561
  t12,
28492
- t15
28562
+ t13,
28563
+ t16
28493
28564
  ] });
28494
- $[44] = startAdornment;
28495
- $[45] = style;
28496
- $[46] = t10;
28497
- $[47] = t11;
28498
- $[48] = t15;
28499
- $[49] = t5;
28500
- $[50] = t6;
28501
- $[51] = t7;
28502
- $[52] = t8;
28503
- $[53] = t16;
28565
+ $[47] = startAdornment;
28566
+ $[48] = style;
28567
+ $[49] = t11;
28568
+ $[50] = t12;
28569
+ $[51] = t16;
28570
+ $[52] = t5;
28571
+ $[53] = t6;
28572
+ $[54] = t7;
28573
+ $[55] = t8;
28574
+ $[56] = t9;
28575
+ $[57] = t17;
28504
28576
  } else {
28505
- t16 = $[53];
28577
+ t17 = $[57];
28506
28578
  }
28507
- return t16;
28579
+ return t17;
28508
28580
  };
28509
- function _temp$9(breadcrumb, index) {
28581
+ function _temp$a(breadcrumb, index) {
28510
28582
  return /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
28511
28583
  /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "/" }),
28512
28584
  /* @__PURE__ */ jsx(Link, { className: "visited:text-inherit visited:dark:text-inherit block", to: breadcrumb.url, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center gap-2 whitespace-nowrap", children: [
28513
28585
  /* @__PURE__ */ jsx(Typography, { variant: "body2", children: breadcrumb.title }),
28514
- breadcrumb.count !== void 0 && (breadcrumb.count !== null ? /* @__PURE__ */ jsx("span", { className: "text-xs text-surface-accent-500 dark:text-surface-accent-400 bg-surface-100 dark:bg-surface-700 px-1 py-0 rounded", children: breadcrumb.count }) : /* @__PURE__ */ jsx(Skeleton, { className: "w-8 h-4 rounded-md" }))
28586
+ /* @__PURE__ */ jsx(CollectionCountBadge, { count: breadcrumb.count })
28515
28587
  ] }) }, index)
28516
28588
  ] }, breadcrumb.url + "_" + index);
28517
28589
  }
28590
+ function _temp2$5(breadcrumb_0) {
28591
+ return breadcrumb_0.title;
28592
+ }
28518
28593
  const buildIdsMap = (value) => value && Array.isArray(value) && value.length > 0 ? value.map((v, index) => {
28519
28594
  if (!v) return {};
28520
28595
  return {
@@ -28951,7 +29026,7 @@ function SearchIconsView(t0) {
28951
29026
  } else {
28952
29027
  const searchResult = iconsSearch.search(value);
28953
29028
  const limited = searchResult.slice(0, 50);
28954
- setKeys(limited.map(_temp$8));
29029
+ setKeys(limited.map(_temp$9));
28955
29030
  }
28956
29031
  }, UPDATE_SEARCH_INDEX_WAIT_MS);
28957
29032
  $[0] = t3;
@@ -29043,7 +29118,7 @@ function SearchIconsView(t0) {
29043
29118
  }
29044
29119
  return t11;
29045
29120
  }
29046
- function _temp$8(e) {
29121
+ function _temp$9(e) {
29047
29122
  return e.item.key;
29048
29123
  }
29049
29124
  function FieldCaption(t0) {
@@ -29502,7 +29577,7 @@ function LicenseBanner(t0) {
29502
29577
  i18n
29503
29578
  } = useTranslation();
29504
29579
  const plugins = useContext(CustomizationControllerContext)?.plugins;
29505
- const runsProPlugin = plugins?.some(_temp$7) ?? false;
29580
+ const runsProPlugin = plugins?.some(_temp$8) ?? false;
29506
29581
  const [dismissed, setDismissed] = useState(_temp2$4);
29507
29582
  const [dismissedForGood, setDismissedForGood] = useState(_temp3$3);
29508
29583
  const content = licenseStatus ? buildBannerContent(licenseStatus, t, i18n?.language, runsProPlugin) : null;
@@ -29592,7 +29667,7 @@ function _temp3$3() {
29592
29667
  function _temp2$4() {
29593
29668
  return readDismissed(sessionDismissals);
29594
29669
  }
29595
- function _temp$7(plugin) {
29670
+ function _temp$8(plugin) {
29596
29671
  return PRO_PLUGIN_KEYS.includes(plugin.key);
29597
29672
  }
29598
29673
  function buildBannerContent(status, t, language, runsProPlugin) {
@@ -29732,64 +29807,32 @@ function writeDismissed(store, states) {
29732
29807
  }
29733
29808
  }
29734
29809
  function useReferenceDialog(referenceDialogProps) {
29735
- const $ = c(9);
29736
29810
  const navigation = useNavigationController();
29737
29811
  const sideDialogsController = useSideDialogsController();
29738
- let t0;
29739
- if ($[0] !== navigation || $[1] !== referenceDialogProps || $[2] !== sideDialogsController) {
29740
- t0 = () => {
29741
- if (referenceDialogProps.path) {
29742
- let usedCollection = referenceDialogProps.collection;
29743
- if (!usedCollection) {
29744
- usedCollection = navigation.getCollection(referenceDialogProps.path);
29812
+ const open = useCallback(() => {
29813
+ if (referenceDialogProps.path) {
29814
+ let usedCollection = referenceDialogProps.collection;
29815
+ if (!usedCollection) usedCollection = navigation.getCollection(referenceDialogProps.path);
29816
+ if (!usedCollection) throw Error("Not able to resolve the collection in useReferenceDialog. Make sure a collection is registered in path " + referenceDialogProps.path);
29817
+ sideDialogsController.open({
29818
+ key: `reference_${referenceDialogProps.path}`,
29819
+ component: /* @__PURE__ */ jsx(ReferenceSelectionTable, { collection: usedCollection, ...referenceDialogProps }),
29820
+ width: "90vw",
29821
+ onClose: () => {
29822
+ referenceDialogProps.onClose?.();
29745
29823
  }
29746
- if (!usedCollection) {
29747
- throw Error("Not able to resolve the collection in useReferenceDialog. Make sure a collection is registered in path " + referenceDialogProps.path);
29748
- }
29749
- sideDialogsController.open({
29750
- key: `reference_${referenceDialogProps.path}`,
29751
- component: /* @__PURE__ */ jsx(ReferenceSelectionTable, { collection: usedCollection, ...referenceDialogProps }),
29752
- width: "90vw",
29753
- onClose: () => {
29754
- referenceDialogProps.onClose?.();
29755
- }
29756
- });
29757
- } else {
29758
- throw Error("useReferenceDialog: You are trying to open a reference dialog, but have not declared the `path`");
29759
- }
29760
- };
29761
- $[0] = navigation;
29762
- $[1] = referenceDialogProps;
29763
- $[2] = sideDialogsController;
29764
- $[3] = t0;
29765
- } else {
29766
- t0 = $[3];
29767
- }
29768
- const open = t0;
29769
- let t1;
29770
- if ($[4] !== sideDialogsController) {
29771
- t1 = () => {
29772
- sideDialogsController.close();
29773
- };
29774
- $[4] = sideDialogsController;
29775
- $[5] = t1;
29776
- } else {
29777
- t1 = $[5];
29778
- }
29779
- const close = t1;
29780
- let t2;
29781
- if ($[6] !== close || $[7] !== open) {
29782
- t2 = {
29783
- open,
29784
- close
29785
- };
29786
- $[6] = close;
29787
- $[7] = open;
29788
- $[8] = t2;
29789
- } else {
29790
- t2 = $[8];
29791
- }
29792
- return t2;
29824
+ });
29825
+ } else {
29826
+ throw Error("useReferenceDialog: You are trying to open a reference dialog, but have not declared the `path`");
29827
+ }
29828
+ }, [navigation, referenceDialogProps, sideDialogsController]);
29829
+ const close = useCallback(() => {
29830
+ sideDialogsController.close(`reference_${referenceDialogProps.path}`);
29831
+ }, [sideDialogsController, referenceDialogProps.path]);
29832
+ return {
29833
+ open,
29834
+ close
29835
+ };
29793
29836
  }
29794
29837
  const fireCMSLogo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAa9SURBVHgB7Z1NbBNHFMf/a7uBEgMOHy2pSlnUql+oEG7lgNgcqZAgR9RKSU5tT9mcqp6SXNoj5tBzHAmk3ggSUo/Ziko9skXqoVIlJm3Von4IhzhAIIk7b9ab+COJvZ63610nP8netWx5Z//73syb2Zm3BjqJXc4BixaQMgHjDFCWW5iVb83aH5eL8jdC7lS2a/Ny3wGyLvJGER3CQJRsCHZBfrqCBpHaRkCJuXYb2O9EKWg0AtpKtDF5gnJr5BA+BSVm/sAsQiY8AZW1PSHR7IhE2wwhX1NAWlrlywIhwC9gPISrR8iyFJDvnQIzvALapRH5PgG+uo0bAbLIfLYAJngEtJ+awOq03LOQCAxZN6bGOdw6BV3GyV1X7iEx4hFlGQGs3qt4jBbtW6Cq65bIXW0km7x06XG0SXsCei57S+4NoDtwZUs91I5LBxfQE28O8W0o2kVIEQeDihhMwO4Vz0cEFbF1AbtfPB8RRMTWBNw54vmIVkVsMYxRDYaJnYOpztl+1LQn1VxAu3QN3dPaBkGe80sTzX60vQt7geY0IsDcMw8r+wPO9N6H2TOPXHpBbn9DcfWgehHu09OYf/YGnNJ5uE9OIyJkjyWb3+rLrQVU9R71MMIbELD238XlvjsYOXQTuUywIbziSg6zC5cw8+/HcBbPI0RkwdJnt6oPtxFw6ZbX5eFn5PANDB+5qQTkQCyfwNSfX6Lw3ycICTkclh3c7IvNBQzJdUmwide+YhOunpCFHN1sFGcrAR+AsdUl95zo/xr2q98gCkhAEpIEZUQAL6Qr99XUNY2tsL3EOp5HjcPc2x9FJh5BVQQdk47NiAlkGgZOai2QOWD2xWM+kZah1nvwl+84W2xpfS9OVlthnQWuWugS8QgKhebeuYiBfffBRK7eCutduGng2ApxEM+HX0RjrPrThoD2Y7b7tHERz4dEvPXmVbXl+DvvNq1HlQWmLoMBClPiJJ4PlWn65KfgIbVuhV4jojrNLz2CJlTIBx+cQpwZ+vVbzBYvQZP1xqRigWkLDEybnyHuXDv+BYcrS4PrsWinIqC++17J3Qmth8EJeQlPTErTVDbqQAuajEUYKOsyfPgm9DGU0Rkc9V8S6r56KMDWH8V50SctMKM9WErumzSGj9yAPj0WubAFTXhcIlp4LnrZTFVmhbYNtWiMXaXI4Cm3cUYKmNIa80mieD76UYOyQGgN2SdZQLrnovsXJKAJDRgK0TE4upzaFpjLsHTQO8JB/R6JmYEuyz3A4gEkkuW90EVfwLvyZtXffUgkB03gfWihP0N1h0MCCmhQTOu7QadY0C97UdsCxd64rGQIjtijXXahbYHuvn4kFbf3GDQhC1zTCobcfdqF6Bhur+7FN8gCUy40KGb2wjlgImmQ++pf/LV5skABTb6ncCBhMF10Rwq46kCT/LFzSBozr5yFPituqjJNQUCDpLkxuS9DeUXVXbnybWgydXwQSWHquAUGHHrzBXSgCV3RJFghWV/hKIf7GsroKgKqelB7mfzoW0OIO0zWJ3nu0LsnoKoH9a2Qru64eRFxpXB0gMn6UPCnuFV35a6DgXz/h7F0Zd6La6y3GXUTLEt0f1i7g2guFzH387TaxgESb/DUKEffV/0d8tmT/oe6wYQyixUyF1gLCrGG3r3KWZaavAt1Aq7QghIWs4mDiCQelYGxvy5UBpAqagX0GhMWK1RHq4jIMOrR1rHPnv6cebCjPFO/4KZxmYM3V4ZyIJhgZPIPBxO/zyEKrvefw+TrlrJARmrqPp9IF9qE3biQ1VEsGlIUEGChDWGXyFwshMDIPy7G/voRA0sPwQFVEddl+MQU422CMYt876a9hCaLDVfJlUNrBQaePIQthbywIAJbJbnnjAyMZw+9F3LcSVnjMm0sNiTsEq2JuIYIIDHNZ0VYjx/gxPMicivPar4nweZ7cmoUmSwuwpHw0e0yHTVf8m8v5uvXRuwcZESS379tXpwW7sqtTELlVdlxuM3EI5oLqGLDNFWgAjsHUTnnpuymPWlE8Kc98dlNvNNAMAGJ3dRPNQSf2qEOkKYbIN3UsLjtiEcEt8BquiLEocGT7GS7mX/1BCS8fjMF2wmbZaTyUk9tlxOmFfQFJLwcM1JE4wqSgSNddpQjBSiPgD67SWiZsBcn5V8PIzZCkrvSTTPprsxZzsMRkPDCHQsdtcjwhPMJT8BqvHwM8pUaRuiQaCkHWKOBAAchE42APusPI1Bi0gMJTPAgvPk9NDmgGx9GsBVK0NIA1Mg3rdlTCx9z3rYha5zY2NLjMMo/eXMboxWsnv8Br15XnnLWoGsAAAAASUVORK5CYII=";
29795
29838
  function useBrowserTitleAndIcon(name, logo) {
@@ -30448,7 +30491,7 @@ function useBuildLocalConfigurationPersistence() {
30448
30491
  t0 = $[0];
30449
30492
  }
30450
30493
  const configCache = useRef(t0);
30451
- const getCollectionFromStorage = _temp$6;
30494
+ const getCollectionFromStorage = _temp$7;
30452
30495
  let t1;
30453
30496
  if ($[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
30454
30497
  t1 = (path) => {
@@ -30571,7 +30614,7 @@ function useBuildLocalConfigurationPersistence() {
30571
30614
  }
30572
30615
  return t11;
30573
30616
  }
30574
- function _temp$6(storageKey) {
30617
+ function _temp$7(storageKey) {
30575
30618
  return getLocalStorageJSON(storageKey, {});
30576
30619
  }
30577
30620
  function useBuildModeController() {
@@ -30734,78 +30777,32 @@ function useValidateAuthenticator(t0) {
30734
30777
  }
30735
30778
  return t7;
30736
30779
  }
30737
- function useNavigationUnsavedChangesDialog(when, onSuccess) {
30738
- const [isDialogOpen, setIsDialogOpen] = useState(false);
30739
- const [pendingNavigation, setPendingNavigation] = useState(null);
30740
- const handleCancel = useCallback(() => {
30741
- setIsDialogOpen(false);
30742
- setPendingNavigation(null);
30743
- }, []);
30744
- const handleOk = useCallback(() => {
30745
- setIsDialogOpen(false);
30746
- if (pendingNavigation) {
30747
- onSuccess();
30748
- if (pendingNavigation.type === "popstate") {
30749
- window.history.go(pendingNavigation.delta);
30750
- } else if (pendingNavigation.type === "link") {
30751
- window.location.href = pendingNavigation.href;
30752
- }
30753
- setPendingNavigation(null);
30754
- }
30755
- }, [onSuccess, pendingNavigation]);
30756
- const handleBeforeUnload = useCallback((e) => {
30757
- if (when) {
30758
- e.preventDefault();
30759
- e.returnValue = "";
30760
- }
30761
- }, [when]);
30762
- const handlePopState = useCallback((e_0) => {
30763
- if (when) {
30764
- e_0.preventDefault();
30765
- setPendingNavigation({
30766
- type: "popstate",
30767
- delta: -1
30768
- });
30769
- setIsDialogOpen(true);
30770
- }
30771
- }, [when]);
30772
- const handleLinkClick = useCallback((e_1) => {
30773
- if (!when) return;
30774
- const target = e_1.target;
30775
- const anchor = target.closest("a[href]");
30776
- if (anchor && anchor.host === window.location.host) {
30777
- e_1.preventDefault();
30778
- const href = anchor.getAttribute("href");
30779
- if (href) {
30780
- setPendingNavigation({
30781
- type: "link",
30782
- href
30783
- });
30784
- setIsDialogOpen(true);
30780
+ function useLeavePageConfirmation(when) {
30781
+ const $ = c(3);
30782
+ let t0;
30783
+ let t1;
30784
+ if ($[0] !== when) {
30785
+ t0 = () => {
30786
+ if (!when) {
30787
+ return;
30785
30788
  }
30786
- }
30787
- }, [when]);
30788
- useEffect(() => {
30789
- if (when) {
30789
+ const handleBeforeUnload = _temp$6;
30790
30790
  window.addEventListener("beforeunload", handleBeforeUnload);
30791
- window.addEventListener("popstate", handlePopState);
30792
- document.addEventListener("click", handleLinkClick);
30793
- } else {
30794
- window.removeEventListener("beforeunload", handleBeforeUnload);
30795
- window.removeEventListener("popstate", handlePopState);
30796
- document.removeEventListener("click", handleLinkClick);
30797
- }
30798
- return () => {
30799
- window.removeEventListener("beforeunload", handleBeforeUnload);
30800
- window.removeEventListener("popstate", handlePopState);
30801
- document.removeEventListener("click", handleLinkClick);
30791
+ return () => window.removeEventListener("beforeunload", handleBeforeUnload);
30802
30792
  };
30803
- }, [when, handleBeforeUnload, handlePopState, handleLinkClick]);
30804
- return {
30805
- navigationWasBlocked: isDialogOpen,
30806
- handleCancel,
30807
- handleOk
30808
- };
30793
+ t1 = [when];
30794
+ $[0] = when;
30795
+ $[1] = t0;
30796
+ $[2] = t1;
30797
+ } else {
30798
+ t0 = $[1];
30799
+ t1 = $[2];
30800
+ }
30801
+ useEffect(t0, t1);
30802
+ }
30803
+ function _temp$6(e) {
30804
+ e.preventDefault();
30805
+ e.returnValue = "";
30809
30806
  }
30810
30807
  function UnsavedChangesDialog(t0) {
30811
30808
  const $ = c(30);
@@ -31125,17 +31122,14 @@ function SideDialogView({
31125
31122
  const widthRef = React__default.useRef(panel?.width);
31126
31123
  const width = widthRef.current;
31127
31124
  const sideDialogsController = useSideDialogsController();
31128
- const {
31129
- handleOk: handleNavigationOk,
31130
- handleCancel: handleNavigationCancel
31131
- } = useNavigationUnsavedChangesDialog(blocked && !drawerCloseRequested, () => setBlocked(false));
31125
+ useLeavePageConfirmation(blocked && !drawerCloseRequested);
31132
31126
  useEffect(() => {
31133
31127
  if (panel) widthRef.current = panel.width;
31134
31128
  }, [panel]);
31135
31129
  const handleDrawerCloseOk = () => {
31136
31130
  setBlocked(false);
31137
31131
  setDrawerCloseRequested(false);
31138
- sideDialogsController.close();
31132
+ sideDialogsController.close(panel?.key);
31139
31133
  panel?.onClose?.();
31140
31134
  };
31141
31135
  const handleDrawerCloseCancel = () => {
@@ -31145,7 +31139,7 @@ function SideDialogView({
31145
31139
  if (blocked && !force) {
31146
31140
  setDrawerCloseRequested(true);
31147
31141
  } else {
31148
- sideDialogsController.close();
31142
+ sideDialogsController.close(panel?.key);
31149
31143
  panel?.onClose?.();
31150
31144
  }
31151
31145
  };
@@ -31178,7 +31172,7 @@ function SideDialogView({
31178
31172
  width
31179
31173
  } })
31180
31174
  ] }),
31181
- /* @__PURE__ */ jsx(UnsavedChangesDialog, { open: drawerCloseRequested, handleOk: drawerCloseRequested ? handleDrawerCloseOk : handleNavigationOk, handleCancel: drawerCloseRequested ? handleDrawerCloseCancel : handleNavigationCancel, body: blockedNavigationMessage })
31175
+ /* @__PURE__ */ jsx(UnsavedChangesDialog, { open: drawerCloseRequested, handleOk: handleDrawerCloseOk, handleCancel: handleDrawerCloseCancel, body: blockedNavigationMessage })
31182
31176
  ] });
31183
31177
  }
31184
31178
  function EntityEditViewFormActions({
@@ -31644,6 +31638,9 @@ function EntityEditViewInner({
31644
31638
  }, [selectedTabProp]);
31645
31639
  const subcollections = (collection.subcollections ?? []).filter((c2) => !c2.hideFromNavigation);
31646
31640
  const subcollectionsCount = subcollections?.length ?? 0;
31641
+ const [subcollectionCounts, setSubcollectionCounts] = useState({});
31642
+ const selectedSubcollection = subcollections.find((subcollection) => (subcollection.id ?? subcollection.path) === selectedTab);
31643
+ const selectedSubcollectionDataSource = useDataSource();
31647
31644
  const customViews = collection.entityViews ?? [];
31648
31645
  const customViewsCount = customViews?.length ?? 0;
31649
31646
  const includeJsonView = collection.includeJsonView === void 0 ? true : collection.includeJsonView;
@@ -31717,15 +31714,18 @@ function EntityEditViewInner({
31717
31714
  const jsonView = selectedTab === JSON_TAB_VALUE || mountedTabsRef.current.has(JSON_TAB_VALUE) ? /* @__PURE__ */ jsx("div", { className: cls("relative flex-1 h-full overflow-auto w-full", {
31718
31715
  "hidden": selectedTab !== JSON_TAB_VALUE
31719
31716
  }), role: "tabpanel", children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(EntityJsonPreview, { values: formContext?.values ?? entity?.values ?? {} }) }) }, "json_view") : null;
31720
- const subCollectionsViews = subcollections && subcollections.map((subcollection) => {
31721
- const subcollectionId = subcollection.id ?? subcollection.path;
31722
- const newFullPath = usedEntity ? `${path}/${usedEntity?.id}/${removeInitialAndTrailingSlashes(subcollection.path)}` : void 0;
31717
+ const subCollectionsViews = subcollections && subcollections.map((subcollection_0) => {
31718
+ const subcollectionId = subcollection_0.id ?? subcollection_0.path;
31719
+ const newFullPath = usedEntity ? `${path}/${usedEntity?.id}/${removeInitialAndTrailingSlashes(subcollection_0.path)}` : void 0;
31723
31720
  const newFullIdPath = fullIdPath && usedEntity ? `${fullIdPath}/${encodeEntityId(usedEntity.id)}/${removeInitialAndTrailingSlashes(subcollectionId)}` : void 0;
31724
- const newPathSegments = buildSubcollectionPathSegments(pathSegments, usedEntity?.id, subcollection.path);
31721
+ const newPathSegments = buildSubcollectionPathSegments(pathSegments, usedEntity?.id, subcollection_0.path);
31725
31722
  if (selectedTab !== subcollectionId) return null;
31726
31723
  return /* @__PURE__ */ jsxs("div", { className: "relative flex-1 h-full overflow-auto w-full", role: "tabpanel", children: [
31727
31724
  globalLoading && /* @__PURE__ */ jsx(CircularProgressCenter, {}),
31728
- !globalLoading && (usedEntity && newFullPath ? /* @__PURE__ */ jsx(EntityCollectionView$1, { fullPath: newFullPath, pathSegments: newPathSegments, fullIdPath: newFullIdPath, parentCollectionIds: [...parentCollectionIds, collection.id], isSubCollection: true, updateUrl: false, ...subcollection, openEntityMode: layout }) : /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-full h-full p-3", children: /* @__PURE__ */ jsx(Typography, { variant: "label", children: t("youd_need_to_save_before_additional_collections") }) }))
31725
+ !globalLoading && (usedEntity && newFullPath ? /* @__PURE__ */ jsx(EntityCollectionView$1, { fullPath: newFullPath, pathSegments: newPathSegments, fullIdPath: newFullIdPath, parentCollectionIds: [...parentCollectionIds, collection.id], isSubCollection: true, updateUrl: false, ...subcollection_0, openEntityMode: layout, onCountChange: (count) => setSubcollectionCounts((counts) => counts[subcollectionId] === count ? counts : {
31726
+ ...counts,
31727
+ [subcollectionId]: count
31728
+ }) }) : /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-full h-full p-3", children: /* @__PURE__ */ jsx(Typography, { variant: "label", children: t("youd_need_to_save_before_additional_collections") }) }))
31729
31729
  ] }, `subcol_${subcollectionId}`);
31730
31730
  }).filter(Boolean);
31731
31731
  const onSideTabClick = (value_0) => {
@@ -31761,7 +31761,7 @@ function EntityEditViewInner({
31761
31761
  onSaved?.(res);
31762
31762
  formProps?.onSaved?.(res);
31763
31763
  }, Builder: selectedSecondaryForm?.Builder });
31764
- const subcollectionTabs = subcollections && subcollections.filter((sub) => !groupedViews.includes(sub.id ?? sub.path)).map((subcollection_0) => /* @__PURE__ */ jsx(Tab, { className: "text-sm min-w-[120px]", value: subcollection_0.id ?? subcollection_0.path, children: subcollection_0.name }, `entity_detail_collection_tab_${subcollection_0.name}`));
31764
+ const subcollectionTabs = subcollections && subcollections.filter((sub) => !groupedViews.includes(sub.id ?? sub.path)).map((subcollection_1) => /* @__PURE__ */ jsx(Tab, { className: "text-sm min-w-[120px]", value: subcollection_1.id ?? subcollection_1.path, children: subcollection_1.name }, `entity_detail_collection_tab_${subcollection_1.name}`));
31765
31765
  const customViewTabsStart = resolvedEntityViews.filter((view) => view.position === "start" && !groupedViews.includes(view.key)).map((view_0) => /* @__PURE__ */ jsx(Tab, { className: !view_0.tabComponent ? "text-sm min-w-[120px]" : void 0, value: view_0.key, children: view_0.tabComponent ?? view_0.name }, `entity_detail_collection_tab_${view_0.name}`));
31766
31766
  const customViewTabsEnd = resolvedEntityViews.filter((view_1) => (!view_1.position || view_1.position === "end") && !groupedViews.includes(view_1.key)).map((view_2) => /* @__PURE__ */ jsx(Tab, { className: !view_2.tabComponent ? "text-sm min-w-[120px]" : void 0, value: view_2.key, children: view_2.tabComponent ?? view_2.name }, `entity_detail_collection_tab_${view_2.name}`));
31767
31767
  const viewGroupMenus = collection.viewGroups?.map((group) => {
@@ -31770,13 +31770,17 @@ function EntityEditViewInner({
31770
31770
  group.name,
31771
31771
  /* @__PURE__ */ jsx(ExpandMoreIcon, { className: "ml-1 -mr-1", size: "small" })
31772
31772
  ] }), children: group.views.map((viewId) => {
31773
- const subcollection_1 = subcollections.find((s) => (s.id ?? s.path) === viewId);
31773
+ const subcollection_2 = subcollections.find((s) => (s.id ?? s.path) === viewId);
31774
31774
  const customView_0 = resolvedEntityViews.find((v) => v.key === viewId);
31775
- const name = subcollection_1?.name ?? customView_0?.name ?? viewId;
31775
+ const name = subcollection_2?.name ?? customView_0?.name ?? viewId;
31776
31776
  return /* @__PURE__ */ jsx(MenuItem, { onClick: () => onSideTabClick(viewId), className: selectedTab === viewId ? "bg-surface-accent-100 dark:bg-surface-accent-900" : "", children: name }, `view_group_${group.name}_${viewId}`);
31777
31777
  }) }, `view_group_${group.name}`);
31778
31778
  });
31779
31779
  const shouldShowTopBar = Boolean(barActions) || hasAdditionalViews;
31780
+ const subcollectionTitle = layout === "side_panel" && selectedSubcollection && usedEntity ? (() => {
31781
+ const subcollectionId_0 = selectedSubcollection.id ?? selectedSubcollection.path;
31782
+ return /* @__PURE__ */ jsx(CollectionPathTitle, { path: fullIdPath ? `${fullIdPath}/${encodeEntityId(usedEntity.id)}/${removeInitialAndTrailingSlashes(subcollectionId_0)}` : `${path}/${usedEntity.id}/${removeInitialAndTrailingSlashes(selectedSubcollection.path)}`, name: selectedSubcollection.name, count: subcollectionCounts[subcollectionId_0] ?? (selectedSubcollectionDataSource.countEntities ? null : void 0) });
31783
+ })() : null;
31780
31784
  let result = /* @__PURE__ */ jsxs("div", { className: "relative flex flex-col h-full w-full bg-white dark:bg-surface-900", children: [
31781
31785
  shouldShowTopBar && /* @__PURE__ */ jsxs("div", { className: cls("h-14 items-center overflow-hidden w-full border-b pl-2 pr-2 flex gap-2 bg-surface-50 dark:bg-surface-900", defaultBorderMixin), children: [
31782
31786
  barActions?.({
@@ -31785,6 +31789,7 @@ function EntityEditViewInner({
31785
31789
  values: formContext?.values ?? usedEntity?.values ?? {},
31786
31790
  status
31787
31791
  }),
31792
+ subcollectionTitle,
31788
31793
  /* @__PURE__ */ jsx("div", { className: "flex-grow" }),
31789
31794
  pluginActionsTop,
31790
31795
  globalLoading && /* @__PURE__ */ jsx("div", { className: "self-center", children: /* @__PURE__ */ jsx(CircularProgress, { size: "small" }) }),
@@ -32036,7 +32041,7 @@ const propsToSidePanel = (props, buildUrlCollectionPath, resolveIdsFrom, smallLa
32036
32041
  };
32037
32042
  };
32038
32043
  function useBuildSideDialogsController() {
32039
- const $ = c(21);
32044
+ const $ = c(23);
32040
32045
  const location = useLocation();
32041
32046
  const navigate = useNavigate();
32042
32047
  let t0;
@@ -32059,46 +32064,78 @@ function useBuildSideDialogsController() {
32059
32064
  const routesCount = useRef(0);
32060
32065
  let t2;
32061
32066
  if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
32062
- t2 = (newPanels) => {
32063
- sidePanelsRef.current = newPanels;
32064
- setSidePanels(newPanels);
32065
- };
32067
+ t2 = {};
32066
32068
  $[2] = t2;
32067
32069
  } else {
32068
32070
  t2 = $[2];
32069
32071
  }
32070
- const updateSidePanels = t2;
32072
+ const entryKeysOfPanelsWithoutUrl = useRef(t2);
32071
32073
  let t3;
32072
- if ($[3] !== location.state) {
32073
- t3 = () => {
32074
+ if ($[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
32075
+ t3 = (newPanels) => {
32076
+ sidePanelsRef.current = newPanels;
32077
+ setSidePanels(newPanels);
32078
+ };
32079
+ $[3] = t3;
32080
+ } else {
32081
+ t3 = $[3];
32082
+ }
32083
+ const updateSidePanels = t3;
32084
+ let t4;
32085
+ if ($[4] !== location.key || $[5] !== location.state) {
32086
+ t4 = () => {
32074
32087
  const state = location.state;
32075
32088
  const panelKeys = state?.panels ?? [];
32076
- const newPanels_0 = panelKeys.map((key) => routesStore.current[key]).filter(_temp$4);
32089
+ const panelsInHistory = panelKeys.map((key) => routesStore.current[key]).filter(_temp$4);
32090
+ const keptPanels = [];
32091
+ let matched = 0;
32092
+ for (const panel of sidePanelsRef.current) {
32093
+ if (panelsInHistory[matched]?.key === panel.key) {
32094
+ keptPanels.push(panel);
32095
+ matched++;
32096
+ } else {
32097
+ if (!panel.urlPath && (keptPanels.length > 0 || entryKeysOfPanelsWithoutUrl.current[panel.key] === location.key)) {
32098
+ keptPanels.push(panel);
32099
+ } else {
32100
+ break;
32101
+ }
32102
+ }
32103
+ }
32104
+ const newPanels_0 = [...keptPanels, ...panelsInHistory.slice(matched)];
32077
32105
  if (!equal(sidePanelsRef.current.map(_temp2$3), newPanels_0.map(_temp3$2))) {
32078
32106
  updateSidePanels(newPanels_0);
32079
32107
  }
32080
32108
  };
32081
- $[3] = location.state;
32082
- $[4] = t3;
32083
- } else {
32084
- t3 = $[4];
32085
- }
32086
- let t4;
32087
- if ($[5] !== location) {
32088
- t4 = [location];
32089
- $[5] = location;
32109
+ $[4] = location.key;
32110
+ $[5] = location.state;
32090
32111
  $[6] = t4;
32091
32112
  } else {
32092
32113
  t4 = $[6];
32093
32114
  }
32094
- useEffect(t3, t4);
32095
32115
  let t5;
32096
- if ($[7] !== location || $[8] !== navigate) {
32097
- t5 = () => {
32116
+ if ($[7] !== location) {
32117
+ t5 = [location];
32118
+ $[7] = location;
32119
+ $[8] = t5;
32120
+ } else {
32121
+ t5 = $[8];
32122
+ }
32123
+ useEffect(t4, t5);
32124
+ let t6;
32125
+ if ($[9] !== location || $[10] !== navigate) {
32126
+ t6 = (key_0) => {
32098
32127
  const currentPanels = sidePanelsRef.current;
32099
32128
  if (currentPanels.length === 0) {
32100
32129
  return;
32101
32130
  }
32131
+ const index = key_0 !== void 0 ? currentPanels.findLastIndex((p_2) => p_2.key === key_0) : -1;
32132
+ if (index !== -1 && index < currentPanels.length - 1 && !currentPanels[index].urlPath) {
32133
+ updateSidePanels(currentPanels.filter((_, i) => i !== index));
32134
+ if (routesCount.current > 0) {
32135
+ routesCount.current = routesCount.current - 1;
32136
+ }
32137
+ return;
32138
+ }
32102
32139
  const lastSidePanel = currentPanels[currentPanels.length - 1];
32103
32140
  const updatedPanels = [...currentPanels.slice(0, -1)];
32104
32141
  updateSidePanels(updatedPanels);
@@ -32120,28 +32157,31 @@ function useBuildSideDialogsController() {
32120
32157
  }
32121
32158
  }
32122
32159
  };
32123
- $[7] = location;
32124
- $[8] = navigate;
32125
- $[9] = t5;
32160
+ $[9] = location;
32161
+ $[10] = navigate;
32162
+ $[11] = t6;
32126
32163
  } else {
32127
- t5 = $[9];
32164
+ t6 = $[11];
32128
32165
  }
32129
- const close = t5;
32130
- let t6;
32131
- if ($[10] !== location || $[11] !== navigate) {
32132
- t6 = (panelProps) => {
32166
+ const close = t6;
32167
+ let t7;
32168
+ if ($[12] !== location || $[13] !== navigate) {
32169
+ t7 = (panelProps) => {
32133
32170
  const newPanels_1 = Array.isArray(panelProps) ? panelProps : [panelProps];
32134
- newPanels_1.forEach((panel) => {
32135
- routesStore.current[panel.key] = panel;
32171
+ newPanels_1.forEach((panel_0) => {
32172
+ routesStore.current[panel_0.key] = panel_0;
32173
+ if (!panel_0.urlPath) {
32174
+ entryKeysOfPanelsWithoutUrl.current[panel_0.key] = location.key;
32175
+ }
32136
32176
  });
32137
32177
  routesCount.current = routesCount.current + newPanels_1.length;
32138
32178
  const baseLocation_0 = location.state?.base_location ?? location;
32139
32179
  const currentPanels_0 = sidePanelsRef.current;
32140
32180
  const updatedPanels_0 = [...currentPanels_0, ...newPanels_1];
32141
32181
  updateSidePanels(updatedPanels_0);
32142
- newPanels_1.forEach((panel_0) => {
32143
- if (panel_0.urlPath) {
32144
- navigate(panel_0.urlPath, {
32182
+ newPanels_1.forEach((panel_1) => {
32183
+ if (panel_1.urlPath) {
32184
+ navigate(panel_1.urlPath, {
32145
32185
  state: {
32146
32186
  base_location: baseLocation_0,
32147
32187
  panels: updatedPanels_0.map(_temp5)
@@ -32150,27 +32190,30 @@ function useBuildSideDialogsController() {
32150
32190
  }
32151
32191
  });
32152
32192
  };
32153
- $[10] = location;
32154
- $[11] = navigate;
32155
- $[12] = t6;
32193
+ $[12] = location;
32194
+ $[13] = navigate;
32195
+ $[14] = t7;
32156
32196
  } else {
32157
- t6 = $[12];
32197
+ t7 = $[14];
32158
32198
  }
32159
- const open = t6;
32160
- let t7;
32161
- if ($[13] !== location || $[14] !== navigate) {
32162
- t7 = (panelProps_0) => {
32199
+ const open = t7;
32200
+ let t8;
32201
+ if ($[15] !== location || $[16] !== navigate) {
32202
+ t8 = (panelProps_0) => {
32163
32203
  const newPanels_2 = Array.isArray(panelProps_0) ? panelProps_0 : [panelProps_0];
32164
- newPanels_2.forEach((panel_1) => {
32165
- routesStore.current[panel_1.key] = panel_1;
32204
+ newPanels_2.forEach((panel_2) => {
32205
+ routesStore.current[panel_2.key] = panel_2;
32206
+ if (!panel_2.urlPath) {
32207
+ entryKeysOfPanelsWithoutUrl.current[panel_2.key] = location.key;
32208
+ }
32166
32209
  });
32167
32210
  const baseLocation_1 = location.state?.base_location ?? location;
32168
32211
  const currentPanels_1 = sidePanelsRef.current;
32169
32212
  const updatedPanels_1 = [...currentPanels_1.slice(0, -newPanels_2.length), ...newPanels_2];
32170
32213
  updateSidePanels(updatedPanels_1);
32171
- newPanels_2.forEach((panel_2) => {
32172
- if (panel_2.urlPath) {
32173
- navigate(panel_2.urlPath, {
32214
+ newPanels_2.forEach((panel_3) => {
32215
+ if (panel_3.urlPath) {
32216
+ navigate(panel_3.urlPath, {
32174
32217
  replace: true,
32175
32218
  state: {
32176
32219
  base_location: baseLocation_1,
@@ -32180,41 +32223,41 @@ function useBuildSideDialogsController() {
32180
32223
  }
32181
32224
  });
32182
32225
  };
32183
- $[13] = location;
32184
- $[14] = navigate;
32185
- $[15] = t7;
32226
+ $[15] = location;
32227
+ $[16] = navigate;
32228
+ $[17] = t8;
32186
32229
  } else {
32187
- t7 = $[15];
32230
+ t8 = $[17];
32188
32231
  }
32189
- const replace = t7;
32190
- let t8;
32191
- if ($[16] !== close || $[17] !== open || $[18] !== replace || $[19] !== sidePanels) {
32192
- t8 = {
32232
+ const replace = t8;
32233
+ let t9;
32234
+ if ($[18] !== close || $[19] !== open || $[20] !== replace || $[21] !== sidePanels) {
32235
+ t9 = {
32193
32236
  sidePanels,
32194
32237
  setSidePanels: updateSidePanels,
32195
32238
  close,
32196
32239
  open,
32197
32240
  replace
32198
32241
  };
32199
- $[16] = close;
32200
- $[17] = open;
32201
- $[18] = replace;
32202
- $[19] = sidePanels;
32203
- $[20] = t8;
32242
+ $[18] = close;
32243
+ $[19] = open;
32244
+ $[20] = replace;
32245
+ $[21] = sidePanels;
32246
+ $[22] = t9;
32204
32247
  } else {
32205
- t8 = $[20];
32248
+ t9 = $[22];
32206
32249
  }
32207
- return t8;
32250
+ return t9;
32251
+ }
32252
+ function _temp6(p_5) {
32253
+ return p_5.key;
32208
32254
  }
32209
- function _temp6(p_4) {
32255
+ function _temp5(p_4) {
32210
32256
  return p_4.key;
32211
32257
  }
32212
- function _temp5(p_3) {
32258
+ function _temp4$1(p_3) {
32213
32259
  return p_3.key;
32214
32260
  }
32215
- function _temp4$1(p_2) {
32216
- return p_2.key;
32217
- }
32218
32261
  function _temp3$2(p_1) {
32219
32262
  return p_1.key;
32220
32263
  }
@@ -32630,7 +32673,7 @@ function FireCMS(props) {
32630
32673
  children,
32631
32674
  entityLinkBuilder,
32632
32675
  userConfigPersistence,
32633
- dateTimeFormat,
32676
+ dateTimeFormat: dateTimeFormat2,
32634
32677
  locale,
32635
32678
  authController,
32636
32679
  storageSource,
@@ -32679,7 +32722,7 @@ function FireCMS(props) {
32679
32722
  const pluginsLoading = plugins?.some((p_0) => p_0.loading) ?? false;
32680
32723
  const loading = authController.initialLoading || navigationController.loading || pluginsLoading;
32681
32724
  const customizationController = {
32682
- dateTimeFormat,
32725
+ dateTimeFormat: dateTimeFormat2,
32683
32726
  locale,
32684
32727
  entityLinkBuilder,
32685
32728
  plugins,
@@ -35822,12 +35865,12 @@ const es = {
35822
35865
  };
35823
35866
  const FIRECMS_NS = "firecms_core";
35824
35867
  const localeLoaders = {
35825
- de: () => import("./de-CUF9f7S-.js").then((m) => m.de),
35826
- fr: () => import("./fr-DmkMX6hp.js").then((m) => m.fr),
35827
- it: () => import("./it-BwQflFGz.js").then((m) => m.it),
35828
- hi: () => import("./hi-BKuaMr7w.js").then((m) => m.hi),
35829
- pt: () => import("./pt-D5q7OQp1.js").then((m) => m.pt),
35830
- pl: () => import("./pl-BPsAvZvc.js").then((m) => m.pl)
35868
+ de: () => import("./de-CNfJQcnh.js").then((m) => m.de),
35869
+ fr: () => import("./fr-CBtSvDVp.js").then((m) => m.fr),
35870
+ it: () => import("./it-CdsoaRVO.js").then((m) => m.it),
35871
+ hi: () => import("./hi-Delc4l61.js").then((m) => m.hi),
35872
+ pt: () => import("./pt-DCfk8Nkq.js").then((m) => m.pt),
35873
+ pl: () => import("./pl-DoTvWcwp.js").then((m) => m.pl)
35831
35874
  };
35832
35875
  const loadedLocales = {
35833
35876
  en,
@@ -35996,7 +36039,7 @@ function buildResources(translations) {
35996
36039
  }
35997
36040
  return resources;
35998
36041
  }
35999
- const LazyFireCMSEditor = React__default.lazy(() => import("./editor-WZytSO_1.js").then((module) => ({
36042
+ const LazyFireCMSEditor = React__default.lazy(() => import("./editor-D0A5yaaJ.js").then((module) => ({
36000
36043
  default: module.FireCMSEditor
36001
36044
  })));
36002
36045
  function FireCMSEditor(props) {
@@ -36247,6 +36290,7 @@ export {
36247
36290
  jsonStringifyReplacer,
36248
36291
  lazyEager,
36249
36292
  loadDateFnsLocale,
36293
+ localeToLanguageTag,
36250
36294
  makePropertiesEditable,
36251
36295
  mergeCallbacks,
36252
36296
  mergeCollection,
@@ -36284,6 +36328,7 @@ export {
36284
36328
  resolveEntityAction,
36285
36329
  resolveEntityView,
36286
36330
  resolveEnumValues,
36331
+ resolveLocale,
36287
36332
  resolveNavigationFrom,
36288
36333
  resolvePermissions,
36289
36334
  resolveProperties,