@contentful/field-editor-url 0.12.6 → 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,194 +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
- ## [0.12.6](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.12.5...@contentful/field-editor-url@0.12.6) (2021-10-14)
6
+ ## [1.0.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@1.0.1...@contentful/field-editor-url@1.0.2) (2021-12-20)
7
7
 
8
8
  **Note:** Version bump only for package @contentful/field-editor-url
9
9
 
10
+ ## [1.0.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@1.0.0...@contentful/field-editor-url@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
 
13
-
14
- ## [0.12.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.12.4...@contentful/field-editor-url@0.12.5) (2021-10-06)
16
+ # [1.0.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.13.0...@contentful/field-editor-url@1.0.0) (2021-11-04)
15
17
 
16
18
  **Note:** Version bump only for package @contentful/field-editor-url
17
19
 
20
+ # [0.13.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.12.6...@contentful/field-editor-url@0.13.0) (2021-11-04)
18
21
 
22
+ ### Features
19
23
 
24
+ - Forma v4 components adoption ([#805](https://github.com/contentful/field-editors/issues/805)) ([526bde6](https://github.com/contentful/field-editors/commit/526bde6e10e0ee3789705ec10fb31489af7ca59e))
20
25
 
26
+ ### BREAKING CHANGES
21
27
 
22
- ## [0.12.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.12.3...@contentful/field-editor-url@0.12.4) (2021-09-17)
28
+ - adopts a new Forma v4 beta
29
+
30
+ ## [0.12.6](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.12.5...@contentful/field-editor-url@0.12.6) (2021-10-14)
23
31
 
24
32
  **Note:** Version bump only for package @contentful/field-editor-url
25
33
 
34
+ ## [0.12.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.12.4...@contentful/field-editor-url@0.12.5) (2021-10-06)
26
35
 
36
+ **Note:** Version bump only for package @contentful/field-editor-url
27
37
 
38
+ ## [0.12.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.12.3...@contentful/field-editor-url@0.12.4) (2021-09-17)
28
39
 
40
+ **Note:** Version bump only for package @contentful/field-editor-url
29
41
 
30
42
  ## [0.12.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.12.2...@contentful/field-editor-url@0.12.3) (2021-09-16)
31
43
 
32
44
  **Note:** Version bump only for package @contentful/field-editor-url
33
45
 
34
-
35
-
36
-
37
-
38
46
  ## [0.12.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.12.1...@contentful/field-editor-url@0.12.2) (2021-08-19)
39
47
 
40
48
  **Note:** Version bump only for package @contentful/field-editor-url
41
49
 
42
-
43
-
44
-
45
-
46
50
  ## [0.12.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.12.0...@contentful/field-editor-url@0.12.1) (2021-07-29)
47
51
 
48
52
  **Note:** Version bump only for package @contentful/field-editor-url
49
53
 
50
-
51
-
52
-
53
-
54
54
  # [0.12.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.11.6...@contentful/field-editor-url@0.12.0) (2021-07-23)
55
55
 
56
-
57
56
  ### Features
58
57
 
59
- * 💡 new color tokens ([#778](https://github.com/contentful/field-editors/issues/778)) ([fba548d](https://github.com/contentful/field-editors/commit/fba548de32305016df7f2685634eefb14294828f))
60
-
61
-
62
-
63
-
58
+ - 💡 new color tokens ([#778](https://github.com/contentful/field-editors/issues/778)) ([fba548d](https://github.com/contentful/field-editors/commit/fba548de32305016df7f2685634eefb14294828f))
64
59
 
65
60
  ## [0.11.6](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.11.3...@contentful/field-editor-url@0.11.6) (2021-07-06)
66
61
 
67
62
  **Note:** Version bump only for package @contentful/field-editor-url
68
63
 
69
-
70
-
71
-
72
-
73
64
  ## [0.11.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.11.3...@contentful/field-editor-url@0.11.5) (2021-07-06)
74
65
 
75
66
  **Note:** Version bump only for package @contentful/field-editor-url
76
67
 
77
-
78
-
79
-
80
-
81
68
  ## [0.11.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.11.3...@contentful/field-editor-url@0.11.4) (2021-06-23)
82
69
 
83
70
  **Note:** Version bump only for package @contentful/field-editor-url
84
71
 
85
-
86
-
87
-
88
-
89
72
  ## [0.11.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.11.2...@contentful/field-editor-url@0.11.3) (2021-06-23)
90
73
 
91
74
  **Note:** Version bump only for package @contentful/field-editor-url
92
75
 
93
-
94
-
95
-
96
-
97
76
  ## [0.11.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.11.1...@contentful/field-editor-url@0.11.2) (2021-06-22)
98
77
 
99
78
  **Note:** Version bump only for package @contentful/field-editor-url
100
79
 
101
-
102
-
103
-
104
-
105
80
  ## [0.11.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.11.0...@contentful/field-editor-url@0.11.1) (2021-03-05)
106
81
 
107
82
  **Note:** Version bump only for package @contentful/field-editor-url
108
83
 
109
-
110
-
111
-
112
-
113
84
  # [0.11.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.10.2...@contentful/field-editor-url@0.11.0) (2021-02-19)
114
85
 
115
-
116
86
  ### Features
117
87
 
118
- * bump min version of forma-36 ([#606](https://github.com/contentful/field-editors/issues/606)) ([fd57c7a](https://github.com/contentful/field-editors/commit/fd57c7a4312766af38c01507f17706ab22992617))
119
-
120
-
121
-
122
-
88
+ - bump min version of forma-36 ([#606](https://github.com/contentful/field-editors/issues/606)) ([fd57c7a](https://github.com/contentful/field-editors/commit/fd57c7a4312766af38c01507f17706ab22992617))
123
89
 
124
90
  ## [0.10.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.10.1...@contentful/field-editor-url@0.10.2) (2021-02-09)
125
91
 
126
92
  **Note:** Version bump only for package @contentful/field-editor-url
127
93
 
128
-
129
-
130
-
131
-
132
94
  ## [0.10.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.10.0...@contentful/field-editor-url@0.10.1) (2021-02-01)
133
95
 
134
96
  **Note:** Version bump only for package @contentful/field-editor-url
135
97
 
136
-
137
-
138
-
139
-
140
98
  # [0.10.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.9.0...@contentful/field-editor-url@0.10.0) (2021-01-20)
141
99
 
142
-
143
100
  ### Features
144
101
 
145
- * 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))
146
-
147
-
148
-
149
-
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))
150
103
 
151
104
  # [0.9.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.8.5...@contentful/field-editor-url@0.9.0) (2021-01-12)
152
105
 
153
-
154
106
  ### Features
155
107
 
156
- * 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))
157
-
158
-
159
-
160
-
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))
161
109
 
162
110
  ## [0.8.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.8.4...@contentful/field-editor-url@0.8.5) (2020-12-16)
163
111
 
164
112
  **Note:** Version bump only for package @contentful/field-editor-url
165
113
 
166
-
167
-
168
-
169
-
170
114
  ## [0.8.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.8.3...@contentful/field-editor-url@0.8.4) (2020-11-06)
171
115
 
172
116
  **Note:** Version bump only for package @contentful/field-editor-url
173
117
 
174
-
175
-
176
-
177
-
178
118
  ## [0.8.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.8.2...@contentful/field-editor-url@0.8.3) (2020-11-06)
179
119
 
180
120
  **Note:** Version bump only for package @contentful/field-editor-url
181
121
 
182
-
183
-
184
-
185
-
186
122
  ## [0.8.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.8.1...@contentful/field-editor-url@0.8.2) (2020-10-28)
187
123
 
188
124
  **Note:** Version bump only for package @contentful/field-editor-url
189
125
 
190
-
191
-
192
-
193
-
194
126
  ## [0.8.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-url@0.8.0...@contentful/field-editor-url@0.8.1) (2020-08-24)
195
127
 
196
128
  **Note:** Version bump only for package @contentful/field-editor-url
package/README.md CHANGED
@@ -7,6 +7,5 @@ npm install @contentful/field-editor-url
7
7
  This package contains a React `UrlEditor` 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 { UrlEditor } from '@contentful/field-editor-url';
12
11
  ```
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
- var forma36ReactComponents = require('@contentful/forma-36-react-components');
7
6
  var fieldEditorShared = require('@contentful/field-editor-shared');
7
+ var f36Components = require('@contentful/f36-components');
8
8
 
9
9
  function UrlEditor(props) {
10
10
  var field = props.field;
@@ -18,10 +18,10 @@ function UrlEditor(props) {
18
18
  setValue = _ref.setValue;
19
19
  return React.createElement("div", {
20
20
  "data-test-id": "url-editor"
21
- }, React.createElement(forma36ReactComponents.TextInput, {
22
- required: field.required,
23
- error: errors.length > 0,
24
- disabled: disabled,
21
+ }, React.createElement(f36Components.TextInput, {
22
+ isRequired: field.required,
23
+ isInvalid: errors.length > 0,
24
+ isDisabled: disabled,
25
25
  value: value || '',
26
26
  onChange: function onChange(e) {
27
27
  setValue(e.target.value);
@@ -1 +1 @@
1
- {"version":3,"file":"field-editor-url.cjs.development.js","sources":["../src/UrlEditor.tsx"],"sourcesContent":["import * as React from 'react';\nimport { TextInput } from '@contentful/forma-36-react-components';\nimport { FieldAPI, FieldConnector } from '@contentful/field-editor-shared';\n\nexport interface UrlEditorProps {\n /**\n * is the field disabled initially\n */\n isInitiallyDisabled: boolean;\n\n /**\n * sdk.field\n */\n field: FieldAPI;\n\n children?: (props: { value: string | null | undefined }) => React.ReactNode;\n}\n\nexport function UrlEditor(props: UrlEditorProps) {\n const { field } = props;\n\n return (\n <FieldConnector<string> field={field} isInitiallyDisabled={props.isInitiallyDisabled}>\n {({ value, errors, disabled, setValue }) => {\n return (\n <div data-test-id=\"url-editor\">\n <TextInput\n required={field.required}\n error={errors.length > 0}\n disabled={disabled}\n value={value || ''}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) => {\n setValue(e.target.value);\n }}\n />\n {typeof props.children === 'function' ? props.children({ value }) : null}\n </div>\n );\n }}\n </FieldConnector>\n );\n}\n\nUrlEditor.defaultProps = {\n isInitiallyDisabled: true,\n};\n"],"names":["UrlEditor","props","field","React","FieldConnector","isInitiallyDisabled","value","errors","disabled","setValue","TextInput","required","error","length","onChange","e","target","children","defaultProps"],"mappings":";;;;;;;;SAkBgBA,UAAUC;AACxB,MAAQC,KAAR,GAAkBD,KAAlB,CAAQC,KAAR;AAEA,SACEC,mBAAA,CAACC,gCAAD;AAAwBF,IAAAA,KAAK,EAAEA;AAAOG,IAAAA,mBAAmB,EAAEJ,KAAK,CAACI;GAAjE,EACG;QAAGC,aAAAA;QAAOC,cAAAA;QAAQC,gBAAAA;QAAUC,gBAAAA;AAC3B,WACEN,mBAAA,MAAA;sBAAkB;KAAlB,EACEA,mBAAA,CAACO,gCAAD;AACEC,MAAAA,QAAQ,EAAET,KAAK,CAACS;AAChBC,MAAAA,KAAK,EAAEL,MAAM,CAACM,MAAP,GAAgB;AACvBL,MAAAA,QAAQ,EAAEA;AACVF,MAAAA,KAAK,EAAEA,KAAK,IAAI;AAChBQ,MAAAA,QAAQ,EAAE,kBAACC,CAAD;AACRN,QAAAA,QAAQ,CAACM,CAAC,CAACC,MAAF,CAASV,KAAV,CAAR;AACD;KAPH,CADF,EAUG,OAAOL,KAAK,CAACgB,QAAb,KAA0B,UAA1B,GAAuChB,KAAK,CAACgB,QAAN,CAAe;AAAEX,MAAAA,KAAK,EAALA;AAAF,KAAf,CAAvC,GAAmE,IAVtE,CADF;AAcD,GAhBH,CADF;AAoBD;AAEDN,SAAS,CAACkB,YAAV,GAAyB;AACvBb,EAAAA,mBAAmB,EAAE;AADE,CAAzB;;;;"}
1
+ {"version":3,"file":"field-editor-url.cjs.development.js","sources":["../src/UrlEditor.tsx"],"sourcesContent":["import * as React from 'react';\nimport { FieldAPI, FieldConnector } from '@contentful/field-editor-shared';\n\nimport { TextInput } from '@contentful/f36-components';\n\nexport interface UrlEditorProps {\n /**\n * is the field disabled initially\n */\n isInitiallyDisabled: boolean;\n\n /**\n * sdk.field\n */\n field: FieldAPI;\n\n children?: (props: { value: string | null | undefined }) => React.ReactNode;\n}\n\nexport function UrlEditor(props: UrlEditorProps) {\n const { field } = props;\n\n return (\n <FieldConnector<string> field={field} isInitiallyDisabled={props.isInitiallyDisabled}>\n {({ value, errors, disabled, setValue }) => {\n return (\n <div data-test-id=\"url-editor\">\n <TextInput\n isRequired={field.required}\n isInvalid={errors.length > 0}\n isDisabled={disabled}\n value={value || ''}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) => {\n setValue(e.target.value);\n }}\n />\n {typeof props.children === 'function' ? props.children({ value }) : null}\n </div>\n );\n }}\n </FieldConnector>\n );\n}\n\nUrlEditor.defaultProps = {\n isInitiallyDisabled: true,\n};\n"],"names":["UrlEditor","props","field","React","FieldConnector","isInitiallyDisabled","value","errors","disabled","setValue","TextInput","isRequired","required","isInvalid","length","isDisabled","onChange","e","target","children","defaultProps"],"mappings":";;;;;;;;SAmBgBA,UAAUC;AACxB,MAAQC,KAAR,GAAkBD,KAAlB,CAAQC,KAAR;AAEA,SACEC,mBAAA,CAACC,gCAAD;AAAwBF,IAAAA,KAAK,EAAEA;AAAOG,IAAAA,mBAAmB,EAAEJ,KAAK,CAACI;GAAjE,EACG;QAAGC,aAAAA;QAAOC,cAAAA;QAAQC,gBAAAA;QAAUC,gBAAAA;AAC3B,WACEN,mBAAA,MAAA;sBAAkB;KAAlB,EACEA,mBAAA,CAACO,uBAAD;AACEC,MAAAA,UAAU,EAAET,KAAK,CAACU;AAClBC,MAAAA,SAAS,EAAEN,MAAM,CAACO,MAAP,GAAgB;AAC3BC,MAAAA,UAAU,EAAEP;AACZF,MAAAA,KAAK,EAAEA,KAAK,IAAI;AAChBU,MAAAA,QAAQ,EAAE,kBAACC,CAAD;AACRR,QAAAA,QAAQ,CAACQ,CAAC,CAACC,MAAF,CAASZ,KAAV,CAAR;AACD;KAPH,CADF,EAUG,OAAOL,KAAK,CAACkB,QAAb,KAA0B,UAA1B,GAAuClB,KAAK,CAACkB,QAAN,CAAe;AAAEb,MAAAA,KAAK,EAALA;AAAF,KAAf,CAAvC,GAAmE,IAVtE,CADF;AAcD,GAhBH,CADF;AAoBD;AAEDN,SAAS,CAACoB,YAAV,GAAyB;AACvBf,EAAAA,mBAAmB,EAAE;AADE,CAAzB;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("@contentful/forma-36-react-components"),t=require("@contentful/field-editor-shared");function i(i){var l=i.field;return e.createElement(t.FieldConnector,{field:l,isInitiallyDisabled:i.isInitiallyDisabled},(function(t){var n=t.value,a=t.setValue;return e.createElement("div",{"data-test-id":"url-editor"},e.createElement(r.TextInput,{required:l.required,error:t.errors.length>0,disabled:t.disabled,value:n||"",onChange:function(e){a(e.target.value)}}),"function"==typeof i.children?i.children({value:n}):null)}))}i.defaultProps={isInitiallyDisabled:!0},exports.UrlEditor=i;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@contentful/field-editor-shared"),i=require("@contentful/f36-components");function r(r){var l=r.field;return e.createElement(t.FieldConnector,{field:l,isInitiallyDisabled:r.isInitiallyDisabled},(function(t){var n=t.value,a=t.setValue;return e.createElement("div",{"data-test-id":"url-editor"},e.createElement(i.TextInput,{isRequired:l.required,isInvalid:t.errors.length>0,isDisabled:t.disabled,value:n||"",onChange:function(e){a(e.target.value)}}),"function"==typeof r.children?r.children({value:n}):null)}))}r.defaultProps={isInitiallyDisabled:!0},exports.UrlEditor=r;
2
2
  //# sourceMappingURL=field-editor-url.cjs.production.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"field-editor-url.cjs.production.min.js","sources":["../src/UrlEditor.tsx"],"sourcesContent":["import * as React from 'react';\nimport { TextInput } from '@contentful/forma-36-react-components';\nimport { FieldAPI, FieldConnector } from '@contentful/field-editor-shared';\n\nexport interface UrlEditorProps {\n /**\n * is the field disabled initially\n */\n isInitiallyDisabled: boolean;\n\n /**\n * sdk.field\n */\n field: FieldAPI;\n\n children?: (props: { value: string | null | undefined }) => React.ReactNode;\n}\n\nexport function UrlEditor(props: UrlEditorProps) {\n const { field } = props;\n\n return (\n <FieldConnector<string> field={field} isInitiallyDisabled={props.isInitiallyDisabled}>\n {({ value, errors, disabled, setValue }) => {\n return (\n <div data-test-id=\"url-editor\">\n <TextInput\n required={field.required}\n error={errors.length > 0}\n disabled={disabled}\n value={value || ''}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) => {\n setValue(e.target.value);\n }}\n />\n {typeof props.children === 'function' ? props.children({ value }) : null}\n </div>\n );\n }}\n </FieldConnector>\n );\n}\n\nUrlEditor.defaultProps = {\n isInitiallyDisabled: true,\n};\n"],"names":["UrlEditor","props","field","React","FieldConnector","isInitiallyDisabled","value","setValue","TextInput","required","error","errors","length","disabled","onChange","e","target","children","defaultProps"],"mappings":"oMAkBgBA,EAAUC,OAChBC,EAAUD,EAAVC,aAGNC,gBAACC,kBAAuBF,MAAOA,EAAOG,oBAAqBJ,EAAMI,sBAC9D,gBAAGC,IAAAA,MAAyBC,IAAAA,gBAEzBJ,sCAAkB,cAChBA,gBAACK,aACCC,SAAUP,EAAMO,SAChBC,QALGC,OAKWC,OAAS,EACvBC,WANWA,SAOXP,MAAOA,GAAS,GAChBQ,SAAU,SAACC,GACTR,EAASQ,EAAEC,OAAOV,UAGK,mBAAnBL,EAAMgB,SAA0BhB,EAAMgB,SAAS,CAAEX,MAAAA,IAAW,SAQhFN,EAAUkB,aAAe,CACvBb,qBAAqB"}
1
+ {"version":3,"file":"field-editor-url.cjs.production.min.js","sources":["../src/UrlEditor.tsx"],"sourcesContent":["import * as React from 'react';\nimport { FieldAPI, FieldConnector } from '@contentful/field-editor-shared';\n\nimport { TextInput } from '@contentful/f36-components';\n\nexport interface UrlEditorProps {\n /**\n * is the field disabled initially\n */\n isInitiallyDisabled: boolean;\n\n /**\n * sdk.field\n */\n field: FieldAPI;\n\n children?: (props: { value: string | null | undefined }) => React.ReactNode;\n}\n\nexport function UrlEditor(props: UrlEditorProps) {\n const { field } = props;\n\n return (\n <FieldConnector<string> field={field} isInitiallyDisabled={props.isInitiallyDisabled}>\n {({ value, errors, disabled, setValue }) => {\n return (\n <div data-test-id=\"url-editor\">\n <TextInput\n isRequired={field.required}\n isInvalid={errors.length > 0}\n isDisabled={disabled}\n value={value || ''}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) => {\n setValue(e.target.value);\n }}\n />\n {typeof props.children === 'function' ? props.children({ value }) : null}\n </div>\n );\n }}\n </FieldConnector>\n );\n}\n\nUrlEditor.defaultProps = {\n isInitiallyDisabled: true,\n};\n"],"names":["UrlEditor","props","field","React","FieldConnector","isInitiallyDisabled","value","setValue","TextInput","isRequired","required","isInvalid","errors","length","isDisabled","disabled","onChange","e","target","children","defaultProps"],"mappings":"yLAmBgBA,EAAUC,OAChBC,EAAUD,EAAVC,aAGNC,gBAACC,kBAAuBF,MAAOA,EAAOG,oBAAqBJ,EAAMI,sBAC9D,gBAAGC,IAAAA,MAAyBC,IAAAA,gBAEzBJ,sCAAkB,cAChBA,gBAACK,aACCC,WAAYP,EAAMQ,SAClBC,YALGC,OAKeC,OAAS,EAC3BC,aANWC,SAOXT,MAAOA,GAAS,GAChBU,SAAU,SAACC,GACTV,EAASU,EAAEC,OAAOZ,UAGK,mBAAnBL,EAAMkB,SAA0BlB,EAAMkB,SAAS,CAAEb,MAAAA,IAAW,SAQhFN,EAAUoB,aAAe,CACvBf,qBAAqB"}
@@ -1,6 +1,6 @@
1
1
  import { createElement } from 'react';
2
- import { TextInput } from '@contentful/forma-36-react-components';
3
2
  import { FieldConnector } from '@contentful/field-editor-shared';
3
+ import { TextInput } from '@contentful/f36-components';
4
4
 
5
5
  function UrlEditor(props) {
6
6
  var field = props.field;
@@ -15,9 +15,9 @@ function UrlEditor(props) {
15
15
  return createElement("div", {
16
16
  "data-test-id": "url-editor"
17
17
  }, createElement(TextInput, {
18
- required: field.required,
19
- error: errors.length > 0,
20
- disabled: disabled,
18
+ isRequired: field.required,
19
+ isInvalid: errors.length > 0,
20
+ isDisabled: disabled,
21
21
  value: value || '',
22
22
  onChange: function onChange(e) {
23
23
  setValue(e.target.value);
@@ -1 +1 @@
1
- {"version":3,"file":"field-editor-url.esm.js","sources":["../src/UrlEditor.tsx"],"sourcesContent":["import * as React from 'react';\nimport { TextInput } from '@contentful/forma-36-react-components';\nimport { FieldAPI, FieldConnector } from '@contentful/field-editor-shared';\n\nexport interface UrlEditorProps {\n /**\n * is the field disabled initially\n */\n isInitiallyDisabled: boolean;\n\n /**\n * sdk.field\n */\n field: FieldAPI;\n\n children?: (props: { value: string | null | undefined }) => React.ReactNode;\n}\n\nexport function UrlEditor(props: UrlEditorProps) {\n const { field } = props;\n\n return (\n <FieldConnector<string> field={field} isInitiallyDisabled={props.isInitiallyDisabled}>\n {({ value, errors, disabled, setValue }) => {\n return (\n <div data-test-id=\"url-editor\">\n <TextInput\n required={field.required}\n error={errors.length > 0}\n disabled={disabled}\n value={value || ''}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) => {\n setValue(e.target.value);\n }}\n />\n {typeof props.children === 'function' ? props.children({ value }) : null}\n </div>\n );\n }}\n </FieldConnector>\n );\n}\n\nUrlEditor.defaultProps = {\n isInitiallyDisabled: true,\n};\n"],"names":["UrlEditor","props","field","React","FieldConnector","isInitiallyDisabled","value","errors","disabled","setValue","TextInput","required","error","length","onChange","e","target","children","defaultProps"],"mappings":";;;;SAkBgBA,UAAUC;AACxB,MAAQC,KAAR,GAAkBD,KAAlB,CAAQC,KAAR;AAEA,SACEC,aAAA,CAACC,cAAD;AAAwBF,IAAAA,KAAK,EAAEA;AAAOG,IAAAA,mBAAmB,EAAEJ,KAAK,CAACI;GAAjE,EACG;QAAGC,aAAAA;QAAOC,cAAAA;QAAQC,gBAAAA;QAAUC,gBAAAA;AAC3B,WACEN,aAAA,MAAA;sBAAkB;KAAlB,EACEA,aAAA,CAACO,SAAD;AACEC,MAAAA,QAAQ,EAAET,KAAK,CAACS;AAChBC,MAAAA,KAAK,EAAEL,MAAM,CAACM,MAAP,GAAgB;AACvBL,MAAAA,QAAQ,EAAEA;AACVF,MAAAA,KAAK,EAAEA,KAAK,IAAI;AAChBQ,MAAAA,QAAQ,EAAE,kBAACC,CAAD;AACRN,QAAAA,QAAQ,CAACM,CAAC,CAACC,MAAF,CAASV,KAAV,CAAR;AACD;KAPH,CADF,EAUG,OAAOL,KAAK,CAACgB,QAAb,KAA0B,UAA1B,GAAuChB,KAAK,CAACgB,QAAN,CAAe;AAAEX,MAAAA,KAAK,EAALA;AAAF,KAAf,CAAvC,GAAmE,IAVtE,CADF;AAcD,GAhBH,CADF;AAoBD;AAEDN,SAAS,CAACkB,YAAV,GAAyB;AACvBb,EAAAA,mBAAmB,EAAE;AADE,CAAzB;;;;"}
1
+ {"version":3,"file":"field-editor-url.esm.js","sources":["../src/UrlEditor.tsx"],"sourcesContent":["import * as React from 'react';\nimport { FieldAPI, FieldConnector } from '@contentful/field-editor-shared';\n\nimport { TextInput } from '@contentful/f36-components';\n\nexport interface UrlEditorProps {\n /**\n * is the field disabled initially\n */\n isInitiallyDisabled: boolean;\n\n /**\n * sdk.field\n */\n field: FieldAPI;\n\n children?: (props: { value: string | null | undefined }) => React.ReactNode;\n}\n\nexport function UrlEditor(props: UrlEditorProps) {\n const { field } = props;\n\n return (\n <FieldConnector<string> field={field} isInitiallyDisabled={props.isInitiallyDisabled}>\n {({ value, errors, disabled, setValue }) => {\n return (\n <div data-test-id=\"url-editor\">\n <TextInput\n isRequired={field.required}\n isInvalid={errors.length > 0}\n isDisabled={disabled}\n value={value || ''}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) => {\n setValue(e.target.value);\n }}\n />\n {typeof props.children === 'function' ? props.children({ value }) : null}\n </div>\n );\n }}\n </FieldConnector>\n );\n}\n\nUrlEditor.defaultProps = {\n isInitiallyDisabled: true,\n};\n"],"names":["UrlEditor","props","field","React","FieldConnector","isInitiallyDisabled","value","errors","disabled","setValue","TextInput","isRequired","required","isInvalid","length","isDisabled","onChange","e","target","children","defaultProps"],"mappings":";;;;SAmBgBA,UAAUC;AACxB,MAAQC,KAAR,GAAkBD,KAAlB,CAAQC,KAAR;AAEA,SACEC,aAAA,CAACC,cAAD;AAAwBF,IAAAA,KAAK,EAAEA;AAAOG,IAAAA,mBAAmB,EAAEJ,KAAK,CAACI;GAAjE,EACG;QAAGC,aAAAA;QAAOC,cAAAA;QAAQC,gBAAAA;QAAUC,gBAAAA;AAC3B,WACEN,aAAA,MAAA;sBAAkB;KAAlB,EACEA,aAAA,CAACO,SAAD;AACEC,MAAAA,UAAU,EAAET,KAAK,CAACU;AAClBC,MAAAA,SAAS,EAAEN,MAAM,CAACO,MAAP,GAAgB;AAC3BC,MAAAA,UAAU,EAAEP;AACZF,MAAAA,KAAK,EAAEA,KAAK,IAAI;AAChBU,MAAAA,QAAQ,EAAE,kBAACC,CAAD;AACRR,QAAAA,QAAQ,CAACQ,CAAC,CAACC,MAAF,CAASZ,KAAV,CAAR;AACD;KAPH,CADF,EAUG,OAAOL,KAAK,CAACkB,QAAb,KAA0B,UAA1B,GAAuClB,KAAK,CAACkB,QAAN,CAAe;AAAEb,MAAAA,KAAK,EAALA;AAAF,KAAf,CAAvC,GAAmE,IAVtE,CADF;AAcD,GAhBH,CADF;AAoBD;AAEDN,SAAS,CAACoB,YAAV,GAAyB;AACvBf,EAAAA,mBAAmB,EAAE;AADE,CAAzB;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-url",
3
- "version": "0.12.6",
3
+ "version": "1.0.2",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/field-editor-url.esm.js",
6
6
  "typings": "dist/index.d.ts",
@@ -21,15 +21,15 @@
21
21
  "tsc": "tsc -p ./ --noEmit"
22
22
  },
23
23
  "dependencies": {
24
- "@contentful/field-editor-shared": "^0.25.1",
25
- "@contentful/forma-36-react-components": "^3.93.4",
26
- "@contentful/forma-36-tokens": "^0.11.0",
24
+ "@contentful/f36-components": "^4.0.1-beta.2696",
25
+ "@contentful/f36-tokens": "^4.0.1-beta.2696",
26
+ "@contentful/field-editor-shared": "^1.0.2",
27
27
  "emotion": "^10.0.17",
28
28
  "lodash": "^4.17.15",
29
29
  "lodash-es": "^4.17.15"
30
30
  },
31
31
  "devDependencies": {
32
- "@contentful/field-editor-test-utils": "^0.18.1"
32
+ "@contentful/field-editor-test-utils": "^1.0.2"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "react": ">=16.8.0"
@@ -44,5 +44,5 @@
44
44
  }
45
45
  }
46
46
  },
47
- "gitHead": "422234c47b3637970eea4501d095d2914c88b855"
47
+ "gitHead": "7813114ba59222371e5b3f2c4d90464b75cb8d0d"
48
48
  }