@firecms/core 3.0.0-canary.107 → 3.0.0-canary.109

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 (48) hide show
  1. package/dist/components/PropertyIdCopyTooltip.d.ts +8 -0
  2. package/dist/components/index.d.ts +1 -0
  3. package/dist/form/components/LabelWithIcon.d.ts +1 -1
  4. package/dist/form/components/LabelWithIconAndTooltip.d.ts +15 -0
  5. package/dist/form/components/index.d.ts +1 -0
  6. package/dist/index.es.js +287 -187
  7. package/dist/index.es.js.map +1 -1
  8. package/dist/index.umd.js +286 -186
  9. package/dist/index.umd.js.map +1 -1
  10. package/package.json +5 -5
  11. package/src/app/Scaffold.tsx +13 -10
  12. package/src/components/ArrayContainer.tsx +9 -7
  13. package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +3 -1
  14. package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +1 -1
  15. package/src/components/EntityCollectionTable/internal/EntityTableCellActions.tsx +19 -7
  16. package/src/components/EntityCollectionView/EntityCollectionView.tsx +1 -1
  17. package/src/components/EntityPreview.tsx +2 -2
  18. package/src/components/PropertyIdCopyTooltip.tsx +48 -0
  19. package/src/components/SearchIconsView.tsx +2 -1
  20. package/src/components/index.tsx +1 -0
  21. package/src/core/DefaultAppBar.tsx +1 -1
  22. package/src/core/DrawerNavigationItem.tsx +28 -26
  23. package/src/core/EntityEditView.tsx +7 -13
  24. package/src/form/components/CustomIdField.tsx +4 -2
  25. package/src/form/components/FieldHelperText.tsx +1 -1
  26. package/src/form/components/LabelWithIcon.tsx +27 -19
  27. package/src/form/components/LabelWithIconAndTooltip.tsx +28 -0
  28. package/src/form/components/StorageItemPreview.tsx +1 -0
  29. package/src/form/components/StorageUploadProgress.tsx +0 -1
  30. package/src/form/components/index.tsx +1 -0
  31. package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +7 -5
  32. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +18 -16
  33. package/src/form/field_bindings/BlockFieldBinding.tsx +7 -5
  34. package/src/form/field_bindings/DateTimeFieldBinding.tsx +17 -14
  35. package/src/form/field_bindings/KeyValueFieldBinding.tsx +3 -2
  36. package/src/form/field_bindings/MapFieldBinding.tsx +10 -16
  37. package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +10 -8
  38. package/src/form/field_bindings/MultiSelectBinding.tsx +7 -5
  39. package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +8 -6
  40. package/src/form/field_bindings/ReferenceFieldBinding.tsx +8 -5
  41. package/src/form/field_bindings/RepeatFieldBinding.tsx +7 -5
  42. package/src/form/field_bindings/SelectFieldBinding.tsx +44 -40
  43. package/src/form/field_bindings/StorageUploadFieldBinding.tsx +7 -5
  44. package/src/form/field_bindings/SwitchFieldBinding.tsx +7 -3
  45. package/src/form/field_bindings/TextFieldBinding.tsx +24 -22
  46. package/src/preview/components/ImagePreview.tsx +3 -1
  47. package/dist/components/PropertyIdCopyTooltipContent.d.ts +0 -3
  48. package/src/components/PropertyIdCopyTooltipContent.tsx +0 -27
package/dist/index.umd.js CHANGED
@@ -4585,25 +4585,33 @@
4585
4585
  }
4586
4586
  ),
4587
4587
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-2 absolute bottom-[-4px] right-[-4px] invisible group-hover:visible", children: [
4588
- navigator && /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Copy url to clipboard", side: "bottom", children: /* @__PURE__ */ jsxRuntime.jsx(
4589
- ui.IconButton,
4588
+ navigator && /* @__PURE__ */ jsxRuntime.jsx(
4589
+ ui.Tooltip,
4590
4590
  {
4591
- variant: "filled",
4592
- size: "small",
4593
- onClick: (e) => {
4594
- e.stopPropagation();
4595
- e.preventDefault();
4596
- return navigator.clipboard.writeText(url);
4597
- },
4591
+ asChild: true,
4592
+ title: "Copy url to clipboard",
4593
+ side: "bottom",
4598
4594
  children: /* @__PURE__ */ jsxRuntime.jsx(
4599
- ui.ContentCopyIcon,
4595
+ ui.IconButton,
4600
4596
  {
4601
- className: "text-gray-700 dark:text-gray-300",
4602
- size: "small"
4597
+ variant: "filled",
4598
+ size: "small",
4599
+ onClick: (e) => {
4600
+ e.stopPropagation();
4601
+ e.preventDefault();
4602
+ return navigator.clipboard.writeText(url);
4603
+ },
4604
+ children: /* @__PURE__ */ jsxRuntime.jsx(
4605
+ ui.ContentCopyIcon,
4606
+ {
4607
+ className: "text-gray-700 dark:text-gray-300",
4608
+ size: "small"
4609
+ }
4610
+ )
4603
4611
  }
4604
4612
  )
4605
4613
  }
4606
- ) }),
4614
+ ),
4607
4615
  /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Open image in new tab", side: "bottom", children: /* @__PURE__ */ jsxRuntime.jsx(
4608
4616
  ui.IconButton,
4609
4617
  {
@@ -5226,34 +5234,28 @@
5226
5234
  );
5227
5235
  })
5228
5236
  ] }),
5229
- entity && includeEntityLink && /* @__PURE__ */ jsxRuntime.jsx(
5230
- ui.Tooltip,
5237
+ entity && includeEntityLink && /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: `See details for ${entity.id}`, children: /* @__PURE__ */ jsxRuntime.jsx(
5238
+ ui.IconButton,
5231
5239
  {
5232
- title: `See details for ${entity.id}`,
5240
+ color: "inherit",
5241
+ size: "small",
5233
5242
  className: size !== "smallest" ? "self-start" : "",
5234
- children: /* @__PURE__ */ jsxRuntime.jsx(
5235
- ui.IconButton,
5236
- {
5237
- color: "inherit",
5238
- size: "small",
5239
- onClick: (e) => {
5240
- e.stopPropagation();
5241
- analyticsController.onAnalyticsEvent?.("entity_click_from_reference", {
5242
- path: entity.path,
5243
- entityId: entity.id
5244
- });
5245
- sideEntityController.open({
5246
- entityId: entity.id,
5247
- path: entity.path,
5248
- collection,
5249
- updateUrl: true
5250
- });
5251
- },
5252
- children: /* @__PURE__ */ jsxRuntime.jsx(ui.KeyboardTabIcon, { size: "small" })
5253
- }
5254
- )
5243
+ onClick: (e) => {
5244
+ e.stopPropagation();
5245
+ analyticsController.onAnalyticsEvent?.("entity_click_from_reference", {
5246
+ path: entity.path,
5247
+ entityId: entity.id
5248
+ });
5249
+ sideEntityController.open({
5250
+ entityId: entity.id,
5251
+ path: entity.path,
5252
+ collection,
5253
+ updateUrl: true
5254
+ });
5255
+ },
5256
+ children: /* @__PURE__ */ jsxRuntime.jsx(ui.KeyboardTabIcon, { size: "small" })
5255
5257
  }
5256
- ),
5258
+ ) }),
5257
5259
  actions
5258
5260
  ]
5259
5261
  }
@@ -6812,7 +6814,14 @@
6812
6814
  )
6813
6815
  ] });
6814
6816
  }
6815
- function EntityTableCellActions({ showError, disabled, showExpandIcon, selected, openPopup, children }) {
6817
+ function EntityTableCellActions({
6818
+ showError,
6819
+ disabled,
6820
+ showExpandIcon,
6821
+ selected,
6822
+ openPopup,
6823
+ children
6824
+ }) {
6816
6825
  const ref = React.useRef(null);
6817
6826
  const doOpenPopup = React.useCallback(() => {
6818
6827
  if (openPopup) {
@@ -6866,14 +6875,22 @@
6866
6875
  ErrorTooltip,
6867
6876
  {
6868
6877
  side: "left",
6869
- className: "flex items-center justify-center",
6870
- style: { width: 32, height: 32 },
6871
6878
  title: showError.message,
6872
6879
  children: /* @__PURE__ */ jsxRuntime.jsx(
6873
- ui.ErrorOutlineIcon,
6880
+ "div",
6874
6881
  {
6875
- size: "small",
6876
- color: "error"
6882
+ className: "flex items-center justify-center",
6883
+ style: {
6884
+ width: 32,
6885
+ height: 32
6886
+ },
6887
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6888
+ ui.ErrorOutlineIcon,
6889
+ {
6890
+ size: "small",
6891
+ color: "error"
6892
+ }
6893
+ )
6877
6894
  }
6878
6895
  )
6879
6896
  }
@@ -8263,26 +8280,34 @@
8263
8280
  },
8264
8281
  children: [
8265
8282
  (hasActions || selectionEnabled) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-34 flex justify-center", children: [
8266
- uncollapsedActions.map((action, index) => /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: action.name, children: /* @__PURE__ */ jsxRuntime.jsx(
8267
- ui.IconButton,
8283
+ uncollapsedActions.map((action, index) => /* @__PURE__ */ jsxRuntime.jsx(
8284
+ ui.Tooltip,
8268
8285
  {
8269
- onClick: (event) => {
8270
- event.stopPropagation();
8271
- action.onClick({
8272
- entity,
8273
- fullPath,
8274
- collection,
8275
- context,
8276
- selectionController,
8277
- highlightEntity,
8278
- unhighlightEntity,
8279
- onCollectionChange
8280
- });
8281
- },
8282
- size: largeLayout ? "medium" : "small",
8283
- children: action.icon
8284
- }
8285
- ) }, index)),
8286
+ title: action.name,
8287
+ asChild: true,
8288
+ children: /* @__PURE__ */ jsxRuntime.jsx(
8289
+ ui.IconButton,
8290
+ {
8291
+ onClick: (event) => {
8292
+ event.stopPropagation();
8293
+ action.onClick({
8294
+ entity,
8295
+ fullPath,
8296
+ collection,
8297
+ context,
8298
+ selectionController,
8299
+ highlightEntity,
8300
+ unhighlightEntity,
8301
+ onCollectionChange
8302
+ });
8303
+ },
8304
+ size: largeLayout ? "medium" : "small",
8305
+ children: action.icon
8306
+ }
8307
+ )
8308
+ },
8309
+ index
8310
+ )),
8286
8311
  hasCollapsedActions && /* @__PURE__ */ jsxRuntime.jsx(
8287
8312
  ui.Menu,
8288
8313
  {
@@ -12780,7 +12805,7 @@
12780
12805
  const [openPopup, setOpenPopup] = React.useState(false);
12781
12806
  const [searchString, setSearchString] = React.useState("");
12782
12807
  const sideEntityController = useSideEntityController();
12783
- return /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: !openPopup ? "Find by ID" : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
12808
+ return /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: !openPopup ? "Find by ID" : void 0, asChild: false, children: /* @__PURE__ */ jsxRuntime.jsx(
12784
12809
  ui.Popover,
12785
12810
  {
12786
12811
  open: openPopup,
@@ -12844,6 +12869,54 @@
12844
12869
  }
12845
12870
  );
12846
12871
  }
12872
+ function PropertyIdCopyTooltip({
12873
+ propertyKey,
12874
+ className,
12875
+ children
12876
+ }) {
12877
+ return /* @__PURE__ */ jsxRuntime.jsx(
12878
+ ui.Tooltip,
12879
+ {
12880
+ title: /* @__PURE__ */ jsxRuntime.jsx(PropertyIdCopyTooltipContent, { propertyKey }),
12881
+ delayDuration: 800,
12882
+ side: "top",
12883
+ asChild: false,
12884
+ align: "start",
12885
+ sideOffset: 8,
12886
+ className,
12887
+ children
12888
+ }
12889
+ );
12890
+ }
12891
+ function PropertyIdCopyTooltipContent({ propertyKey }) {
12892
+ const [copied, setCopied] = React.useState(false);
12893
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-2 items-center justify-center text-white", children: [
12894
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
12895
+ /* @__PURE__ */ jsxRuntime.jsx(
12896
+ ui.Typography,
12897
+ {
12898
+ variant: "caption",
12899
+ className: "min-w-20 text-slate-400",
12900
+ color: "disabled",
12901
+ children: copied ? "Copied" : "Property ID"
12902
+ }
12903
+ ),
12904
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "text-white", children: /* @__PURE__ */ jsxRuntime.jsx("code", { children: propertyKey }) })
12905
+ ] }),
12906
+ /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", children: /* @__PURE__ */ jsxRuntime.jsx(
12907
+ ui.ContentCopyIcon,
12908
+ {
12909
+ size: "smallest",
12910
+ className: "text-white",
12911
+ onClick: React.useCallback(() => {
12912
+ navigator.clipboard.writeText(propertyKey);
12913
+ setCopied(true);
12914
+ setTimeout(() => setCopied(false), 2e3);
12915
+ }, [propertyKey])
12916
+ }
12917
+ ) })
12918
+ ] });
12919
+ }
12847
12920
  function NotFoundPage() {
12848
12921
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full h-full", children: /* @__PURE__ */ jsxRuntime.jsxs(
12849
12922
  "div",
@@ -13149,7 +13222,7 @@
13149
13222
  {
13150
13223
  variant: "subtitle1",
13151
13224
  noWrap: true,
13152
- className: "ml-2 !font-medium",
13225
+ className: ui.cls("!font-medium", drawerOpen ? "ml-2" : ""),
13153
13226
  children: title
13154
13227
  }
13155
13228
  ) : title
@@ -13368,7 +13441,13 @@
13368
13441
  {
13369
13442
  className: "flex items-start",
13370
13443
  children: [
13371
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow w-[calc(100%-48px)] text-text-primary dark:text-text-primary-dark bg-white dark:bg-gray-900 bg-opacity-80 dark:bg-opacity-80", children: buildEntry(index, internalId) }),
13444
+ /* @__PURE__ */ jsxRuntime.jsx(
13445
+ "div",
13446
+ {
13447
+ className: "flex-grow w-[calc(100%-48px)] text-text-primary dark:text-text-primary-dark bg-white dark:bg-gray-900 bg-opacity-80 dark:bg-opacity-80",
13448
+ children: buildEntry(index, internalId)
13449
+ }
13450
+ ),
13372
13451
  /* @__PURE__ */ jsxRuntime.jsx(
13373
13452
  ArrayItemOptions,
13374
13453
  {
@@ -13416,7 +13495,10 @@
13416
13495
  {
13417
13496
  size: "small",
13418
13497
  disabled,
13419
- onClick: () => setMenuOpen(true),
13498
+ onClick: (e) => {
13499
+ e.preventDefault();
13500
+ setMenuOpen(true);
13501
+ },
13420
13502
  onDragStart: (e) => {
13421
13503
  setMenuOpen(false);
13422
13504
  },
@@ -13429,7 +13511,7 @@
13429
13511
  {
13430
13512
  portalContainer: iconRef.current,
13431
13513
  open: menuOpen,
13432
- trigger: /* @__PURE__ */ jsxRuntime.jsx("div", {}),
13514
+ trigger: /* @__PURE__ */ jsxRuntime.jsx("div", { tabIndex: -1 }),
13433
13515
  children: [
13434
13516
  /* @__PURE__ */ jsxRuntime.jsxs(ui.MenuItem, { dense: true, onClick: (e) => {
13435
13517
  setMenuOpen(false);
@@ -13634,16 +13716,24 @@
13634
13716
  }
13635
13717
  ),
13636
13718
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex max-w-full flex-wrap mt-4", children: icons.map((icon) => {
13637
- return /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: icon, children: /* @__PURE__ */ jsxRuntime.jsx(
13638
- ui.IconButton,
13719
+ return /* @__PURE__ */ jsxRuntime.jsx(
13720
+ ui.Tooltip,
13639
13721
  {
13640
- shape: "square",
13641
- toggled: selectedIcon === icon,
13642
- onClick: onIconSelected ? () => onIconSelected(icon) : void 0,
13643
- className: "box-content m-1",
13644
- children: /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { iconKey: icon, size: 24 })
13645
- }
13646
- ) }, icon);
13722
+ title: icon,
13723
+ asChild: true,
13724
+ children: /* @__PURE__ */ jsxRuntime.jsx(
13725
+ ui.IconButton,
13726
+ {
13727
+ shape: "square",
13728
+ toggled: selectedIcon === icon,
13729
+ onClick: onIconSelected ? () => onIconSelected(icon) : void 0,
13730
+ className: "box-content m-1",
13731
+ children: /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { iconKey: icon, size: 24 })
13732
+ }
13733
+ )
13734
+ },
13735
+ icon
13736
+ );
13647
13737
  }) })
13648
13738
  ] });
13649
13739
  }
@@ -13718,6 +13808,7 @@
13718
13808
  {
13719
13809
  title: property.longDescription,
13720
13810
  side: "bottom",
13811
+ asChild: true,
13721
13812
  children: /* @__PURE__ */ jsxRuntime.jsx(
13722
13813
  ui.IconButton,
13723
13814
  {
@@ -13736,29 +13827,40 @@
13736
13827
  )
13737
13828
  ] });
13738
13829
  }
13739
- function LabelWithIcon({
13740
- icon,
13741
- title,
13742
- small,
13830
+ const LabelWithIcon = React.forwardRef(
13831
+ ({
13832
+ icon,
13833
+ title,
13834
+ small,
13835
+ className,
13836
+ required
13837
+ }, ref) => {
13838
+ return /* @__PURE__ */ jsxRuntime.jsxs(
13839
+ "div",
13840
+ {
13841
+ ref,
13842
+ className: `inline-flex items-center my-0.5 ${small ? "gap-1" : "gap-2"} ${className ?? ""}`,
13843
+ children: [
13844
+ icon,
13845
+ /* @__PURE__ */ jsxRuntime.jsx(
13846
+ "span",
13847
+ {
13848
+ className: `text-start font-medium text-${small ? "base" : "sm"} origin-top-left transform ${small ? "translate-x-2 scale-75" : ""}`,
13849
+ children: (title ?? "") + (required ? " *" : "")
13850
+ }
13851
+ )
13852
+ ]
13853
+ }
13854
+ );
13855
+ }
13856
+ );
13857
+ LabelWithIcon.displayName = "LabelWithIcon";
13858
+ function LabelWithIconAndTooltip({
13859
+ propertyKey,
13743
13860
  className,
13744
- required
13861
+ ...props
13745
13862
  }) {
13746
- return /* @__PURE__ */ jsxRuntime.jsxs(
13747
- "span",
13748
- {
13749
- className: `inline-flex items-center my-0.5 ${small ? "gap-1" : "gap-2"} ${className ?? ""}`,
13750
- children: [
13751
- icon,
13752
- /* @__PURE__ */ jsxRuntime.jsx(
13753
- "span",
13754
- {
13755
- className: `text-start font-medium text-${small ? "base" : "sm"} origin-top-left transform ${small ? "translate-x-2 scale-75" : ""}`,
13756
- children: (title ?? "") + (required ? " *" : "")
13757
- }
13758
- )
13759
- ]
13760
- }
13761
- );
13863
+ return /* @__PURE__ */ jsxRuntime.jsx(PropertyIdCopyTooltip, { propertyKey, className, children: /* @__PURE__ */ jsxRuntime.jsx(LabelWithIcon, { ...props }) });
13762
13864
  }
13763
13865
  function SelectFieldBinding({
13764
13866
  propertyKey,
@@ -13785,7 +13887,7 @@
13785
13887
  setValue(null);
13786
13888
  }, [setValue]);
13787
13889
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
13788
- /* @__PURE__ */ jsxRuntime.jsx(
13890
+ /* @__PURE__ */ jsxRuntime.jsx(PropertyIdCopyTooltip, { propertyKey, children: /* @__PURE__ */ jsxRuntime.jsx(
13789
13891
  ui.Select,
13790
13892
  {
13791
13893
  size: size === "medium" ? "medium" : "small",
@@ -13841,7 +13943,7 @@
13841
13943
  );
13842
13944
  })
13843
13945
  }
13844
- ),
13946
+ ) }),
13845
13947
  /* @__PURE__ */ jsxRuntime.jsx(
13846
13948
  FieldHelperText,
13847
13949
  {
@@ -13926,8 +14028,9 @@
13926
14028
  value: validValue ? value.map((v) => v.toString()) : [],
13927
14029
  disabled,
13928
14030
  label: /* @__PURE__ */ jsxRuntime.jsx(
13929
- LabelWithIcon,
14031
+ LabelWithIconAndTooltip,
13930
14032
  {
14033
+ propertyKey,
13931
14034
  icon: getIconForProperty(property, "small"),
13932
14035
  required: property.validation?.required,
13933
14036
  title: property.name,
@@ -14029,8 +14132,9 @@
14029
14132
  }, [ofProperty.path, ofProperty.previewProperties, value]);
14030
14133
  const title = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
14031
14134
  /* @__PURE__ */ jsxRuntime.jsx(
14032
- LabelWithIcon,
14135
+ LabelWithIconAndTooltip,
14033
14136
  {
14137
+ propertyKey,
14034
14138
  icon: getIconForProperty(property, "small"),
14035
14139
  required: property.validation?.required,
14036
14140
  title: property.name,
@@ -14126,6 +14230,7 @@
14126
14230
  children: /* @__PURE__ */ jsxRuntime.jsx(
14127
14231
  ui.Tooltip,
14128
14232
  {
14233
+ asChild: true,
14129
14234
  title: "Remove",
14130
14235
  children: /* @__PURE__ */ jsxRuntime.jsx(
14131
14236
  ui.IconButton,
@@ -14211,8 +14316,9 @@
14211
14316
  });
14212
14317
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
14213
14318
  !minimalistView && /* @__PURE__ */ jsxRuntime.jsx(
14214
- LabelWithIcon,
14319
+ LabelWithIconAndTooltip,
14215
14320
  {
14321
+ propertyKey,
14216
14322
  icon: getIconForProperty(property, "small"),
14217
14323
  required: property.validation?.required,
14218
14324
  title: property.name,
@@ -14568,7 +14674,7 @@
14568
14674
  const isMultiline = Boolean(multiline);
14569
14675
  const inputType = property.dataType === "number" ? "number" : void 0;
14570
14676
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
14571
- /* @__PURE__ */ jsxRuntime.jsx(
14677
+ /* @__PURE__ */ jsxRuntime.jsx(PropertyIdCopyTooltip, { propertyKey, children: /* @__PURE__ */ jsxRuntime.jsx(
14572
14678
  ui.TextField,
14573
14679
  {
14574
14680
  size,
@@ -14596,7 +14702,7 @@
14596
14702
  error: showError ? error : void 0,
14597
14703
  inputClassName: error ? "text-red-500 dark:text-red-600" : ""
14598
14704
  }
14599
- ),
14705
+ ) }),
14600
14706
  /* @__PURE__ */ jsxRuntime.jsx(
14601
14707
  FieldHelperText,
14602
14708
  {
@@ -14642,7 +14748,7 @@
14642
14748
  setValue
14643
14749
  });
14644
14750
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
14645
- /* @__PURE__ */ jsxRuntime.jsx(
14751
+ /* @__PURE__ */ jsxRuntime.jsx(PropertyIdCopyTooltip, { propertyKey, children: /* @__PURE__ */ jsxRuntime.jsx(
14646
14752
  ui.BooleanSwitchWithLabel,
14647
14753
  {
14648
14754
  value,
@@ -14660,7 +14766,7 @@
14660
14766
  autoFocus,
14661
14767
  size
14662
14768
  }
14663
- ),
14769
+ ) }),
14664
14770
  /* @__PURE__ */ jsxRuntime.jsx(
14665
14771
  FieldHelperText,
14666
14772
  {
@@ -14693,7 +14799,7 @@
14693
14799
  setValue
14694
14800
  });
14695
14801
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
14696
- /* @__PURE__ */ jsxRuntime.jsx(
14802
+ /* @__PURE__ */ jsxRuntime.jsx(PropertyIdCopyTooltip, { propertyKey, children: /* @__PURE__ */ jsxRuntime.jsx(
14697
14803
  ui.DateTimeField,
14698
14804
  {
14699
14805
  value: internalValue,
@@ -14713,7 +14819,7 @@
14713
14819
  }
14714
14820
  )
14715
14821
  }
14716
- ),
14822
+ ) }),
14717
14823
  /* @__PURE__ */ jsxRuntime.jsx(
14718
14824
  FieldHelperText,
14719
14825
  {
@@ -14740,8 +14846,9 @@
14740
14846
  throw new Error("ReadOnlyFieldBinding: Entity id is null");
14741
14847
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
14742
14848
  !minimalistView && /* @__PURE__ */ jsxRuntime.jsx(
14743
- LabelWithIcon,
14849
+ LabelWithIconAndTooltip,
14744
14850
  {
14851
+ propertyKey,
14745
14852
  icon: getIconForProperty(property, "small"),
14746
14853
  required: property.validation?.required,
14747
14854
  title: property.name,
@@ -14781,6 +14888,7 @@
14781
14888
  return /* @__PURE__ */ jsxRuntime.jsx(ReferenceFieldBindingInternal, { ...props });
14782
14889
  }
14783
14890
  function ReferenceFieldBindingInternal({
14891
+ propertyKey,
14784
14892
  value,
14785
14893
  setValue,
14786
14894
  error,
@@ -14829,8 +14937,9 @@
14829
14937
  }, [referenceDialogController]);
14830
14938
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
14831
14939
  !minimalistView && /* @__PURE__ */ jsxRuntime.jsx(
14832
- LabelWithIcon,
14940
+ LabelWithIconAndTooltip,
14833
14941
  {
14942
+ propertyKey,
14834
14943
  icon: getIconForProperty(property, "small"),
14835
14944
  required: property.validation?.required,
14836
14945
  title: property.name,
@@ -15163,8 +15272,9 @@
15163
15272
  }
15164
15273
  ) }) });
15165
15274
  const title = /* @__PURE__ */ jsxRuntime.jsx(
15166
- LabelWithIcon,
15275
+ LabelWithIconAndTooltip,
15167
15276
  {
15277
+ propertyKey,
15168
15278
  icon: getIconForProperty(property, "small"),
15169
15279
  required: property.validation?.required,
15170
15280
  title: property.name,
@@ -15224,8 +15334,9 @@
15224
15334
  }
15225
15335
  );
15226
15336
  const title = /* @__PURE__ */ jsxRuntime.jsx(
15227
- LabelWithIcon,
15337
+ LabelWithIconAndTooltip,
15228
15338
  {
15339
+ propertyKey,
15229
15340
  icon: getIconForProperty(property, "small"),
15230
15341
  required: property.validation?.required,
15231
15342
  title: property.name,
@@ -15877,12 +15988,13 @@
15877
15988
  );
15878
15989
  const title = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
15879
15990
  /* @__PURE__ */ jsxRuntime.jsx(
15880
- LabelWithIcon,
15991
+ LabelWithIconAndTooltip,
15881
15992
  {
15993
+ propertyKey,
15882
15994
  icon: getIconForProperty(property, "small"),
15883
15995
  required: property.validation?.required,
15884
15996
  title: property.name,
15885
- className: "flex-grow text-text-secondary dark:text-text-secondary-dark"
15997
+ className: "flex flex-grow text-text-secondary dark:text-text-secondary-dark"
15886
15998
  }
15887
15999
  ),
15888
16000
  Array.isArray(value) && /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "caption", className: "px-4", children: [
@@ -15955,8 +16067,9 @@
15955
16067
  );
15956
16068
  }, [context, lastAddedId, property.oneOf, propertyKey, value]);
15957
16069
  const title = /* @__PURE__ */ jsxRuntime.jsx(
15958
- LabelWithIcon,
16070
+ LabelWithIconAndTooltip,
15959
16071
  {
16072
+ propertyKey,
15960
16073
  icon: getIconForProperty(property, "small"),
15961
16074
  required: property.validation?.required,
15962
16075
  title: property.name,
@@ -16200,15 +16313,16 @@
16200
16313
  return editor$1;
16201
16314
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
16202
16315
  /* @__PURE__ */ jsxRuntime.jsx(
16203
- LabelWithIcon,
16316
+ LabelWithIconAndTooltip,
16204
16317
  {
16318
+ propertyKey,
16205
16319
  icon: getIconForProperty(property, "small"),
16206
16320
  required: property.validation?.required,
16207
16321
  title: property.name,
16208
16322
  className: "text-text-secondary dark:text-text-secondary-dark ml-3.5"
16209
16323
  }
16210
16324
  ),
16211
- /* @__PURE__ */ jsxRuntime.jsx(ui.Paper, { children: editor$1 }),
16325
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cls("rounded-md", ui.fieldBackgroundMixin, ui.fieldBackgroundHoverMixin), children: editor$1 }),
16212
16326
  /* @__PURE__ */ jsxRuntime.jsx(
16213
16327
  FieldHelperText,
16214
16328
  {
@@ -16244,8 +16358,9 @@
16244
16358
  });
16245
16359
  const title = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
16246
16360
  /* @__PURE__ */ jsxRuntime.jsx(
16247
- LabelWithIcon,
16361
+ LabelWithIconAndTooltip,
16248
16362
  {
16363
+ propertyKey,
16249
16364
  icon: getIconForProperty(property, "small"),
16250
16365
  required: property.validation?.required,
16251
16366
  title: property.name,
@@ -17012,26 +17127,40 @@
17012
17127
  name: "id",
17013
17128
  value: (entity && status === "existing" ? entity.id : entityId) ?? "",
17014
17129
  endAdornment: loading ? /* @__PURE__ */ jsxRuntime.jsx(ui.CircularProgress, { size: "small" }) : entity ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
17015
- /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Copy", children: /* @__PURE__ */ jsxRuntime.jsx(
17016
- ui.IconButton,
17130
+ /* @__PURE__ */ jsxRuntime.jsx(
17131
+ ui.Tooltip,
17017
17132
  {
17018
- onClick: (e) => copy(entity.id),
17019
- "aria-label": "copy-id",
17020
- children: /* @__PURE__ */ jsxRuntime.jsx(ui.ContentCopyIcon, { size: "small" })
17133
+ title: "Copy",
17134
+ asChild: true,
17135
+ children: /* @__PURE__ */ jsxRuntime.jsx(
17136
+ ui.IconButton,
17137
+ {
17138
+ onClick: (e) => copy(entity.id),
17139
+ "aria-label": "copy-id",
17140
+ children: /* @__PURE__ */ jsxRuntime.jsx(ui.ContentCopyIcon, { size: "small" })
17141
+ }
17142
+ )
17021
17143
  }
17022
- ) }),
17023
- customizationController?.entityLinkBuilder && /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Open in the console", children: /* @__PURE__ */ jsxRuntime.jsx(
17024
- ui.IconButton,
17144
+ ),
17145
+ customizationController?.entityLinkBuilder && /* @__PURE__ */ jsxRuntime.jsx(
17146
+ ui.Tooltip,
17025
17147
  {
17026
- component: "a",
17027
- href: customizationController.entityLinkBuilder({ entity }),
17028
- rel: "noopener noreferrer",
17029
- target: "_blank",
17030
- onClick: (e) => e.stopPropagation(),
17031
- "aria-label": "go-to-datasource",
17032
- children: /* @__PURE__ */ jsxRuntime.jsx(ui.OpenInNewIcon, { size: "small" })
17148
+ title: "Open in the console",
17149
+ asChild: true,
17150
+ children: /* @__PURE__ */ jsxRuntime.jsx(
17151
+ ui.IconButton,
17152
+ {
17153
+ component: "a",
17154
+ href: customizationController.entityLinkBuilder({ entity }),
17155
+ rel: "noopener noreferrer",
17156
+ target: "_blank",
17157
+ onClick: (e) => e.stopPropagation(),
17158
+ "aria-label": "go-to-datasource",
17159
+ children: /* @__PURE__ */ jsxRuntime.jsx(ui.OpenInNewIcon, { size: "small" })
17160
+ }
17161
+ )
17033
17162
  }
17034
- ) })
17163
+ )
17035
17164
  ] }) : void 0
17036
17165
  };
17037
17166
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -17121,35 +17250,6 @@
17121
17250
  const getScrollableParent = (ele) => {
17122
17251
  return !ele || ele === document.body ? document.body : isScrollable(ele) ? ele : getScrollableParent(ele.parentNode);
17123
17252
  };
17124
- function PropertyIdCopyTooltipContent({ propertyId }) {
17125
- const [copied, setCopied] = React.useState(false);
17126
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-2 items-center justify-center text-white", children: [
17127
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
17128
- /* @__PURE__ */ jsxRuntime.jsx(
17129
- ui.Typography,
17130
- {
17131
- variant: "caption",
17132
- className: "min-w-20 text-slate-400",
17133
- color: "disabled",
17134
- children: copied ? "Copied" : "Property ID"
17135
- }
17136
- ),
17137
- /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "text-white", children: /* @__PURE__ */ jsxRuntime.jsx("code", { children: propertyId }) })
17138
- ] }),
17139
- /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", children: /* @__PURE__ */ jsxRuntime.jsx(
17140
- ui.ContentCopyIcon,
17141
- {
17142
- size: "smallest",
17143
- className: "text-white",
17144
- onClick: React.useCallback(() => {
17145
- navigator.clipboard.writeText(propertyId);
17146
- setCopied(true);
17147
- setTimeout(() => setCopied(false), 2e3);
17148
- }, [propertyId])
17149
- }
17150
- ) })
17151
- ] });
17152
- }
17153
17253
  const MAIN_TAB_VALUE = "main_##Q$SC^#S6";
17154
17254
  function EntityEditView({
17155
17255
  entityId,
@@ -17676,17 +17776,7 @@
17676
17776
  "div",
17677
17777
  {
17678
17778
  id: `form_field_${key}`,
17679
- children: /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(
17680
- ui.Tooltip,
17681
- {
17682
- title: /* @__PURE__ */ jsxRuntime.jsx(PropertyIdCopyTooltipContent, { propertyId: key }),
17683
- delayDuration: 800,
17684
- side: "left",
17685
- align: "start",
17686
- sideOffset: 16,
17687
- children: /* @__PURE__ */ jsxRuntime.jsx(PropertyFieldBinding, { ...cmsFormFieldProps })
17688
- }
17689
- ) })
17779
+ children: /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(PropertyFieldBinding, { ...cmsFormFieldProps }) })
17690
17780
  },
17691
17781
  `field_${resolvedCollection.name}_${key}`
17692
17782
  );
@@ -17703,8 +17793,9 @@
17703
17793
  }) });
17704
17794
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
17705
17795
  /* @__PURE__ */ jsxRuntime.jsx(
17706
- LabelWithIcon,
17796
+ LabelWithIconAndTooltip,
17707
17797
  {
17798
+ propertyKey: key,
17708
17799
  icon: /* @__PURE__ */ jsxRuntime.jsx(ui.NotesIcon, { size: "small" }),
17709
17800
  title: additionalField.name,
17710
17801
  className: "text-text-secondary dark:text-text-secondary-dark ml-3.5"
@@ -19113,16 +19204,22 @@
19113
19204
  title: "Open menu",
19114
19205
  side: "right",
19115
19206
  sideOffset: 12,
19116
- className: "fixed top-2 left-3 !bg-gray-50 dark:!bg-gray-900 rounded-full w-fit z-20",
19207
+ asChild: true,
19117
19208
  children: /* @__PURE__ */ jsxRuntime.jsx(
19118
- ui.IconButton,
19209
+ "div",
19119
19210
  {
19120
- color: "inherit",
19121
- "aria-label": "Open menu",
19122
- className: "sticky top-2 left-3 ",
19123
- onClick: () => props.setDrawerOpen(true),
19124
- size: "large",
19125
- children: /* @__PURE__ */ jsxRuntime.jsx(ui.MenuIcon, {})
19211
+ className: "fixed top-2 left-3 !bg-gray-50 dark:!bg-gray-900 rounded-full w-fit z-20",
19212
+ children: /* @__PURE__ */ jsxRuntime.jsx(
19213
+ ui.IconButton,
19214
+ {
19215
+ color: "inherit",
19216
+ "aria-label": "Open menu",
19217
+ className: "sticky top-2 left-3 ",
19218
+ onClick: () => props.setDrawerOpen(true),
19219
+ size: "large",
19220
+ children: /* @__PURE__ */ jsxRuntime.jsx(ui.MenuIcon, {})
19221
+ }
19222
+ )
19126
19223
  }
19127
19224
  )
19128
19225
  }
@@ -19205,7 +19302,7 @@
19205
19302
  children: icon
19206
19303
  }
19207
19304
  );
19208
- const listItem = /* @__PURE__ */ jsxRuntime.jsxs(
19305
+ const listItem = /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(
19209
19306
  reactRouterDom.NavLink,
19210
19307
  {
19211
19308
  onClick,
@@ -19238,7 +19335,7 @@
19238
19335
  )
19239
19336
  ]
19240
19337
  }
19241
- );
19338
+ ) });
19242
19339
  return /* @__PURE__ */ jsxRuntime.jsx(
19243
19340
  ui.Tooltip,
19244
19341
  {
@@ -19566,6 +19663,7 @@
19566
19663
  exports2.KeyValueFieldBinding = KeyValueFieldBinding;
19567
19664
  exports2.KeyValuePreview = KeyValuePreview;
19568
19665
  exports2.LabelWithIcon = LabelWithIcon;
19666
+ exports2.LabelWithIconAndTooltip = LabelWithIconAndTooltip;
19569
19667
  exports2.MapFieldBinding = MapFieldBinding;
19570
19668
  exports2.MapPropertyPreview = MapPropertyPreview;
19571
19669
  exports2.MarkdownEditorFieldBinding = MarkdownEditorFieldBinding;
@@ -19580,6 +19678,8 @@
19580
19678
  exports2.NumberPropertyPreview = NumberPropertyPreview;
19581
19679
  exports2.PropertyConfigBadge = PropertyConfigBadge;
19582
19680
  exports2.PropertyFieldBinding = PropertyFieldBinding;
19681
+ exports2.PropertyIdCopyTooltip = PropertyIdCopyTooltip;
19682
+ exports2.PropertyIdCopyTooltipContent = PropertyIdCopyTooltipContent;
19583
19683
  exports2.PropertyPreview = PropertyPreview;
19584
19684
  exports2.PropertyTableCell = PropertyTableCell;
19585
19685
  exports2.ReadOnlyFieldBinding = ReadOnlyFieldBinding;