@contentful/field-editor-location 1.2.3 → 1.3.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.
@@ -1,13 +1,13 @@
1
- /// <reference types="react" />
2
- import { Coords, ViewType, GeocodeApiResponse } from './types';
3
- interface LocationSelectorProps {
4
- disabled: boolean;
5
- value: Coords | undefined;
6
- view: ViewType;
7
- onChangeView: (view: ViewType) => void;
8
- onChangeLocation: (value?: Coords) => void;
9
- onSearchAddress: (value: string) => Promise<GeocodeApiResponse>;
10
- onGetAddressFromLocation: (location: Coords | undefined, address: string) => Promise<string>;
11
- }
12
- export declare function LocationSelector(props: LocationSelectorProps): JSX.Element;
13
- export {};
1
+ import * as React from 'react';
2
+ import { Coords, GeocodeApiResponse, ViewType } from './types';
3
+ interface LocationSelectorProps {
4
+ disabled: boolean;
5
+ value: Coords | undefined;
6
+ view: ViewType;
7
+ onChangeView: (view: ViewType) => void;
8
+ onChangeLocation: (value?: Coords) => void;
9
+ onSearchAddress: (value: string) => Promise<GeocodeApiResponse>;
10
+ onGetAddressFromLocation: (location: Coords | undefined, address: string) => Promise<string>;
11
+ }
12
+ export declare function LocationSelector(props: LocationSelectorProps): React.JSX.Element;
13
+ export {};
@@ -1,2 +1,2 @@
1
- import { LocationEditorConnected } from './LocationEditor';
2
- export declare const LocationEditor: typeof LocationEditorConnected;
1
+ import { LocationEditorConnected } from './LocationEditor';
2
+ export declare const LocationEditor: typeof LocationEditorConnected;
@@ -1,22 +1,22 @@
1
- export interface Coords {
2
- lat: number;
3
- lng: number;
4
- }
5
- export declare type LocationValue = {
6
- lat: number;
7
- lon: number;
8
- };
9
- export declare type NullableLocationValue = LocationValue | null | undefined;
10
- export declare enum ViewType {
11
- Address = "Address",
12
- Coordinates = "Coordinates"
13
- }
14
- export declare type GeocodeApiResponse = null | Array<{
15
- formatted_address: string;
16
- geometry: {
17
- location: {
18
- lat: () => number;
19
- lng: () => number;
20
- };
21
- };
22
- }>;
1
+ export interface Coords {
2
+ lat: number;
3
+ lng: number;
4
+ }
5
+ export type LocationValue = {
6
+ lat: number;
7
+ lon: number;
8
+ };
9
+ export type NullableLocationValue = LocationValue | null | undefined;
10
+ export declare enum ViewType {
11
+ Address = "Address",
12
+ Coordinates = "Coordinates"
13
+ }
14
+ export type GeocodeApiResponse = null | Array<{
15
+ formatted_address: string;
16
+ geometry: {
17
+ location: {
18
+ lat: () => number;
19
+ lng: () => number;
20
+ };
21
+ };
22
+ }>;
package/package.json CHANGED
@@ -1,9 +1,17 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-location",
3
- "version": "1.2.3",
4
- "main": "dist/index.js",
5
- "module": "dist/field-editor-location.esm.js",
6
- "typings": "dist/index.d.ts",
3
+ "version": "1.3.0",
4
+ "main": "dist/cjs/index.js",
5
+ "module": "dist/esm/index.js",
6
+ "types": "dist/types/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/types/index.d.ts",
10
+ "require": "./dist/cjs/index.js",
11
+ "default": "./dist/cjs/index.js"
12
+ },
13
+ "./package.json": "./package.json"
14
+ },
7
15
  "files": [
8
16
  "dist"
9
17
  ],
@@ -14,14 +22,20 @@
14
22
  "url": "https://github.com/contentful/field-editors"
15
23
  },
16
24
  "scripts": {
17
- "watch": "tsdx watch",
18
- "build": "tsdx build",
25
+ "watch": "yarn concurrently \"yarn:watch:*\"",
26
+ "watch:cjs": "yarn build:cjs -w",
27
+ "watch:esm": "yarn build:esm -w",
28
+ "watch:types": "yarn build:types --watch",
29
+ "build": "yarn build:types && yarn build:cjs && yarn build:esm",
30
+ "build:types": "tsc --outDir dist/types --emitDeclarationOnly",
31
+ "build:cjs": "swc src --config-file ../../.swcrc -d dist/cjs -C module.type=commonjs",
32
+ "build:esm": "swc src --config-file ../../.swcrc -d dist/esm",
19
33
  "tsc": "tsc -p ./ --noEmit"
20
34
  },
21
35
  "dependencies": {
22
36
  "@contentful/f36-components": "^4.0.27",
23
37
  "@contentful/f36-tokens": "^4.0.0",
24
- "@contentful/field-editor-shared": "^1.2.0",
38
+ "@contentful/field-editor-shared": "^1.3.0",
25
39
  "@types/google-map-react": "2.1.7",
26
40
  "deep-equal": "2.0.5",
27
41
  "emotion": "^10.0.17",
@@ -30,10 +44,10 @@
30
44
  "lodash-es": "^4.17.15"
31
45
  },
32
46
  "devDependencies": {
33
- "@contentful/field-editor-test-utils": "^1.3.0"
47
+ "@contentful/field-editor-test-utils": "^1.4.0"
34
48
  },
35
49
  "peerDependencies": {
36
50
  "react": ">=16.8.0"
37
51
  },
38
- "gitHead": "de7e74e3485dd69c240cfe9c545e6e50e41fb295"
52
+ "gitHead": "543e02672a8dd4edc810f9f3568d6b69c454e1f9"
39
53
  }
package/CHANGELOG.md DELETED
@@ -1,214 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ## [1.2.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@1.2.2...@contentful/field-editor-location@1.2.3) (2023-04-19)
7
-
8
- **Note:** Version bump only for package @contentful/field-editor-location
9
-
10
- ## [1.2.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@1.2.1...@contentful/field-editor-location@1.2.2) (2023-03-14)
11
-
12
- **Note:** Version bump only for package @contentful/field-editor-location
13
-
14
- ## [1.2.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@1.2.0...@contentful/field-editor-location@1.2.1) (2023-03-10)
15
-
16
- **Note:** Version bump only for package @contentful/field-editor-location
17
-
18
- # [1.2.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@1.1.10...@contentful/field-editor-location@1.2.0) (2023-03-09)
19
-
20
- ### Features
21
-
22
- - upgrade google-maps-react [TOL-968] ([#1365](https://github.com/contentful/field-editors/issues/1365)) ([e6ffb47](https://github.com/contentful/field-editors/commit/e6ffb47fa1487ef7d60dc537f89fcb45aa140ce7))
23
-
24
- ## [1.1.10](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@1.1.9...@contentful/field-editor-location@1.1.10) (2023-02-21)
25
-
26
- **Note:** Version bump only for package @contentful/field-editor-location
27
-
28
- ## [1.1.9](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@1.1.8...@contentful/field-editor-location@1.1.9) (2023-02-07)
29
-
30
- **Note:** Version bump only for package @contentful/field-editor-location
31
-
32
- ## [1.1.8](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@1.1.7...@contentful/field-editor-location@1.1.8) (2022-12-08)
33
-
34
- **Note:** Version bump only for package @contentful/field-editor-location
35
-
36
- ## [1.1.7](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@1.1.6...@contentful/field-editor-location@1.1.7) (2022-07-29)
37
-
38
- **Note:** Version bump only for package @contentful/field-editor-location
39
-
40
- ## [1.1.6](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@1.1.5...@contentful/field-editor-location@1.1.6) (2022-07-29)
41
-
42
- **Note:** Version bump only for package @contentful/field-editor-location
43
-
44
- ## [1.1.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@1.1.4...@contentful/field-editor-location@1.1.5) (2022-07-11)
45
-
46
- **Note:** Version bump only for package @contentful/field-editor-location
47
-
48
- ## [1.1.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@1.1.3...@contentful/field-editor-location@1.1.4) (2022-06-22)
49
-
50
- **Note:** Version bump only for package @contentful/field-editor-location
51
-
52
- ## [1.1.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@1.1.2...@contentful/field-editor-location@1.1.3) (2022-05-04)
53
-
54
- ### Bug Fixes
55
-
56
- - reflect disabled state on fields ([#1125](https://github.com/contentful/field-editors/issues/1125)) ([01502b9](https://github.com/contentful/field-editors/commit/01502b9d785c5f782b0e5de782d092c439cb690f))
57
-
58
- ## [1.1.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@1.1.1...@contentful/field-editor-location@1.1.2) (2022-02-15)
59
-
60
- ### Bug Fixes
61
-
62
- - bump f36 packages ([#1025](https://github.com/contentful/field-editors/issues/1025)) ([ec37a40](https://github.com/contentful/field-editors/commit/ec37a4000db7cd75c66dd9621136b2272c9feeea))
63
-
64
- ## [1.1.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@1.1.0...@contentful/field-editor-location@1.1.1) (2022-02-14)
65
-
66
- **Note:** Version bump only for package @contentful/field-editor-location
67
-
68
- # [1.1.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@1.0.3...@contentful/field-editor-location@1.1.0) (2022-01-11)
69
-
70
- ### Features
71
-
72
- - bump f36 packages to stable v4 [BAU-521] ([#988](https://github.com/contentful/field-editors/issues/988)) ([419cf56](https://github.com/contentful/field-editors/commit/419cf56692179b074fcfa2743469d5265ed98429))
73
-
74
- ## [1.0.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@1.0.2...@contentful/field-editor-location@1.0.3) (2021-12-23)
75
-
76
- ### Bug Fixes
77
-
78
- - markdown buttons ([#968](https://github.com/contentful/field-editors/issues/968)) ([9803b98](https://github.com/contentful/field-editors/commit/9803b98c25d92df6148686ffe2749a77f7efdbb9))
79
-
80
- ## [1.0.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@1.0.1...@contentful/field-editor-location@1.0.2) (2021-12-20)
81
-
82
- **Note:** Version bump only for package @contentful/field-editor-location
83
-
84
- ## [1.0.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@1.0.0...@contentful/field-editor-location@1.0.1) (2021-11-17)
85
-
86
- ### Bug Fixes
87
-
88
- - **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))
89
-
90
- # [1.0.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.14.0...@contentful/field-editor-location@1.0.0) (2021-11-04)
91
-
92
- **Note:** Version bump only for package @contentful/field-editor-location
93
-
94
- # [0.14.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.13.1...@contentful/field-editor-location@0.14.0) (2021-11-04)
95
-
96
- ### Features
97
-
98
- - Forma v4 components adoption ([#805](https://github.com/contentful/field-editors/issues/805)) ([526bde6](https://github.com/contentful/field-editors/commit/526bde6e10e0ee3789705ec10fb31489af7ca59e))
99
-
100
- ### BREAKING CHANGES
101
-
102
- - adopts a new Forma v4 beta
103
-
104
- ## [0.13.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.13.0...@contentful/field-editor-location@0.13.1) (2021-10-14)
105
-
106
- **Note:** Version bump only for package @contentful/field-editor-location
107
-
108
- # [0.13.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.12.4...@contentful/field-editor-location@0.13.0) (2021-10-06)
109
-
110
- ### Features
111
-
112
- - [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))
113
-
114
- ## [0.12.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.12.3...@contentful/field-editor-location@0.12.4) (2021-09-17)
115
-
116
- **Note:** Version bump only for package @contentful/field-editor-location
117
-
118
- ## [0.12.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.12.2...@contentful/field-editor-location@0.12.3) (2021-09-16)
119
-
120
- **Note:** Version bump only for package @contentful/field-editor-location
121
-
122
- ## [0.12.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.12.1...@contentful/field-editor-location@0.12.2) (2021-08-19)
123
-
124
- **Note:** Version bump only for package @contentful/field-editor-location
125
-
126
- ## [0.12.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.12.0...@contentful/field-editor-location@0.12.1) (2021-07-29)
127
-
128
- **Note:** Version bump only for package @contentful/field-editor-location
129
-
130
- # [0.12.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.11.6...@contentful/field-editor-location@0.12.0) (2021-07-23)
131
-
132
- ### Features
133
-
134
- - 💡 new color tokens ([#778](https://github.com/contentful/field-editors/issues/778)) ([fba548d](https://github.com/contentful/field-editors/commit/fba548de32305016df7f2685634eefb14294828f))
135
-
136
- ## [0.11.6](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.11.3...@contentful/field-editor-location@0.11.6) (2021-07-06)
137
-
138
- **Note:** Version bump only for package @contentful/field-editor-location
139
-
140
- ## [0.11.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.11.3...@contentful/field-editor-location@0.11.5) (2021-07-06)
141
-
142
- **Note:** Version bump only for package @contentful/field-editor-location
143
-
144
- ## [0.11.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.11.3...@contentful/field-editor-location@0.11.4) (2021-06-23)
145
-
146
- **Note:** Version bump only for package @contentful/field-editor-location
147
-
148
- ## [0.11.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.11.2...@contentful/field-editor-location@0.11.3) (2021-06-23)
149
-
150
- **Note:** Version bump only for package @contentful/field-editor-location
151
-
152
- ## [0.11.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.11.1...@contentful/field-editor-location@0.11.2) (2021-06-22)
153
-
154
- **Note:** Version bump only for package @contentful/field-editor-location
155
-
156
- ## [0.11.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.11.0...@contentful/field-editor-location@0.11.1) (2021-03-05)
157
-
158
- **Note:** Version bump only for package @contentful/field-editor-location
159
-
160
- # [0.11.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.10.3...@contentful/field-editor-location@0.11.0) (2021-02-19)
161
-
162
- ### Features
163
-
164
- - bump min version of forma-36 ([#606](https://github.com/contentful/field-editors/issues/606)) ([fd57c7a](https://github.com/contentful/field-editors/commit/fd57c7a4312766af38c01507f17706ab22992617))
165
-
166
- ## [0.10.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.10.2...@contentful/field-editor-location@0.10.3) (2021-02-09)
167
-
168
- **Note:** Version bump only for package @contentful/field-editor-location
169
-
170
- ## [0.10.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.10.1...@contentful/field-editor-location@0.10.2) (2021-02-01)
171
-
172
- **Note:** Version bump only for package @contentful/field-editor-location
173
-
174
- ## [0.10.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.10.0...@contentful/field-editor-location@0.10.1) (2021-01-25)
175
-
176
- **Note:** Version bump only for package @contentful/field-editor-location
177
-
178
- # [0.10.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.9.0...@contentful/field-editor-location@0.10.0) (2021-01-20)
179
-
180
- ### Features
181
-
182
- - 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))
183
-
184
- # [0.9.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.8.6...@contentful/field-editor-location@0.9.0) (2021-01-12)
185
-
186
- ### Features
187
-
188
- - 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))
189
-
190
- ## [0.8.6](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.8.5...@contentful/field-editor-location@0.8.6) (2020-12-16)
191
-
192
- **Note:** Version bump only for package @contentful/field-editor-location
193
-
194
- ## [0.8.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.8.4...@contentful/field-editor-location@0.8.5) (2020-11-23)
195
-
196
- **Note:** Version bump only for package @contentful/field-editor-location
197
-
198
- ## [0.8.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.8.3...@contentful/field-editor-location@0.8.4) (2020-11-06)
199
-
200
- **Note:** Version bump only for package @contentful/field-editor-location
201
-
202
- ## [0.8.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.8.2...@contentful/field-editor-location@0.8.3) (2020-11-06)
203
-
204
- **Note:** Version bump only for package @contentful/field-editor-location
205
-
206
- ## [0.8.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.8.1...@contentful/field-editor-location@0.8.2) (2020-10-28)
207
-
208
- ### Bug Fixes
209
-
210
- - 🐛 isInitiallyDisabled being null in examples ([#414](https://github.com/contentful/field-editors/issues/414)) ([df53405](https://github.com/contentful/field-editors/commit/df534055cfa64c533725cb5bca392a0a82e54be6))
211
-
212
- ## [0.8.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-location@0.8.0...@contentful/field-editor-location@0.8.1) (2020-08-24)
213
-
214
- **Note:** Version bump only for package @contentful/field-editor-location