@firecms/core 3.3.0 → 3.4.0-canary.f6a889a

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 (65) hide show
  1. package/dist/app/useApp.d.ts +1 -0
  2. package/dist/components/EntityCollectionTable/column_utils.d.ts +4 -3
  3. package/dist/components/EntityCollectionView/FiltersDialog.d.ts +2 -1
  4. package/dist/components/EntityPreview.d.ts +3 -1
  5. package/dist/core/DefaultDrawer.d.ts +10 -3
  6. package/dist/core/field_configs.d.ts +1 -1
  7. package/dist/form/field_bindings/GeopointFieldBinding.d.ts +5 -0
  8. package/dist/form/index.d.ts +1 -0
  9. package/dist/index.es.js +1979 -721
  10. package/dist/index.es.js.map +1 -1
  11. package/dist/index.umd.js +1978 -720
  12. package/dist/index.umd.js.map +1 -1
  13. package/dist/locales/pl.d.ts +2 -0
  14. package/dist/preview/index.d.ts +1 -0
  15. package/dist/preview/property_previews/GeopointPropertyPreview.d.ts +4 -0
  16. package/dist/types/collections.d.ts +17 -0
  17. package/dist/util/entities.d.ts +1 -0
  18. package/dist/util/geopoint.d.ts +22 -0
  19. package/dist/util/index.d.ts +1 -0
  20. package/dist/util/navigation_blocking.d.ts +22 -0
  21. package/dist/util/navigation_from_path.d.ts +10 -0
  22. package/dist/util/navigation_utils.d.ts +20 -0
  23. package/package.json +16 -9
  24. package/src/app/Scaffold.tsx +34 -44
  25. package/src/app/useApp.tsx +1 -0
  26. package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +2 -1
  27. package/src/components/EntityCollectionTable/column_utils.tsx +11 -19
  28. package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +1 -1
  29. package/src/components/EntityCollectionView/EntityCollectionViewStartActions.tsx +4 -1
  30. package/src/components/EntityCollectionView/FiltersDialog.tsx +39 -28
  31. package/src/components/EntityPreview.tsx +41 -40
  32. package/src/components/ReferenceWidget.tsx +1 -1
  33. package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +2 -2
  34. package/src/components/VirtualTable/VirtualTable.tsx +19 -8
  35. package/src/components/common/useDataSourceTableController.tsx +66 -10
  36. package/src/core/DefaultDrawer.tsx +150 -64
  37. package/src/core/DrawerNavigationGroup.tsx +27 -29
  38. package/src/core/DrawerNavigationItem.tsx +10 -12
  39. package/src/core/EntityEditView.tsx +57 -32
  40. package/src/core/field_configs.tsx +15 -0
  41. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +1 -1
  42. package/src/form/field_bindings/GeopointFieldBinding.tsx +139 -0
  43. package/src/form/index.tsx +1 -0
  44. package/src/i18n/FireCMSi18nProvider.tsx +2 -0
  45. package/src/internal/useBuildSideEntityController.tsx +2 -1
  46. package/src/locales/de.ts +2 -2
  47. package/src/locales/en.ts +2 -2
  48. package/src/locales/es.ts +2 -2
  49. package/src/locales/fr.ts +2 -2
  50. package/src/locales/hi.ts +2 -2
  51. package/src/locales/it.ts +2 -2
  52. package/src/locales/pl.ts +730 -0
  53. package/src/locales/pt.ts +2 -2
  54. package/src/preview/PropertyPreview.tsx +12 -0
  55. package/src/preview/index.ts +1 -0
  56. package/src/preview/property_previews/GeopointPropertyPreview.tsx +23 -0
  57. package/src/routes/FireCMSRoute.tsx +44 -25
  58. package/src/types/collections.ts +18 -0
  59. package/src/util/entities.ts +13 -0
  60. package/src/util/geopoint.ts +81 -0
  61. package/src/util/index.ts +1 -0
  62. package/src/util/navigation_blocking.ts +45 -0
  63. package/src/util/navigation_from_path.ts +23 -6
  64. package/src/util/navigation_utils.ts +36 -2
  65. package/src/util/parent_references_from_path.ts +4 -2
package/dist/index.es.js CHANGED
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { c } from "react-compiler-runtime";
3
3
  import * as React from "react";
4
4
  import React__default, { useState, useRef, useEffect, useContext, useCallback, useMemo, createElement, forwardRef, createRef, createContext, memo, useLayoutEffect } from "react";
5
- import { getColorSchemeForSeed, CHIP_COLORS, FunctionsIcon, CircleIcon, iconKeys, coolIconKeys, Icon, Tooltip, ErrorIcon, Typography, IconButton, ContentCopyIcon, OpenInNewIcon, DescriptionIcon, cls, Skeleton, Chip, defaultBorderMixin, KeyboardTabIcon, Checkbox, AccountCircleIcon, Markdown, TextareaAutosize, focusedDisabled, MultiSelect, MultiSelectItem, Select, SelectItem, BooleanSwitch, DateTimeField, paperMixin, EditIcon, DoNotDisturbOnIcon, InfoIcon, CloseIcon, Button, ExpandablePanel, fieldBackgroundMixin, RemoveIcon, fieldBackgroundDisabledMixin, fieldBackgroundHoverMixin, TextField, Collapse, BooleanSwitchWithLabel, AddIcon, ArrowDropDownIcon, MenuItem, Menu, CircularProgress, DialogActions, LoadingButton, WarningIcon, KeyboardArrowDownIcon, VisibilityIcon, CheckIcon, CancelIcon, DialogTitle, DialogContent, Dialog, Alert, NotesIcon, MoreVertIcon, Badge, SearchBar, ArrowUpwardIcon, Popover, FilterListIcon, CenteredView, AssignmentIcon, Label, useOutsideAlerter, FileCopyIcon, DeleteIcon, StarIcon, ArrowForwardIcon, Card, cardMixin, cardClickableMixin, Container, getColorSchemeForKey, RefreshIcon, ListIcon, AppsIcon, ViewKanbanIcon, ToggleButtonGroup, ViewColumnIcon, FilterListOffIcon, SearchIcon, DarkModeIcon, LightModeIcon, BrightnessMediumIcon, LogoutIcon, Avatar, HandleIcon, KeyboardArrowUpIcon, debounce, AutoAwesomeIcon, TranslateIcon, OpenInFullIcon, Sheet, Tab, ExpandMoreIcon, Tabs, CodeIcon, ViewStreamIcon, RepeatIcon, BallotIcon, ScheduleIcon, AddLinkIcon, LinkIcon, DriveFolderUploadIcon, UploadFileIcon, FormatListNumberedIcon, NumbersIcon, PersonIcon, ListAltIcon, FlagIcon, MailIcon, HttpIcon, FormatQuoteIcon, SubjectIcon, ShortTextIcon, MenuIcon, ChevronLeftIcon, TextFieldsIcon, CheckBoxIcon, LooksOneIcon, LooksTwoIcon, Looks3Icon, FormatListBulletedIcon, ImageIcon, TableChartIcon, AutoFixHighIcon, FormatBoldIcon, FormatItalicIcon, FormatUnderlinedIcon, FormatStrikethroughIcon, useInjectStyles, Separator } from "@firecms/ui";
5
+ import { getColorSchemeForSeed, CHIP_COLORS, FunctionsIcon, CircleIcon, iconKeys, coolIconKeys, Icon, Tooltip, ErrorIcon, Typography, IconButton, ContentCopyIcon, OpenInNewIcon, DescriptionIcon, cls, Skeleton, Chip, defaultBorderMixin, KeyboardTabIcon, Checkbox, AccountCircleIcon, Markdown, TextareaAutosize, focusedDisabled, MultiSelect, MultiSelectItem, Select, SelectItem, BooleanSwitch, DateTimeField, paperMixin, EditIcon, DoNotDisturbOnIcon, InfoIcon, CloseIcon, Button, ExpandablePanel, fieldBackgroundMixin, RemoveIcon, fieldBackgroundDisabledMixin, fieldBackgroundHoverMixin, TextField, Collapse, BooleanSwitchWithLabel, AddIcon, ArrowDropDownIcon, MenuItem, Menu, CircularProgress, DialogActions, LoadingButton, WarningIcon, KeyboardArrowDownIcon, VisibilityIcon, CheckIcon, CancelIcon, DialogTitle, DialogContent, Dialog, Alert, NotesIcon, MoreVertIcon, Badge, SearchBar, ArrowUpwardIcon, Popover, FilterListIcon, CenteredView, AssignmentIcon, Label, useOutsideAlerter, FileCopyIcon, DeleteIcon, StarIcon, ArrowForwardIcon, Card, cardMixin, cardClickableMixin, Container, getColorSchemeForKey, RefreshIcon, ListIcon, AppsIcon, ViewKanbanIcon, ToggleButtonGroup, ViewColumnIcon, FilterListOffIcon, SearchIcon, DarkModeIcon, LightModeIcon, BrightnessMediumIcon, LogoutIcon, Avatar, HandleIcon, KeyboardArrowUpIcon, debounce, AutoAwesomeIcon, TranslateIcon, OpenInFullIcon, Sheet, Tab, ExpandMoreIcon, Tabs, CodeIcon, KeyboardDoubleArrowLeftIcon, KeyboardDoubleArrowRightIcon, ViewStreamIcon, RepeatIcon, BallotIcon, LocationOnIcon, ScheduleIcon, AddLinkIcon, LinkIcon, DriveFolderUploadIcon, UploadFileIcon, FormatListNumberedIcon, NumbersIcon, PersonIcon, ListAltIcon, FlagIcon, MailIcon, HttpIcon, FormatQuoteIcon, SubjectIcon, ShortTextIcon, MenuIcon, TextFieldsIcon, CheckBoxIcon, LooksOneIcon, LooksTwoIcon, Looks3Icon, FormatListBulletedIcon, ImageIcon, TableChartIcon, AutoFixHighIcon, FormatBoldIcon, FormatItalicIcon, FormatUnderlinedIcon, FormatStrikethroughIcon, useInjectStyles, Separator } from "@firecms/ui";
6
6
  import { SnackbarProvider as SnackbarProvider$1, useSnackbar } from "notistack";
7
7
  import hash from "object-hash";
8
8
  import { getIn, Field, useFormex, setIn, useCreateFormex, Formex } from "@firecms/formex";
@@ -193,6 +193,12 @@ function addInitialSlash(s) {
193
193
  if (s.startsWith("/")) return s;
194
194
  else return `/${s}`;
195
195
  }
196
+ function encodeEntityId(entityId) {
197
+ return entityId.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll("#", "%23").replaceAll("?", "%3F");
198
+ }
199
+ function decodeEntityId(encodedEntityId) {
200
+ return encodedEntityId.replaceAll("%2F", "/").replaceAll("%23", "#").replaceAll("%3F", "?").replaceAll("%25", "%");
201
+ }
196
202
  function getLastSegment(path) {
197
203
  const cleanPath = removeInitialAndTrailingSlashes(path);
198
204
  if (cleanPath.includes("/")) {
@@ -286,7 +292,7 @@ function getCollectionByPathOrId(pathOrId, collections) {
286
292
  return result;
287
293
  }
288
294
  function getCollectionPathsCombinations(subpaths) {
289
- const entries = subpaths.length > 0 && subpaths.length % 2 === 0 ? subpaths.splice(0, subpaths.length - 1) : subpaths;
295
+ const entries = subpaths.length > 0 && subpaths.length % 2 === 0 ? subpaths.slice(0, subpaths.length - 1) : subpaths;
290
296
  const length = entries.length;
291
297
  const result = [];
292
298
  for (let i = length; i > 0; i = i - 2) {
@@ -318,7 +324,7 @@ function navigateToEntity({
318
324
  onClose
319
325
  });
320
326
  } else {
321
- let to = navigation.buildUrlCollectionPath(entityId ? `${fullIdPath ?? path}/${entityId}` : fullIdPath ?? path);
327
+ let to = navigation.buildUrlCollectionPath(entityId ? `${fullIdPath ?? path}/${encodeEntityId(entityId)}` : fullIdPath ?? path);
322
328
  if (entityId && selectedTab) {
323
329
  to += `/${selectedTab}`;
324
330
  }
@@ -681,6 +687,8 @@ function getDefaultValueForDataType(dataType) {
681
687
  return [];
682
688
  } else if (dataType === "map") {
683
689
  return {};
690
+ } else if (dataType === "geopoint") {
691
+ return null;
684
692
  } else {
685
693
  return null;
686
694
  }
@@ -714,6 +722,9 @@ function sanitizeData(values, properties) {
714
722
  return result;
715
723
  }
716
724
  function getReferenceFrom(entity) {
725
+ if (!entity) {
726
+ throw new Error("getReferenceFrom: entity is null or undefined");
727
+ }
717
728
  return new EntityReference(entity.id, entity.path, entity.databaseId);
718
729
  }
719
730
  function traverseValuesProperties(inputValues, properties, operation) {
@@ -763,6 +774,12 @@ function traverseValueProperty(inputValue, property, operation) {
763
774
  }
764
775
  return value;
765
776
  }
777
+ function isDataTypeFilterable(dataType, isPartOfArray = false) {
778
+ if (isPartOfArray) {
779
+ return ["string", "number", "date", "reference"].includes(dataType);
780
+ }
781
+ return ["string", "number", "boolean", "date", "reference", "array"].includes(dataType);
782
+ }
766
783
  function enumToObjectEntries(enumValues) {
767
784
  if (Array.isArray(enumValues)) {
768
785
  return enumValues;
@@ -1131,7 +1148,8 @@ function getNavigationEntriesFromPath(props) {
1131
1148
  path,
1132
1149
  collections = [],
1133
1150
  currentFullPath,
1134
- currentFullIdPath
1151
+ currentFullIdPath,
1152
+ currentFullUrlPath
1135
1153
  } = props;
1136
1154
  const subpaths = removeInitialAndTrailingSlashes(path).split("/");
1137
1155
  const subpathCombinations = getCollectionPathsCombinations(subpaths);
@@ -1145,26 +1163,29 @@ function getNavigationEntriesFromPath(props) {
1145
1163
  }
1146
1164
  if (collection) {
1147
1165
  const collectionPath = currentFullPath && currentFullPath.length > 0 ? currentFullPath + "/" + collection.path : collection.path;
1166
+ const collectionUrlPath = currentFullUrlPath && currentFullUrlPath.length > 0 ? currentFullUrlPath + "/" + collection.path : collection.path;
1148
1167
  const fullIdPath = currentFullIdPath && currentFullIdPath.length > 0 ? currentFullIdPath + "/" + collection.id : collection.id;
1149
1168
  result.push({
1150
1169
  type: "collection",
1151
1170
  id: collection.id,
1152
1171
  path: collectionPath,
1153
- fullPath: collectionPath,
1172
+ fullPath: collectionUrlPath,
1154
1173
  fullIdPath,
1155
1174
  collection
1156
1175
  });
1157
1176
  const restOfThePath = removeInitialAndTrailingSlashes(removeInitialAndTrailingSlashes(path).replace(subpathCombination, ""));
1158
1177
  const nextSegments = restOfThePath.length > 0 ? restOfThePath.split("/") : [];
1159
1178
  if (nextSegments.length > 0) {
1160
- const entityId = nextSegments[0];
1179
+ const encodedEntityId = nextSegments[0];
1180
+ const entityId = decodeEntityId(encodedEntityId);
1161
1181
  const fullPath = collectionPath + "/" + entityId;
1182
+ const fullUrlPath = collectionUrlPath + "/" + encodedEntityId;
1162
1183
  result.push({
1163
1184
  type: "entity",
1164
1185
  entityId,
1165
1186
  path: collectionPath,
1166
1187
  fullIdPath,
1167
- fullPath,
1188
+ fullPath: fullUrlPath,
1168
1189
  parentCollection: collection
1169
1190
  });
1170
1191
  if (nextSegments.length > 1) {
@@ -1180,7 +1201,7 @@ function getNavigationEntriesFromPath(props) {
1180
1201
  path: collectionPath,
1181
1202
  entityId,
1182
1203
  fullIdPath,
1183
- fullPath: fullPath + "/" + customView.key,
1204
+ fullPath: fullUrlPath + "/" + customView.key,
1184
1205
  view: customView
1185
1206
  });
1186
1207
  } else if (collection.subcollections) {
@@ -1189,6 +1210,7 @@ function getNavigationEntriesFromPath(props) {
1189
1210
  collections: collection.subcollections,
1190
1211
  currentFullPath: fullPath,
1191
1212
  currentFullIdPath: fullIdPath,
1213
+ currentFullUrlPath: fullUrlPath,
1192
1214
  contextEntityViews: props.contextEntityViews
1193
1215
  }));
1194
1216
  }
@@ -1593,6 +1615,77 @@ function canCreateEntity(collection, authController, path, entity) {
1593
1615
  function canDeleteEntity(collection, authController, path, entity) {
1594
1616
  return resolvePermissions(collection, authController, path, entity)?.delete ?? DEFAULT_PERMISSIONS.delete;
1595
1617
  }
1618
+ function toNumber(value) {
1619
+ return typeof value === "number" && Number.isFinite(value) ? value : void 0;
1620
+ }
1621
+ function getGeoPointCoordinates(value) {
1622
+ if (!value) return void 0;
1623
+ if (value instanceof GeoPoint) {
1624
+ return {
1625
+ latitude: value.latitude,
1626
+ longitude: value.longitude
1627
+ };
1628
+ }
1629
+ if (typeof value !== "object") return void 0;
1630
+ const latitude = toNumber(value.latitude ?? value.lat ?? value._lat);
1631
+ const longitude = toNumber(value.longitude ?? value.lng ?? value._long);
1632
+ if (latitude === void 0 || longitude === void 0) return void 0;
1633
+ return {
1634
+ latitude,
1635
+ longitude
1636
+ };
1637
+ }
1638
+ function normalizeGeoPoint(value) {
1639
+ const coordinates = getGeoPointCoordinates(value);
1640
+ if (!coordinates) return void 0;
1641
+ if (value instanceof GeoPoint) return value;
1642
+ return new GeoPoint(coordinates.latitude, coordinates.longitude);
1643
+ }
1644
+ function formatGeoPoint(value, options) {
1645
+ const coordinates = getGeoPointCoordinates(value);
1646
+ if (!coordinates) return "";
1647
+ const maximumFractionDigits = options?.maximumFractionDigits ?? 6;
1648
+ const formatter = new Intl.NumberFormat("en-US", {
1649
+ maximumFractionDigits,
1650
+ minimumFractionDigits: Math.min(2, maximumFractionDigits),
1651
+ useGrouping: false
1652
+ });
1653
+ return `${formatter.format(coordinates.latitude)}, ${formatter.format(coordinates.longitude)}`;
1654
+ }
1655
+ function parseGeoPoint(input) {
1656
+ const trimmed = input.trim();
1657
+ if (!trimmed) return {
1658
+ point: null
1659
+ };
1660
+ const parts = trimmed.split(",").map((part) => part.trim()).filter((part) => part !== "");
1661
+ if (parts.length !== 2) return {
1662
+ point: null,
1663
+ error: 'Use "lat, lng" format'
1664
+ };
1665
+ const latitude = parseFloat(parts[0]);
1666
+ const longitude = parseFloat(parts[1]);
1667
+ if (!Number.isFinite(latitude) || !Number.isFinite(longitude)) {
1668
+ return {
1669
+ point: null,
1670
+ error: "Latitude and longitude must be numbers"
1671
+ };
1672
+ }
1673
+ if (latitude < -90 || latitude > 90) {
1674
+ return {
1675
+ point: null,
1676
+ error: "Latitude must be between -90 and 90"
1677
+ };
1678
+ }
1679
+ if (longitude < -180 || longitude > 180) {
1680
+ return {
1681
+ point: null,
1682
+ error: "Longitude must be between -180 and 180"
1683
+ };
1684
+ }
1685
+ return {
1686
+ point: new GeoPoint(latitude, longitude)
1687
+ };
1688
+ }
1596
1689
  const iconSynonyms = {
1597
1690
  abc: "alphabet character font letter symbol text type",
1598
1691
  access_alarm: "clock time",
@@ -4541,7 +4634,7 @@ function useCollectionFetch(t0) {
4541
4634
  }
4542
4635
  setDataLoading(false);
4543
4636
  setDataLoadingError(void 0);
4544
- setData(entities.map(_temp$C));
4637
+ setData(entities.map(_temp$D));
4545
4638
  setNoMoreToLoad(!itemCount || entities.length < itemCount);
4546
4639
  };
4547
4640
  const onError = (error) => {
@@ -4624,7 +4717,7 @@ function useCollectionFetch(t0) {
4624
4717
  }
4625
4718
  function _temp2$f() {
4626
4719
  }
4627
- function _temp$C(e_0) {
4720
+ function _temp$D(e_0) {
4628
4721
  return {
4629
4722
  ...e_0
4630
4723
  };
@@ -4689,7 +4782,7 @@ function useEntityFetch(t0) {
4689
4782
  setEntity(CACHE[`${path}/${entityId}`]);
4690
4783
  setDataLoading(false);
4691
4784
  setDataLoadingError(void 0);
4692
- return _temp$B;
4785
+ return _temp$C;
4693
4786
  } else {
4694
4787
  if (entityId && path && collection) {
4695
4788
  if (dataSource.listenEntity) {
@@ -4757,7 +4850,7 @@ function _temp3$5() {
4757
4850
  }
4758
4851
  function _temp2$e() {
4759
4852
  }
4760
- function _temp$B() {
4853
+ function _temp$C() {
4761
4854
  }
4762
4855
  async function saveEntityWithCallbacks({
4763
4856
  collection,
@@ -5401,7 +5494,7 @@ function ImagePreview(t0) {
5401
5494
  }
5402
5495
  let t9;
5403
5496
  if ($[19] !== url) {
5404
- 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$A, children: t8 }) });
5497
+ 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$B, children: t8 }) });
5405
5498
  $[19] = url;
5406
5499
  $[20] = t9;
5407
5500
  } else {
@@ -5435,7 +5528,7 @@ function ImagePreview(t0) {
5435
5528
  }
5436
5529
  return t11;
5437
5530
  }
5438
- function _temp$A(e_0) {
5531
+ function _temp$B(e_0) {
5439
5532
  return e_0.stopPropagation();
5440
5533
  }
5441
5534
  const FIRECMS_NS$1 = "firecms_core";
@@ -5502,7 +5595,7 @@ function UrlComponentPreview(t0) {
5502
5595
  }
5503
5596
  let t3;
5504
5597
  if ($[2] !== url) {
5505
- 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$z, target: "_blank", children: [
5598
+ 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$A, target: "_blank", children: [
5506
5599
  t2,
5507
5600
  url
5508
5601
  ] });
@@ -5632,7 +5725,7 @@ function UrlComponentPreview(t0) {
5632
5725
  function _temp2$d(e_0) {
5633
5726
  return e_0.stopPropagation();
5634
5727
  }
5635
- function _temp$z(e) {
5728
+ function _temp$A(e) {
5636
5729
  e.preventDefault();
5637
5730
  }
5638
5731
  function VideoPreview(t0) {
@@ -5766,7 +5859,7 @@ function SkeletonPropertyComponent(t0) {
5766
5859
  if (Array.isArray(arrayProperty.of)) {
5767
5860
  let t1;
5768
5861
  if ($[6] !== arrayProperty.of) {
5769
- t1 = arrayProperty.of.map(_temp$y);
5862
+ t1 = arrayProperty.of.map(_temp$z);
5770
5863
  $[6] = arrayProperty.of;
5771
5864
  $[7] = t1;
5772
5865
  } else {
@@ -5904,7 +5997,7 @@ function SkeletonPropertyComponent(t0) {
5904
5997
  }
5905
5998
  return content || null;
5906
5999
  }
5907
- function _temp$y(p, i) {
6000
+ function _temp$z(p, i) {
5908
6001
  return renderGenericArrayCell(p, i);
5909
6002
  }
5910
6003
  function renderMap(property, size) {
@@ -6348,104 +6441,77 @@ function EntityPreview({
6348
6441
  actions
6349
6442
  ] });
6350
6443
  }
6351
- const EntityPreviewContainer = React.forwardRef((t0, ref) => {
6352
- const $ = c(26);
6353
- let children;
6354
- let className;
6355
- let hover;
6356
- let onClick;
6357
- let props;
6358
- let style;
6359
- let t1;
6360
- let t2;
6361
- if ($[0] !== t0) {
6362
- ({
6363
- children,
6364
- hover,
6365
- onClick,
6366
- size: t1,
6367
- style,
6368
- className,
6369
- fullwidth: t2,
6370
- ...props
6371
- } = t0);
6372
- $[0] = t0;
6373
- $[1] = children;
6374
- $[2] = className;
6375
- $[3] = hover;
6376
- $[4] = onClick;
6377
- $[5] = props;
6378
- $[6] = style;
6379
- $[7] = t1;
6380
- $[8] = t2;
6381
- } else {
6382
- children = $[1];
6383
- className = $[2];
6384
- hover = $[3];
6385
- onClick = $[4];
6386
- props = $[5];
6387
- style = $[6];
6388
- t1 = $[7];
6389
- t2 = $[8];
6390
- }
6444
+ function EntityPreviewContainer(t0) {
6445
+ const $ = c(15);
6446
+ const {
6447
+ children,
6448
+ hover,
6449
+ onClick,
6450
+ size: t1,
6451
+ style,
6452
+ className,
6453
+ fullwidth: t2,
6454
+ ref
6455
+ } = t0;
6391
6456
  const size = t1 === void 0 ? "medium" : t1;
6392
6457
  const fullwidth = t2 === void 0 ? true : t2;
6393
- let t3;
6394
- if ($[9] !== style) {
6395
- t3 = {
6396
- ...style,
6397
- tabindex: 0
6398
- };
6399
- $[9] = style;
6400
- $[10] = t3;
6458
+ const t3 = fullwidth ? "w-full" : "";
6459
+ const t4 = hover ? "hover:bg-surface-accent-50 dark:hover:bg-surface-800 group-hover:bg-surface-accent-50 dark:group-hover:bg-surface-800" : "";
6460
+ const t5 = size === "small" ? "p-1" : "px-2 py-1";
6461
+ const t6 = onClick ? "cursor-pointer" : "";
6462
+ let t7;
6463
+ if ($[0] !== className || $[1] !== t3 || $[2] !== t4 || $[3] !== t5 || $[4] !== t6) {
6464
+ t7 = cls("bg-white dark:bg-surface-900", "min-h-[44px]", t3, "items-center", t4, t5, "flex border rounded-lg", t6, defaultBorderMixin, className);
6465
+ $[0] = className;
6466
+ $[1] = t3;
6467
+ $[2] = t4;
6468
+ $[3] = t5;
6469
+ $[4] = t6;
6470
+ $[5] = t7;
6401
6471
  } else {
6402
- t3 = $[10];
6472
+ t7 = $[5];
6403
6473
  }
6404
- const t4 = fullwidth ? "w-full" : "";
6405
- const t5 = hover ? "hover:bg-surface-accent-50 dark:hover:bg-surface-800 group-hover:bg-surface-accent-50 dark:group-hover:bg-surface-800" : "";
6406
- const t6 = size === "small" ? "p-1" : "px-2 py-1";
6407
- const t7 = onClick ? "cursor-pointer" : "";
6474
+ const divClassName = t7;
6408
6475
  let t8;
6409
- if ($[11] !== className || $[12] !== t4 || $[13] !== t5 || $[14] !== t6 || $[15] !== t7) {
6410
- t8 = cls("bg-white dark:bg-surface-900", "min-h-[44px]", t4, "items-center", t5, t6, "flex border rounded-lg", t7, defaultBorderMixin, className);
6411
- $[11] = className;
6412
- $[12] = t4;
6413
- $[13] = t5;
6414
- $[14] = t6;
6415
- $[15] = t7;
6416
- $[16] = t8;
6476
+ if ($[6] !== onClick) {
6477
+ t8 = onClick ? (event) => {
6478
+ event.preventDefault();
6479
+ onClick(event);
6480
+ } : void 0;
6481
+ $[6] = onClick;
6482
+ $[7] = t8;
6417
6483
  } else {
6418
- t8 = $[16];
6484
+ t8 = $[7];
6419
6485
  }
6486
+ const handleClick = t8;
6420
6487
  let t9;
6421
- if ($[17] !== onClick) {
6422
- t9 = (event) => {
6423
- if (onClick) {
6424
- event.preventDefault();
6425
- onClick(event);
6426
- }
6488
+ if ($[8] !== divClassName || $[9] !== handleClick || $[10] !== style) {
6489
+ t9 = {
6490
+ ref,
6491
+ tabIndex: 0,
6492
+ style,
6493
+ className: divClassName,
6494
+ onClick: handleClick
6427
6495
  };
6428
- $[17] = onClick;
6429
- $[18] = t9;
6496
+ $[8] = divClassName;
6497
+ $[9] = handleClick;
6498
+ $[10] = style;
6499
+ $[11] = t9;
6430
6500
  } else {
6431
- t9 = $[18];
6501
+ t9 = $[11];
6432
6502
  }
6503
+ const divProps = t9;
6433
6504
  let t10;
6434
- if ($[19] !== children || $[20] !== props || $[21] !== ref || $[22] !== t3 || $[23] !== t8 || $[24] !== t9) {
6435
- t10 = /* @__PURE__ */ jsx("div", { ref, style: t3, className: t8, onClick: t9, ...props, children });
6436
- $[19] = children;
6437
- $[20] = props;
6438
- $[21] = ref;
6439
- $[22] = t3;
6440
- $[23] = t8;
6441
- $[24] = t9;
6442
- $[25] = t10;
6505
+ if ($[12] !== children || $[13] !== divProps) {
6506
+ t10 = /* @__PURE__ */ jsx("div", { ...divProps, children });
6507
+ $[12] = children;
6508
+ $[13] = divProps;
6509
+ $[14] = t10;
6443
6510
  } else {
6444
- t10 = $[25];
6511
+ t10 = $[14];
6445
6512
  }
6446
6513
  return t10;
6447
- });
6448
- EntityPreviewContainer.displayName = "EntityPreviewContainer";
6514
+ }
6449
6515
  const ReferencePreview = function ReferencePreview2(props) {
6450
6516
  const $ = c(10);
6451
6517
  const reference = props.reference;
@@ -7079,7 +7145,7 @@ function DatePreview(t0) {
7079
7145
  timeZoneName: "short"
7080
7146
  });
7081
7147
  const parts = tzFormatter.formatToParts(date);
7082
- t32 = parts.find(_temp$x)?.value ?? "";
7148
+ t32 = parts.find(_temp$y)?.value ?? "";
7083
7149
  $[6] = date;
7084
7150
  $[7] = timezone;
7085
7151
  $[8] = t32;
@@ -7150,7 +7216,7 @@ function DatePreview(t0) {
7150
7216
  }
7151
7217
  return t3;
7152
7218
  }
7153
- function _temp$x(p) {
7219
+ function _temp$y(p) {
7154
7220
  return p.type === "timeZoneName";
7155
7221
  }
7156
7222
  function MapPropertyPreview(t0) {
@@ -7245,7 +7311,7 @@ function KeyValuePreview(t0) {
7245
7311
  }
7246
7312
  let t1;
7247
7313
  if ($[1] !== value) {
7248
- t1 = Object.entries(value).map(_temp$w);
7314
+ t1 = Object.entries(value).map(_temp$x);
7249
7315
  $[1] = value;
7250
7316
  $[2] = t1;
7251
7317
  } else {
@@ -7261,7 +7327,7 @@ function KeyValuePreview(t0) {
7261
7327
  }
7262
7328
  return t2;
7263
7329
  }
7264
- function _temp$w(t0) {
7330
+ function _temp$x(t0) {
7265
7331
  const [key, childValue] = t0;
7266
7332
  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");
7267
7333
  const isScalar = childValue && (typeof childValue !== "object" || isTimestampObj);
@@ -7273,6 +7339,59 @@ function _temp$w(t0) {
7273
7339
  typeof childValue === "object" && !isTimestampObj && /* @__PURE__ */ jsx("div", { className: cls(defaultBorderMixin, "border-l pl-4"), children: /* @__PURE__ */ jsx(KeyValuePreview, { value: childValue }) })
7274
7340
  ] }, `map_preview_table_${key}}`);
7275
7341
  }
7342
+ function GeopointPropertyPreview(t0) {
7343
+ const $ = c(10);
7344
+ const {
7345
+ value,
7346
+ size
7347
+ } = t0;
7348
+ let t1;
7349
+ let t2;
7350
+ let t3;
7351
+ if ($[0] !== size || $[1] !== value) {
7352
+ t3 = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
7353
+ bb0: {
7354
+ const coordinates = getGeoPointCoordinates(value);
7355
+ if (!coordinates) {
7356
+ const t42 = size === "small" ? "text-sm text-text-secondary dark:text-text-secondary-dark" : "text-text-secondary dark:text-text-secondary-dark";
7357
+ let t5;
7358
+ if ($[5] !== t42) {
7359
+ t5 = /* @__PURE__ */ jsx("span", { className: t42, children: "—" });
7360
+ $[5] = t42;
7361
+ $[6] = t5;
7362
+ } else {
7363
+ t5 = $[6];
7364
+ }
7365
+ t3 = t5;
7366
+ break bb0;
7367
+ }
7368
+ t1 = size === "small" ? "text-sm font-mono" : "font-mono";
7369
+ t2 = formatGeoPoint(coordinates);
7370
+ }
7371
+ $[0] = size;
7372
+ $[1] = value;
7373
+ $[2] = t1;
7374
+ $[3] = t2;
7375
+ $[4] = t3;
7376
+ } else {
7377
+ t1 = $[2];
7378
+ t2 = $[3];
7379
+ t3 = $[4];
7380
+ }
7381
+ if (t3 !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel")) {
7382
+ return t3;
7383
+ }
7384
+ let t4;
7385
+ if ($[7] !== t1 || $[8] !== t2) {
7386
+ t4 = /* @__PURE__ */ jsx("span", { className: t1, children: t2 });
7387
+ $[7] = t1;
7388
+ $[8] = t2;
7389
+ $[9] = t4;
7390
+ } else {
7391
+ t4 = $[9];
7392
+ }
7393
+ return t4;
7394
+ }
7276
7395
  function BooleanPreview(t0) {
7277
7396
  const $ = c(9);
7278
7397
  const {
@@ -7700,47 +7819,56 @@ const PropertyPreview = React__default.memo(function PropertyPreview2(props) {
7700
7819
  content = buildWrongValueType(propertyKey, property.dataType, value);
7701
7820
  }
7702
7821
  } else {
7703
- if (property.dataType === "reference") {
7704
- if (typeof property.path === "string") {
7705
- if (typeof value === "object" && "isEntityReference" in value && value.isEntityReference()) {
7706
- content = /* @__PURE__ */ jsx(ReferencePreview, { disabled: !property.path, previewProperties: property.previewProperties, includeId: property.includeId, includeEntityLink: property.includeEntityLink, size: props.size, reference: value });
7707
- } else {
7708
- content = buildWrongValueType(propertyKey, property.dataType, value);
7709
- }
7822
+ if (property.dataType === "geopoint") {
7823
+ const coordinates = getGeoPointCoordinates(value);
7824
+ if (coordinates) {
7825
+ content = /* @__PURE__ */ jsx(GeopointPropertyPreview, { ...props, property, value });
7710
7826
  } else {
7711
- let t02;
7712
- if ($[27] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
7713
- t02 = /* @__PURE__ */ jsx(EmptyValue, {});
7714
- $[27] = t02;
7715
- } else {
7716
- t02 = $[27];
7717
- }
7718
- content = t02;
7827
+ content = buildWrongValueType(propertyKey, property.dataType, value);
7719
7828
  }
7720
7829
  } else {
7721
- if (property.dataType === "boolean") {
7722
- if (typeof value === "boolean") {
7723
- content = /* @__PURE__ */ jsx(BooleanPreview, { value, size, property });
7830
+ if (property.dataType === "reference") {
7831
+ if (typeof property.path === "string") {
7832
+ if (typeof value === "object" && "isEntityReference" in value && value.isEntityReference()) {
7833
+ content = /* @__PURE__ */ jsx(ReferencePreview, { disabled: !property.path, previewProperties: property.previewProperties, includeId: property.includeId, includeEntityLink: property.includeEntityLink, size: props.size, reference: value });
7834
+ } else {
7835
+ content = buildWrongValueType(propertyKey, property.dataType, value);
7836
+ }
7724
7837
  } else {
7725
- content = buildWrongValueType(propertyKey, property.dataType, value);
7838
+ let t02;
7839
+ if ($[27] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
7840
+ t02 = /* @__PURE__ */ jsx(EmptyValue, {});
7841
+ $[27] = t02;
7842
+ } else {
7843
+ t02 = $[27];
7844
+ }
7845
+ content = t02;
7726
7846
  }
7727
7847
  } else {
7728
- if (property.dataType === "number") {
7729
- if (typeof value === "number") {
7730
- content = /* @__PURE__ */ jsx(NumberPropertyPreview, { ...props, value, property });
7848
+ if (property.dataType === "boolean") {
7849
+ if (typeof value === "boolean") {
7850
+ content = /* @__PURE__ */ jsx(BooleanPreview, { value, size, property });
7731
7851
  } else {
7732
7852
  content = buildWrongValueType(propertyKey, property.dataType, value);
7733
7853
  }
7734
7854
  } else {
7735
- let t02;
7736
- if ($[28] !== value) {
7737
- t02 = JSON.stringify(value, jsonStringifyReplacer);
7738
- $[28] = value;
7739
- $[29] = t02;
7855
+ if (property.dataType === "number") {
7856
+ if (typeof value === "number") {
7857
+ content = /* @__PURE__ */ jsx(NumberPropertyPreview, { ...props, value, property });
7858
+ } else {
7859
+ content = buildWrongValueType(propertyKey, property.dataType, value);
7860
+ }
7740
7861
  } else {
7741
- t02 = $[29];
7862
+ let t02;
7863
+ if ($[28] !== value) {
7864
+ t02 = JSON.stringify(value, jsonStringifyReplacer);
7865
+ $[28] = value;
7866
+ $[29] = t02;
7867
+ } else {
7868
+ t02 = $[29];
7869
+ }
7870
+ content = t02;
7742
7871
  }
7743
- content = t02;
7744
7872
  }
7745
7873
  }
7746
7874
  }
@@ -8522,7 +8650,7 @@ function VirtualTableSelect(props) {
8522
8650
  console.trace("onChange");
8523
8651
  if (valueType === "number") {
8524
8652
  if (multiple) {
8525
- const newValue = updatedValue.map(_temp$v);
8653
+ const newValue = updatedValue.map(_temp$w);
8526
8654
  updateValue(newValue);
8527
8655
  } else {
8528
8656
  updateValue(parseFloat(updatedValue));
@@ -8593,7 +8721,7 @@ function VirtualTableSelect(props) {
8593
8721
  function _temp2$c(v_0) {
8594
8722
  return v_0.toString();
8595
8723
  }
8596
- function _temp$v(v) {
8724
+ function _temp$w(v) {
8597
8725
  return parseFloat(v);
8598
8726
  }
8599
8727
  function VirtualTableNumberInput(props) {
@@ -8789,7 +8917,7 @@ function VirtualTableUserSelect(props) {
8789
8917
  const renderValue = t3;
8790
8918
  let t4;
8791
8919
  if ($[7] !== disabled || $[8] !== internalValue || $[9] !== multiple || $[10] !== onChange || $[11] !== renderValue || $[12] !== users || $[13] !== validValue) {
8792
- 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$u) }) : /* @__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$b) });
8920
+ 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$v) }) : /* @__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$b) });
8793
8921
  $[7] = disabled;
8794
8922
  $[8] = internalValue;
8795
8923
  $[9] = multiple;
@@ -8806,7 +8934,7 @@ function VirtualTableUserSelect(props) {
8806
8934
  function _temp2$b(user_1) {
8807
8935
  return /* @__PURE__ */ jsx(SelectItem, { value: user_1.uid, children: /* @__PURE__ */ jsx(UserDisplay, { user: user_1 }) }, user_1.uid);
8808
8936
  }
8809
- function _temp$u(user_0) {
8937
+ function _temp$v(user_0) {
8810
8938
  return /* @__PURE__ */ jsx(MultiSelectItem, { value: user_0.uid, children: /* @__PURE__ */ jsx(UserDisplay, { user: user_0 }) }, user_0.uid);
8811
8939
  }
8812
8940
  class ErrorBoundary extends React__default.Component {
@@ -9051,7 +9179,7 @@ function useStorageUploadController(t0) {
9051
9179
  newValue = [...internalValue];
9052
9180
  newValue = removeDuplicates(newValue);
9053
9181
  setInternalValue(newValue);
9054
- const fieldValue = newValue.filter(_temp$t).map(_temp2$a);
9182
+ const fieldValue = newValue.filter(_temp$u).map(_temp2$a);
9055
9183
  if (multipleFilesSupported) {
9056
9184
  onChange(fieldValue);
9057
9185
  } else {
@@ -9172,7 +9300,7 @@ function useStorageUploadController(t0) {
9172
9300
  function _temp2$a(e_0) {
9173
9301
  return e_0.storagePathOrDownloadUrl;
9174
9302
  }
9175
- function _temp$t(e) {
9303
+ function _temp$u(e) {
9176
9304
  return !!e.storagePathOrDownloadUrl;
9177
9305
  }
9178
9306
  function getInternalInitialValue(multipleFilesSupported, value, metadata, size) {
@@ -9462,7 +9590,7 @@ function StorageUpload$1(t0) {
9462
9590
  const snackbarContext = useSnackbarController();
9463
9591
  let t1;
9464
9592
  if ($[0] !== storage.acceptedFiles) {
9465
- t1 = storage.acceptedFiles ? storage.acceptedFiles.map(_temp$s).reduce(_temp2$9, {}) : void 0;
9593
+ t1 = storage.acceptedFiles ? storage.acceptedFiles.map(_temp$t).reduce(_temp2$9, {}) : void 0;
9466
9594
  $[0] = storage.acceptedFiles;
9467
9595
  $[1] = t1;
9468
9596
  } else {
@@ -9691,7 +9819,7 @@ function _temp2$9(a, b) {
9691
9819
  ...b
9692
9820
  };
9693
9821
  }
9694
- function _temp$s(e) {
9822
+ function _temp$t(e) {
9695
9823
  return {
9696
9824
  [e]: []
9697
9825
  };
@@ -9801,7 +9929,7 @@ const TableReferenceFieldInternal = React__default.memo(function TableReferenceF
9801
9929
  let t1;
9802
9930
  if ($[2] !== updateValue) {
9803
9931
  t1 = (entities) => {
9804
- updateValue(entities.map(_temp$r));
9932
+ updateValue(entities.filter(Boolean).map(_temp$s));
9805
9933
  };
9806
9934
  $[2] = updateValue;
9807
9935
  $[3] = t1;
@@ -9973,7 +10101,7 @@ const TableReferenceFieldInternal = React__default.memo(function TableReferenceF
9973
10101
  }
9974
10102
  return t10;
9975
10103
  }, equal);
9976
- function _temp$r(e) {
10104
+ function _temp$s(e) {
9977
10105
  return getReferenceFrom(e);
9978
10106
  }
9979
10107
  function _temp2$8(ref) {
@@ -11641,7 +11769,7 @@ function ArrayOfReferencesFieldBinding({
11641
11769
  throw Error(`Couldn't find the corresponding collection for the path: ${ofProperty.path}`);
11642
11770
  }
11643
11771
  const onMultipleEntitiesSelected = useCallback((entities) => {
11644
- setValue(entities.map((e) => getReferenceFrom(e)));
11772
+ setValue(entities.filter(Boolean).map((e) => getReferenceFrom(e)));
11645
11773
  }, [setValue]);
11646
11774
  const referenceDialogController = useReferenceDialog({
11647
11775
  multiselect: true,
@@ -11751,7 +11879,7 @@ function StorageItemPreview(t0) {
11751
11879
  }
11752
11880
  let t5;
11753
11881
  if ($[15] !== placeholder) {
11754
- t5 = placeholder && /* @__PURE__ */ jsx("div", { onClick: _temp$q, className: "flex flex-col items-center justify-center w-full h-full", children: /* @__PURE__ */ jsx(DescriptionIcon, { className: "text-surface-700 dark:text-surface-300" }) });
11882
+ t5 = placeholder && /* @__PURE__ */ jsx("div", { onClick: _temp$r, className: "flex flex-col items-center justify-center w-full h-full", children: /* @__PURE__ */ jsx(DescriptionIcon, { className: "text-surface-700 dark:text-surface-300" }) });
11755
11883
  $[15] = placeholder;
11756
11884
  $[16] = t5;
11757
11885
  } else {
@@ -11774,7 +11902,7 @@ function StorageItemPreview(t0) {
11774
11902
  }
11775
11903
  return t6;
11776
11904
  }
11777
- function _temp$q(e) {
11905
+ function _temp$r(e) {
11778
11906
  return e.stopPropagation();
11779
11907
  }
11780
11908
  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";
@@ -12002,7 +12130,7 @@ function SortableStorageItem(t0) {
12002
12130
  t4 = $[7];
12003
12131
  }
12004
12132
  const style = t4;
12005
- const getImageSizeNumber = _temp$p;
12133
+ const getImageSizeNumber = _temp$q;
12006
12134
  let child;
12007
12135
  if (entry.storagePathOrDownloadUrl) {
12008
12136
  const t52 = `storage_preview_${entry.storagePathOrDownloadUrl}`;
@@ -12077,7 +12205,7 @@ function SortableStorageItem(t0) {
12077
12205
  }
12078
12206
  return t6;
12079
12207
  }
12080
- function _temp$p(previewSize) {
12208
+ function _temp$q(previewSize) {
12081
12209
  switch (previewSize) {
12082
12210
  case "small": {
12083
12211
  return 40;
@@ -12977,6 +13105,260 @@ function DateTimeFieldBinding(t0) {
12977
13105
  }
12978
13106
  return t13;
12979
13107
  }
13108
+ function GeopointFieldBinding(t0) {
13109
+ const $ = c(66);
13110
+ const {
13111
+ propertyKey,
13112
+ value,
13113
+ setValue,
13114
+ error,
13115
+ showError,
13116
+ disabled,
13117
+ autoFocus,
13118
+ property,
13119
+ includeDescription,
13120
+ size: t1
13121
+ } = t0;
13122
+ const size = t1 === void 0 ? "large" : t1;
13123
+ const coordinates = getGeoPointCoordinates(value);
13124
+ const canClear = Boolean(property.clearable);
13125
+ const [latitude, setLatitude] = useState(coordinates ? coordinates.latitude.toString() : "");
13126
+ const [longitude, setLongitude] = useState(coordinates ? coordinates.longitude.toString() : "");
13127
+ const [localError, setLocalError] = useState();
13128
+ const skipSyncRef = useRef(false);
13129
+ let t2;
13130
+ if ($[0] !== property || $[1] !== setValue || $[2] !== value) {
13131
+ t2 = {
13132
+ property,
13133
+ value,
13134
+ setValue
13135
+ };
13136
+ $[0] = property;
13137
+ $[1] = setValue;
13138
+ $[2] = value;
13139
+ $[3] = t2;
13140
+ } else {
13141
+ t2 = $[3];
13142
+ }
13143
+ useClearRestoreValue(t2);
13144
+ let t3;
13145
+ if ($[4] !== setLatitude || $[5] !== value) {
13146
+ t3 = () => {
13147
+ if (skipSyncRef.current) {
13148
+ skipSyncRef.current = false;
13149
+ return;
13150
+ }
13151
+ const nextCoordinates = getGeoPointCoordinates(value);
13152
+ setLatitude(nextCoordinates ? nextCoordinates.latitude.toString() : "");
13153
+ setLongitude(nextCoordinates ? nextCoordinates.longitude.toString() : "");
13154
+ };
13155
+ $[4] = setLatitude;
13156
+ $[5] = value;
13157
+ $[6] = t3;
13158
+ } else {
13159
+ t3 = $[6];
13160
+ }
13161
+ let t4;
13162
+ if ($[7] !== value) {
13163
+ t4 = [value];
13164
+ $[7] = value;
13165
+ $[8] = t4;
13166
+ } else {
13167
+ t4 = $[8];
13168
+ }
13169
+ useEffect(t3, t4);
13170
+ let t5;
13171
+ if ($[9] !== setLatitude || $[10] !== setValue) {
13172
+ t5 = (nextLatitude, nextLongitude) => {
13173
+ skipSyncRef.current = true;
13174
+ setLatitude(nextLatitude);
13175
+ setLongitude(nextLongitude);
13176
+ const trimmedLatitude = nextLatitude.trim();
13177
+ const trimmedLongitude = nextLongitude.trim();
13178
+ if (!trimmedLatitude && !trimmedLongitude) {
13179
+ setLocalError(void 0);
13180
+ setValue(null);
13181
+ return;
13182
+ }
13183
+ const parsed = parseGeoPoint(`${trimmedLatitude}, ${trimmedLongitude}`);
13184
+ if (parsed.error) {
13185
+ setLocalError(parsed.error);
13186
+ setValue(null);
13187
+ return;
13188
+ }
13189
+ setLocalError(void 0);
13190
+ setValue(parsed.point);
13191
+ };
13192
+ $[9] = setLatitude;
13193
+ $[10] = setValue;
13194
+ $[11] = t5;
13195
+ } else {
13196
+ t5 = $[11];
13197
+ }
13198
+ const updateGeoPoint = t5;
13199
+ let t6;
13200
+ if ($[12] !== updateGeoPoint) {
13201
+ t6 = (event) => {
13202
+ if (event) {
13203
+ event.preventDefault();
13204
+ event.stopPropagation();
13205
+ }
13206
+ updateGeoPoint("", "");
13207
+ };
13208
+ $[12] = updateGeoPoint;
13209
+ $[13] = t6;
13210
+ } else {
13211
+ t6 = $[13];
13212
+ }
13213
+ const handleClear = t6;
13214
+ const resolvedError = localError ?? error;
13215
+ const shouldShowError = Boolean(resolvedError) || Boolean(showError && error);
13216
+ let t7;
13217
+ if ($[14] !== property) {
13218
+ t7 = getIconForProperty(property, "small");
13219
+ $[14] = property;
13220
+ $[15] = t7;
13221
+ } else {
13222
+ t7 = $[15];
13223
+ }
13224
+ const t8 = property.validation?.required;
13225
+ const t9 = shouldShowError ? "text-red-500 dark:text-red-500" : "text-text-secondary dark:text-text-secondary-dark";
13226
+ let t10;
13227
+ if ($[16] !== property.name || $[17] !== t7 || $[18] !== t8 || $[19] !== t9) {
13228
+ t10 = /* @__PURE__ */ jsx("div", { className: "mt-1", children: /* @__PURE__ */ jsx(LabelWithIcon, { icon: t7, required: t8, title: property.name, className: t9 }) });
13229
+ $[16] = property.name;
13230
+ $[17] = t7;
13231
+ $[18] = t8;
13232
+ $[19] = t9;
13233
+ $[20] = t10;
13234
+ } else {
13235
+ t10 = $[20];
13236
+ }
13237
+ let t11;
13238
+ if ($[21] !== longitude || $[22] !== updateGeoPoint) {
13239
+ t11 = (event_0) => updateGeoPoint(event_0.target.value, longitude);
13240
+ $[21] = longitude;
13241
+ $[22] = updateGeoPoint;
13242
+ $[23] = t11;
13243
+ } else {
13244
+ t11 = $[23];
13245
+ }
13246
+ let t12;
13247
+ if ($[24] !== canClear || $[25] !== handleClear) {
13248
+ t12 = canClear ? /* @__PURE__ */ jsx(IconButton, { onClick: handleClear, children: /* @__PURE__ */ jsx(CloseIcon, {}) }) : void 0;
13249
+ $[24] = canClear;
13250
+ $[25] = handleClear;
13251
+ $[26] = t12;
13252
+ } else {
13253
+ t12 = $[26];
13254
+ }
13255
+ const t13 = shouldShowError && Boolean(resolvedError);
13256
+ let t14;
13257
+ if ($[27] !== autoFocus || $[28] !== disabled || $[29] !== latitude || $[30] !== size || $[31] !== t11 || $[32] !== t12 || $[33] !== t13) {
13258
+ t14 = /* @__PURE__ */ jsx(TextField, { size, value: latitude, onChange: t11, autoFocus, label: "Latitude", type: "number", disabled, endAdornment: t12, error: t13 });
13259
+ $[27] = autoFocus;
13260
+ $[28] = disabled;
13261
+ $[29] = latitude;
13262
+ $[30] = size;
13263
+ $[31] = t11;
13264
+ $[32] = t12;
13265
+ $[33] = t13;
13266
+ $[34] = t14;
13267
+ } else {
13268
+ t14 = $[34];
13269
+ }
13270
+ let t15;
13271
+ if ($[35] !== latitude || $[36] !== updateGeoPoint) {
13272
+ t15 = (event_1) => updateGeoPoint(latitude, event_1.target.value);
13273
+ $[35] = latitude;
13274
+ $[36] = updateGeoPoint;
13275
+ $[37] = t15;
13276
+ } else {
13277
+ t15 = $[37];
13278
+ }
13279
+ const t16 = shouldShowError && Boolean(resolvedError);
13280
+ let t17;
13281
+ if ($[38] !== disabled || $[39] !== longitude || $[40] !== size || $[41] !== t15 || $[42] !== t16) {
13282
+ t17 = /* @__PURE__ */ jsx(TextField, { size, value: longitude, onChange: t15, label: "Longitude", type: "number", disabled, error: t16 });
13283
+ $[38] = disabled;
13284
+ $[39] = longitude;
13285
+ $[40] = size;
13286
+ $[41] = t15;
13287
+ $[42] = t16;
13288
+ $[43] = t17;
13289
+ } else {
13290
+ t17 = $[43];
13291
+ }
13292
+ let t18;
13293
+ if ($[44] !== t14 || $[45] !== t17) {
13294
+ t18 = /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-2 md:grid-cols-2", children: [
13295
+ t14,
13296
+ t17
13297
+ ] });
13298
+ $[44] = t14;
13299
+ $[45] = t17;
13300
+ $[46] = t18;
13301
+ } else {
13302
+ t18 = $[46];
13303
+ }
13304
+ let t19;
13305
+ if ($[47] !== resolvedError || $[48] !== value) {
13306
+ t19 = value && !resolvedError && /* @__PURE__ */ jsx("div", { className: "text-xs text-text-secondary dark:text-text-secondary-dark font-mono", children: formatGeoPoint(value) });
13307
+ $[47] = resolvedError;
13308
+ $[48] = value;
13309
+ $[49] = t19;
13310
+ } else {
13311
+ t19 = $[49];
13312
+ }
13313
+ let t20;
13314
+ if ($[50] !== t10 || $[51] !== t18 || $[52] !== t19) {
13315
+ t20 = /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
13316
+ t10,
13317
+ t18,
13318
+ t19
13319
+ ] });
13320
+ $[50] = t10;
13321
+ $[51] = t18;
13322
+ $[52] = t19;
13323
+ $[53] = t20;
13324
+ } else {
13325
+ t20 = $[53];
13326
+ }
13327
+ let t21;
13328
+ if ($[54] !== propertyKey || $[55] !== t20) {
13329
+ t21 = /* @__PURE__ */ jsx(PropertyIdCopyTooltip, { propertyKey, children: t20 });
13330
+ $[54] = propertyKey;
13331
+ $[55] = t20;
13332
+ $[56] = t21;
13333
+ } else {
13334
+ t21 = $[56];
13335
+ }
13336
+ let t22;
13337
+ if ($[57] !== disabled || $[58] !== includeDescription || $[59] !== property || $[60] !== resolvedError || $[61] !== shouldShowError) {
13338
+ t22 = /* @__PURE__ */ jsx(FieldHelperText, { includeDescription, showError: shouldShowError, error: resolvedError, disabled, property });
13339
+ $[57] = disabled;
13340
+ $[58] = includeDescription;
13341
+ $[59] = property;
13342
+ $[60] = resolvedError;
13343
+ $[61] = shouldShowError;
13344
+ $[62] = t22;
13345
+ } else {
13346
+ t22 = $[62];
13347
+ }
13348
+ let t23;
13349
+ if ($[63] !== t21 || $[64] !== t22) {
13350
+ t23 = /* @__PURE__ */ jsxs(Fragment, { children: [
13351
+ t21,
13352
+ t22
13353
+ ] });
13354
+ $[63] = t21;
13355
+ $[64] = t22;
13356
+ $[65] = t23;
13357
+ } else {
13358
+ t23 = $[65];
13359
+ }
13360
+ return t23;
13361
+ }
12980
13362
  function ReadOnlyFieldBinding(t0) {
12981
13363
  const $ = c(18);
12982
13364
  const {
@@ -13596,7 +13978,7 @@ function MapFieldBinding(t0) {
13596
13978
  } else {
13597
13979
  t42 = $[20];
13598
13980
  }
13599
- t3 = Object.entries(mapProperties).filter(_temp$o).map(t42);
13981
+ t3 = Object.entries(mapProperties).filter(_temp$p).map(t42);
13600
13982
  $[6] = autoFocus;
13601
13983
  $[7] = context;
13602
13984
  $[8] = disabled;
@@ -13675,7 +14057,7 @@ function MapFieldBinding(t0) {
13675
14057
  }
13676
14058
  return t10;
13677
14059
  }
13678
- function _temp$o(t0) {
14060
+ function _temp$p(t0) {
13679
14061
  const [, property_0] = t0;
13680
14062
  return !isHidden(property_0);
13681
14063
  }
@@ -15049,7 +15431,7 @@ function BlockEntry(t0) {
15049
15431
  const property = t4;
15050
15432
  let t5;
15051
15433
  if ($[9] !== properties) {
15052
- t5 = Object.entries(properties).map(_temp$n);
15434
+ t5 = Object.entries(properties).map(_temp$o);
15053
15435
  $[9] = properties;
15054
15436
  $[10] = t5;
15055
15437
  } else {
@@ -15142,7 +15524,7 @@ function BlockEntry(t0) {
15142
15524
  }
15143
15525
  return t11;
15144
15526
  }
15145
- function _temp$n(t0) {
15527
+ function _temp$o(t0) {
15146
15528
  const [key, property_0] = t0;
15147
15529
  return {
15148
15530
  id: key,
@@ -17263,24 +17645,27 @@ function buildIdColumn(largeLayout) {
17263
17645
  function propertiesToColumns({
17264
17646
  properties,
17265
17647
  sortable,
17266
- forceFilter,
17267
- AdditionalHeaderWidget
17648
+ forcedFilters,
17649
+ AdditionalHeaderWidget,
17650
+ allowedFilters
17268
17651
  }) {
17269
- const disabledFilter = Boolean(forceFilter);
17270
17652
  return Object.entries(properties).flatMap(([key, property]) => getColumnKeysForProperty(property, key)).map(({
17271
17653
  key,
17272
17654
  disabled
17273
17655
  }) => {
17274
17656
  const property = getResolvedPropertyInPath(properties, key);
17275
17657
  if (!property) throw Error("Internal error: no property found in path " + key);
17276
- const filterable = filterableProperty(property);
17658
+ const filterable = property.dataType === "array" ? isDataTypeFilterable(property.of?.dataType, true) : isDataTypeFilterable(property.dataType);
17659
+ const isFilterForced = forcedFilters?.includes(key) ?? false;
17660
+ const isFilterAllowed = allowedFilters ? allowedFilters.includes(key) : filterable;
17661
+ const filterEnabled = filterable && isFilterAllowed && !isFilterForced;
17277
17662
  return {
17278
17663
  key,
17279
17664
  align: getTableCellAlignment(property),
17280
17665
  icon: getIconForProperty(property, "small"),
17281
17666
  title: property.name ?? key,
17282
17667
  sortable,
17283
- filter: !disabledFilter && filterable,
17668
+ filter: filterEnabled,
17284
17669
  width: getTablePropertyColumnWidth(property),
17285
17670
  resizable: true,
17286
17671
  custom: {
@@ -17293,16 +17678,6 @@ function propertiesToColumns({
17293
17678
  };
17294
17679
  });
17295
17680
  }
17296
- function filterableProperty(property, partOfArray = false) {
17297
- if (partOfArray) {
17298
- return ["string", "number", "date", "reference"].includes(property.dataType);
17299
- }
17300
- if (property.dataType === "array") {
17301
- if (property.of) return filterableProperty(property.of, true);
17302
- else return false;
17303
- }
17304
- return ["string", "number", "boolean", "date", "reference", "array"].includes(property.dataType);
17305
- }
17306
17681
  const VirtualTableHeader = React__default.memo(function VirtualTableHeader2(t0) {
17307
17682
  const $ = c(61);
17308
17683
  const {
@@ -18134,7 +18509,7 @@ const VirtualTable = React__default.memo(function VirtualTable2({
18134
18509
  const currentSort = sortBy ? sortBy[1] : void 0;
18135
18510
  const [columns, setColumns] = useState(columnsProp);
18136
18511
  const tableRef = useRef(null);
18137
- const endReachCallbackThreshold = useRef(0);
18512
+ const lastEndReachedDataLength = useRef(void 0);
18138
18513
  const debouncedScroll = useDebounceCallback(onScrollProp, 200);
18139
18514
  const [draggingColumnId, setDraggingColumnId] = useState(null);
18140
18515
  const sensors = useSensors(useSensor(PointerSensor, {
@@ -18213,7 +18588,7 @@ const VirtualTable = React__default.memo(function VirtualTable2({
18213
18588
  filterRef.current = filterInput;
18214
18589
  }, [filterInput]);
18215
18590
  const scrollToTop = useCallback(() => {
18216
- endReachCallbackThreshold.current = 0;
18591
+ lastEndReachedDataLength.current = void 0;
18217
18592
  if (tableRef.current) {
18218
18593
  tableRef.current.scrollTo(tableRef.current?.scrollLeft, 0);
18219
18594
  }
@@ -18239,28 +18614,37 @@ const VirtualTable = React__default.memo(function VirtualTable2({
18239
18614
  scrollToTop();
18240
18615
  }, [checkFilterCombination, currentSort, onFilterUpdate, onResetPagination, onSortByUpdate, scrollToTop, sortByProperty]);
18241
18616
  const maxScroll = Math.max((data?.length ?? 0) * rowHeight - bounds.height, 0);
18242
- const onEndReachedInternal = useCallback((scrollOffset) => {
18243
- if (onEndReached && (data?.length ?? 0) > 0 && scrollOffset > endReachCallbackThreshold.current + endOffset) {
18244
- endReachCallbackThreshold.current = scrollOffset;
18617
+ const onEndReachedInternal = useCallback(() => {
18618
+ const dataLength = data?.length ?? 0;
18619
+ if (onEndReached && dataLength > 0 && lastEndReachedDataLength.current !== dataLength) {
18620
+ lastEndReachedDataLength.current = dataLength;
18245
18621
  onEndReached();
18246
18622
  }
18247
18623
  }, [data?.length, onEndReached]);
18624
+ useEffect(() => {
18625
+ if (!onEndReached || loading || !data?.length || !bounds.height || !tableRef.current) {
18626
+ return;
18627
+ }
18628
+ if (tableRef.current.scrollHeight <= tableRef.current.clientHeight) {
18629
+ onEndReachedInternal();
18630
+ }
18631
+ }, [bounds.height, data?.length, loading, onEndReached, onEndReachedInternal]);
18248
18632
  const onScroll = useCallback(({
18249
18633
  scrollDirection,
18250
- scrollOffset: scrollOffset_0,
18634
+ scrollOffset,
18251
18635
  scrollUpdateWasRequested
18252
18636
  }) => {
18253
18637
  if (onScrollProp) {
18254
18638
  debouncedScroll({
18255
18639
  scrollDirection,
18256
- scrollOffset: scrollOffset_0,
18640
+ scrollOffset,
18257
18641
  scrollUpdateWasRequested
18258
18642
  });
18259
18643
  }
18260
- if (!scrollUpdateWasRequested && scrollOffset_0 >= maxScroll - endOffset) onEndReachedInternal(scrollOffset_0);
18261
- }, [maxScroll, onEndReachedInternal]);
18644
+ if (!scrollUpdateWasRequested && scrollOffset >= maxScroll - endOffset) onEndReachedInternal();
18645
+ }, [endOffset, maxScroll, onEndReachedInternal]);
18262
18646
  const onFilterUpdateInternal = useCallback((column_1, filterForProperty) => {
18263
- endReachCallbackThreshold.current = 0;
18647
+ lastEndReachedDataLength.current = void 0;
18264
18648
  const filter_0 = filterRef.current;
18265
18649
  let newFilterValue = filter_0 ? {
18266
18650
  ...filter_0
@@ -18462,7 +18846,7 @@ const SafeLinkRenderer = (t0) => {
18462
18846
  let t1;
18463
18847
  if ($[0] !== text) {
18464
18848
  const urlRegex = /https?:\/\/[^\s]+/g;
18465
- t1 = text.replace(urlRegex, _temp$m);
18849
+ t1 = text.replace(urlRegex, _temp$n);
18466
18850
  $[0] = text;
18467
18851
  $[1] = t1;
18468
18852
  } else {
@@ -18481,7 +18865,7 @@ const SafeLinkRenderer = (t0) => {
18481
18865
  }
18482
18866
  return t2;
18483
18867
  };
18484
- function _temp$m(url) {
18868
+ function _temp$n(url) {
18485
18869
  return `<a href="${url}" class="underline" target="_blank">Link</a><br/>`;
18486
18870
  }
18487
18871
  const operationLabels$2 = {
@@ -18555,10 +18939,10 @@ function ReferenceFilterField({
18555
18939
  return path ? navigationController.getCollection(path) : void 0;
18556
18940
  }, [path]);
18557
18941
  const onSingleEntitySelected = (entity) => {
18558
- updateFilter(operation, getReferenceFrom(entity));
18942
+ if (entity) updateFilter(operation, getReferenceFrom(entity));
18559
18943
  };
18560
18944
  const onMultipleEntitiesSelected = (entities) => {
18561
- updateFilter(operation, entities.map((e) => getReferenceFrom(e)));
18945
+ updateFilter(operation, entities.filter(Boolean).map((e) => getReferenceFrom(e)));
18562
18946
  };
18563
18947
  const multiple = multipleSelectOperations$2.includes(operation);
18564
18948
  const referenceDialogController = useReferenceDialog({
@@ -18733,7 +19117,7 @@ function StringNumberFilterField(t0) {
18733
19117
  }
18734
19118
  let t8;
18735
19119
  if ($[20] !== operation || $[21] !== t6 || $[22] !== t7) {
18736
- t8 = /* @__PURE__ */ jsx("div", { className: "w-[100px]", children: /* @__PURE__ */ jsx(Select, { value: operation, size: "medium", fullWidth: true, position: "item-aligned", onValueChange: t6, renderValue: _temp$l, children: t7 }) });
19120
+ t8 = /* @__PURE__ */ jsx("div", { className: "w-[100px]", children: /* @__PURE__ */ jsx(Select, { value: operation, size: "medium", fullWidth: true, position: "item-aligned", onValueChange: t6, renderValue: _temp$m, children: t7 }) });
18737
19121
  $[20] = operation;
18738
19122
  $[21] = t6;
18739
19123
  $[22] = t7;
@@ -18838,7 +19222,7 @@ function _temp3$3(e_1) {
18838
19222
  function _temp2$6(op_2) {
18839
19223
  return /* @__PURE__ */ jsx(SelectItem, { value: op_2, children: operationLabels$1[op_2] }, op_2);
18840
19224
  }
18841
- function _temp$l(op_1) {
19225
+ function _temp$m(op_1) {
18842
19226
  return operationLabels$1[op_1];
18843
19227
  }
18844
19228
  function BooleanFilterField(t0) {
@@ -19009,7 +19393,7 @@ function DateTimeFilterField(t0) {
19009
19393
  }
19010
19394
  let t8;
19011
19395
  if ($[17] !== operation || $[18] !== t6 || $[19] !== t7) {
19012
- t8 = /* @__PURE__ */ jsx("div", { className: "w-[100px]", children: /* @__PURE__ */ jsx(Select, { value: operation, size: "medium", fullWidth: true, onValueChange: t6, renderValue: _temp$k, children: t7 }) });
19396
+ t8 = /* @__PURE__ */ jsx("div", { className: "w-[100px]", children: /* @__PURE__ */ jsx(Select, { value: operation, size: "medium", fullWidth: true, onValueChange: t6, renderValue: _temp$l, children: t7 }) });
19013
19397
  $[17] = operation;
19014
19398
  $[18] = t6;
19015
19399
  $[19] = t7;
@@ -19059,7 +19443,7 @@ function DateTimeFilterField(t0) {
19059
19443
  function _temp2$5(op_2) {
19060
19444
  return /* @__PURE__ */ jsx(SelectItem, { value: op_2, children: operationLabels[op_2] }, op_2);
19061
19445
  }
19062
- function _temp$k(op_1) {
19446
+ function _temp$l(op_1) {
19063
19447
  return operationLabels[op_1];
19064
19448
  }
19065
19449
  const SelectableTable = function SelectableTable2({
@@ -19309,7 +19693,8 @@ const EntityCollectionTable = function EntityCollectionTable2({
19309
19693
  const columnsResult = propertiesToColumns({
19310
19694
  properties,
19311
19695
  sortable,
19312
- forceFilter,
19696
+ forcedFilters: tableController.forcedFilters,
19697
+ allowedFilters: tableController.allowedFilters,
19313
19698
  AdditionalHeaderWidget
19314
19699
  });
19315
19700
  const propertyColumnKeys = new Set(columnsResult.map((col) => col.key));
@@ -19456,7 +19841,26 @@ function useDataSourceTableController({
19456
19841
  filterValues: initialFilterUrl,
19457
19842
  sortBy: initialSortUrl
19458
19843
  } = parseFilterAndSort(location.search);
19459
- const [filterValues_0, setFilterValues] = React__default.useState(forceFilter ?? (updateUrl ? initialFilterUrl : void 0) ?? initialFilter ?? void 0);
19844
+ const availableFilterKeys = collection.allowedFilters ?? Object.keys(collection.properties);
19845
+ const forcedFilterKeys = collection.forceFilter ? Object.keys(collection.forceFilter) : [];
19846
+ const allowedFilterKeys = useMemo(() => {
19847
+ const availableKeys = availableFilterKeys.filter((key) => {
19848
+ const property = collection.properties[key];
19849
+ if (!property) return false;
19850
+ if (typeof property === "function") return false;
19851
+ const dataType = property.dataType;
19852
+ const filterable = dataType === "array" ? isDataTypeFilterable(property.of?.dataType, true) : isDataTypeFilterable(dataType);
19853
+ return filterable;
19854
+ });
19855
+ const forcedKeys = forcedFilterKeys.filter((key_0) => !availableKeys.includes(key_0));
19856
+ return [...availableKeys, ...forcedKeys];
19857
+ }, [collection.properties, availableFilterKeys, forcedFilterKeys]);
19858
+ const removeUnallowedFilters = useCallback((filters) => {
19859
+ if (!filters) return;
19860
+ return Object.fromEntries(Object.entries(filters).filter(([key_1]) => allowedFilterKeys.includes(key_1)));
19861
+ }, [allowedFilterKeys]);
19862
+ const initFilters = forceFilter ?? (updateUrl ? initialFilterUrl : void 0) ?? initialFilter ?? void 0;
19863
+ const [filterValues_0, setFilterValues] = React__default.useState(removeUnallowedFilters(initFilters));
19460
19864
  const [sortBy_0, setSortBy] = React__default.useState((updateUrl ? initialSortUrl : void 0) ?? initialSortInternal);
19461
19865
  useUpdateUrl(filterValues_0, sortBy_0, searchString, updateUrl);
19462
19866
  const collectionScroll = scrollRestoration?.getCollectionScroll(fullPath, filterValues_0);
@@ -19479,7 +19883,7 @@ function useDataSourceTableController({
19479
19883
  const [dataLoading, setDataLoading] = useState(false);
19480
19884
  const [dataLoadingError, setDataLoadingError] = useState();
19481
19885
  const [noMoreToLoad, setNoMoreToLoad] = useState(false);
19482
- const clearFilter = useCallback(() => setFilterValues(forceFilter ?? void 0), [forceFilter]);
19886
+ const clearFilter = useCallback(() => setFilterValues(removeUnallowedFilters(forceFilter)), [forceFilter, removeUnallowedFilters]);
19483
19887
  const updateFilterValues = useCallback((updatedFilter) => {
19484
19888
  if (forceFilter) {
19485
19889
  console.warn("Filter is not compatible with the force filter. Ignoring filter");
@@ -19488,9 +19892,9 @@ function useDataSourceTableController({
19488
19892
  if (updatedFilter && Object.keys(updatedFilter).length === 0) {
19489
19893
  setFilterValues(void 0);
19490
19894
  } else {
19491
- setFilterValues(updatedFilter);
19895
+ setFilterValues(removeUnallowedFilters(updatedFilter));
19492
19896
  }
19493
- }, [forceFilter]);
19897
+ }, [forceFilter, removeUnallowedFilters]);
19494
19898
  useEffect(() => {
19495
19899
  setDataLoading(true);
19496
19900
  const onEntitiesUpdate = async (entities) => {
@@ -19565,6 +19969,8 @@ function useDataSourceTableController({
19565
19969
  dataLoadingError,
19566
19970
  filterValues: filterValues_0,
19567
19971
  setFilterValues: updateFilterValues,
19972
+ allowedFilters: allowedFilterKeys,
19973
+ forcedFilters: forcedFilterKeys,
19568
19974
  sortBy: sortBy_0,
19569
19975
  setSortBy,
19570
19976
  searchString,
@@ -19645,7 +20051,7 @@ function encodeFilterAndSort(filterValues, sortBy) {
19645
20051
  }
19646
20052
  if (encodedValue !== void 0) {
19647
20053
  entries[encodeURIComponent(`${key}_op`)] = encodeURIComponent(op);
19648
- entries[encodeURIComponent(`${key}_value`)] = encodedValue ? encodeURIComponent(encodedValue.toString()) : "null";
20054
+ entries[encodeURIComponent(`${key}_value`)] = encodedValue !== null && encodedValue !== void 0 ? encodeURIComponent(encodedValue.toString()) : "null";
19649
20055
  }
19650
20056
  }
19651
20057
  });
@@ -19685,7 +20091,12 @@ function isDate(dateString) {
19685
20091
  return date.toISOString() === dateString;
19686
20092
  }
19687
20093
  function encodeRef(val) {
19688
- return `ref::${val.path}/${val.id}`;
20094
+ return `ref::${val.path}/${encodeEntityId(val.id)}`;
20095
+ }
20096
+ function decodeRef(encoded) {
20097
+ const separatorIndex = encoded.lastIndexOf("/");
20098
+ if (separatorIndex < 0) return new EntityReference(encoded, "");
20099
+ return new EntityReference(decodeEntityId(encoded.substring(separatorIndex + 1)), encoded.substring(0, separatorIndex));
19689
20100
  }
19690
20101
  function decodeString(val) {
19691
20102
  let parsedFilterVal = val;
@@ -19699,8 +20110,7 @@ function decodeString(val) {
19699
20110
  try {
19700
20111
  parsedFilterVal = JSON.parse(parsedFilterVal, (key, value) => {
19701
20112
  if (typeof value === "string" && value.startsWith("ref::")) {
19702
- const [path, id] = value.substring(5).split("/");
19703
- return new EntityReference(id, path);
20113
+ return decodeRef(value.substring(5));
19704
20114
  }
19705
20115
  return value;
19706
20116
  });
@@ -19708,8 +20118,7 @@ function decodeString(val) {
19708
20118
  }
19709
20119
  }
19710
20120
  if (typeof parsedFilterVal === "string" && parsedFilterVal.startsWith("ref::")) {
19711
- const [path, id] = parsedFilterVal.substring(5).split("/");
19712
- return new EntityReference(id, path);
20121
+ return decodeRef(parsedFilterVal.substring(5));
19713
20122
  }
19714
20123
  return parsedFilterVal;
19715
20124
  }
@@ -19788,7 +20197,7 @@ function useTableSearchHelper(t0) {
19788
20197
  const searchBlocked = t12;
19789
20198
  let t2;
19790
20199
  if ($[15] !== customizationController.plugins || $[16] !== dataSource?.initTextSearch) {
19791
- t2 = Boolean(dataSource?.initTextSearch) || customizationController.plugins?.find(_temp$j);
20200
+ t2 = Boolean(dataSource?.initTextSearch) || customizationController.plugins?.find(_temp$k);
19792
20201
  $[15] = customizationController.plugins;
19793
20202
  $[16] = dataSource?.initTextSearch;
19794
20203
  $[17] = t2;
@@ -19880,7 +20289,7 @@ function useTableSearchHelper(t0) {
19880
20289
  }
19881
20290
  return t1;
19882
20291
  }
19883
- function _temp$j(p_0) {
20292
+ function _temp$k(p_0) {
19884
20293
  return Boolean(p_0.collectionView?.onTextSearchClick);
19885
20294
  }
19886
20295
  function DeleteEntityDialog({
@@ -20502,7 +20911,7 @@ function FavouritesView(t0) {
20502
20911
  T0 = Collapse;
20503
20912
  t4 = favouriteCollections.length > 0;
20504
20913
  t2 = "flex flex-row flex-wrap gap-2 pb-2 min-h-[32px]";
20505
- t3 = favouriteCollections.map(_temp$i);
20914
+ t3 = favouriteCollections.map(_temp$j);
20506
20915
  $[2] = navigationController;
20507
20916
  $[3] = t1;
20508
20917
  $[4] = T0;
@@ -20536,7 +20945,7 @@ function FavouritesView(t0) {
20536
20945
  }
20537
20946
  return t6;
20538
20947
  }
20539
- function _temp$i(entry_0) {
20948
+ function _temp$j(entry_0) {
20540
20949
  return /* @__PURE__ */ jsx(NavigationChip, { entry: entry_0 }, entry_0.path);
20541
20950
  }
20542
20951
  const scrollsMap = {};
@@ -20773,7 +21182,7 @@ const NavigationCard = React__default.memo(function NavigationCard2(t0) {
20773
21182
  }
20774
21183
  let t4;
20775
21184
  if ($[4] !== actions) {
20776
- t4 = /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5", onClick: _temp$h, children: actions });
21185
+ t4 = /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5", onClick: _temp$i, children: actions });
20777
21186
  $[4] = actions;
20778
21187
  $[5] = t4;
20779
21188
  } else {
@@ -20860,7 +21269,7 @@ const NavigationCard = React__default.memo(function NavigationCard2(t0) {
20860
21269
  }
20861
21270
  return t12;
20862
21271
  });
20863
- function _temp$h(event) {
21272
+ function _temp$i(event) {
20864
21273
  event.preventDefault();
20865
21274
  event.stopPropagation();
20866
21275
  }
@@ -23216,7 +23625,7 @@ const BoardColumn = memo(function BoardColumn2(t0) {
23216
23625
  let t19;
23217
23626
  let t20;
23218
23627
  if ($[19] !== items2) {
23219
- t20 = items2.map(_temp$g);
23628
+ t20 = items2.map(_temp$h);
23220
23629
  $[19] = items2;
23221
23630
  $[20] = t20;
23222
23631
  } else {
@@ -23322,7 +23731,7 @@ const BoardColumn = memo(function BoardColumn2(t0) {
23322
23731
  }
23323
23732
  return t29;
23324
23733
  });
23325
- function _temp$g(i) {
23734
+ function _temp$h(i) {
23326
23735
  return i.id;
23327
23736
  }
23328
23737
  function Board(t0) {
@@ -25258,7 +25667,8 @@ function FiltersDialog({
25258
25667
  properties,
25259
25668
  filterValues,
25260
25669
  setFilterValues,
25261
- forceFilter
25670
+ forceFilter,
25671
+ allowedFilters
25262
25672
  }) {
25263
25673
  const {
25264
25674
  t
@@ -25270,15 +25680,14 @@ function FiltersDialog({
25270
25680
  setLocalFilters(filterValues ?? {});
25271
25681
  }
25272
25682
  }, [open, filterValues]);
25273
- const filterableProperties = useMemo(() => {
25274
- return Object.entries(properties).filter(([key, property]) => {
25275
- if (!property) return false;
25276
- if (forceFilter && key in forceFilter) return false;
25277
- const baseProperty = property.dataType === "array" ? property.of : property;
25278
- if (!baseProperty) return false;
25279
- return ["string", "number", "boolean", "date", "reference"].includes(baseProperty.dataType);
25683
+ const editableFilterProperties = useMemo(() => {
25684
+ return Object.entries(properties).filter(([key]) => {
25685
+ const isFilterAllowed = !allowedFilters || allowedFilters.includes(key);
25686
+ const isFilterForced = Boolean(forceFilter && Object.keys(forceFilter).includes(key));
25687
+ return isFilterAllowed && !isFilterForced;
25280
25688
  });
25281
- }, [properties, forceFilter]);
25689
+ }, [properties, allowedFilters, forceFilter]);
25690
+ const hasEditableFilterProperties = editableFilterProperties.length > 0;
25282
25691
  const handleFilterChange = useCallback((propertyKey, value) => {
25283
25692
  setLocalFilters((prev) => {
25284
25693
  const newFilters = {
@@ -25310,22 +25719,26 @@ function FiltersDialog({
25310
25719
  }));
25311
25720
  }, []);
25312
25721
  const isAnyFieldHidden = Object.values(hiddenFields).some((hidden_0) => hidden_0);
25313
- const activeFilterCount = Object.keys(localFilters).length;
25314
- const renderFilterField = useCallback((propertyKey_1, property_0) => {
25315
- const isArray = property_0.dataType === "array";
25316
- const baseProperty_0 = isArray ? property_0.of : property_0;
25317
- if (!baseProperty_0) return null;
25722
+ const getActiveFilterCount = () => {
25723
+ const editableLocalFilters = Object.keys(localFilters).filter((key_0) => !forceFilter || !(key_0 in forceFilter));
25724
+ return editableLocalFilters.length;
25725
+ };
25726
+ const activeFilterCount = getActiveFilterCount();
25727
+ const renderFilterField = useCallback((propertyKey_1, property) => {
25728
+ const isArray = property.dataType === "array";
25729
+ const baseProperty = isArray ? property.of : property;
25730
+ if (!baseProperty) return null;
25318
25731
  const filterValue = localFilters[propertyKey_1];
25319
25732
  const setValue = (value_0) => handleFilterChange(propertyKey_1, value_0);
25320
- if (baseProperty_0.dataType === "reference") {
25321
- return /* @__PURE__ */ jsx(ReferenceFilterField, { value: filterValue, setValue, name: propertyKey_1, isArray, path: baseProperty_0.path, title: property_0.name, includeId: baseProperty_0.includeId, previewProperties: baseProperty_0.previewProperties, hidden: hiddenFields[propertyKey_1] ?? false, setHidden: (hidden_1) => setHiddenForField(propertyKey_1, hidden_1) });
25322
- } else if (baseProperty_0.dataType === "number" || baseProperty_0.dataType === "string") {
25323
- const enumValues = baseProperty_0.enumValues ? enumToObjectEntries(baseProperty_0.enumValues) : void 0;
25324
- return /* @__PURE__ */ jsx(StringNumberFilterField, { value: filterValue, setValue, name: propertyKey_1, dataType: baseProperty_0.dataType, isArray, enumValues, title: property_0.name });
25325
- } else if (baseProperty_0.dataType === "boolean") {
25326
- return /* @__PURE__ */ jsx(BooleanFilterField, { value: filterValue, setValue, name: propertyKey_1, title: property_0.name });
25327
- } else if (baseProperty_0.dataType === "date") {
25328
- return /* @__PURE__ */ jsx(DateTimeFilterField, { value: filterValue, setValue, name: propertyKey_1, mode: baseProperty_0.mode, isArray, title: property_0.name });
25733
+ if (baseProperty.dataType === "reference") {
25734
+ return /* @__PURE__ */ jsx(ReferenceFilterField, { value: filterValue, setValue, name: propertyKey_1, isArray, path: baseProperty.path, title: property.name, includeId: baseProperty.includeId, previewProperties: baseProperty.previewProperties, hidden: hiddenFields[propertyKey_1] ?? false, setHidden: (hidden_1) => setHiddenForField(propertyKey_1, hidden_1) });
25735
+ } else if (baseProperty.dataType === "number" || baseProperty.dataType === "string") {
25736
+ const enumValues = baseProperty.enumValues ? enumToObjectEntries(baseProperty.enumValues) : void 0;
25737
+ return /* @__PURE__ */ jsx(StringNumberFilterField, { value: filterValue, setValue, name: propertyKey_1, dataType: baseProperty.dataType, isArray, enumValues, title: property.name });
25738
+ } else if (baseProperty.dataType === "boolean") {
25739
+ return /* @__PURE__ */ jsx(BooleanFilterField, { value: filterValue, setValue, name: propertyKey_1, title: property.name });
25740
+ } else if (baseProperty.dataType === "date") {
25741
+ return /* @__PURE__ */ jsx(DateTimeFilterField, { value: filterValue, setValue, name: propertyKey_1, mode: baseProperty.mode, isArray, title: property.name });
25329
25742
  }
25330
25743
  return null;
25331
25744
  }, [localFilters, handleFilterChange, hiddenFields, setHiddenForField]);
@@ -25334,23 +25747,25 @@ function FiltersDialog({
25334
25747
  /* @__PURE__ */ jsx(Typography, { variant: "h6", children: t("filters") }),
25335
25748
  activeFilterCount > 0 && /* @__PURE__ */ jsx("span", { className: "ml-2 px-2 py-0.5 text-xs rounded-full bg-primary text-white", children: activeFilterCount })
25336
25749
  ] }),
25337
- /* @__PURE__ */ jsx(DialogContent, { children: filterableProperties.length === 0 ? /* @__PURE__ */ jsx(Typography, { color: "secondary", className: "py-8 text-center", children: t("no_filterable_properties") }) : /* @__PURE__ */ jsx("table", { className: "w-full border-collapse", children: /* @__PURE__ */ jsx("tbody", { children: filterableProperties.map(([propertyKey_2, property_1], index) => {
25750
+ /* @__PURE__ */ jsx(DialogContent, { children: !hasEditableFilterProperties ? /* @__PURE__ */ jsx(Typography, { color: "secondary", className: "py-8 text-center", children: t("no_filterable_properties") }) : /* @__PURE__ */ jsx("table", { className: "w-full border-collapse", children: /* @__PURE__ */ jsx("tbody", { children: editableFilterProperties.map(([propertyKey_2, property_0], index) => {
25338
25751
  const hasFilter = propertyKey_2 in localFilters;
25339
25752
  return /* @__PURE__ */ jsxs("tr", { className: cls(index > 0 && "border-t", defaultBorderMixin), children: [
25340
- /* @__PURE__ */ jsx("td", { className: "py-3 pr-4 align-middle w-[160px]", children: /* @__PURE__ */ jsx(Typography, { variant: "body2", className: cls("font-medium", hasFilter && "text-primary"), children: property_1.name || propertyKey_2 }) }),
25341
- /* @__PURE__ */ jsx("td", { className: "py-3", children: renderFilterField(propertyKey_2, property_1) })
25753
+ /* @__PURE__ */ jsx("td", { className: "py-3 pr-4 align-middle w-[160px]", children: /* @__PURE__ */ jsx(Typography, { variant: "body2", className: cls("font-medium", hasFilter && "text-primary"), children: property_0.name || propertyKey_2 }) }),
25754
+ /* @__PURE__ */ jsx("td", { className: "py-3", children: renderFilterField(propertyKey_2, property_0) })
25342
25755
  ] }, propertyKey_2);
25343
25756
  }) }) }) }),
25344
25757
  /* @__PURE__ */ jsxs(DialogActions, { children: [
25345
25758
  /* @__PURE__ */ jsx(Button, { variant: "text", onClick: handleClearAll, disabled: activeFilterCount === 0, children: t("clear") }),
25346
25759
  /* @__PURE__ */ jsx("div", { className: "flex-grow" }),
25347
- /* @__PURE__ */ jsx(Button, { variant: "text", onClick: () => onOpenChange(false), children: t("cancel") }),
25348
- /* @__PURE__ */ jsx(Button, { variant: "filled", onClick: handleApply, children: t("apply_filters") })
25760
+ hasEditableFilterProperties && /* @__PURE__ */ jsxs(Fragment, { children: [
25761
+ /* @__PURE__ */ jsx(Button, { variant: "text", onClick: () => onOpenChange(false), children: t("cancel") }),
25762
+ /* @__PURE__ */ jsx(Button, { variant: "filled", onClick: handleApply, children: t("apply_filters") })
25763
+ ] })
25349
25764
  ] })
25350
25765
  ] });
25351
25766
  }
25352
25767
  function EntityCollectionViewStartActions(t0) {
25353
- const $ = c(36);
25768
+ const $ = c(37);
25354
25769
  const {
25355
25770
  collection,
25356
25771
  relativePath,
@@ -25414,34 +25829,36 @@ function EntityCollectionViewStartActions(t0) {
25414
25829
  t3 = $[13];
25415
25830
  }
25416
25831
  const actionProps = t3;
25832
+ const hasAnyAllowedFilters = !tableController.allowedFilters || tableController.allowedFilters.length > 0;
25417
25833
  let t4;
25418
- if ($[14] !== activeFilterCount || $[15] !== largeLayout || $[16] !== resolvedProperties || $[17] !== t || $[18] !== tableController.setFilterValues) {
25419
- t4 = resolvedProperties && tableController.setFilterValues && /* @__PURE__ */ jsx(Tooltip, { title: t("filters"), children: /* @__PURE__ */ jsx(Badge, { color: "primary", invisible: activeFilterCount === 0, children: largeLayout ? /* @__PURE__ */ jsxs(Button, { variant: "text", size: "small", onClick: () => setFiltersDialogOpen(true), startIcon: /* @__PURE__ */ jsx(FilterListIcon, { size: "small" }), className: cls(activeFilterCount > 0 && "text-primary"), children: [
25834
+ if ($[14] !== activeFilterCount || $[15] !== hasAnyAllowedFilters || $[16] !== largeLayout || $[17] !== resolvedProperties || $[18] !== t || $[19] !== tableController.setFilterValues) {
25835
+ t4 = resolvedProperties && tableController.setFilterValues && hasAnyAllowedFilters && /* @__PURE__ */ jsx(Tooltip, { title: t("filters"), children: /* @__PURE__ */ jsx(Badge, { color: "primary", invisible: activeFilterCount === 0, children: largeLayout ? /* @__PURE__ */ jsxs(Button, { variant: "text", size: "small", onClick: () => setFiltersDialogOpen(true), startIcon: /* @__PURE__ */ jsx(FilterListIcon, { size: "small" }), className: cls(activeFilterCount > 0 && "text-primary"), children: [
25420
25836
  t("filters"),
25421
25837
  activeFilterCount > 0 ? ` (${activeFilterCount})` : ""
25422
25838
  ] }) : /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: () => setFiltersDialogOpen(true), className: cls(activeFilterCount > 0 && "text-primary"), children: /* @__PURE__ */ jsx(FilterListIcon, { size: "small" }) }) }) }, "filters_tooltip");
25423
25839
  $[14] = activeFilterCount;
25424
- $[15] = largeLayout;
25425
- $[16] = resolvedProperties;
25426
- $[17] = t;
25427
- $[18] = tableController.setFilterValues;
25428
- $[19] = t4;
25840
+ $[15] = hasAnyAllowedFilters;
25841
+ $[16] = largeLayout;
25842
+ $[17] = resolvedProperties;
25843
+ $[18] = t;
25844
+ $[19] = tableController.setFilterValues;
25845
+ $[20] = t4;
25429
25846
  } else {
25430
- t4 = $[19];
25847
+ t4 = $[20];
25431
25848
  }
25432
25849
  const filtersButton = t4;
25433
25850
  const t5 = !collection.forceFilter;
25434
25851
  let t6;
25435
- if ($[20] !== t5 || $[21] !== tableController) {
25852
+ if ($[21] !== t5 || $[22] !== tableController) {
25436
25853
  t6 = /* @__PURE__ */ jsx(ClearFilterSortButton, { tableController, enabled: t5 }, "clear_filter");
25437
- $[20] = t5;
25438
- $[21] = tableController;
25439
- $[22] = t6;
25854
+ $[21] = t5;
25855
+ $[22] = tableController;
25856
+ $[23] = t6;
25440
25857
  } else {
25441
- t6 = $[22];
25858
+ t6 = $[23];
25442
25859
  }
25443
25860
  let actions;
25444
- if ($[23] !== actionProps || $[24] !== filtersButton || $[25] !== plugins || $[26] !== t6) {
25861
+ if ($[24] !== actionProps || $[25] !== filtersButton || $[26] !== plugins || $[27] !== t6) {
25445
25862
  actions = [filtersButton, t6];
25446
25863
  if (plugins) {
25447
25864
  plugins.forEach((plugin, i) => {
@@ -25450,39 +25867,42 @@ function EntityCollectionViewStartActions(t0) {
25450
25867
  }
25451
25868
  });
25452
25869
  }
25453
- $[23] = actionProps;
25454
- $[24] = filtersButton;
25455
- $[25] = plugins;
25456
- $[26] = t6;
25457
- $[27] = actions;
25870
+ $[24] = actionProps;
25871
+ $[25] = filtersButton;
25872
+ $[26] = plugins;
25873
+ $[27] = t6;
25874
+ $[28] = actions;
25458
25875
  } else {
25459
- actions = $[27];
25876
+ actions = $[28];
25460
25877
  }
25461
25878
  let t7;
25462
- if ($[28] !== collection.forceFilter || $[29] !== filtersDialogOpen || $[30] !== resolvedProperties || $[31] !== tableController) {
25463
- 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 });
25464
- $[28] = collection.forceFilter;
25465
- $[29] = filtersDialogOpen;
25466
- $[30] = resolvedProperties;
25467
- $[31] = tableController;
25468
- $[32] = t7;
25879
+ if ($[29] !== collection.forceFilter || $[30] !== filtersDialogOpen || $[31] !== resolvedProperties || $[32] !== tableController) {
25880
+ 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$g) });
25881
+ $[29] = collection.forceFilter;
25882
+ $[30] = filtersDialogOpen;
25883
+ $[31] = resolvedProperties;
25884
+ $[32] = tableController;
25885
+ $[33] = t7;
25469
25886
  } else {
25470
- t7 = $[32];
25887
+ t7 = $[33];
25471
25888
  }
25472
25889
  let t8;
25473
- if ($[33] !== actions || $[34] !== t7) {
25890
+ if ($[34] !== actions || $[35] !== t7) {
25474
25891
  t8 = /* @__PURE__ */ jsxs(Fragment, { children: [
25475
25892
  actions,
25476
25893
  t7
25477
25894
  ] });
25478
- $[33] = actions;
25479
- $[34] = t7;
25480
- $[35] = t8;
25895
+ $[34] = actions;
25896
+ $[35] = t7;
25897
+ $[36] = t8;
25481
25898
  } else {
25482
- t8 = $[35];
25899
+ t8 = $[36];
25483
25900
  }
25484
25901
  return t8;
25485
25902
  }
25903
+ function _temp$g(key_0) {
25904
+ return key_0.toString();
25905
+ }
25486
25906
  const collectionScrollCache = /* @__PURE__ */ new Map();
25487
25907
  function useScrollRestoration() {
25488
25908
  const updateCollectionScroll = ({
@@ -27180,7 +27600,7 @@ function ReferenceWidget({
27180
27600
  const onMultipleEntitiesSelected = useCallback((entities) => {
27181
27601
  if (disabled) return;
27182
27602
  if (onMultipleReferenceSelected) {
27183
- const references = entities ? entities.map((e) => getReferenceFrom(e)) : null;
27603
+ const references = entities ? entities.filter(Boolean).map((e) => getReferenceFrom(e)) : null;
27184
27604
  onMultipleReferenceSelected({
27185
27605
  references,
27186
27606
  entities
@@ -27889,7 +28309,7 @@ function getParentReferencesFromPath(props) {
27889
28309
  const restOfThePath = removeInitialAndTrailingSlashes(removeInitialAndTrailingSlashes(path).replace(subpathCombination, ""));
27890
28310
  const nextSegments = restOfThePath.length > 0 ? restOfThePath.split("/") : [];
27891
28311
  if (nextSegments.length > 0) {
27892
- const entityId = nextSegments[0];
28312
+ const entityId = decodeEntityId(nextSegments[0]);
27893
28313
  const fullPath = collectionPath + "/" + entityId;
27894
28314
  result.push(new EntityReference(entityId, collectionPath));
27895
28315
  if (nextSegments.length > 1) {
@@ -29635,18 +30055,15 @@ function EntityEditViewInner({
29635
30055
  const actionsAtTheBottom = !largeLayout || layout === "side_panel" || selectedEntityView?.includeActions === "bottom";
29636
30056
  const mainViewVisible = selectedTab === MAIN_TAB_VALUE || Boolean(selectedSecondaryForm);
29637
30057
  const authController = useAuthController();
29638
- const customViewsView = customViews && resolvedEntityViews.filter((e) => !e.includeActions).map((customView) => {
29639
- if (!customView) return null;
29640
- const Builder = customView.Builder;
29641
- if (!Builder) {
29642
- console.error("INTERNAL: customView.Builder is not defined");
29643
- return null;
29644
- }
29645
- if (!entityId) {
29646
- return null;
29647
- }
30058
+ const mountedTabsRef = useRef(/* @__PURE__ */ new Set());
30059
+ if (selectedTab) {
30060
+ mountedTabsRef.current.add(selectedTab);
30061
+ }
30062
+ const readOnlyFormContext = useMemo(() => {
30063
+ if (formContext) return void 0;
30064
+ if (!entityId) return void 0;
29648
30065
  const formexStub = createFormexStub(usedEntity?.values ?? {});
29649
- const usedFormContext = formContext ?? {
30066
+ return {
29650
30067
  entityId,
29651
30068
  disabled: false,
29652
30069
  openEntityMode: layout,
@@ -29672,18 +30089,34 @@ function EntityEditViewInner({
29672
30089
  savingError: void 0,
29673
30090
  formex: formexStub
29674
30091
  };
30092
+ }, [formContext, entityId, layout, status, usedEntity, collection, path, customizationController.propertyConfigs, authController]);
30093
+ const customViewsView = customViews && resolvedEntityViews.filter((e) => !e.includeActions).map((customView) => {
30094
+ if (!customView) return null;
30095
+ const Builder = customView.Builder;
30096
+ if (!Builder) {
30097
+ console.error("INTERNAL: customView.Builder is not defined");
30098
+ return null;
30099
+ }
30100
+ if (!entityId) {
30101
+ return null;
30102
+ }
30103
+ const isActive = selectedTab === customView.key;
30104
+ if (!isActive && !mountedTabsRef.current.has(customView.key)) {
30105
+ return null;
30106
+ }
30107
+ const usedFormContext = formContext ?? readOnlyFormContext;
29675
30108
  return /* @__PURE__ */ jsx("div", { className: cls(defaultBorderMixin, "relative flex-1 w-full h-full overflow-auto", {
29676
- "hidden": selectedTab !== customView.key
30109
+ "hidden": !isActive
29677
30110
  }), role: "tabpanel", children: /* @__PURE__ */ jsx(ErrorBoundary, { children: usedFormContext && /* @__PURE__ */ jsx(Builder, { collection, parentCollectionIds, entity: usedEntity, modifiedValues: usedFormContext?.formex?.values ?? usedEntity?.values, formContext: usedFormContext }) }) }, `custom_view_${customView.key}`);
29678
30111
  }).filter(Boolean);
29679
30112
  const globalLoading = dataLoading && !usedEntity;
29680
- const jsonView = /* @__PURE__ */ jsx("div", { className: cls("relative flex-1 h-full overflow-auto w-full", {
30113
+ 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", {
29681
30114
  "hidden": selectedTab !== JSON_TAB_VALUE
29682
- }), role: "tabpanel", children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(EntityJsonPreview, { values: formContext?.values ?? entity?.values ?? {} }) }) }, "json_view");
30115
+ }), role: "tabpanel", children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(EntityJsonPreview, { values: formContext?.values ?? entity?.values ?? {} }) }) }, "json_view") : null;
29683
30116
  const subCollectionsViews = subcollections && subcollections.map((subcollection) => {
29684
30117
  const subcollectionId = subcollection.id ?? subcollection.path;
29685
30118
  const newFullPath = usedEntity ? `${path}/${usedEntity?.id}/${removeInitialAndTrailingSlashes(subcollection.path)}` : void 0;
29686
- const newFullIdPath = fullIdPath ? `${fullIdPath}/${usedEntity?.id}/${removeInitialAndTrailingSlashes(subcollectionId)}` : void 0;
30119
+ const newFullIdPath = fullIdPath && usedEntity ? `${fullIdPath}/${encodeEntityId(usedEntity.id)}/${removeInitialAndTrailingSlashes(subcollectionId)}` : void 0;
29687
30120
  if (selectedTab !== subcollectionId) return null;
29688
30121
  return /* @__PURE__ */ jsxs("div", { className: "relative flex-1 h-full overflow-auto w-full", role: "tabpanel", children: [
29689
30122
  globalLoading && /* @__PURE__ */ jsx(CircularProgressCenter, {}),
@@ -29727,8 +30160,8 @@ function EntityEditViewInner({
29727
30160
  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}`));
29728
30161
  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}`));
29729
30162
  const viewGroupMenus = collection.viewGroups?.map((group) => {
29730
- const isActive = group.views.includes(selectedTab);
29731
- return /* @__PURE__ */ jsx(Menu, { trigger: /* @__PURE__ */ jsxs("button", { type: "button", className: cls("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-white transition-all", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-surface-400 focus-visible:ring-offset-2", "disabled:pointer-events-none disabled:opacity-50", isActive ? "bg-white text-surface-900 dark:bg-surface-950 dark:text-surface-50" : "text-surface-600 dark:text-surface-400 hover:bg-surface-200 dark:hover:bg-surface-800"), children: [
30163
+ const isActive_0 = group.views.includes(selectedTab);
30164
+ return /* @__PURE__ */ jsx(Menu, { trigger: /* @__PURE__ */ jsxs("button", { type: "button", className: cls("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-white transition-all", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-surface-400 focus-visible:ring-offset-2", "disabled:pointer-events-none disabled:opacity-50", isActive_0 ? "bg-white text-surface-900 dark:bg-surface-950 dark:text-surface-50" : "text-surface-600 dark:text-surface-400 hover:bg-surface-200 dark:hover:bg-surface-800"), children: [
29732
30165
  group.name,
29733
30166
  /* @__PURE__ */ jsx(ExpandMoreIcon, { className: "ml-1 -mr-1", size: "small" })
29734
30167
  ] }), children: group.views.map((viewId) => {
@@ -29972,7 +30405,7 @@ function buildSidePanelsFromUrl(path, collections, newFlag) {
29972
30405
  }
29973
30406
  const propsToSidePanel = (props, buildUrlCollectionPath, resolveIdsFrom, smallLayout, customizationController, authController, locationSearch) => {
29974
30407
  const collectionPath = removeInitialAndTrailingSlashes(props.path);
29975
- const urlPath = props.entityId ? buildUrlCollectionPath(`${collectionPath}/${props.entityId}${props.selectedTab ? "/" + props.selectedTab : ""}${locationSearch}#${SIDE_URL_HASH}`) : buildUrlCollectionPath(`${collectionPath}${locationSearch}#${NEW_URL_HASH}`);
30408
+ const urlPath = props.entityId ? buildUrlCollectionPath(`${collectionPath}/${encodeEntityId(props.entityId)}${props.selectedTab ? "/" + props.selectedTab : ""}${locationSearch}#${SIDE_URL_HASH}`) : buildUrlCollectionPath(`${collectionPath}${locationSearch}#${NEW_URL_HASH}`);
29976
30409
  const resolvedPanelProps = {
29977
30410
  ...props,
29978
30411
  formProps: props.formProps
@@ -30686,7 +31119,7 @@ function FireCMSInternal(t0) {
30686
31119
  return t1;
30687
31120
  }
30688
31121
  function DrawerNavigationItem(t0) {
30689
- const $ = c(24);
31122
+ const $ = c(22);
30690
31123
  const {
30691
31124
  name,
30692
31125
  icon,
@@ -30698,7 +31131,7 @@ function DrawerNavigationItem(t0) {
30698
31131
  } = t0;
30699
31132
  let t1;
30700
31133
  if ($[0] !== icon) {
30701
- t1 = /* @__PURE__ */ jsx("div", { className: "text-text-secondary dark:text-text-secondary-dark", children: icon });
31134
+ t1 = /* @__PURE__ */ jsx("div", { className: "shrink-0 flex items-center justify-center w-[44px] h-[30px] text-surface-500 dark:text-text-secondary-dark group-hover/nav:text-primary transition-colors duration-150", children: icon });
30702
31135
  $[0] = icon;
30703
31136
  $[1] = t1;
30704
31137
  } else {
@@ -30723,7 +31156,7 @@ function DrawerNavigationItem(t0) {
30723
31156
  const {
30724
31157
  isActive
30725
31158
  } = t52;
30726
- return cls("rounded-lg truncate", "hover:bg-surface-accent-300 hover:bg-opacity-75 hover:bg-surface-accent-300/75 dark:hover:bg-surface-accent-800 dark:hover:bg-opacity-75 dark:hover:bg-surface-accent-800/75 text-text-primary dark:text-surface-200 hover:text-surface-900 hover:dark:text-white hover:bg-surface-accent-300/75 dark:hover:bg-surface-accent-800/75", "flex flex-row items-center mr-8", drawerOpen ? "pl-4 h-10" : "pl-4 h-9", "font-semibold text-xs", isActive ? "bg-surface-accent-200 bg-opacity-60 dark:bg-surface-800 dark:bg-opacity-50 bg-surface-accent-200/60 dark:bg-surface-800/50" : "");
31159
+ return cls("rounded-lg truncate group/nav", "hover:bg-primary/5 dark:hover:bg-primary/5 text-surface-700 dark:text-surface-300 hover:text-surface-900 dark:hover:text-white", "flex flex-row items-center", drawerOpen ? "pr-4 h-[30px]" : "h-[30px]", "font-medium text-[13px]", isActive ? "bg-primary/8 dark:bg-primary/10 text-primary dark:text-primary [&_div]:text-primary" : "");
30727
31160
  };
30728
31161
  $[4] = drawerOpen;
30729
31162
  $[5] = t4;
@@ -30733,61 +31166,53 @@ function DrawerNavigationItem(t0) {
30733
31166
  const t5 = drawerOpen ? "opacity-100" : "opacity-0 hidden";
30734
31167
  let t6;
30735
31168
  if ($[6] !== t5) {
30736
- t6 = cls("text-text-primary dark:text-surface-200", t5, "ml-4 font-inherit");
31169
+ t6 = cls("text-surface-700 dark:text-surface-300", t5, "font-inherit truncate space-x-2");
30737
31170
  $[6] = t5;
30738
31171
  $[7] = t6;
30739
31172
  } else {
30740
31173
  t6 = $[7];
30741
31174
  }
30742
31175
  let t7;
30743
- if ($[8] !== name) {
30744
- t7 = name.toUpperCase();
31176
+ if ($[8] !== name || $[9] !== t6) {
31177
+ t7 = /* @__PURE__ */ jsx("div", { className: t6, children: name });
30745
31178
  $[8] = name;
30746
- $[9] = t7;
31179
+ $[9] = t6;
31180
+ $[10] = t7;
30747
31181
  } else {
30748
- t7 = $[9];
31182
+ t7 = $[10];
30749
31183
  }
30750
31184
  let t8;
30751
- if ($[10] !== t6 || $[11] !== t7) {
30752
- t8 = /* @__PURE__ */ jsx("div", { className: t6, children: t7 });
30753
- $[10] = t6;
30754
- $[11] = t7;
30755
- $[12] = t8;
30756
- } else {
30757
- t8 = $[12];
30758
- }
30759
- let t9;
30760
- if ($[13] !== iconWrap || $[14] !== onClick || $[15] !== t3 || $[16] !== t4 || $[17] !== t8 || $[18] !== url) {
30761
- t9 = /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(NavLink, { onClick, style: t3, className: t4, to: url, children: [
31185
+ if ($[11] !== iconWrap || $[12] !== onClick || $[13] !== t3 || $[14] !== t4 || $[15] !== t7 || $[16] !== url) {
31186
+ t8 = /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(NavLink, { onClick, style: t3, className: t4, to: url, children: [
30762
31187
  iconWrap,
30763
- t8
31188
+ t7
30764
31189
  ] }) });
30765
- $[13] = iconWrap;
30766
- $[14] = onClick;
30767
- $[15] = t3;
30768
- $[16] = t4;
31190
+ $[11] = iconWrap;
31191
+ $[12] = onClick;
31192
+ $[13] = t3;
31193
+ $[14] = t4;
31194
+ $[15] = t7;
31195
+ $[16] = url;
30769
31196
  $[17] = t8;
30770
- $[18] = url;
30771
- $[19] = t9;
30772
31197
  } else {
30773
- t9 = $[19];
31198
+ t8 = $[17];
30774
31199
  }
30775
- const listItem = t9;
30776
- const t10 = drawerOpen || adminMenuOpen ? false : tooltipsOpen;
30777
- let t11;
30778
- if ($[20] !== listItem || $[21] !== name || $[22] !== t10) {
30779
- t11 = /* @__PURE__ */ jsx(Tooltip, { open: t10, side: "right", title: name, children: listItem });
30780
- $[20] = listItem;
30781
- $[21] = name;
30782
- $[22] = t10;
30783
- $[23] = t11;
31200
+ const listItem = t8;
31201
+ const t9 = drawerOpen || adminMenuOpen ? false : tooltipsOpen;
31202
+ let t10;
31203
+ if ($[18] !== listItem || $[19] !== name || $[20] !== t9) {
31204
+ t10 = /* @__PURE__ */ jsx(Tooltip, { open: t9, side: "right", title: name, children: listItem });
31205
+ $[18] = listItem;
31206
+ $[19] = name;
31207
+ $[20] = t9;
31208
+ $[21] = t10;
30784
31209
  } else {
30785
- t11 = $[23];
31210
+ t10 = $[21];
30786
31211
  }
30787
- return t11;
31212
+ return t10;
30788
31213
  }
30789
31214
  function DrawerNavigationGroup(t0) {
30790
- const $ = c(29);
31215
+ const $ = c(41);
30791
31216
  const {
30792
31217
  group,
30793
31218
  entries,
@@ -30803,86 +31228,137 @@ function DrawerNavigationGroup(t0) {
30803
31228
  t
30804
31229
  } = useTranslation();
30805
31230
  const t1 = `drawer_group_${group}`;
30806
- let t2;
30807
- if ($[0] !== collapsed || $[1] !== drawerOpen || $[2] !== group || $[3] !== headerActions || $[4] !== onToggleCollapsed || $[5] !== t) {
30808
- t2 = drawerOpen ? /* @__PURE__ */ jsxs("div", { className: "pl-4 pr-2 py-2 flex flex-row items-center cursor-pointer hover:bg-surface-100 dark:hover:bg-surface-700/50 rounded-t-lg transition-colors", onClick: onToggleCollapsed, children: [
30809
- /* @__PURE__ */ jsx(ExpandMoreIcon, { size: "smallest", className: cls("text-surface-500 dark:text-surface-400 transition-transform duration-200 mr-1", collapsed ? "-rotate-90" : "rotate-0") }),
30810
- /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", className: "font-medium flex-grow line-clamp-1", children: (group && group !== "__default__" ? group : t("views_group")).toUpperCase() }),
30811
- headerActions && /* @__PURE__ */ jsx("div", { onClick: _temp$a, children: headerActions })
30812
- ] }) : /* @__PURE__ */ jsx("div", { className: "w-full" });
30813
- $[0] = collapsed;
30814
- $[1] = drawerOpen;
30815
- $[2] = group;
30816
- $[3] = headerActions;
30817
- $[4] = onToggleCollapsed;
30818
- $[5] = t;
30819
- $[6] = t2;
31231
+ const t2 = drawerOpen ? "cursor-pointer hover:bg-surface-100 dark:hover:bg-surface-800/40 rounded-lg" : "opacity-0 invisible pointer-events-none";
31232
+ let t3;
31233
+ if ($[0] !== t2) {
31234
+ t3 = cls("pl-3 pr-2 py-0.5 flex flex-row items-center transition-colors", t2);
31235
+ $[0] = t2;
31236
+ $[1] = t3;
30820
31237
  } else {
30821
- t2 = $[6];
31238
+ t3 = $[1];
30822
31239
  }
30823
- const t3 = collapsed ? "max-h-0 opacity-0" : "max-h-[2000px] opacity-100";
30824
- let t4;
30825
- if ($[7] !== t3) {
30826
- t4 = cls("overflow-hidden transition-all duration-200 ease-in-out", t3);
30827
- $[7] = t3;
30828
- $[8] = t4;
31240
+ const t4 = drawerOpen ? onToggleCollapsed : void 0;
31241
+ const t5 = collapsed ? "-rotate-90" : "rotate-0";
31242
+ let t6;
31243
+ if ($[2] !== t5) {
31244
+ t6 = cls("text-surface-400 dark:text-surface-400 transition-transform duration-200 mr-1", t5);
31245
+ $[2] = t5;
31246
+ $[3] = t6;
30829
31247
  } else {
30830
- t4 = $[8];
31248
+ t6 = $[3];
30831
31249
  }
30832
- let t5;
30833
- if ($[9] !== adminMenuOpen || $[10] !== collapsed || $[11] !== drawerOpen || $[12] !== entries || $[13] !== onItemClick || $[14] !== tooltipsOpen) {
30834
- let t62;
30835
- if ($[16] !== adminMenuOpen || $[17] !== collapsed || $[18] !== drawerOpen || $[19] !== onItemClick || $[20] !== tooltipsOpen) {
30836
- t62 = (entry) => /* @__PURE__ */ jsx(DrawerNavigationItem, { icon: /* @__PURE__ */ jsx(IconForView, { collectionOrView: entry.collection ?? entry.view, size: 18 }), tooltipsOpen: !collapsed && tooltipsOpen, adminMenuOpen, drawerOpen, onClick: () => onItemClick?.(entry), url: entry.url, name: entry.name }, entry.id);
30837
- $[16] = adminMenuOpen;
30838
- $[17] = collapsed;
30839
- $[18] = drawerOpen;
30840
- $[19] = onItemClick;
30841
- $[20] = tooltipsOpen;
30842
- $[21] = t62;
31250
+ let t7;
31251
+ if ($[4] !== t6) {
31252
+ t7 = /* @__PURE__ */ jsx(ExpandMoreIcon, { size: "smallest", className: t6 });
31253
+ $[4] = t6;
31254
+ $[5] = t7;
31255
+ } else {
31256
+ t7 = $[5];
31257
+ }
31258
+ let t8;
31259
+ if ($[6] !== group || $[7] !== t) {
31260
+ t8 = group && group !== "__default__" ? group : t("views_group");
31261
+ $[6] = group;
31262
+ $[7] = t;
31263
+ $[8] = t8;
31264
+ } else {
31265
+ t8 = $[8];
31266
+ }
31267
+ let t9;
31268
+ if ($[9] !== t8) {
31269
+ t9 = /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", className: "font-semibold text-[11px] uppercase tracking-wider flex-grow line-clamp-1 text-surface-400 dark:text-surface-400", children: t8 });
31270
+ $[9] = t8;
31271
+ $[10] = t9;
31272
+ } else {
31273
+ t9 = $[10];
31274
+ }
31275
+ let t10;
31276
+ if ($[11] !== headerActions) {
31277
+ t10 = headerActions && /* @__PURE__ */ jsx("div", { onClick: _temp$a, children: headerActions });
31278
+ $[11] = headerActions;
31279
+ $[12] = t10;
31280
+ } else {
31281
+ t10 = $[12];
31282
+ }
31283
+ let t11;
31284
+ if ($[13] !== t10 || $[14] !== t3 || $[15] !== t4 || $[16] !== t7 || $[17] !== t9) {
31285
+ t11 = /* @__PURE__ */ jsxs("div", { className: t3, onClick: t4, children: [
31286
+ t7,
31287
+ t9,
31288
+ t10
31289
+ ] });
31290
+ $[13] = t10;
31291
+ $[14] = t3;
31292
+ $[15] = t4;
31293
+ $[16] = t7;
31294
+ $[17] = t9;
31295
+ $[18] = t11;
31296
+ } else {
31297
+ t11 = $[18];
31298
+ }
31299
+ const t12 = collapsed ? "max-h-0 opacity-0" : "max-h-[2000px] opacity-100";
31300
+ let t13;
31301
+ if ($[19] !== t12) {
31302
+ t13 = cls("transition-all duration-200 ease-in-out overflow-hidden rounded-lg", t12);
31303
+ $[19] = t12;
31304
+ $[20] = t13;
31305
+ } else {
31306
+ t13 = $[20];
31307
+ }
31308
+ let t14;
31309
+ if ($[21] !== adminMenuOpen || $[22] !== collapsed || $[23] !== drawerOpen || $[24] !== entries || $[25] !== onItemClick || $[26] !== tooltipsOpen) {
31310
+ let t152;
31311
+ if ($[28] !== adminMenuOpen || $[29] !== collapsed || $[30] !== drawerOpen || $[31] !== onItemClick || $[32] !== tooltipsOpen) {
31312
+ t152 = (entry) => /* @__PURE__ */ jsx(DrawerNavigationItem, { icon: /* @__PURE__ */ jsx(IconForView, { collectionOrView: entry.collection ?? entry.view, size: 18 }), tooltipsOpen: !collapsed && tooltipsOpen, adminMenuOpen, drawerOpen, onClick: () => onItemClick?.(entry), url: entry.url, name: entry.name }, entry.id);
31313
+ $[28] = adminMenuOpen;
31314
+ $[29] = collapsed;
31315
+ $[30] = drawerOpen;
31316
+ $[31] = onItemClick;
31317
+ $[32] = tooltipsOpen;
31318
+ $[33] = t152;
30843
31319
  } else {
30844
- t62 = $[21];
30845
- }
30846
- t5 = entries.map(t62);
30847
- $[9] = adminMenuOpen;
30848
- $[10] = collapsed;
30849
- $[11] = drawerOpen;
30850
- $[12] = entries;
30851
- $[13] = onItemClick;
30852
- $[14] = tooltipsOpen;
30853
- $[15] = t5;
31320
+ t152 = $[33];
31321
+ }
31322
+ t14 = entries.map(t152);
31323
+ $[21] = adminMenuOpen;
31324
+ $[22] = collapsed;
31325
+ $[23] = drawerOpen;
31326
+ $[24] = entries;
31327
+ $[25] = onItemClick;
31328
+ $[26] = tooltipsOpen;
31329
+ $[27] = t14;
30854
31330
  } else {
30855
- t5 = $[15];
31331
+ t14 = $[27];
30856
31332
  }
30857
- let t6;
30858
- if ($[22] !== t4 || $[23] !== t5) {
30859
- t6 = /* @__PURE__ */ jsx("div", { className: t4, children: t5 });
30860
- $[22] = t4;
30861
- $[23] = t5;
30862
- $[24] = t6;
31333
+ let t15;
31334
+ if ($[34] !== t13 || $[35] !== t14) {
31335
+ t15 = /* @__PURE__ */ jsx("div", { className: t13, children: t14 });
31336
+ $[34] = t13;
31337
+ $[35] = t14;
31338
+ $[36] = t15;
30863
31339
  } else {
30864
- t6 = $[24];
31340
+ t15 = $[36];
30865
31341
  }
30866
- let t7;
30867
- if ($[25] !== t1 || $[26] !== t2 || $[27] !== t6) {
30868
- t7 = /* @__PURE__ */ jsxs("div", { className: "bg-surface-50 dark:bg-surface-800/30 my-4 rounded-lg ml-3 mr-1", children: [
30869
- t2,
30870
- t6
31342
+ let t16;
31343
+ if ($[37] !== t1 || $[38] !== t11 || $[39] !== t15) {
31344
+ t16 = /* @__PURE__ */ jsxs("div", { className: "my-2 mx-2 flex flex-col", children: [
31345
+ t11,
31346
+ t15
30871
31347
  ] }, t1);
30872
- $[25] = t1;
30873
- $[26] = t2;
30874
- $[27] = t6;
30875
- $[28] = t7;
31348
+ $[37] = t1;
31349
+ $[38] = t11;
31350
+ $[39] = t15;
31351
+ $[40] = t16;
30876
31352
  } else {
30877
- t7 = $[28];
31353
+ t16 = $[40];
30878
31354
  }
30879
- return t7;
31355
+ return t16;
30880
31356
  }
30881
31357
  function _temp$a(e) {
30882
31358
  return e.stopPropagation();
30883
31359
  }
30884
31360
  function DefaultDrawer(t0) {
30885
- const $ = c(36);
31361
+ const $ = c(40);
30886
31362
  const {
30887
31363
  className,
30888
31364
  style
@@ -30894,6 +31370,20 @@ function DefaultDrawer(t0) {
30894
31370
  logo
30895
31371
  } = useApp();
30896
31372
  const [adminMenuOpen, setAdminMenuOpen] = React__default.useState(false);
31373
+ const scrollRef = React__default.useRef(null);
31374
+ const [scrolled, setScrolled] = React__default.useState(false);
31375
+ let t1;
31376
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
31377
+ t1 = () => {
31378
+ if (scrollRef.current) {
31379
+ setScrolled(scrollRef.current.scrollTop > 0);
31380
+ }
31381
+ };
31382
+ $[0] = t1;
31383
+ } else {
31384
+ t1 = $[0];
31385
+ }
31386
+ const handleScroll = t1;
30897
31387
  const analyticsController = useAnalyticsController();
30898
31388
  const navigation = useNavigationController();
30899
31389
  const {
@@ -30910,22 +31400,23 @@ function DefaultDrawer(t0) {
30910
31400
  groups
30911
31401
  } = navigation.topLevelNavigation;
30912
31402
  const adminViews = navigationEntries.filter(_temp$9) ?? [];
30913
- let t1;
30914
- if ($[0] !== groups) {
30915
- t1 = groups.filter(_temp2$3);
30916
- $[0] = groups;
30917
- $[1] = t1;
31403
+ let t2;
31404
+ if ($[1] !== groups) {
31405
+ t2 = groups.filter(_temp2$3);
31406
+ $[1] = groups;
31407
+ $[2] = t2;
30918
31408
  } else {
30919
- t1 = $[1];
31409
+ t2 = $[2];
30920
31410
  }
30921
- const groupsWithoutAdmin = t1;
31411
+ const groupsWithoutAdmin = t2;
30922
31412
  const {
30923
31413
  isGroupCollapsed,
30924
31414
  toggleGroupCollapsed
30925
31415
  } = useCollapsedGroups(groupsWithoutAdmin, "drawer");
30926
- let t2;
30927
- if ($[2] !== analyticsController || $[3] !== closeDrawer || $[4] !== largeLayout) {
30928
- t2 = (view) => {
31416
+ const drawerVisuallyOpen = drawerOpen || drawerHovered;
31417
+ let t3;
31418
+ if ($[3] !== analyticsController || $[4] !== closeDrawer || $[5] !== largeLayout) {
31419
+ t3 = (view) => {
30929
31420
  const eventName = view.type === "collection" ? "drawer_navigate_to_collection" : view.type === "view" ? "drawer_navigate_to_view" : "unmapped_event";
30930
31421
  analyticsController.onAnalyticsEvent?.(eventName, {
30931
31422
  url: view.url
@@ -30934,106 +31425,119 @@ function DefaultDrawer(t0) {
30934
31425
  closeDrawer();
30935
31426
  }
30936
31427
  };
30937
- $[2] = analyticsController;
30938
- $[3] = closeDrawer;
30939
- $[4] = largeLayout;
30940
- $[5] = t2;
31428
+ $[3] = analyticsController;
31429
+ $[4] = closeDrawer;
31430
+ $[5] = largeLayout;
31431
+ $[6] = t3;
30941
31432
  } else {
30942
- t2 = $[5];
31433
+ t3 = $[6];
30943
31434
  }
30944
- const onItemClick = t2;
30945
- let t3;
30946
- if ($[6] !== className) {
30947
- t3 = cls("flex flex-col h-full relative flex-grow w-full", className);
30948
- $[6] = className;
30949
- $[7] = t3;
31435
+ const onItemClick = t3;
31436
+ const t4 = "navigation";
31437
+ const t5 = "Main navigation";
31438
+ let t6;
31439
+ if ($[7] !== className) {
31440
+ t6 = cls("flex flex-col h-full relative grow w-full", className);
31441
+ $[7] = className;
31442
+ $[8] = t6;
30950
31443
  } else {
30951
- t3 = $[7];
31444
+ t6 = $[8];
30952
31445
  }
30953
- let t4;
30954
- if ($[8] !== logo) {
30955
- t4 = /* @__PURE__ */ jsx(DrawerLogo, { logo });
30956
- $[8] = logo;
30957
- $[9] = t4;
31446
+ let t7;
31447
+ if ($[9] !== logo) {
31448
+ t7 = /* @__PURE__ */ jsx(DrawerLogo, { logo });
31449
+ $[9] = logo;
31450
+ $[10] = t7;
30958
31451
  } else {
30959
- t4 = $[9];
31452
+ t7 = $[10];
30960
31453
  }
30961
- let t5;
30962
- if ($[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
30963
- t5 = {
30964
- maskImage: "linear-gradient(to bottom, transparent 0, black 20px, black calc(100% - 20px), transparent 100%)"
31454
+ const t8 = scrolled ? "linear-gradient(to bottom, transparent 0, black 20px, black calc(100% - 20px), transparent 100%)" : "linear-gradient(to bottom, black 0, black calc(100% - 20px), transparent 100%)";
31455
+ let t9;
31456
+ if ($[11] !== t8) {
31457
+ t9 = {
31458
+ maskImage: t8
30965
31459
  };
30966
- $[10] = t5;
31460
+ $[11] = t8;
31461
+ $[12] = t9;
30967
31462
  } else {
30968
- t5 = $[10];
31463
+ t9 = $[12];
30969
31464
  }
30970
- let t6;
30971
- if ($[11] !== adminMenuOpen || $[12] !== drawerOpen || $[13] !== groupsWithoutAdmin || $[14] !== isGroupCollapsed || $[15] !== navigationEntries || $[16] !== onItemClick || $[17] !== toggleGroupCollapsed || $[18] !== tooltipsOpen) {
30972
- let t72;
30973
- if ($[20] !== adminMenuOpen || $[21] !== drawerOpen || $[22] !== isGroupCollapsed || $[23] !== navigationEntries || $[24] !== onItemClick || $[25] !== toggleGroupCollapsed || $[26] !== tooltipsOpen) {
30974
- t72 = (group) => {
31465
+ let t10;
31466
+ if ($[13] !== adminMenuOpen || $[14] !== drawerVisuallyOpen || $[15] !== groupsWithoutAdmin || $[16] !== isGroupCollapsed || $[17] !== navigationEntries || $[18] !== onItemClick || $[19] !== toggleGroupCollapsed || $[20] !== tooltipsOpen) {
31467
+ let t112;
31468
+ if ($[22] !== adminMenuOpen || $[23] !== drawerVisuallyOpen || $[24] !== isGroupCollapsed || $[25] !== navigationEntries || $[26] !== onItemClick || $[27] !== toggleGroupCollapsed || $[28] !== tooltipsOpen) {
31469
+ t112 = (group) => {
30975
31470
  const entriesInGroup = Object.values(navigationEntries).filter((e_0) => e_0.group === group);
30976
- return /* @__PURE__ */ jsx(DrawerNavigationGroup, { group, entries: entriesInGroup, collapsed: isGroupCollapsed(group), onToggleCollapsed: () => toggleGroupCollapsed(group), drawerOpen, tooltipsOpen, adminMenuOpen, onItemClick }, `drawer_group_${group}`);
31471
+ return /* @__PURE__ */ jsx(DrawerNavigationGroup, { group, entries: entriesInGroup, collapsed: isGroupCollapsed(group), onToggleCollapsed: () => toggleGroupCollapsed(group), drawerOpen: drawerVisuallyOpen, tooltipsOpen, adminMenuOpen, onItemClick }, `drawer_group_${group}`);
30977
31472
  };
30978
- $[20] = adminMenuOpen;
30979
- $[21] = drawerOpen;
30980
- $[22] = isGroupCollapsed;
30981
- $[23] = navigationEntries;
30982
- $[24] = onItemClick;
30983
- $[25] = toggleGroupCollapsed;
30984
- $[26] = tooltipsOpen;
30985
- $[27] = t72;
31473
+ $[22] = adminMenuOpen;
31474
+ $[23] = drawerVisuallyOpen;
31475
+ $[24] = isGroupCollapsed;
31476
+ $[25] = navigationEntries;
31477
+ $[26] = onItemClick;
31478
+ $[27] = toggleGroupCollapsed;
31479
+ $[28] = tooltipsOpen;
31480
+ $[29] = t112;
30986
31481
  } else {
30987
- t72 = $[27];
30988
- }
30989
- t6 = groupsWithoutAdmin.map(t72);
30990
- $[11] = adminMenuOpen;
30991
- $[12] = drawerOpen;
30992
- $[13] = groupsWithoutAdmin;
30993
- $[14] = isGroupCollapsed;
30994
- $[15] = navigationEntries;
30995
- $[16] = onItemClick;
30996
- $[17] = toggleGroupCollapsed;
30997
- $[18] = tooltipsOpen;
30998
- $[19] = t6;
31482
+ t112 = $[29];
31483
+ }
31484
+ t10 = groupsWithoutAdmin.map(t112);
31485
+ $[13] = adminMenuOpen;
31486
+ $[14] = drawerVisuallyOpen;
31487
+ $[15] = groupsWithoutAdmin;
31488
+ $[16] = isGroupCollapsed;
31489
+ $[17] = navigationEntries;
31490
+ $[18] = onItemClick;
31491
+ $[19] = toggleGroupCollapsed;
31492
+ $[20] = tooltipsOpen;
31493
+ $[21] = t10;
30999
31494
  } else {
31000
- t6 = $[19];
31495
+ t10 = $[21];
31001
31496
  }
31002
- let t7;
31003
- if ($[28] !== t6) {
31004
- t7 = /* @__PURE__ */ jsx("div", { className: "mt-4 flex-grow overflow-scroll no-scrollbar", style: t5, children: t6 });
31005
- $[28] = t6;
31006
- $[29] = t7;
31497
+ let t11;
31498
+ if ($[30] !== t10 || $[31] !== t9) {
31499
+ t11 = /* @__PURE__ */ jsx("div", { ref: scrollRef, onScroll: handleScroll, className: "flex-grow min-h-0 overflow-y-auto overflow-x-hidden no-scrollbar px-2", style: t9, children: t10 });
31500
+ $[30] = t10;
31501
+ $[31] = t9;
31502
+ $[32] = t11;
31007
31503
  } else {
31008
- t7 = $[29];
31504
+ t11 = $[32];
31009
31505
  }
31010
- const t8 = adminViews.length > 0 && /* @__PURE__ */ jsx(Menu, { side: "right", open: adminMenuOpen, onOpenChange: setAdminMenuOpen, trigger: /* @__PURE__ */ jsxs(IconButton, { shape: "square", className: "m-4 text-surface-900 dark:text-white w-fit", children: [
31011
- /* @__PURE__ */ jsx(Tooltip, { title: "Admin", open: tooltipsOpen, side: "right", sideOffset: 28, children: /* @__PURE__ */ jsx(MoreVertIcon, {}) }),
31012
- drawerOpen && /* @__PURE__ */ jsx("div", { className: cls(drawerOpen ? "opacity-100" : "opacity-0 hidden", "mx-4 font-inherit text-inherit"), children: "ADMIN" })
31506
+ const t12 = adminViews.length > 0 && /* @__PURE__ */ jsx("div", { className: "shrink-0 px-4", children: /* @__PURE__ */ jsx(Menu, { side: "right", open: adminMenuOpen, onOpenChange: setAdminMenuOpen, trigger: /* @__PURE__ */ jsxs("div", { className: cls("flex flex-row items-center rounded-lg cursor-pointer w-full", "hover:bg-surface-accent-100 dark:hover:bg-surface-800 transition-colors duration-150 h-[30px]"), children: [
31507
+ /* @__PURE__ */ jsx("div", { className: "shrink-0 flex items-center justify-center w-[44px] h-[30px] text-surface-500 dark:text-surface-400", children: /* @__PURE__ */ jsx(Tooltip, { title: "Admin", open: drawerVisuallyOpen || adminMenuOpen ? false : tooltipsOpen, side: "right", sideOffset: 28, children: /* @__PURE__ */ jsx(MoreVertIcon, { size: "small" }) }) }),
31508
+ drawerVisuallyOpen && /* @__PURE__ */ jsx("div", { className: cls("font-semibold text-[11px] uppercase tracking-wider text-surface-400"), children: t("admin") })
31013
31509
  ] }), children: adminViews.map((entry) => /* @__PURE__ */ jsxs(MenuItem, { onClick: (event) => {
31014
31510
  event.preventDefault();
31015
31511
  navigate(entry.url);
31016
31512
  }, children: [
31017
31513
  /* @__PURE__ */ jsx(IconForView, { collectionOrView: entry.view }),
31018
31514
  t(entry.name)
31019
- ] }, entry.id)) });
31020
- let t9;
31021
- if ($[30] !== style || $[31] !== t3 || $[32] !== t4 || $[33] !== t7 || $[34] !== t8) {
31022
- t9 = /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: t3, style, children: [
31023
- t4,
31515
+ ] }, entry.id)) }) });
31516
+ let t13;
31517
+ if ($[33] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
31518
+ t13 = /* @__PURE__ */ jsx(DrawerToggle, {});
31519
+ $[33] = t13;
31520
+ } else {
31521
+ t13 = $[33];
31522
+ }
31523
+ let t14;
31524
+ if ($[34] !== style || $[35] !== t11 || $[36] !== t12 || $[37] !== t6 || $[38] !== t7) {
31525
+ t14 = /* @__PURE__ */ jsxs("div", { role: t4, "aria-label": t5, className: t6, style, children: [
31024
31526
  t7,
31025
- t8
31026
- ] }) });
31027
- $[30] = style;
31028
- $[31] = t3;
31029
- $[32] = t4;
31030
- $[33] = t7;
31031
- $[34] = t8;
31032
- $[35] = t9;
31527
+ t11,
31528
+ t12,
31529
+ t13
31530
+ ] });
31531
+ $[34] = style;
31532
+ $[35] = t11;
31533
+ $[36] = t12;
31534
+ $[37] = t6;
31535
+ $[38] = t7;
31536
+ $[39] = t14;
31033
31537
  } else {
31034
- t9 = $[35];
31538
+ t14 = $[39];
31035
31539
  }
31036
- return t9;
31540
+ return t14;
31037
31541
  }
31038
31542
  function _temp2$3(g) {
31039
31543
  return g !== "Admin";
@@ -31041,62 +31545,133 @@ function _temp2$3(g) {
31041
31545
  function _temp$9(e) {
31042
31546
  return e.type === "admin";
31043
31547
  }
31044
- function DrawerLogo(t0) {
31045
- const $ = c(12);
31046
- const {
31047
- logo
31048
- } = t0;
31049
- const navigation = useNavigationController();
31548
+ function DrawerToggle() {
31549
+ const $ = c(26);
31050
31550
  const {
31051
- drawerOpen
31551
+ drawerOpen,
31552
+ drawerHovered,
31553
+ openDrawer,
31554
+ closeDrawer
31052
31555
  } = useApp();
31053
- const t1 = drawerOpen ? "32px 144px 0px 24px" : "72px 12px 0px 12px";
31556
+ const isExpanded = drawerOpen;
31557
+ const isHovered = drawerHovered && !drawerOpen;
31558
+ const showFullContent = isExpanded || isHovered;
31559
+ const t0 = isExpanded ? "Collapse" : "Expand";
31560
+ const t1 = isHovered ? false : void 0;
31054
31561
  let t2;
31055
- if ($[0] !== t1) {
31056
- t2 = {
31057
- transition: "padding 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms",
31058
- padding: t1
31562
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
31563
+ t2 = cls("flex flex-row items-center rounded-lg cursor-pointer", "hover:bg-surface-accent-100 dark:hover:bg-surface-800", "transition-colors duration-150 h-[30px]");
31564
+ $[0] = t2;
31565
+ } else {
31566
+ t2 = $[0];
31567
+ }
31568
+ const t3 = isExpanded ? "Collapse" : "Expand";
31569
+ let t4;
31570
+ let t5;
31571
+ if ($[1] !== closeDrawer || $[2] !== isExpanded || $[3] !== openDrawer) {
31572
+ t4 = () => isExpanded ? closeDrawer() : openDrawer();
31573
+ t5 = (e) => {
31574
+ if (e.key === "Enter" || e.key === " ") {
31575
+ e.preventDefault();
31576
+ isExpanded ? closeDrawer() : openDrawer();
31577
+ }
31059
31578
  };
31060
- $[0] = t1;
31061
- $[1] = t2;
31579
+ $[1] = closeDrawer;
31580
+ $[2] = isExpanded;
31581
+ $[3] = openDrawer;
31582
+ $[4] = t4;
31583
+ $[5] = t5;
31062
31584
  } else {
31063
- t2 = $[1];
31585
+ t4 = $[4];
31586
+ t5 = $[5];
31064
31587
  }
31065
- let t3;
31066
- if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
31067
- t3 = cls("cursor-pointer rounded ml-3 mr-1");
31068
- $[2] = t3;
31588
+ let t6;
31589
+ if ($[6] !== isExpanded) {
31590
+ t6 = /* @__PURE__ */ jsx("div", { className: "shrink-0 flex items-center justify-center w-[44px] h-[30px] text-surface-500 dark:text-surface-400", children: isExpanded ? /* @__PURE__ */ jsx(KeyboardDoubleArrowLeftIcon, { size: "small" }) : /* @__PURE__ */ jsx(KeyboardDoubleArrowRightIcon, { size: "small" }) });
31591
+ $[6] = isExpanded;
31592
+ $[7] = t6;
31069
31593
  } else {
31070
- t3 = $[2];
31594
+ t6 = $[7];
31071
31595
  }
31072
- let t4;
31073
- if ($[3] !== drawerOpen || $[4] !== logo) {
31074
- t4 = logo ? /* @__PURE__ */ jsx("img", { src: logo, alt: "Logo", className: cls("max-w-full max-h-full transition-all object-contain", drawerOpen ? "w-[96px] h-[96px]" : "w-[32px] h-[32px]") }) : /* @__PURE__ */ jsx(FireCMSLogo, {});
31075
- $[3] = drawerOpen;
31076
- $[4] = logo;
31077
- $[5] = t4;
31596
+ const t7 = showFullContent ? "opacity-100 w-auto" : "opacity-0 w-0";
31597
+ let t8;
31598
+ if ($[8] !== t7) {
31599
+ t8 = cls("overflow-hidden transition-all duration-200 ease-in-out", t7);
31600
+ $[8] = t7;
31601
+ $[9] = t8;
31078
31602
  } else {
31079
- t4 = $[5];
31603
+ t8 = $[9];
31080
31604
  }
31081
- let t5;
31082
- if ($[6] !== navigation.basePath || $[7] !== t4) {
31083
- t5 = /* @__PURE__ */ jsx(Tooltip, { title: "Home", sideOffset: 20, side: "right", children: /* @__PURE__ */ jsx(Link, { className: "block", to: navigation.basePath, children: t4 }) });
31084
- $[6] = navigation.basePath;
31085
- $[7] = t4;
31086
- $[8] = t5;
31605
+ const t9 = isExpanded ? "Collapse" : "Expand";
31606
+ let t10;
31607
+ if ($[10] !== t9) {
31608
+ t10 = /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-surface-500 dark:text-surface-400 select-none whitespace-nowrap", children: t9 });
31609
+ $[10] = t9;
31610
+ $[11] = t10;
31087
31611
  } else {
31088
- t5 = $[8];
31612
+ t10 = $[11];
31089
31613
  }
31090
- let t6;
31091
- if ($[9] !== t2 || $[10] !== t5) {
31092
- t6 = /* @__PURE__ */ jsx("div", { style: t2, className: t3, children: t5 });
31093
- $[9] = t2;
31094
- $[10] = t5;
31095
- $[11] = t6;
31614
+ let t11;
31615
+ if ($[12] !== t10 || $[13] !== t8) {
31616
+ t11 = /* @__PURE__ */ jsx("div", { className: t8, children: t10 });
31617
+ $[12] = t10;
31618
+ $[13] = t8;
31619
+ $[14] = t11;
31096
31620
  } else {
31097
- t6 = $[11];
31621
+ t11 = $[14];
31098
31622
  }
31099
- return t6;
31623
+ let t12;
31624
+ if ($[15] !== isExpanded || $[16] !== t11 || $[17] !== t3 || $[18] !== t4 || $[19] !== t5 || $[20] !== t6) {
31625
+ t12 = /* @__PURE__ */ jsxs("div", { className: t2, role: "button", tabIndex: 0, "aria-expanded": isExpanded, "aria-label": t3, onClick: t4, onKeyDown: t5, children: [
31626
+ t6,
31627
+ t11
31628
+ ] });
31629
+ $[15] = isExpanded;
31630
+ $[16] = t11;
31631
+ $[17] = t3;
31632
+ $[18] = t4;
31633
+ $[19] = t5;
31634
+ $[20] = t6;
31635
+ $[21] = t12;
31636
+ } else {
31637
+ t12 = $[21];
31638
+ }
31639
+ let t13;
31640
+ if ($[22] !== t0 || $[23] !== t1 || $[24] !== t12) {
31641
+ t13 = /* @__PURE__ */ jsx("div", { className: "shrink-0 mt-auto px-4 pt-0.5 pb-2", children: /* @__PURE__ */ jsx(Tooltip, { title: t0, side: "right", sideOffset: 12, open: t1, children: t12 }) });
31642
+ $[22] = t0;
31643
+ $[23] = t1;
31644
+ $[24] = t12;
31645
+ $[25] = t13;
31646
+ } else {
31647
+ t13 = $[25];
31648
+ }
31649
+ return t13;
31650
+ }
31651
+ function DrawerLogo(t0) {
31652
+ const $ = c(5);
31653
+ const {
31654
+ logo
31655
+ } = t0;
31656
+ const navigation = useNavigationController();
31657
+ let t1;
31658
+ if ($[0] !== logo) {
31659
+ t1 = logo ? /* @__PURE__ */ jsx("img", { src: logo, alt: "Logo", className: "w-[28px] h-[28px] object-contain" }) : /* @__PURE__ */ jsx(FireCMSLogo, { width: "28px", height: "28px" });
31660
+ $[0] = logo;
31661
+ $[1] = t1;
31662
+ } else {
31663
+ t1 = $[1];
31664
+ }
31665
+ let t2;
31666
+ if ($[2] !== navigation.basePath || $[3] !== t1) {
31667
+ t2 = /* @__PURE__ */ jsx("div", { className: "flex flex-row items-center shrink-0 pt-4 pb-0 px-2", children: /* @__PURE__ */ jsx(Tooltip, { title: "Home", sideOffset: 20, side: "right", children: /* @__PURE__ */ jsx(Link, { className: "shrink-0 flex items-center justify-center w-[56px] h-[40px]", to: navigation.basePath, children: t1 }) }) });
31668
+ $[2] = navigation.basePath;
31669
+ $[3] = t1;
31670
+ $[4] = t2;
31671
+ } else {
31672
+ t2 = $[4];
31673
+ }
31674
+ return t2;
31100
31675
  }
31101
31676
  function UserSelectFieldBinding(t0) {
31102
31677
  const $ = c(44);
@@ -31487,6 +32062,17 @@ const DEFAULT_FIELD_CONFIGS = {
31487
32062
  Field: DateTimeFieldBinding
31488
32063
  }
31489
32064
  },
32065
+ geopoint: {
32066
+ key: "geopoint",
32067
+ name: "Geopoint",
32068
+ description: "Latitude and longitude pair",
32069
+ Icon: LocationOnIcon,
32070
+ color: "#0ea5e9",
32071
+ property: {
32072
+ dataType: "geopoint",
32073
+ Field: GeopointFieldBinding
32074
+ }
32075
+ },
31490
32076
  group: {
31491
32077
  key: "group",
31492
32078
  name: "Group",
@@ -31629,6 +32215,8 @@ function getDefaultFieldId(property) {
31629
32215
  return "switch";
31630
32216
  } else if (property.dataType === "date") {
31631
32217
  return "date_time";
32218
+ } else if (property.dataType === "geopoint") {
32219
+ return "geopoint";
31632
32220
  } else if (property.dataType === "reference") {
31633
32221
  return "reference";
31634
32222
  }
@@ -31639,6 +32227,20 @@ function getFieldId(property) {
31639
32227
  if (property.propertyConfig) return property.propertyConfig;
31640
32228
  return getDefaultFieldId(property);
31641
32229
  }
32230
+ const SIDE_PANEL_HASHES = ["#side", "#new_side"];
32231
+ function shouldBlockEntityNavigation(params) {
32232
+ const {
32233
+ currentLocation,
32234
+ nextLocation,
32235
+ entityPath,
32236
+ basePath,
32237
+ blocked
32238
+ } = params;
32239
+ if (nextLocation.pathname.startsWith(entityPath)) return false;
32240
+ if (SIDE_PANEL_HASHES.includes(nextLocation.hash)) return false;
32241
+ if (SIDE_PANEL_HASHES.includes(currentLocation.hash) && nextLocation.pathname === basePath) return false;
32242
+ return blocked;
32243
+ }
31642
32244
  const EntityEditView = lazyEager(() => Promise.resolve().then(() => EntityEditView$2), "EntityEditView");
31643
32245
  const EntityCollectionView = lazyEager(() => Promise.resolve().then(() => EntityCollectionView$2), "EntityCollectionView");
31644
32246
  function FireCMSRoute() {
@@ -32017,19 +32619,31 @@ function EntityFullScreenRoute({
32017
32619
  setSelectedTab(urlTab);
32018
32620
  }
32019
32621
  }, [urlTab]);
32020
- const basePath = !entityId || isNew ? pathname : pathname.substring(0, pathname.lastIndexOf(`/${entityId}`));
32021
- const entityPath = basePath + `/${entityId}`;
32622
+ const lastCollectionEntry = navigationEntries.findLast((entry_1) => entry_1.type === "collection");
32623
+ const entityEntryIndex = lastEntityEntry ? navigationEntries.indexOf(lastEntityEntry) : -1;
32624
+ const parentCollectionEntry = entityEntryIndex > 0 ? navigationEntries[entityEntryIndex - 1] : void 0;
32625
+ const buildUrl = (escapedPath) => addInitialSlash(navigation.buildUrlCollectionPath(escapedPath));
32626
+ const basePath = !entityId || isNew || !parentCollectionEntry ? pathname : buildUrl(parentCollectionEntry.fullPath);
32627
+ const entityPath = lastEntityEntry ? buildUrl(lastEntityEntry.fullPath) : basePath;
32628
+ const buildEntityUrl = (id, tab) => {
32629
+ const parentPath = parentCollectionEntry?.fullPath ?? lastCollectionEntry?.fullPath;
32630
+ if (!parentPath) return pathname;
32631
+ return buildUrl(`${parentPath}/${encodeEntityId(id)}${tab ? "/" + tab : ""}`);
32632
+ };
32022
32633
  let blocker = void 0;
32023
32634
  try {
32024
32635
  blocker = useBlocker(({
32636
+ currentLocation,
32025
32637
  nextLocation
32026
- }) => {
32027
- if (nextLocation.pathname.startsWith(entityPath)) return false;
32028
- return blocked.current;
32029
- });
32638
+ }) => shouldBlockEntityNavigation({
32639
+ currentLocation,
32640
+ nextLocation,
32641
+ entityPath,
32642
+ basePath,
32643
+ blocked: blocked.current
32644
+ }));
32030
32645
  } catch (e) {
32031
32646
  }
32032
- const lastCollectionEntry = navigationEntries.findLast((entry_1) => entry_1.type === "collection");
32033
32647
  if (isNew && !lastCollectionEntry) {
32034
32648
  throw new Error("INTERNAL: No collection found in the navigation");
32035
32649
  }
@@ -32037,36 +32651,23 @@ function EntityFullScreenRoute({
32037
32651
  return /* @__PURE__ */ jsx(NotFoundPage, {});
32038
32652
  }
32039
32653
  const collection = isNew ? lastCollectionEntry.collection : lastEntityEntry.parentCollection;
32040
- const fullIdPath = isNew ? lastCollectionEntry.path : lastEntityEntry.path;
32041
- const collectionPath = navigation.resolveIdsFrom(fullIdPath);
32654
+ const fullIdPath = isNew ? lastCollectionEntry.fullPath : parentCollectionEntry?.fullPath ?? lastEntityEntry.fullPath;
32655
+ const collectionPath = navigation.resolveIdsFrom(isNew ? lastCollectionEntry.path : lastEntityEntry.path);
32042
32656
  return /* @__PURE__ */ jsxs(Fragment, { children: [
32043
32657
  /* @__PURE__ */ jsx(React__default.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(EntityEditView, { entityId: isNew ? void 0 : entityId, fullIdPath, collection, layout: "full_screen", path: collectionPath, copy: isCopy, selectedTab: selectedTab ?? void 0, onValuesModified: (modified) => blocked.current = modified, onSaved: (params) => {
32044
- const newSelectedTab = params.selectedTab;
32045
32658
  const newEntityId = params.entityId;
32046
- if (newSelectedTab) {
32047
- navigate(`${basePath}/${newEntityId}/${newSelectedTab}`, {
32048
- replace: true
32049
- });
32050
- } else {
32051
- navigate(`${basePath}/${newEntityId}`, {
32052
- replace: true
32053
- });
32054
- }
32659
+ if (!newEntityId) return;
32660
+ navigate(buildEntityUrl(newEntityId, params.selectedTab), {
32661
+ replace: true
32662
+ });
32055
32663
  }, onTabChange: (params_0) => {
32056
32664
  setSelectedTab(params_0.selectedTab);
32057
- if (isNew) {
32665
+ if (isNew || !entityId) {
32058
32666
  return;
32059
32667
  }
32060
- const newSelectedTab_0 = params_0.selectedTab;
32061
- if (newSelectedTab_0) {
32062
- navigate(`${basePath}/${entityId}/${newSelectedTab_0}`, {
32063
- replace: true
32064
- });
32065
- } else {
32066
- navigate(`${basePath}/${entityId}`, {
32067
- replace: true
32068
- });
32069
- }
32668
+ navigate(buildEntityUrl(entityId, params_0.selectedTab), {
32669
+ replace: true
32670
+ });
32070
32671
  }, parentCollectionIds }, collection.id + "_" + (isNew ? "new" : isCopy ? entityId + "_copy" : entityId)) }),
32071
32672
  /* @__PURE__ */ jsx(UnsavedChangesDialog, { open: blocker?.state === "blocked", handleOk: () => blocker?.proceed?.(), handleCancel: () => blocker?.reset?.(), body: "You have unsaved changes in this entity." })
32072
32673
  ] });
@@ -32324,7 +32925,12 @@ const Scaffold = React__default.memo(function Scaffold2(props) {
32324
32925
  const setOnHoverTrue = t4;
32325
32926
  let t5;
32326
32927
  if ($[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
32327
- t5 = () => setOnHover(false);
32928
+ t5 = () => {
32929
+ if (typeof document !== "undefined" && document.querySelector("[data-radix-popper-content-wrapper]")) {
32930
+ return;
32931
+ }
32932
+ setOnHover(false);
32933
+ };
32328
32934
  $[7] = t5;
32329
32935
  } else {
32330
32936
  t5 = $[7];
@@ -32358,24 +32964,26 @@ const Scaffold = React__default.memo(function Scaffold2(props) {
32358
32964
  t7 = $[9];
32359
32965
  }
32360
32966
  const handleDrawerClose = t7;
32361
- const computedDrawerOpen = drawerOpen || Boolean(largeLayout && autoOpenDrawer && onHover);
32967
+ const computedDrawerOpen = drawerOpen;
32968
+ const computedDrawerHovered = Boolean(largeLayout && onHover);
32362
32969
  const hasAppBar = Boolean(appBarChildren.length > 0);
32363
32970
  let t8;
32364
- if ($[10] !== autoOpenDrawer || $[11] !== computedDrawerOpen || $[12] !== includeDrawer || $[13] !== logo || $[14] !== onHover) {
32971
+ if ($[10] !== autoOpenDrawer || $[11] !== computedDrawerHovered || $[12] !== computedDrawerOpen || $[13] !== includeDrawer || $[14] !== logo) {
32365
32972
  t8 = {
32366
32973
  logo,
32367
32974
  hasDrawer: includeDrawer,
32368
- drawerHovered: onHover,
32975
+ drawerHovered: computedDrawerHovered,
32369
32976
  drawerOpen: computedDrawerOpen,
32370
32977
  closeDrawer: handleDrawerClose,
32371
32978
  openDrawer: handleDrawerOpen,
32979
+ closeHover: setOnHoverFalse,
32372
32980
  autoOpenDrawer
32373
32981
  };
32374
32982
  $[10] = autoOpenDrawer;
32375
- $[11] = computedDrawerOpen;
32376
- $[12] = includeDrawer;
32377
- $[13] = logo;
32378
- $[14] = onHover;
32983
+ $[11] = computedDrawerHovered;
32984
+ $[12] = computedDrawerOpen;
32985
+ $[13] = includeDrawer;
32986
+ $[14] = logo;
32379
32987
  $[15] = t8;
32380
32988
  } else {
32381
32989
  t8 = $[15];
@@ -32405,11 +33013,11 @@ const Scaffold = React__default.memo(function Scaffold2(props) {
32405
33013
  }
32406
33014
  const t11 = includeDrawer && drawerChildren;
32407
33015
  let t12;
32408
- if ($[20] !== computedDrawerOpen || $[21] !== includeDrawer || $[22] !== onHover || $[23] !== t11) {
32409
- t12 = /* @__PURE__ */ jsx(DrawerWrapper, { displayed: includeDrawer, onMouseEnter: setOnHoverTrue, onMouseMove: setOnHoverTrue, onMouseLeave: setOnHoverFalse, open: computedDrawerOpen, hovered: onHover, setDrawerOpen, children: t11 });
32410
- $[20] = computedDrawerOpen;
32411
- $[21] = includeDrawer;
32412
- $[22] = onHover;
33016
+ if ($[20] !== computedDrawerHovered || $[21] !== computedDrawerOpen || $[22] !== includeDrawer || $[23] !== t11) {
33017
+ t12 = /* @__PURE__ */ jsx(DrawerWrapper, { displayed: includeDrawer, onMouseEnter: setOnHoverTrue, onMouseMove: setOnHoverTrue, onMouseLeave: setOnHoverFalse, open: computedDrawerOpen, hovered: computedDrawerHovered, setDrawerOpen, children: t11 });
33018
+ $[20] = computedDrawerHovered;
33019
+ $[21] = computedDrawerOpen;
33020
+ $[22] = includeDrawer;
32413
33021
  $[23] = t11;
32414
33022
  $[24] = t12;
32415
33023
  } else {
@@ -32507,193 +33115,149 @@ const DrawerHeader = () => {
32507
33115
  return t0;
32508
33116
  };
32509
33117
  function DrawerWrapper(props) {
32510
- const $ = c(49);
33118
+ const $ = c(36);
32511
33119
  const {
32512
33120
  t
32513
33121
  } = useTranslation();
32514
- const width = !props.displayed ? 0 : props.open ? DRAWER_WIDTH : 72;
32515
- let t0;
32516
- if ($[0] !== width) {
32517
- t0 = {
32518
- width,
32519
- transition: "left 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, opacity 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, width 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"
32520
- };
32521
- $[0] = width;
32522
- $[1] = t0;
33122
+ const layoutWidth = !props.displayed ? 0 : props.open ? DRAWER_WIDTH : 72;
33123
+ const visualWidth = !props.displayed ? 0 : props.open || props.hovered ? DRAWER_WIDTH : 72;
33124
+ const isFloating = props.hovered && !props.open;
33125
+ const t0 = isFloating ? "absolute top-0 left-0 bottom-0 z-30 bg-surface-50 dark:bg-surface-900 shadow-lg border-r" : "relative bg-surface-50 dark:bg-surface-900";
33126
+ let t1;
33127
+ if ($[0] !== t0) {
33128
+ t1 = cls("h-full overflow-hidden", defaultBorderMixin, t0);
33129
+ $[0] = t0;
33130
+ $[1] = t1;
32523
33131
  } else {
32524
- t0 = $[1];
33132
+ t1 = $[1];
32525
33133
  }
32526
- let t1;
32527
- if ($[2] !== props || $[3] !== t) {
32528
- t1 = !props.open && props.displayed && /* @__PURE__ */ jsx(Tooltip, { title: t("open_menu"), side: "right", sideOffset: 12, asChild: true, children: /* @__PURE__ */ jsx("div", { className: "ml-2 fixed top-1 left-2 sm:top-2 sm:left-2 !bg-surface-50 dark:!bg-surface-900 rounded-full w-fit z-20", children: /* @__PURE__ */ jsx(IconButton, { color: "inherit", "aria-label": t("open_menu"), onClick: () => props.setDrawerOpen(true), size: "large", children: /* @__PURE__ */ jsx(MenuIcon, { size: "small" }) }) }) });
32529
- $[2] = props;
32530
- $[3] = t;
32531
- $[4] = t1;
33134
+ let t2;
33135
+ if ($[2] !== visualWidth) {
33136
+ t2 = {
33137
+ width: visualWidth,
33138
+ transition: "left 75ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, opacity 75ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, width 75ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"
33139
+ };
33140
+ $[2] = visualWidth;
33141
+ $[3] = t2;
32532
33142
  } else {
32533
- t1 = $[4];
33143
+ t2 = $[3];
32534
33144
  }
32535
- const t2 = `z-20 absolute right-0 top-4 ${props.open ? "opacity-100" : "opacity-0 invisible"} transition-opacity duration-200 ease-in-out`;
32536
33145
  let t3;
32537
- if ($[5] !== t) {
32538
- t3 = t("close_drawer");
32539
- $[5] = t;
32540
- $[6] = t3;
33146
+ if ($[4] !== props.children) {
33147
+ t3 = /* @__PURE__ */ jsx("div", { className: "flex flex-col h-full", children: props.children });
33148
+ $[4] = props.children;
33149
+ $[5] = t3;
32541
33150
  } else {
32542
- t3 = $[6];
33151
+ t3 = $[5];
32543
33152
  }
32544
33153
  let t4;
32545
- if ($[7] !== props) {
32546
- t4 = () => props.setDrawerOpen(false);
32547
- $[7] = props;
32548
- $[8] = t4;
32549
- } else {
32550
- t4 = $[8];
32551
- }
32552
- let t5;
32553
- if ($[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
32554
- t5 = /* @__PURE__ */ jsx(ChevronLeftIcon, {});
32555
- $[9] = t5;
32556
- } else {
32557
- t5 = $[9];
32558
- }
32559
- let t6;
32560
- if ($[10] !== t3 || $[11] !== t4) {
32561
- t6 = /* @__PURE__ */ jsx(IconButton, { "aria-label": t3, onClick: t4, children: t5 });
32562
- $[10] = t3;
32563
- $[11] = t4;
32564
- $[12] = t6;
32565
- } else {
32566
- t6 = $[12];
32567
- }
32568
- let t7;
32569
- if ($[13] !== t2 || $[14] !== t6) {
32570
- t7 = /* @__PURE__ */ jsx("div", { className: t2, children: t6 });
32571
- $[13] = t2;
32572
- $[14] = t6;
32573
- $[15] = t7;
32574
- } else {
32575
- t7 = $[15];
32576
- }
32577
- let t8;
32578
- if ($[16] !== props.children) {
32579
- t8 = /* @__PURE__ */ jsx("div", { className: "flex flex-col h-full", children: props.children });
32580
- $[16] = props.children;
32581
- $[17] = t8;
32582
- } else {
32583
- t8 = $[17];
32584
- }
32585
- let t9;
32586
- if ($[18] !== t0 || $[19] !== t1 || $[20] !== t7 || $[21] !== t8) {
32587
- t9 = /* @__PURE__ */ jsxs("div", { className: "relative h-full no-scrollbar overflow-y-auto overflow-x-hidden", style: t0, children: [
32588
- t1,
32589
- t7,
32590
- t8
32591
- ] });
32592
- $[18] = t0;
32593
- $[19] = t1;
32594
- $[20] = t7;
32595
- $[21] = t8;
32596
- $[22] = t9;
33154
+ if ($[6] !== t1 || $[7] !== t2 || $[8] !== t3) {
33155
+ t4 = /* @__PURE__ */ jsx("div", { className: t1, style: t2, children: t3 });
33156
+ $[6] = t1;
33157
+ $[7] = t2;
33158
+ $[8] = t3;
33159
+ $[9] = t4;
32597
33160
  } else {
32598
- t9 = $[22];
33161
+ t4 = $[9];
32599
33162
  }
32600
- const innerDrawer = t9;
33163
+ const innerDrawer = t4;
32601
33164
  const largeLayout = useLargeLayout();
32602
33165
  if (!largeLayout) {
32603
33166
  if (!props.displayed) {
32604
33167
  return null;
32605
33168
  }
32606
- let t102;
32607
- if ($[23] !== t) {
32608
- t102 = t("open_menu");
32609
- $[23] = t;
32610
- $[24] = t102;
33169
+ let t52;
33170
+ if ($[10] !== t) {
33171
+ t52 = t("open_menu");
33172
+ $[10] = t;
33173
+ $[11] = t52;
32611
33174
  } else {
32612
- t102 = $[24];
33175
+ t52 = $[11];
32613
33176
  }
32614
- let t112;
32615
- if ($[25] !== props) {
32616
- t112 = () => props.setDrawerOpen(true);
32617
- $[25] = props;
32618
- $[26] = t112;
33177
+ let t62;
33178
+ if ($[12] !== props) {
33179
+ t62 = () => props.setDrawerOpen(true);
33180
+ $[12] = props;
33181
+ $[13] = t62;
32619
33182
  } else {
32620
- t112 = $[26];
33183
+ t62 = $[13];
32621
33184
  }
32622
- let t12;
32623
- if ($[27] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
32624
- t12 = /* @__PURE__ */ jsx(MenuIcon, {});
32625
- $[27] = t12;
33185
+ let t7;
33186
+ if ($[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
33187
+ t7 = /* @__PURE__ */ jsx(MenuIcon, {});
33188
+ $[14] = t7;
32626
33189
  } else {
32627
- t12 = $[27];
33190
+ t7 = $[14];
32628
33191
  }
32629
- let t13;
32630
- if ($[28] !== t102 || $[29] !== t112) {
32631
- t13 = /* @__PURE__ */ jsx(IconButton, { color: "inherit", "aria-label": t102, onClick: t112, size: "large", className: "absolute sm:top-2 sm:left-4 top-1 left-2", children: t12 });
32632
- $[28] = t102;
32633
- $[29] = t112;
32634
- $[30] = t13;
33192
+ let t8;
33193
+ if ($[15] !== t52 || $[16] !== t62) {
33194
+ t8 = /* @__PURE__ */ jsx(IconButton, { color: "inherit", "aria-label": t52, onClick: t62, size: "large", className: "absolute sm:top-2 sm:left-4 top-1 left-2", children: t7 });
33195
+ $[15] = t52;
33196
+ $[16] = t62;
33197
+ $[17] = t8;
32635
33198
  } else {
32636
- t13 = $[30];
33199
+ t8 = $[17];
32637
33200
  }
32638
- const t14 = props.open;
32639
- const t15 = props.setDrawerOpen;
32640
- let t16;
32641
- if ($[31] !== t) {
32642
- t16 = t("navigation_drawer");
32643
- $[31] = t;
32644
- $[32] = t16;
33201
+ const t9 = props.open;
33202
+ const t10 = props.setDrawerOpen;
33203
+ let t11;
33204
+ if ($[18] !== t) {
33205
+ t11 = t("navigation_drawer");
33206
+ $[18] = t;
33207
+ $[19] = t11;
32645
33208
  } else {
32646
- t16 = $[32];
33209
+ t11 = $[19];
32647
33210
  }
32648
- let t17;
32649
- if ($[33] !== innerDrawer || $[34] !== props.open || $[35] !== props.setDrawerOpen || $[36] !== t16) {
32650
- t17 = /* @__PURE__ */ jsx(Sheet, { side: "left", transparent: true, open: t14, onOpenChange: t15, title: t16, overlayClassName: "bg-white bg-opacity-80 bg-white/80", children: innerDrawer });
32651
- $[33] = innerDrawer;
32652
- $[34] = props.open;
32653
- $[35] = props.setDrawerOpen;
32654
- $[36] = t16;
32655
- $[37] = t17;
33211
+ let t12;
33212
+ if ($[20] !== innerDrawer || $[21] !== props.open || $[22] !== props.setDrawerOpen || $[23] !== t11) {
33213
+ t12 = /* @__PURE__ */ jsx(Sheet, { side: "left", transparent: true, open: t9, onOpenChange: t10, title: t11, overlayClassName: "bg-white bg-opacity-80 bg-white/80", children: innerDrawer });
33214
+ $[20] = innerDrawer;
33215
+ $[21] = props.open;
33216
+ $[22] = props.setDrawerOpen;
33217
+ $[23] = t11;
33218
+ $[24] = t12;
32656
33219
  } else {
32657
- t17 = $[37];
33220
+ t12 = $[24];
32658
33221
  }
32659
- let t18;
32660
- if ($[38] !== t13 || $[39] !== t17) {
32661
- t18 = /* @__PURE__ */ jsxs(Fragment, { children: [
32662
- t13,
32663
- t17
33222
+ let t13;
33223
+ if ($[25] !== t12 || $[26] !== t8) {
33224
+ t13 = /* @__PURE__ */ jsxs(Fragment, { children: [
33225
+ t8,
33226
+ t12
32664
33227
  ] });
32665
- $[38] = t13;
32666
- $[39] = t17;
32667
- $[40] = t18;
33228
+ $[25] = t12;
33229
+ $[26] = t8;
33230
+ $[27] = t13;
32668
33231
  } else {
32669
- t18 = $[40];
33232
+ t13 = $[27];
32670
33233
  }
32671
- return t18;
33234
+ return t13;
32672
33235
  }
32673
- let t10;
32674
- if ($[41] !== width) {
32675
- t10 = {
32676
- width,
32677
- transition: "left 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, opacity 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, width 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"
33236
+ let t5;
33237
+ if ($[28] !== layoutWidth) {
33238
+ t5 = {
33239
+ width: layoutWidth,
33240
+ minWidth: layoutWidth,
33241
+ transition: "left 75ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, opacity 75ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, width 75ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"
32678
33242
  };
32679
- $[41] = width;
32680
- $[42] = t10;
33243
+ $[28] = layoutWidth;
33244
+ $[29] = t5;
32681
33245
  } else {
32682
- t10 = $[42];
33246
+ t5 = $[29];
32683
33247
  }
32684
- let t11;
32685
- if ($[43] !== innerDrawer || $[44] !== props.onMouseEnter || $[45] !== props.onMouseLeave || $[46] !== props.onMouseMove || $[47] !== t10) {
32686
- t11 = /* @__PURE__ */ jsx("div", { className: "z-20 relative", onMouseEnter: props.onMouseEnter, onMouseMove: props.onMouseMove, onMouseLeave: props.onMouseLeave, style: t10, children: innerDrawer });
32687
- $[43] = innerDrawer;
32688
- $[44] = props.onMouseEnter;
32689
- $[45] = props.onMouseLeave;
32690
- $[46] = props.onMouseMove;
32691
- $[47] = t10;
32692
- $[48] = t11;
33248
+ let t6;
33249
+ if ($[30] !== innerDrawer || $[31] !== props.onMouseEnter || $[32] !== props.onMouseLeave || $[33] !== props.onMouseMove || $[34] !== t5) {
33250
+ t6 = /* @__PURE__ */ jsx("div", { className: "z-20 relative flex-shrink-0 overflow-visible", onMouseEnter: props.onMouseEnter, onMouseMove: props.onMouseMove, onMouseLeave: props.onMouseLeave, style: t5, children: innerDrawer });
33251
+ $[30] = innerDrawer;
33252
+ $[31] = props.onMouseEnter;
33253
+ $[32] = props.onMouseLeave;
33254
+ $[33] = props.onMouseMove;
33255
+ $[34] = t5;
33256
+ $[35] = t6;
32693
33257
  } else {
32694
- t11 = $[48];
33258
+ t6 = $[35];
32695
33259
  }
32696
- return t11;
33260
+ return t6;
32697
33261
  }
32698
33262
  function _temp$6(child) {
32699
33263
  return child.type.componentType === "Drawer";
@@ -32848,8 +33412,8 @@ const en = {
32848
33412
  // ─── Error states ─────────────────────────────────────────────
32849
33413
  error: "Error",
32850
33414
  error_uploading_file: "Error uploading file",
32851
- error_deleting: "Error deleting",
32852
- error_before_delete: "Error before delete",
33415
+ error_deleting: "Error deleting: {{message}}",
33416
+ error_before_delete: "Error before delete: {{message}}",
32853
33417
  error_updating_asset: "Error updating asset",
32854
33418
  error_deleting_asset: "Error deleting asset",
32855
33419
  error_firestore_index: "A Firestore index is required for this query.",
@@ -33525,8 +34089,8 @@ const es = {
33525
34089
  // ─── Error states ─────────────────────────────────────────────
33526
34090
  error: "Error",
33527
34091
  error_uploading_file: "Error al subir archivo",
33528
- error_deleting: "Error al eliminar",
33529
- error_before_delete: "Error antes de eliminar",
34092
+ error_deleting: "Error al eliminar: {{message}}",
34093
+ error_before_delete: "Error antes de eliminar: {{message}}",
33530
34094
  error_updating_asset: "Error al actualizar recurso",
33531
34095
  error_deleting_asset: "Error al eliminar recurso",
33532
34096
  error_firestore_index: "Se requiere un índice de Firestore para esta consulta.",
@@ -34206,8 +34770,8 @@ const de = {
34206
34770
  // ─── Error states ─────────────────────────────────────────────
34207
34771
  error: "Fehler",
34208
34772
  error_uploading_file: "Fehler beim Hochladen der Datei",
34209
- error_deleting: "Fehler beim Löschen",
34210
- error_before_delete: "Fehler vor dem Löschen",
34773
+ error_deleting: "Fehler beim Löschen: {{message}}",
34774
+ error_before_delete: "Fehler vor dem Löschen: {{message}}",
34211
34775
  error_updating_asset: "Fehler beim Aktualisieren des Assets",
34212
34776
  error_deleting_asset: "Fehler beim Löschen des Assets",
34213
34777
  error_firestore_index: "Für diese Abfrage ist ein Firestore-Index erforderlich.",
@@ -34883,8 +35447,8 @@ const fr = {
34883
35447
  // ─── Error states ─────────────────────────────────────────────
34884
35448
  error: "Erreur",
34885
35449
  error_uploading_file: "Erreur lors du téléchargement du fichier",
34886
- error_deleting: "Erreur lors de la suppression",
34887
- error_before_delete: "Erreur avant la suppression",
35450
+ error_deleting: "Erreur lors de la suppression: {{message}}",
35451
+ error_before_delete: "Erreur avant la suppression: {{message}}",
34888
35452
  error_updating_asset: "Erreur lors de la mise à jour de l'actif",
34889
35453
  error_deleting_asset: "Erreur lors de la suppression de l'actif",
34890
35454
  error_firestore_index: "Un index Firestore est requis pour cette requête.",
@@ -35560,8 +36124,8 @@ const it = {
35560
36124
  // ─── Error states ─────────────────────────────────────────────
35561
36125
  error: "Errore",
35562
36126
  error_uploading_file: "Errore durante il caricamento del file",
35563
- error_deleting: "Errore durante l'eliminazione",
35564
- error_before_delete: "Errore prima dell'eliminazione",
36127
+ error_deleting: "Errore durante l'eliminazione: {{message}}",
36128
+ error_before_delete: "Errore prima dell'eliminazione: {{message}}",
35565
36129
  error_updating_asset: "Errore durante l'aggiornamento dell'asset",
35566
36130
  error_deleting_asset: "Errore durante l'eliminazione dell'asset",
35567
36131
  error_firestore_index: "Per questa query è richiesto un indice Firestore.",
@@ -36237,8 +36801,8 @@ const hi = {
36237
36801
  // ─── Error states ─────────────────────────────────────────────
36238
36802
  error: "त्रुटि",
36239
36803
  error_uploading_file: "फ़ाइल अपलोड करने में त्रुटि",
36240
- error_deleting: "हटाने में त्रुटि",
36241
- error_before_delete: "हटाने से पहले त्रुटि",
36804
+ error_deleting: "हटाने में त्रुटि: {{message}}",
36805
+ error_before_delete: "हटाने से पहले त्रुटि: {{message}}",
36242
36806
  error_updating_asset: "एसेट अपडेट करने में त्रुटि",
36243
36807
  error_deleting_asset: "एसेट हटाने में त्रुटि",
36244
36808
  error_firestore_index: "इस क्वेरी के लिए Firestore इंडेक्स आवश्यक है।",
@@ -36914,8 +37478,8 @@ const pt = {
36914
37478
  // ─── Error states ─────────────────────────────────────────────
36915
37479
  error: "Erro",
36916
37480
  error_uploading_file: "Erro ao carregar ficheiro",
36917
- error_deleting: "Erro ao eliminar",
36918
- error_before_delete: "Erro antes de eliminar",
37481
+ error_deleting: "Erro ao eliminar: {{message}}",
37482
+ error_before_delete: "Erro antes de eliminar: {{message}}",
36919
37483
  error_updating_asset: "Erro ao atualizar recurso",
36920
37484
  error_deleting_asset: "Erro ao eliminar recurso",
36921
37485
  error_firestore_index: "É necessário um índice Firestore para esta consulta.",
@@ -37456,6 +38020,685 @@ const pt = {
37456
38020
  marketplace_link_error: "Erro ao vincular o projeto. Por favor, tente novamente.",
37457
38021
  marketplace_no_account_id: "Nenhum ID de conta do GCP Marketplace encontrado. Por favor, comece pelo GCP Marketplace."
37458
38022
  };
38023
+ const pl = {
38024
+ // ─── Form actions ────────────────────────────────────────────
38025
+ save: "Zapisz",
38026
+ create: "Utwórz",
38027
+ create_copy: "Utwórz kopię",
38028
+ save_and_close: "Zapisz i zamknij",
38029
+ create_copy_and_close: "Utwórz kopię i zamknij",
38030
+ create_and_close: "Utwórz i zamknij",
38031
+ discard: "Odrzuć",
38032
+ clear: "Wyczyść",
38033
+ cancel: "Anuluj",
38034
+ // ─── Entity actions ──────────────────────────────────────────
38035
+ edit: "Edytuj",
38036
+ copy: "Kopiuj",
38037
+ delete: "Usuń",
38038
+ // ─── Delete dialog ───────────────────────────────────────────
38039
+ delete_confirmation_title: "Usunąć?",
38040
+ delete_confirmation_body: "Spowoduje to usunięcie encji. Czy na pewno chcesz kontynuować?",
38041
+ delete_multiple_confirmation_body: "Spowoduje to usunięcie zaznaczonych encji. Czy na pewno chcesz kontynuować?",
38042
+ // ─── Unsaved-changes dialog ───────────────────────────────────
38043
+ unsaved_changes_title: "Niezapisane zmiany",
38044
+ unsaved_changes_body: "Masz niezapisane zmiany. Czy chcesz je odrzucić?",
38045
+ discard_changes: "Odrzuć zmiany",
38046
+ keep_editing: "Kontynuuj edycję",
38047
+ // ─── Collection table / toolbar ──────────────────────────────
38048
+ search: "Szukaj",
38049
+ find_by_id: "Znajdź po ID",
38050
+ find_entity_by_id: "Znajdź encję po ID",
38051
+ filter: "Filtr",
38052
+ filters: "Filtry",
38053
+ clear_filter: "Wyczyść filtr",
38054
+ clear_filter_sort: "Wyczyść filtr/sortowanie",
38055
+ clear_sort: "Wyczyść sortowanie",
38056
+ no_items: "Brak elementów",
38057
+ no_entries_found: "Nie znaleziono wpisów",
38058
+ all_entries_loaded: "Wczytano wszystkie wpisy ({{count}})",
38059
+ create_your_first_entry: "Utwórz swój pierwszy wpis",
38060
+ no_results_filter_sort: "Brak wyników dla zastosowanego filtra/sortowania",
38061
+ add: "Dodaj",
38062
+ remove: "Usuń",
38063
+ multiple_entities: "Wiele encji",
38064
+ unsaved_changes: "Masz niezapisane zmiany w kolekcji {{collectionName}}.",
38065
+ so_empty: "Tak pusto...",
38066
+ no_results: "Brak wyników dla zastosowanego filtra/sortowania",
38067
+ refresh_data: "Odśwież dane",
38068
+ dark_mode: "Ciemny",
38069
+ light_mode: "Jasny",
38070
+ system_mode: "Systemowy",
38071
+ ok: "Ok",
38072
+ save_collection_config: "Zapisz strukturę kolekcji",
38073
+ search_for_more_icons: "Szukaj więcej ikon…",
38074
+ ai_modified: "Zmodyfikowane przez AI",
38075
+ size_label: "Rozmiar",
38076
+ group_by: "Grupuj według",
38077
+ initialize_kanban_order: "Zainicjuj kolejność Kanban",
38078
+ copy_id: "Kopiuj ID",
38079
+ add_specific: "Dodaj {{name}}",
38080
+ select_specific: "Wybierz {{name}}",
38081
+ select_from: "Wybierz z {{name}}",
38082
+ done: "Gotowe",
38083
+ log_out: "Wyloguj się",
38084
+ license_needed: "Wymagana licencja",
38085
+ license_description: "Aby korzystać z FireCMS PRO, potrzebujesz ważnej licencji. Skontaktuj się z nami pod adresem {{email}}, aby uzyskać więcej informacji.",
38086
+ column_cannot_be_edited: "Ta kolumna nie może być edytowana bezpośrednio",
38087
+ close: "Zamknij",
38088
+ unsaved_local_changes: "Niezapisane zmiany lokalne",
38089
+ unsaved_local_changes_description: "Ten dokument został zmodyfikowany lokalnie i zawiera niezapisane zmiany. Zmiany te zostaną utracone, jeśli ich nie zastosujesz.",
38090
+ preview_changes: "Podgląd zmian",
38091
+ apply_changes: "Zastosuj zmiany",
38092
+ discard_local_changes: "Odrzuć zmiany lokalne",
38093
+ preview_local_changes: "Podgląd zmian lokalnych",
38094
+ preview_local_changes_description: "To są zmiany lokalne, które zostaną zastosowane do formularza.",
38095
+ type: "Typ",
38096
+ string: "tekst",
38097
+ number: "liczba",
38098
+ boolean: "wartość logiczna",
38099
+ date: "data",
38100
+ map: "mapa",
38101
+ array: "tablica",
38102
+ arrays_of_arrays_not_supported: "Tablice tablic nie są obsługiwane.",
38103
+ data_type_not_supported: "Typ danych {{dataType}} nie jest jeszcze obsługiwany",
38104
+ passkey_error_unsupported: "Twoje urządzenie lub przeglądarka nie obsługuje kluczy dostępu (passkeys).",
38105
+ admin: "Administrator",
38106
+ home: "Strona główna",
38107
+ this_form_has_errors: "Ten formularz zawiera błędy",
38108
+ error_loading_navigation: "Błąd wczytywania nawigacji",
38109
+ error_loading_auth: "Błąd wczytywania uwierzytelniania",
38110
+ this_form_has_been_modified: "Ten formularz został zmodyfikowany",
38111
+ current_form_in_sync: "Bieżący formularz jest zsynchronizowany z bazą danych",
38112
+ open_in_console: "Otwórz w konsoli",
38113
+ collection_does_not_exist: "Podana kolekcja nie istnieje. Sprawdź konsolę",
38114
+ unexpected_value: "Nieoczekiwana wartość",
38115
+ unexpected_value_click_to_edit: "Nieoczekiwana wartość. Kliknij, aby edytować",
38116
+ unexpected_reference_value: "Nieoczekiwana wartość referencji. Kliknij, aby edytować",
38117
+ copy_url_to_clipboard: "Kopiuj adres URL do schowka",
38118
+ open_image_in_new_tab: "Otwórz obraz w nowej karcie",
38119
+ reference_not_set: "Referencja nie ustawiona",
38120
+ reference_does_not_exist: "Referencja nie istnieje",
38121
+ entity_not_found: "Nie znaleziono encji",
38122
+ file_not_found: "Nie znaleziono pliku",
38123
+ unsaved_changes_in_entity: "Masz niezapisane zmiany w tej encji.",
38124
+ delete_this_role: "Usuń tę rolę",
38125
+ no_roles_yet: "Nie masz jeszcze żadnych ról.",
38126
+ create_default_roles: "Utwórz domyślne role",
38127
+ delete_role_confirmation: "Czy na pewno chcesz usunąć tę rolę?",
38128
+ delete_this_user: "Usuń tego użytkownika",
38129
+ no_users_yet: "Nie ma jeszcze żadnych użytkowników",
38130
+ add_logged_user_as_admin: "Dodaj zalogowanego użytkownika jako administratora",
38131
+ add_current_user_as_admin: "Dodaj bieżącego użytkownika jako administratora",
38132
+ create_default_roles_and_add_admin: "Utwórz domyślne role i dodaj bieżącego użytkownika jako administratora",
38133
+ delete_user_confirmation: "Czy na pewno chcesz usunąć tego użytkownika?",
38134
+ create_your_users_and_roles: "Utwórz użytkowników i role",
38135
+ no_users_or_roles_defined: "Nie masz zdefiniowanych użytkowników ani ról. Możesz utworzyć domyślne role i dodać bieżącego użytkownika jako administratora.",
38136
+ save_before_changing_schema: "Musisz zapisać dokument przed zmianą schematu",
38137
+ edit_schema_for_this_form: "Edytuj schemat tego formularza",
38138
+ no_permissions_to_edit_collection: "Nie masz uprawnień do edycji tej kolekcji",
38139
+ browser_does_not_support_audio: "Twoja przeglądarka nie obsługuje elementu audio.",
38140
+ user_not_found: "Nie znaleziono użytkownika: {{value}}",
38141
+ // ─── Collection view actions ──────────────────────────────────
38142
+ delete_selected: "Usuń",
38143
+ cannot_delete_selected: "Zaznaczono co najmniej jedną encję, której nie można usunąć",
38144
+ // ─── Array / field containers ─────────────────────────────────
38145
+ add_entry: "Dodaj",
38146
+ add_on_top: "Dodaj na górze",
38147
+ add_below: "Dodaj poniżej",
38148
+ add_to_field: "Dodaj do {{fieldName}}",
38149
+ value: "Wartość",
38150
+ key: "Klucz",
38151
+ drag_drop_multiple: "Przeciągnij i upuść pliki tutaj lub kliknij, aby je wybrać. Przeciągnij, aby zmienić kolejność.",
38152
+ drag_drop_single: "Przeciągnij i upuść plik tutaj lub kliknij, aby go wybrać",
38153
+ // ─── Navigation / scaffold ────────────────────────────────────
38154
+ open_menu: "Otwórz menu",
38155
+ close_drawer: "Zamknij panel boczny",
38156
+ navigation_drawer: "Panel nawigacyjny",
38157
+ // ─── Error states ─────────────────────────────────────────────
38158
+ error: "Błąd",
38159
+ error_uploading_file: "Błąd przesyłania pliku",
38160
+ error_deleting: "Błąd podczas usuwania: {{message}}",
38161
+ error_before_delete: "Błąd przed usunięciem: {{message}}",
38162
+ error_updating_asset: "Błąd aktualizacji zasobu",
38163
+ error_deleting_asset: "Błąd usuwania zasobu",
38164
+ error_firestore_index: "Dla tego zapytania wymagany jest indeks Firestore.",
38165
+ create_index: "Utwórz indeks",
38166
+ value_is_not_reference: "Wartość nie jest referencją.",
38167
+ click_to_edit: "Kliknij, aby edytować",
38168
+ data_is_not_array_of_references: "Dane nie są tablicą referencji",
38169
+ // ─── Misc ─────────────────────────────────────────────────────
38170
+ loading: "Wczytywanie",
38171
+ local_changes_applied: "Zmiany lokalne zastosowane w formularzu",
38172
+ local_changes_discarded: "Zmiany lokalne odrzucone",
38173
+ are_you_sure_leave: "Czy na pewno chcesz opuścić tę stronę?",
38174
+ see_console_details: "Więcej informacji w konsoli.",
38175
+ drop_here_create_group: "Upuść tutaj, aby utworzyć nową grupę",
38176
+ filter_for_null_values: "Filtruj puste wartości",
38177
+ value_updated_elsewhere: "Ta wartość została zaktualizowana gdzie indziej",
38178
+ add_property: "Dodaj właściwość",
38179
+ edit_name: "Edytuj {{name}}",
38180
+ this_entity_not_exist: "Ta encja nie istnieje w bazie danych",
38181
+ internal_error: "BŁĄD wewnętrzny",
38182
+ // ─── Rename group dialog ──────────────────────────────────────
38183
+ rename_group: "Zmień nazwę grupy",
38184
+ group_name_label: "Nazwa grupy",
38185
+ group_name_empty_error: "Nazwa grupy nie może być pusta.",
38186
+ group_name_exists_error: "Taka nazwa grupy już istnieje.",
38187
+ // ─── Search ───────────────────────────────────────────────────
38188
+ search_collections: "Szukaj kolekcji",
38189
+ // ─── Navigation groups ────────────────────────────────────────
38190
+ views_group: "Widoki",
38191
+ // ─── Entity Edit View ─────────────────────────────────────────
38192
+ youd_need_to_save_before_additional_collections: "Musisz zapisać encję przed dodaniem kolejnych kolekcji",
38193
+ // ─── Not Found Page ───────────────────────────────────────────
38194
+ page_not_found: "Nie znaleziono strony",
38195
+ page_not_found_body: "Ta strona nie istnieje lub nie masz do niej dostępu",
38196
+ back_to_home: "Wróć do strony głównej",
38197
+ // ─── Collection Editor ─────────────────────────────────────────
38198
+ default_collection_view: "Domyślny widok kolekcji",
38199
+ table_view: "Tabela",
38200
+ cards_view: "Karty",
38201
+ kanban_view: "Kanban",
38202
+ choose_how_entities_displayed_default: "Wybierz, jak encje mają być domyślnie wyświetlane",
38203
+ document_view: "Widok dokumentu",
38204
+ side_panel: "Panel boczny",
38205
+ full_screen: "Pełny ekran",
38206
+ should_documents_opened_full_screen: "Czy dokumenty mają być otwierane na pełnym ekranie, czy w bocznym oknie dialogowym",
38207
+ select_custom_view: "Wybierz widok niestandardowy",
38208
+ no_custom_views_defined: "Nie zdefiniowano żadnych widoków niestandardowych. Zdefiniuj je w ustawieniach dostosowywania przed użyciem tego okna dialogowego.",
38209
+ select_custom_action: "Wybierz akcję niestandardową",
38210
+ no_custom_actions_defined: "Nie zdefiniowano żadnych akcji niestandardowych. Zdefiniuj je w ustawieniach dostosowywania przed użyciem tego okna dialogowego.",
38211
+ no_collections_found: "Nie znaleziono kolekcji",
38212
+ start_building_collections: "Twórz kolekcje w FireCMS bez trudu. Zmapuj je z istniejącymi danymi w bazie, zaimportuj z plików lub skorzystaj z naszych szablonów.",
38213
+ create_first_collection: "Utwórz swoją pierwszą kolekcję",
38214
+ define_collections_programmatically: "Kolekcje możesz też definiować programistycznie.",
38215
+ edit_collection: "Edytuj kolekcję",
38216
+ no_permissions_edit_collection: "Nie masz uprawnień do edycji tej kolekcji",
38217
+ no_permissions_create_collection: "Nie masz uprawnień do tworzenia kolekcji",
38218
+ create_collection: "Utwórz kolekcję",
38219
+ update_collection: "Zaktualizuj kolekcję",
38220
+ new_collection: "Nowa kolekcja",
38221
+ add_new_collection: "Dodaj nową kolekcję",
38222
+ collection_with_name: "Kolekcja {{name}}",
38223
+ change_icon: "Zmień ikonę",
38224
+ is_subcollection_of: "To jest podkolekcja",
38225
+ name: "Nazwa",
38226
+ collection_name_description: "Nazwa tej kolekcji, zwykle w liczbie mnogiej (np. Produkty)",
38227
+ path: "Ścieżka",
38228
+ relative_path_to_parent: "Ścieżka względna do elementu nadrzędnego (nie trzeba podawać ścieżki nadrzędnej)",
38229
+ path_in_database: "Ścieżka, pod którą ta kolekcja jest przechowywana w bazie danych",
38230
+ singular_name: "Nazwa w liczbie pojedynczej",
38231
+ singular_name_description: "Opcjonalnie zdefiniuj nazwę pojedynczą dla encji tej kolekcji",
38232
+ description: "Opis",
38233
+ description_of_collection: "Opis kolekcji, możesz użyć formatowania markdown",
38234
+ collection_id: "ID kolekcji",
38235
+ collection_id_description: "To ID identyfikuje tę kolekcję. Zazwyczaj jest takie samo jak ścieżka.",
38236
+ collection_group: "Grupa kolekcji",
38237
+ collection_group_description: "Grupa kolekcji obejmuje wszystkie kolekcje o tej samej ścieżce. Pozwala to na wykonywanie zapytań w wielu kolekcjach jednocześnie.",
38238
+ advanced_settings: "Ustawienia zaawansowane",
38239
+ doc_history_global: "Historia zmian dokumentu włączona, jeśli jest włączona globalnie",
38240
+ doc_history_enabled: "Historia zmian dokumentu WŁĄCZONA",
38241
+ doc_history_not_enabled: "Historia zmian dokumentu NIE jest włączona",
38242
+ doc_history_description: "Po włączeniu każdy dokument w tej kolekcji będzie miał historię zmian. Jest to przydatne do celów audytowych. Dane są przechowywane w podkolekcji dokumentu w bazie danych o nazwie __history.",
38243
+ document_id_generation: "Generowanie ID dokumentów",
38244
+ code_defined: "Zdefiniowane w kodzie",
38245
+ users_must_define_id: "Użytkownicy muszą podać ID",
38246
+ users_can_define_id: "Użytkownicy mogą podać ID, ale nie jest to wymagane",
38247
+ doc_id_auto_generated: "ID dokumentu generowane jest automatycznie",
38248
+ config_doc_id_generation: "Skonfiguruj sposób generowania ID dokumentów podczas tworzenia nowych encji.",
38249
+ enable_text_search: "Włącz wyszukiwanie tekstowe dla tej kolekcji",
38250
+ text_search_description: "Zezwól na wyszukiwanie tekstowe w tej kolekcji. Jeśli nie określono delegata wyszukiwania tekstowego, użyte zostanie wbudowane lokalne wyszukiwanie tekstowe. Nie jest to zalecane w przypadku dużych kolekcji, ponieważ może powodować problemy z wydajnością i kosztami.",
38251
+ database_id: "ID bazy danych",
38252
+ default_text: "(domyślnie)",
38253
+ custom_actions: "Akcje niestandardowe",
38254
+ more_info: "Więcej informacji",
38255
+ define_custom_actions_cli: "Zdefiniuj własne akcje niestandardowe, przesyłając je za pomocą CLI.",
38256
+ action_defined_in_code: "Ta akcja jest zdefiniowana w kodzie pod kluczem",
38257
+ add_custom_entity_action: "Dodaj niestandardową akcję encji",
38258
+ remove_this_action: "Usunąć tę akcję?",
38259
+ remove_action_warning: "To nie usunie żadnych danych, tylko akcję w CMS",
38260
+ subcollections_of: "Podkolekcje kolekcji",
38261
+ add_subcollection: "Dodaj podkolekcję",
38262
+ custom_views: "Widoki niestandardowe",
38263
+ define_custom_views_cli: "Zdefiniuj własne widoki niestandardowe, przesyłając je za pomocą CLI.",
38264
+ view_defined_in_code: "Ten widok jest zdefiniowany w kodzie pod kluczem",
38265
+ add_custom_entity_view: "Dodaj niestandardowy widok encji",
38266
+ delete_this_subcollection: "Usunąć tę podkolekcję?",
38267
+ remove_collection_warning: "To nie usunie żadnych danych, tylko kolekcję w CMS",
38268
+ remove_this_view: "Usunąć ten widok?",
38269
+ remove_view_warning: "To nie usunie żadnych danych, tylko widok w CMS",
38270
+ no_collection_selected: "Nie wybrano kolekcji",
38271
+ code_for_collection: "Kod dla",
38272
+ use_config_define_json: "Użyj tej konfiguracji, aby zdefiniować kolekcję w formacie JSON.",
38273
+ customise_collection_code: "Jeśli chcesz dostosować kolekcję w kodzie, możesz dodać ten kod kolekcji do konfiguracji swojej aplikacji CMS.",
38274
+ copied: "Skopiowano",
38275
+ property_cant_be_edited: "Tej właściwości nie można edytować",
38276
+ property_not_editable_description: "Możesz nie mieć uprawnień do jej edycji lub jest ona zdefiniowana w kodzie z flagą editable ustawioną na false.",
38277
+ delete_this_property: "Usunąć tę właściwość?",
38278
+ delete_property_warning: "To nie usunie żadnych danych, tylko zmodyfikuje kolekcję.",
38279
+ error_must_specify_id: "Musisz podać ID dla tego pola",
38280
+ error_id_format: "ID może zawierać tylko litery, cyfry i podkreślenia (_) i nie może zaczynać się od cyfry",
38281
+ error_id_already_exists: "Istnieje już inne pole z tym ID",
38282
+ error_must_specify_title: "Musisz podać tytuł dla tego pola",
38283
+ custom_or_other: "Niestandardowe/Inne",
38284
+ select_property_widget: "Wybierz widżet właściwości",
38285
+ error_changing_data_type: "Ten widżet używa innego typu danych niż pierwotnie wybrany widżet. Może to powodować błędy z istniejącymi danymi.",
38286
+ required: "Wymagane",
38287
+ enum_form_dialog: "Okno dialogowe formularza wyliczeniowego",
38288
+ imported_data_preview: "Podgląd zaimportowanych danych",
38289
+ entities_with_same_id_overwritten: "Encje o tym samym ID zostaną nadpisane",
38290
+ collection_editor: "Edytor kolekcji",
38291
+ properties_in_this_group: "Właściwości w tej grupie",
38292
+ data_property_mapping: "Mapowanie danych na właściwości",
38293
+ property_edit_view: "Widok edycji właściwości",
38294
+ all_of_these: "Wszystkie z nich",
38295
+ any_of_these: "Dowolna z nich",
38296
+ only_admins_edit_roles: "Tylko administratorzy mogą edytować role",
38297
+ error_user_not_found: "Nie znaleziono użytkownika",
38298
+ role: "Rola",
38299
+ name_of_this_role: "Nazwa tej roli",
38300
+ id_of_this_role: "ID tej roli",
38301
+ create_entities: "Tworzenie encji",
38302
+ read_entities: "Odczyt encji",
38303
+ update_entities: "Aktualizacja encji",
38304
+ delete_entities: "Usuwanie encji",
38305
+ all_collections: "Wszystkie kolekcje",
38306
+ create_entities_in_collections: "Tworzenie encji w kolekcjach",
38307
+ access_all_data_in_every_collection: "Dostęp do wszystkich danych w każdej kolekcji",
38308
+ update_data_in_any_collection: "Aktualizacja danych w dowolnej kolekcji",
38309
+ delete_data_in_any_collection: "Usuwanie danych w dowolnej kolekcji",
38310
+ allow_all_permissions_in_this_collections: "Zezwól na wszystkie uprawnienia w tych kolekcjach",
38311
+ all: "Wszystkie",
38312
+ customise_permissions_description: "Możesz dostosować uprawnienia, jakie użytkownicy z tą rolą mają w encjach każdej kolekcji",
38313
+ create_collections: "Tworzenie kolekcji",
38314
+ yes: "Tak",
38315
+ no: "Nie",
38316
+ can_user_create_collections: "Czy użytkownik może tworzyć kolekcje",
38317
+ edit_collections: "Edycja kolekcji",
38318
+ only_own_collections: "Tylko swoje",
38319
+ own: "Własne",
38320
+ can_user_edit_collections: "Czy użytkownik może edytować kolekcje",
38321
+ delete_collections: "Usuwanie kolekcji",
38322
+ can_user_delete_collections: "Czy użytkownik może usuwać kolekcje",
38323
+ error_saving_role: "Wystąpił błąd podczas zapisywania tej roli",
38324
+ create_role: "Utwórz rolę",
38325
+ update: "Aktualizuj",
38326
+ only_admins_change_roles: "Tylko administratorzy mogą zmieniać role",
38327
+ must_be_at_least_one_admin: "Musi istnieć co najmniej jeden administrator",
38328
+ logged_user_not_found: "Nie znaleziono zalogowanego użytkownika",
38329
+ user: "Użytkownik",
38330
+ user_id: "ID użytkownika",
38331
+ name_of_this_user: "Nazwa tego użytkownika",
38332
+ email_of_this_user: "Adres e-mail tego użytkownika",
38333
+ roles: "Role",
38334
+ create_user: "Utwórz użytkownika",
38335
+ users: "Użytkownicy",
38336
+ add_user: "Dodaj użytkownika",
38337
+ add_role: "Dodaj rolę",
38338
+ is_admin: "Jest administratorem",
38339
+ default_permissions: "Domyślne uprawnienia",
38340
+ created_on: "Utworzono",
38341
+ email: "E-mail",
38342
+ id: "ID",
38343
+ read: "Odczyt",
38344
+ column_in_file: "Kolumna w pliku",
38345
+ map_to_property: "Zmapuj na właściwość",
38346
+ default_values: "Wartości domyślne",
38347
+ default_values_description: "Możesz wybrać wartość domyślną dla niezmapowanych kolumn i pustych wartości:",
38348
+ property: "Właściwość",
38349
+ default_value: "Wartość domyślna",
38350
+ autogenerate_id: "Generuj ID automatycznie",
38351
+ id_column_description: "Kolumna, która będzie używana jako ID dla każdego dokumentu",
38352
+ do_not_set_value: "Nie ustawiaj wartości",
38353
+ set_value_to_true: "Ustaw wartość na true",
38354
+ set_value_to_false: "Ustaw wartość na false",
38355
+ drag_and_drop_file: "Przeciągnij i upuść plik tutaj lub kliknij, aby go przesłać",
38356
+ error_saving_data: "Błąd zapisywania danych",
38357
+ retry: "Spróbuj ponownie",
38358
+ saving_data: "Zapisywanie danych",
38359
+ entities_saved: "zapisanych encji",
38360
+ do_not_close_tab: "Nie zamykaj tej karty, w przeciwnym razie import zostanie przerwany",
38361
+ import: "Importuj",
38362
+ import_data: "Importuj dane",
38363
+ upload_file_description: "Prześlij plik CSV, Excel lub JSON i zmapuj go do istniejącego schematu",
38364
+ back: "Wstecz",
38365
+ next: "Dalej",
38366
+ save_data: "Zapisz dane",
38367
+ use_column_as_id: "Użyj tej kolumny jako ID",
38368
+ do_not_import_property: "Nie importuj tej właściwości",
38369
+ entities_will_be_overwritten: "Encje o tym samym ID zostaną nadpisane",
38370
+ data_imported_successfully: "Dane zostały pomyślnie zaimportowane",
38371
+ export: "Eksportuj",
38372
+ export_data: "Eksportuj dane",
38373
+ download_table_csv: "Pobierz zawartość tej tabeli jako plik CSV",
38374
+ csv: "CSV",
38375
+ json: "JSON",
38376
+ dates_as_timestamps: "Daty jako znaczniki czasu",
38377
+ dates_as_strings: "Daty jako ciągi znaków",
38378
+ flatten_arrays: "Spłaszcz tablice",
38379
+ download: "Pobierz",
38380
+ large_number_of_documents: "Ta kolekcja zawiera dużą liczbę dokumentów ({{count}}).",
38381
+ include_undefined_values: "Uwzględnij niezdefiniowane wartości",
38382
+ submit: "Wyślij",
38383
+ no_filterable_properties: "Brak dostępnych właściwości do filtrowania",
38384
+ apply_filters: "Zastosuj filtry",
38385
+ list: "Lista",
38386
+ cards: "Karty",
38387
+ board: "Tablica",
38388
+ initialize_kanban_order_desc: "Spowoduje to przypisanie sekwencyjnych wartości kolejności wszystkim elementom, które ich nie mają. Elementy zachowają swoją bieżącą kolejność w ramach każdej kolumny.",
38389
+ kanban_view_not_available: "Widok Kanban jest niedostępny",
38390
+ kanban_view_requires_enum: "Widok Kanban wymaga właściwości tekstowej z wartościami wyliczeniowymi, aby grupować encje w kolumny. Dodaj właściwość wyliczeniową do schematu swojej kolekcji, aby użyć tego widoku.",
38391
+ no_enum_values_configured: "Nie skonfigurowano wartości wyliczeniowych dla właściwości „{{property}}”",
38392
+ items_need_backfill: "Niektóre elementy nie mają ustawionych wartości kolejności. Zainicjuj je, aby włączyć zmianę kolejności metodą przeciągnij i upuść.",
38393
+ initialize: "Zainicjuj",
38394
+ confirm_multiple_delete: "Potwierdzić wielokrotne usunięcie?",
38395
+ delete_entity_confirm_title: "Czy chcesz usunąć ten element: {{entityName}}?",
38396
+ /** AI Collection Generator Popover */
38397
+ generate_collection_with_ai: "Wygeneruj kolekcję za pomocą AI",
38398
+ modify_collection_with_ai: "Zmodyfikuj kolekcję za pomocą AI",
38399
+ describe_collection_to_create: "Opisz kolekcję, którą chcesz utworzyć.",
38400
+ describe_changes_to_make: "Opisz zmiany, które chcesz wprowadzić w tej kolekcji.",
38401
+ ai_placeholder_create: "np. Utwórz kolekcję produktów z nazwą, ceną, opisem i kategorią...",
38402
+ ai_placeholder_modify: "np. Dodaj pole obrazu miniatury z przechowywaniem, ustaw cenę jako wymaganą...",
38403
+ ai_assist: "Asystent AI",
38404
+ generating: "Generowanie...",
38405
+ /** Recently extracted strings for collection editor */
38406
+ this_is_subcollection_of: "To jest podkolekcja",
38407
+ use_existing_paths_database: "Użyj jednej z istniejących ścieżek w swojej bazie danych:",
38408
+ describe_collection_ai: "Opisz swoją kolekcję dla AI:",
38409
+ generate_with_ai: "Generuj za pomocą AI",
38410
+ create_from_json_config: "Utwórz z konfiguracji JSON:",
38411
+ paste_json_config: "Wklej konfigurację JSON",
38412
+ create_collection_from_file_formats: "Utwórz kolekcję z pliku (csv, json, xls, xlsx...)",
38413
+ select_template: "Wybierz szablon:",
38414
+ products: "Produkty",
38415
+ collection_products_subtitle: "Kolekcja produktów ze zdjęciami, cenami i stanem magazynowym",
38416
+ collection_users_subtitle: "Kolekcja użytkowników z adresami e-mail, imionami i rolami",
38417
+ blog_posts: "Wpisy na blogu",
38418
+ collection_blog_posts_subtitle: "Kolekcja wpisów na blogu ze zdjęciami, autorami i rozbudowaną treścią",
38419
+ pages: "Strony",
38420
+ collection_pages_subtitle: "Kolekcja stron ze zdjęciami, autorami i rozbudowaną treścią",
38421
+ continue_from_scratch: "Kontynuuj od zera",
38422
+ /** Admin views config */
38423
+ cms_users: "Użytkownicy CMS",
38424
+ roles_menu: "Role",
38425
+ project_settings: "Ustawienia projektu",
38426
+ firestore_manager: "Menedżer Firestore",
38427
+ manage_your_firestore_data: "Zarządzaj danymi w Firestore",
38428
+ // ─── FireCMS Cloud Login ──────────────────────────────────────
38429
+ build_admin_panel_in_minutes: "Zbuduj panel administracyjny Firebase w kilka minut",
38430
+ go_live_instantly: "Uruchom natychmiast:",
38431
+ create_production_ready_back_offices: "Twórz gotowe do wdrożenia panele administracyjne",
38432
+ without_the_frontend_hassle: "bez kłopotów z frontendem.",
38433
+ automatic_setup: "Automatyczna konfiguracja",
38434
+ from_your_existing_firestore_data: "na podstawie Twoich istniejących danych w Firestore.",
38435
+ seamless_real_time_firebase_integration: "Płynna integracja z Firebase w czasie rzeczywistym.",
38436
+ intuitive_spreadsheet_like_ui: "Intuicyjny interfejs przypominający arkusz kalkulacyjny,",
38437
+ your_whole_team_can_use: "z którego może korzystać cały Twój zespół.",
38438
+ focus_on_your_app: "Skup się na swojej aplikacji,",
38439
+ not_the_admin_panel: "a nie na panelu administracyjnym.",
38440
+ join_our_newsletter: "Dołącz do naszego newslettera. Bez spamu, tylko ważne aktualizacje!",
38441
+ by_signing_in_you_agree_to_our: "Logując się, akceptujesz nasz",
38442
+ terms_and_conditions: "Regulamin",
38443
+ and_our: "oraz naszą",
38444
+ privacy_policy: "Politykę prywatności",
38445
+ firecms_cloud_google_disclosure: "Korzystanie i przekazywanie przez FireCMS Cloud informacji uzyskanych z API Google do jakiejkolwiek innej aplikacji będzie zgodne z",
38446
+ google_api_services_user_data_policy: "Polityką dotyczącą danych użytkowników usług API Google",
38447
+ including_the_limited_use_requirements: "w tym z wymaganiami dotyczącymi ograniczonego użytkowania.",
38448
+ email_password: "E-mail/hasło",
38449
+ sign_in_with_google: "Zaloguj się przez Google",
38450
+ // --- Auth error messages ---
38451
+ auth_user_not_found: "Nie znaleziono użytkownika",
38452
+ auth_wrong_password: "Nieprawidłowe hasło. Spróbuj ponownie.",
38453
+ auth_user_disabled: "Użytkownik jest zablokowany. Skontaktuj się z pomocą techniczną.",
38454
+ auth_account_exists_with_different_credential: "Konto istnieje z inną metodą logowania",
38455
+ auth_email_already_in_use: "Ten adres e-mail jest już używany",
38456
+ auth_google_permissions_required: "Musisz przyznać dodatkowe uprawnienia, aby zarządzać swoimi projektami Google Cloud",
38457
+ auth_invalid_email_password: "Podaj zarówno adres e-mail, jak i hasło",
38458
+ auth_enter_email_first: "Najpierw podaj swój adres e-mail",
38459
+ auth_password_reset_sent: "Wysłano e-mail resetujący hasło",
38460
+ auth_sign_in_account: "Zaloguj się do swojego konta",
38461
+ auth_create_new_account: "Utwórz nowe konto",
38462
+ auth_password: "Hasło",
38463
+ auth_reset_password: "Zresetuj hasło",
38464
+ auth_new_user: "Nowy użytkownik?",
38465
+ auth_have_account: "Masz już konto?",
38466
+ auth_sign_in: "Zaloguj się",
38467
+ auth_sign_up: "Zarejestruj się",
38468
+ // --- SaaS Subscriptions ---
38469
+ subscriptions: "Subskrypcje",
38470
+ manage_your_subscriptions_in_stripe: "Zarządzaj swoimi subskrypcjami w Stripe",
38471
+ go_to_your_stripe_portal: "Przejdź do swojego portalu Stripe, aby zobaczyć historię płatności. Możesz tam również zarządzać subskrypcjami powiązanymi z zalogowanym użytkownikiem.",
38472
+ your_pro_licenses: "Twoje licencje PRO",
38473
+ create_new_license: "Utwórz nową licencję",
38474
+ create_subscriptions_in_this_section: "Twórz subskrypcje w tej sekcji tylko w przypadku samodzielnie hostowanego FireCMS PRO. Jeśli korzystasz z FireCMS Cloud, możesz zaktualizować swój projekt w ustawieniach projektu.",
38475
+ if_you_are_an_agency: "Jeśli jesteś agencją, możesz swobodnie odsprzedawać swoją licencję swoim klientom.",
38476
+ if_you_have_any_questions: "Jeśli masz pytania lub potrzebujesz pomocy, skontaktuj się z nami pod adresem",
38477
+ you_have_not_created_any_pro_licenses: "Nie masz jeszcze żadnych licencji FireCMS PRO",
38478
+ archive: "Archiwizuj",
38479
+ licensed_projects_lowercase: "licencjonowanych projektów",
38480
+ manage: "Zarządzaj",
38481
+ update_payment_method: "Zaktualizuj metodę płatności",
38482
+ your_firecms_cloud_projects: "Twoje projekty FireCMS Cloud",
38483
+ status_active: "Aktywna",
38484
+ status_trialing: "Okres próbny",
38485
+ status_past_due: "Zaległa płatność",
38486
+ status_canceled: "Anulowana",
38487
+ status_unpaid: "Nieopłacona",
38488
+ status_incomplete: "Niekompletna",
38489
+ status_incomplete_expired: "Niekompletna, wygasła",
38490
+ status_unknown: "Nieznany",
38491
+ plan_free: "Brak subskrypcji",
38492
+ plan_cloud_plus: "Subskrybowany",
38493
+ plan_pro: "Pro",
38494
+ plan_unknown: "Nieznany plan",
38495
+ auto_setup_collections_button: "Automatycznie skonfiguruj kolekcje",
38496
+ auto_setup_collections_title: "Automatycznie skonfigurować kolekcje?",
38497
+ auto_setup_collections_desc: "Spowoduje to automatyczne utworzenie konfiguracji kolekcji dla kolekcji, które <b>NIE</b> są jeszcze zmapowane",
38498
+ setting_up_collections: "Konfigurowanie kolekcji",
38499
+ setting_up_collection: "Konfigurowanie {{name}}",
38500
+ no_collections_found_to_setup: "Nie znaleziono kolekcji do skonfigurowania.",
38501
+ collections_have_been_setup: "Kolekcje zostały automatycznie skonfigurowane.",
38502
+ error_setting_up_collections: "Błąd podczas automatycznej konfiguracji kolekcji",
38503
+ setup_collections_title: "Skonfiguruj kolekcje",
38504
+ setup_collections_select_desc: "Wybierz kolekcje do automatycznej konfiguracji:",
38505
+ select_all: "Zaznacz wszystkie",
38506
+ deselect_all: "Odznacz wszystkie",
38507
+ setup_collections_confirm: "Skonfiguruj ({{count}})",
38508
+ collection_setup_success: "{{name}} została skonfigurowana",
38509
+ go_to_collection: "Przejdź do kolekcji",
38510
+ // --- Home Suggestions ---
38511
+ add_your: "Dodaj swoje",
38512
+ database_collections: "kolekcje bazy danych",
38513
+ to_firecms: "do FireCMS",
38514
+ no_unmapped_collections: "Brak niezmapowanych kolekcji w bazie danych",
38515
+ query_and_update_with_datatalk: "Odpytuj i aktualizuj swoje dane w języku naturalnym za pomocą",
38516
+ // --- SaaS Welcome ---
38517
+ welcome_to_firecms: "Witamy w FireCMS Cloud",
38518
+ admin_panel_ready_bring_data: "Twój panel administracyjny jest gotowy. Wprowadźmy Twoje dane.",
38519
+ admin_panel_ready_get_started: "Twój panel administracyjny jest gotowy. Oto jak zacząć.",
38520
+ auto_detect_collections: "Automatyczne wykrywanie kolekcji",
38521
+ auto_detect_collections_desc: "Pozwól AI przeskanować Twoją bazę danych i automatycznie wygenerować schematy kolekcji.",
38522
+ create_a_collection: "Utwórz kolekcję",
38523
+ create_collection_desc: "Ręcznie zdefiniuj swoją pierwszą kolekcję od podstaw za pomocą edytora wizualnego.",
38524
+ read_the_docs: "Przeczytaj dokumentację",
38525
+ read_the_docs_desc: "Dowiedz się, jak dostosowywać pola, widoki, akcje i więcej.",
38526
+ explore_docs: "Poznaj dokumentację",
38527
+ want_to_customize_with_code: "Chcesz dostosować za pomocą kodu? Uruchom",
38528
+ to_scaffold_a_local_project: "aby wygenerować lokalny projekt.",
38529
+ // ─── Collection Editor — Validation ──────────────────────────
38530
+ validation: "Walidacja",
38531
+ unique: "Unikalne",
38532
+ required_message: "Treść komunikatu o wymaganym polu",
38533
+ required_tooltip: "Nie będzie można zapisać tej encji, jeśli ta wartość nie jest ustawiona",
38534
+ unique_tooltip: "Nie może istnieć wiele encji z tą samą wartością",
38535
+ lowercase: "Małe litery",
38536
+ uppercase: "Wielkie litery",
38537
+ trim: "Przytnij",
38538
+ exact_length: "Dokładna długość",
38539
+ min_length: "Minimalna długość",
38540
+ max_length: "Maksymalna długość",
38541
+ matches_regex: "Pasuje do wyrażenia regularnego",
38542
+ not_valid_regexp: "Nieprawidłowe wyrażenie regularne",
38543
+ regex_helper: "np. /^\\d+$/ tylko dla cyfr",
38544
+ min_value: "Wartość minimalna",
38545
+ max_value: "Wartość maksymalna",
38546
+ less_than: "Mniejsza niż",
38547
+ more_than: "Większa niż",
38548
+ positive_value: "Wartość dodatnia",
38549
+ negative_value: "Wartość ujemna",
38550
+ integer_value: "Wartość całkowita",
38551
+ // ─── Collection Editor — Property Edit ───────────────────────
38552
+ invalid_regular_expression: "Nieprawidłowe wyrażenie regularne",
38553
+ must_specify_target_collection: "Musisz określić docelową kolekcję dla tego pola",
38554
+ need_specify_repeat_field: "Musisz określić pole powtarzalne",
38555
+ need_specify_block_properties: "Musisz określić właściwości tego bloku",
38556
+ incomplete_condition: "Niekompletny warunek – wybierz pole",
38557
+ field_name: "Nazwa pola",
38558
+ // ─── Collection Editor — Display & Config ────────────────────
38559
+ kanban_column_property: "Właściwość kolumny Kanban",
38560
+ select_a_property: "Wybierz właściwość",
38561
+ kanban_property_not_found: "Właściwość „{{property}}” nie istnieje lub nie jest tekstową właściwością wyliczeniową. Wybierz prawidłową właściwość lub wyczyść wybór.",
38562
+ no_enum_string_properties: "Nie znaleziono tekstowych właściwości wyliczeniowych. Dodaj właściwość tekstową z enumValues, aby użyć widoku Kanban.",
38563
+ kanban_column_description: "Wybierz właściwość tekstową z wartościami wyliczeniowymi, aby grupować encje w kolumny",
38564
+ create_property: "+ Utwórz właściwość „{{property}}”",
38565
+ order_property: "Właściwość kolejności",
38566
+ order_property_not_found: "Właściwość „{{property}}” nie istnieje lub nie jest właściwością liczbową. Wybierz prawidłową właściwość lub wyczyść wybór.",
38567
+ no_number_properties: "Nie znaleziono właściwości liczbowych. Dodaj właściwość liczbową, aby włączyć sortowanie.",
38568
+ order_property_description: "Wybierz właściwość liczbową, aby zachować kolejność elementów",
38569
+ display_settings: "Ustawienia wyświetlania",
38570
+ default_row_size: "Domyślny rozmiar wiersza",
38571
+ side_dialog_width: "Szerokość okna bocznego",
38572
+ side_dialog_width_description: "Opcjonalnie zdefiniuj szerokość (w pikselach) bocznego okna encji. Wartość domyślna to 768px",
38573
+ inline_editing_enabled: "Dane można edytować bezpośrednio w widoku tabeli",
38574
+ inline_editing_disabled: "Dane można edytować tylko w widoku formularza",
38575
+ inline_editing_description: "Zezwól na edycję danych bezpośrednio w widoku tabeli, bez otwierania widoku formularza.",
38576
+ include_json_view: "Uwzględnij widok JSON",
38577
+ no_json_view: "Nie uwzględniaj widoku JSON",
38578
+ json_view_description: "Uwzględnij reprezentację JSON dokumentu.",
38579
+ not_found_suffix: "nie znaleziono",
38580
+ // ─── Editor ─────────────────────────────────────────────────
38581
+ editor_text: "Tekst",
38582
+ editor_text_description: "Po prostu zacznij pisać zwykły tekst.",
38583
+ editor_heading_1: "Nagłówek 1",
38584
+ editor_heading_1_description: "Duży nagłówek sekcji.",
38585
+ editor_heading_2: "Nagłówek 2",
38586
+ editor_heading_2_description: "Średni nagłówek sekcji.",
38587
+ editor_heading_3: "Nagłówek 3",
38588
+ editor_heading_3_description: "Mały nagłówek sekcji.",
38589
+ editor_todo_list: "Lista zadań",
38590
+ editor_todo_list_description: "Śledź zadania za pomocą listy do zrobienia.",
38591
+ editor_bullet_list: "Lista punktowana",
38592
+ editor_bullet_list_description: "Utwórz prostą listę punktowaną.",
38593
+ editor_numbered_list: "Lista numerowana",
38594
+ editor_numbered_list_description: "Utwórz listę z numeracją.",
38595
+ editor_quote: "Cytat",
38596
+ editor_quote_description: "Uchwyć cytat.",
38597
+ editor_code: "Kod",
38598
+ editor_code_description: "Wstaw fragment kodu.",
38599
+ editor_image: "Obraz",
38600
+ editor_image_description: "Prześlij obraz ze swojego komputera.",
38601
+ editor_multiple: "Wielokrotne",
38602
+ editor_link: "Link",
38603
+ editor_save: "Zapisz",
38604
+ editor_cancel: "Anuluj",
38605
+ editor_remove_link: "Usuń link",
38606
+ editor_paste_or_type_link: "Wklej lub wpisz link",
38607
+ editor_open_in_new_window: "Otwórz w nowym oknie",
38608
+ editor_bold: "Pogrubienie",
38609
+ editor_italic: "Kursywa",
38610
+ editor_underline: "Podkreślenie",
38611
+ editor_strikethrough: "Przekreślenie",
38612
+ editor_autocomplete: "Autouzupełnianie",
38613
+ editor_autocomplete_description: "Dodaj tekst na podstawie kontekstu.",
38614
+ // ─── Text Search Dialog ─────────────────────────────────────
38615
+ text_search_dialog_title: "Włącz wyszukiwanie tekstowe",
38616
+ text_search_local_not_recommended: "Lokalne wyszukiwanie tekstowe nie jest zalecane dla dużych kolekcji.",
38617
+ text_search_local_fetch_warning: "Pamiętaj, że włączenie lokalnego wyszukiwania tekstowego wymaga pobrania wszystkich dokumentów z kolekcji i zapisania ich w przeglądarce. Może to być nieefektywne w przypadku dużych kolekcji, a także może wiązać się z dodatkowymi kosztami.",
38618
+ text_search_external_suggestion: "W przypadku większych kolekcji zalecamy użycie zewnętrznej wyszukiwarki, takiej jak Algolia lub Elastic Search, oraz przypisanie delegata wyszukiwania do swojej konfiguracji.",
38619
+ text_search_local_description: "Lokalne wyszukiwanie tekstowe to najprostszy sposób na włączenie wyszukiwania tekstowego w kolekcji. Wczytuje wszystkie dokumenty kolekcji w przeglądarce i przeprowadza wyszukiwanie lokalnie. Jest to zalecana opcja dla małych kolekcji.",
38620
+ text_search_own_implementation: "Zaimplementowano własny kontroler wyszukiwania tekstowego. Możesz włączyć wyszukiwanie tekstowe dla swojej kolekcji.",
38621
+ text_search_enable_for_collection: "Włącz dla tej kolekcji",
38622
+ text_search_enable_for_project: "Włącz dla projektu",
38623
+ text_search_enabled_snackbar: "Lokalne wyszukiwanie tekstowe włączone",
38624
+ // ─── Cloud Project Settings ──────────────────────────────────
38625
+ settings_subscription_plan: "Plan subskrypcji",
38626
+ settings_subscribed_to: "Obecnie subskrybujesz",
38627
+ settings_no_active_subscription: "Obecnie ten projekt nie ma aktywnej subskrypcji.",
38628
+ settings_trial_valid_until: "Twój okres próbny jest ważny do {{date}}.",
38629
+ settings_features_intro: "Oto niektóre z funkcji, z których już korzystasz, używając FireCMS Cloud",
38630
+ settings_feature_managed_service: "Zarządzana, zawsze aktualna usługa",
38631
+ settings_feature_local_text_search: "Lokalne wyszukiwanie tekstowe",
38632
+ settings_feature_unlimited_users_roles: "Nieograniczona liczba użytkowników i ról",
38633
+ settings_feature_theme_logo: "Dostosowywanie motywu i logo",
38634
+ settings_feature_custom_fields_views: "Niestandardowe pola formularzy i widoki",
38635
+ settings_feature_secondary_databases: "Dodatkowe bazy danych",
38636
+ settings_feature_ai_content: "Generowanie treści AI za pomocą OpenAI i Google",
38637
+ settings_feature_unlimited_export: "Nieograniczony eksport danych",
38638
+ settings_feature_appcheck: "AppCheck",
38639
+ settings_heading: "Ustawienia",
38640
+ settings_project_name: "Nazwa projektu",
38641
+ settings_default_language: "Język domyślny",
38642
+ settings_default_language_caption: "Wybierz język bazowy dla tego projektu. Użytkownicy mogą zmienić tę preferencję w swoich ustawieniach osobistych.",
38643
+ settings_enable_local_text_search: "Włącz lokalne wyszukiwanie tekstowe",
38644
+ settings_local_text_search_caption: "Włącz lokalne wyszukiwanie tekstowe dla wszystkich kolekcji. Pozwoli to na wyszukiwanie pól tekstowych w kolekcjach za pomocą paska wyszukiwania FireCMS. Pamiętaj, że ta funkcja może wiązać się z wyższą liczbą odczytów, ponieważ indeksuje wszystkie pola tekstowe w kolekcjach.",
38645
+ settings_doc_history_all_collections: "Historia dokumentów włączona dla wszystkich kolekcji",
38646
+ settings_doc_history_caption: "Gdy ta opcja jest włączona, wszystkie kolekcje będą miały domyślnie włączoną historię. To ustawienie można zastąpić dla każdej kolekcji osobno. Historia jest zapisywana w podkolekcji __history każdego dokumentu.",
38647
+ settings_theme: "Motyw",
38648
+ settings_primary_color: "Kolor podstawowy",
38649
+ settings_secondary_color: "Kolor dodatkowy",
38650
+ settings_sample_theme_components: "Przykładowe komponenty motywu",
38651
+ settings_drag_drop_logo: "Przeciągnij i upuść tutaj swoje logo",
38652
+ settings_create_subscription: "Utwórz subskrypcję",
38653
+ settings_stripe_disclaimer: "Zostaniesz przekierowany do Stripe, aby dokończyć subskrypcję. Rozliczenie miesięczne na podstawie maksymalnej liczby użytkowników w danym miesiącu. Anuluj w dowolnym momencie – bieżący okres rozliczeniowy jest już opłacony, więc po anulowaniu nie zostaną naliczone żadne dodatkowe opłaty.",
38654
+ settings_subscription_is: "Subskrypcja jest",
38655
+ settings_next_payment_on: "Następna płatność nastąpi {{date}}.",
38656
+ settings_seats_count: "Masz",
38657
+ settings_seat: "miejsce",
38658
+ settings_seats: "miejsc",
38659
+ settings_per_seat: "po {{price}}/miejsce/{{interval}}",
38660
+ settings_current_price: "Aktualna cena to",
38661
+ settings_per_user_usage: "na użytkownika (zależnie od zużycia).",
38662
+ settings_cancelled_active_until: "Ta subskrypcja została anulowana i będzie aktywna do {{date}}.",
38663
+ settings_no_additional_charges: "Po anulowaniu nie zostaną naliczone żadne dodatkowe opłaty.",
38664
+ settings_manage_subscription: "Zarządzaj subskrypcją",
38665
+ settings_security_rules: "Reguły bezpieczeństwa",
38666
+ settings_security_rules_description: "FireCMS wykorzystuje reguły bezpieczeństwa Firebase do ograniczania dostępu do danych. Podczas tworzenia nowego użytkownika za pomocą FireCMS do użytkownika w projekcie klienckim dodawane jest niestandardowe roszczenie fireCMSUser. Dodając poniższe reguły bezpieczeństwa do swojego projektu, zapewniasz użytkownikom FireCMS dostęp do danych za pośrednictwem FireCMS.",
38667
+ settings_security_rules_add_domain: "Pamiętaj, aby dodać domenę {{domain}} do listy dozwolonych domen u swojego dostawcy",
38668
+ settings_security_rules_caption: "Te reguły ograniczają dostęp do danych wyłącznie do użytkowników FireCMS, ale nie wymuszają uprawnień na poziomie bazy danych. Uprawnienia są jednak egzekwowane po stronie frontendu, co w większości projektów sprawdzi się dobrze. Jeśli potrzebujesz wymuszać uprawnienia na poziomie bazy danych, możesz samodzielnie zmodyfikować te reguły bezpieczeństwa według swoich potrzeb. Role przypisane użytkownikowi są ustawiane jako niestandardowe roszczenie w tokenie uwierzytelniania Firebase, więc możesz ich użyć w regułach bezpieczeństwa.",
38669
+ settings_appcheck: "AppCheck",
38670
+ settings_appcheck_description: "Możesz włączyć AppCheck, aby chronić swoje usługi Firebase przed nadużyciami. Sprawdź, jak go skonfigurować, w dokumentacji Firebase. Gdy masz ustawionego dostawcę, możesz go tutaj włączyć. Będziesz musiał podać sekret w ustawieniach projektu Firebase oraz klucz witryny w konfiguracji FireCMS.",
38671
+ settings_appcheck_add_domain: "Pamiętaj, aby dodać domenę {{domain}} do listy dozwolonych domen u swojego dostawcy",
38672
+ settings_appcheck_enable: "Włącz AppCheck",
38673
+ settings_appcheck_site_key: "Klucz witryny",
38674
+ settings_appcheck_update: "Zaktualizuj AppCheck",
38675
+ settings_appcheck_refresh_note: "Po zapisaniu może być konieczne odświeżenie strony, aby zobaczyć zmiany.",
38676
+ settings_appcheck_updated: "AppCheck zaktualizowany",
38677
+ settings_appcheck_error: "Błąd podczas aktualizacji AppCheck",
38678
+ // --- Permission Error View ---
38679
+ missing_firestore_security_rules: "Brak reguł bezpieczeństwa Firestore",
38680
+ firecms_cloud_requires_security_rule: "FireCMS Cloud wymaga określonej reguły bezpieczeństwa w Twoim Firestore, aby przyznać dostęp uwierzytelnionym użytkownikom. Kolekcja",
38681
+ cannot_be_accessed_without_it: "nie może być dostępna bez tej reguły.",
38682
+ required_security_rule: "Wymagana reguła bezpieczeństwa",
38683
+ fix_automatically: "Napraw automatycznie",
38684
+ open_firebase_rules: "Otwórz reguły Firebase",
38685
+ security_rules_updated_successfully: "Reguły bezpieczeństwa zostały pomyślnie zaktualizowane! Odśwież stronę, aby wczytać dane.",
38686
+ sec_rules_fixing: "Naprawianie...",
38687
+ sec_rules_fixed: "Naprawiono!",
38688
+ // ─── GCP Marketplace ─────────────────────────────────────────
38689
+ marketplace_managed_by_gcp: "Zarządzane przez GCP Marketplace",
38690
+ marketplace_billing_note: "Twoja subskrypcja jest zarządzana przez Google Cloud Marketplace. Zmiany planu, rozliczenia i anulowanie są obsługiwane w konsoli GCP.",
38691
+ marketplace_manage_in_gcp_console: "Zarządzaj w konsoli GCP",
38692
+ marketplace_plan_changes_note: "Aby zmienić plan lub anulować subskrypcję, odwiedź swoje zamówienia w GCP Marketplace.",
38693
+ marketplace_welcome_title: "Witamy z GCP Marketplace!",
38694
+ marketplace_welcome_subtitle: "Twoja subskrypcja Google Cloud Marketplace jest aktywna. Wybierz istniejący projekt lub utwórz nowy, aby go połączyć.",
38695
+ marketplace_select_or_create_project: "Wybierz lub utwórz projekt",
38696
+ marketplace_link_project: "Połącz projekt",
38697
+ marketplace_linking: "Łączenie projektu…",
38698
+ marketplace_link_success: "Projekt został pomyślnie połączony! Przekierowywanie…",
38699
+ marketplace_link_error: "Błąd podczas łączenia projektu. Spróbuj ponownie.",
38700
+ marketplace_no_account_id: "Nie znaleziono ID konta GCP Marketplace. Rozpocznij od GCP Marketplace."
38701
+ };
37459
38702
  const FIRECMS_NS = "firecms_core";
37460
38703
  const FIRECMS_LOCALE_STORAGE_KEY = "firecms_locale";
37461
38704
  function FireCMSi18nProvider({
@@ -37555,6 +38798,11 @@ function buildResources(translations) {
37555
38798
  [FIRECMS_NS]: {
37556
38799
  ...pt
37557
38800
  }
38801
+ },
38802
+ pl: {
38803
+ [FIRECMS_NS]: {
38804
+ ...pl
38805
+ }
37558
38806
  }
37559
38807
  };
37560
38808
  if (!translations) return resources;
@@ -42151,6 +43399,7 @@ export {
42151
43399
  DrawerLogo,
42152
43400
  DrawerNavigationGroup,
42153
43401
  DrawerNavigationItem,
43402
+ DrawerToggle,
42154
43403
  EmptyValue,
42155
43404
  EntityCard,
42156
43405
  EntityCollectionCardView,
@@ -42177,6 +43426,8 @@ export {
42177
43426
  FormEntry,
42178
43427
  FormLayout,
42179
43428
  GeoPoint,
43429
+ GeopointFieldBinding,
43430
+ GeopointPropertyPreview,
42180
43431
  IconForView,
42181
43432
  ImagePreview,
42182
43433
  InternalUserManagementContext,
@@ -42254,15 +43505,18 @@ export {
42254
43505
  canDeleteEntity,
42255
43506
  canEditEntity,
42256
43507
  copyEntityAction,
43508
+ decodeEntityId,
42257
43509
  defaultDateFormat,
42258
43510
  deleteEntityAction,
42259
43511
  deleteEntityWithCallbacks,
42260
43512
  editEntityAction,
42261
43513
  en,
43514
+ encodeEntityId,
42262
43515
  enumToObjectEntries,
42263
43516
  es,
42264
43517
  evaluateCondition,
42265
43518
  flattenObject,
43519
+ formatGeoPoint,
42266
43520
  fullPathToCollectionSegments,
42267
43521
  getArrayResolvedProperties,
42268
43522
  getArrayValuesCount,
@@ -42284,6 +43538,7 @@ export {
42284
43538
  getFieldConfig,
42285
43539
  getFieldId,
42286
43540
  getFormFieldKeys,
43541
+ getGeoPointCoordinates,
42287
43542
  getHashValue,
42288
43543
  getIcon,
42289
43544
  getIconForProperty,
@@ -42301,6 +43556,7 @@ export {
42301
43556
  hydrateRegExp,
42302
43557
  iconSynonyms,
42303
43558
  iconsSearch,
43559
+ isDataTypeFilterable,
42304
43560
  isDefaultFieldConfigId,
42305
43561
  isEmptyObject,
42306
43562
  isEnumValueDisabled,
@@ -42320,6 +43576,8 @@ export {
42320
43576
  mergeDeep,
42321
43577
  mergeEntityActions,
42322
43578
  navigateToEntity,
43579
+ normalizeGeoPoint,
43580
+ parseGeoPoint,
42323
43581
  pick,
42324
43582
  plural,
42325
43583
  prettifyIdentifier,