@contentful/field-editor-reference 4.3.6 → 4.3.9
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 +16 -0
- package/dist/field-editor-reference.cjs.development.js +16 -8
- 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 +16 -8
- 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;
|
|
@@ -2559,12 +2561,15 @@ function WrappedEntryCard(props) {
|
|
|
2559
2561
|
}, "Move to bottom") : null].filter(function (item) {
|
|
2560
2562
|
return item;
|
|
2561
2563
|
}) : [],
|
|
2562
|
-
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) {
|
|
2563
2569
|
e.preventDefault();
|
|
2564
|
-
if (!props.isClickable) return;
|
|
2565
2570
|
if (props.onClick) return props.onClick(e);
|
|
2566
2571
|
props.onEdit && props.onEdit();
|
|
2567
|
-
}
|
|
2572
|
+
} : undefined
|
|
2568
2573
|
});
|
|
2569
2574
|
}
|
|
2570
2575
|
WrappedEntryCard.defaultProps = defaultProps;
|
|
@@ -3095,11 +3100,14 @@ var WrappedAssetCard = function WrappedAssetCard(props) {
|
|
|
3095
3100
|
testId: "schedule-icon"
|
|
3096
3101
|
})),
|
|
3097
3102
|
src: entityFile && entityFile.url ? size === 'small' ? entityFile.url + "?w=150&h=150&fit=thumb" : entityFile.url + "?h=300" : '',
|
|
3098
|
-
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) {
|
|
3099
3108
|
e.preventDefault();
|
|
3100
|
-
if (!isClickable) return;
|
|
3101
3109
|
onEdit && onEdit();
|
|
3102
|
-
},
|
|
3110
|
+
} : undefined,
|
|
3103
3111
|
dragHandleRender: props.renderDragHandle,
|
|
3104
3112
|
withDragHandle: !!props.renderDragHandle,
|
|
3105
3113
|
actions: [].concat(renderActions({
|