@contentful/field-editor-multiple-line 1.3.30 → 1.4.0

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.
@@ -54,13 +54,14 @@ function _interop_require_wildcard(obj, nodeInterop) {
54
54
  return newObj;
55
55
  }
56
56
  function MultipleLineEditor(props) {
57
- const { field, locales, isInitiallyDisabled, withCharValidation } = props;
57
+ const { field, locales, isInitiallyDisabled, withCharValidation, isDisabled } = props;
58
58
  const constraints = _fieldeditorshared.ConstraintsUtils.fromFieldValidations(field.validations, field.type);
59
59
  const checkConstraint = _fieldeditorshared.ConstraintsUtils.makeChecker(constraints);
60
60
  const direction = locales.direction[field.locale] || 'ltr';
61
61
  return _react.createElement(_fieldeditorshared.FieldConnector, {
62
62
  field: field,
63
- isInitiallyDisabled: isInitiallyDisabled
63
+ isInitiallyDisabled: isInitiallyDisabled,
64
+ isDisabled: isDisabled
64
65
  }, ({ errors, disabled, value, setValue })=>{
65
66
  return _react.createElement("div", {
66
67
  "data-test-id": "multiple-line-editor"
@@ -3,13 +3,14 @@ import { Textarea } from '@contentful/f36-components';
3
3
  import { FieldConnector, CharCounter, CharValidation, ConstraintsUtils } from '@contentful/field-editor-shared';
4
4
  import * as styles from './styles';
5
5
  export function MultipleLineEditor(props) {
6
- const { field, locales, isInitiallyDisabled, withCharValidation } = props;
6
+ const { field, locales, isInitiallyDisabled, withCharValidation, isDisabled } = props;
7
7
  const constraints = ConstraintsUtils.fromFieldValidations(field.validations, field.type);
8
8
  const checkConstraint = ConstraintsUtils.makeChecker(constraints);
9
9
  const direction = locales.direction[field.locale] || 'ltr';
10
10
  return React.createElement(FieldConnector, {
11
11
  field: field,
12
- isInitiallyDisabled: isInitiallyDisabled
12
+ isInitiallyDisabled: isInitiallyDisabled,
13
+ isDisabled: isDisabled
13
14
  }, ({ errors, disabled, value, setValue })=>{
14
15
  return React.createElement("div", {
15
16
  "data-test-id": "multiple-line-editor"
@@ -17,6 +17,7 @@ export interface MultipleLineEditorProps {
17
17
  * sdk.locales
18
18
  */
19
19
  locales: LocalesAPI;
20
+ isDisabled?: boolean;
20
21
  }
21
22
  export declare function MultipleLineEditor(props: MultipleLineEditorProps): React.JSX.Element;
22
23
  export declare namespace MultipleLineEditor {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-multiple-line",
3
- "version": "1.3.30",
3
+ "version": "1.4.0",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@contentful/f36-components": "^4.70.0",
39
39
  "@contentful/f36-tokens": "^4.0.5",
40
- "@contentful/field-editor-shared": "^2.2.3",
40
+ "@contentful/field-editor-shared": "^2.3.0",
41
41
  "emotion": "^10.0.17",
42
42
  "lodash": "^4.17.15"
43
43
  },
@@ -50,5 +50,5 @@
50
50
  "publishConfig": {
51
51
  "registry": "https://npm.pkg.github.com/"
52
52
  },
53
- "gitHead": "58badec95e1faa6cc187f72e9da7627002618562"
53
+ "gitHead": "28c4e05014732ce423e75ab34dd139c887d7efbd"
54
54
  }