@contentful/field-editor-url 0.12.4 → 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 CHANGED
@@ -3,178 +3,116 @@
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.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)
6
+ # [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)
7
7
 
8
8
  **Note:** Version bump only for package @contentful/field-editor-url
9
9
 
10
+ # [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)
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
- ## [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)
15
-
16
- **Note:** Version bump only for package @contentful/field-editor-url
18
+ - adopts a new Forma v4 beta
17
19
 
20
+ ## [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)
18
21
 
22
+ **Note:** Version bump only for package @contentful/field-editor-url
19
23
 
24
+ ## [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)
20
25
 
26
+ **Note:** Version bump only for package @contentful/field-editor-url
21
27
 
22
- ## [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)
28
+ ## [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)
23
29
 
24
30
  **Note:** Version bump only for package @contentful/field-editor-url
25
31
 
32
+ ## [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)
26
33
 
34
+ **Note:** Version bump only for package @contentful/field-editor-url
27
35
 
36
+ ## [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)
28
37
 
38
+ **Note:** Version bump only for package @contentful/field-editor-url
29
39
 
30
40
  ## [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)
31
41
 
32
42
  **Note:** Version bump only for package @contentful/field-editor-url
33
43
 
34
-
35
-
36
-
37
-
38
44
  # [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)
39
45
 
40
-
41
46
  ### Features
42
47
 
43
- * 💡 new color tokens ([#778](https://github.com/contentful/field-editors/issues/778)) ([fba548d](https://github.com/contentful/field-editors/commit/fba548de32305016df7f2685634eefb14294828f))
44
-
45
-
46
-
47
-
48
+ - 💡 new color tokens ([#778](https://github.com/contentful/field-editors/issues/778)) ([fba548d](https://github.com/contentful/field-editors/commit/fba548de32305016df7f2685634eefb14294828f))
48
49
 
49
50
  ## [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)
50
51
 
51
52
  **Note:** Version bump only for package @contentful/field-editor-url
52
53
 
53
-
54
-
55
-
56
-
57
54
  ## [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)
58
55
 
59
56
  **Note:** Version bump only for package @contentful/field-editor-url
60
57
 
61
-
62
-
63
-
64
-
65
58
  ## [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)
66
59
 
67
60
  **Note:** Version bump only for package @contentful/field-editor-url
68
61
 
69
-
70
-
71
-
72
-
73
62
  ## [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)
74
63
 
75
64
  **Note:** Version bump only for package @contentful/field-editor-url
76
65
 
77
-
78
-
79
-
80
-
81
66
  ## [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)
82
67
 
83
68
  **Note:** Version bump only for package @contentful/field-editor-url
84
69
 
85
-
86
-
87
-
88
-
89
70
  ## [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)
90
71
 
91
72
  **Note:** Version bump only for package @contentful/field-editor-url
92
73
 
93
-
94
-
95
-
96
-
97
74
  # [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)
98
75
 
99
-
100
76
  ### Features
101
77
 
102
- * bump min version of forma-36 ([#606](https://github.com/contentful/field-editors/issues/606)) ([fd57c7a](https://github.com/contentful/field-editors/commit/fd57c7a4312766af38c01507f17706ab22992617))
103
-
104
-
105
-
106
-
78
+ - bump min version of forma-36 ([#606](https://github.com/contentful/field-editors/issues/606)) ([fd57c7a](https://github.com/contentful/field-editors/commit/fd57c7a4312766af38c01507f17706ab22992617))
107
79
 
108
80
  ## [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)
109
81
 
110
82
  **Note:** Version bump only for package @contentful/field-editor-url
111
83
 
112
-
113
-
114
-
115
-
116
84
  ## [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)
117
85
 
118
86
  **Note:** Version bump only for package @contentful/field-editor-url
119
87
 
120
-
121
-
122
-
123
-
124
88
  # [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)
125
89
 
126
-
127
90
  ### Features
128
91
 
129
- * 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))
130
-
131
-
132
-
133
-
92
+ - 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))
134
93
 
135
94
  # [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)
136
95
 
137
-
138
96
  ### Features
139
97
 
140
- * 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))
141
-
142
-
143
-
144
-
98
+ - 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))
145
99
 
146
100
  ## [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)
147
101
 
148
102
  **Note:** Version bump only for package @contentful/field-editor-url
149
103
 
150
-
151
-
152
-
153
-
154
104
  ## [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)
155
105
 
156
106
  **Note:** Version bump only for package @contentful/field-editor-url
157
107
 
158
-
159
-
160
-
161
-
162
108
  ## [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)
163
109
 
164
110
  **Note:** Version bump only for package @contentful/field-editor-url
165
111
 
166
-
167
-
168
-
169
-
170
112
  ## [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)
171
113
 
172
114
  **Note:** Version bump only for package @contentful/field-editor-url
173
115
 
174
-
175
-
176
-
177
-
178
116
  ## [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)
179
117
 
180
118
  **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.4",
3
+ "version": "1.0.0",
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.24.0",
25
- "@contentful/forma-36-react-components": "^3.93.4",
26
- "@contentful/forma-36-tokens": "^0.11.0",
24
+ "@contentful/f36-components": "beta",
25
+ "@contentful/f36-tokens": "beta",
26
+ "@contentful/field-editor-shared": "^1.0.0",
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.17.3"
32
+ "@contentful/field-editor-test-utils": "^1.0.0"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "react": ">=16.8.0"
@@ -44,5 +44,5 @@
44
44
  }
45
45
  }
46
46
  },
47
- "gitHead": "f5450f62e92802984fb32a4dd28f266aabbdd5d7"
47
+ "gitHead": "538c2239a48991e4bb281d4d07d8ede3413492a5"
48
48
  }