@contentful/field-editor-reference 4.3.5 → 4.3.8
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 +18 -0
- package/dist/field-editor-reference.cjs.development.js +19 -9
- 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 +19 -9
- package/dist/field-editor-reference.esm.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
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.3.8](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.3.7...@contentful/field-editor-reference@4.3.8) (2022-06-15)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- don't register onClick callbacks when isClickable is false ([#1163](https://github.com/contentful/field-editors/issues/1163)) ([fe6fc6b](https://github.com/contentful/field-editors/commit/fe6fc6b872acfde3b097c626d2eef81a7cc24193))
|
|
11
|
+
|
|
12
|
+
## [4.3.7](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.3.6...@contentful/field-editor-reference@4.3.7) (2022-06-07)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- **reference:** avoid infinite getEntityScheduledActions calls ([#1159](https://github.com/contentful/field-editors/issues/1159)) ([620111b](https://github.com/contentful/field-editors/commit/620111bdca45a083369bdb42be8e93a16b670937))
|
|
17
|
+
|
|
18
|
+
## [4.3.6](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.3.5...@contentful/field-editor-reference@4.3.6) (2022-05-24)
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
- **reference:** show all content types for reference CT filter [HOMER-836] ([#1152](https://github.com/contentful/field-editors/issues/1152)) ([fe1f38d](https://github.com/contentful/field-editors/commit/fe1f38d093649f31701ead308720a64ffaba44b0))
|
|
23
|
+
|
|
6
24
|
## [4.3.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.3.4...@contentful/field-editor-reference@4.3.5) (2022-05-09)
|
|
7
25
|
|
|
8
26
|
### Bug Fixes
|
|
@@ -1799,8 +1799,10 @@ var ScheduledIconWithTooltip = function ScheduledIconWithTooltip(_ref) {
|
|
|
1799
1799
|
type: 'error',
|
|
1800
1800
|
error: e
|
|
1801
1801
|
});
|
|
1802
|
-
});
|
|
1803
|
-
|
|
1802
|
+
}); // This should only be ever called once. Following the eslint hint to add used
|
|
1803
|
+
// dependencies will cause page freeze (infinite loop)
|
|
1804
|
+
// eslint-disable-next-line
|
|
1805
|
+
}, []);
|
|
1804
1806
|
|
|
1805
1807
|
if (status.type === 'loading' || status.type === 'error') {
|
|
1806
1808
|
return null;
|
|
@@ -2363,7 +2365,9 @@ function useEditorPermissions(props) {
|
|
|
2363
2365
|
if (entityType === 'Entry') {
|
|
2364
2366
|
// Hardcoded `true` value following https://contentful.atlassian.net/browse/DANTE-486
|
|
2365
2367
|
// TODO: refine permissions check in order to account for tags in rules
|
|
2366
|
-
|
|
2368
|
+
// TODO: always show every content type (it's just a filter) to avoid people not seeing
|
|
2369
|
+
// their (partly limited) content types
|
|
2370
|
+
_canRead = true;
|
|
2367
2371
|
setCanLinkEntity(_canRead);
|
|
2368
2372
|
}
|
|
2369
2373
|
|
|
@@ -2564,12 +2568,15 @@ function WrappedEntryCard(props) {
|
|
|
2564
2568
|
}, "Move to bottom") : null].filter(function (item) {
|
|
2565
2569
|
return item;
|
|
2566
2570
|
}) : [],
|
|
2567
|
-
onClick:
|
|
2571
|
+
onClick: // Providing an onClick handler messes up with some rich text
|
|
2572
|
+
// features e.g. pressing ENTER on a card to add a new paragraph
|
|
2573
|
+
// underneath. It's crucial not to pass a custom handler when
|
|
2574
|
+
// isClickable is disabled which in the case of RT it's.
|
|
2575
|
+
props.isClickable ? function (e) {
|
|
2568
2576
|
e.preventDefault();
|
|
2569
|
-
if (!props.isClickable) return;
|
|
2570
2577
|
if (props.onClick) return props.onClick(e);
|
|
2571
2578
|
props.onEdit && props.onEdit();
|
|
2572
|
-
}
|
|
2579
|
+
} : undefined
|
|
2573
2580
|
});
|
|
2574
2581
|
}
|
|
2575
2582
|
WrappedEntryCard.defaultProps = defaultProps;
|
|
@@ -3100,11 +3107,14 @@ var WrappedAssetCard = function WrappedAssetCard(props) {
|
|
|
3100
3107
|
testId: "schedule-icon"
|
|
3101
3108
|
})),
|
|
3102
3109
|
src: entityFile && entityFile.url ? size === 'small' ? entityFile.url + "?w=150&h=150&fit=thumb" : entityFile.url + "?h=300" : '',
|
|
3103
|
-
onClick:
|
|
3110
|
+
onClick: // Providing an onClick handler messes up with some rich text
|
|
3111
|
+
// features e.g. pressing ENTER on a card to add a new paragraph
|
|
3112
|
+
// underneath. It's crucial not to pass a custom handler when
|
|
3113
|
+
// isClickable is disabled which in the case of RT it's.
|
|
3114
|
+
isClickable ? function (e) {
|
|
3104
3115
|
e.preventDefault();
|
|
3105
|
-
if (!isClickable) return;
|
|
3106
3116
|
onEdit && onEdit();
|
|
3107
|
-
},
|
|
3117
|
+
} : undefined,
|
|
3108
3118
|
dragHandleRender: props.renderDragHandle,
|
|
3109
3119
|
withDragHandle: !!props.renderDragHandle,
|
|
3110
3120
|
actions: [].concat(renderActions({
|