@contentful/field-editor-reference 4.6.9 → 4.6.10
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/components/LinkActions/LinkEntityActions.d.ts +1 -1
- package/dist/field-editor-reference.cjs.development.js +9 -10
- 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 +9 -10
- 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.6.10](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.6.9...@contentful/field-editor-reference@4.6.10) (2022-08-09)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- introduce callback to properly handle available content types [ZEND-2500] ([#1207](https://github.com/contentful/field-editors/issues/1207)) ([e6bf5e9](https://github.com/contentful/field-editors/commit/e6bf5e92e3c406a8c325d045adf907ea4e95f85f))
|
|
11
|
+
|
|
6
12
|
## [4.6.9](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.6.8...@contentful/field-editor-reference@4.6.9) (2022-08-09)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { EditorPermissions } from '../../common/useEditorPermissions';
|
|
2
3
|
import { Action, ActionLabels, ContentEntityType, FieldExtensionSDK } from '../../types';
|
|
3
4
|
import { LinkActionsProps } from './LinkActions';
|
|
4
|
-
import { EditorPermissions } from '../../common/useEditorPermissions';
|
|
5
5
|
declare type LinkEntityActionsProps = {
|
|
6
6
|
entityType: ContentEntityType;
|
|
7
7
|
canLinkMultiple: boolean;
|
|
@@ -1635,9 +1635,8 @@ function useLinkActionsProps(props) {
|
|
|
1635
1635
|
return function (_x, _x2) {
|
|
1636
1636
|
return _ref.apply(this, arguments);
|
|
1637
1637
|
};
|
|
1638
|
-
}(), [sdk, entityType, onCreated]);
|
|
1639
|
-
|
|
1640
|
-
var onLinkExisting = /*#__PURE__*/function () {
|
|
1638
|
+
}(), [sdk, entityType, onCreated]);
|
|
1639
|
+
var onLinkExisting = React.useCallback( /*#__PURE__*/function () {
|
|
1641
1640
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(index) {
|
|
1642
1641
|
var entity;
|
|
1643
1642
|
return runtime_1.wrap(function _callee2$(_context2) {
|
|
@@ -1672,12 +1671,12 @@ function useLinkActionsProps(props) {
|
|
|
1672
1671
|
}, _callee2);
|
|
1673
1672
|
}));
|
|
1674
1673
|
|
|
1675
|
-
return function
|
|
1674
|
+
return function (_x3) {
|
|
1676
1675
|
return _ref2.apply(this, arguments);
|
|
1677
1676
|
};
|
|
1678
|
-
}()
|
|
1679
|
-
|
|
1680
|
-
var onLinkSeveralExisting = /*#__PURE__*/function () {
|
|
1677
|
+
}(), // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
|
|
1678
|
+
[sdk, entityType, onLinkedExisting]);
|
|
1679
|
+
var onLinkSeveralExisting = React.useCallback( /*#__PURE__*/function () {
|
|
1681
1680
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(index) {
|
|
1682
1681
|
var entities;
|
|
1683
1682
|
return runtime_1.wrap(function _callee3$(_context3) {
|
|
@@ -1712,11 +1711,11 @@ function useLinkActionsProps(props) {
|
|
|
1712
1711
|
}, _callee3);
|
|
1713
1712
|
}));
|
|
1714
1713
|
|
|
1715
|
-
return function
|
|
1714
|
+
return function (_x4) {
|
|
1716
1715
|
return _ref3.apply(this, arguments);
|
|
1717
1716
|
};
|
|
1718
|
-
}()
|
|
1719
|
-
|
|
1717
|
+
}(), // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
|
|
1718
|
+
[sdk, entityType, onLinkedExisting]); // FIXME: The memoization might rerun every time due to the always changing callback identities above
|
|
1720
1719
|
|
|
1721
1720
|
return React.useMemo(function () {
|
|
1722
1721
|
return {
|