@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.umd.js CHANGED
@@ -170,6 +170,12 @@
170
170
  if (s.startsWith("/")) return s;
171
171
  else return `/${s}`;
172
172
  }
173
+ function encodeEntityId(entityId) {
174
+ return entityId.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll("#", "%23").replaceAll("?", "%3F");
175
+ }
176
+ function decodeEntityId(encodedEntityId) {
177
+ return encodedEntityId.replaceAll("%2F", "/").replaceAll("%23", "#").replaceAll("%3F", "?").replaceAll("%25", "%");
178
+ }
173
179
  function getLastSegment(path) {
174
180
  const cleanPath = removeInitialAndTrailingSlashes(path);
175
181
  if (cleanPath.includes("/")) {
@@ -263,7 +269,7 @@
263
269
  return result;
264
270
  }
265
271
  function getCollectionPathsCombinations(subpaths) {
266
- const entries = subpaths.length > 0 && subpaths.length % 2 === 0 ? subpaths.splice(0, subpaths.length - 1) : subpaths;
272
+ const entries = subpaths.length > 0 && subpaths.length % 2 === 0 ? subpaths.slice(0, subpaths.length - 1) : subpaths;
267
273
  const length = entries.length;
268
274
  const result = [];
269
275
  for (let i = length; i > 0; i = i - 2) {
@@ -295,7 +301,7 @@
295
301
  onClose
296
302
  });
297
303
  } else {
298
- let to = navigation.buildUrlCollectionPath(entityId ? `${fullIdPath ?? path}/${entityId}` : fullIdPath ?? path);
304
+ let to = navigation.buildUrlCollectionPath(entityId ? `${fullIdPath ?? path}/${encodeEntityId(entityId)}` : fullIdPath ?? path);
299
305
  if (entityId && selectedTab) {
300
306
  to += `/${selectedTab}`;
301
307
  }
@@ -658,6 +664,8 @@
658
664
  return [];
659
665
  } else if (dataType === "map") {
660
666
  return {};
667
+ } else if (dataType === "geopoint") {
668
+ return null;
661
669
  } else {
662
670
  return null;
663
671
  }
@@ -691,6 +699,9 @@
691
699
  return result;
692
700
  }
693
701
  function getReferenceFrom(entity) {
702
+ if (!entity) {
703
+ throw new Error("getReferenceFrom: entity is null or undefined");
704
+ }
694
705
  return new EntityReference(entity.id, entity.path, entity.databaseId);
695
706
  }
696
707
  function traverseValuesProperties(inputValues, properties, operation) {
@@ -740,6 +751,12 @@
740
751
  }
741
752
  return value;
742
753
  }
754
+ function isDataTypeFilterable(dataType, isPartOfArray = false) {
755
+ if (isPartOfArray) {
756
+ return ["string", "number", "date", "reference"].includes(dataType);
757
+ }
758
+ return ["string", "number", "boolean", "date", "reference", "array"].includes(dataType);
759
+ }
743
760
  function enumToObjectEntries(enumValues) {
744
761
  if (Array.isArray(enumValues)) {
745
762
  return enumValues;
@@ -1108,7 +1125,8 @@
1108
1125
  path,
1109
1126
  collections = [],
1110
1127
  currentFullPath,
1111
- currentFullIdPath
1128
+ currentFullIdPath,
1129
+ currentFullUrlPath
1112
1130
  } = props;
1113
1131
  const subpaths = removeInitialAndTrailingSlashes(path).split("/");
1114
1132
  const subpathCombinations = getCollectionPathsCombinations(subpaths);
@@ -1122,26 +1140,29 @@
1122
1140
  }
1123
1141
  if (collection) {
1124
1142
  const collectionPath = currentFullPath && currentFullPath.length > 0 ? currentFullPath + "/" + collection.path : collection.path;
1143
+ const collectionUrlPath = currentFullUrlPath && currentFullUrlPath.length > 0 ? currentFullUrlPath + "/" + collection.path : collection.path;
1125
1144
  const fullIdPath = currentFullIdPath && currentFullIdPath.length > 0 ? currentFullIdPath + "/" + collection.id : collection.id;
1126
1145
  result.push({
1127
1146
  type: "collection",
1128
1147
  id: collection.id,
1129
1148
  path: collectionPath,
1130
- fullPath: collectionPath,
1149
+ fullPath: collectionUrlPath,
1131
1150
  fullIdPath,
1132
1151
  collection
1133
1152
  });
1134
1153
  const restOfThePath = removeInitialAndTrailingSlashes(removeInitialAndTrailingSlashes(path).replace(subpathCombination, ""));
1135
1154
  const nextSegments = restOfThePath.length > 0 ? restOfThePath.split("/") : [];
1136
1155
  if (nextSegments.length > 0) {
1137
- const entityId = nextSegments[0];
1156
+ const encodedEntityId = nextSegments[0];
1157
+ const entityId = decodeEntityId(encodedEntityId);
1138
1158
  const fullPath = collectionPath + "/" + entityId;
1159
+ const fullUrlPath = collectionUrlPath + "/" + encodedEntityId;
1139
1160
  result.push({
1140
1161
  type: "entity",
1141
1162
  entityId,
1142
1163
  path: collectionPath,
1143
1164
  fullIdPath,
1144
- fullPath,
1165
+ fullPath: fullUrlPath,
1145
1166
  parentCollection: collection
1146
1167
  });
1147
1168
  if (nextSegments.length > 1) {
@@ -1157,7 +1178,7 @@
1157
1178
  path: collectionPath,
1158
1179
  entityId,
1159
1180
  fullIdPath,
1160
- fullPath: fullPath + "/" + customView.key,
1181
+ fullPath: fullUrlPath + "/" + customView.key,
1161
1182
  view: customView
1162
1183
  });
1163
1184
  } else if (collection.subcollections) {
@@ -1166,6 +1187,7 @@
1166
1187
  collections: collection.subcollections,
1167
1188
  currentFullPath: fullPath,
1168
1189
  currentFullIdPath: fullIdPath,
1190
+ currentFullUrlPath: fullUrlPath,
1169
1191
  contextEntityViews: props.contextEntityViews
1170
1192
  }));
1171
1193
  }
@@ -1570,6 +1592,77 @@
1570
1592
  function canDeleteEntity(collection, authController, path, entity) {
1571
1593
  return resolvePermissions(collection, authController, path, entity)?.delete ?? DEFAULT_PERMISSIONS.delete;
1572
1594
  }
1595
+ function toNumber(value) {
1596
+ return typeof value === "number" && Number.isFinite(value) ? value : void 0;
1597
+ }
1598
+ function getGeoPointCoordinates(value) {
1599
+ if (!value) return void 0;
1600
+ if (value instanceof GeoPoint) {
1601
+ return {
1602
+ latitude: value.latitude,
1603
+ longitude: value.longitude
1604
+ };
1605
+ }
1606
+ if (typeof value !== "object") return void 0;
1607
+ const latitude = toNumber(value.latitude ?? value.lat ?? value._lat);
1608
+ const longitude = toNumber(value.longitude ?? value.lng ?? value._long);
1609
+ if (latitude === void 0 || longitude === void 0) return void 0;
1610
+ return {
1611
+ latitude,
1612
+ longitude
1613
+ };
1614
+ }
1615
+ function normalizeGeoPoint(value) {
1616
+ const coordinates = getGeoPointCoordinates(value);
1617
+ if (!coordinates) return void 0;
1618
+ if (value instanceof GeoPoint) return value;
1619
+ return new GeoPoint(coordinates.latitude, coordinates.longitude);
1620
+ }
1621
+ function formatGeoPoint(value, options) {
1622
+ const coordinates = getGeoPointCoordinates(value);
1623
+ if (!coordinates) return "";
1624
+ const maximumFractionDigits = options?.maximumFractionDigits ?? 6;
1625
+ const formatter = new Intl.NumberFormat("en-US", {
1626
+ maximumFractionDigits,
1627
+ minimumFractionDigits: Math.min(2, maximumFractionDigits),
1628
+ useGrouping: false
1629
+ });
1630
+ return `${formatter.format(coordinates.latitude)}, ${formatter.format(coordinates.longitude)}`;
1631
+ }
1632
+ function parseGeoPoint(input) {
1633
+ const trimmed = input.trim();
1634
+ if (!trimmed) return {
1635
+ point: null
1636
+ };
1637
+ const parts = trimmed.split(",").map((part) => part.trim()).filter((part) => part !== "");
1638
+ if (parts.length !== 2) return {
1639
+ point: null,
1640
+ error: 'Use "lat, lng" format'
1641
+ };
1642
+ const latitude = parseFloat(parts[0]);
1643
+ const longitude = parseFloat(parts[1]);
1644
+ if (!Number.isFinite(latitude) || !Number.isFinite(longitude)) {
1645
+ return {
1646
+ point: null,
1647
+ error: "Latitude and longitude must be numbers"
1648
+ };
1649
+ }
1650
+ if (latitude < -90 || latitude > 90) {
1651
+ return {
1652
+ point: null,
1653
+ error: "Latitude must be between -90 and 90"
1654
+ };
1655
+ }
1656
+ if (longitude < -180 || longitude > 180) {
1657
+ return {
1658
+ point: null,
1659
+ error: "Longitude must be between -180 and 180"
1660
+ };
1661
+ }
1662
+ return {
1663
+ point: new GeoPoint(latitude, longitude)
1664
+ };
1665
+ }
1573
1666
  const iconSynonyms = {
1574
1667
  abc: "alphabet character font letter symbol text type",
1575
1668
  access_alarm: "clock time",
@@ -4518,7 +4611,7 @@
4518
4611
  }
4519
4612
  setDataLoading(false);
4520
4613
  setDataLoadingError(void 0);
4521
- setData(entities.map(_temp$C));
4614
+ setData(entities.map(_temp$D));
4522
4615
  setNoMoreToLoad(!itemCount || entities.length < itemCount);
4523
4616
  };
4524
4617
  const onError = (error) => {
@@ -4601,7 +4694,7 @@
4601
4694
  }
4602
4695
  function _temp2$f() {
4603
4696
  }
4604
- function _temp$C(e_0) {
4697
+ function _temp$D(e_0) {
4605
4698
  return {
4606
4699
  ...e_0
4607
4700
  };
@@ -4666,7 +4759,7 @@
4666
4759
  setEntity(CACHE[`${path}/${entityId}`]);
4667
4760
  setDataLoading(false);
4668
4761
  setDataLoadingError(void 0);
4669
- return _temp$B;
4762
+ return _temp$C;
4670
4763
  } else {
4671
4764
  if (entityId && path && collection) {
4672
4765
  if (dataSource.listenEntity) {
@@ -4734,7 +4827,7 @@
4734
4827
  }
4735
4828
  function _temp2$e() {
4736
4829
  }
4737
- function _temp$B() {
4830
+ function _temp$C() {
4738
4831
  }
4739
4832
  async function saveEntityWithCallbacks({
4740
4833
  collection,
@@ -5378,7 +5471,7 @@
5378
5471
  }
5379
5472
  let t9;
5380
5473
  if ($[19] !== url) {
5381
- t9 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Open image in new tab", side: "bottom", children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { className: "invisible group-hover:visible", variant: "filled", component: "a", href: url, rel: "noopener noreferrer", target: "_blank", size: "smallest", onClick: _temp$A, children: t8 }) });
5474
+ t9 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Open image in new tab", side: "bottom", children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { className: "invisible group-hover:visible", variant: "filled", component: "a", href: url, rel: "noopener noreferrer", target: "_blank", size: "smallest", onClick: _temp$B, children: t8 }) });
5382
5475
  $[19] = url;
5383
5476
  $[20] = t9;
5384
5477
  } else {
@@ -5412,7 +5505,7 @@
5412
5505
  }
5413
5506
  return t11;
5414
5507
  }
5415
- function _temp$A(e_0) {
5508
+ function _temp$B(e_0) {
5416
5509
  return e_0.stopPropagation();
5417
5510
  }
5418
5511
  const FIRECMS_NS$1 = "firecms_core";
@@ -5479,7 +5572,7 @@
5479
5572
  }
5480
5573
  let t3;
5481
5574
  if ($[2] !== url) {
5482
- t3 = /* @__PURE__ */ jsxRuntime.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: [
5575
+ t3 = /* @__PURE__ */ jsxRuntime.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: [
5483
5576
  t2,
5484
5577
  url
5485
5578
  ] });
@@ -5609,7 +5702,7 @@
5609
5702
  function _temp2$d(e_0) {
5610
5703
  return e_0.stopPropagation();
5611
5704
  }
5612
- function _temp$z(e) {
5705
+ function _temp$A(e) {
5613
5706
  e.preventDefault();
5614
5707
  }
5615
5708
  function VideoPreview(t0) {
@@ -5743,7 +5836,7 @@
5743
5836
  if (Array.isArray(arrayProperty.of)) {
5744
5837
  let t1;
5745
5838
  if ($[6] !== arrayProperty.of) {
5746
- t1 = arrayProperty.of.map(_temp$y);
5839
+ t1 = arrayProperty.of.map(_temp$z);
5747
5840
  $[6] = arrayProperty.of;
5748
5841
  $[7] = t1;
5749
5842
  } else {
@@ -5881,7 +5974,7 @@
5881
5974
  }
5882
5975
  return content || null;
5883
5976
  }
5884
- function _temp$y(p, i) {
5977
+ function _temp$z(p, i) {
5885
5978
  return renderGenericArrayCell(p, i);
5886
5979
  }
5887
5980
  function renderMap(property, size) {
@@ -6325,104 +6418,77 @@
6325
6418
  actions
6326
6419
  ] });
6327
6420
  }
6328
- const EntityPreviewContainer = React__namespace.forwardRef((t0, ref) => {
6329
- const $ = reactCompilerRuntime.c(26);
6330
- let children;
6331
- let className;
6332
- let hover;
6333
- let onClick;
6334
- let props;
6335
- let style;
6336
- let t1;
6337
- let t2;
6338
- if ($[0] !== t0) {
6339
- ({
6340
- children,
6341
- hover,
6342
- onClick,
6343
- size: t1,
6344
- style,
6345
- className,
6346
- fullwidth: t2,
6347
- ...props
6348
- } = t0);
6349
- $[0] = t0;
6350
- $[1] = children;
6351
- $[2] = className;
6352
- $[3] = hover;
6353
- $[4] = onClick;
6354
- $[5] = props;
6355
- $[6] = style;
6356
- $[7] = t1;
6357
- $[8] = t2;
6358
- } else {
6359
- children = $[1];
6360
- className = $[2];
6361
- hover = $[3];
6362
- onClick = $[4];
6363
- props = $[5];
6364
- style = $[6];
6365
- t1 = $[7];
6366
- t2 = $[8];
6367
- }
6421
+ function EntityPreviewContainer(t0) {
6422
+ const $ = reactCompilerRuntime.c(15);
6423
+ const {
6424
+ children,
6425
+ hover,
6426
+ onClick,
6427
+ size: t1,
6428
+ style,
6429
+ className,
6430
+ fullwidth: t2,
6431
+ ref
6432
+ } = t0;
6368
6433
  const size = t1 === void 0 ? "medium" : t1;
6369
6434
  const fullwidth = t2 === void 0 ? true : t2;
6370
- let t3;
6371
- if ($[9] !== style) {
6372
- t3 = {
6373
- ...style,
6374
- tabindex: 0
6375
- };
6376
- $[9] = style;
6377
- $[10] = t3;
6435
+ const t3 = fullwidth ? "w-full" : "";
6436
+ 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" : "";
6437
+ const t5 = size === "small" ? "p-1" : "px-2 py-1";
6438
+ const t6 = onClick ? "cursor-pointer" : "";
6439
+ let t7;
6440
+ if ($[0] !== className || $[1] !== t3 || $[2] !== t4 || $[3] !== t5 || $[4] !== t6) {
6441
+ t7 = ui.cls("bg-white dark:bg-surface-900", "min-h-[44px]", t3, "items-center", t4, t5, "flex border rounded-lg", t6, ui.defaultBorderMixin, className);
6442
+ $[0] = className;
6443
+ $[1] = t3;
6444
+ $[2] = t4;
6445
+ $[3] = t5;
6446
+ $[4] = t6;
6447
+ $[5] = t7;
6378
6448
  } else {
6379
- t3 = $[10];
6449
+ t7 = $[5];
6380
6450
  }
6381
- const t4 = fullwidth ? "w-full" : "";
6382
- 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" : "";
6383
- const t6 = size === "small" ? "p-1" : "px-2 py-1";
6384
- const t7 = onClick ? "cursor-pointer" : "";
6451
+ const divClassName = t7;
6385
6452
  let t8;
6386
- if ($[11] !== className || $[12] !== t4 || $[13] !== t5 || $[14] !== t6 || $[15] !== t7) {
6387
- t8 = ui.cls("bg-white dark:bg-surface-900", "min-h-[44px]", t4, "items-center", t5, t6, "flex border rounded-lg", t7, ui.defaultBorderMixin, className);
6388
- $[11] = className;
6389
- $[12] = t4;
6390
- $[13] = t5;
6391
- $[14] = t6;
6392
- $[15] = t7;
6393
- $[16] = t8;
6453
+ if ($[6] !== onClick) {
6454
+ t8 = onClick ? (event) => {
6455
+ event.preventDefault();
6456
+ onClick(event);
6457
+ } : void 0;
6458
+ $[6] = onClick;
6459
+ $[7] = t8;
6394
6460
  } else {
6395
- t8 = $[16];
6461
+ t8 = $[7];
6396
6462
  }
6463
+ const handleClick = t8;
6397
6464
  let t9;
6398
- if ($[17] !== onClick) {
6399
- t9 = (event) => {
6400
- if (onClick) {
6401
- event.preventDefault();
6402
- onClick(event);
6403
- }
6465
+ if ($[8] !== divClassName || $[9] !== handleClick || $[10] !== style) {
6466
+ t9 = {
6467
+ ref,
6468
+ tabIndex: 0,
6469
+ style,
6470
+ className: divClassName,
6471
+ onClick: handleClick
6404
6472
  };
6405
- $[17] = onClick;
6406
- $[18] = t9;
6473
+ $[8] = divClassName;
6474
+ $[9] = handleClick;
6475
+ $[10] = style;
6476
+ $[11] = t9;
6407
6477
  } else {
6408
- t9 = $[18];
6478
+ t9 = $[11];
6409
6479
  }
6480
+ const divProps = t9;
6410
6481
  let t10;
6411
- if ($[19] !== children || $[20] !== props || $[21] !== ref || $[22] !== t3 || $[23] !== t8 || $[24] !== t9) {
6412
- t10 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref, style: t3, className: t8, onClick: t9, ...props, children });
6413
- $[19] = children;
6414
- $[20] = props;
6415
- $[21] = ref;
6416
- $[22] = t3;
6417
- $[23] = t8;
6418
- $[24] = t9;
6419
- $[25] = t10;
6482
+ if ($[12] !== children || $[13] !== divProps) {
6483
+ t10 = /* @__PURE__ */ jsxRuntime.jsx("div", { ...divProps, children });
6484
+ $[12] = children;
6485
+ $[13] = divProps;
6486
+ $[14] = t10;
6420
6487
  } else {
6421
- t10 = $[25];
6488
+ t10 = $[14];
6422
6489
  }
6423
6490
  return t10;
6424
- });
6425
- EntityPreviewContainer.displayName = "EntityPreviewContainer";
6491
+ }
6426
6492
  const ReferencePreview = function ReferencePreview2(props) {
6427
6493
  const $ = reactCompilerRuntime.c(10);
6428
6494
  const reference = props.reference;
@@ -7056,7 +7122,7 @@
7056
7122
  timeZoneName: "short"
7057
7123
  });
7058
7124
  const parts = tzFormatter.formatToParts(date);
7059
- t32 = parts.find(_temp$x)?.value ?? "";
7125
+ t32 = parts.find(_temp$y)?.value ?? "";
7060
7126
  $[6] = date;
7061
7127
  $[7] = timezone;
7062
7128
  $[8] = t32;
@@ -7127,7 +7193,7 @@
7127
7193
  }
7128
7194
  return t3;
7129
7195
  }
7130
- function _temp$x(p) {
7196
+ function _temp$y(p) {
7131
7197
  return p.type === "timeZoneName";
7132
7198
  }
7133
7199
  function MapPropertyPreview(t0) {
@@ -7222,7 +7288,7 @@
7222
7288
  }
7223
7289
  let t1;
7224
7290
  if ($[1] !== value) {
7225
- t1 = Object.entries(value).map(_temp$w);
7291
+ t1 = Object.entries(value).map(_temp$x);
7226
7292
  $[1] = value;
7227
7293
  $[2] = t1;
7228
7294
  } else {
@@ -7238,7 +7304,7 @@
7238
7304
  }
7239
7305
  return t2;
7240
7306
  }
7241
- function _temp$w(t0) {
7307
+ function _temp$x(t0) {
7242
7308
  const [key, childValue] = t0;
7243
7309
  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");
7244
7310
  const isScalar = childValue && (typeof childValue !== "object" || isTimestampObj);
@@ -7250,6 +7316,59 @@
7250
7316
  typeof childValue === "object" && !isTimestampObj && /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cls(ui.defaultBorderMixin, "border-l pl-4"), children: /* @__PURE__ */ jsxRuntime.jsx(KeyValuePreview, { value: childValue }) })
7251
7317
  ] }, `map_preview_table_${key}}`);
7252
7318
  }
7319
+ function GeopointPropertyPreview(t0) {
7320
+ const $ = reactCompilerRuntime.c(10);
7321
+ const {
7322
+ value,
7323
+ size
7324
+ } = t0;
7325
+ let t1;
7326
+ let t2;
7327
+ let t3;
7328
+ if ($[0] !== size || $[1] !== value) {
7329
+ t3 = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
7330
+ bb0: {
7331
+ const coordinates = getGeoPointCoordinates(value);
7332
+ if (!coordinates) {
7333
+ const t42 = size === "small" ? "text-sm text-text-secondary dark:text-text-secondary-dark" : "text-text-secondary dark:text-text-secondary-dark";
7334
+ let t5;
7335
+ if ($[5] !== t42) {
7336
+ t5 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: t42, children: "—" });
7337
+ $[5] = t42;
7338
+ $[6] = t5;
7339
+ } else {
7340
+ t5 = $[6];
7341
+ }
7342
+ t3 = t5;
7343
+ break bb0;
7344
+ }
7345
+ t1 = size === "small" ? "text-sm font-mono" : "font-mono";
7346
+ t2 = formatGeoPoint(coordinates);
7347
+ }
7348
+ $[0] = size;
7349
+ $[1] = value;
7350
+ $[2] = t1;
7351
+ $[3] = t2;
7352
+ $[4] = t3;
7353
+ } else {
7354
+ t1 = $[2];
7355
+ t2 = $[3];
7356
+ t3 = $[4];
7357
+ }
7358
+ if (t3 !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel")) {
7359
+ return t3;
7360
+ }
7361
+ let t4;
7362
+ if ($[7] !== t1 || $[8] !== t2) {
7363
+ t4 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: t1, children: t2 });
7364
+ $[7] = t1;
7365
+ $[8] = t2;
7366
+ $[9] = t4;
7367
+ } else {
7368
+ t4 = $[9];
7369
+ }
7370
+ return t4;
7371
+ }
7253
7372
  function BooleanPreview(t0) {
7254
7373
  const $ = reactCompilerRuntime.c(9);
7255
7374
  const {
@@ -7677,47 +7796,56 @@
7677
7796
  content = buildWrongValueType(propertyKey, property.dataType, value);
7678
7797
  }
7679
7798
  } else {
7680
- if (property.dataType === "reference") {
7681
- if (typeof property.path === "string") {
7682
- if (typeof value === "object" && "isEntityReference" in value && value.isEntityReference()) {
7683
- content = /* @__PURE__ */ jsxRuntime.jsx(ReferencePreview, { disabled: !property.path, previewProperties: property.previewProperties, includeId: property.includeId, includeEntityLink: property.includeEntityLink, size: props.size, reference: value });
7684
- } else {
7685
- content = buildWrongValueType(propertyKey, property.dataType, value);
7686
- }
7799
+ if (property.dataType === "geopoint") {
7800
+ const coordinates = getGeoPointCoordinates(value);
7801
+ if (coordinates) {
7802
+ content = /* @__PURE__ */ jsxRuntime.jsx(GeopointPropertyPreview, { ...props, property, value });
7687
7803
  } else {
7688
- let t02;
7689
- if ($[27] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
7690
- t02 = /* @__PURE__ */ jsxRuntime.jsx(EmptyValue, {});
7691
- $[27] = t02;
7692
- } else {
7693
- t02 = $[27];
7694
- }
7695
- content = t02;
7804
+ content = buildWrongValueType(propertyKey, property.dataType, value);
7696
7805
  }
7697
7806
  } else {
7698
- if (property.dataType === "boolean") {
7699
- if (typeof value === "boolean") {
7700
- content = /* @__PURE__ */ jsxRuntime.jsx(BooleanPreview, { value, size, property });
7807
+ if (property.dataType === "reference") {
7808
+ if (typeof property.path === "string") {
7809
+ if (typeof value === "object" && "isEntityReference" in value && value.isEntityReference()) {
7810
+ content = /* @__PURE__ */ jsxRuntime.jsx(ReferencePreview, { disabled: !property.path, previewProperties: property.previewProperties, includeId: property.includeId, includeEntityLink: property.includeEntityLink, size: props.size, reference: value });
7811
+ } else {
7812
+ content = buildWrongValueType(propertyKey, property.dataType, value);
7813
+ }
7701
7814
  } else {
7702
- content = buildWrongValueType(propertyKey, property.dataType, value);
7815
+ let t02;
7816
+ if ($[27] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
7817
+ t02 = /* @__PURE__ */ jsxRuntime.jsx(EmptyValue, {});
7818
+ $[27] = t02;
7819
+ } else {
7820
+ t02 = $[27];
7821
+ }
7822
+ content = t02;
7703
7823
  }
7704
7824
  } else {
7705
- if (property.dataType === "number") {
7706
- if (typeof value === "number") {
7707
- content = /* @__PURE__ */ jsxRuntime.jsx(NumberPropertyPreview, { ...props, value, property });
7825
+ if (property.dataType === "boolean") {
7826
+ if (typeof value === "boolean") {
7827
+ content = /* @__PURE__ */ jsxRuntime.jsx(BooleanPreview, { value, size, property });
7708
7828
  } else {
7709
7829
  content = buildWrongValueType(propertyKey, property.dataType, value);
7710
7830
  }
7711
7831
  } else {
7712
- let t02;
7713
- if ($[28] !== value) {
7714
- t02 = JSON.stringify(value, jsonStringifyReplacer);
7715
- $[28] = value;
7716
- $[29] = t02;
7832
+ if (property.dataType === "number") {
7833
+ if (typeof value === "number") {
7834
+ content = /* @__PURE__ */ jsxRuntime.jsx(NumberPropertyPreview, { ...props, value, property });
7835
+ } else {
7836
+ content = buildWrongValueType(propertyKey, property.dataType, value);
7837
+ }
7717
7838
  } else {
7718
- t02 = $[29];
7839
+ let t02;
7840
+ if ($[28] !== value) {
7841
+ t02 = JSON.stringify(value, jsonStringifyReplacer);
7842
+ $[28] = value;
7843
+ $[29] = t02;
7844
+ } else {
7845
+ t02 = $[29];
7846
+ }
7847
+ content = t02;
7719
7848
  }
7720
- content = t02;
7721
7849
  }
7722
7850
  }
7723
7851
  }
@@ -8499,7 +8627,7 @@
8499
8627
  console.trace("onChange");
8500
8628
  if (valueType === "number") {
8501
8629
  if (multiple) {
8502
- const newValue = updatedValue.map(_temp$v);
8630
+ const newValue = updatedValue.map(_temp$w);
8503
8631
  updateValue(newValue);
8504
8632
  } else {
8505
8633
  updateValue(parseFloat(updatedValue));
@@ -8570,7 +8698,7 @@
8570
8698
  function _temp2$c(v_0) {
8571
8699
  return v_0.toString();
8572
8700
  }
8573
- function _temp$v(v) {
8701
+ function _temp$w(v) {
8574
8702
  return parseFloat(v);
8575
8703
  }
8576
8704
  function VirtualTableNumberInput(props) {
@@ -8766,7 +8894,7 @@
8766
8894
  const renderValue = t3;
8767
8895
  let t4;
8768
8896
  if ($[7] !== disabled || $[8] !== internalValue || $[9] !== multiple || $[10] !== onChange || $[11] !== renderValue || $[12] !== users || $[13] !== validValue) {
8769
- t4 = multiple ? /* @__PURE__ */ jsxRuntime.jsx(ui.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__ */ jsxRuntime.jsx(ui.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) });
8897
+ t4 = multiple ? /* @__PURE__ */ jsxRuntime.jsx(ui.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__ */ jsxRuntime.jsx(ui.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) });
8770
8898
  $[7] = disabled;
8771
8899
  $[8] = internalValue;
8772
8900
  $[9] = multiple;
@@ -8783,7 +8911,7 @@
8783
8911
  function _temp2$b(user_1) {
8784
8912
  return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: user_1.uid, children: /* @__PURE__ */ jsxRuntime.jsx(UserDisplay, { user: user_1 }) }, user_1.uid);
8785
8913
  }
8786
- function _temp$u(user_0) {
8914
+ function _temp$v(user_0) {
8787
8915
  return /* @__PURE__ */ jsxRuntime.jsx(ui.MultiSelectItem, { value: user_0.uid, children: /* @__PURE__ */ jsxRuntime.jsx(UserDisplay, { user: user_0 }) }, user_0.uid);
8788
8916
  }
8789
8917
  class ErrorBoundary extends React.Component {
@@ -9028,7 +9156,7 @@
9028
9156
  newValue = [...internalValue];
9029
9157
  newValue = removeDuplicates(newValue);
9030
9158
  setInternalValue(newValue);
9031
- const fieldValue = newValue.filter(_temp$t).map(_temp2$a);
9159
+ const fieldValue = newValue.filter(_temp$u).map(_temp2$a);
9032
9160
  if (multipleFilesSupported) {
9033
9161
  onChange(fieldValue);
9034
9162
  } else {
@@ -9149,7 +9277,7 @@
9149
9277
  function _temp2$a(e_0) {
9150
9278
  return e_0.storagePathOrDownloadUrl;
9151
9279
  }
9152
- function _temp$t(e) {
9280
+ function _temp$u(e) {
9153
9281
  return !!e.storagePathOrDownloadUrl;
9154
9282
  }
9155
9283
  function getInternalInitialValue(multipleFilesSupported, value, metadata, size) {
@@ -9439,7 +9567,7 @@
9439
9567
  const snackbarContext = useSnackbarController();
9440
9568
  let t1;
9441
9569
  if ($[0] !== storage.acceptedFiles) {
9442
- t1 = storage.acceptedFiles ? storage.acceptedFiles.map(_temp$s).reduce(_temp2$9, {}) : void 0;
9570
+ t1 = storage.acceptedFiles ? storage.acceptedFiles.map(_temp$t).reduce(_temp2$9, {}) : void 0;
9443
9571
  $[0] = storage.acceptedFiles;
9444
9572
  $[1] = t1;
9445
9573
  } else {
@@ -9668,7 +9796,7 @@
9668
9796
  ...b
9669
9797
  };
9670
9798
  }
9671
- function _temp$s(e) {
9799
+ function _temp$t(e) {
9672
9800
  return {
9673
9801
  [e]: []
9674
9802
  };
@@ -9778,7 +9906,7 @@
9778
9906
  let t1;
9779
9907
  if ($[2] !== updateValue) {
9780
9908
  t1 = (entities) => {
9781
- updateValue(entities.map(_temp$r));
9909
+ updateValue(entities.filter(Boolean).map(_temp$s));
9782
9910
  };
9783
9911
  $[2] = updateValue;
9784
9912
  $[3] = t1;
@@ -9950,7 +10078,7 @@
9950
10078
  }
9951
10079
  return t10;
9952
10080
  }, equal);
9953
- function _temp$r(e) {
10081
+ function _temp$s(e) {
9954
10082
  return getReferenceFrom(e);
9955
10083
  }
9956
10084
  function _temp2$8(ref) {
@@ -11618,7 +11746,7 @@
11618
11746
  throw Error(`Couldn't find the corresponding collection for the path: ${ofProperty.path}`);
11619
11747
  }
11620
11748
  const onMultipleEntitiesSelected = React.useCallback((entities) => {
11621
- setValue(entities.map((e) => getReferenceFrom(e)));
11749
+ setValue(entities.filter(Boolean).map((e) => getReferenceFrom(e)));
11622
11750
  }, [setValue]);
11623
11751
  const referenceDialogController = useReferenceDialog({
11624
11752
  multiselect: true,
@@ -11728,7 +11856,7 @@
11728
11856
  }
11729
11857
  let t5;
11730
11858
  if ($[15] !== placeholder) {
11731
- t5 = placeholder && /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: _temp$q, className: "flex flex-col items-center justify-center w-full h-full", children: /* @__PURE__ */ jsxRuntime.jsx(ui.DescriptionIcon, { className: "text-surface-700 dark:text-surface-300" }) });
11859
+ t5 = placeholder && /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: _temp$r, className: "flex flex-col items-center justify-center w-full h-full", children: /* @__PURE__ */ jsxRuntime.jsx(ui.DescriptionIcon, { className: "text-surface-700 dark:text-surface-300" }) });
11732
11860
  $[15] = placeholder;
11733
11861
  $[16] = t5;
11734
11862
  } else {
@@ -11751,7 +11879,7 @@
11751
11879
  }
11752
11880
  return t6;
11753
11881
  }
11754
- function _temp$q(e) {
11882
+ function _temp$r(e) {
11755
11883
  return e.stopPropagation();
11756
11884
  }
11757
11885
  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";
@@ -11979,7 +12107,7 @@
11979
12107
  t4 = $[7];
11980
12108
  }
11981
12109
  const style = t4;
11982
- const getImageSizeNumber = _temp$p;
12110
+ const getImageSizeNumber = _temp$q;
11983
12111
  let child;
11984
12112
  if (entry.storagePathOrDownloadUrl) {
11985
12113
  const t52 = `storage_preview_${entry.storagePathOrDownloadUrl}`;
@@ -12054,7 +12182,7 @@
12054
12182
  }
12055
12183
  return t6;
12056
12184
  }
12057
- function _temp$p(previewSize) {
12185
+ function _temp$q(previewSize) {
12058
12186
  switch (previewSize) {
12059
12187
  case "small": {
12060
12188
  return 40;
@@ -12954,6 +13082,260 @@
12954
13082
  }
12955
13083
  return t13;
12956
13084
  }
13085
+ function GeopointFieldBinding(t0) {
13086
+ const $ = reactCompilerRuntime.c(66);
13087
+ const {
13088
+ propertyKey,
13089
+ value,
13090
+ setValue,
13091
+ error,
13092
+ showError,
13093
+ disabled,
13094
+ autoFocus,
13095
+ property,
13096
+ includeDescription,
13097
+ size: t1
13098
+ } = t0;
13099
+ const size = t1 === void 0 ? "large" : t1;
13100
+ const coordinates = getGeoPointCoordinates(value);
13101
+ const canClear = Boolean(property.clearable);
13102
+ const [latitude, setLatitude] = React.useState(coordinates ? coordinates.latitude.toString() : "");
13103
+ const [longitude, setLongitude] = React.useState(coordinates ? coordinates.longitude.toString() : "");
13104
+ const [localError, setLocalError] = React.useState();
13105
+ const skipSyncRef = React.useRef(false);
13106
+ let t2;
13107
+ if ($[0] !== property || $[1] !== setValue || $[2] !== value) {
13108
+ t2 = {
13109
+ property,
13110
+ value,
13111
+ setValue
13112
+ };
13113
+ $[0] = property;
13114
+ $[1] = setValue;
13115
+ $[2] = value;
13116
+ $[3] = t2;
13117
+ } else {
13118
+ t2 = $[3];
13119
+ }
13120
+ useClearRestoreValue(t2);
13121
+ let t3;
13122
+ if ($[4] !== setLatitude || $[5] !== value) {
13123
+ t3 = () => {
13124
+ if (skipSyncRef.current) {
13125
+ skipSyncRef.current = false;
13126
+ return;
13127
+ }
13128
+ const nextCoordinates = getGeoPointCoordinates(value);
13129
+ setLatitude(nextCoordinates ? nextCoordinates.latitude.toString() : "");
13130
+ setLongitude(nextCoordinates ? nextCoordinates.longitude.toString() : "");
13131
+ };
13132
+ $[4] = setLatitude;
13133
+ $[5] = value;
13134
+ $[6] = t3;
13135
+ } else {
13136
+ t3 = $[6];
13137
+ }
13138
+ let t4;
13139
+ if ($[7] !== value) {
13140
+ t4 = [value];
13141
+ $[7] = value;
13142
+ $[8] = t4;
13143
+ } else {
13144
+ t4 = $[8];
13145
+ }
13146
+ React.useEffect(t3, t4);
13147
+ let t5;
13148
+ if ($[9] !== setLatitude || $[10] !== setValue) {
13149
+ t5 = (nextLatitude, nextLongitude) => {
13150
+ skipSyncRef.current = true;
13151
+ setLatitude(nextLatitude);
13152
+ setLongitude(nextLongitude);
13153
+ const trimmedLatitude = nextLatitude.trim();
13154
+ const trimmedLongitude = nextLongitude.trim();
13155
+ if (!trimmedLatitude && !trimmedLongitude) {
13156
+ setLocalError(void 0);
13157
+ setValue(null);
13158
+ return;
13159
+ }
13160
+ const parsed = parseGeoPoint(`${trimmedLatitude}, ${trimmedLongitude}`);
13161
+ if (parsed.error) {
13162
+ setLocalError(parsed.error);
13163
+ setValue(null);
13164
+ return;
13165
+ }
13166
+ setLocalError(void 0);
13167
+ setValue(parsed.point);
13168
+ };
13169
+ $[9] = setLatitude;
13170
+ $[10] = setValue;
13171
+ $[11] = t5;
13172
+ } else {
13173
+ t5 = $[11];
13174
+ }
13175
+ const updateGeoPoint = t5;
13176
+ let t6;
13177
+ if ($[12] !== updateGeoPoint) {
13178
+ t6 = (event) => {
13179
+ if (event) {
13180
+ event.preventDefault();
13181
+ event.stopPropagation();
13182
+ }
13183
+ updateGeoPoint("", "");
13184
+ };
13185
+ $[12] = updateGeoPoint;
13186
+ $[13] = t6;
13187
+ } else {
13188
+ t6 = $[13];
13189
+ }
13190
+ const handleClear = t6;
13191
+ const resolvedError = localError ?? error;
13192
+ const shouldShowError = Boolean(resolvedError) || Boolean(showError && error);
13193
+ let t7;
13194
+ if ($[14] !== property) {
13195
+ t7 = getIconForProperty(property, "small");
13196
+ $[14] = property;
13197
+ $[15] = t7;
13198
+ } else {
13199
+ t7 = $[15];
13200
+ }
13201
+ const t8 = property.validation?.required;
13202
+ const t9 = shouldShowError ? "text-red-500 dark:text-red-500" : "text-text-secondary dark:text-text-secondary-dark";
13203
+ let t10;
13204
+ if ($[16] !== property.name || $[17] !== t7 || $[18] !== t8 || $[19] !== t9) {
13205
+ t10 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1", children: /* @__PURE__ */ jsxRuntime.jsx(LabelWithIcon, { icon: t7, required: t8, title: property.name, className: t9 }) });
13206
+ $[16] = property.name;
13207
+ $[17] = t7;
13208
+ $[18] = t8;
13209
+ $[19] = t9;
13210
+ $[20] = t10;
13211
+ } else {
13212
+ t10 = $[20];
13213
+ }
13214
+ let t11;
13215
+ if ($[21] !== longitude || $[22] !== updateGeoPoint) {
13216
+ t11 = (event_0) => updateGeoPoint(event_0.target.value, longitude);
13217
+ $[21] = longitude;
13218
+ $[22] = updateGeoPoint;
13219
+ $[23] = t11;
13220
+ } else {
13221
+ t11 = $[23];
13222
+ }
13223
+ let t12;
13224
+ if ($[24] !== canClear || $[25] !== handleClear) {
13225
+ t12 = canClear ? /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { onClick: handleClear, children: /* @__PURE__ */ jsxRuntime.jsx(ui.CloseIcon, {}) }) : void 0;
13226
+ $[24] = canClear;
13227
+ $[25] = handleClear;
13228
+ $[26] = t12;
13229
+ } else {
13230
+ t12 = $[26];
13231
+ }
13232
+ const t13 = shouldShowError && Boolean(resolvedError);
13233
+ let t14;
13234
+ if ($[27] !== autoFocus || $[28] !== disabled || $[29] !== latitude || $[30] !== size || $[31] !== t11 || $[32] !== t12 || $[33] !== t13) {
13235
+ t14 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { size, value: latitude, onChange: t11, autoFocus, label: "Latitude", type: "number", disabled, endAdornment: t12, error: t13 });
13236
+ $[27] = autoFocus;
13237
+ $[28] = disabled;
13238
+ $[29] = latitude;
13239
+ $[30] = size;
13240
+ $[31] = t11;
13241
+ $[32] = t12;
13242
+ $[33] = t13;
13243
+ $[34] = t14;
13244
+ } else {
13245
+ t14 = $[34];
13246
+ }
13247
+ let t15;
13248
+ if ($[35] !== latitude || $[36] !== updateGeoPoint) {
13249
+ t15 = (event_1) => updateGeoPoint(latitude, event_1.target.value);
13250
+ $[35] = latitude;
13251
+ $[36] = updateGeoPoint;
13252
+ $[37] = t15;
13253
+ } else {
13254
+ t15 = $[37];
13255
+ }
13256
+ const t16 = shouldShowError && Boolean(resolvedError);
13257
+ let t17;
13258
+ if ($[38] !== disabled || $[39] !== longitude || $[40] !== size || $[41] !== t15 || $[42] !== t16) {
13259
+ t17 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { size, value: longitude, onChange: t15, label: "Longitude", type: "number", disabled, error: t16 });
13260
+ $[38] = disabled;
13261
+ $[39] = longitude;
13262
+ $[40] = size;
13263
+ $[41] = t15;
13264
+ $[42] = t16;
13265
+ $[43] = t17;
13266
+ } else {
13267
+ t17 = $[43];
13268
+ }
13269
+ let t18;
13270
+ if ($[44] !== t14 || $[45] !== t17) {
13271
+ t18 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-2 md:grid-cols-2", children: [
13272
+ t14,
13273
+ t17
13274
+ ] });
13275
+ $[44] = t14;
13276
+ $[45] = t17;
13277
+ $[46] = t18;
13278
+ } else {
13279
+ t18 = $[46];
13280
+ }
13281
+ let t19;
13282
+ if ($[47] !== resolvedError || $[48] !== value) {
13283
+ t19 = value && !resolvedError && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-text-secondary dark:text-text-secondary-dark font-mono", children: formatGeoPoint(value) });
13284
+ $[47] = resolvedError;
13285
+ $[48] = value;
13286
+ $[49] = t19;
13287
+ } else {
13288
+ t19 = $[49];
13289
+ }
13290
+ let t20;
13291
+ if ($[50] !== t10 || $[51] !== t18 || $[52] !== t19) {
13292
+ t20 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
13293
+ t10,
13294
+ t18,
13295
+ t19
13296
+ ] });
13297
+ $[50] = t10;
13298
+ $[51] = t18;
13299
+ $[52] = t19;
13300
+ $[53] = t20;
13301
+ } else {
13302
+ t20 = $[53];
13303
+ }
13304
+ let t21;
13305
+ if ($[54] !== propertyKey || $[55] !== t20) {
13306
+ t21 = /* @__PURE__ */ jsxRuntime.jsx(PropertyIdCopyTooltip, { propertyKey, children: t20 });
13307
+ $[54] = propertyKey;
13308
+ $[55] = t20;
13309
+ $[56] = t21;
13310
+ } else {
13311
+ t21 = $[56];
13312
+ }
13313
+ let t22;
13314
+ if ($[57] !== disabled || $[58] !== includeDescription || $[59] !== property || $[60] !== resolvedError || $[61] !== shouldShowError) {
13315
+ t22 = /* @__PURE__ */ jsxRuntime.jsx(FieldHelperText, { includeDescription, showError: shouldShowError, error: resolvedError, disabled, property });
13316
+ $[57] = disabled;
13317
+ $[58] = includeDescription;
13318
+ $[59] = property;
13319
+ $[60] = resolvedError;
13320
+ $[61] = shouldShowError;
13321
+ $[62] = t22;
13322
+ } else {
13323
+ t22 = $[62];
13324
+ }
13325
+ let t23;
13326
+ if ($[63] !== t21 || $[64] !== t22) {
13327
+ t23 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
13328
+ t21,
13329
+ t22
13330
+ ] });
13331
+ $[63] = t21;
13332
+ $[64] = t22;
13333
+ $[65] = t23;
13334
+ } else {
13335
+ t23 = $[65];
13336
+ }
13337
+ return t23;
13338
+ }
12957
13339
  function ReadOnlyFieldBinding(t0) {
12958
13340
  const $ = reactCompilerRuntime.c(18);
12959
13341
  const {
@@ -13573,7 +13955,7 @@
13573
13955
  } else {
13574
13956
  t42 = $[20];
13575
13957
  }
13576
- t3 = Object.entries(mapProperties).filter(_temp$o).map(t42);
13958
+ t3 = Object.entries(mapProperties).filter(_temp$p).map(t42);
13577
13959
  $[6] = autoFocus;
13578
13960
  $[7] = context;
13579
13961
  $[8] = disabled;
@@ -13652,7 +14034,7 @@
13652
14034
  }
13653
14035
  return t10;
13654
14036
  }
13655
- function _temp$o(t0) {
14037
+ function _temp$p(t0) {
13656
14038
  const [, property_0] = t0;
13657
14039
  return !isHidden(property_0);
13658
14040
  }
@@ -15026,7 +15408,7 @@
15026
15408
  const property = t4;
15027
15409
  let t5;
15028
15410
  if ($[9] !== properties) {
15029
- t5 = Object.entries(properties).map(_temp$n);
15411
+ t5 = Object.entries(properties).map(_temp$o);
15030
15412
  $[9] = properties;
15031
15413
  $[10] = t5;
15032
15414
  } else {
@@ -15119,7 +15501,7 @@
15119
15501
  }
15120
15502
  return t11;
15121
15503
  }
15122
- function _temp$n(t0) {
15504
+ function _temp$o(t0) {
15123
15505
  const [key, property_0] = t0;
15124
15506
  return {
15125
15507
  id: key,
@@ -17240,24 +17622,27 @@
17240
17622
  function propertiesToColumns({
17241
17623
  properties,
17242
17624
  sortable: sortable2,
17243
- forceFilter,
17244
- AdditionalHeaderWidget
17625
+ forcedFilters,
17626
+ AdditionalHeaderWidget,
17627
+ allowedFilters
17245
17628
  }) {
17246
- const disabledFilter = Boolean(forceFilter);
17247
17629
  return Object.entries(properties).flatMap(([key, property]) => getColumnKeysForProperty(property, key)).map(({
17248
17630
  key,
17249
17631
  disabled
17250
17632
  }) => {
17251
17633
  const property = getResolvedPropertyInPath(properties, key);
17252
17634
  if (!property) throw Error("Internal error: no property found in path " + key);
17253
- const filterable = filterableProperty(property);
17635
+ const filterable = property.dataType === "array" ? isDataTypeFilterable(property.of?.dataType, true) : isDataTypeFilterable(property.dataType);
17636
+ const isFilterForced = forcedFilters?.includes(key) ?? false;
17637
+ const isFilterAllowed = allowedFilters ? allowedFilters.includes(key) : filterable;
17638
+ const filterEnabled = filterable && isFilterAllowed && !isFilterForced;
17254
17639
  return {
17255
17640
  key,
17256
17641
  align: getTableCellAlignment(property),
17257
17642
  icon: getIconForProperty(property, "small"),
17258
17643
  title: property.name ?? key,
17259
17644
  sortable: sortable2,
17260
- filter: !disabledFilter && filterable,
17645
+ filter: filterEnabled,
17261
17646
  width: getTablePropertyColumnWidth(property),
17262
17647
  resizable: true,
17263
17648
  custom: {
@@ -17270,16 +17655,6 @@
17270
17655
  };
17271
17656
  });
17272
17657
  }
17273
- function filterableProperty(property, partOfArray = false) {
17274
- if (partOfArray) {
17275
- return ["string", "number", "date", "reference"].includes(property.dataType);
17276
- }
17277
- if (property.dataType === "array") {
17278
- if (property.of) return filterableProperty(property.of, true);
17279
- else return false;
17280
- }
17281
- return ["string", "number", "boolean", "date", "reference", "array"].includes(property.dataType);
17282
- }
17283
17658
  const VirtualTableHeader = React.memo(function VirtualTableHeader2(t0) {
17284
17659
  const $ = reactCompilerRuntime.c(61);
17285
17660
  const {
@@ -18111,7 +18486,7 @@
18111
18486
  const currentSort = sortBy ? sortBy[1] : void 0;
18112
18487
  const [columns, setColumns] = React.useState(columnsProp);
18113
18488
  const tableRef = React.useRef(null);
18114
- const endReachCallbackThreshold = React.useRef(0);
18489
+ const lastEndReachedDataLength = React.useRef(void 0);
18115
18490
  const debouncedScroll = useDebounceCallback(onScrollProp, 200);
18116
18491
  const [draggingColumnId, setDraggingColumnId] = React.useState(null);
18117
18492
  const sensors = core.useSensors(core.useSensor(core.PointerSensor, {
@@ -18190,7 +18565,7 @@
18190
18565
  filterRef.current = filterInput;
18191
18566
  }, [filterInput]);
18192
18567
  const scrollToTop = React.useCallback(() => {
18193
- endReachCallbackThreshold.current = 0;
18568
+ lastEndReachedDataLength.current = void 0;
18194
18569
  if (tableRef.current) {
18195
18570
  tableRef.current.scrollTo(tableRef.current?.scrollLeft, 0);
18196
18571
  }
@@ -18216,28 +18591,37 @@
18216
18591
  scrollToTop();
18217
18592
  }, [checkFilterCombination, currentSort, onFilterUpdate, onResetPagination, onSortByUpdate, scrollToTop, sortByProperty]);
18218
18593
  const maxScroll = Math.max((data?.length ?? 0) * rowHeight - bounds.height, 0);
18219
- const onEndReachedInternal = React.useCallback((scrollOffset) => {
18220
- if (onEndReached && (data?.length ?? 0) > 0 && scrollOffset > endReachCallbackThreshold.current + endOffset) {
18221
- endReachCallbackThreshold.current = scrollOffset;
18594
+ const onEndReachedInternal = React.useCallback(() => {
18595
+ const dataLength = data?.length ?? 0;
18596
+ if (onEndReached && dataLength > 0 && lastEndReachedDataLength.current !== dataLength) {
18597
+ lastEndReachedDataLength.current = dataLength;
18222
18598
  onEndReached();
18223
18599
  }
18224
18600
  }, [data?.length, onEndReached]);
18601
+ React.useEffect(() => {
18602
+ if (!onEndReached || loading || !data?.length || !bounds.height || !tableRef.current) {
18603
+ return;
18604
+ }
18605
+ if (tableRef.current.scrollHeight <= tableRef.current.clientHeight) {
18606
+ onEndReachedInternal();
18607
+ }
18608
+ }, [bounds.height, data?.length, loading, onEndReached, onEndReachedInternal]);
18225
18609
  const onScroll = React.useCallback(({
18226
18610
  scrollDirection,
18227
- scrollOffset: scrollOffset_0,
18611
+ scrollOffset,
18228
18612
  scrollUpdateWasRequested
18229
18613
  }) => {
18230
18614
  if (onScrollProp) {
18231
18615
  debouncedScroll({
18232
18616
  scrollDirection,
18233
- scrollOffset: scrollOffset_0,
18617
+ scrollOffset,
18234
18618
  scrollUpdateWasRequested
18235
18619
  });
18236
18620
  }
18237
- if (!scrollUpdateWasRequested && scrollOffset_0 >= maxScroll - endOffset) onEndReachedInternal(scrollOffset_0);
18238
- }, [maxScroll, onEndReachedInternal]);
18621
+ if (!scrollUpdateWasRequested && scrollOffset >= maxScroll - endOffset) onEndReachedInternal();
18622
+ }, [endOffset, maxScroll, onEndReachedInternal]);
18239
18623
  const onFilterUpdateInternal = React.useCallback((column_1, filterForProperty) => {
18240
- endReachCallbackThreshold.current = 0;
18624
+ lastEndReachedDataLength.current = void 0;
18241
18625
  const filter_0 = filterRef.current;
18242
18626
  let newFilterValue = filter_0 ? {
18243
18627
  ...filter_0
@@ -18439,7 +18823,7 @@
18439
18823
  let t1;
18440
18824
  if ($[0] !== text) {
18441
18825
  const urlRegex = /https?:\/\/[^\s]+/g;
18442
- t1 = text.replace(urlRegex, _temp$m);
18826
+ t1 = text.replace(urlRegex, _temp$n);
18443
18827
  $[0] = text;
18444
18828
  $[1] = t1;
18445
18829
  } else {
@@ -18458,7 +18842,7 @@
18458
18842
  }
18459
18843
  return t2;
18460
18844
  };
18461
- function _temp$m(url) {
18845
+ function _temp$n(url) {
18462
18846
  return `<a href="${url}" class="underline" target="_blank">Link</a><br/>`;
18463
18847
  }
18464
18848
  const operationLabels$2 = {
@@ -18532,10 +18916,10 @@
18532
18916
  return path ? navigationController.getCollection(path) : void 0;
18533
18917
  }, [path]);
18534
18918
  const onSingleEntitySelected = (entity) => {
18535
- updateFilter(operation, getReferenceFrom(entity));
18919
+ if (entity) updateFilter(operation, getReferenceFrom(entity));
18536
18920
  };
18537
18921
  const onMultipleEntitiesSelected = (entities) => {
18538
- updateFilter(operation, entities.map((e) => getReferenceFrom(e)));
18922
+ updateFilter(operation, entities.filter(Boolean).map((e) => getReferenceFrom(e)));
18539
18923
  };
18540
18924
  const multiple = multipleSelectOperations$2.includes(operation);
18541
18925
  const referenceDialogController = useReferenceDialog({
@@ -18710,7 +19094,7 @@
18710
19094
  }
18711
19095
  let t8;
18712
19096
  if ($[20] !== operation || $[21] !== t6 || $[22] !== t7) {
18713
- t8 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[100px]", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { value: operation, size: "medium", fullWidth: true, position: "item-aligned", onValueChange: t6, renderValue: _temp$l, children: t7 }) });
19097
+ t8 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[100px]", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { value: operation, size: "medium", fullWidth: true, position: "item-aligned", onValueChange: t6, renderValue: _temp$m, children: t7 }) });
18714
19098
  $[20] = operation;
18715
19099
  $[21] = t6;
18716
19100
  $[22] = t7;
@@ -18815,7 +19199,7 @@
18815
19199
  function _temp2$6(op_2) {
18816
19200
  return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: op_2, children: operationLabels$1[op_2] }, op_2);
18817
19201
  }
18818
- function _temp$l(op_1) {
19202
+ function _temp$m(op_1) {
18819
19203
  return operationLabels$1[op_1];
18820
19204
  }
18821
19205
  function BooleanFilterField(t0) {
@@ -18986,7 +19370,7 @@
18986
19370
  }
18987
19371
  let t8;
18988
19372
  if ($[17] !== operation || $[18] !== t6 || $[19] !== t7) {
18989
- t8 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[100px]", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { value: operation, size: "medium", fullWidth: true, onValueChange: t6, renderValue: _temp$k, children: t7 }) });
19373
+ t8 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[100px]", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { value: operation, size: "medium", fullWidth: true, onValueChange: t6, renderValue: _temp$l, children: t7 }) });
18990
19374
  $[17] = operation;
18991
19375
  $[18] = t6;
18992
19376
  $[19] = t7;
@@ -19036,7 +19420,7 @@
19036
19420
  function _temp2$5(op_2) {
19037
19421
  return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: op_2, children: operationLabels[op_2] }, op_2);
19038
19422
  }
19039
- function _temp$k(op_1) {
19423
+ function _temp$l(op_1) {
19040
19424
  return operationLabels[op_1];
19041
19425
  }
19042
19426
  const SelectableTable = function SelectableTable2({
@@ -19286,7 +19670,8 @@
19286
19670
  const columnsResult = propertiesToColumns({
19287
19671
  properties,
19288
19672
  sortable: sortable2,
19289
- forceFilter,
19673
+ forcedFilters: tableController.forcedFilters,
19674
+ allowedFilters: tableController.allowedFilters,
19290
19675
  AdditionalHeaderWidget
19291
19676
  });
19292
19677
  const propertyColumnKeys = new Set(columnsResult.map((col) => col.key));
@@ -19433,7 +19818,26 @@
19433
19818
  filterValues: initialFilterUrl,
19434
19819
  sortBy: initialSortUrl
19435
19820
  } = parseFilterAndSort(location.search);
19436
- const [filterValues_0, setFilterValues] = React.useState(forceFilter ?? (updateUrl ? initialFilterUrl : void 0) ?? initialFilter ?? void 0);
19821
+ const availableFilterKeys = collection.allowedFilters ?? Object.keys(collection.properties);
19822
+ const forcedFilterKeys = collection.forceFilter ? Object.keys(collection.forceFilter) : [];
19823
+ const allowedFilterKeys = React.useMemo(() => {
19824
+ const availableKeys = availableFilterKeys.filter((key) => {
19825
+ const property = collection.properties[key];
19826
+ if (!property) return false;
19827
+ if (typeof property === "function") return false;
19828
+ const dataType = property.dataType;
19829
+ const filterable = dataType === "array" ? isDataTypeFilterable(property.of?.dataType, true) : isDataTypeFilterable(dataType);
19830
+ return filterable;
19831
+ });
19832
+ const forcedKeys = forcedFilterKeys.filter((key_0) => !availableKeys.includes(key_0));
19833
+ return [...availableKeys, ...forcedKeys];
19834
+ }, [collection.properties, availableFilterKeys, forcedFilterKeys]);
19835
+ const removeUnallowedFilters = React.useCallback((filters) => {
19836
+ if (!filters) return;
19837
+ return Object.fromEntries(Object.entries(filters).filter(([key_1]) => allowedFilterKeys.includes(key_1)));
19838
+ }, [allowedFilterKeys]);
19839
+ const initFilters = forceFilter ?? (updateUrl ? initialFilterUrl : void 0) ?? initialFilter ?? void 0;
19840
+ const [filterValues_0, setFilterValues] = React.useState(removeUnallowedFilters(initFilters));
19437
19841
  const [sortBy_0, setSortBy] = React.useState((updateUrl ? initialSortUrl : void 0) ?? initialSortInternal);
19438
19842
  useUpdateUrl(filterValues_0, sortBy_0, searchString, updateUrl);
19439
19843
  const collectionScroll = scrollRestoration?.getCollectionScroll(fullPath, filterValues_0);
@@ -19456,7 +19860,7 @@
19456
19860
  const [dataLoading, setDataLoading] = React.useState(false);
19457
19861
  const [dataLoadingError, setDataLoadingError] = React.useState();
19458
19862
  const [noMoreToLoad, setNoMoreToLoad] = React.useState(false);
19459
- const clearFilter = React.useCallback(() => setFilterValues(forceFilter ?? void 0), [forceFilter]);
19863
+ const clearFilter = React.useCallback(() => setFilterValues(removeUnallowedFilters(forceFilter)), [forceFilter, removeUnallowedFilters]);
19460
19864
  const updateFilterValues = React.useCallback((updatedFilter) => {
19461
19865
  if (forceFilter) {
19462
19866
  console.warn("Filter is not compatible with the force filter. Ignoring filter");
@@ -19465,9 +19869,9 @@
19465
19869
  if (updatedFilter && Object.keys(updatedFilter).length === 0) {
19466
19870
  setFilterValues(void 0);
19467
19871
  } else {
19468
- setFilterValues(updatedFilter);
19872
+ setFilterValues(removeUnallowedFilters(updatedFilter));
19469
19873
  }
19470
- }, [forceFilter]);
19874
+ }, [forceFilter, removeUnallowedFilters]);
19471
19875
  React.useEffect(() => {
19472
19876
  setDataLoading(true);
19473
19877
  const onEntitiesUpdate = async (entities) => {
@@ -19542,6 +19946,8 @@
19542
19946
  dataLoadingError,
19543
19947
  filterValues: filterValues_0,
19544
19948
  setFilterValues: updateFilterValues,
19949
+ allowedFilters: allowedFilterKeys,
19950
+ forcedFilters: forcedFilterKeys,
19545
19951
  sortBy: sortBy_0,
19546
19952
  setSortBy,
19547
19953
  searchString,
@@ -19622,7 +20028,7 @@
19622
20028
  }
19623
20029
  if (encodedValue !== void 0) {
19624
20030
  entries[encodeURIComponent(`${key}_op`)] = encodeURIComponent(op);
19625
- entries[encodeURIComponent(`${key}_value`)] = encodedValue ? encodeURIComponent(encodedValue.toString()) : "null";
20031
+ entries[encodeURIComponent(`${key}_value`)] = encodedValue !== null && encodedValue !== void 0 ? encodeURIComponent(encodedValue.toString()) : "null";
19626
20032
  }
19627
20033
  }
19628
20034
  });
@@ -19662,7 +20068,12 @@
19662
20068
  return date.toISOString() === dateString;
19663
20069
  }
19664
20070
  function encodeRef(val) {
19665
- return `ref::${val.path}/${val.id}`;
20071
+ return `ref::${val.path}/${encodeEntityId(val.id)}`;
20072
+ }
20073
+ function decodeRef(encoded) {
20074
+ const separatorIndex = encoded.lastIndexOf("/");
20075
+ if (separatorIndex < 0) return new EntityReference(encoded, "");
20076
+ return new EntityReference(decodeEntityId(encoded.substring(separatorIndex + 1)), encoded.substring(0, separatorIndex));
19666
20077
  }
19667
20078
  function decodeString(val) {
19668
20079
  let parsedFilterVal = val;
@@ -19676,8 +20087,7 @@
19676
20087
  try {
19677
20088
  parsedFilterVal = JSON.parse(parsedFilterVal, (key, value) => {
19678
20089
  if (typeof value === "string" && value.startsWith("ref::")) {
19679
- const [path, id] = value.substring(5).split("/");
19680
- return new EntityReference(id, path);
20090
+ return decodeRef(value.substring(5));
19681
20091
  }
19682
20092
  return value;
19683
20093
  });
@@ -19685,8 +20095,7 @@
19685
20095
  }
19686
20096
  }
19687
20097
  if (typeof parsedFilterVal === "string" && parsedFilterVal.startsWith("ref::")) {
19688
- const [path, id] = parsedFilterVal.substring(5).split("/");
19689
- return new EntityReference(id, path);
20098
+ return decodeRef(parsedFilterVal.substring(5));
19690
20099
  }
19691
20100
  return parsedFilterVal;
19692
20101
  }
@@ -19765,7 +20174,7 @@
19765
20174
  const searchBlocked = t12;
19766
20175
  let t2;
19767
20176
  if ($[15] !== customizationController.plugins || $[16] !== dataSource?.initTextSearch) {
19768
- t2 = Boolean(dataSource?.initTextSearch) || customizationController.plugins?.find(_temp$j);
20177
+ t2 = Boolean(dataSource?.initTextSearch) || customizationController.plugins?.find(_temp$k);
19769
20178
  $[15] = customizationController.plugins;
19770
20179
  $[16] = dataSource?.initTextSearch;
19771
20180
  $[17] = t2;
@@ -19857,7 +20266,7 @@
19857
20266
  }
19858
20267
  return t1;
19859
20268
  }
19860
- function _temp$j(p_0) {
20269
+ function _temp$k(p_0) {
19861
20270
  return Boolean(p_0.collectionView?.onTextSearchClick);
19862
20271
  }
19863
20272
  function DeleteEntityDialog({
@@ -20479,7 +20888,7 @@
20479
20888
  T0 = ui.Collapse;
20480
20889
  t4 = favouriteCollections.length > 0;
20481
20890
  t2 = "flex flex-row flex-wrap gap-2 pb-2 min-h-[32px]";
20482
- t3 = favouriteCollections.map(_temp$i);
20891
+ t3 = favouriteCollections.map(_temp$j);
20483
20892
  $[2] = navigationController;
20484
20893
  $[3] = t1;
20485
20894
  $[4] = T0;
@@ -20513,7 +20922,7 @@
20513
20922
  }
20514
20923
  return t6;
20515
20924
  }
20516
- function _temp$i(entry_0) {
20925
+ function _temp$j(entry_0) {
20517
20926
  return /* @__PURE__ */ jsxRuntime.jsx(NavigationChip, { entry: entry_0 }, entry_0.path);
20518
20927
  }
20519
20928
  const scrollsMap = {};
@@ -20750,7 +21159,7 @@
20750
21159
  }
20751
21160
  let t4;
20752
21161
  if ($[4] !== actions) {
20753
- t4 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5", onClick: _temp$h, children: actions });
21162
+ t4 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5", onClick: _temp$i, children: actions });
20754
21163
  $[4] = actions;
20755
21164
  $[5] = t4;
20756
21165
  } else {
@@ -20837,7 +21246,7 @@
20837
21246
  }
20838
21247
  return t12;
20839
21248
  });
20840
- function _temp$h(event) {
21249
+ function _temp$i(event) {
20841
21250
  event.preventDefault();
20842
21251
  event.stopPropagation();
20843
21252
  }
@@ -23193,7 +23602,7 @@
23193
23602
  let t19;
23194
23603
  let t20;
23195
23604
  if ($[19] !== items2) {
23196
- t20 = items2.map(_temp$g);
23605
+ t20 = items2.map(_temp$h);
23197
23606
  $[19] = items2;
23198
23607
  $[20] = t20;
23199
23608
  } else {
@@ -23299,7 +23708,7 @@
23299
23708
  }
23300
23709
  return t29;
23301
23710
  });
23302
- function _temp$g(i) {
23711
+ function _temp$h(i) {
23303
23712
  return i.id;
23304
23713
  }
23305
23714
  function Board(t0) {
@@ -25235,7 +25644,8 @@
25235
25644
  properties,
25236
25645
  filterValues,
25237
25646
  setFilterValues,
25238
- forceFilter
25647
+ forceFilter,
25648
+ allowedFilters
25239
25649
  }) {
25240
25650
  const {
25241
25651
  t
@@ -25247,15 +25657,14 @@
25247
25657
  setLocalFilters(filterValues ?? {});
25248
25658
  }
25249
25659
  }, [open, filterValues]);
25250
- const filterableProperties = React.useMemo(() => {
25251
- return Object.entries(properties).filter(([key, property]) => {
25252
- if (!property) return false;
25253
- if (forceFilter && key in forceFilter) return false;
25254
- const baseProperty = property.dataType === "array" ? property.of : property;
25255
- if (!baseProperty) return false;
25256
- return ["string", "number", "boolean", "date", "reference"].includes(baseProperty.dataType);
25660
+ const editableFilterProperties = React.useMemo(() => {
25661
+ return Object.entries(properties).filter(([key]) => {
25662
+ const isFilterAllowed = !allowedFilters || allowedFilters.includes(key);
25663
+ const isFilterForced = Boolean(forceFilter && Object.keys(forceFilter).includes(key));
25664
+ return isFilterAllowed && !isFilterForced;
25257
25665
  });
25258
- }, [properties, forceFilter]);
25666
+ }, [properties, allowedFilters, forceFilter]);
25667
+ const hasEditableFilterProperties = editableFilterProperties.length > 0;
25259
25668
  const handleFilterChange = React.useCallback((propertyKey, value) => {
25260
25669
  setLocalFilters((prev) => {
25261
25670
  const newFilters = {
@@ -25287,22 +25696,26 @@
25287
25696
  }));
25288
25697
  }, []);
25289
25698
  const isAnyFieldHidden = Object.values(hiddenFields).some((hidden_0) => hidden_0);
25290
- const activeFilterCount = Object.keys(localFilters).length;
25291
- const renderFilterField = React.useCallback((propertyKey_1, property_0) => {
25292
- const isArray = property_0.dataType === "array";
25293
- const baseProperty_0 = isArray ? property_0.of : property_0;
25294
- if (!baseProperty_0) return null;
25699
+ const getActiveFilterCount = () => {
25700
+ const editableLocalFilters = Object.keys(localFilters).filter((key_0) => !forceFilter || !(key_0 in forceFilter));
25701
+ return editableLocalFilters.length;
25702
+ };
25703
+ const activeFilterCount = getActiveFilterCount();
25704
+ const renderFilterField = React.useCallback((propertyKey_1, property) => {
25705
+ const isArray = property.dataType === "array";
25706
+ const baseProperty = isArray ? property.of : property;
25707
+ if (!baseProperty) return null;
25295
25708
  const filterValue = localFilters[propertyKey_1];
25296
25709
  const setValue = (value_0) => handleFilterChange(propertyKey_1, value_0);
25297
- if (baseProperty_0.dataType === "reference") {
25298
- return /* @__PURE__ */ jsxRuntime.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) });
25299
- } else if (baseProperty_0.dataType === "number" || baseProperty_0.dataType === "string") {
25300
- const enumValues = baseProperty_0.enumValues ? enumToObjectEntries(baseProperty_0.enumValues) : void 0;
25301
- return /* @__PURE__ */ jsxRuntime.jsx(StringNumberFilterField, { value: filterValue, setValue, name: propertyKey_1, dataType: baseProperty_0.dataType, isArray, enumValues, title: property_0.name });
25302
- } else if (baseProperty_0.dataType === "boolean") {
25303
- return /* @__PURE__ */ jsxRuntime.jsx(BooleanFilterField, { value: filterValue, setValue, name: propertyKey_1, title: property_0.name });
25304
- } else if (baseProperty_0.dataType === "date") {
25305
- return /* @__PURE__ */ jsxRuntime.jsx(DateTimeFilterField, { value: filterValue, setValue, name: propertyKey_1, mode: baseProperty_0.mode, isArray, title: property_0.name });
25710
+ if (baseProperty.dataType === "reference") {
25711
+ return /* @__PURE__ */ jsxRuntime.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) });
25712
+ } else if (baseProperty.dataType === "number" || baseProperty.dataType === "string") {
25713
+ const enumValues = baseProperty.enumValues ? enumToObjectEntries(baseProperty.enumValues) : void 0;
25714
+ return /* @__PURE__ */ jsxRuntime.jsx(StringNumberFilterField, { value: filterValue, setValue, name: propertyKey_1, dataType: baseProperty.dataType, isArray, enumValues, title: property.name });
25715
+ } else if (baseProperty.dataType === "boolean") {
25716
+ return /* @__PURE__ */ jsxRuntime.jsx(BooleanFilterField, { value: filterValue, setValue, name: propertyKey_1, title: property.name });
25717
+ } else if (baseProperty.dataType === "date") {
25718
+ return /* @__PURE__ */ jsxRuntime.jsx(DateTimeFilterField, { value: filterValue, setValue, name: propertyKey_1, mode: baseProperty.mode, isArray, title: property.name });
25306
25719
  }
25307
25720
  return null;
25308
25721
  }, [localFilters, handleFilterChange, hiddenFields, setHiddenForField]);
@@ -25311,23 +25724,25 @@
25311
25724
  /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "h6", children: t("filters") }),
25312
25725
  activeFilterCount > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 px-2 py-0.5 text-xs rounded-full bg-primary text-white", children: activeFilterCount })
25313
25726
  ] }),
25314
- /* @__PURE__ */ jsxRuntime.jsx(ui.DialogContent, { children: filterableProperties.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { color: "secondary", className: "py-8 text-center", children: t("no_filterable_properties") }) : /* @__PURE__ */ jsxRuntime.jsx("table", { className: "w-full border-collapse", children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: filterableProperties.map(([propertyKey_2, property_1], index) => {
25727
+ /* @__PURE__ */ jsxRuntime.jsx(ui.DialogContent, { children: !hasEditableFilterProperties ? /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { color: "secondary", className: "py-8 text-center", children: t("no_filterable_properties") }) : /* @__PURE__ */ jsxRuntime.jsx("table", { className: "w-full border-collapse", children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: editableFilterProperties.map(([propertyKey_2, property_0], index) => {
25315
25728
  const hasFilter = propertyKey_2 in localFilters;
25316
25729
  return /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: ui.cls(index > 0 && "border-t", ui.defaultBorderMixin), children: [
25317
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3 pr-4 align-middle w-[160px]", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", className: ui.cls("font-medium", hasFilter && "text-primary"), children: property_1.name || propertyKey_2 }) }),
25318
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3", children: renderFilterField(propertyKey_2, property_1) })
25730
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3 pr-4 align-middle w-[160px]", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", className: ui.cls("font-medium", hasFilter && "text-primary"), children: property_0.name || propertyKey_2 }) }),
25731
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3", children: renderFilterField(propertyKey_2, property_0) })
25319
25732
  ] }, propertyKey_2);
25320
25733
  }) }) }) }),
25321
25734
  /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogActions, { children: [
25322
25735
  /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", onClick: handleClearAll, disabled: activeFilterCount === 0, children: t("clear") }),
25323
25736
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow" }),
25324
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", onClick: () => onOpenChange(false), children: t("cancel") }),
25325
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "filled", onClick: handleApply, children: t("apply_filters") })
25737
+ hasEditableFilterProperties && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
25738
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", onClick: () => onOpenChange(false), children: t("cancel") }),
25739
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "filled", onClick: handleApply, children: t("apply_filters") })
25740
+ ] })
25326
25741
  ] })
25327
25742
  ] });
25328
25743
  }
25329
25744
  function EntityCollectionViewStartActions(t0) {
25330
- const $ = reactCompilerRuntime.c(36);
25745
+ const $ = reactCompilerRuntime.c(37);
25331
25746
  const {
25332
25747
  collection,
25333
25748
  relativePath,
@@ -25391,34 +25806,36 @@
25391
25806
  t3 = $[13];
25392
25807
  }
25393
25808
  const actionProps = t3;
25809
+ const hasAnyAllowedFilters = !tableController.allowedFilters || tableController.allowedFilters.length > 0;
25394
25810
  let t4;
25395
- if ($[14] !== activeFilterCount || $[15] !== largeLayout || $[16] !== resolvedProperties || $[17] !== t || $[18] !== tableController.setFilterValues) {
25396
- t4 = resolvedProperties && tableController.setFilterValues && /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: t("filters"), children: /* @__PURE__ */ jsxRuntime.jsx(ui.Badge, { color: "primary", invisible: activeFilterCount === 0, children: largeLayout ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", size: "small", onClick: () => setFiltersDialogOpen(true), startIcon: /* @__PURE__ */ jsxRuntime.jsx(ui.FilterListIcon, { size: "small" }), className: ui.cls(activeFilterCount > 0 && "text-primary"), children: [
25811
+ if ($[14] !== activeFilterCount || $[15] !== hasAnyAllowedFilters || $[16] !== largeLayout || $[17] !== resolvedProperties || $[18] !== t || $[19] !== tableController.setFilterValues) {
25812
+ t4 = resolvedProperties && tableController.setFilterValues && hasAnyAllowedFilters && /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: t("filters"), children: /* @__PURE__ */ jsxRuntime.jsx(ui.Badge, { color: "primary", invisible: activeFilterCount === 0, children: largeLayout ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", size: "small", onClick: () => setFiltersDialogOpen(true), startIcon: /* @__PURE__ */ jsxRuntime.jsx(ui.FilterListIcon, { size: "small" }), className: ui.cls(activeFilterCount > 0 && "text-primary"), children: [
25397
25813
  t("filters"),
25398
25814
  activeFilterCount > 0 ? ` (${activeFilterCount})` : ""
25399
25815
  ] }) : /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", onClick: () => setFiltersDialogOpen(true), className: ui.cls(activeFilterCount > 0 && "text-primary"), children: /* @__PURE__ */ jsxRuntime.jsx(ui.FilterListIcon, { size: "small" }) }) }) }, "filters_tooltip");
25400
25816
  $[14] = activeFilterCount;
25401
- $[15] = largeLayout;
25402
- $[16] = resolvedProperties;
25403
- $[17] = t;
25404
- $[18] = tableController.setFilterValues;
25405
- $[19] = t4;
25817
+ $[15] = hasAnyAllowedFilters;
25818
+ $[16] = largeLayout;
25819
+ $[17] = resolvedProperties;
25820
+ $[18] = t;
25821
+ $[19] = tableController.setFilterValues;
25822
+ $[20] = t4;
25406
25823
  } else {
25407
- t4 = $[19];
25824
+ t4 = $[20];
25408
25825
  }
25409
25826
  const filtersButton = t4;
25410
25827
  const t5 = !collection.forceFilter;
25411
25828
  let t6;
25412
- if ($[20] !== t5 || $[21] !== tableController) {
25829
+ if ($[21] !== t5 || $[22] !== tableController) {
25413
25830
  t6 = /* @__PURE__ */ jsxRuntime.jsx(ClearFilterSortButton, { tableController, enabled: t5 }, "clear_filter");
25414
- $[20] = t5;
25415
- $[21] = tableController;
25416
- $[22] = t6;
25831
+ $[21] = t5;
25832
+ $[22] = tableController;
25833
+ $[23] = t6;
25417
25834
  } else {
25418
- t6 = $[22];
25835
+ t6 = $[23];
25419
25836
  }
25420
25837
  let actions;
25421
- if ($[23] !== actionProps || $[24] !== filtersButton || $[25] !== plugins || $[26] !== t6) {
25838
+ if ($[24] !== actionProps || $[25] !== filtersButton || $[26] !== plugins || $[27] !== t6) {
25422
25839
  actions = [filtersButton, t6];
25423
25840
  if (plugins) {
25424
25841
  plugins.forEach((plugin, i) => {
@@ -25427,39 +25844,42 @@
25427
25844
  }
25428
25845
  });
25429
25846
  }
25430
- $[23] = actionProps;
25431
- $[24] = filtersButton;
25432
- $[25] = plugins;
25433
- $[26] = t6;
25434
- $[27] = actions;
25847
+ $[24] = actionProps;
25848
+ $[25] = filtersButton;
25849
+ $[26] = plugins;
25850
+ $[27] = t6;
25851
+ $[28] = actions;
25435
25852
  } else {
25436
- actions = $[27];
25853
+ actions = $[28];
25437
25854
  }
25438
25855
  let t7;
25439
- if ($[28] !== collection.forceFilter || $[29] !== filtersDialogOpen || $[30] !== resolvedProperties || $[31] !== tableController) {
25440
- t7 = resolvedProperties && tableController.setFilterValues && /* @__PURE__ */ jsxRuntime.jsx(FiltersDialog, { open: filtersDialogOpen, onOpenChange: setFiltersDialogOpen, properties: resolvedProperties, filterValues: tableController.filterValues, setFilterValues: (filterValues_0) => tableController.setFilterValues?.(filterValues_0 ?? {}), forceFilter: collection.forceFilter });
25441
- $[28] = collection.forceFilter;
25442
- $[29] = filtersDialogOpen;
25443
- $[30] = resolvedProperties;
25444
- $[31] = tableController;
25445
- $[32] = t7;
25856
+ if ($[29] !== collection.forceFilter || $[30] !== filtersDialogOpen || $[31] !== resolvedProperties || $[32] !== tableController) {
25857
+ t7 = resolvedProperties && tableController.setFilterValues && /* @__PURE__ */ jsxRuntime.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) });
25858
+ $[29] = collection.forceFilter;
25859
+ $[30] = filtersDialogOpen;
25860
+ $[31] = resolvedProperties;
25861
+ $[32] = tableController;
25862
+ $[33] = t7;
25446
25863
  } else {
25447
- t7 = $[32];
25864
+ t7 = $[33];
25448
25865
  }
25449
25866
  let t8;
25450
- if ($[33] !== actions || $[34] !== t7) {
25867
+ if ($[34] !== actions || $[35] !== t7) {
25451
25868
  t8 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
25452
25869
  actions,
25453
25870
  t7
25454
25871
  ] });
25455
- $[33] = actions;
25456
- $[34] = t7;
25457
- $[35] = t8;
25872
+ $[34] = actions;
25873
+ $[35] = t7;
25874
+ $[36] = t8;
25458
25875
  } else {
25459
- t8 = $[35];
25876
+ t8 = $[36];
25460
25877
  }
25461
25878
  return t8;
25462
25879
  }
25880
+ function _temp$g(key_0) {
25881
+ return key_0.toString();
25882
+ }
25463
25883
  const collectionScrollCache = /* @__PURE__ */ new Map();
25464
25884
  function useScrollRestoration() {
25465
25885
  const updateCollectionScroll = ({
@@ -27157,7 +27577,7 @@
27157
27577
  const onMultipleEntitiesSelected = React.useCallback((entities) => {
27158
27578
  if (disabled) return;
27159
27579
  if (onMultipleReferenceSelected) {
27160
- const references = entities ? entities.map((e) => getReferenceFrom(e)) : null;
27580
+ const references = entities ? entities.filter(Boolean).map((e) => getReferenceFrom(e)) : null;
27161
27581
  onMultipleReferenceSelected({
27162
27582
  references,
27163
27583
  entities
@@ -27866,7 +28286,7 @@
27866
28286
  const restOfThePath = removeInitialAndTrailingSlashes(removeInitialAndTrailingSlashes(path).replace(subpathCombination, ""));
27867
28287
  const nextSegments = restOfThePath.length > 0 ? restOfThePath.split("/") : [];
27868
28288
  if (nextSegments.length > 0) {
27869
- const entityId = nextSegments[0];
28289
+ const entityId = decodeEntityId(nextSegments[0]);
27870
28290
  const fullPath = collectionPath + "/" + entityId;
27871
28291
  result.push(new EntityReference(entityId, collectionPath));
27872
28292
  if (nextSegments.length > 1) {
@@ -29612,18 +30032,15 @@
29612
30032
  const actionsAtTheBottom = !largeLayout || layout === "side_panel" || selectedEntityView?.includeActions === "bottom";
29613
30033
  const mainViewVisible = selectedTab === MAIN_TAB_VALUE || Boolean(selectedSecondaryForm);
29614
30034
  const authController = useAuthController();
29615
- const customViewsView = customViews && resolvedEntityViews.filter((e) => !e.includeActions).map((customView) => {
29616
- if (!customView) return null;
29617
- const Builder = customView.Builder;
29618
- if (!Builder) {
29619
- console.error("INTERNAL: customView.Builder is not defined");
29620
- return null;
29621
- }
29622
- if (!entityId) {
29623
- return null;
29624
- }
30035
+ const mountedTabsRef = React.useRef(/* @__PURE__ */ new Set());
30036
+ if (selectedTab) {
30037
+ mountedTabsRef.current.add(selectedTab);
30038
+ }
30039
+ const readOnlyFormContext = React.useMemo(() => {
30040
+ if (formContext) return void 0;
30041
+ if (!entityId) return void 0;
29625
30042
  const formexStub = createFormexStub(usedEntity?.values ?? {});
29626
- const usedFormContext = formContext ?? {
30043
+ return {
29627
30044
  entityId,
29628
30045
  disabled: false,
29629
30046
  openEntityMode: layout,
@@ -29649,18 +30066,34 @@
29649
30066
  savingError: void 0,
29650
30067
  formex: formexStub
29651
30068
  };
30069
+ }, [formContext, entityId, layout, status, usedEntity, collection, path, customizationController.propertyConfigs, authController]);
30070
+ const customViewsView = customViews && resolvedEntityViews.filter((e) => !e.includeActions).map((customView) => {
30071
+ if (!customView) return null;
30072
+ const Builder = customView.Builder;
30073
+ if (!Builder) {
30074
+ console.error("INTERNAL: customView.Builder is not defined");
30075
+ return null;
30076
+ }
30077
+ if (!entityId) {
30078
+ return null;
30079
+ }
30080
+ const isActive = selectedTab === customView.key;
30081
+ if (!isActive && !mountedTabsRef.current.has(customView.key)) {
30082
+ return null;
30083
+ }
30084
+ const usedFormContext = formContext ?? readOnlyFormContext;
29652
30085
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cls(ui.defaultBorderMixin, "relative flex-1 w-full h-full overflow-auto", {
29653
- "hidden": selectedTab !== customView.key
30086
+ "hidden": !isActive
29654
30087
  }), role: "tabpanel", children: /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { children: usedFormContext && /* @__PURE__ */ jsxRuntime.jsx(Builder, { collection, parentCollectionIds, entity: usedEntity, modifiedValues: usedFormContext?.formex?.values ?? usedEntity?.values, formContext: usedFormContext }) }) }, `custom_view_${customView.key}`);
29655
30088
  }).filter(Boolean);
29656
30089
  const globalLoading = dataLoading && !usedEntity;
29657
- const jsonView = /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cls("relative flex-1 h-full overflow-auto w-full", {
30090
+ const jsonView = selectedTab === JSON_TAB_VALUE || mountedTabsRef.current.has(JSON_TAB_VALUE) ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cls("relative flex-1 h-full overflow-auto w-full", {
29658
30091
  "hidden": selectedTab !== JSON_TAB_VALUE
29659
- }), role: "tabpanel", children: /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(EntityJsonPreview, { values: formContext?.values ?? entity?.values ?? {} }) }) }, "json_view");
30092
+ }), role: "tabpanel", children: /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(EntityJsonPreview, { values: formContext?.values ?? entity?.values ?? {} }) }) }, "json_view") : null;
29660
30093
  const subCollectionsViews = subcollections && subcollections.map((subcollection) => {
29661
30094
  const subcollectionId = subcollection.id ?? subcollection.path;
29662
30095
  const newFullPath = usedEntity ? `${path}/${usedEntity?.id}/${removeInitialAndTrailingSlashes(subcollection.path)}` : void 0;
29663
- const newFullIdPath = fullIdPath ? `${fullIdPath}/${usedEntity?.id}/${removeInitialAndTrailingSlashes(subcollectionId)}` : void 0;
30096
+ const newFullIdPath = fullIdPath && usedEntity ? `${fullIdPath}/${encodeEntityId(usedEntity.id)}/${removeInitialAndTrailingSlashes(subcollectionId)}` : void 0;
29664
30097
  if (selectedTab !== subcollectionId) return null;
29665
30098
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1 h-full overflow-auto w-full", role: "tabpanel", children: [
29666
30099
  globalLoading && /* @__PURE__ */ jsxRuntime.jsx(CircularProgressCenter, {}),
@@ -29704,8 +30137,8 @@
29704
30137
  const customViewTabsStart = resolvedEntityViews.filter((view) => view.position === "start" && !groupedViews.includes(view.key)).map((view_0) => /* @__PURE__ */ jsxRuntime.jsx(ui.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}`));
29705
30138
  const customViewTabsEnd = resolvedEntityViews.filter((view_1) => (!view_1.position || view_1.position === "end") && !groupedViews.includes(view_1.key)).map((view_2) => /* @__PURE__ */ jsxRuntime.jsx(ui.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}`));
29706
30139
  const viewGroupMenus = collection.viewGroups?.map((group) => {
29707
- const isActive = group.views.includes(selectedTab);
29708
- return /* @__PURE__ */ jsxRuntime.jsx(ui.Menu, { trigger: /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: ui.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: [
30140
+ const isActive_0 = group.views.includes(selectedTab);
30141
+ return /* @__PURE__ */ jsxRuntime.jsx(ui.Menu, { trigger: /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: ui.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: [
29709
30142
  group.name,
29710
30143
  /* @__PURE__ */ jsxRuntime.jsx(ui.ExpandMoreIcon, { className: "ml-1 -mr-1", size: "small" })
29711
30144
  ] }), children: group.views.map((viewId) => {
@@ -29949,7 +30382,7 @@
29949
30382
  }
29950
30383
  const propsToSidePanel = (props, buildUrlCollectionPath, resolveIdsFrom, smallLayout, customizationController, authController, locationSearch) => {
29951
30384
  const collectionPath = removeInitialAndTrailingSlashes(props.path);
29952
- const urlPath = props.entityId ? buildUrlCollectionPath(`${collectionPath}/${props.entityId}${props.selectedTab ? "/" + props.selectedTab : ""}${locationSearch}#${SIDE_URL_HASH}`) : buildUrlCollectionPath(`${collectionPath}${locationSearch}#${NEW_URL_HASH}`);
30385
+ const urlPath = props.entityId ? buildUrlCollectionPath(`${collectionPath}/${encodeEntityId(props.entityId)}${props.selectedTab ? "/" + props.selectedTab : ""}${locationSearch}#${SIDE_URL_HASH}`) : buildUrlCollectionPath(`${collectionPath}${locationSearch}#${NEW_URL_HASH}`);
29953
30386
  const resolvedPanelProps = {
29954
30387
  ...props,
29955
30388
  formProps: props.formProps
@@ -30663,7 +31096,7 @@
30663
31096
  return t1;
30664
31097
  }
30665
31098
  function DrawerNavigationItem(t0) {
30666
- const $ = reactCompilerRuntime.c(24);
31099
+ const $ = reactCompilerRuntime.c(22);
30667
31100
  const {
30668
31101
  name,
30669
31102
  icon,
@@ -30675,7 +31108,7 @@
30675
31108
  } = t0;
30676
31109
  let t1;
30677
31110
  if ($[0] !== icon) {
30678
- t1 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-text-secondary dark:text-text-secondary-dark", children: icon });
31111
+ t1 = /* @__PURE__ */ jsxRuntime.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 });
30679
31112
  $[0] = icon;
30680
31113
  $[1] = t1;
30681
31114
  } else {
@@ -30700,7 +31133,7 @@
30700
31133
  const {
30701
31134
  isActive
30702
31135
  } = t52;
30703
- return ui.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" : "");
31136
+ return ui.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" : "");
30704
31137
  };
30705
31138
  $[4] = drawerOpen;
30706
31139
  $[5] = t4;
@@ -30710,61 +31143,53 @@
30710
31143
  const t5 = drawerOpen ? "opacity-100" : "opacity-0 hidden";
30711
31144
  let t6;
30712
31145
  if ($[6] !== t5) {
30713
- t6 = ui.cls("text-text-primary dark:text-surface-200", t5, "ml-4 font-inherit");
31146
+ t6 = ui.cls("text-surface-700 dark:text-surface-300", t5, "font-inherit truncate space-x-2");
30714
31147
  $[6] = t5;
30715
31148
  $[7] = t6;
30716
31149
  } else {
30717
31150
  t6 = $[7];
30718
31151
  }
30719
31152
  let t7;
30720
- if ($[8] !== name) {
30721
- t7 = name.toUpperCase();
31153
+ if ($[8] !== name || $[9] !== t6) {
31154
+ t7 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t6, children: name });
30722
31155
  $[8] = name;
30723
- $[9] = t7;
31156
+ $[9] = t6;
31157
+ $[10] = t7;
30724
31158
  } else {
30725
- t7 = $[9];
31159
+ t7 = $[10];
30726
31160
  }
30727
31161
  let t8;
30728
- if ($[10] !== t6 || $[11] !== t7) {
30729
- t8 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t6, children: t7 });
30730
- $[10] = t6;
30731
- $[11] = t7;
30732
- $[12] = t8;
30733
- } else {
30734
- t8 = $[12];
30735
- }
30736
- let t9;
30737
- if ($[13] !== iconWrap || $[14] !== onClick || $[15] !== t3 || $[16] !== t4 || $[17] !== t8 || $[18] !== url) {
30738
- t9 = /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.NavLink, { onClick, style: t3, className: t4, to: url, children: [
31162
+ if ($[11] !== iconWrap || $[12] !== onClick || $[13] !== t3 || $[14] !== t4 || $[15] !== t7 || $[16] !== url) {
31163
+ t8 = /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.NavLink, { onClick, style: t3, className: t4, to: url, children: [
30739
31164
  iconWrap,
30740
- t8
31165
+ t7
30741
31166
  ] }) });
30742
- $[13] = iconWrap;
30743
- $[14] = onClick;
30744
- $[15] = t3;
30745
- $[16] = t4;
31167
+ $[11] = iconWrap;
31168
+ $[12] = onClick;
31169
+ $[13] = t3;
31170
+ $[14] = t4;
31171
+ $[15] = t7;
31172
+ $[16] = url;
30746
31173
  $[17] = t8;
30747
- $[18] = url;
30748
- $[19] = t9;
30749
31174
  } else {
30750
- t9 = $[19];
31175
+ t8 = $[17];
30751
31176
  }
30752
- const listItem = t9;
30753
- const t10 = drawerOpen || adminMenuOpen ? false : tooltipsOpen;
30754
- let t11;
30755
- if ($[20] !== listItem || $[21] !== name || $[22] !== t10) {
30756
- t11 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { open: t10, side: "right", title: name, children: listItem });
30757
- $[20] = listItem;
30758
- $[21] = name;
30759
- $[22] = t10;
30760
- $[23] = t11;
31177
+ const listItem = t8;
31178
+ const t9 = drawerOpen || adminMenuOpen ? false : tooltipsOpen;
31179
+ let t10;
31180
+ if ($[18] !== listItem || $[19] !== name || $[20] !== t9) {
31181
+ t10 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { open: t9, side: "right", title: name, children: listItem });
31182
+ $[18] = listItem;
31183
+ $[19] = name;
31184
+ $[20] = t9;
31185
+ $[21] = t10;
30761
31186
  } else {
30762
- t11 = $[23];
31187
+ t10 = $[21];
30763
31188
  }
30764
- return t11;
31189
+ return t10;
30765
31190
  }
30766
31191
  function DrawerNavigationGroup(t0) {
30767
- const $ = reactCompilerRuntime.c(29);
31192
+ const $ = reactCompilerRuntime.c(41);
30768
31193
  const {
30769
31194
  group,
30770
31195
  entries,
@@ -30780,86 +31205,137 @@
30780
31205
  t
30781
31206
  } = useTranslation();
30782
31207
  const t1 = `drawer_group_${group}`;
30783
- let t2;
30784
- if ($[0] !== collapsed || $[1] !== drawerOpen || $[2] !== group || $[3] !== headerActions || $[4] !== onToggleCollapsed || $[5] !== t) {
30785
- t2 = drawerOpen ? /* @__PURE__ */ jsxRuntime.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: [
30786
- /* @__PURE__ */ jsxRuntime.jsx(ui.ExpandMoreIcon, { size: "smallest", className: ui.cls("text-surface-500 dark:text-surface-400 transition-transform duration-200 mr-1", collapsed ? "-rotate-90" : "rotate-0") }),
30787
- /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", className: "font-medium flex-grow line-clamp-1", children: (group && group !== "__default__" ? group : t("views_group")).toUpperCase() }),
30788
- headerActions && /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: _temp$a, children: headerActions })
30789
- ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full" });
30790
- $[0] = collapsed;
30791
- $[1] = drawerOpen;
30792
- $[2] = group;
30793
- $[3] = headerActions;
30794
- $[4] = onToggleCollapsed;
30795
- $[5] = t;
30796
- $[6] = t2;
31208
+ const t2 = drawerOpen ? "cursor-pointer hover:bg-surface-100 dark:hover:bg-surface-800/40 rounded-lg" : "opacity-0 invisible pointer-events-none";
31209
+ let t3;
31210
+ if ($[0] !== t2) {
31211
+ t3 = ui.cls("pl-3 pr-2 py-0.5 flex flex-row items-center transition-colors", t2);
31212
+ $[0] = t2;
31213
+ $[1] = t3;
30797
31214
  } else {
30798
- t2 = $[6];
31215
+ t3 = $[1];
30799
31216
  }
30800
- const t3 = collapsed ? "max-h-0 opacity-0" : "max-h-[2000px] opacity-100";
30801
- let t4;
30802
- if ($[7] !== t3) {
30803
- t4 = ui.cls("overflow-hidden transition-all duration-200 ease-in-out", t3);
30804
- $[7] = t3;
30805
- $[8] = t4;
31217
+ const t4 = drawerOpen ? onToggleCollapsed : void 0;
31218
+ const t5 = collapsed ? "-rotate-90" : "rotate-0";
31219
+ let t6;
31220
+ if ($[2] !== t5) {
31221
+ t6 = ui.cls("text-surface-400 dark:text-surface-400 transition-transform duration-200 mr-1", t5);
31222
+ $[2] = t5;
31223
+ $[3] = t6;
30806
31224
  } else {
30807
- t4 = $[8];
31225
+ t6 = $[3];
30808
31226
  }
30809
- let t5;
30810
- if ($[9] !== adminMenuOpen || $[10] !== collapsed || $[11] !== drawerOpen || $[12] !== entries || $[13] !== onItemClick || $[14] !== tooltipsOpen) {
30811
- let t62;
30812
- if ($[16] !== adminMenuOpen || $[17] !== collapsed || $[18] !== drawerOpen || $[19] !== onItemClick || $[20] !== tooltipsOpen) {
30813
- t62 = (entry) => /* @__PURE__ */ jsxRuntime.jsx(DrawerNavigationItem, { icon: /* @__PURE__ */ jsxRuntime.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);
30814
- $[16] = adminMenuOpen;
30815
- $[17] = collapsed;
30816
- $[18] = drawerOpen;
30817
- $[19] = onItemClick;
30818
- $[20] = tooltipsOpen;
30819
- $[21] = t62;
31227
+ let t7;
31228
+ if ($[4] !== t6) {
31229
+ t7 = /* @__PURE__ */ jsxRuntime.jsx(ui.ExpandMoreIcon, { size: "smallest", className: t6 });
31230
+ $[4] = t6;
31231
+ $[5] = t7;
31232
+ } else {
31233
+ t7 = $[5];
31234
+ }
31235
+ let t8;
31236
+ if ($[6] !== group || $[7] !== t) {
31237
+ t8 = group && group !== "__default__" ? group : t("views_group");
31238
+ $[6] = group;
31239
+ $[7] = t;
31240
+ $[8] = t8;
31241
+ } else {
31242
+ t8 = $[8];
31243
+ }
31244
+ let t9;
31245
+ if ($[9] !== t8) {
31246
+ t9 = /* @__PURE__ */ jsxRuntime.jsx(ui.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 });
31247
+ $[9] = t8;
31248
+ $[10] = t9;
31249
+ } else {
31250
+ t9 = $[10];
31251
+ }
31252
+ let t10;
31253
+ if ($[11] !== headerActions) {
31254
+ t10 = headerActions && /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: _temp$a, children: headerActions });
31255
+ $[11] = headerActions;
31256
+ $[12] = t10;
31257
+ } else {
31258
+ t10 = $[12];
31259
+ }
31260
+ let t11;
31261
+ if ($[13] !== t10 || $[14] !== t3 || $[15] !== t4 || $[16] !== t7 || $[17] !== t9) {
31262
+ t11 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t3, onClick: t4, children: [
31263
+ t7,
31264
+ t9,
31265
+ t10
31266
+ ] });
31267
+ $[13] = t10;
31268
+ $[14] = t3;
31269
+ $[15] = t4;
31270
+ $[16] = t7;
31271
+ $[17] = t9;
31272
+ $[18] = t11;
31273
+ } else {
31274
+ t11 = $[18];
31275
+ }
31276
+ const t12 = collapsed ? "max-h-0 opacity-0" : "max-h-[2000px] opacity-100";
31277
+ let t13;
31278
+ if ($[19] !== t12) {
31279
+ t13 = ui.cls("transition-all duration-200 ease-in-out overflow-hidden rounded-lg", t12);
31280
+ $[19] = t12;
31281
+ $[20] = t13;
31282
+ } else {
31283
+ t13 = $[20];
31284
+ }
31285
+ let t14;
31286
+ if ($[21] !== adminMenuOpen || $[22] !== collapsed || $[23] !== drawerOpen || $[24] !== entries || $[25] !== onItemClick || $[26] !== tooltipsOpen) {
31287
+ let t152;
31288
+ if ($[28] !== adminMenuOpen || $[29] !== collapsed || $[30] !== drawerOpen || $[31] !== onItemClick || $[32] !== tooltipsOpen) {
31289
+ t152 = (entry) => /* @__PURE__ */ jsxRuntime.jsx(DrawerNavigationItem, { icon: /* @__PURE__ */ jsxRuntime.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);
31290
+ $[28] = adminMenuOpen;
31291
+ $[29] = collapsed;
31292
+ $[30] = drawerOpen;
31293
+ $[31] = onItemClick;
31294
+ $[32] = tooltipsOpen;
31295
+ $[33] = t152;
30820
31296
  } else {
30821
- t62 = $[21];
30822
- }
30823
- t5 = entries.map(t62);
30824
- $[9] = adminMenuOpen;
30825
- $[10] = collapsed;
30826
- $[11] = drawerOpen;
30827
- $[12] = entries;
30828
- $[13] = onItemClick;
30829
- $[14] = tooltipsOpen;
30830
- $[15] = t5;
31297
+ t152 = $[33];
31298
+ }
31299
+ t14 = entries.map(t152);
31300
+ $[21] = adminMenuOpen;
31301
+ $[22] = collapsed;
31302
+ $[23] = drawerOpen;
31303
+ $[24] = entries;
31304
+ $[25] = onItemClick;
31305
+ $[26] = tooltipsOpen;
31306
+ $[27] = t14;
30831
31307
  } else {
30832
- t5 = $[15];
31308
+ t14 = $[27];
30833
31309
  }
30834
- let t6;
30835
- if ($[22] !== t4 || $[23] !== t5) {
30836
- t6 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t4, children: t5 });
30837
- $[22] = t4;
30838
- $[23] = t5;
30839
- $[24] = t6;
31310
+ let t15;
31311
+ if ($[34] !== t13 || $[35] !== t14) {
31312
+ t15 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t13, children: t14 });
31313
+ $[34] = t13;
31314
+ $[35] = t14;
31315
+ $[36] = t15;
30840
31316
  } else {
30841
- t6 = $[24];
31317
+ t15 = $[36];
30842
31318
  }
30843
- let t7;
30844
- if ($[25] !== t1 || $[26] !== t2 || $[27] !== t6) {
30845
- t7 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-surface-50 dark:bg-surface-800/30 my-4 rounded-lg ml-3 mr-1", children: [
30846
- t2,
30847
- t6
31319
+ let t16;
31320
+ if ($[37] !== t1 || $[38] !== t11 || $[39] !== t15) {
31321
+ t16 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2 mx-2 flex flex-col", children: [
31322
+ t11,
31323
+ t15
30848
31324
  ] }, t1);
30849
- $[25] = t1;
30850
- $[26] = t2;
30851
- $[27] = t6;
30852
- $[28] = t7;
31325
+ $[37] = t1;
31326
+ $[38] = t11;
31327
+ $[39] = t15;
31328
+ $[40] = t16;
30853
31329
  } else {
30854
- t7 = $[28];
31330
+ t16 = $[40];
30855
31331
  }
30856
- return t7;
31332
+ return t16;
30857
31333
  }
30858
31334
  function _temp$a(e) {
30859
31335
  return e.stopPropagation();
30860
31336
  }
30861
31337
  function DefaultDrawer(t0) {
30862
- const $ = reactCompilerRuntime.c(36);
31338
+ const $ = reactCompilerRuntime.c(40);
30863
31339
  const {
30864
31340
  className,
30865
31341
  style
@@ -30871,6 +31347,20 @@
30871
31347
  logo
30872
31348
  } = useApp();
30873
31349
  const [adminMenuOpen, setAdminMenuOpen] = React.useState(false);
31350
+ const scrollRef = React.useRef(null);
31351
+ const [scrolled, setScrolled] = React.useState(false);
31352
+ let t1;
31353
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
31354
+ t1 = () => {
31355
+ if (scrollRef.current) {
31356
+ setScrolled(scrollRef.current.scrollTop > 0);
31357
+ }
31358
+ };
31359
+ $[0] = t1;
31360
+ } else {
31361
+ t1 = $[0];
31362
+ }
31363
+ const handleScroll = t1;
30874
31364
  const analyticsController = useAnalyticsController();
30875
31365
  const navigation = useNavigationController();
30876
31366
  const {
@@ -30887,22 +31377,23 @@
30887
31377
  groups
30888
31378
  } = navigation.topLevelNavigation;
30889
31379
  const adminViews = navigationEntries.filter(_temp$9) ?? [];
30890
- let t1;
30891
- if ($[0] !== groups) {
30892
- t1 = groups.filter(_temp2$3);
30893
- $[0] = groups;
30894
- $[1] = t1;
31380
+ let t2;
31381
+ if ($[1] !== groups) {
31382
+ t2 = groups.filter(_temp2$3);
31383
+ $[1] = groups;
31384
+ $[2] = t2;
30895
31385
  } else {
30896
- t1 = $[1];
31386
+ t2 = $[2];
30897
31387
  }
30898
- const groupsWithoutAdmin = t1;
31388
+ const groupsWithoutAdmin = t2;
30899
31389
  const {
30900
31390
  isGroupCollapsed,
30901
31391
  toggleGroupCollapsed
30902
31392
  } = useCollapsedGroups(groupsWithoutAdmin, "drawer");
30903
- let t2;
30904
- if ($[2] !== analyticsController || $[3] !== closeDrawer || $[4] !== largeLayout) {
30905
- t2 = (view) => {
31393
+ const drawerVisuallyOpen = drawerOpen || drawerHovered;
31394
+ let t3;
31395
+ if ($[3] !== analyticsController || $[4] !== closeDrawer || $[5] !== largeLayout) {
31396
+ t3 = (view) => {
30906
31397
  const eventName = view.type === "collection" ? "drawer_navigate_to_collection" : view.type === "view" ? "drawer_navigate_to_view" : "unmapped_event";
30907
31398
  analyticsController.onAnalyticsEvent?.(eventName, {
30908
31399
  url: view.url
@@ -30911,106 +31402,119 @@
30911
31402
  closeDrawer();
30912
31403
  }
30913
31404
  };
30914
- $[2] = analyticsController;
30915
- $[3] = closeDrawer;
30916
- $[4] = largeLayout;
30917
- $[5] = t2;
31405
+ $[3] = analyticsController;
31406
+ $[4] = closeDrawer;
31407
+ $[5] = largeLayout;
31408
+ $[6] = t3;
30918
31409
  } else {
30919
- t2 = $[5];
31410
+ t3 = $[6];
30920
31411
  }
30921
- const onItemClick = t2;
30922
- let t3;
30923
- if ($[6] !== className) {
30924
- t3 = ui.cls("flex flex-col h-full relative flex-grow w-full", className);
30925
- $[6] = className;
30926
- $[7] = t3;
31412
+ const onItemClick = t3;
31413
+ const t4 = "navigation";
31414
+ const t5 = "Main navigation";
31415
+ let t6;
31416
+ if ($[7] !== className) {
31417
+ t6 = ui.cls("flex flex-col h-full relative grow w-full", className);
31418
+ $[7] = className;
31419
+ $[8] = t6;
30927
31420
  } else {
30928
- t3 = $[7];
31421
+ t6 = $[8];
30929
31422
  }
30930
- let t4;
30931
- if ($[8] !== logo) {
30932
- t4 = /* @__PURE__ */ jsxRuntime.jsx(DrawerLogo, { logo });
30933
- $[8] = logo;
30934
- $[9] = t4;
31423
+ let t7;
31424
+ if ($[9] !== logo) {
31425
+ t7 = /* @__PURE__ */ jsxRuntime.jsx(DrawerLogo, { logo });
31426
+ $[9] = logo;
31427
+ $[10] = t7;
30935
31428
  } else {
30936
- t4 = $[9];
31429
+ t7 = $[10];
30937
31430
  }
30938
- let t5;
30939
- if ($[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
30940
- t5 = {
30941
- maskImage: "linear-gradient(to bottom, transparent 0, black 20px, black calc(100% - 20px), transparent 100%)"
31431
+ 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%)";
31432
+ let t9;
31433
+ if ($[11] !== t8) {
31434
+ t9 = {
31435
+ maskImage: t8
30942
31436
  };
30943
- $[10] = t5;
31437
+ $[11] = t8;
31438
+ $[12] = t9;
30944
31439
  } else {
30945
- t5 = $[10];
31440
+ t9 = $[12];
30946
31441
  }
30947
- let t6;
30948
- if ($[11] !== adminMenuOpen || $[12] !== drawerOpen || $[13] !== groupsWithoutAdmin || $[14] !== isGroupCollapsed || $[15] !== navigationEntries || $[16] !== onItemClick || $[17] !== toggleGroupCollapsed || $[18] !== tooltipsOpen) {
30949
- let t72;
30950
- if ($[20] !== adminMenuOpen || $[21] !== drawerOpen || $[22] !== isGroupCollapsed || $[23] !== navigationEntries || $[24] !== onItemClick || $[25] !== toggleGroupCollapsed || $[26] !== tooltipsOpen) {
30951
- t72 = (group) => {
31442
+ let t10;
31443
+ if ($[13] !== adminMenuOpen || $[14] !== drawerVisuallyOpen || $[15] !== groupsWithoutAdmin || $[16] !== isGroupCollapsed || $[17] !== navigationEntries || $[18] !== onItemClick || $[19] !== toggleGroupCollapsed || $[20] !== tooltipsOpen) {
31444
+ let t112;
31445
+ if ($[22] !== adminMenuOpen || $[23] !== drawerVisuallyOpen || $[24] !== isGroupCollapsed || $[25] !== navigationEntries || $[26] !== onItemClick || $[27] !== toggleGroupCollapsed || $[28] !== tooltipsOpen) {
31446
+ t112 = (group) => {
30952
31447
  const entriesInGroup = Object.values(navigationEntries).filter((e_0) => e_0.group === group);
30953
- return /* @__PURE__ */ jsxRuntime.jsx(DrawerNavigationGroup, { group, entries: entriesInGroup, collapsed: isGroupCollapsed(group), onToggleCollapsed: () => toggleGroupCollapsed(group), drawerOpen, tooltipsOpen, adminMenuOpen, onItemClick }, `drawer_group_${group}`);
31448
+ return /* @__PURE__ */ jsxRuntime.jsx(DrawerNavigationGroup, { group, entries: entriesInGroup, collapsed: isGroupCollapsed(group), onToggleCollapsed: () => toggleGroupCollapsed(group), drawerOpen: drawerVisuallyOpen, tooltipsOpen, adminMenuOpen, onItemClick }, `drawer_group_${group}`);
30954
31449
  };
30955
- $[20] = adminMenuOpen;
30956
- $[21] = drawerOpen;
30957
- $[22] = isGroupCollapsed;
30958
- $[23] = navigationEntries;
30959
- $[24] = onItemClick;
30960
- $[25] = toggleGroupCollapsed;
30961
- $[26] = tooltipsOpen;
30962
- $[27] = t72;
31450
+ $[22] = adminMenuOpen;
31451
+ $[23] = drawerVisuallyOpen;
31452
+ $[24] = isGroupCollapsed;
31453
+ $[25] = navigationEntries;
31454
+ $[26] = onItemClick;
31455
+ $[27] = toggleGroupCollapsed;
31456
+ $[28] = tooltipsOpen;
31457
+ $[29] = t112;
30963
31458
  } else {
30964
- t72 = $[27];
30965
- }
30966
- t6 = groupsWithoutAdmin.map(t72);
30967
- $[11] = adminMenuOpen;
30968
- $[12] = drawerOpen;
30969
- $[13] = groupsWithoutAdmin;
30970
- $[14] = isGroupCollapsed;
30971
- $[15] = navigationEntries;
30972
- $[16] = onItemClick;
30973
- $[17] = toggleGroupCollapsed;
30974
- $[18] = tooltipsOpen;
30975
- $[19] = t6;
31459
+ t112 = $[29];
31460
+ }
31461
+ t10 = groupsWithoutAdmin.map(t112);
31462
+ $[13] = adminMenuOpen;
31463
+ $[14] = drawerVisuallyOpen;
31464
+ $[15] = groupsWithoutAdmin;
31465
+ $[16] = isGroupCollapsed;
31466
+ $[17] = navigationEntries;
31467
+ $[18] = onItemClick;
31468
+ $[19] = toggleGroupCollapsed;
31469
+ $[20] = tooltipsOpen;
31470
+ $[21] = t10;
30976
31471
  } else {
30977
- t6 = $[19];
31472
+ t10 = $[21];
30978
31473
  }
30979
- let t7;
30980
- if ($[28] !== t6) {
30981
- t7 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 flex-grow overflow-scroll no-scrollbar", style: t5, children: t6 });
30982
- $[28] = t6;
30983
- $[29] = t7;
31474
+ let t11;
31475
+ if ($[30] !== t10 || $[31] !== t9) {
31476
+ t11 = /* @__PURE__ */ jsxRuntime.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 });
31477
+ $[30] = t10;
31478
+ $[31] = t9;
31479
+ $[32] = t11;
30984
31480
  } else {
30985
- t7 = $[29];
31481
+ t11 = $[32];
30986
31482
  }
30987
- const t8 = adminViews.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(ui.Menu, { side: "right", open: adminMenuOpen, onOpenChange: setAdminMenuOpen, trigger: /* @__PURE__ */ jsxRuntime.jsxs(ui.IconButton, { shape: "square", className: "m-4 text-surface-900 dark:text-white w-fit", children: [
30988
- /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Admin", open: tooltipsOpen, side: "right", sideOffset: 28, children: /* @__PURE__ */ jsxRuntime.jsx(ui.MoreVertIcon, {}) }),
30989
- drawerOpen && /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cls(drawerOpen ? "opacity-100" : "opacity-0 hidden", "mx-4 font-inherit text-inherit"), children: "ADMIN" })
31483
+ const t12 = adminViews.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 px-4", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Menu, { side: "right", open: adminMenuOpen, onOpenChange: setAdminMenuOpen, trigger: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.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: [
31484
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 flex items-center justify-center w-[44px] h-[30px] text-surface-500 dark:text-surface-400", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Admin", open: drawerVisuallyOpen || adminMenuOpen ? false : tooltipsOpen, side: "right", sideOffset: 28, children: /* @__PURE__ */ jsxRuntime.jsx(ui.MoreVertIcon, { size: "small" }) }) }),
31485
+ drawerVisuallyOpen && /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cls("font-semibold text-[11px] uppercase tracking-wider text-surface-400"), children: t("admin") })
30990
31486
  ] }), children: adminViews.map((entry) => /* @__PURE__ */ jsxRuntime.jsxs(ui.MenuItem, { onClick: (event) => {
30991
31487
  event.preventDefault();
30992
31488
  navigate(entry.url);
30993
31489
  }, children: [
30994
31490
  /* @__PURE__ */ jsxRuntime.jsx(IconForView, { collectionOrView: entry.view }),
30995
31491
  t(entry.name)
30996
- ] }, entry.id)) });
30997
- let t9;
30998
- if ($[30] !== style || $[31] !== t3 || $[32] !== t4 || $[33] !== t7 || $[34] !== t8) {
30999
- t9 = /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t3, style, children: [
31000
- t4,
31492
+ ] }, entry.id)) }) });
31493
+ let t13;
31494
+ if ($[33] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
31495
+ t13 = /* @__PURE__ */ jsxRuntime.jsx(DrawerToggle, {});
31496
+ $[33] = t13;
31497
+ } else {
31498
+ t13 = $[33];
31499
+ }
31500
+ let t14;
31501
+ if ($[34] !== style || $[35] !== t11 || $[36] !== t12 || $[37] !== t6 || $[38] !== t7) {
31502
+ t14 = /* @__PURE__ */ jsxRuntime.jsxs("div", { role: t4, "aria-label": t5, className: t6, style, children: [
31001
31503
  t7,
31002
- t8
31003
- ] }) });
31004
- $[30] = style;
31005
- $[31] = t3;
31006
- $[32] = t4;
31007
- $[33] = t7;
31008
- $[34] = t8;
31009
- $[35] = t9;
31504
+ t11,
31505
+ t12,
31506
+ t13
31507
+ ] });
31508
+ $[34] = style;
31509
+ $[35] = t11;
31510
+ $[36] = t12;
31511
+ $[37] = t6;
31512
+ $[38] = t7;
31513
+ $[39] = t14;
31010
31514
  } else {
31011
- t9 = $[35];
31515
+ t14 = $[39];
31012
31516
  }
31013
- return t9;
31517
+ return t14;
31014
31518
  }
31015
31519
  function _temp2$3(g) {
31016
31520
  return g !== "Admin";
@@ -31018,62 +31522,133 @@
31018
31522
  function _temp$9(e) {
31019
31523
  return e.type === "admin";
31020
31524
  }
31021
- function DrawerLogo(t0) {
31022
- const $ = reactCompilerRuntime.c(12);
31023
- const {
31024
- logo
31025
- } = t0;
31026
- const navigation = useNavigationController();
31525
+ function DrawerToggle() {
31526
+ const $ = reactCompilerRuntime.c(26);
31027
31527
  const {
31028
- drawerOpen
31528
+ drawerOpen,
31529
+ drawerHovered,
31530
+ openDrawer,
31531
+ closeDrawer
31029
31532
  } = useApp();
31030
- const t1 = drawerOpen ? "32px 144px 0px 24px" : "72px 12px 0px 12px";
31533
+ const isExpanded = drawerOpen;
31534
+ const isHovered = drawerHovered && !drawerOpen;
31535
+ const showFullContent = isExpanded || isHovered;
31536
+ const t0 = isExpanded ? "Collapse" : "Expand";
31537
+ const t1 = isHovered ? false : void 0;
31031
31538
  let t2;
31032
- if ($[0] !== t1) {
31033
- t2 = {
31034
- transition: "padding 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms",
31035
- padding: t1
31539
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
31540
+ t2 = ui.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]");
31541
+ $[0] = t2;
31542
+ } else {
31543
+ t2 = $[0];
31544
+ }
31545
+ const t3 = isExpanded ? "Collapse" : "Expand";
31546
+ let t4;
31547
+ let t5;
31548
+ if ($[1] !== closeDrawer || $[2] !== isExpanded || $[3] !== openDrawer) {
31549
+ t4 = () => isExpanded ? closeDrawer() : openDrawer();
31550
+ t5 = (e) => {
31551
+ if (e.key === "Enter" || e.key === " ") {
31552
+ e.preventDefault();
31553
+ isExpanded ? closeDrawer() : openDrawer();
31554
+ }
31036
31555
  };
31037
- $[0] = t1;
31038
- $[1] = t2;
31556
+ $[1] = closeDrawer;
31557
+ $[2] = isExpanded;
31558
+ $[3] = openDrawer;
31559
+ $[4] = t4;
31560
+ $[5] = t5;
31039
31561
  } else {
31040
- t2 = $[1];
31562
+ t4 = $[4];
31563
+ t5 = $[5];
31041
31564
  }
31042
- let t3;
31043
- if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
31044
- t3 = ui.cls("cursor-pointer rounded ml-3 mr-1");
31045
- $[2] = t3;
31565
+ let t6;
31566
+ if ($[6] !== isExpanded) {
31567
+ t6 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 flex items-center justify-center w-[44px] h-[30px] text-surface-500 dark:text-surface-400", children: isExpanded ? /* @__PURE__ */ jsxRuntime.jsx(ui.KeyboardDoubleArrowLeftIcon, { size: "small" }) : /* @__PURE__ */ jsxRuntime.jsx(ui.KeyboardDoubleArrowRightIcon, { size: "small" }) });
31568
+ $[6] = isExpanded;
31569
+ $[7] = t6;
31046
31570
  } else {
31047
- t3 = $[2];
31571
+ t6 = $[7];
31048
31572
  }
31049
- let t4;
31050
- if ($[3] !== drawerOpen || $[4] !== logo) {
31051
- t4 = logo ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: "Logo", className: ui.cls("max-w-full max-h-full transition-all object-contain", drawerOpen ? "w-[96px] h-[96px]" : "w-[32px] h-[32px]") }) : /* @__PURE__ */ jsxRuntime.jsx(FireCMSLogo, {});
31052
- $[3] = drawerOpen;
31053
- $[4] = logo;
31054
- $[5] = t4;
31573
+ const t7 = showFullContent ? "opacity-100 w-auto" : "opacity-0 w-0";
31574
+ let t8;
31575
+ if ($[8] !== t7) {
31576
+ t8 = ui.cls("overflow-hidden transition-all duration-200 ease-in-out", t7);
31577
+ $[8] = t7;
31578
+ $[9] = t8;
31055
31579
  } else {
31056
- t4 = $[5];
31580
+ t8 = $[9];
31057
31581
  }
31058
- let t5;
31059
- if ($[6] !== navigation.basePath || $[7] !== t4) {
31060
- t5 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Home", sideOffset: 20, side: "right", children: /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Link, { className: "block", to: navigation.basePath, children: t4 }) });
31061
- $[6] = navigation.basePath;
31062
- $[7] = t4;
31063
- $[8] = t5;
31582
+ const t9 = isExpanded ? "Collapse" : "Expand";
31583
+ let t10;
31584
+ if ($[10] !== t9) {
31585
+ t10 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", className: "text-surface-500 dark:text-surface-400 select-none whitespace-nowrap", children: t9 });
31586
+ $[10] = t9;
31587
+ $[11] = t10;
31064
31588
  } else {
31065
- t5 = $[8];
31589
+ t10 = $[11];
31066
31590
  }
31067
- let t6;
31068
- if ($[9] !== t2 || $[10] !== t5) {
31069
- t6 = /* @__PURE__ */ jsxRuntime.jsx("div", { style: t2, className: t3, children: t5 });
31070
- $[9] = t2;
31071
- $[10] = t5;
31072
- $[11] = t6;
31591
+ let t11;
31592
+ if ($[12] !== t10 || $[13] !== t8) {
31593
+ t11 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t8, children: t10 });
31594
+ $[12] = t10;
31595
+ $[13] = t8;
31596
+ $[14] = t11;
31073
31597
  } else {
31074
- t6 = $[11];
31598
+ t11 = $[14];
31075
31599
  }
31076
- return t6;
31600
+ let t12;
31601
+ if ($[15] !== isExpanded || $[16] !== t11 || $[17] !== t3 || $[18] !== t4 || $[19] !== t5 || $[20] !== t6) {
31602
+ t12 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t2, role: "button", tabIndex: 0, "aria-expanded": isExpanded, "aria-label": t3, onClick: t4, onKeyDown: t5, children: [
31603
+ t6,
31604
+ t11
31605
+ ] });
31606
+ $[15] = isExpanded;
31607
+ $[16] = t11;
31608
+ $[17] = t3;
31609
+ $[18] = t4;
31610
+ $[19] = t5;
31611
+ $[20] = t6;
31612
+ $[21] = t12;
31613
+ } else {
31614
+ t12 = $[21];
31615
+ }
31616
+ let t13;
31617
+ if ($[22] !== t0 || $[23] !== t1 || $[24] !== t12) {
31618
+ t13 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 mt-auto px-4 pt-0.5 pb-2", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: t0, side: "right", sideOffset: 12, open: t1, children: t12 }) });
31619
+ $[22] = t0;
31620
+ $[23] = t1;
31621
+ $[24] = t12;
31622
+ $[25] = t13;
31623
+ } else {
31624
+ t13 = $[25];
31625
+ }
31626
+ return t13;
31627
+ }
31628
+ function DrawerLogo(t0) {
31629
+ const $ = reactCompilerRuntime.c(5);
31630
+ const {
31631
+ logo
31632
+ } = t0;
31633
+ const navigation = useNavigationController();
31634
+ let t1;
31635
+ if ($[0] !== logo) {
31636
+ t1 = logo ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: "Logo", className: "w-[28px] h-[28px] object-contain" }) : /* @__PURE__ */ jsxRuntime.jsx(FireCMSLogo, { width: "28px", height: "28px" });
31637
+ $[0] = logo;
31638
+ $[1] = t1;
31639
+ } else {
31640
+ t1 = $[1];
31641
+ }
31642
+ let t2;
31643
+ if ($[2] !== navigation.basePath || $[3] !== t1) {
31644
+ t2 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row items-center shrink-0 pt-4 pb-0 px-2", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Home", sideOffset: 20, side: "right", children: /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Link, { className: "shrink-0 flex items-center justify-center w-[56px] h-[40px]", to: navigation.basePath, children: t1 }) }) });
31645
+ $[2] = navigation.basePath;
31646
+ $[3] = t1;
31647
+ $[4] = t2;
31648
+ } else {
31649
+ t2 = $[4];
31650
+ }
31651
+ return t2;
31077
31652
  }
31078
31653
  function UserSelectFieldBinding(t0) {
31079
31654
  const $ = reactCompilerRuntime.c(44);
@@ -31464,6 +32039,17 @@
31464
32039
  Field: DateTimeFieldBinding
31465
32040
  }
31466
32041
  },
32042
+ geopoint: {
32043
+ key: "geopoint",
32044
+ name: "Geopoint",
32045
+ description: "Latitude and longitude pair",
32046
+ Icon: ui.LocationOnIcon,
32047
+ color: "#0ea5e9",
32048
+ property: {
32049
+ dataType: "geopoint",
32050
+ Field: GeopointFieldBinding
32051
+ }
32052
+ },
31467
32053
  group: {
31468
32054
  key: "group",
31469
32055
  name: "Group",
@@ -31606,6 +32192,8 @@
31606
32192
  return "switch";
31607
32193
  } else if (property.dataType === "date") {
31608
32194
  return "date_time";
32195
+ } else if (property.dataType === "geopoint") {
32196
+ return "geopoint";
31609
32197
  } else if (property.dataType === "reference") {
31610
32198
  return "reference";
31611
32199
  }
@@ -31616,6 +32204,20 @@
31616
32204
  if (property.propertyConfig) return property.propertyConfig;
31617
32205
  return getDefaultFieldId(property);
31618
32206
  }
32207
+ const SIDE_PANEL_HASHES = ["#side", "#new_side"];
32208
+ function shouldBlockEntityNavigation(params) {
32209
+ const {
32210
+ currentLocation,
32211
+ nextLocation,
32212
+ entityPath,
32213
+ basePath,
32214
+ blocked
32215
+ } = params;
32216
+ if (nextLocation.pathname.startsWith(entityPath)) return false;
32217
+ if (SIDE_PANEL_HASHES.includes(nextLocation.hash)) return false;
32218
+ if (SIDE_PANEL_HASHES.includes(currentLocation.hash) && nextLocation.pathname === basePath) return false;
32219
+ return blocked;
32220
+ }
31619
32221
  const EntityEditView = lazyEager(() => Promise.resolve().then(() => EntityEditView$2), "EntityEditView");
31620
32222
  const EntityCollectionView = lazyEager(() => Promise.resolve().then(() => EntityCollectionView$2), "EntityCollectionView");
31621
32223
  function FireCMSRoute() {
@@ -31994,19 +32596,31 @@
31994
32596
  setSelectedTab(urlTab);
31995
32597
  }
31996
32598
  }, [urlTab]);
31997
- const basePath = !entityId || isNew ? pathname : pathname.substring(0, pathname.lastIndexOf(`/${entityId}`));
31998
- const entityPath = basePath + `/${entityId}`;
32599
+ const lastCollectionEntry = navigationEntries.findLast((entry_1) => entry_1.type === "collection");
32600
+ const entityEntryIndex = lastEntityEntry ? navigationEntries.indexOf(lastEntityEntry) : -1;
32601
+ const parentCollectionEntry = entityEntryIndex > 0 ? navigationEntries[entityEntryIndex - 1] : void 0;
32602
+ const buildUrl = (escapedPath) => addInitialSlash(navigation.buildUrlCollectionPath(escapedPath));
32603
+ const basePath = !entityId || isNew || !parentCollectionEntry ? pathname : buildUrl(parentCollectionEntry.fullPath);
32604
+ const entityPath = lastEntityEntry ? buildUrl(lastEntityEntry.fullPath) : basePath;
32605
+ const buildEntityUrl = (id, tab) => {
32606
+ const parentPath = parentCollectionEntry?.fullPath ?? lastCollectionEntry?.fullPath;
32607
+ if (!parentPath) return pathname;
32608
+ return buildUrl(`${parentPath}/${encodeEntityId(id)}${tab ? "/" + tab : ""}`);
32609
+ };
31999
32610
  let blocker = void 0;
32000
32611
  try {
32001
32612
  blocker = reactRouter.useBlocker(({
32613
+ currentLocation,
32002
32614
  nextLocation
32003
- }) => {
32004
- if (nextLocation.pathname.startsWith(entityPath)) return false;
32005
- return blocked.current;
32006
- });
32615
+ }) => shouldBlockEntityNavigation({
32616
+ currentLocation,
32617
+ nextLocation,
32618
+ entityPath,
32619
+ basePath,
32620
+ blocked: blocked.current
32621
+ }));
32007
32622
  } catch (e) {
32008
32623
  }
32009
- const lastCollectionEntry = navigationEntries.findLast((entry_1) => entry_1.type === "collection");
32010
32624
  if (isNew && !lastCollectionEntry) {
32011
32625
  throw new Error("INTERNAL: No collection found in the navigation");
32012
32626
  }
@@ -32014,36 +32628,23 @@
32014
32628
  return /* @__PURE__ */ jsxRuntime.jsx(NotFoundPage, {});
32015
32629
  }
32016
32630
  const collection = isNew ? lastCollectionEntry.collection : lastEntityEntry.parentCollection;
32017
- const fullIdPath = isNew ? lastCollectionEntry.path : lastEntityEntry.path;
32018
- const collectionPath = navigation.resolveIdsFrom(fullIdPath);
32631
+ const fullIdPath = isNew ? lastCollectionEntry.fullPath : parentCollectionEntry?.fullPath ?? lastEntityEntry.fullPath;
32632
+ const collectionPath = navigation.resolveIdsFrom(isNew ? lastCollectionEntry.path : lastEntityEntry.path);
32019
32633
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
32020
32634
  /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.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) => {
32021
- const newSelectedTab = params.selectedTab;
32022
32635
  const newEntityId = params.entityId;
32023
- if (newSelectedTab) {
32024
- navigate(`${basePath}/${newEntityId}/${newSelectedTab}`, {
32025
- replace: true
32026
- });
32027
- } else {
32028
- navigate(`${basePath}/${newEntityId}`, {
32029
- replace: true
32030
- });
32031
- }
32636
+ if (!newEntityId) return;
32637
+ navigate(buildEntityUrl(newEntityId, params.selectedTab), {
32638
+ replace: true
32639
+ });
32032
32640
  }, onTabChange: (params_0) => {
32033
32641
  setSelectedTab(params_0.selectedTab);
32034
- if (isNew) {
32642
+ if (isNew || !entityId) {
32035
32643
  return;
32036
32644
  }
32037
- const newSelectedTab_0 = params_0.selectedTab;
32038
- if (newSelectedTab_0) {
32039
- navigate(`${basePath}/${entityId}/${newSelectedTab_0}`, {
32040
- replace: true
32041
- });
32042
- } else {
32043
- navigate(`${basePath}/${entityId}`, {
32044
- replace: true
32045
- });
32046
- }
32645
+ navigate(buildEntityUrl(entityId, params_0.selectedTab), {
32646
+ replace: true
32647
+ });
32047
32648
  }, parentCollectionIds }, collection.id + "_" + (isNew ? "new" : isCopy ? entityId + "_copy" : entityId)) }),
32048
32649
  /* @__PURE__ */ jsxRuntime.jsx(UnsavedChangesDialog, { open: blocker?.state === "blocked", handleOk: () => blocker?.proceed?.(), handleCancel: () => blocker?.reset?.(), body: "You have unsaved changes in this entity." })
32049
32650
  ] });
@@ -32301,7 +32902,12 @@
32301
32902
  const setOnHoverTrue = t4;
32302
32903
  let t5;
32303
32904
  if ($[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
32304
- t5 = () => setOnHover(false);
32905
+ t5 = () => {
32906
+ if (typeof document !== "undefined" && document.querySelector("[data-radix-popper-content-wrapper]")) {
32907
+ return;
32908
+ }
32909
+ setOnHover(false);
32910
+ };
32305
32911
  $[7] = t5;
32306
32912
  } else {
32307
32913
  t5 = $[7];
@@ -32335,24 +32941,26 @@
32335
32941
  t7 = $[9];
32336
32942
  }
32337
32943
  const handleDrawerClose = t7;
32338
- const computedDrawerOpen = drawerOpen || Boolean(largeLayout && autoOpenDrawer && onHover);
32944
+ const computedDrawerOpen = drawerOpen;
32945
+ const computedDrawerHovered = Boolean(largeLayout && onHover);
32339
32946
  const hasAppBar = Boolean(appBarChildren.length > 0);
32340
32947
  let t8;
32341
- if ($[10] !== autoOpenDrawer || $[11] !== computedDrawerOpen || $[12] !== includeDrawer || $[13] !== logo || $[14] !== onHover) {
32948
+ if ($[10] !== autoOpenDrawer || $[11] !== computedDrawerHovered || $[12] !== computedDrawerOpen || $[13] !== includeDrawer || $[14] !== logo) {
32342
32949
  t8 = {
32343
32950
  logo,
32344
32951
  hasDrawer: includeDrawer,
32345
- drawerHovered: onHover,
32952
+ drawerHovered: computedDrawerHovered,
32346
32953
  drawerOpen: computedDrawerOpen,
32347
32954
  closeDrawer: handleDrawerClose,
32348
32955
  openDrawer: handleDrawerOpen,
32956
+ closeHover: setOnHoverFalse,
32349
32957
  autoOpenDrawer
32350
32958
  };
32351
32959
  $[10] = autoOpenDrawer;
32352
- $[11] = computedDrawerOpen;
32353
- $[12] = includeDrawer;
32354
- $[13] = logo;
32355
- $[14] = onHover;
32960
+ $[11] = computedDrawerHovered;
32961
+ $[12] = computedDrawerOpen;
32962
+ $[13] = includeDrawer;
32963
+ $[14] = logo;
32356
32964
  $[15] = t8;
32357
32965
  } else {
32358
32966
  t8 = $[15];
@@ -32382,11 +32990,11 @@
32382
32990
  }
32383
32991
  const t11 = includeDrawer && drawerChildren;
32384
32992
  let t12;
32385
- if ($[20] !== computedDrawerOpen || $[21] !== includeDrawer || $[22] !== onHover || $[23] !== t11) {
32386
- t12 = /* @__PURE__ */ jsxRuntime.jsx(DrawerWrapper, { displayed: includeDrawer, onMouseEnter: setOnHoverTrue, onMouseMove: setOnHoverTrue, onMouseLeave: setOnHoverFalse, open: computedDrawerOpen, hovered: onHover, setDrawerOpen, children: t11 });
32387
- $[20] = computedDrawerOpen;
32388
- $[21] = includeDrawer;
32389
- $[22] = onHover;
32993
+ if ($[20] !== computedDrawerHovered || $[21] !== computedDrawerOpen || $[22] !== includeDrawer || $[23] !== t11) {
32994
+ t12 = /* @__PURE__ */ jsxRuntime.jsx(DrawerWrapper, { displayed: includeDrawer, onMouseEnter: setOnHoverTrue, onMouseMove: setOnHoverTrue, onMouseLeave: setOnHoverFalse, open: computedDrawerOpen, hovered: computedDrawerHovered, setDrawerOpen, children: t11 });
32995
+ $[20] = computedDrawerHovered;
32996
+ $[21] = computedDrawerOpen;
32997
+ $[22] = includeDrawer;
32390
32998
  $[23] = t11;
32391
32999
  $[24] = t12;
32392
33000
  } else {
@@ -32484,193 +33092,149 @@
32484
33092
  return t0;
32485
33093
  };
32486
33094
  function DrawerWrapper(props) {
32487
- const $ = reactCompilerRuntime.c(49);
33095
+ const $ = reactCompilerRuntime.c(36);
32488
33096
  const {
32489
33097
  t
32490
33098
  } = useTranslation();
32491
- const width = !props.displayed ? 0 : props.open ? DRAWER_WIDTH : 72;
32492
- let t0;
32493
- if ($[0] !== width) {
32494
- t0 = {
32495
- width,
32496
- 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"
32497
- };
32498
- $[0] = width;
32499
- $[1] = t0;
33099
+ const layoutWidth = !props.displayed ? 0 : props.open ? DRAWER_WIDTH : 72;
33100
+ const visualWidth = !props.displayed ? 0 : props.open || props.hovered ? DRAWER_WIDTH : 72;
33101
+ const isFloating = props.hovered && !props.open;
33102
+ 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";
33103
+ let t1;
33104
+ if ($[0] !== t0) {
33105
+ t1 = ui.cls("h-full overflow-hidden", ui.defaultBorderMixin, t0);
33106
+ $[0] = t0;
33107
+ $[1] = t1;
32500
33108
  } else {
32501
- t0 = $[1];
33109
+ t1 = $[1];
32502
33110
  }
32503
- let t1;
32504
- if ($[2] !== props || $[3] !== t) {
32505
- t1 = !props.open && props.displayed && /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: t("open_menu"), side: "right", sideOffset: 12, asChild: true, children: /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(ui.IconButton, { color: "inherit", "aria-label": t("open_menu"), onClick: () => props.setDrawerOpen(true), size: "large", children: /* @__PURE__ */ jsxRuntime.jsx(ui.MenuIcon, { size: "small" }) }) }) });
32506
- $[2] = props;
32507
- $[3] = t;
32508
- $[4] = t1;
33111
+ let t2;
33112
+ if ($[2] !== visualWidth) {
33113
+ t2 = {
33114
+ width: visualWidth,
33115
+ 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"
33116
+ };
33117
+ $[2] = visualWidth;
33118
+ $[3] = t2;
32509
33119
  } else {
32510
- t1 = $[4];
33120
+ t2 = $[3];
32511
33121
  }
32512
- const t2 = `z-20 absolute right-0 top-4 ${props.open ? "opacity-100" : "opacity-0 invisible"} transition-opacity duration-200 ease-in-out`;
32513
33122
  let t3;
32514
- if ($[5] !== t) {
32515
- t3 = t("close_drawer");
32516
- $[5] = t;
32517
- $[6] = t3;
33123
+ if ($[4] !== props.children) {
33124
+ t3 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col h-full", children: props.children });
33125
+ $[4] = props.children;
33126
+ $[5] = t3;
32518
33127
  } else {
32519
- t3 = $[6];
33128
+ t3 = $[5];
32520
33129
  }
32521
33130
  let t4;
32522
- if ($[7] !== props) {
32523
- t4 = () => props.setDrawerOpen(false);
32524
- $[7] = props;
32525
- $[8] = t4;
32526
- } else {
32527
- t4 = $[8];
32528
- }
32529
- let t5;
32530
- if ($[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
32531
- t5 = /* @__PURE__ */ jsxRuntime.jsx(ui.ChevronLeftIcon, {});
32532
- $[9] = t5;
32533
- } else {
32534
- t5 = $[9];
32535
- }
32536
- let t6;
32537
- if ($[10] !== t3 || $[11] !== t4) {
32538
- t6 = /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { "aria-label": t3, onClick: t4, children: t5 });
32539
- $[10] = t3;
32540
- $[11] = t4;
32541
- $[12] = t6;
32542
- } else {
32543
- t6 = $[12];
32544
- }
32545
- let t7;
32546
- if ($[13] !== t2 || $[14] !== t6) {
32547
- t7 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t2, children: t6 });
32548
- $[13] = t2;
32549
- $[14] = t6;
32550
- $[15] = t7;
32551
- } else {
32552
- t7 = $[15];
32553
- }
32554
- let t8;
32555
- if ($[16] !== props.children) {
32556
- t8 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col h-full", children: props.children });
32557
- $[16] = props.children;
32558
- $[17] = t8;
32559
- } else {
32560
- t8 = $[17];
32561
- }
32562
- let t9;
32563
- if ($[18] !== t0 || $[19] !== t1 || $[20] !== t7 || $[21] !== t8) {
32564
- t9 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative h-full no-scrollbar overflow-y-auto overflow-x-hidden", style: t0, children: [
32565
- t1,
32566
- t7,
32567
- t8
32568
- ] });
32569
- $[18] = t0;
32570
- $[19] = t1;
32571
- $[20] = t7;
32572
- $[21] = t8;
32573
- $[22] = t9;
33131
+ if ($[6] !== t1 || $[7] !== t2 || $[8] !== t3) {
33132
+ t4 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t1, style: t2, children: t3 });
33133
+ $[6] = t1;
33134
+ $[7] = t2;
33135
+ $[8] = t3;
33136
+ $[9] = t4;
32574
33137
  } else {
32575
- t9 = $[22];
33138
+ t4 = $[9];
32576
33139
  }
32577
- const innerDrawer = t9;
33140
+ const innerDrawer = t4;
32578
33141
  const largeLayout = useLargeLayout();
32579
33142
  if (!largeLayout) {
32580
33143
  if (!props.displayed) {
32581
33144
  return null;
32582
33145
  }
32583
- let t102;
32584
- if ($[23] !== t) {
32585
- t102 = t("open_menu");
32586
- $[23] = t;
32587
- $[24] = t102;
33146
+ let t52;
33147
+ if ($[10] !== t) {
33148
+ t52 = t("open_menu");
33149
+ $[10] = t;
33150
+ $[11] = t52;
32588
33151
  } else {
32589
- t102 = $[24];
33152
+ t52 = $[11];
32590
33153
  }
32591
- let t112;
32592
- if ($[25] !== props) {
32593
- t112 = () => props.setDrawerOpen(true);
32594
- $[25] = props;
32595
- $[26] = t112;
33154
+ let t62;
33155
+ if ($[12] !== props) {
33156
+ t62 = () => props.setDrawerOpen(true);
33157
+ $[12] = props;
33158
+ $[13] = t62;
32596
33159
  } else {
32597
- t112 = $[26];
33160
+ t62 = $[13];
32598
33161
  }
32599
- let t12;
32600
- if ($[27] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
32601
- t12 = /* @__PURE__ */ jsxRuntime.jsx(ui.MenuIcon, {});
32602
- $[27] = t12;
33162
+ let t7;
33163
+ if ($[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
33164
+ t7 = /* @__PURE__ */ jsxRuntime.jsx(ui.MenuIcon, {});
33165
+ $[14] = t7;
32603
33166
  } else {
32604
- t12 = $[27];
33167
+ t7 = $[14];
32605
33168
  }
32606
- let t13;
32607
- if ($[28] !== t102 || $[29] !== t112) {
32608
- t13 = /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { color: "inherit", "aria-label": t102, onClick: t112, size: "large", className: "absolute sm:top-2 sm:left-4 top-1 left-2", children: t12 });
32609
- $[28] = t102;
32610
- $[29] = t112;
32611
- $[30] = t13;
33169
+ let t8;
33170
+ if ($[15] !== t52 || $[16] !== t62) {
33171
+ t8 = /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { color: "inherit", "aria-label": t52, onClick: t62, size: "large", className: "absolute sm:top-2 sm:left-4 top-1 left-2", children: t7 });
33172
+ $[15] = t52;
33173
+ $[16] = t62;
33174
+ $[17] = t8;
32612
33175
  } else {
32613
- t13 = $[30];
33176
+ t8 = $[17];
32614
33177
  }
32615
- const t14 = props.open;
32616
- const t15 = props.setDrawerOpen;
32617
- let t16;
32618
- if ($[31] !== t) {
32619
- t16 = t("navigation_drawer");
32620
- $[31] = t;
32621
- $[32] = t16;
33178
+ const t9 = props.open;
33179
+ const t10 = props.setDrawerOpen;
33180
+ let t11;
33181
+ if ($[18] !== t) {
33182
+ t11 = t("navigation_drawer");
33183
+ $[18] = t;
33184
+ $[19] = t11;
32622
33185
  } else {
32623
- t16 = $[32];
33186
+ t11 = $[19];
32624
33187
  }
32625
- let t17;
32626
- if ($[33] !== innerDrawer || $[34] !== props.open || $[35] !== props.setDrawerOpen || $[36] !== t16) {
32627
- t17 = /* @__PURE__ */ jsxRuntime.jsx(ui.Sheet, { side: "left", transparent: true, open: t14, onOpenChange: t15, title: t16, overlayClassName: "bg-white bg-opacity-80 bg-white/80", children: innerDrawer });
32628
- $[33] = innerDrawer;
32629
- $[34] = props.open;
32630
- $[35] = props.setDrawerOpen;
32631
- $[36] = t16;
32632
- $[37] = t17;
33188
+ let t12;
33189
+ if ($[20] !== innerDrawer || $[21] !== props.open || $[22] !== props.setDrawerOpen || $[23] !== t11) {
33190
+ t12 = /* @__PURE__ */ jsxRuntime.jsx(ui.Sheet, { side: "left", transparent: true, open: t9, onOpenChange: t10, title: t11, overlayClassName: "bg-white bg-opacity-80 bg-white/80", children: innerDrawer });
33191
+ $[20] = innerDrawer;
33192
+ $[21] = props.open;
33193
+ $[22] = props.setDrawerOpen;
33194
+ $[23] = t11;
33195
+ $[24] = t12;
32633
33196
  } else {
32634
- t17 = $[37];
33197
+ t12 = $[24];
32635
33198
  }
32636
- let t18;
32637
- if ($[38] !== t13 || $[39] !== t17) {
32638
- t18 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
32639
- t13,
32640
- t17
33199
+ let t13;
33200
+ if ($[25] !== t12 || $[26] !== t8) {
33201
+ t13 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
33202
+ t8,
33203
+ t12
32641
33204
  ] });
32642
- $[38] = t13;
32643
- $[39] = t17;
32644
- $[40] = t18;
33205
+ $[25] = t12;
33206
+ $[26] = t8;
33207
+ $[27] = t13;
32645
33208
  } else {
32646
- t18 = $[40];
33209
+ t13 = $[27];
32647
33210
  }
32648
- return t18;
33211
+ return t13;
32649
33212
  }
32650
- let t10;
32651
- if ($[41] !== width) {
32652
- t10 = {
32653
- width,
32654
- 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"
33213
+ let t5;
33214
+ if ($[28] !== layoutWidth) {
33215
+ t5 = {
33216
+ width: layoutWidth,
33217
+ minWidth: layoutWidth,
33218
+ 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"
32655
33219
  };
32656
- $[41] = width;
32657
- $[42] = t10;
33220
+ $[28] = layoutWidth;
33221
+ $[29] = t5;
32658
33222
  } else {
32659
- t10 = $[42];
33223
+ t5 = $[29];
32660
33224
  }
32661
- let t11;
32662
- if ($[43] !== innerDrawer || $[44] !== props.onMouseEnter || $[45] !== props.onMouseLeave || $[46] !== props.onMouseMove || $[47] !== t10) {
32663
- t11 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "z-20 relative", onMouseEnter: props.onMouseEnter, onMouseMove: props.onMouseMove, onMouseLeave: props.onMouseLeave, style: t10, children: innerDrawer });
32664
- $[43] = innerDrawer;
32665
- $[44] = props.onMouseEnter;
32666
- $[45] = props.onMouseLeave;
32667
- $[46] = props.onMouseMove;
32668
- $[47] = t10;
32669
- $[48] = t11;
33225
+ let t6;
33226
+ if ($[30] !== innerDrawer || $[31] !== props.onMouseEnter || $[32] !== props.onMouseLeave || $[33] !== props.onMouseMove || $[34] !== t5) {
33227
+ t6 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "z-20 relative flex-shrink-0 overflow-visible", onMouseEnter: props.onMouseEnter, onMouseMove: props.onMouseMove, onMouseLeave: props.onMouseLeave, style: t5, children: innerDrawer });
33228
+ $[30] = innerDrawer;
33229
+ $[31] = props.onMouseEnter;
33230
+ $[32] = props.onMouseLeave;
33231
+ $[33] = props.onMouseMove;
33232
+ $[34] = t5;
33233
+ $[35] = t6;
32670
33234
  } else {
32671
- t11 = $[48];
33235
+ t6 = $[35];
32672
33236
  }
32673
- return t11;
33237
+ return t6;
32674
33238
  }
32675
33239
  function _temp$6(child) {
32676
33240
  return child.type.componentType === "Drawer";
@@ -32825,8 +33389,8 @@
32825
33389
  // ─── Error states ─────────────────────────────────────────────
32826
33390
  error: "Error",
32827
33391
  error_uploading_file: "Error uploading file",
32828
- error_deleting: "Error deleting",
32829
- error_before_delete: "Error before delete",
33392
+ error_deleting: "Error deleting: {{message}}",
33393
+ error_before_delete: "Error before delete: {{message}}",
32830
33394
  error_updating_asset: "Error updating asset",
32831
33395
  error_deleting_asset: "Error deleting asset",
32832
33396
  error_firestore_index: "A Firestore index is required for this query.",
@@ -33502,8 +34066,8 @@
33502
34066
  // ─── Error states ─────────────────────────────────────────────
33503
34067
  error: "Error",
33504
34068
  error_uploading_file: "Error al subir archivo",
33505
- error_deleting: "Error al eliminar",
33506
- error_before_delete: "Error antes de eliminar",
34069
+ error_deleting: "Error al eliminar: {{message}}",
34070
+ error_before_delete: "Error antes de eliminar: {{message}}",
33507
34071
  error_updating_asset: "Error al actualizar recurso",
33508
34072
  error_deleting_asset: "Error al eliminar recurso",
33509
34073
  error_firestore_index: "Se requiere un índice de Firestore para esta consulta.",
@@ -34183,8 +34747,8 @@
34183
34747
  // ─── Error states ─────────────────────────────────────────────
34184
34748
  error: "Fehler",
34185
34749
  error_uploading_file: "Fehler beim Hochladen der Datei",
34186
- error_deleting: "Fehler beim Löschen",
34187
- error_before_delete: "Fehler vor dem Löschen",
34750
+ error_deleting: "Fehler beim Löschen: {{message}}",
34751
+ error_before_delete: "Fehler vor dem Löschen: {{message}}",
34188
34752
  error_updating_asset: "Fehler beim Aktualisieren des Assets",
34189
34753
  error_deleting_asset: "Fehler beim Löschen des Assets",
34190
34754
  error_firestore_index: "Für diese Abfrage ist ein Firestore-Index erforderlich.",
@@ -34860,8 +35424,8 @@
34860
35424
  // ─── Error states ─────────────────────────────────────────────
34861
35425
  error: "Erreur",
34862
35426
  error_uploading_file: "Erreur lors du téléchargement du fichier",
34863
- error_deleting: "Erreur lors de la suppression",
34864
- error_before_delete: "Erreur avant la suppression",
35427
+ error_deleting: "Erreur lors de la suppression: {{message}}",
35428
+ error_before_delete: "Erreur avant la suppression: {{message}}",
34865
35429
  error_updating_asset: "Erreur lors de la mise à jour de l'actif",
34866
35430
  error_deleting_asset: "Erreur lors de la suppression de l'actif",
34867
35431
  error_firestore_index: "Un index Firestore est requis pour cette requête.",
@@ -35537,8 +36101,8 @@
35537
36101
  // ─── Error states ─────────────────────────────────────────────
35538
36102
  error: "Errore",
35539
36103
  error_uploading_file: "Errore durante il caricamento del file",
35540
- error_deleting: "Errore durante l'eliminazione",
35541
- error_before_delete: "Errore prima dell'eliminazione",
36104
+ error_deleting: "Errore durante l'eliminazione: {{message}}",
36105
+ error_before_delete: "Errore prima dell'eliminazione: {{message}}",
35542
36106
  error_updating_asset: "Errore durante l'aggiornamento dell'asset",
35543
36107
  error_deleting_asset: "Errore durante l'eliminazione dell'asset",
35544
36108
  error_firestore_index: "Per questa query è richiesto un indice Firestore.",
@@ -36214,8 +36778,8 @@
36214
36778
  // ─── Error states ─────────────────────────────────────────────
36215
36779
  error: "त्रुटि",
36216
36780
  error_uploading_file: "फ़ाइल अपलोड करने में त्रुटि",
36217
- error_deleting: "हटाने में त्रुटि",
36218
- error_before_delete: "हटाने से पहले त्रुटि",
36781
+ error_deleting: "हटाने में त्रुटि: {{message}}",
36782
+ error_before_delete: "हटाने से पहले त्रुटि: {{message}}",
36219
36783
  error_updating_asset: "एसेट अपडेट करने में त्रुटि",
36220
36784
  error_deleting_asset: "एसेट हटाने में त्रुटि",
36221
36785
  error_firestore_index: "इस क्वेरी के लिए Firestore इंडेक्स आवश्यक है।",
@@ -36891,8 +37455,8 @@
36891
37455
  // ─── Error states ─────────────────────────────────────────────
36892
37456
  error: "Erro",
36893
37457
  error_uploading_file: "Erro ao carregar ficheiro",
36894
- error_deleting: "Erro ao eliminar",
36895
- error_before_delete: "Erro antes de eliminar",
37458
+ error_deleting: "Erro ao eliminar: {{message}}",
37459
+ error_before_delete: "Erro antes de eliminar: {{message}}",
36896
37460
  error_updating_asset: "Erro ao atualizar recurso",
36897
37461
  error_deleting_asset: "Erro ao eliminar recurso",
36898
37462
  error_firestore_index: "É necessário um índice Firestore para esta consulta.",
@@ -37433,6 +37997,685 @@
37433
37997
  marketplace_link_error: "Erro ao vincular o projeto. Por favor, tente novamente.",
37434
37998
  marketplace_no_account_id: "Nenhum ID de conta do GCP Marketplace encontrado. Por favor, comece pelo GCP Marketplace."
37435
37999
  };
38000
+ const pl = {
38001
+ // ─── Form actions ────────────────────────────────────────────
38002
+ save: "Zapisz",
38003
+ create: "Utwórz",
38004
+ create_copy: "Utwórz kopię",
38005
+ save_and_close: "Zapisz i zamknij",
38006
+ create_copy_and_close: "Utwórz kopię i zamknij",
38007
+ create_and_close: "Utwórz i zamknij",
38008
+ discard: "Odrzuć",
38009
+ clear: "Wyczyść",
38010
+ cancel: "Anuluj",
38011
+ // ─── Entity actions ──────────────────────────────────────────
38012
+ edit: "Edytuj",
38013
+ copy: "Kopiuj",
38014
+ delete: "Usuń",
38015
+ // ─── Delete dialog ───────────────────────────────────────────
38016
+ delete_confirmation_title: "Usunąć?",
38017
+ delete_confirmation_body: "Spowoduje to usunięcie encji. Czy na pewno chcesz kontynuować?",
38018
+ delete_multiple_confirmation_body: "Spowoduje to usunięcie zaznaczonych encji. Czy na pewno chcesz kontynuować?",
38019
+ // ─── Unsaved-changes dialog ───────────────────────────────────
38020
+ unsaved_changes_title: "Niezapisane zmiany",
38021
+ unsaved_changes_body: "Masz niezapisane zmiany. Czy chcesz je odrzucić?",
38022
+ discard_changes: "Odrzuć zmiany",
38023
+ keep_editing: "Kontynuuj edycję",
38024
+ // ─── Collection table / toolbar ──────────────────────────────
38025
+ search: "Szukaj",
38026
+ find_by_id: "Znajdź po ID",
38027
+ find_entity_by_id: "Znajdź encję po ID",
38028
+ filter: "Filtr",
38029
+ filters: "Filtry",
38030
+ clear_filter: "Wyczyść filtr",
38031
+ clear_filter_sort: "Wyczyść filtr/sortowanie",
38032
+ clear_sort: "Wyczyść sortowanie",
38033
+ no_items: "Brak elementów",
38034
+ no_entries_found: "Nie znaleziono wpisów",
38035
+ all_entries_loaded: "Wczytano wszystkie wpisy ({{count}})",
38036
+ create_your_first_entry: "Utwórz swój pierwszy wpis",
38037
+ no_results_filter_sort: "Brak wyników dla zastosowanego filtra/sortowania",
38038
+ add: "Dodaj",
38039
+ remove: "Usuń",
38040
+ multiple_entities: "Wiele encji",
38041
+ unsaved_changes: "Masz niezapisane zmiany w kolekcji {{collectionName}}.",
38042
+ so_empty: "Tak pusto...",
38043
+ no_results: "Brak wyników dla zastosowanego filtra/sortowania",
38044
+ refresh_data: "Odśwież dane",
38045
+ dark_mode: "Ciemny",
38046
+ light_mode: "Jasny",
38047
+ system_mode: "Systemowy",
38048
+ ok: "Ok",
38049
+ save_collection_config: "Zapisz strukturę kolekcji",
38050
+ search_for_more_icons: "Szukaj więcej ikon…",
38051
+ ai_modified: "Zmodyfikowane przez AI",
38052
+ size_label: "Rozmiar",
38053
+ group_by: "Grupuj według",
38054
+ initialize_kanban_order: "Zainicjuj kolejność Kanban",
38055
+ copy_id: "Kopiuj ID",
38056
+ add_specific: "Dodaj {{name}}",
38057
+ select_specific: "Wybierz {{name}}",
38058
+ select_from: "Wybierz z {{name}}",
38059
+ done: "Gotowe",
38060
+ log_out: "Wyloguj się",
38061
+ license_needed: "Wymagana licencja",
38062
+ license_description: "Aby korzystać z FireCMS PRO, potrzebujesz ważnej licencji. Skontaktuj się z nami pod adresem {{email}}, aby uzyskać więcej informacji.",
38063
+ column_cannot_be_edited: "Ta kolumna nie może być edytowana bezpośrednio",
38064
+ close: "Zamknij",
38065
+ unsaved_local_changes: "Niezapisane zmiany lokalne",
38066
+ unsaved_local_changes_description: "Ten dokument został zmodyfikowany lokalnie i zawiera niezapisane zmiany. Zmiany te zostaną utracone, jeśli ich nie zastosujesz.",
38067
+ preview_changes: "Podgląd zmian",
38068
+ apply_changes: "Zastosuj zmiany",
38069
+ discard_local_changes: "Odrzuć zmiany lokalne",
38070
+ preview_local_changes: "Podgląd zmian lokalnych",
38071
+ preview_local_changes_description: "To są zmiany lokalne, które zostaną zastosowane do formularza.",
38072
+ type: "Typ",
38073
+ string: "tekst",
38074
+ number: "liczba",
38075
+ boolean: "wartość logiczna",
38076
+ date: "data",
38077
+ map: "mapa",
38078
+ array: "tablica",
38079
+ arrays_of_arrays_not_supported: "Tablice tablic nie są obsługiwane.",
38080
+ data_type_not_supported: "Typ danych {{dataType}} nie jest jeszcze obsługiwany",
38081
+ passkey_error_unsupported: "Twoje urządzenie lub przeglądarka nie obsługuje kluczy dostępu (passkeys).",
38082
+ admin: "Administrator",
38083
+ home: "Strona główna",
38084
+ this_form_has_errors: "Ten formularz zawiera błędy",
38085
+ error_loading_navigation: "Błąd wczytywania nawigacji",
38086
+ error_loading_auth: "Błąd wczytywania uwierzytelniania",
38087
+ this_form_has_been_modified: "Ten formularz został zmodyfikowany",
38088
+ current_form_in_sync: "Bieżący formularz jest zsynchronizowany z bazą danych",
38089
+ open_in_console: "Otwórz w konsoli",
38090
+ collection_does_not_exist: "Podana kolekcja nie istnieje. Sprawdź konsolę",
38091
+ unexpected_value: "Nieoczekiwana wartość",
38092
+ unexpected_value_click_to_edit: "Nieoczekiwana wartość. Kliknij, aby edytować",
38093
+ unexpected_reference_value: "Nieoczekiwana wartość referencji. Kliknij, aby edytować",
38094
+ copy_url_to_clipboard: "Kopiuj adres URL do schowka",
38095
+ open_image_in_new_tab: "Otwórz obraz w nowej karcie",
38096
+ reference_not_set: "Referencja nie ustawiona",
38097
+ reference_does_not_exist: "Referencja nie istnieje",
38098
+ entity_not_found: "Nie znaleziono encji",
38099
+ file_not_found: "Nie znaleziono pliku",
38100
+ unsaved_changes_in_entity: "Masz niezapisane zmiany w tej encji.",
38101
+ delete_this_role: "Usuń tę rolę",
38102
+ no_roles_yet: "Nie masz jeszcze żadnych ról.",
38103
+ create_default_roles: "Utwórz domyślne role",
38104
+ delete_role_confirmation: "Czy na pewno chcesz usunąć tę rolę?",
38105
+ delete_this_user: "Usuń tego użytkownika",
38106
+ no_users_yet: "Nie ma jeszcze żadnych użytkowników",
38107
+ add_logged_user_as_admin: "Dodaj zalogowanego użytkownika jako administratora",
38108
+ add_current_user_as_admin: "Dodaj bieżącego użytkownika jako administratora",
38109
+ create_default_roles_and_add_admin: "Utwórz domyślne role i dodaj bieżącego użytkownika jako administratora",
38110
+ delete_user_confirmation: "Czy na pewno chcesz usunąć tego użytkownika?",
38111
+ create_your_users_and_roles: "Utwórz użytkowników i role",
38112
+ 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.",
38113
+ save_before_changing_schema: "Musisz zapisać dokument przed zmianą schematu",
38114
+ edit_schema_for_this_form: "Edytuj schemat tego formularza",
38115
+ no_permissions_to_edit_collection: "Nie masz uprawnień do edycji tej kolekcji",
38116
+ browser_does_not_support_audio: "Twoja przeglądarka nie obsługuje elementu audio.",
38117
+ user_not_found: "Nie znaleziono użytkownika: {{value}}",
38118
+ // ─── Collection view actions ──────────────────────────────────
38119
+ delete_selected: "Usuń",
38120
+ cannot_delete_selected: "Zaznaczono co najmniej jedną encję, której nie można usunąć",
38121
+ // ─── Array / field containers ─────────────────────────────────
38122
+ add_entry: "Dodaj",
38123
+ add_on_top: "Dodaj na górze",
38124
+ add_below: "Dodaj poniżej",
38125
+ add_to_field: "Dodaj do {{fieldName}}",
38126
+ value: "Wartość",
38127
+ key: "Klucz",
38128
+ drag_drop_multiple: "Przeciągnij i upuść pliki tutaj lub kliknij, aby je wybrać. Przeciągnij, aby zmienić kolejność.",
38129
+ drag_drop_single: "Przeciągnij i upuść plik tutaj lub kliknij, aby go wybrać",
38130
+ // ─── Navigation / scaffold ────────────────────────────────────
38131
+ open_menu: "Otwórz menu",
38132
+ close_drawer: "Zamknij panel boczny",
38133
+ navigation_drawer: "Panel nawigacyjny",
38134
+ // ─── Error states ─────────────────────────────────────────────
38135
+ error: "Błąd",
38136
+ error_uploading_file: "Błąd przesyłania pliku",
38137
+ error_deleting: "Błąd podczas usuwania: {{message}}",
38138
+ error_before_delete: "Błąd przed usunięciem: {{message}}",
38139
+ error_updating_asset: "Błąd aktualizacji zasobu",
38140
+ error_deleting_asset: "Błąd usuwania zasobu",
38141
+ error_firestore_index: "Dla tego zapytania wymagany jest indeks Firestore.",
38142
+ create_index: "Utwórz indeks",
38143
+ value_is_not_reference: "Wartość nie jest referencją.",
38144
+ click_to_edit: "Kliknij, aby edytować",
38145
+ data_is_not_array_of_references: "Dane nie są tablicą referencji",
38146
+ // ─── Misc ─────────────────────────────────────────────────────
38147
+ loading: "Wczytywanie",
38148
+ local_changes_applied: "Zmiany lokalne zastosowane w formularzu",
38149
+ local_changes_discarded: "Zmiany lokalne odrzucone",
38150
+ are_you_sure_leave: "Czy na pewno chcesz opuścić tę stronę?",
38151
+ see_console_details: "Więcej informacji w konsoli.",
38152
+ drop_here_create_group: "Upuść tutaj, aby utworzyć nową grupę",
38153
+ filter_for_null_values: "Filtruj puste wartości",
38154
+ value_updated_elsewhere: "Ta wartość została zaktualizowana gdzie indziej",
38155
+ add_property: "Dodaj właściwość",
38156
+ edit_name: "Edytuj {{name}}",
38157
+ this_entity_not_exist: "Ta encja nie istnieje w bazie danych",
38158
+ internal_error: "BŁĄD wewnętrzny",
38159
+ // ─── Rename group dialog ──────────────────────────────────────
38160
+ rename_group: "Zmień nazwę grupy",
38161
+ group_name_label: "Nazwa grupy",
38162
+ group_name_empty_error: "Nazwa grupy nie może być pusta.",
38163
+ group_name_exists_error: "Taka nazwa grupy już istnieje.",
38164
+ // ─── Search ───────────────────────────────────────────────────
38165
+ search_collections: "Szukaj kolekcji",
38166
+ // ─── Navigation groups ────────────────────────────────────────
38167
+ views_group: "Widoki",
38168
+ // ─── Entity Edit View ─────────────────────────────────────────
38169
+ youd_need_to_save_before_additional_collections: "Musisz zapisać encję przed dodaniem kolejnych kolekcji",
38170
+ // ─── Not Found Page ───────────────────────────────────────────
38171
+ page_not_found: "Nie znaleziono strony",
38172
+ page_not_found_body: "Ta strona nie istnieje lub nie masz do niej dostępu",
38173
+ back_to_home: "Wróć do strony głównej",
38174
+ // ─── Collection Editor ─────────────────────────────────────────
38175
+ default_collection_view: "Domyślny widok kolekcji",
38176
+ table_view: "Tabela",
38177
+ cards_view: "Karty",
38178
+ kanban_view: "Kanban",
38179
+ choose_how_entities_displayed_default: "Wybierz, jak encje mają być domyślnie wyświetlane",
38180
+ document_view: "Widok dokumentu",
38181
+ side_panel: "Panel boczny",
38182
+ full_screen: "Pełny ekran",
38183
+ should_documents_opened_full_screen: "Czy dokumenty mają być otwierane na pełnym ekranie, czy w bocznym oknie dialogowym",
38184
+ select_custom_view: "Wybierz widok niestandardowy",
38185
+ no_custom_views_defined: "Nie zdefiniowano żadnych widoków niestandardowych. Zdefiniuj je w ustawieniach dostosowywania przed użyciem tego okna dialogowego.",
38186
+ select_custom_action: "Wybierz akcję niestandardową",
38187
+ no_custom_actions_defined: "Nie zdefiniowano żadnych akcji niestandardowych. Zdefiniuj je w ustawieniach dostosowywania przed użyciem tego okna dialogowego.",
38188
+ no_collections_found: "Nie znaleziono kolekcji",
38189
+ 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.",
38190
+ create_first_collection: "Utwórz swoją pierwszą kolekcję",
38191
+ define_collections_programmatically: "Kolekcje możesz też definiować programistycznie.",
38192
+ edit_collection: "Edytuj kolekcję",
38193
+ no_permissions_edit_collection: "Nie masz uprawnień do edycji tej kolekcji",
38194
+ no_permissions_create_collection: "Nie masz uprawnień do tworzenia kolekcji",
38195
+ create_collection: "Utwórz kolekcję",
38196
+ update_collection: "Zaktualizuj kolekcję",
38197
+ new_collection: "Nowa kolekcja",
38198
+ add_new_collection: "Dodaj nową kolekcję",
38199
+ collection_with_name: "Kolekcja {{name}}",
38200
+ change_icon: "Zmień ikonę",
38201
+ is_subcollection_of: "To jest podkolekcja",
38202
+ name: "Nazwa",
38203
+ collection_name_description: "Nazwa tej kolekcji, zwykle w liczbie mnogiej (np. Produkty)",
38204
+ path: "Ścieżka",
38205
+ relative_path_to_parent: "Ścieżka względna do elementu nadrzędnego (nie trzeba podawać ścieżki nadrzędnej)",
38206
+ path_in_database: "Ścieżka, pod którą ta kolekcja jest przechowywana w bazie danych",
38207
+ singular_name: "Nazwa w liczbie pojedynczej",
38208
+ singular_name_description: "Opcjonalnie zdefiniuj nazwę pojedynczą dla encji tej kolekcji",
38209
+ description: "Opis",
38210
+ description_of_collection: "Opis kolekcji, możesz użyć formatowania markdown",
38211
+ collection_id: "ID kolekcji",
38212
+ collection_id_description: "To ID identyfikuje tę kolekcję. Zazwyczaj jest takie samo jak ścieżka.",
38213
+ collection_group: "Grupa kolekcji",
38214
+ collection_group_description: "Grupa kolekcji obejmuje wszystkie kolekcje o tej samej ścieżce. Pozwala to na wykonywanie zapytań w wielu kolekcjach jednocześnie.",
38215
+ advanced_settings: "Ustawienia zaawansowane",
38216
+ doc_history_global: "Historia zmian dokumentu włączona, jeśli jest włączona globalnie",
38217
+ doc_history_enabled: "Historia zmian dokumentu WŁĄCZONA",
38218
+ doc_history_not_enabled: "Historia zmian dokumentu NIE jest włączona",
38219
+ 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.",
38220
+ document_id_generation: "Generowanie ID dokumentów",
38221
+ code_defined: "Zdefiniowane w kodzie",
38222
+ users_must_define_id: "Użytkownicy muszą podać ID",
38223
+ users_can_define_id: "Użytkownicy mogą podać ID, ale nie jest to wymagane",
38224
+ doc_id_auto_generated: "ID dokumentu generowane jest automatycznie",
38225
+ config_doc_id_generation: "Skonfiguruj sposób generowania ID dokumentów podczas tworzenia nowych encji.",
38226
+ enable_text_search: "Włącz wyszukiwanie tekstowe dla tej kolekcji",
38227
+ 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.",
38228
+ database_id: "ID bazy danych",
38229
+ default_text: "(domyślnie)",
38230
+ custom_actions: "Akcje niestandardowe",
38231
+ more_info: "Więcej informacji",
38232
+ define_custom_actions_cli: "Zdefiniuj własne akcje niestandardowe, przesyłając je za pomocą CLI.",
38233
+ action_defined_in_code: "Ta akcja jest zdefiniowana w kodzie pod kluczem",
38234
+ add_custom_entity_action: "Dodaj niestandardową akcję encji",
38235
+ remove_this_action: "Usunąć tę akcję?",
38236
+ remove_action_warning: "To nie usunie żadnych danych, tylko akcję w CMS",
38237
+ subcollections_of: "Podkolekcje kolekcji",
38238
+ add_subcollection: "Dodaj podkolekcję",
38239
+ custom_views: "Widoki niestandardowe",
38240
+ define_custom_views_cli: "Zdefiniuj własne widoki niestandardowe, przesyłając je za pomocą CLI.",
38241
+ view_defined_in_code: "Ten widok jest zdefiniowany w kodzie pod kluczem",
38242
+ add_custom_entity_view: "Dodaj niestandardowy widok encji",
38243
+ delete_this_subcollection: "Usunąć tę podkolekcję?",
38244
+ remove_collection_warning: "To nie usunie żadnych danych, tylko kolekcję w CMS",
38245
+ remove_this_view: "Usunąć ten widok?",
38246
+ remove_view_warning: "To nie usunie żadnych danych, tylko widok w CMS",
38247
+ no_collection_selected: "Nie wybrano kolekcji",
38248
+ code_for_collection: "Kod dla",
38249
+ use_config_define_json: "Użyj tej konfiguracji, aby zdefiniować kolekcję w formacie JSON.",
38250
+ customise_collection_code: "Jeśli chcesz dostosować kolekcję w kodzie, możesz dodać ten kod kolekcji do konfiguracji swojej aplikacji CMS.",
38251
+ copied: "Skopiowano",
38252
+ property_cant_be_edited: "Tej właściwości nie można edytować",
38253
+ property_not_editable_description: "Możesz nie mieć uprawnień do jej edycji lub jest ona zdefiniowana w kodzie z flagą editable ustawioną na false.",
38254
+ delete_this_property: "Usunąć tę właściwość?",
38255
+ delete_property_warning: "To nie usunie żadnych danych, tylko zmodyfikuje kolekcję.",
38256
+ error_must_specify_id: "Musisz podać ID dla tego pola",
38257
+ error_id_format: "ID może zawierać tylko litery, cyfry i podkreślenia (_) i nie może zaczynać się od cyfry",
38258
+ error_id_already_exists: "Istnieje już inne pole z tym ID",
38259
+ error_must_specify_title: "Musisz podać tytuł dla tego pola",
38260
+ custom_or_other: "Niestandardowe/Inne",
38261
+ select_property_widget: "Wybierz widżet właściwości",
38262
+ 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.",
38263
+ required: "Wymagane",
38264
+ enum_form_dialog: "Okno dialogowe formularza wyliczeniowego",
38265
+ imported_data_preview: "Podgląd zaimportowanych danych",
38266
+ entities_with_same_id_overwritten: "Encje o tym samym ID zostaną nadpisane",
38267
+ collection_editor: "Edytor kolekcji",
38268
+ properties_in_this_group: "Właściwości w tej grupie",
38269
+ data_property_mapping: "Mapowanie danych na właściwości",
38270
+ property_edit_view: "Widok edycji właściwości",
38271
+ all_of_these: "Wszystkie z nich",
38272
+ any_of_these: "Dowolna z nich",
38273
+ only_admins_edit_roles: "Tylko administratorzy mogą edytować role",
38274
+ error_user_not_found: "Nie znaleziono użytkownika",
38275
+ role: "Rola",
38276
+ name_of_this_role: "Nazwa tej roli",
38277
+ id_of_this_role: "ID tej roli",
38278
+ create_entities: "Tworzenie encji",
38279
+ read_entities: "Odczyt encji",
38280
+ update_entities: "Aktualizacja encji",
38281
+ delete_entities: "Usuwanie encji",
38282
+ all_collections: "Wszystkie kolekcje",
38283
+ create_entities_in_collections: "Tworzenie encji w kolekcjach",
38284
+ access_all_data_in_every_collection: "Dostęp do wszystkich danych w każdej kolekcji",
38285
+ update_data_in_any_collection: "Aktualizacja danych w dowolnej kolekcji",
38286
+ delete_data_in_any_collection: "Usuwanie danych w dowolnej kolekcji",
38287
+ allow_all_permissions_in_this_collections: "Zezwól na wszystkie uprawnienia w tych kolekcjach",
38288
+ all: "Wszystkie",
38289
+ customise_permissions_description: "Możesz dostosować uprawnienia, jakie użytkownicy z tą rolą mają w encjach każdej kolekcji",
38290
+ create_collections: "Tworzenie kolekcji",
38291
+ yes: "Tak",
38292
+ no: "Nie",
38293
+ can_user_create_collections: "Czy użytkownik może tworzyć kolekcje",
38294
+ edit_collections: "Edycja kolekcji",
38295
+ only_own_collections: "Tylko swoje",
38296
+ own: "Własne",
38297
+ can_user_edit_collections: "Czy użytkownik może edytować kolekcje",
38298
+ delete_collections: "Usuwanie kolekcji",
38299
+ can_user_delete_collections: "Czy użytkownik może usuwać kolekcje",
38300
+ error_saving_role: "Wystąpił błąd podczas zapisywania tej roli",
38301
+ create_role: "Utwórz rolę",
38302
+ update: "Aktualizuj",
38303
+ only_admins_change_roles: "Tylko administratorzy mogą zmieniać role",
38304
+ must_be_at_least_one_admin: "Musi istnieć co najmniej jeden administrator",
38305
+ logged_user_not_found: "Nie znaleziono zalogowanego użytkownika",
38306
+ user: "Użytkownik",
38307
+ user_id: "ID użytkownika",
38308
+ name_of_this_user: "Nazwa tego użytkownika",
38309
+ email_of_this_user: "Adres e-mail tego użytkownika",
38310
+ roles: "Role",
38311
+ create_user: "Utwórz użytkownika",
38312
+ users: "Użytkownicy",
38313
+ add_user: "Dodaj użytkownika",
38314
+ add_role: "Dodaj rolę",
38315
+ is_admin: "Jest administratorem",
38316
+ default_permissions: "Domyślne uprawnienia",
38317
+ created_on: "Utworzono",
38318
+ email: "E-mail",
38319
+ id: "ID",
38320
+ read: "Odczyt",
38321
+ column_in_file: "Kolumna w pliku",
38322
+ map_to_property: "Zmapuj na właściwość",
38323
+ default_values: "Wartości domyślne",
38324
+ default_values_description: "Możesz wybrać wartość domyślną dla niezmapowanych kolumn i pustych wartości:",
38325
+ property: "Właściwość",
38326
+ default_value: "Wartość domyślna",
38327
+ autogenerate_id: "Generuj ID automatycznie",
38328
+ id_column_description: "Kolumna, która będzie używana jako ID dla każdego dokumentu",
38329
+ do_not_set_value: "Nie ustawiaj wartości",
38330
+ set_value_to_true: "Ustaw wartość na true",
38331
+ set_value_to_false: "Ustaw wartość na false",
38332
+ drag_and_drop_file: "Przeciągnij i upuść plik tutaj lub kliknij, aby go przesłać",
38333
+ error_saving_data: "Błąd zapisywania danych",
38334
+ retry: "Spróbuj ponownie",
38335
+ saving_data: "Zapisywanie danych",
38336
+ entities_saved: "zapisanych encji",
38337
+ do_not_close_tab: "Nie zamykaj tej karty, w przeciwnym razie import zostanie przerwany",
38338
+ import: "Importuj",
38339
+ import_data: "Importuj dane",
38340
+ upload_file_description: "Prześlij plik CSV, Excel lub JSON i zmapuj go do istniejącego schematu",
38341
+ back: "Wstecz",
38342
+ next: "Dalej",
38343
+ save_data: "Zapisz dane",
38344
+ use_column_as_id: "Użyj tej kolumny jako ID",
38345
+ do_not_import_property: "Nie importuj tej właściwości",
38346
+ entities_will_be_overwritten: "Encje o tym samym ID zostaną nadpisane",
38347
+ data_imported_successfully: "Dane zostały pomyślnie zaimportowane",
38348
+ export: "Eksportuj",
38349
+ export_data: "Eksportuj dane",
38350
+ download_table_csv: "Pobierz zawartość tej tabeli jako plik CSV",
38351
+ csv: "CSV",
38352
+ json: "JSON",
38353
+ dates_as_timestamps: "Daty jako znaczniki czasu",
38354
+ dates_as_strings: "Daty jako ciągi znaków",
38355
+ flatten_arrays: "Spłaszcz tablice",
38356
+ download: "Pobierz",
38357
+ large_number_of_documents: "Ta kolekcja zawiera dużą liczbę dokumentów ({{count}}).",
38358
+ include_undefined_values: "Uwzględnij niezdefiniowane wartości",
38359
+ submit: "Wyślij",
38360
+ no_filterable_properties: "Brak dostępnych właściwości do filtrowania",
38361
+ apply_filters: "Zastosuj filtry",
38362
+ list: "Lista",
38363
+ cards: "Karty",
38364
+ board: "Tablica",
38365
+ 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.",
38366
+ kanban_view_not_available: "Widok Kanban jest niedostępny",
38367
+ 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.",
38368
+ no_enum_values_configured: "Nie skonfigurowano wartości wyliczeniowych dla właściwości „{{property}}”",
38369
+ 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ść.",
38370
+ initialize: "Zainicjuj",
38371
+ confirm_multiple_delete: "Potwierdzić wielokrotne usunięcie?",
38372
+ delete_entity_confirm_title: "Czy chcesz usunąć ten element: {{entityName}}?",
38373
+ /** AI Collection Generator Popover */
38374
+ generate_collection_with_ai: "Wygeneruj kolekcję za pomocą AI",
38375
+ modify_collection_with_ai: "Zmodyfikuj kolekcję za pomocą AI",
38376
+ describe_collection_to_create: "Opisz kolekcję, którą chcesz utworzyć.",
38377
+ describe_changes_to_make: "Opisz zmiany, które chcesz wprowadzić w tej kolekcji.",
38378
+ ai_placeholder_create: "np. Utwórz kolekcję produktów z nazwą, ceną, opisem i kategorią...",
38379
+ ai_placeholder_modify: "np. Dodaj pole obrazu miniatury z przechowywaniem, ustaw cenę jako wymaganą...",
38380
+ ai_assist: "Asystent AI",
38381
+ generating: "Generowanie...",
38382
+ /** Recently extracted strings for collection editor */
38383
+ this_is_subcollection_of: "To jest podkolekcja",
38384
+ use_existing_paths_database: "Użyj jednej z istniejących ścieżek w swojej bazie danych:",
38385
+ describe_collection_ai: "Opisz swoją kolekcję dla AI:",
38386
+ generate_with_ai: "Generuj za pomocą AI",
38387
+ create_from_json_config: "Utwórz z konfiguracji JSON:",
38388
+ paste_json_config: "Wklej konfigurację JSON",
38389
+ create_collection_from_file_formats: "Utwórz kolekcję z pliku (csv, json, xls, xlsx...)",
38390
+ select_template: "Wybierz szablon:",
38391
+ products: "Produkty",
38392
+ collection_products_subtitle: "Kolekcja produktów ze zdjęciami, cenami i stanem magazynowym",
38393
+ collection_users_subtitle: "Kolekcja użytkowników z adresami e-mail, imionami i rolami",
38394
+ blog_posts: "Wpisy na blogu",
38395
+ collection_blog_posts_subtitle: "Kolekcja wpisów na blogu ze zdjęciami, autorami i rozbudowaną treścią",
38396
+ pages: "Strony",
38397
+ collection_pages_subtitle: "Kolekcja stron ze zdjęciami, autorami i rozbudowaną treścią",
38398
+ continue_from_scratch: "Kontynuuj od zera",
38399
+ /** Admin views config */
38400
+ cms_users: "Użytkownicy CMS",
38401
+ roles_menu: "Role",
38402
+ project_settings: "Ustawienia projektu",
38403
+ firestore_manager: "Menedżer Firestore",
38404
+ manage_your_firestore_data: "Zarządzaj danymi w Firestore",
38405
+ // ─── FireCMS Cloud Login ──────────────────────────────────────
38406
+ build_admin_panel_in_minutes: "Zbuduj panel administracyjny Firebase w kilka minut",
38407
+ go_live_instantly: "Uruchom natychmiast:",
38408
+ create_production_ready_back_offices: "Twórz gotowe do wdrożenia panele administracyjne",
38409
+ without_the_frontend_hassle: "bez kłopotów z frontendem.",
38410
+ automatic_setup: "Automatyczna konfiguracja",
38411
+ from_your_existing_firestore_data: "na podstawie Twoich istniejących danych w Firestore.",
38412
+ seamless_real_time_firebase_integration: "Płynna integracja z Firebase w czasie rzeczywistym.",
38413
+ intuitive_spreadsheet_like_ui: "Intuicyjny interfejs przypominający arkusz kalkulacyjny,",
38414
+ your_whole_team_can_use: "z którego może korzystać cały Twój zespół.",
38415
+ focus_on_your_app: "Skup się na swojej aplikacji,",
38416
+ not_the_admin_panel: "a nie na panelu administracyjnym.",
38417
+ join_our_newsletter: "Dołącz do naszego newslettera. Bez spamu, tylko ważne aktualizacje!",
38418
+ by_signing_in_you_agree_to_our: "Logując się, akceptujesz nasz",
38419
+ terms_and_conditions: "Regulamin",
38420
+ and_our: "oraz naszą",
38421
+ privacy_policy: "Politykę prywatności",
38422
+ firecms_cloud_google_disclosure: "Korzystanie i przekazywanie przez FireCMS Cloud informacji uzyskanych z API Google do jakiejkolwiek innej aplikacji będzie zgodne z",
38423
+ google_api_services_user_data_policy: "Polityką dotyczącą danych użytkowników usług API Google",
38424
+ including_the_limited_use_requirements: "w tym z wymaganiami dotyczącymi ograniczonego użytkowania.",
38425
+ email_password: "E-mail/hasło",
38426
+ sign_in_with_google: "Zaloguj się przez Google",
38427
+ // --- Auth error messages ---
38428
+ auth_user_not_found: "Nie znaleziono użytkownika",
38429
+ auth_wrong_password: "Nieprawidłowe hasło. Spróbuj ponownie.",
38430
+ auth_user_disabled: "Użytkownik jest zablokowany. Skontaktuj się z pomocą techniczną.",
38431
+ auth_account_exists_with_different_credential: "Konto istnieje z inną metodą logowania",
38432
+ auth_email_already_in_use: "Ten adres e-mail jest już używany",
38433
+ auth_google_permissions_required: "Musisz przyznać dodatkowe uprawnienia, aby zarządzać swoimi projektami Google Cloud",
38434
+ auth_invalid_email_password: "Podaj zarówno adres e-mail, jak i hasło",
38435
+ auth_enter_email_first: "Najpierw podaj swój adres e-mail",
38436
+ auth_password_reset_sent: "Wysłano e-mail resetujący hasło",
38437
+ auth_sign_in_account: "Zaloguj się do swojego konta",
38438
+ auth_create_new_account: "Utwórz nowe konto",
38439
+ auth_password: "Hasło",
38440
+ auth_reset_password: "Zresetuj hasło",
38441
+ auth_new_user: "Nowy użytkownik?",
38442
+ auth_have_account: "Masz już konto?",
38443
+ auth_sign_in: "Zaloguj się",
38444
+ auth_sign_up: "Zarejestruj się",
38445
+ // --- SaaS Subscriptions ---
38446
+ subscriptions: "Subskrypcje",
38447
+ manage_your_subscriptions_in_stripe: "Zarządzaj swoimi subskrypcjami w Stripe",
38448
+ 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.",
38449
+ your_pro_licenses: "Twoje licencje PRO",
38450
+ create_new_license: "Utwórz nową licencję",
38451
+ 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.",
38452
+ if_you_are_an_agency: "Jeśli jesteś agencją, możesz swobodnie odsprzedawać swoją licencję swoim klientom.",
38453
+ if_you_have_any_questions: "Jeśli masz pytania lub potrzebujesz pomocy, skontaktuj się z nami pod adresem",
38454
+ you_have_not_created_any_pro_licenses: "Nie masz jeszcze żadnych licencji FireCMS PRO",
38455
+ archive: "Archiwizuj",
38456
+ licensed_projects_lowercase: "licencjonowanych projektów",
38457
+ manage: "Zarządzaj",
38458
+ update_payment_method: "Zaktualizuj metodę płatności",
38459
+ your_firecms_cloud_projects: "Twoje projekty FireCMS Cloud",
38460
+ status_active: "Aktywna",
38461
+ status_trialing: "Okres próbny",
38462
+ status_past_due: "Zaległa płatność",
38463
+ status_canceled: "Anulowana",
38464
+ status_unpaid: "Nieopłacona",
38465
+ status_incomplete: "Niekompletna",
38466
+ status_incomplete_expired: "Niekompletna, wygasła",
38467
+ status_unknown: "Nieznany",
38468
+ plan_free: "Brak subskrypcji",
38469
+ plan_cloud_plus: "Subskrybowany",
38470
+ plan_pro: "Pro",
38471
+ plan_unknown: "Nieznany plan",
38472
+ auto_setup_collections_button: "Automatycznie skonfiguruj kolekcje",
38473
+ auto_setup_collections_title: "Automatycznie skonfigurować kolekcje?",
38474
+ auto_setup_collections_desc: "Spowoduje to automatyczne utworzenie konfiguracji kolekcji dla kolekcji, które <b>NIE</b> są jeszcze zmapowane",
38475
+ setting_up_collections: "Konfigurowanie kolekcji",
38476
+ setting_up_collection: "Konfigurowanie {{name}}",
38477
+ no_collections_found_to_setup: "Nie znaleziono kolekcji do skonfigurowania.",
38478
+ collections_have_been_setup: "Kolekcje zostały automatycznie skonfigurowane.",
38479
+ error_setting_up_collections: "Błąd podczas automatycznej konfiguracji kolekcji",
38480
+ setup_collections_title: "Skonfiguruj kolekcje",
38481
+ setup_collections_select_desc: "Wybierz kolekcje do automatycznej konfiguracji:",
38482
+ select_all: "Zaznacz wszystkie",
38483
+ deselect_all: "Odznacz wszystkie",
38484
+ setup_collections_confirm: "Skonfiguruj ({{count}})",
38485
+ collection_setup_success: "{{name}} została skonfigurowana",
38486
+ go_to_collection: "Przejdź do kolekcji",
38487
+ // --- Home Suggestions ---
38488
+ add_your: "Dodaj swoje",
38489
+ database_collections: "kolekcje bazy danych",
38490
+ to_firecms: "do FireCMS",
38491
+ no_unmapped_collections: "Brak niezmapowanych kolekcji w bazie danych",
38492
+ query_and_update_with_datatalk: "Odpytuj i aktualizuj swoje dane w języku naturalnym za pomocą",
38493
+ // --- SaaS Welcome ---
38494
+ welcome_to_firecms: "Witamy w FireCMS Cloud",
38495
+ admin_panel_ready_bring_data: "Twój panel administracyjny jest gotowy. Wprowadźmy Twoje dane.",
38496
+ admin_panel_ready_get_started: "Twój panel administracyjny jest gotowy. Oto jak zacząć.",
38497
+ auto_detect_collections: "Automatyczne wykrywanie kolekcji",
38498
+ auto_detect_collections_desc: "Pozwól AI przeskanować Twoją bazę danych i automatycznie wygenerować schematy kolekcji.",
38499
+ create_a_collection: "Utwórz kolekcję",
38500
+ create_collection_desc: "Ręcznie zdefiniuj swoją pierwszą kolekcję od podstaw za pomocą edytora wizualnego.",
38501
+ read_the_docs: "Przeczytaj dokumentację",
38502
+ read_the_docs_desc: "Dowiedz się, jak dostosowywać pola, widoki, akcje i więcej.",
38503
+ explore_docs: "Poznaj dokumentację",
38504
+ want_to_customize_with_code: "Chcesz dostosować za pomocą kodu? Uruchom",
38505
+ to_scaffold_a_local_project: "aby wygenerować lokalny projekt.",
38506
+ // ─── Collection Editor — Validation ──────────────────────────
38507
+ validation: "Walidacja",
38508
+ unique: "Unikalne",
38509
+ required_message: "Treść komunikatu o wymaganym polu",
38510
+ required_tooltip: "Nie będzie można zapisać tej encji, jeśli ta wartość nie jest ustawiona",
38511
+ unique_tooltip: "Nie może istnieć wiele encji z tą samą wartością",
38512
+ lowercase: "Małe litery",
38513
+ uppercase: "Wielkie litery",
38514
+ trim: "Przytnij",
38515
+ exact_length: "Dokładna długość",
38516
+ min_length: "Minimalna długość",
38517
+ max_length: "Maksymalna długość",
38518
+ matches_regex: "Pasuje do wyrażenia regularnego",
38519
+ not_valid_regexp: "Nieprawidłowe wyrażenie regularne",
38520
+ regex_helper: "np. /^\\d+$/ tylko dla cyfr",
38521
+ min_value: "Wartość minimalna",
38522
+ max_value: "Wartość maksymalna",
38523
+ less_than: "Mniejsza niż",
38524
+ more_than: "Większa niż",
38525
+ positive_value: "Wartość dodatnia",
38526
+ negative_value: "Wartość ujemna",
38527
+ integer_value: "Wartość całkowita",
38528
+ // ─── Collection Editor — Property Edit ───────────────────────
38529
+ invalid_regular_expression: "Nieprawidłowe wyrażenie regularne",
38530
+ must_specify_target_collection: "Musisz określić docelową kolekcję dla tego pola",
38531
+ need_specify_repeat_field: "Musisz określić pole powtarzalne",
38532
+ need_specify_block_properties: "Musisz określić właściwości tego bloku",
38533
+ incomplete_condition: "Niekompletny warunek – wybierz pole",
38534
+ field_name: "Nazwa pola",
38535
+ // ─── Collection Editor — Display & Config ────────────────────
38536
+ kanban_column_property: "Właściwość kolumny Kanban",
38537
+ select_a_property: "Wybierz właściwość",
38538
+ 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.",
38539
+ no_enum_string_properties: "Nie znaleziono tekstowych właściwości wyliczeniowych. Dodaj właściwość tekstową z enumValues, aby użyć widoku Kanban.",
38540
+ kanban_column_description: "Wybierz właściwość tekstową z wartościami wyliczeniowymi, aby grupować encje w kolumny",
38541
+ create_property: "+ Utwórz właściwość „{{property}}”",
38542
+ order_property: "Właściwość kolejności",
38543
+ 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.",
38544
+ no_number_properties: "Nie znaleziono właściwości liczbowych. Dodaj właściwość liczbową, aby włączyć sortowanie.",
38545
+ order_property_description: "Wybierz właściwość liczbową, aby zachować kolejność elementów",
38546
+ display_settings: "Ustawienia wyświetlania",
38547
+ default_row_size: "Domyślny rozmiar wiersza",
38548
+ side_dialog_width: "Szerokość okna bocznego",
38549
+ side_dialog_width_description: "Opcjonalnie zdefiniuj szerokość (w pikselach) bocznego okna encji. Wartość domyślna to 768px",
38550
+ inline_editing_enabled: "Dane można edytować bezpośrednio w widoku tabeli",
38551
+ inline_editing_disabled: "Dane można edytować tylko w widoku formularza",
38552
+ inline_editing_description: "Zezwól na edycję danych bezpośrednio w widoku tabeli, bez otwierania widoku formularza.",
38553
+ include_json_view: "Uwzględnij widok JSON",
38554
+ no_json_view: "Nie uwzględniaj widoku JSON",
38555
+ json_view_description: "Uwzględnij reprezentację JSON dokumentu.",
38556
+ not_found_suffix: "nie znaleziono",
38557
+ // ─── Editor ─────────────────────────────────────────────────
38558
+ editor_text: "Tekst",
38559
+ editor_text_description: "Po prostu zacznij pisać zwykły tekst.",
38560
+ editor_heading_1: "Nagłówek 1",
38561
+ editor_heading_1_description: "Duży nagłówek sekcji.",
38562
+ editor_heading_2: "Nagłówek 2",
38563
+ editor_heading_2_description: "Średni nagłówek sekcji.",
38564
+ editor_heading_3: "Nagłówek 3",
38565
+ editor_heading_3_description: "Mały nagłówek sekcji.",
38566
+ editor_todo_list: "Lista zadań",
38567
+ editor_todo_list_description: "Śledź zadania za pomocą listy do zrobienia.",
38568
+ editor_bullet_list: "Lista punktowana",
38569
+ editor_bullet_list_description: "Utwórz prostą listę punktowaną.",
38570
+ editor_numbered_list: "Lista numerowana",
38571
+ editor_numbered_list_description: "Utwórz listę z numeracją.",
38572
+ editor_quote: "Cytat",
38573
+ editor_quote_description: "Uchwyć cytat.",
38574
+ editor_code: "Kod",
38575
+ editor_code_description: "Wstaw fragment kodu.",
38576
+ editor_image: "Obraz",
38577
+ editor_image_description: "Prześlij obraz ze swojego komputera.",
38578
+ editor_multiple: "Wielokrotne",
38579
+ editor_link: "Link",
38580
+ editor_save: "Zapisz",
38581
+ editor_cancel: "Anuluj",
38582
+ editor_remove_link: "Usuń link",
38583
+ editor_paste_or_type_link: "Wklej lub wpisz link",
38584
+ editor_open_in_new_window: "Otwórz w nowym oknie",
38585
+ editor_bold: "Pogrubienie",
38586
+ editor_italic: "Kursywa",
38587
+ editor_underline: "Podkreślenie",
38588
+ editor_strikethrough: "Przekreślenie",
38589
+ editor_autocomplete: "Autouzupełnianie",
38590
+ editor_autocomplete_description: "Dodaj tekst na podstawie kontekstu.",
38591
+ // ─── Text Search Dialog ─────────────────────────────────────
38592
+ text_search_dialog_title: "Włącz wyszukiwanie tekstowe",
38593
+ text_search_local_not_recommended: "Lokalne wyszukiwanie tekstowe nie jest zalecane dla dużych kolekcji.",
38594
+ 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.",
38595
+ 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.",
38596
+ 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.",
38597
+ text_search_own_implementation: "Zaimplementowano własny kontroler wyszukiwania tekstowego. Możesz włączyć wyszukiwanie tekstowe dla swojej kolekcji.",
38598
+ text_search_enable_for_collection: "Włącz dla tej kolekcji",
38599
+ text_search_enable_for_project: "Włącz dla projektu",
38600
+ text_search_enabled_snackbar: "Lokalne wyszukiwanie tekstowe włączone",
38601
+ // ─── Cloud Project Settings ──────────────────────────────────
38602
+ settings_subscription_plan: "Plan subskrypcji",
38603
+ settings_subscribed_to: "Obecnie subskrybujesz",
38604
+ settings_no_active_subscription: "Obecnie ten projekt nie ma aktywnej subskrypcji.",
38605
+ settings_trial_valid_until: "Twój okres próbny jest ważny do {{date}}.",
38606
+ settings_features_intro: "Oto niektóre z funkcji, z których już korzystasz, używając FireCMS Cloud",
38607
+ settings_feature_managed_service: "Zarządzana, zawsze aktualna usługa",
38608
+ settings_feature_local_text_search: "Lokalne wyszukiwanie tekstowe",
38609
+ settings_feature_unlimited_users_roles: "Nieograniczona liczba użytkowników i ról",
38610
+ settings_feature_theme_logo: "Dostosowywanie motywu i logo",
38611
+ settings_feature_custom_fields_views: "Niestandardowe pola formularzy i widoki",
38612
+ settings_feature_secondary_databases: "Dodatkowe bazy danych",
38613
+ settings_feature_ai_content: "Generowanie treści AI za pomocą OpenAI i Google",
38614
+ settings_feature_unlimited_export: "Nieograniczony eksport danych",
38615
+ settings_feature_appcheck: "AppCheck",
38616
+ settings_heading: "Ustawienia",
38617
+ settings_project_name: "Nazwa projektu",
38618
+ settings_default_language: "Język domyślny",
38619
+ settings_default_language_caption: "Wybierz język bazowy dla tego projektu. Użytkownicy mogą zmienić tę preferencję w swoich ustawieniach osobistych.",
38620
+ settings_enable_local_text_search: "Włącz lokalne wyszukiwanie tekstowe",
38621
+ 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.",
38622
+ settings_doc_history_all_collections: "Historia dokumentów włączona dla wszystkich kolekcji",
38623
+ 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.",
38624
+ settings_theme: "Motyw",
38625
+ settings_primary_color: "Kolor podstawowy",
38626
+ settings_secondary_color: "Kolor dodatkowy",
38627
+ settings_sample_theme_components: "Przykładowe komponenty motywu",
38628
+ settings_drag_drop_logo: "Przeciągnij i upuść tutaj swoje logo",
38629
+ settings_create_subscription: "Utwórz subskrypcję",
38630
+ 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.",
38631
+ settings_subscription_is: "Subskrypcja jest",
38632
+ settings_next_payment_on: "Następna płatność nastąpi {{date}}.",
38633
+ settings_seats_count: "Masz",
38634
+ settings_seat: "miejsce",
38635
+ settings_seats: "miejsc",
38636
+ settings_per_seat: "po {{price}}/miejsce/{{interval}}",
38637
+ settings_current_price: "Aktualna cena to",
38638
+ settings_per_user_usage: "na użytkownika (zależnie od zużycia).",
38639
+ settings_cancelled_active_until: "Ta subskrypcja została anulowana i będzie aktywna do {{date}}.",
38640
+ settings_no_additional_charges: "Po anulowaniu nie zostaną naliczone żadne dodatkowe opłaty.",
38641
+ settings_manage_subscription: "Zarządzaj subskrypcją",
38642
+ settings_security_rules: "Reguły bezpieczeństwa",
38643
+ 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.",
38644
+ settings_security_rules_add_domain: "Pamiętaj, aby dodać domenę {{domain}} do listy dozwolonych domen u swojego dostawcy",
38645
+ 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.",
38646
+ settings_appcheck: "AppCheck",
38647
+ 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.",
38648
+ settings_appcheck_add_domain: "Pamiętaj, aby dodać domenę {{domain}} do listy dozwolonych domen u swojego dostawcy",
38649
+ settings_appcheck_enable: "Włącz AppCheck",
38650
+ settings_appcheck_site_key: "Klucz witryny",
38651
+ settings_appcheck_update: "Zaktualizuj AppCheck",
38652
+ settings_appcheck_refresh_note: "Po zapisaniu może być konieczne odświeżenie strony, aby zobaczyć zmiany.",
38653
+ settings_appcheck_updated: "AppCheck zaktualizowany",
38654
+ settings_appcheck_error: "Błąd podczas aktualizacji AppCheck",
38655
+ // --- Permission Error View ---
38656
+ missing_firestore_security_rules: "Brak reguł bezpieczeństwa Firestore",
38657
+ 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",
38658
+ cannot_be_accessed_without_it: "nie może być dostępna bez tej reguły.",
38659
+ required_security_rule: "Wymagana reguła bezpieczeństwa",
38660
+ fix_automatically: "Napraw automatycznie",
38661
+ open_firebase_rules: "Otwórz reguły Firebase",
38662
+ security_rules_updated_successfully: "Reguły bezpieczeństwa zostały pomyślnie zaktualizowane! Odśwież stronę, aby wczytać dane.",
38663
+ sec_rules_fixing: "Naprawianie...",
38664
+ sec_rules_fixed: "Naprawiono!",
38665
+ // ─── GCP Marketplace ─────────────────────────────────────────
38666
+ marketplace_managed_by_gcp: "Zarządzane przez GCP Marketplace",
38667
+ marketplace_billing_note: "Twoja subskrypcja jest zarządzana przez Google Cloud Marketplace. Zmiany planu, rozliczenia i anulowanie są obsługiwane w konsoli GCP.",
38668
+ marketplace_manage_in_gcp_console: "Zarządzaj w konsoli GCP",
38669
+ marketplace_plan_changes_note: "Aby zmienić plan lub anulować subskrypcję, odwiedź swoje zamówienia w GCP Marketplace.",
38670
+ marketplace_welcome_title: "Witamy z GCP Marketplace!",
38671
+ marketplace_welcome_subtitle: "Twoja subskrypcja Google Cloud Marketplace jest aktywna. Wybierz istniejący projekt lub utwórz nowy, aby go połączyć.",
38672
+ marketplace_select_or_create_project: "Wybierz lub utwórz projekt",
38673
+ marketplace_link_project: "Połącz projekt",
38674
+ marketplace_linking: "Łączenie projektu…",
38675
+ marketplace_link_success: "Projekt został pomyślnie połączony! Przekierowywanie…",
38676
+ marketplace_link_error: "Błąd podczas łączenia projektu. Spróbuj ponownie.",
38677
+ marketplace_no_account_id: "Nie znaleziono ID konta GCP Marketplace. Rozpocznij od GCP Marketplace."
38678
+ };
37436
38679
  const FIRECMS_NS = "firecms_core";
37437
38680
  const FIRECMS_LOCALE_STORAGE_KEY = "firecms_locale";
37438
38681
  function FireCMSi18nProvider({
@@ -37532,6 +38775,11 @@
37532
38775
  [FIRECMS_NS]: {
37533
38776
  ...pt
37534
38777
  }
38778
+ },
38779
+ pl: {
38780
+ [FIRECMS_NS]: {
38781
+ ...pl
38782
+ }
37535
38783
  }
37536
38784
  };
37537
38785
  if (!translations) return resources;
@@ -42127,6 +43375,7 @@ ul[data-type="taskList"] li[data-checked="true"] > div > p {
42127
43375
  exports2.DrawerLogo = DrawerLogo;
42128
43376
  exports2.DrawerNavigationGroup = DrawerNavigationGroup;
42129
43377
  exports2.DrawerNavigationItem = DrawerNavigationItem;
43378
+ exports2.DrawerToggle = DrawerToggle;
42130
43379
  exports2.EmptyValue = EmptyValue;
42131
43380
  exports2.EntityCard = EntityCard;
42132
43381
  exports2.EntityCollectionCardView = EntityCollectionCardView;
@@ -42153,6 +43402,8 @@ ul[data-type="taskList"] li[data-checked="true"] > div > p {
42153
43402
  exports2.FormEntry = FormEntry;
42154
43403
  exports2.FormLayout = FormLayout;
42155
43404
  exports2.GeoPoint = GeoPoint;
43405
+ exports2.GeopointFieldBinding = GeopointFieldBinding;
43406
+ exports2.GeopointPropertyPreview = GeopointPropertyPreview;
42156
43407
  exports2.IconForView = IconForView;
42157
43408
  exports2.ImagePreview = ImagePreview;
42158
43409
  exports2.InternalUserManagementContext = InternalUserManagementContext;
@@ -42230,15 +43481,18 @@ ul[data-type="taskList"] li[data-checked="true"] > div > p {
42230
43481
  exports2.canDeleteEntity = canDeleteEntity;
42231
43482
  exports2.canEditEntity = canEditEntity;
42232
43483
  exports2.copyEntityAction = copyEntityAction;
43484
+ exports2.decodeEntityId = decodeEntityId;
42233
43485
  exports2.defaultDateFormat = defaultDateFormat;
42234
43486
  exports2.deleteEntityAction = deleteEntityAction;
42235
43487
  exports2.deleteEntityWithCallbacks = deleteEntityWithCallbacks;
42236
43488
  exports2.editEntityAction = editEntityAction;
42237
43489
  exports2.en = en;
43490
+ exports2.encodeEntityId = encodeEntityId;
42238
43491
  exports2.enumToObjectEntries = enumToObjectEntries;
42239
43492
  exports2.es = es;
42240
43493
  exports2.evaluateCondition = evaluateCondition;
42241
43494
  exports2.flattenObject = flattenObject;
43495
+ exports2.formatGeoPoint = formatGeoPoint;
42242
43496
  exports2.fullPathToCollectionSegments = fullPathToCollectionSegments;
42243
43497
  exports2.getArrayResolvedProperties = getArrayResolvedProperties;
42244
43498
  exports2.getArrayValuesCount = getArrayValuesCount;
@@ -42260,6 +43514,7 @@ ul[data-type="taskList"] li[data-checked="true"] > div > p {
42260
43514
  exports2.getFieldConfig = getFieldConfig;
42261
43515
  exports2.getFieldId = getFieldId;
42262
43516
  exports2.getFormFieldKeys = getFormFieldKeys;
43517
+ exports2.getGeoPointCoordinates = getGeoPointCoordinates;
42263
43518
  exports2.getHashValue = getHashValue;
42264
43519
  exports2.getIcon = getIcon;
42265
43520
  exports2.getIconForProperty = getIconForProperty;
@@ -42277,6 +43532,7 @@ ul[data-type="taskList"] li[data-checked="true"] > div > p {
42277
43532
  exports2.hydrateRegExp = hydrateRegExp;
42278
43533
  exports2.iconSynonyms = iconSynonyms;
42279
43534
  exports2.iconsSearch = iconsSearch;
43535
+ exports2.isDataTypeFilterable = isDataTypeFilterable;
42280
43536
  exports2.isDefaultFieldConfigId = isDefaultFieldConfigId;
42281
43537
  exports2.isEmptyObject = isEmptyObject;
42282
43538
  exports2.isEnumValueDisabled = isEnumValueDisabled;
@@ -42296,6 +43552,8 @@ ul[data-type="taskList"] li[data-checked="true"] > div > p {
42296
43552
  exports2.mergeDeep = mergeDeep;
42297
43553
  exports2.mergeEntityActions = mergeEntityActions;
42298
43554
  exports2.navigateToEntity = navigateToEntity;
43555
+ exports2.normalizeGeoPoint = normalizeGeoPoint;
43556
+ exports2.parseGeoPoint = parseGeoPoint;
42299
43557
  exports2.pick = pick;
42300
43558
  exports2.plural = plural;
42301
43559
  exports2.prettifyIdentifier = prettifyIdentifier;