@contentful/field-editor-reference 4.0.1 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/field-editor-reference.cjs.development.js +14 -2
- package/dist/field-editor-reference.cjs.development.js.map +1 -1
- package/dist/field-editor-reference.cjs.production.min.js +1 -1
- package/dist/field-editor-reference.cjs.production.min.js.map +1 -1
- package/dist/field-editor-reference.esm.js +14 -2
- package/dist/field-editor-reference.esm.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.0.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.0.1...@contentful/field-editor-reference@4.0.2) (2021-11-08)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- controllable combined link actions visibility ([e500cbb](https://github.com/contentful/field-editors/commit/e500cbbe01de4864eb15338095dc453bd339e4a9))
|
|
11
|
+
|
|
6
12
|
## [4.0.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.0.0...@contentful/field-editor-reference@4.0.1) (2021-11-08)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
|
@@ -516,6 +516,10 @@ function CombinedEntryLinkActions(props) {
|
|
|
516
516
|
}
|
|
517
517
|
|
|
518
518
|
function CombinedAssetLinkActions(props) {
|
|
519
|
+
var _React$useState = React.useState(false),
|
|
520
|
+
isOpen = _React$useState[0],
|
|
521
|
+
setOpen = _React$useState[1];
|
|
522
|
+
|
|
519
523
|
if (!props.canLinkEntity || !props.canCreateEntity) {
|
|
520
524
|
if (props.canLinkEntity) {
|
|
521
525
|
return React.createElement(f36Components.Button, {
|
|
@@ -550,7 +554,15 @@ function CombinedAssetLinkActions(props) {
|
|
|
550
554
|
// that works without content types to cover asset use-case.
|
|
551
555
|
|
|
552
556
|
|
|
553
|
-
return React.createElement(f36Components.Menu,
|
|
557
|
+
return React.createElement(f36Components.Menu, {
|
|
558
|
+
isOpen: isOpen,
|
|
559
|
+
onClose: function onClose() {
|
|
560
|
+
setOpen(false);
|
|
561
|
+
},
|
|
562
|
+
onOpen: function onOpen() {
|
|
563
|
+
setOpen(true);
|
|
564
|
+
}
|
|
565
|
+
}, React.createElement(f36Components.Menu.Trigger, null, React.createElement(f36Components.Button, {
|
|
554
566
|
endIcon: React.createElement(f36Icons.ChevronDownIcon, null),
|
|
555
567
|
isDisabled: props.isDisabled,
|
|
556
568
|
testId: testIds$1.actionsWrapper,
|
|
@@ -558,7 +570,7 @@ function CombinedAssetLinkActions(props) {
|
|
|
558
570
|
variant: "secondary",
|
|
559
571
|
startIcon: React.createElement(f36Icons.PlusIcon, null),
|
|
560
572
|
size: "small"
|
|
561
|
-
}, "Add media")), React.createElement(f36Components.Menu.List, {
|
|
573
|
+
}, "Add media")), isOpen && React.createElement(f36Components.Menu.List, {
|
|
562
574
|
testId: testIds$1.dropdown
|
|
563
575
|
}, React.createElement(f36Components.Menu.Item, {
|
|
564
576
|
testId: testIds$1.linkExisting,
|