@contentful/field-editor-slug 1.3.1 → 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.
@@ -115,7 +115,7 @@ function SlugEditor(props) {
115
115
  }, ({ titleValue , isPublished , isSame })=>_react.createElement(_fieldeditorshared.FieldConnector, {
116
116
  field: field,
117
117
  isInitiallyDisabled: props.isInitiallyDisabled,
118
- throttle: 0
118
+ debounce: 0
119
119
  }, ({ value , errors , disabled , setValue , externalReset })=>{
120
120
  const shouldTrackTitle = isPublished === false && isSame === false;
121
121
  const Component = shouldTrackTitle ? _SlugEditorField.SlugEditorField : _SlugEditorField.SlugEditorFieldStatic;
@@ -5,14 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  const _react = _interop_require_wildcard(require("react"));
6
6
  const _fieldeditortestutils = require("@contentful/field-editor-test-utils");
7
7
  const _react1 = require("@testing-library/react");
8
- const _identity = _interop_require_default(require("lodash/identity"));
9
8
  require("@testing-library/jest-dom/extend-expect");
10
9
  const _SlugEditor = require("./SlugEditor");
11
- function _interop_require_default(obj) {
12
- return obj && obj.__esModule ? obj : {
13
- default: obj
14
- };
15
- }
16
10
  function _getRequireWildcardCache(nodeInterop) {
17
11
  if (typeof WeakMap !== "function") return null;
18
12
  var cacheBabelInterop = new WeakMap();
@@ -55,11 +49,6 @@ function _interop_require_wildcard(obj, nodeInterop) {
55
49
  (0, _react1.configure)({
56
50
  testIdAttribute: 'data-test-id'
57
51
  });
58
- jest.mock('lodash/throttle', ()=>({
59
- default: _identity.default
60
- }), {
61
- virtual: true
62
- });
63
52
  jest.mock('use-debounce', ()=>({
64
53
  useDebounce: (text)=>[
65
54
  text
@@ -66,7 +66,7 @@ export function SlugEditor(props) {
66
66
  }, ({ titleValue , isPublished , isSame })=>React.createElement(FieldConnector, {
67
67
  field: field,
68
68
  isInitiallyDisabled: props.isInitiallyDisabled,
69
- throttle: 0
69
+ debounce: 0
70
70
  }, ({ value , errors , disabled , setValue , externalReset })=>{
71
71
  const shouldTrackTitle = isPublished === false && isSame === false;
72
72
  const Component = shouldTrackTitle ? SlugEditorField : SlugEditorFieldStatic;
@@ -1,17 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { createFakeFieldAPI, createFakeLocalesAPI } from '@contentful/field-editor-test-utils';
3
3
  import { cleanup, configure, fireEvent, render, waitFor } from '@testing-library/react';
4
- import identity from 'lodash/identity';
5
4
  import '@testing-library/jest-dom/extend-expect';
6
5
  import { SlugEditor } from './SlugEditor';
7
6
  configure({
8
7
  testIdAttribute: 'data-test-id'
9
8
  });
10
- jest.mock('lodash/throttle', ()=>({
11
- default: identity
12
- }), {
13
- virtual: true
14
- });
15
9
  jest.mock('use-debounce', ()=>({
16
10
  useDebounce: (text)=>[
17
11
  text
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-slug",
3
- "version": "1.3.1",
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",
@@ -38,21 +38,20 @@
38
38
  "@contentful/f36-components": "^4.0.27",
39
39
  "@contentful/f36-icons": "^4.1.0",
40
40
  "@contentful/f36-tokens": "^4.0.0",
41
- "@contentful/field-editor-shared": "^1.3.0",
41
+ "@contentful/field-editor-shared": "^1.4.0",
42
42
  "@types/speakingurl": "^13.0.2",
43
43
  "emotion": "^10.0.17",
44
44
  "lodash": "^4.17.15",
45
- "lodash-es": "^4.17.15",
46
45
  "speakingurl": "^13.0.0",
47
46
  "use-debounce": "^7.0.0"
48
47
  },
49
48
  "devDependencies": {
50
49
  "@contentful/app-sdk": "^4.2.0",
51
- "@contentful/field-editor-test-utils": "^1.4.0"
50
+ "@contentful/field-editor-test-utils": "^1.4.1"
52
51
  },
53
52
  "peerDependencies": {
54
53
  "@contentful/app-sdk": "^4.2.0",
55
54
  "react": ">=16.8.0"
56
55
  },
57
- "gitHead": "83b651f1638ad6bab53565479e76b8d29b86af3a"
56
+ "gitHead": "2db95226af0417c42aae8d1be85796fc8774e283"
58
57
  }