@contentful/field-editor-shared 1.3.0 → 1.3.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.
@@ -9,8 +9,8 @@ Object.defineProperty(exports, "FieldConnector", {
9
9
  }
10
10
  });
11
11
  const _react = _interop_require_wildcard(require("react"));
12
- const _lodashes = require("lodash-es");
13
12
  const _isEqual = _interop_require_default(require("lodash/isEqual"));
13
+ const _throttle = _interop_require_default(require("lodash/throttle"));
14
14
  function _define_property(obj, key, value) {
15
15
  if (key in obj) {
16
16
  Object.defineProperty(obj, key, {
@@ -131,7 +131,7 @@ class FieldConnector extends (_React_Component = _react.Component) {
131
131
  }
132
132
  await this.triggerSetValueCallbacks(value);
133
133
  });
134
- _define_property(this, "triggerSetValueCallbacks", (0, _lodashes.throttle)((value)=>{
134
+ _define_property(this, "triggerSetValueCallbacks", (0, _throttle.default)((value)=>{
135
135
  return new Promise((resolve, reject)=>{
136
136
  if (this.props.isEmptyValue(value ?? null)) {
137
137
  this.props.field.removeValue().then(resolve).catch(reject);
@@ -12,8 +12,8 @@ function _define_property(obj, key, value) {
12
12
  return obj;
13
13
  }
14
14
  import * as React from 'react';
15
- import { throttle } from 'lodash-es';
16
15
  import isEqual from 'lodash/isEqual';
16
+ import throttle from 'lodash/throttle';
17
17
  var _React_Component;
18
18
  export class FieldConnector extends (_React_Component = React.Component) {
19
19
  componentDidMount() {
@@ -1,3 +1,4 @@
1
+ /// <reference types="lodash" />
1
2
  import * as React from 'react';
2
3
  import { FieldAPI, ValidationError } from '@contentful/app-sdk';
3
4
  type Nullable = null | undefined;
@@ -39,7 +40,7 @@ export declare class FieldConnector<ValueType> extends React.Component<FieldConn
39
40
  unsubscribeDisabled: Function | null;
40
41
  unsubscribeValue: Function | null;
41
42
  setValue: (value: ValueType | Nullable) => Promise<void>;
42
- triggerSetValueCallbacks: import("lodash-es").DebouncedFunc<(value: ValueType | Nullable) => Promise<unknown>>;
43
+ triggerSetValueCallbacks: import("lodash").DebouncedFunc<(value: ValueType | Nullable) => Promise<unknown>>;
43
44
  componentDidMount(): void;
44
45
  componentWillUnmount(): void;
45
46
  render(): React.ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-shared",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -36,18 +36,17 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@contentful/app-sdk": "^4.2.0",
39
- "@contentful/field-editor-test-utils": "^1.4.0"
39
+ "@contentful/field-editor-test-utils": "^1.4.1"
40
40
  },
41
41
  "dependencies": {
42
42
  "@contentful/f36-note": "^4.2.8",
43
43
  "@contentful/f36-tokens": "^4.0.0",
44
44
  "emotion": "^10.0.17",
45
- "lodash": "^4.17.15",
46
- "lodash-es": "^4.17.21"
45
+ "lodash": "^4.17.15"
47
46
  },
48
47
  "peerDependencies": {
49
48
  "@contentful/app-sdk": "^4.2.0",
50
49
  "react": ">=16.8.0"
51
50
  },
52
- "gitHead": "543e02672a8dd4edc810f9f3568d6b69c454e1f9"
51
+ "gitHead": "ca904b19ca794a2c40d82e1f7ede9e0be3560f22"
53
52
  }