@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
|
@@ -1792,8 +1792,10 @@ var ScheduledIconWithTooltip = function ScheduledIconWithTooltip(_ref) {
|
|
|
1792
1792
|
type: 'error',
|
|
1793
1793
|
error: e
|
|
1794
1794
|
});
|
|
1795
|
-
});
|
|
1796
|
-
|
|
1795
|
+
}); // This should only be ever called once. Following the eslint hint to add used
|
|
1796
|
+
// dependencies will cause page freeze (infinite loop)
|
|
1797
|
+
// eslint-disable-next-line
|
|
1798
|
+
}, []);
|
|
1797
1799
|
|
|
1798
1800
|
if (status.type === 'loading' || status.type === 'error') {
|
|
1799
1801
|
return null;
|
|
@@ -2356,7 +2358,9 @@ function useEditorPermissions(props) {
|
|
|
2356
2358
|
if (entityType === 'Entry') {
|
|
2357
2359
|
// Hardcoded `true` value following https://contentful.atlassian.net/browse/DANTE-486
|
|
2358
2360
|
// TODO: refine permissions check in order to account for tags in rules
|
|
2359
|
-
|
|
2361
|
+
// TODO: always show every content type (it's just a filter) to avoid people not seeing
|
|
2362
|
+
// their (partly limited) content types
|
|
2363
|
+
_canRead = true;
|
|
2360
2364
|
setCanLinkEntity(_canRead);
|
|
2361
2365
|
}
|
|
2362
2366
|
|
|
@@ -2557,12 +2561,15 @@ function WrappedEntryCard(props) {
|
|
|
2557
2561
|
}, "Move to bottom") : null].filter(function (item) {
|
|
2558
2562
|
return item;
|
|
2559
2563
|
}) : [],
|
|
2560
|
-
onClick:
|
|
2564
|
+
onClick: // Providing an onClick handler messes up with some rich text
|
|
2565
|
+
// features e.g. pressing ENTER on a card to add a new paragraph
|
|
2566
|
+
// underneath. It's crucial not to pass a custom handler when
|
|
2567
|
+
// isClickable is disabled which in the case of RT it's.
|
|
2568
|
+
props.isClickable ? function (e) {
|
|
2561
2569
|
e.preventDefault();
|
|
2562
|
-
if (!props.isClickable) return;
|
|
2563
2570
|
if (props.onClick) return props.onClick(e);
|
|
2564
2571
|
props.onEdit && props.onEdit();
|
|
2565
|
-
}
|
|
2572
|
+
} : undefined
|
|
2566
2573
|
});
|
|
2567
2574
|
}
|
|
2568
2575
|
WrappedEntryCard.defaultProps = defaultProps;
|
|
@@ -3093,11 +3100,14 @@ var WrappedAssetCard = function WrappedAssetCard(props) {
|
|
|
3093
3100
|
testId: "schedule-icon"
|
|
3094
3101
|
})),
|
|
3095
3102
|
src: entityFile && entityFile.url ? size === 'small' ? entityFile.url + "?w=150&h=150&fit=thumb" : entityFile.url + "?h=300" : '',
|
|
3096
|
-
onClick:
|
|
3103
|
+
onClick: // Providing an onClick handler messes up with some rich text
|
|
3104
|
+
// features e.g. pressing ENTER on a card to add a new paragraph
|
|
3105
|
+
// underneath. It's crucial not to pass a custom handler when
|
|
3106
|
+
// isClickable is disabled which in the case of RT it's.
|
|
3107
|
+
isClickable ? function (e) {
|
|
3097
3108
|
e.preventDefault();
|
|
3098
|
-
if (!isClickable) return;
|
|
3099
3109
|
onEdit && onEdit();
|
|
3100
|
-
},
|
|
3110
|
+
} : undefined,
|
|
3101
3111
|
dragHandleRender: props.renderDragHandle,
|
|
3102
3112
|
withDragHandle: !!props.renderDragHandle,
|
|
3103
3113
|
actions: [].concat(renderActions({
|