@contentful/field-editor-shared 0.25.1 → 1.0.2

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 CHANGED
@@ -3,195 +3,132 @@
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
- ## [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)
6
+ ## [1.0.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@1.0.1...@contentful/field-editor-shared@1.0.2) (2021-12-20)
7
7
 
8
8
  **Note:** Version bump only for package @contentful/field-editor-shared
9
9
 
10
+ ## [1.0.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@1.0.0...@contentful/field-editor-shared@1.0.1) (2021-11-17)
10
11
 
12
+ ### Bug Fixes
11
13
 
14
+ - **card-actions:** update forma 36 to fix card actions click issue ([#927](https://github.com/contentful/field-editors/issues/927)) ([3dfdef2](https://github.com/contentful/field-editors/commit/3dfdef2c2b0045f12ea94ddafca89a8e9f25e7d0))
12
15
 
16
+ # [1.0.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-shared@0.26.0...@contentful/field-editor-shared@1.0.0) (2021-11-04)
13
17
 
14
- # [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)
18
+ **Note:** Version bump only for package @contentful/field-editor-shared
15
19
 
20
+ # [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)
16
21
 
17
22
  ### Features
18
23
 
19
- * [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))
20
-
24
+ - Forma v4 components adoption ([#805](https://github.com/contentful/field-editors/issues/805)) ([526bde6](https://github.com/contentful/field-editors/commit/526bde6e10e0ee3789705ec10fb31489af7ca59e))
21
25
 
26
+ ### BREAKING CHANGES
22
27
 
28
+ - adopts a new Forma v4 beta
23
29
 
30
+ ## [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)
24
31
 
25
- # [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)
32
+ **Note:** Version bump only for package @contentful/field-editor-shared
26
33
 
34
+ # [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)
27
35
 
28
36
  ### Features
29
37
 
30
- * add shortenStorageUnit util to shared ([#852](https://github.com/contentful/field-editors/issues/852)) ([142472b](https://github.com/contentful/field-editors/commit/142472b57fc1ca2843dd414c5320fdb5b5b11e62))
31
-
38
+ - [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))
32
39
 
40
+ # [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)
33
41
 
42
+ ### Features
34
43
 
44
+ - add shortenStorageUnit util to shared ([#852](https://github.com/contentful/field-editors/issues/852)) ([142472b](https://github.com/contentful/field-editors/commit/142472b57fc1ca2843dd414c5320fdb5b5b11e62))
35
45
 
36
46
  # [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
47
 
38
-
39
48
  ### Features
40
49
 
41
- * export shared util to validate images ([#846](https://github.com/contentful/field-editors/issues/846)) ([f26c481](https://github.com/contentful/field-editors/commit/f26c481cc5abf275acb4e4a65b462be487708117))
42
-
43
-
44
-
45
-
50
+ - 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
51
 
47
52
  ## [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
53
 
49
-
50
54
  ### Bug Fixes
51
55
 
52
- * FieldConnector setValue race conditions ([#803](https://github.com/contentful/field-editors/issues/803)) ([15a5aa6](https://github.com/contentful/field-editors/commit/15a5aa68a6f3f6c7183444c8fd11de1e70208aa7))
53
-
54
-
55
-
56
-
56
+ - FieldConnector setValue race conditions ([#803](https://github.com/contentful/field-editors/issues/803)) ([15a5aa6](https://github.com/contentful/field-editors/commit/15a5aa68a6f3f6c7183444c8fd11de1e70208aa7))
57
57
 
58
58
  # [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
59
 
60
-
61
60
  ### Features
62
61
 
63
- * 💡 new color tokens ([#778](https://github.com/contentful/field-editors/issues/778)) ([fba548d](https://github.com/contentful/field-editors/commit/fba548de32305016df7f2685634eefb14294828f))
64
-
65
-
66
-
67
-
62
+ - 💡 new color tokens ([#778](https://github.com/contentful/field-editors/issues/778)) ([fba548d](https://github.com/contentful/field-editors/commit/fba548de32305016df7f2685634eefb14294828f))
68
63
 
69
64
  # [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
65
 
71
-
72
66
  ### Features
73
67
 
74
- * [] bump forma tokens ([#756](https://github.com/contentful/field-editors/issues/756)) ([befc60f](https://github.com/contentful/field-editors/commit/befc60f9f495b0d1e072e9cba969d139da8f674a))
75
-
76
-
77
-
78
-
68
+ - [] bump forma tokens ([#756](https://github.com/contentful/field-editors/issues/756)) ([befc60f](https://github.com/contentful/field-editors/commit/befc60f9f495b0d1e072e9cba969d139da8f674a))
79
69
 
80
70
  # [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
71
 
82
-
83
72
  ### Features
84
73
 
85
- * [] bump forma tokens ([#756](https://github.com/contentful/field-editors/issues/756)) ([befc60f](https://github.com/contentful/field-editors/commit/befc60f9f495b0d1e072e9cba969d139da8f674a))
86
-
87
-
88
-
89
-
74
+ - [] bump forma tokens ([#756](https://github.com/contentful/field-editors/issues/756)) ([befc60f](https://github.com/contentful/field-editors/commit/befc60f9f495b0d1e072e9cba969d139da8f674a))
90
75
 
91
76
  # [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
77
 
93
-
94
78
  ### Features
95
79
 
96
- * [] bump forma tokens ([#756](https://github.com/contentful/field-editors/issues/756)) ([befc60f](https://github.com/contentful/field-editors/commit/befc60f9f495b0d1e072e9cba969d139da8f674a))
97
-
98
-
99
-
100
-
80
+ - [] bump forma tokens ([#756](https://github.com/contentful/field-editors/issues/756)) ([befc60f](https://github.com/contentful/field-editors/commit/befc60f9f495b0d1e072e9cba969d139da8f674a))
101
81
 
102
82
  # [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
83
 
104
-
105
84
  ### Features
106
85
 
107
- * [] bump app sdk ([#755](https://github.com/contentful/field-editors/issues/755)) ([aa0c217](https://github.com/contentful/field-editors/commit/aa0c2179d4edbb1a37453e1e3bdf0ae11991166f))
108
-
109
-
110
-
111
-
86
+ - [] bump app sdk ([#755](https://github.com/contentful/field-editors/issues/755)) ([aa0c217](https://github.com/contentful/field-editors/commit/aa0c2179d4edbb1a37453e1e3bdf0ae11991166f))
112
87
 
113
88
  # [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
89
 
115
-
116
90
  ### Features
117
91
 
118
- * [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))
119
-
120
-
121
-
122
-
92
+ - [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
93
 
124
94
  # [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
95
 
126
-
127
96
  ### Features
128
97
 
129
- * bump min version of forma-36 ([#606](https://github.com/contentful/field-editors/issues/606)) ([fd57c7a](https://github.com/contentful/field-editors/commit/fd57c7a4312766af38c01507f17706ab22992617))
130
-
131
-
132
-
133
-
98
+ - 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
99
 
135
100
  ## [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
101
 
137
-
138
102
  ### Bug Fixes
139
103
 
140
- * **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))
141
-
142
-
143
-
144
-
104
+ - **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
105
 
146
106
  # [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
107
 
148
-
149
108
  ### Features
150
109
 
151
- * 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))
152
-
153
-
154
-
155
-
110
+ - 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
111
 
157
112
  # [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
113
 
159
-
160
114
  ### Features
161
115
 
162
- * 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))
163
-
164
-
165
-
166
-
116
+ - 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
117
 
168
118
  ## [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
119
 
170
120
  **Note:** Version bump only for package @contentful/field-editor-shared
171
121
 
172
-
173
-
174
-
175
-
176
122
  ## [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
123
 
178
124
  **Note:** Version bump only for package @contentful/field-editor-shared
179
125
 
180
-
181
-
182
-
183
-
184
126
  ## [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
127
 
186
128
  **Note:** Version bump only for package @contentful/field-editor-shared
187
129
 
188
-
189
-
190
-
191
-
192
130
  # [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
131
 
194
-
195
132
  ### Features
196
133
 
197
- * 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))
134
+ - 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 forma36ReactComponents = require('@contentful/forma-36-react-components');
11
- var tokens = _interopDefault(require('@contentful/forma-36-tokens'));
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(forma36ReactComponents.Note, {
954
- noteType: "warning",
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(forma36ReactComponents.Modal, {
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(forma36ReactComponents.Modal.Header, {
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