@contentful/field-editor-slug 0.13.1 → 0.14.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.
- package/CHANGELOG.md +15 -104
- package/README.md +0 -1
- package/dist/field-editor-slug.cjs.development.js +11 -14
- package/dist/field-editor-slug.cjs.development.js.map +1 -1
- package/dist/field-editor-slug.cjs.production.min.js +1 -1
- package/dist/field-editor-slug.cjs.production.min.js.map +1 -1
- package/dist/field-editor-slug.esm.js +8 -11
- package/dist/field-editor-slug.esm.js.map +1 -1
- package/package.json +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,211 +3,122 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# [0.14.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.13.1...@contentful/field-editor-slug@0.14.0) (2021-11-04)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
### Features
|
|
9
9
|
|
|
10
|
+
- Forma v4 components adoption ([#805](https://github.com/contentful/field-editors/issues/805)) ([526bde6](https://github.com/contentful/field-editors/commit/526bde6e10e0ee3789705ec10fb31489af7ca59e))
|
|
10
11
|
|
|
12
|
+
### BREAKING CHANGES
|
|
11
13
|
|
|
14
|
+
- adopts a new Forma v4 beta
|
|
12
15
|
|
|
16
|
+
## [0.13.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.13.0...@contentful/field-editor-slug@0.13.1) (2021-10-14)
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
15
19
|
|
|
20
|
+
# [0.13.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.12.3...@contentful/field-editor-slug@0.13.0) (2021-10-06)
|
|
16
21
|
|
|
17
22
|
### Features
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
- [EXT-3161] bump app sdk to v4 ([#881](https://github.com/contentful/field-editors/issues/881)) ([9c4a2af](https://github.com/contentful/field-editors/commit/9c4a2af07da203d59fb5f15c3a5188ecc64b1d44))
|
|
24
25
|
|
|
25
26
|
## [0.12.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.12.2...@contentful/field-editor-slug@0.12.3) (2021-09-17)
|
|
26
27
|
|
|
27
28
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
30
|
## [0.12.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.12.1...@contentful/field-editor-slug@0.12.2) (2021-09-16)
|
|
34
31
|
|
|
35
32
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
36
33
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
34
|
## [0.12.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.12.0...@contentful/field-editor-slug@0.12.1) (2021-08-19)
|
|
42
35
|
|
|
43
36
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
44
37
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
38
|
# [0.12.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.11.1...@contentful/field-editor-slug@0.12.0) (2021-08-11)
|
|
50
39
|
|
|
51
|
-
|
|
52
40
|
### Features
|
|
53
41
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
42
|
+
- throttle slug editor uniqueness requests ([#799](https://github.com/contentful/field-editors/issues/799)) ([bfadaf0](https://github.com/contentful/field-editors/commit/bfadaf03a2c1a032a56218287ec30929c3581a25))
|
|
59
43
|
|
|
60
44
|
## [0.11.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.11.0...@contentful/field-editor-slug@0.11.1) (2021-07-29)
|
|
61
45
|
|
|
62
46
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
63
47
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
48
|
# [0.11.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.10.6...@contentful/field-editor-slug@0.11.0) (2021-07-23)
|
|
69
49
|
|
|
70
|
-
|
|
71
50
|
### Features
|
|
72
51
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
52
|
+
- 💡 new color tokens ([#778](https://github.com/contentful/field-editors/issues/778)) ([fba548d](https://github.com/contentful/field-editors/commit/fba548de32305016df7f2685634eefb14294828f))
|
|
78
53
|
|
|
79
54
|
## [0.10.6](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.10.3...@contentful/field-editor-slug@0.10.6) (2021-07-06)
|
|
80
55
|
|
|
81
56
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
82
57
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
58
|
## [0.10.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.10.3...@contentful/field-editor-slug@0.10.5) (2021-07-06)
|
|
88
59
|
|
|
89
60
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
90
61
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
62
|
## [0.10.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.10.3...@contentful/field-editor-slug@0.10.4) (2021-06-23)
|
|
96
63
|
|
|
97
64
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
98
65
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
66
|
## [0.10.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.10.2...@contentful/field-editor-slug@0.10.3) (2021-06-23)
|
|
104
67
|
|
|
105
68
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
106
69
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
70
|
## [0.10.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.10.1...@contentful/field-editor-slug@0.10.2) (2021-06-22)
|
|
112
71
|
|
|
113
72
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
114
73
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
74
|
## [0.10.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.10.0...@contentful/field-editor-slug@0.10.1) (2021-03-05)
|
|
120
75
|
|
|
121
76
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
122
77
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
78
|
# [0.10.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.9.1...@contentful/field-editor-slug@0.10.0) (2021-02-19)
|
|
128
79
|
|
|
129
|
-
|
|
130
80
|
### Features
|
|
131
81
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
82
|
+
- bump min version of forma-36 ([#606](https://github.com/contentful/field-editors/issues/606)) ([fd57c7a](https://github.com/contentful/field-editors/commit/fd57c7a4312766af38c01507f17706ab22992617))
|
|
137
83
|
|
|
138
84
|
## [0.9.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.9.0...@contentful/field-editor-slug@0.9.1) (2021-02-09)
|
|
139
85
|
|
|
140
86
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
141
87
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
88
|
# [0.9.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.8.0...@contentful/field-editor-slug@0.9.0) (2021-02-01)
|
|
147
89
|
|
|
148
|
-
|
|
149
90
|
### Features
|
|
150
91
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
92
|
+
- swap ui-extension-sdk to app-sdk ([#576](https://github.com/contentful/field-editors/issues/576)) ([ac88b4b](https://github.com/contentful/field-editors/commit/ac88b4bd4573a72f521246fc8fcc873520ca90d4))
|
|
156
93
|
|
|
157
94
|
# [0.8.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.7.0...@contentful/field-editor-slug@0.8.0) (2021-01-20)
|
|
158
95
|
|
|
159
|
-
|
|
160
96
|
### Features
|
|
161
97
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
98
|
+
- update minimal forma-36 versions to use updated design ([#565](https://github.com/contentful/field-editors/issues/565)) ([332c734](https://github.com/contentful/field-editors/commit/332c734bfaf54f0e9773fcbb460d743b1f5459ec))
|
|
167
99
|
|
|
168
100
|
# [0.7.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.6.5...@contentful/field-editor-slug@0.7.0) (2021-01-12)
|
|
169
101
|
|
|
170
|
-
|
|
171
102
|
### Features
|
|
172
103
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
104
|
+
- update minimal required Forma version to the 3.73.12 ([#552](https://github.com/contentful/field-editors/issues/552)) ([2816fd9](https://github.com/contentful/field-editors/commit/2816fd960c28815faebf49a9ef8f4c4c0d91fc36))
|
|
178
105
|
|
|
179
106
|
## [0.6.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.6.4...@contentful/field-editor-slug@0.6.5) (2020-12-16)
|
|
180
107
|
|
|
181
108
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
182
109
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
110
|
## [0.6.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.6.3...@contentful/field-editor-slug@0.6.4) (2020-11-06)
|
|
188
111
|
|
|
189
112
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
190
113
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
114
|
## [0.6.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.6.2...@contentful/field-editor-slug@0.6.3) (2020-11-06)
|
|
196
115
|
|
|
197
116
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
198
117
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
118
|
## [0.6.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.6.1...@contentful/field-editor-slug@0.6.2) (2020-10-28)
|
|
204
119
|
|
|
205
120
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
206
121
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
122
|
## [0.6.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.6.0...@contentful/field-editor-slug@0.6.1) (2020-08-24)
|
|
212
123
|
|
|
213
124
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
package/README.md
CHANGED
|
@@ -7,6 +7,5 @@ npm install @contentful/field-editor-slug
|
|
|
7
7
|
This package contains a React `SlugEditor` component that is used as a default for the `Symbol` field type in the Contentful web application.
|
|
8
8
|
|
|
9
9
|
```js
|
|
10
|
-
import '@contentful/forma-36-react-components/dist/styles.css';
|
|
11
10
|
import { SlugEditor } from '@contentful/field-editor-slug';
|
|
12
11
|
```
|
|
@@ -8,10 +8,11 @@ var React = require('react');
|
|
|
8
8
|
var React__default = _interopDefault(React);
|
|
9
9
|
var fieldEditorShared = require('@contentful/field-editor-shared');
|
|
10
10
|
var useDebounce = require('use-debounce');
|
|
11
|
-
var forma36ReactComponents = require('@contentful/forma-36-react-components');
|
|
12
11
|
var getSlug = _interopDefault(require('speakingurl'));
|
|
13
|
-
var tokens = _interopDefault(require('@contentful/
|
|
12
|
+
var tokens = _interopDefault(require('@contentful/f36-tokens'));
|
|
14
13
|
var emotion = require('emotion');
|
|
14
|
+
var f36Components = require('@contentful/f36-components');
|
|
15
|
+
var f36Icons = require('@contentful/f36-icons');
|
|
15
16
|
|
|
16
17
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
17
18
|
try {
|
|
@@ -983,9 +984,7 @@ var inputContainer = /*#__PURE__*/emotion.css({
|
|
|
983
984
|
position: 'relative'
|
|
984
985
|
});
|
|
985
986
|
var input = /*#__PURE__*/emotion.css({
|
|
986
|
-
|
|
987
|
-
paddingLeft: '40px'
|
|
988
|
-
}
|
|
987
|
+
paddingLeft: '40px'
|
|
989
988
|
});
|
|
990
989
|
var icon = /*#__PURE__*/emotion.css({
|
|
991
990
|
position: 'absolute',
|
|
@@ -1072,13 +1071,12 @@ function SlugEditorFieldStatic(props) {
|
|
|
1072
1071
|
var status = useUniqueChecker(props);
|
|
1073
1072
|
return React__default.createElement("div", {
|
|
1074
1073
|
className: inputContainer
|
|
1075
|
-
}, React__default.createElement(
|
|
1076
|
-
icon: "Link",
|
|
1074
|
+
}, React__default.createElement(f36Icons.LinkIcon, {
|
|
1077
1075
|
className: icon
|
|
1078
|
-
}), React__default.createElement(
|
|
1076
|
+
}), React__default.createElement(f36Components.TextInput, {
|
|
1079
1077
|
className: input,
|
|
1080
|
-
|
|
1081
|
-
|
|
1078
|
+
isInvalid: hasError || status === 'duplicate',
|
|
1079
|
+
isDisabled: isDisabled,
|
|
1082
1080
|
value: value || '',
|
|
1083
1081
|
onChange: function onChange(e) {
|
|
1084
1082
|
setValue(e.target.value);
|
|
@@ -1094,10 +1092,9 @@ function SlugEditorFieldStatic(props) {
|
|
|
1094
1092
|
}
|
|
1095
1093
|
}), status === 'checking' && React__default.createElement("div", {
|
|
1096
1094
|
className: spinnerContainer
|
|
1097
|
-
}, React__default.createElement(
|
|
1098
|
-
testId: "slug-editor-spinner"
|
|
1099
|
-
|
|
1100
|
-
})), status === 'duplicate' && React__default.createElement(forma36ReactComponents.ValidationMessage, {
|
|
1095
|
+
}, React__default.createElement(f36Components.Spinner, {
|
|
1096
|
+
testId: "slug-editor-spinner"
|
|
1097
|
+
})), status === 'duplicate' && React__default.createElement(f36Components.ValidationMessage, {
|
|
1101
1098
|
testId: "slug-editor-duplicate-error",
|
|
1102
1099
|
className: uniqueValidationError
|
|
1103
1100
|
}, "This slug has already been published in another entry"));
|