@contentful/field-editor-rich-text 4.1.10 → 4.2.1

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.
@@ -131,7 +131,7 @@ const ConnectedRichTextEditor = (props)=>{
131
131
  }))))));
132
132
  };
133
133
  const RichTextEditor = (props)=>{
134
- const { sdk, isInitiallyDisabled, onAction, restrictedMarks, onChange, ...otherProps } = props;
134
+ const { sdk, isInitiallyDisabled, onAction, restrictedMarks, onChange, isDisabled, ...otherProps } = props;
135
135
  const isEmptyValue = _react.useCallback((value)=>!value || (0, _fastdeepequal.default)(value, _richtexttypes.EMPTY_DOCUMENT), []);
136
136
  _react.useEffect(()=>{
137
137
  if (!onChange) {
@@ -147,7 +147,8 @@ const RichTextEditor = (props)=>{
147
147
  debounce: 0,
148
148
  field: sdk.field,
149
149
  isInitiallyDisabled: isInitiallyDisabled,
150
- isEmptyValue: isEmptyValue
150
+ isEmptyValue: isEmptyValue,
151
+ isDisabled: isDisabled
151
152
  }, ({ lastRemoteValue, disabled, setValue })=>_react.createElement(ConnectedRichTextEditor, {
152
153
  ...otherProps,
153
154
  key: `rich-text-editor-${id}`,
@@ -67,7 +67,7 @@ export const ConnectedRichTextEditor = (props)=>{
67
67
  }))))));
68
68
  };
69
69
  const RichTextEditor = (props)=>{
70
- const { sdk, isInitiallyDisabled, onAction, restrictedMarks, onChange, ...otherProps } = props;
70
+ const { sdk, isInitiallyDisabled, onAction, restrictedMarks, onChange, isDisabled, ...otherProps } = props;
71
71
  const isEmptyValue = React.useCallback((value)=>!value || deepEquals(value, Contentful.EMPTY_DOCUMENT), []);
72
72
  React.useEffect(()=>{
73
73
  if (!onChange) {
@@ -83,7 +83,8 @@ const RichTextEditor = (props)=>{
83
83
  debounce: 0,
84
84
  field: sdk.field,
85
85
  isInitiallyDisabled: isInitiallyDisabled,
86
- isEmptyValue: isEmptyValue
86
+ isEmptyValue: isEmptyValue,
87
+ isDisabled: isDisabled
87
88
  }, ({ lastRemoteValue, disabled, setValue })=>React.createElement(ConnectedRichTextEditor, {
88
89
  ...otherProps,
89
90
  key: `rich-text-editor-${id}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-rich-text",
3
- "version": "4.1.10",
3
+ "version": "4.2.1",
4
4
  "source": "./src/index.tsx",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -44,7 +44,7 @@
44
44
  "@contentful/f36-icons": "^4.29.0",
45
45
  "@contentful/f36-tokens": "^4.0.5",
46
46
  "@contentful/f36-utils": "^4.24.3",
47
- "@contentful/field-editor-reference": "^6.3.3",
47
+ "@contentful/field-editor-reference": "^6.4.0",
48
48
  "@contentful/field-editor-shared": "^2.3.0",
49
49
  "@contentful/rich-text-plain-text-renderer": "^17.0.0",
50
50
  "@contentful/rich-text-types": "^17.0.0",
@@ -86,5 +86,5 @@
86
86
  "publishConfig": {
87
87
  "registry": "https://npm.pkg.github.com/"
88
88
  },
89
- "gitHead": "bf46c70f90d83e11e01091e8f0f50dfa27258bdf"
89
+ "gitHead": "57dadbe3d95d61b9da6e8e12bfeae955c6c2ab4d"
90
90
  }