@contentful/field-editor-single-line 1.3.14 → 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.
@@ -77,6 +77,8 @@ function SingleLineEditor(props) {
77
77
  isInvalid: errors.length > 0,
78
78
  isDisabled: disabled,
79
79
  value: value || '',
80
+ onFocus: props.onFocus,
81
+ onBlur: props.onBlur,
80
82
  onChange: (e)=>{
81
83
  setValue(e.target.value);
82
84
  }
@@ -26,6 +26,8 @@ export function SingleLineEditor(props) {
26
26
  isInvalid: errors.length > 0,
27
27
  isDisabled: disabled,
28
28
  value: value || '',
29
+ onFocus: props.onFocus,
30
+ onBlur: props.onBlur,
29
31
  onChange: (e)=>{
30
32
  setValue(e.target.value);
31
33
  }
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from 'react';
2
2
  import { FieldAPI, LocalesAPI } from '@contentful/field-editor-shared';
3
3
  export interface SingleLineEditorProps {
4
4
  /**
@@ -21,6 +21,14 @@ export interface SingleLineEditorProps {
21
21
  * sdk.locales
22
22
  */
23
23
  locales: LocalesAPI;
24
+ /**
25
+ * blur event handler
26
+ */
27
+ onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
28
+ /**
29
+ * focus event handler
30
+ */
31
+ onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
24
32
  }
25
33
  export declare function SingleLineEditor(props: SingleLineEditorProps): JSX.Element;
26
34
  export declare namespace SingleLineEditor {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-single-line",
3
- "version": "1.3.14",
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.0.27",
39
39
  "@contentful/f36-tokens": "^4.0.0",
40
- "@contentful/field-editor-shared": "^1.5.2",
40
+ "@contentful/field-editor-shared": "^1.5.3",
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": "4ec14a5b5611b2bfa17bfa10b4ac5942c2c25406"
53
+ "gitHead": "fbd118e01859c708cb0f0db4e3dc4f3dc9169b56"
54
54
  }