@contentful/field-editor-slug 0.12.3 → 1.0.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 +22 -88
- 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 +9 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,192 +3,126 @@
|
|
|
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
|
+
# [1.0.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-slug@0.14.0...@contentful/field-editor-slug@1.0.0) (2021-11-04)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
9
9
|
|
|
10
|
+
# [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)
|
|
10
11
|
|
|
12
|
+
### Features
|
|
11
13
|
|
|
14
|
+
- Forma v4 components adoption ([#805](https://github.com/contentful/field-editors/issues/805)) ([526bde6](https://github.com/contentful/field-editors/commit/526bde6e10e0ee3789705ec10fb31489af7ca59e))
|
|
12
15
|
|
|
16
|
+
### BREAKING CHANGES
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
- adopts a new Forma v4 beta
|
|
15
19
|
|
|
16
|
-
|
|
20
|
+
## [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)
|
|
17
21
|
|
|
22
|
+
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
18
23
|
|
|
24
|
+
# [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)
|
|
19
25
|
|
|
26
|
+
### Features
|
|
20
27
|
|
|
28
|
+
- [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))
|
|
21
29
|
|
|
22
|
-
## [0.12.
|
|
30
|
+
## [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)
|
|
23
31
|
|
|
24
32
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
25
33
|
|
|
34
|
+
## [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)
|
|
26
35
|
|
|
36
|
+
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
27
37
|
|
|
38
|
+
## [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)
|
|
28
39
|
|
|
40
|
+
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
29
41
|
|
|
30
42
|
# [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)
|
|
31
43
|
|
|
32
|
-
|
|
33
44
|
### Features
|
|
34
45
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
46
|
+
- throttle slug editor uniqueness requests ([#799](https://github.com/contentful/field-editors/issues/799)) ([bfadaf0](https://github.com/contentful/field-editors/commit/bfadaf03a2c1a032a56218287ec30929c3581a25))
|
|
40
47
|
|
|
41
48
|
## [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)
|
|
42
49
|
|
|
43
50
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
44
51
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
52
|
# [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)
|
|
50
53
|
|
|
51
|
-
|
|
52
54
|
### Features
|
|
53
55
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
- 💡 new color tokens ([#778](https://github.com/contentful/field-editors/issues/778)) ([fba548d](https://github.com/contentful/field-editors/commit/fba548de32305016df7f2685634eefb14294828f))
|
|
59
57
|
|
|
60
58
|
## [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)
|
|
61
59
|
|
|
62
60
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
63
61
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
62
|
## [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)
|
|
69
63
|
|
|
70
64
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
71
65
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
66
|
## [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)
|
|
77
67
|
|
|
78
68
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
79
69
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
70
|
## [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)
|
|
85
71
|
|
|
86
72
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
87
73
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
74
|
## [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)
|
|
93
75
|
|
|
94
76
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
95
77
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
78
|
## [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)
|
|
101
79
|
|
|
102
80
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
103
81
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
82
|
# [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)
|
|
109
83
|
|
|
110
|
-
|
|
111
84
|
### Features
|
|
112
85
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
86
|
+
- bump min version of forma-36 ([#606](https://github.com/contentful/field-editors/issues/606)) ([fd57c7a](https://github.com/contentful/field-editors/commit/fd57c7a4312766af38c01507f17706ab22992617))
|
|
118
87
|
|
|
119
88
|
## [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)
|
|
120
89
|
|
|
121
90
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
122
91
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
92
|
# [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)
|
|
128
93
|
|
|
129
|
-
|
|
130
94
|
### Features
|
|
131
95
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
96
|
+
- 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))
|
|
137
97
|
|
|
138
98
|
# [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)
|
|
139
99
|
|
|
140
|
-
|
|
141
100
|
### Features
|
|
142
101
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
102
|
+
- 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))
|
|
148
103
|
|
|
149
104
|
# [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)
|
|
150
105
|
|
|
151
|
-
|
|
152
106
|
### Features
|
|
153
107
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
108
|
+
- 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))
|
|
159
109
|
|
|
160
110
|
## [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)
|
|
161
111
|
|
|
162
112
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
163
113
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
114
|
## [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)
|
|
169
115
|
|
|
170
116
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
171
117
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
118
|
## [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)
|
|
177
119
|
|
|
178
120
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
179
121
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
122
|
## [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)
|
|
185
123
|
|
|
186
124
|
**Note:** Version bump only for package @contentful/field-editor-slug
|
|
187
125
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
126
|
## [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)
|
|
193
127
|
|
|
194
128
|
**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"));
|