@contentful/field-editor-shared 0.25.1 → 0.26.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 +23 -100
- package/dist/field-editor-shared.cjs.development.js +10 -7
- package/dist/field-editor-shared.cjs.development.js.map +1 -1
- package/dist/field-editor-shared.cjs.production.min.js +1 -1
- package/dist/field-editor-shared.cjs.production.min.js.map +1 -1
- package/dist/field-editor-shared.esm.js +8 -5
- package/dist/field-editor-shared.esm.js.map +1 -1
- package/dist/typesEntity.d.ts +1 -1
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,195 +3,118 @@
|
|
|
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.26.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.25.1...@contentful/field-editor-shared@0.26.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.25.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.25.0...@contentful/field-editor-shared@0.25.1) (2021-10-14)
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
**Note:** Version bump only for package @contentful/field-editor-shared
|
|
15
19
|
|
|
20
|
+
# [0.25.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.24.0...@contentful/field-editor-shared@0.25.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.24.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.23.0...@contentful/field-editor-shared@0.24.0) (2021-09-17)
|
|
26
27
|
|
|
27
|
-
|
|
28
28
|
### Features
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
- add shortenStorageUnit util to shared ([#852](https://github.com/contentful/field-editors/issues/852)) ([142472b](https://github.com/contentful/field-editors/commit/142472b57fc1ca2843dd414c5320fdb5b5b11e62))
|
|
35
31
|
|
|
36
32
|
# [0.23.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.22.1...@contentful/field-editor-shared@0.23.0) (2021-09-16)
|
|
37
33
|
|
|
38
|
-
|
|
39
34
|
### Features
|
|
40
35
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
36
|
+
- export shared util to validate images ([#846](https://github.com/contentful/field-editors/issues/846)) ([f26c481](https://github.com/contentful/field-editors/commit/f26c481cc5abf275acb4e4a65b462be487708117))
|
|
46
37
|
|
|
47
38
|
## [0.22.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.22.0...@contentful/field-editor-shared@0.22.1) (2021-08-19)
|
|
48
39
|
|
|
49
|
-
|
|
50
40
|
### Bug Fixes
|
|
51
41
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
42
|
+
- FieldConnector setValue race conditions ([#803](https://github.com/contentful/field-editors/issues/803)) ([15a5aa6](https://github.com/contentful/field-editors/commit/15a5aa68a6f3f6c7183444c8fd11de1e70208aa7))
|
|
57
43
|
|
|
58
44
|
# [0.22.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.21.0...@contentful/field-editor-shared@0.22.0) (2021-07-23)
|
|
59
45
|
|
|
60
|
-
|
|
61
46
|
### Features
|
|
62
47
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
48
|
+
- 💡 new color tokens ([#778](https://github.com/contentful/field-editors/issues/778)) ([fba548d](https://github.com/contentful/field-editors/commit/fba548de32305016df7f2685634eefb14294828f))
|
|
68
49
|
|
|
69
50
|
# [0.21.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.18.0...@contentful/field-editor-shared@0.21.0) (2021-07-06)
|
|
70
51
|
|
|
71
|
-
|
|
72
52
|
### Features
|
|
73
53
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
54
|
+
- [] bump forma tokens ([#756](https://github.com/contentful/field-editors/issues/756)) ([befc60f](https://github.com/contentful/field-editors/commit/befc60f9f495b0d1e072e9cba969d139da8f674a))
|
|
79
55
|
|
|
80
56
|
# [0.20.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.18.0...@contentful/field-editor-shared@0.20.0) (2021-07-06)
|
|
81
57
|
|
|
82
|
-
|
|
83
58
|
### Features
|
|
84
59
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
60
|
+
- [] bump forma tokens ([#756](https://github.com/contentful/field-editors/issues/756)) ([befc60f](https://github.com/contentful/field-editors/commit/befc60f9f495b0d1e072e9cba969d139da8f674a))
|
|
90
61
|
|
|
91
62
|
# [0.19.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.18.0...@contentful/field-editor-shared@0.19.0) (2021-06-23)
|
|
92
63
|
|
|
93
|
-
|
|
94
64
|
### Features
|
|
95
65
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
66
|
+
- [] bump forma tokens ([#756](https://github.com/contentful/field-editors/issues/756)) ([befc60f](https://github.com/contentful/field-editors/commit/befc60f9f495b0d1e072e9cba969d139da8f674a))
|
|
101
67
|
|
|
102
68
|
# [0.18.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.17.0...@contentful/field-editor-shared@0.18.0) (2021-06-23)
|
|
103
69
|
|
|
104
|
-
|
|
105
70
|
### Features
|
|
106
71
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
72
|
+
- [] bump app sdk ([#755](https://github.com/contentful/field-editors/issues/755)) ([aa0c217](https://github.com/contentful/field-editors/commit/aa0c2179d4edbb1a37453e1e3bdf0ae11991166f))
|
|
112
73
|
|
|
113
74
|
# [0.17.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.16.0...@contentful/field-editor-shared@0.17.0) (2021-06-22)
|
|
114
75
|
|
|
115
|
-
|
|
116
76
|
### Features
|
|
117
77
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
78
|
+
- [EXT-2826] make app-sdk a peer depedency ([#748](https://github.com/contentful/field-editors/issues/748)) ([f1d1d01](https://github.com/contentful/field-editors/commit/f1d1d01d89d59d70ab2c831a513ab2580ea64d7e))
|
|
123
79
|
|
|
124
80
|
# [0.16.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.15.1...@contentful/field-editor-shared@0.16.0) (2021-02-19)
|
|
125
81
|
|
|
126
|
-
|
|
127
82
|
### Features
|
|
128
83
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
84
|
+
- bump min version of forma-36 ([#606](https://github.com/contentful/field-editors/issues/606)) ([fd57c7a](https://github.com/contentful/field-editors/commit/fd57c7a4312766af38c01507f17706ab22992617))
|
|
134
85
|
|
|
135
86
|
## [0.15.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.15.0...@contentful/field-editor-shared@0.15.1) (2021-02-09)
|
|
136
87
|
|
|
137
|
-
|
|
138
88
|
### Bug Fixes
|
|
139
89
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
90
|
+
- **tags:** Editor permissions handles entities with metadata ([#584](https://github.com/contentful/field-editors/issues/584)) ([32636da](https://github.com/contentful/field-editors/commit/32636daf05e0ba9abb47eafe9893850db2c6601f))
|
|
145
91
|
|
|
146
92
|
# [0.15.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.14.0...@contentful/field-editor-shared@0.15.0) (2021-02-01)
|
|
147
93
|
|
|
148
|
-
|
|
149
94
|
### Features
|
|
150
95
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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))
|
|
156
97
|
|
|
157
98
|
# [0.14.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.13.3...@contentful/field-editor-shared@0.14.0) (2021-01-20)
|
|
158
99
|
|
|
159
|
-
|
|
160
100
|
### Features
|
|
161
101
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
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))
|
|
167
103
|
|
|
168
104
|
## [0.13.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.13.2...@contentful/field-editor-shared@0.13.3) (2021-01-12)
|
|
169
105
|
|
|
170
106
|
**Note:** Version bump only for package @contentful/field-editor-shared
|
|
171
107
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
108
|
## [0.13.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.13.1...@contentful/field-editor-shared@0.13.2) (2020-12-16)
|
|
177
109
|
|
|
178
110
|
**Note:** Version bump only for package @contentful/field-editor-shared
|
|
179
111
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
112
|
## [0.13.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.13.0...@contentful/field-editor-shared@0.13.1) (2020-11-06)
|
|
185
113
|
|
|
186
114
|
**Note:** Version bump only for package @contentful/field-editor-shared
|
|
187
115
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
116
|
# [0.13.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.12.0...@contentful/field-editor-shared@0.13.0) (2020-08-24)
|
|
193
117
|
|
|
194
|
-
|
|
195
118
|
### Features
|
|
196
119
|
|
|
197
|
-
|
|
120
|
+
- extract field component to default-field-editors package ([#365](https://github.com/contentful/field-editors/issues/365)) ([eb78219](https://github.com/contentful/field-editors/commit/eb78219d52c3dcfb91824f3106f44312aaaf1f8e))
|
|
@@ -7,11 +7,12 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
|
|
|
7
7
|
var React = _interopDefault(require('react'));
|
|
8
8
|
var isEqual = _interopDefault(require('lodash/isEqual'));
|
|
9
9
|
var throttle = _interopDefault(require('lodash/throttle'));
|
|
10
|
-
var
|
|
11
|
-
var tokens = _interopDefault(require('@contentful/
|
|
10
|
+
var f36Note = require('@contentful/f36-note');
|
|
11
|
+
var tokens = _interopDefault(require('@contentful/f36-tokens'));
|
|
12
12
|
var emotion = require('emotion');
|
|
13
13
|
var isNumber = _interopDefault(require('lodash/isNumber'));
|
|
14
14
|
var ReactDOM = _interopDefault(require('react-dom'));
|
|
15
|
+
var f36Components = require('@contentful/f36-components');
|
|
15
16
|
var get = _interopDefault(require('lodash/get'));
|
|
16
17
|
var isObject = _interopDefault(require('lodash/isObject'));
|
|
17
18
|
var isString = _interopDefault(require('lodash/isString'));
|
|
@@ -950,8 +951,8 @@ FieldConnector.defaultProps = {
|
|
|
950
951
|
};
|
|
951
952
|
|
|
952
953
|
function PredefinedValuesError() {
|
|
953
|
-
return React.createElement(
|
|
954
|
-
|
|
954
|
+
return React.createElement(f36Note.Note, {
|
|
955
|
+
variant: "warning",
|
|
955
956
|
testId: "predefined-values-warning"
|
|
956
957
|
}, "The widget failed to initialize. You can fix the problem by providing predefined values under the validations tab in the field settings.");
|
|
957
958
|
}
|
|
@@ -1021,7 +1022,9 @@ function open(componentRenderer) {
|
|
|
1021
1022
|
currentConfig = _extends({}, currentConfig, {
|
|
1022
1023
|
isShown: false
|
|
1023
1024
|
});
|
|
1024
|
-
render(currentConfig);
|
|
1025
|
+
render(currentConfig); // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1026
|
+
// @ts-ignore
|
|
1027
|
+
|
|
1025
1028
|
resolve.apply(void 0, arguments);
|
|
1026
1029
|
getRoot().remove();
|
|
1027
1030
|
}
|
|
@@ -1040,7 +1043,7 @@ function openDialog(options, Component) {
|
|
|
1040
1043
|
return onClose();
|
|
1041
1044
|
};
|
|
1042
1045
|
|
|
1043
|
-
return React.createElement(
|
|
1046
|
+
return React.createElement(f36Components.Modal, {
|
|
1044
1047
|
key: key,
|
|
1045
1048
|
shouldCloseOnOverlayClick: options.shouldCloseOnOverlayClick || false,
|
|
1046
1049
|
shouldCloseOnEscapePress: options.shouldCloseOnEscapePress || false,
|
|
@@ -1050,7 +1053,7 @@ function openDialog(options, Component) {
|
|
|
1050
1053
|
onClose: onCloseHandler,
|
|
1051
1054
|
size: size || '700px'
|
|
1052
1055
|
}, function () {
|
|
1053
|
-
return React.createElement(React.Fragment, null, options.title && React.createElement(
|
|
1056
|
+
return React.createElement(React.Fragment, null, options.title && React.createElement(f36Components.ModalHeader, {
|
|
1054
1057
|
testId: "dialog-title",
|
|
1055
1058
|
title: options.title,
|
|
1056
1059
|
onClose: onCloseHandler
|