@firecms/core 3.0.0-canary.108 → 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.
- package/dist/components/PropertyIdCopyTooltip.d.ts +8 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/form/components/LabelWithIcon.d.ts +1 -1
- package/dist/form/components/LabelWithIconAndTooltip.d.ts +15 -0
- package/dist/form/components/index.d.ts +1 -0
- package/dist/index.es.js +285 -185
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +285 -185
- package/dist/index.umd.js.map +1 -1
- package/package.json +5 -5
- package/src/app/Scaffold.tsx +13 -10
- package/src/components/ArrayContainer.tsx +9 -7
- package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +3 -1
- package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +1 -1
- package/src/components/EntityCollectionTable/internal/EntityTableCellActions.tsx +19 -7
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +1 -1
- package/src/components/EntityPreview.tsx +2 -2
- package/src/components/PropertyIdCopyTooltip.tsx +48 -0
- package/src/components/SearchIconsView.tsx +2 -1
- package/src/components/index.tsx +1 -0
- package/src/core/DefaultAppBar.tsx +1 -1
- package/src/core/DrawerNavigationItem.tsx +28 -26
- package/src/core/EntityEditView.tsx +7 -13
- package/src/form/components/CustomIdField.tsx +4 -2
- package/src/form/components/FieldHelperText.tsx +1 -1
- package/src/form/components/LabelWithIcon.tsx +27 -19
- package/src/form/components/LabelWithIconAndTooltip.tsx +28 -0
- package/src/form/components/StorageItemPreview.tsx +1 -0
- package/src/form/components/StorageUploadProgress.tsx +0 -1
- package/src/form/components/index.tsx +1 -0
- package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +7 -5
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +18 -16
- package/src/form/field_bindings/BlockFieldBinding.tsx +7 -5
- package/src/form/field_bindings/DateTimeFieldBinding.tsx +17 -14
- package/src/form/field_bindings/KeyValueFieldBinding.tsx +3 -2
- package/src/form/field_bindings/MapFieldBinding.tsx +10 -16
- package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +7 -5
- package/src/form/field_bindings/MultiSelectBinding.tsx +7 -5
- package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +8 -6
- package/src/form/field_bindings/ReferenceFieldBinding.tsx +8 -5
- package/src/form/field_bindings/RepeatFieldBinding.tsx +7 -5
- package/src/form/field_bindings/SelectFieldBinding.tsx +44 -40
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +7 -5
- package/src/form/field_bindings/SwitchFieldBinding.tsx +7 -3
- package/src/form/field_bindings/TextFieldBinding.tsx +24 -22
- package/src/preview/components/ImagePreview.tsx +3 -1
- package/dist/components/PropertyIdCopyTooltipContent.d.ts +0 -3
- package/src/components/PropertyIdCopyTooltipContent.tsx +0 -27
package/dist/index.es.js
CHANGED
|
@@ -4581,25 +4581,33 @@ function ImagePreview({
|
|
|
4581
4581
|
}
|
|
4582
4582
|
),
|
|
4583
4583
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-row gap-2 absolute bottom-[-4px] right-[-4px] invisible group-hover:visible", children: [
|
|
4584
|
-
navigator && /* @__PURE__ */ jsx(
|
|
4585
|
-
|
|
4584
|
+
navigator && /* @__PURE__ */ jsx(
|
|
4585
|
+
Tooltip,
|
|
4586
4586
|
{
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
e.stopPropagation();
|
|
4591
|
-
e.preventDefault();
|
|
4592
|
-
return navigator.clipboard.writeText(url);
|
|
4593
|
-
},
|
|
4587
|
+
asChild: true,
|
|
4588
|
+
title: "Copy url to clipboard",
|
|
4589
|
+
side: "bottom",
|
|
4594
4590
|
children: /* @__PURE__ */ jsx(
|
|
4595
|
-
|
|
4591
|
+
IconButton,
|
|
4596
4592
|
{
|
|
4597
|
-
|
|
4598
|
-
size: "small"
|
|
4593
|
+
variant: "filled",
|
|
4594
|
+
size: "small",
|
|
4595
|
+
onClick: (e) => {
|
|
4596
|
+
e.stopPropagation();
|
|
4597
|
+
e.preventDefault();
|
|
4598
|
+
return navigator.clipboard.writeText(url);
|
|
4599
|
+
},
|
|
4600
|
+
children: /* @__PURE__ */ jsx(
|
|
4601
|
+
ContentCopyIcon,
|
|
4602
|
+
{
|
|
4603
|
+
className: "text-gray-700 dark:text-gray-300",
|
|
4604
|
+
size: "small"
|
|
4605
|
+
}
|
|
4606
|
+
)
|
|
4599
4607
|
}
|
|
4600
4608
|
)
|
|
4601
4609
|
}
|
|
4602
|
-
)
|
|
4610
|
+
),
|
|
4603
4611
|
/* @__PURE__ */ jsx(Tooltip, { title: "Open image in new tab", side: "bottom", children: /* @__PURE__ */ jsx(
|
|
4604
4612
|
IconButton,
|
|
4605
4613
|
{
|
|
@@ -5222,34 +5230,28 @@ function EntityPreview({
|
|
|
5222
5230
|
);
|
|
5223
5231
|
})
|
|
5224
5232
|
] }),
|
|
5225
|
-
entity && includeEntityLink && /* @__PURE__ */ jsx(
|
|
5226
|
-
|
|
5233
|
+
entity && includeEntityLink && /* @__PURE__ */ jsx(Tooltip, { title: `See details for ${entity.id}`, children: /* @__PURE__ */ jsx(
|
|
5234
|
+
IconButton,
|
|
5227
5235
|
{
|
|
5228
|
-
|
|
5236
|
+
color: "inherit",
|
|
5237
|
+
size: "small",
|
|
5229
5238
|
className: size !== "smallest" ? "self-start" : "",
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
{
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
collection,
|
|
5245
|
-
updateUrl: true
|
|
5246
|
-
});
|
|
5247
|
-
},
|
|
5248
|
-
children: /* @__PURE__ */ jsx(KeyboardTabIcon, { size: "small" })
|
|
5249
|
-
}
|
|
5250
|
-
)
|
|
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__ */ jsx(KeyboardTabIcon, { size: "small" })
|
|
5251
5253
|
}
|
|
5252
|
-
),
|
|
5254
|
+
) }),
|
|
5253
5255
|
actions
|
|
5254
5256
|
]
|
|
5255
5257
|
}
|
|
@@ -6808,7 +6810,14 @@ function StorageUploadProgress({
|
|
|
6808
6810
|
)
|
|
6809
6811
|
] });
|
|
6810
6812
|
}
|
|
6811
|
-
function EntityTableCellActions({
|
|
6813
|
+
function EntityTableCellActions({
|
|
6814
|
+
showError,
|
|
6815
|
+
disabled,
|
|
6816
|
+
showExpandIcon,
|
|
6817
|
+
selected,
|
|
6818
|
+
openPopup,
|
|
6819
|
+
children
|
|
6820
|
+
}) {
|
|
6812
6821
|
const ref = useRef(null);
|
|
6813
6822
|
const doOpenPopup = useCallback(() => {
|
|
6814
6823
|
if (openPopup) {
|
|
@@ -6862,14 +6871,22 @@ function EntityTableCellActions({ showError, disabled, showExpandIcon, selected,
|
|
|
6862
6871
|
ErrorTooltip,
|
|
6863
6872
|
{
|
|
6864
6873
|
side: "left",
|
|
6865
|
-
className: "flex items-center justify-center",
|
|
6866
|
-
style: { width: 32, height: 32 },
|
|
6867
6874
|
title: showError.message,
|
|
6868
6875
|
children: /* @__PURE__ */ jsx(
|
|
6869
|
-
|
|
6876
|
+
"div",
|
|
6870
6877
|
{
|
|
6871
|
-
|
|
6872
|
-
|
|
6878
|
+
className: "flex items-center justify-center",
|
|
6879
|
+
style: {
|
|
6880
|
+
width: 32,
|
|
6881
|
+
height: 32
|
|
6882
|
+
},
|
|
6883
|
+
children: /* @__PURE__ */ jsx(
|
|
6884
|
+
ErrorOutlineIcon,
|
|
6885
|
+
{
|
|
6886
|
+
size: "small",
|
|
6887
|
+
color: "error"
|
|
6888
|
+
}
|
|
6889
|
+
)
|
|
6873
6890
|
}
|
|
6874
6891
|
)
|
|
6875
6892
|
}
|
|
@@ -8259,26 +8276,34 @@ const EntityCollectionRowActions = function EntityCollectionRowActions2({
|
|
|
8259
8276
|
},
|
|
8260
8277
|
children: [
|
|
8261
8278
|
(hasActions || selectionEnabled) && /* @__PURE__ */ jsxs("div", { className: "w-34 flex justify-center", children: [
|
|
8262
|
-
uncollapsedActions.map((action, index) => /* @__PURE__ */ jsx(
|
|
8263
|
-
|
|
8279
|
+
uncollapsedActions.map((action, index) => /* @__PURE__ */ jsx(
|
|
8280
|
+
Tooltip,
|
|
8264
8281
|
{
|
|
8265
|
-
|
|
8266
|
-
|
|
8267
|
-
|
|
8268
|
-
|
|
8269
|
-
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
|
|
8277
|
-
|
|
8278
|
-
|
|
8279
|
-
|
|
8280
|
-
|
|
8281
|
-
|
|
8282
|
+
title: action.name,
|
|
8283
|
+
asChild: true,
|
|
8284
|
+
children: /* @__PURE__ */ jsx(
|
|
8285
|
+
IconButton,
|
|
8286
|
+
{
|
|
8287
|
+
onClick: (event) => {
|
|
8288
|
+
event.stopPropagation();
|
|
8289
|
+
action.onClick({
|
|
8290
|
+
entity,
|
|
8291
|
+
fullPath,
|
|
8292
|
+
collection,
|
|
8293
|
+
context,
|
|
8294
|
+
selectionController,
|
|
8295
|
+
highlightEntity,
|
|
8296
|
+
unhighlightEntity,
|
|
8297
|
+
onCollectionChange
|
|
8298
|
+
});
|
|
8299
|
+
},
|
|
8300
|
+
size: largeLayout ? "medium" : "small",
|
|
8301
|
+
children: action.icon
|
|
8302
|
+
}
|
|
8303
|
+
)
|
|
8304
|
+
},
|
|
8305
|
+
index
|
|
8306
|
+
)),
|
|
8282
8307
|
hasCollapsedActions && /* @__PURE__ */ jsx(
|
|
8283
8308
|
Menu,
|
|
8284
8309
|
{
|
|
@@ -12776,7 +12801,7 @@ function EntityIdHeaderWidget({
|
|
|
12776
12801
|
const [openPopup, setOpenPopup] = React__default.useState(false);
|
|
12777
12802
|
const [searchString, setSearchString] = React__default.useState("");
|
|
12778
12803
|
const sideEntityController = useSideEntityController();
|
|
12779
|
-
return /* @__PURE__ */ jsx(Tooltip, { title: !openPopup ? "Find by ID" : void 0, children: /* @__PURE__ */ jsx(
|
|
12804
|
+
return /* @__PURE__ */ jsx(Tooltip, { title: !openPopup ? "Find by ID" : void 0, asChild: false, children: /* @__PURE__ */ jsx(
|
|
12780
12805
|
Popover,
|
|
12781
12806
|
{
|
|
12782
12807
|
open: openPopup,
|
|
@@ -12840,6 +12865,54 @@ function PropertyConfigBadge({ propertyConfig }) {
|
|
|
12840
12865
|
}
|
|
12841
12866
|
);
|
|
12842
12867
|
}
|
|
12868
|
+
function PropertyIdCopyTooltip({
|
|
12869
|
+
propertyKey,
|
|
12870
|
+
className,
|
|
12871
|
+
children
|
|
12872
|
+
}) {
|
|
12873
|
+
return /* @__PURE__ */ jsx(
|
|
12874
|
+
Tooltip,
|
|
12875
|
+
{
|
|
12876
|
+
title: /* @__PURE__ */ jsx(PropertyIdCopyTooltipContent, { propertyKey }),
|
|
12877
|
+
delayDuration: 800,
|
|
12878
|
+
side: "top",
|
|
12879
|
+
asChild: false,
|
|
12880
|
+
align: "start",
|
|
12881
|
+
sideOffset: 8,
|
|
12882
|
+
className,
|
|
12883
|
+
children
|
|
12884
|
+
}
|
|
12885
|
+
);
|
|
12886
|
+
}
|
|
12887
|
+
function PropertyIdCopyTooltipContent({ propertyKey }) {
|
|
12888
|
+
const [copied, setCopied] = useState(false);
|
|
12889
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-row gap-2 items-center justify-center text-white", children: [
|
|
12890
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
12891
|
+
/* @__PURE__ */ jsx(
|
|
12892
|
+
Typography,
|
|
12893
|
+
{
|
|
12894
|
+
variant: "caption",
|
|
12895
|
+
className: "min-w-20 text-slate-400",
|
|
12896
|
+
color: "disabled",
|
|
12897
|
+
children: copied ? "Copied" : "Property ID"
|
|
12898
|
+
}
|
|
12899
|
+
),
|
|
12900
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-white", children: /* @__PURE__ */ jsx("code", { children: propertyKey }) })
|
|
12901
|
+
] }),
|
|
12902
|
+
/* @__PURE__ */ jsx(IconButton, { size: "small", children: /* @__PURE__ */ jsx(
|
|
12903
|
+
ContentCopyIcon,
|
|
12904
|
+
{
|
|
12905
|
+
size: "smallest",
|
|
12906
|
+
className: "text-white",
|
|
12907
|
+
onClick: useCallback(() => {
|
|
12908
|
+
navigator.clipboard.writeText(propertyKey);
|
|
12909
|
+
setCopied(true);
|
|
12910
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
12911
|
+
}, [propertyKey])
|
|
12912
|
+
}
|
|
12913
|
+
) })
|
|
12914
|
+
] });
|
|
12915
|
+
}
|
|
12843
12916
|
function NotFoundPage() {
|
|
12844
12917
|
return /* @__PURE__ */ jsx("div", { className: "flex w-full h-full", children: /* @__PURE__ */ jsxs(
|
|
12845
12918
|
"div",
|
|
@@ -13145,7 +13218,7 @@ const DefaultAppBar = function DefaultAppBar2({
|
|
|
13145
13218
|
{
|
|
13146
13219
|
variant: "subtitle1",
|
|
13147
13220
|
noWrap: true,
|
|
13148
|
-
className: "
|
|
13221
|
+
className: cls("!font-medium", drawerOpen ? "ml-2" : ""),
|
|
13149
13222
|
children: title
|
|
13150
13223
|
}
|
|
13151
13224
|
) : title
|
|
@@ -13364,7 +13437,13 @@ function ArrayContainerItem({
|
|
|
13364
13437
|
{
|
|
13365
13438
|
className: "flex items-start",
|
|
13366
13439
|
children: [
|
|
13367
|
-
/* @__PURE__ */ jsx(
|
|
13440
|
+
/* @__PURE__ */ jsx(
|
|
13441
|
+
"div",
|
|
13442
|
+
{
|
|
13443
|
+
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",
|
|
13444
|
+
children: buildEntry(index, internalId)
|
|
13445
|
+
}
|
|
13446
|
+
),
|
|
13368
13447
|
/* @__PURE__ */ jsx(
|
|
13369
13448
|
ArrayItemOptions,
|
|
13370
13449
|
{
|
|
@@ -13412,7 +13491,10 @@ function ArrayItemOptions({
|
|
|
13412
13491
|
{
|
|
13413
13492
|
size: "small",
|
|
13414
13493
|
disabled,
|
|
13415
|
-
onClick: () =>
|
|
13494
|
+
onClick: (e) => {
|
|
13495
|
+
e.preventDefault();
|
|
13496
|
+
setMenuOpen(true);
|
|
13497
|
+
},
|
|
13416
13498
|
onDragStart: (e) => {
|
|
13417
13499
|
setMenuOpen(false);
|
|
13418
13500
|
},
|
|
@@ -13425,7 +13507,7 @@ function ArrayItemOptions({
|
|
|
13425
13507
|
{
|
|
13426
13508
|
portalContainer: iconRef.current,
|
|
13427
13509
|
open: menuOpen,
|
|
13428
|
-
trigger: /* @__PURE__ */ jsx("div", {}),
|
|
13510
|
+
trigger: /* @__PURE__ */ jsx("div", { tabIndex: -1 }),
|
|
13429
13511
|
children: [
|
|
13430
13512
|
/* @__PURE__ */ jsxs(MenuItem, { dense: true, onClick: (e) => {
|
|
13431
13513
|
setMenuOpen(false);
|
|
@@ -13630,16 +13712,24 @@ function SearchIconsView({
|
|
|
13630
13712
|
}
|
|
13631
13713
|
),
|
|
13632
13714
|
/* @__PURE__ */ jsx("div", { className: "flex max-w-full flex-wrap mt-4", children: icons.map((icon) => {
|
|
13633
|
-
return /* @__PURE__ */ jsx(
|
|
13634
|
-
|
|
13715
|
+
return /* @__PURE__ */ jsx(
|
|
13716
|
+
Tooltip,
|
|
13635
13717
|
{
|
|
13636
|
-
|
|
13637
|
-
|
|
13638
|
-
|
|
13639
|
-
|
|
13640
|
-
|
|
13641
|
-
|
|
13642
|
-
|
|
13718
|
+
title: icon,
|
|
13719
|
+
asChild: true,
|
|
13720
|
+
children: /* @__PURE__ */ jsx(
|
|
13721
|
+
IconButton,
|
|
13722
|
+
{
|
|
13723
|
+
shape: "square",
|
|
13724
|
+
toggled: selectedIcon === icon,
|
|
13725
|
+
onClick: onIconSelected ? () => onIconSelected(icon) : void 0,
|
|
13726
|
+
className: "box-content m-1",
|
|
13727
|
+
children: /* @__PURE__ */ jsx(Icon, { iconKey: icon, size: 24 })
|
|
13728
|
+
}
|
|
13729
|
+
)
|
|
13730
|
+
},
|
|
13731
|
+
icon
|
|
13732
|
+
);
|
|
13643
13733
|
}) })
|
|
13644
13734
|
] });
|
|
13645
13735
|
}
|
|
@@ -13714,6 +13804,7 @@ function FieldHelperText({
|
|
|
13714
13804
|
{
|
|
13715
13805
|
title: property.longDescription,
|
|
13716
13806
|
side: "bottom",
|
|
13807
|
+
asChild: true,
|
|
13717
13808
|
children: /* @__PURE__ */ jsx(
|
|
13718
13809
|
IconButton,
|
|
13719
13810
|
{
|
|
@@ -13732,29 +13823,40 @@ function FieldHelperText({
|
|
|
13732
13823
|
)
|
|
13733
13824
|
] });
|
|
13734
13825
|
}
|
|
13735
|
-
|
|
13736
|
-
|
|
13737
|
-
|
|
13738
|
-
|
|
13826
|
+
const LabelWithIcon = forwardRef(
|
|
13827
|
+
({
|
|
13828
|
+
icon,
|
|
13829
|
+
title,
|
|
13830
|
+
small,
|
|
13831
|
+
className,
|
|
13832
|
+
required
|
|
13833
|
+
}, ref) => {
|
|
13834
|
+
return /* @__PURE__ */ jsxs(
|
|
13835
|
+
"div",
|
|
13836
|
+
{
|
|
13837
|
+
ref,
|
|
13838
|
+
className: `inline-flex items-center my-0.5 ${small ? "gap-1" : "gap-2"} ${className ?? ""}`,
|
|
13839
|
+
children: [
|
|
13840
|
+
icon,
|
|
13841
|
+
/* @__PURE__ */ jsx(
|
|
13842
|
+
"span",
|
|
13843
|
+
{
|
|
13844
|
+
className: `text-start font-medium text-${small ? "base" : "sm"} origin-top-left transform ${small ? "translate-x-2 scale-75" : ""}`,
|
|
13845
|
+
children: (title ?? "") + (required ? " *" : "")
|
|
13846
|
+
}
|
|
13847
|
+
)
|
|
13848
|
+
]
|
|
13849
|
+
}
|
|
13850
|
+
);
|
|
13851
|
+
}
|
|
13852
|
+
);
|
|
13853
|
+
LabelWithIcon.displayName = "LabelWithIcon";
|
|
13854
|
+
function LabelWithIconAndTooltip({
|
|
13855
|
+
propertyKey,
|
|
13739
13856
|
className,
|
|
13740
|
-
|
|
13857
|
+
...props
|
|
13741
13858
|
}) {
|
|
13742
|
-
return /* @__PURE__ */
|
|
13743
|
-
"span",
|
|
13744
|
-
{
|
|
13745
|
-
className: `inline-flex items-center my-0.5 ${small ? "gap-1" : "gap-2"} ${className ?? ""}`,
|
|
13746
|
-
children: [
|
|
13747
|
-
icon,
|
|
13748
|
-
/* @__PURE__ */ jsx(
|
|
13749
|
-
"span",
|
|
13750
|
-
{
|
|
13751
|
-
className: `text-start font-medium text-${small ? "base" : "sm"} origin-top-left transform ${small ? "translate-x-2 scale-75" : ""}`,
|
|
13752
|
-
children: (title ?? "") + (required ? " *" : "")
|
|
13753
|
-
}
|
|
13754
|
-
)
|
|
13755
|
-
]
|
|
13756
|
-
}
|
|
13757
|
-
);
|
|
13859
|
+
return /* @__PURE__ */ jsx(PropertyIdCopyTooltip, { propertyKey, className, children: /* @__PURE__ */ jsx(LabelWithIcon, { ...props }) });
|
|
13758
13860
|
}
|
|
13759
13861
|
function SelectFieldBinding({
|
|
13760
13862
|
propertyKey,
|
|
@@ -13781,7 +13883,7 @@ function SelectFieldBinding({
|
|
|
13781
13883
|
setValue(null);
|
|
13782
13884
|
}, [setValue]);
|
|
13783
13885
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13784
|
-
/* @__PURE__ */ jsx(
|
|
13886
|
+
/* @__PURE__ */ jsx(PropertyIdCopyTooltip, { propertyKey, children: /* @__PURE__ */ jsx(
|
|
13785
13887
|
Select,
|
|
13786
13888
|
{
|
|
13787
13889
|
size: size === "medium" ? "medium" : "small",
|
|
@@ -13837,7 +13939,7 @@ function SelectFieldBinding({
|
|
|
13837
13939
|
);
|
|
13838
13940
|
})
|
|
13839
13941
|
}
|
|
13840
|
-
),
|
|
13942
|
+
) }),
|
|
13841
13943
|
/* @__PURE__ */ jsx(
|
|
13842
13944
|
FieldHelperText,
|
|
13843
13945
|
{
|
|
@@ -13922,8 +14024,9 @@ function MultiSelectBinding({
|
|
|
13922
14024
|
value: validValue ? value.map((v) => v.toString()) : [],
|
|
13923
14025
|
disabled,
|
|
13924
14026
|
label: /* @__PURE__ */ jsx(
|
|
13925
|
-
|
|
14027
|
+
LabelWithIconAndTooltip,
|
|
13926
14028
|
{
|
|
14029
|
+
propertyKey,
|
|
13927
14030
|
icon: getIconForProperty(property, "small"),
|
|
13928
14031
|
required: property.validation?.required,
|
|
13929
14032
|
title: property.name,
|
|
@@ -14025,8 +14128,9 @@ function ArrayOfReferencesFieldBinding({
|
|
|
14025
14128
|
}, [ofProperty.path, ofProperty.previewProperties, value]);
|
|
14026
14129
|
const title = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14027
14130
|
/* @__PURE__ */ jsx(
|
|
14028
|
-
|
|
14131
|
+
LabelWithIconAndTooltip,
|
|
14029
14132
|
{
|
|
14133
|
+
propertyKey,
|
|
14030
14134
|
icon: getIconForProperty(property, "small"),
|
|
14031
14135
|
required: property.validation?.required,
|
|
14032
14136
|
title: property.name,
|
|
@@ -14122,6 +14226,7 @@ function StorageItemPreview({
|
|
|
14122
14226
|
children: /* @__PURE__ */ jsx(
|
|
14123
14227
|
Tooltip,
|
|
14124
14228
|
{
|
|
14229
|
+
asChild: true,
|
|
14125
14230
|
title: "Remove",
|
|
14126
14231
|
children: /* @__PURE__ */ jsx(
|
|
14127
14232
|
IconButton,
|
|
@@ -14207,8 +14312,9 @@ function StorageUploadFieldBinding({
|
|
|
14207
14312
|
});
|
|
14208
14313
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14209
14314
|
!minimalistView && /* @__PURE__ */ jsx(
|
|
14210
|
-
|
|
14315
|
+
LabelWithIconAndTooltip,
|
|
14211
14316
|
{
|
|
14317
|
+
propertyKey,
|
|
14212
14318
|
icon: getIconForProperty(property, "small"),
|
|
14213
14319
|
required: property.validation?.required,
|
|
14214
14320
|
title: property.name,
|
|
@@ -14564,7 +14670,7 @@ function TextFieldBinding({
|
|
|
14564
14670
|
const isMultiline = Boolean(multiline);
|
|
14565
14671
|
const inputType = property.dataType === "number" ? "number" : void 0;
|
|
14566
14672
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14567
|
-
/* @__PURE__ */ jsx(
|
|
14673
|
+
/* @__PURE__ */ jsx(PropertyIdCopyTooltip, { propertyKey, children: /* @__PURE__ */ jsx(
|
|
14568
14674
|
TextField,
|
|
14569
14675
|
{
|
|
14570
14676
|
size,
|
|
@@ -14592,7 +14698,7 @@ function TextFieldBinding({
|
|
|
14592
14698
|
error: showError ? error : void 0,
|
|
14593
14699
|
inputClassName: error ? "text-red-500 dark:text-red-600" : ""
|
|
14594
14700
|
}
|
|
14595
|
-
),
|
|
14701
|
+
) }),
|
|
14596
14702
|
/* @__PURE__ */ jsx(
|
|
14597
14703
|
FieldHelperText,
|
|
14598
14704
|
{
|
|
@@ -14638,7 +14744,7 @@ const SwitchFieldBinding = React__default.forwardRef(function SwitchFieldBinding
|
|
|
14638
14744
|
setValue
|
|
14639
14745
|
});
|
|
14640
14746
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14641
|
-
/* @__PURE__ */ jsx(
|
|
14747
|
+
/* @__PURE__ */ jsx(PropertyIdCopyTooltip, { propertyKey, children: /* @__PURE__ */ jsx(
|
|
14642
14748
|
BooleanSwitchWithLabel,
|
|
14643
14749
|
{
|
|
14644
14750
|
value,
|
|
@@ -14656,7 +14762,7 @@ const SwitchFieldBinding = React__default.forwardRef(function SwitchFieldBinding
|
|
|
14656
14762
|
autoFocus,
|
|
14657
14763
|
size
|
|
14658
14764
|
}
|
|
14659
|
-
),
|
|
14765
|
+
) }),
|
|
14660
14766
|
/* @__PURE__ */ jsx(
|
|
14661
14767
|
FieldHelperText,
|
|
14662
14768
|
{
|
|
@@ -14689,7 +14795,7 @@ function DateTimeFieldBinding({
|
|
|
14689
14795
|
setValue
|
|
14690
14796
|
});
|
|
14691
14797
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14692
|
-
/* @__PURE__ */ jsx(
|
|
14798
|
+
/* @__PURE__ */ jsx(PropertyIdCopyTooltip, { propertyKey, children: /* @__PURE__ */ jsx(
|
|
14693
14799
|
DateTimeField,
|
|
14694
14800
|
{
|
|
14695
14801
|
value: internalValue,
|
|
@@ -14709,7 +14815,7 @@ function DateTimeFieldBinding({
|
|
|
14709
14815
|
}
|
|
14710
14816
|
)
|
|
14711
14817
|
}
|
|
14712
|
-
),
|
|
14818
|
+
) }),
|
|
14713
14819
|
/* @__PURE__ */ jsx(
|
|
14714
14820
|
FieldHelperText,
|
|
14715
14821
|
{
|
|
@@ -14736,8 +14842,9 @@ function ReadOnlyFieldBinding({
|
|
|
14736
14842
|
throw new Error("ReadOnlyFieldBinding: Entity id is null");
|
|
14737
14843
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14738
14844
|
!minimalistView && /* @__PURE__ */ jsx(
|
|
14739
|
-
|
|
14845
|
+
LabelWithIconAndTooltip,
|
|
14740
14846
|
{
|
|
14847
|
+
propertyKey,
|
|
14741
14848
|
icon: getIconForProperty(property, "small"),
|
|
14742
14849
|
required: property.validation?.required,
|
|
14743
14850
|
title: property.name,
|
|
@@ -14777,6 +14884,7 @@ function ReferenceFieldBinding(props) {
|
|
|
14777
14884
|
return /* @__PURE__ */ jsx(ReferenceFieldBindingInternal, { ...props });
|
|
14778
14885
|
}
|
|
14779
14886
|
function ReferenceFieldBindingInternal({
|
|
14887
|
+
propertyKey,
|
|
14780
14888
|
value,
|
|
14781
14889
|
setValue,
|
|
14782
14890
|
error,
|
|
@@ -14825,8 +14933,9 @@ function ReferenceFieldBindingInternal({
|
|
|
14825
14933
|
}, [referenceDialogController]);
|
|
14826
14934
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14827
14935
|
!minimalistView && /* @__PURE__ */ jsx(
|
|
14828
|
-
|
|
14936
|
+
LabelWithIconAndTooltip,
|
|
14829
14937
|
{
|
|
14938
|
+
propertyKey,
|
|
14830
14939
|
icon: getIconForProperty(property, "small"),
|
|
14831
14940
|
required: property.validation?.required,
|
|
14832
14941
|
title: property.name,
|
|
@@ -15159,8 +15268,9 @@ function MapFieldBinding({
|
|
|
15159
15268
|
}
|
|
15160
15269
|
) }) });
|
|
15161
15270
|
const title = /* @__PURE__ */ jsx(
|
|
15162
|
-
|
|
15271
|
+
LabelWithIconAndTooltip,
|
|
15163
15272
|
{
|
|
15273
|
+
propertyKey,
|
|
15164
15274
|
icon: getIconForProperty(property, "small"),
|
|
15165
15275
|
required: property.validation?.required,
|
|
15166
15276
|
title: property.name,
|
|
@@ -15220,8 +15330,9 @@ function KeyValueFieldBinding({
|
|
|
15220
15330
|
}
|
|
15221
15331
|
);
|
|
15222
15332
|
const title = /* @__PURE__ */ jsx(
|
|
15223
|
-
|
|
15333
|
+
LabelWithIconAndTooltip,
|
|
15224
15334
|
{
|
|
15335
|
+
propertyKey,
|
|
15225
15336
|
icon: getIconForProperty(property, "small"),
|
|
15226
15337
|
required: property.validation?.required,
|
|
15227
15338
|
title: property.name,
|
|
@@ -15873,12 +15984,13 @@ function RepeatFieldBinding({
|
|
|
15873
15984
|
);
|
|
15874
15985
|
const title = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15875
15986
|
/* @__PURE__ */ jsx(
|
|
15876
|
-
|
|
15987
|
+
LabelWithIconAndTooltip,
|
|
15877
15988
|
{
|
|
15989
|
+
propertyKey,
|
|
15878
15990
|
icon: getIconForProperty(property, "small"),
|
|
15879
15991
|
required: property.validation?.required,
|
|
15880
15992
|
title: property.name,
|
|
15881
|
-
className: "flex-grow text-text-secondary dark:text-text-secondary-dark"
|
|
15993
|
+
className: "flex flex-grow text-text-secondary dark:text-text-secondary-dark"
|
|
15882
15994
|
}
|
|
15883
15995
|
),
|
|
15884
15996
|
Array.isArray(value) && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "px-4", children: [
|
|
@@ -15951,8 +16063,9 @@ function BlockFieldBinding({
|
|
|
15951
16063
|
);
|
|
15952
16064
|
}, [context, lastAddedId, property.oneOf, propertyKey, value]);
|
|
15953
16065
|
const title = /* @__PURE__ */ jsx(
|
|
15954
|
-
|
|
16066
|
+
LabelWithIconAndTooltip,
|
|
15955
16067
|
{
|
|
16068
|
+
propertyKey,
|
|
15956
16069
|
icon: getIconForProperty(property, "small"),
|
|
15957
16070
|
required: property.validation?.required,
|
|
15958
16071
|
title: property.name,
|
|
@@ -16196,8 +16309,9 @@ function MarkdownEditorFieldBinding({
|
|
|
16196
16309
|
return editor;
|
|
16197
16310
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
16198
16311
|
/* @__PURE__ */ jsx(
|
|
16199
|
-
|
|
16312
|
+
LabelWithIconAndTooltip,
|
|
16200
16313
|
{
|
|
16314
|
+
propertyKey,
|
|
16201
16315
|
icon: getIconForProperty(property, "small"),
|
|
16202
16316
|
required: property.validation?.required,
|
|
16203
16317
|
title: property.name,
|
|
@@ -16240,8 +16354,9 @@ function ArrayCustomShapedFieldBinding({
|
|
|
16240
16354
|
});
|
|
16241
16355
|
const title = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
16242
16356
|
/* @__PURE__ */ jsx(
|
|
16243
|
-
|
|
16357
|
+
LabelWithIconAndTooltip,
|
|
16244
16358
|
{
|
|
16359
|
+
propertyKey,
|
|
16245
16360
|
icon: getIconForProperty(property, "small"),
|
|
16246
16361
|
required: property.validation?.required,
|
|
16247
16362
|
title: property.name,
|
|
@@ -17008,26 +17123,40 @@ function CustomIdField({
|
|
|
17008
17123
|
name: "id",
|
|
17009
17124
|
value: (entity && status === "existing" ? entity.id : entityId) ?? "",
|
|
17010
17125
|
endAdornment: loading ? /* @__PURE__ */ jsx(CircularProgress, { size: "small" }) : entity ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17011
|
-
/* @__PURE__ */ jsx(
|
|
17012
|
-
|
|
17126
|
+
/* @__PURE__ */ jsx(
|
|
17127
|
+
Tooltip,
|
|
17013
17128
|
{
|
|
17014
|
-
|
|
17015
|
-
|
|
17016
|
-
children: /* @__PURE__ */ jsx(
|
|
17129
|
+
title: "Copy",
|
|
17130
|
+
asChild: true,
|
|
17131
|
+
children: /* @__PURE__ */ jsx(
|
|
17132
|
+
IconButton,
|
|
17133
|
+
{
|
|
17134
|
+
onClick: (e) => copy(entity.id),
|
|
17135
|
+
"aria-label": "copy-id",
|
|
17136
|
+
children: /* @__PURE__ */ jsx(ContentCopyIcon, { size: "small" })
|
|
17137
|
+
}
|
|
17138
|
+
)
|
|
17017
17139
|
}
|
|
17018
|
-
)
|
|
17019
|
-
customizationController?.entityLinkBuilder && /* @__PURE__ */ jsx(
|
|
17020
|
-
|
|
17140
|
+
),
|
|
17141
|
+
customizationController?.entityLinkBuilder && /* @__PURE__ */ jsx(
|
|
17142
|
+
Tooltip,
|
|
17021
17143
|
{
|
|
17022
|
-
|
|
17023
|
-
|
|
17024
|
-
|
|
17025
|
-
|
|
17026
|
-
|
|
17027
|
-
|
|
17028
|
-
|
|
17144
|
+
title: "Open in the console",
|
|
17145
|
+
asChild: true,
|
|
17146
|
+
children: /* @__PURE__ */ jsx(
|
|
17147
|
+
IconButton,
|
|
17148
|
+
{
|
|
17149
|
+
component: "a",
|
|
17150
|
+
href: customizationController.entityLinkBuilder({ entity }),
|
|
17151
|
+
rel: "noopener noreferrer",
|
|
17152
|
+
target: "_blank",
|
|
17153
|
+
onClick: (e) => e.stopPropagation(),
|
|
17154
|
+
"aria-label": "go-to-datasource",
|
|
17155
|
+
children: /* @__PURE__ */ jsx(OpenInNewIcon, { size: "small" })
|
|
17156
|
+
}
|
|
17157
|
+
)
|
|
17029
17158
|
}
|
|
17030
|
-
)
|
|
17159
|
+
)
|
|
17031
17160
|
] }) : void 0
|
|
17032
17161
|
};
|
|
17033
17162
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -17117,35 +17246,6 @@ const isScrollable = (ele) => {
|
|
|
17117
17246
|
const getScrollableParent = (ele) => {
|
|
17118
17247
|
return !ele || ele === document.body ? document.body : isScrollable(ele) ? ele : getScrollableParent(ele.parentNode);
|
|
17119
17248
|
};
|
|
17120
|
-
function PropertyIdCopyTooltipContent({ propertyId }) {
|
|
17121
|
-
const [copied, setCopied] = useState(false);
|
|
17122
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-row gap-2 items-center justify-center text-white", children: [
|
|
17123
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
17124
|
-
/* @__PURE__ */ jsx(
|
|
17125
|
-
Typography,
|
|
17126
|
-
{
|
|
17127
|
-
variant: "caption",
|
|
17128
|
-
className: "min-w-20 text-slate-400",
|
|
17129
|
-
color: "disabled",
|
|
17130
|
-
children: copied ? "Copied" : "Property ID"
|
|
17131
|
-
}
|
|
17132
|
-
),
|
|
17133
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-white", children: /* @__PURE__ */ jsx("code", { children: propertyId }) })
|
|
17134
|
-
] }),
|
|
17135
|
-
/* @__PURE__ */ jsx(IconButton, { size: "small", children: /* @__PURE__ */ jsx(
|
|
17136
|
-
ContentCopyIcon,
|
|
17137
|
-
{
|
|
17138
|
-
size: "smallest",
|
|
17139
|
-
className: "text-white",
|
|
17140
|
-
onClick: useCallback(() => {
|
|
17141
|
-
navigator.clipboard.writeText(propertyId);
|
|
17142
|
-
setCopied(true);
|
|
17143
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
17144
|
-
}, [propertyId])
|
|
17145
|
-
}
|
|
17146
|
-
) })
|
|
17147
|
-
] });
|
|
17148
|
-
}
|
|
17149
17249
|
const MAIN_TAB_VALUE = "main_##Q$SC^#S6";
|
|
17150
17250
|
function EntityEditView({
|
|
17151
17251
|
entityId,
|
|
@@ -17672,17 +17772,7 @@ function EntityEditViewInner({
|
|
|
17672
17772
|
"div",
|
|
17673
17773
|
{
|
|
17674
17774
|
id: `form_field_${key}`,
|
|
17675
|
-
children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(
|
|
17676
|
-
Tooltip,
|
|
17677
|
-
{
|
|
17678
|
-
title: /* @__PURE__ */ jsx(PropertyIdCopyTooltipContent, { propertyId: key }),
|
|
17679
|
-
delayDuration: 800,
|
|
17680
|
-
side: "left",
|
|
17681
|
-
align: "start",
|
|
17682
|
-
sideOffset: 16,
|
|
17683
|
-
children: /* @__PURE__ */ jsx(PropertyFieldBinding, { ...cmsFormFieldProps })
|
|
17684
|
-
}
|
|
17685
|
-
) })
|
|
17775
|
+
children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(PropertyFieldBinding, { ...cmsFormFieldProps }) })
|
|
17686
17776
|
},
|
|
17687
17777
|
`field_${resolvedCollection.name}_${key}`
|
|
17688
17778
|
);
|
|
@@ -17699,8 +17789,9 @@ function EntityEditViewInner({
|
|
|
17699
17789
|
}) });
|
|
17700
17790
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
17701
17791
|
/* @__PURE__ */ jsx(
|
|
17702
|
-
|
|
17792
|
+
LabelWithIconAndTooltip,
|
|
17703
17793
|
{
|
|
17794
|
+
propertyKey: key,
|
|
17704
17795
|
icon: /* @__PURE__ */ jsx(NotesIcon, { size: "small" }),
|
|
17705
17796
|
title: additionalField.name,
|
|
17706
17797
|
className: "text-text-secondary dark:text-text-secondary-dark ml-3.5"
|
|
@@ -19109,16 +19200,22 @@ function DrawerWrapper(props) {
|
|
|
19109
19200
|
title: "Open menu",
|
|
19110
19201
|
side: "right",
|
|
19111
19202
|
sideOffset: 12,
|
|
19112
|
-
|
|
19203
|
+
asChild: true,
|
|
19113
19204
|
children: /* @__PURE__ */ jsx(
|
|
19114
|
-
|
|
19205
|
+
"div",
|
|
19115
19206
|
{
|
|
19116
|
-
|
|
19117
|
-
|
|
19118
|
-
|
|
19119
|
-
|
|
19120
|
-
|
|
19121
|
-
|
|
19207
|
+
className: "fixed top-2 left-3 !bg-gray-50 dark:!bg-gray-900 rounded-full w-fit z-20",
|
|
19208
|
+
children: /* @__PURE__ */ jsx(
|
|
19209
|
+
IconButton,
|
|
19210
|
+
{
|
|
19211
|
+
color: "inherit",
|
|
19212
|
+
"aria-label": "Open menu",
|
|
19213
|
+
className: "sticky top-2 left-3 ",
|
|
19214
|
+
onClick: () => props.setDrawerOpen(true),
|
|
19215
|
+
size: "large",
|
|
19216
|
+
children: /* @__PURE__ */ jsx(MenuIcon, {})
|
|
19217
|
+
}
|
|
19218
|
+
)
|
|
19122
19219
|
}
|
|
19123
19220
|
)
|
|
19124
19221
|
}
|
|
@@ -19201,7 +19298,7 @@ function DrawerNavigationItem({
|
|
|
19201
19298
|
children: icon
|
|
19202
19299
|
}
|
|
19203
19300
|
);
|
|
19204
|
-
const listItem = /* @__PURE__ */ jsxs(
|
|
19301
|
+
const listItem = /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
|
|
19205
19302
|
NavLink,
|
|
19206
19303
|
{
|
|
19207
19304
|
onClick,
|
|
@@ -19234,7 +19331,7 @@ function DrawerNavigationItem({
|
|
|
19234
19331
|
)
|
|
19235
19332
|
]
|
|
19236
19333
|
}
|
|
19237
|
-
);
|
|
19334
|
+
) });
|
|
19238
19335
|
return /* @__PURE__ */ jsx(
|
|
19239
19336
|
Tooltip,
|
|
19240
19337
|
{
|
|
@@ -19563,6 +19660,7 @@ export {
|
|
|
19563
19660
|
KeyValueFieldBinding,
|
|
19564
19661
|
KeyValuePreview,
|
|
19565
19662
|
LabelWithIcon,
|
|
19663
|
+
LabelWithIconAndTooltip,
|
|
19566
19664
|
MapFieldBinding,
|
|
19567
19665
|
MapPropertyPreview,
|
|
19568
19666
|
MarkdownEditorFieldBinding,
|
|
@@ -19577,6 +19675,8 @@ export {
|
|
|
19577
19675
|
NumberPropertyPreview,
|
|
19578
19676
|
PropertyConfigBadge,
|
|
19579
19677
|
PropertyFieldBinding,
|
|
19678
|
+
PropertyIdCopyTooltip,
|
|
19679
|
+
PropertyIdCopyTooltipContent,
|
|
19580
19680
|
PropertyPreview,
|
|
19581
19681
|
PropertyTableCell,
|
|
19582
19682
|
ReadOnlyFieldBinding,
|