@opentripplanner/from-to-location-picker 2.1.1-alpha.1 → 2.1.1
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/i18n/fr.yml +1 -1
- package/lib/types.d.ts +12 -3
- package/lib/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/types.ts +13 -4
- package/tsconfig.tsbuildinfo +5 -17
package/i18n/fr.yml
CHANGED
package/lib/types.d.ts
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
export declare type Location = {
|
|
3
|
+
lat: number;
|
|
4
|
+
lon: number;
|
|
5
|
+
name: string;
|
|
6
|
+
/**
|
|
7
|
+
* This is only used for locations that a user has saved. Can be either:
|
|
8
|
+
* "home" or "work"
|
|
9
|
+
*/
|
|
10
|
+
type?: string;
|
|
11
|
+
};
|
|
3
12
|
export declare type FromToPickerProps = {
|
|
4
13
|
/**
|
|
5
14
|
* Specifies the label to be rendered, or if set to true, renders the default label "Plan a trip:".
|
|
6
15
|
*/
|
|
7
|
-
label?: boolean |
|
|
16
|
+
label?: boolean | ReactElement | string;
|
|
8
17
|
/**
|
|
9
18
|
* A specific location to associate with this. This is only used when combined
|
|
10
19
|
* with the setLocation prop.
|
package/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC,oBAAY,QAAQ,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,YAAY,GAAG,MAAM,CAAC;IACxC;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,CAAC,EACb,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,OAAO,EACxB;;;;KAAA,KAAK,IAAI,CAAC;IACX;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentripplanner/from-to-location-picker",
|
|
3
|
-
"version": "2.1.1
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Location Picker Component",
|
|
5
5
|
"author": "@binh-dam-ibigroup",
|
|
6
6
|
"homepage": "https://github.com/opentripplanner/otp-ui/#readme",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"url": "git+https://github.com/opentripplanner/otp-ui.git"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
|
-
"tsc": "tsc"
|
|
25
|
+
"tsc": "tsc && echo Remove the @ts-expect-error exception in index.tsx once core-utils is typed!"
|
|
26
26
|
},
|
|
27
27
|
"bugs": {
|
|
28
28
|
"url": "https://github.com/opentripplanner/otp-ui/issues"
|
package/src/types.ts
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
|
|
3
|
+
export type Location = {
|
|
4
|
+
lat: number;
|
|
5
|
+
lon: number;
|
|
6
|
+
name: string;
|
|
7
|
+
/**
|
|
8
|
+
* This is only used for locations that a user has saved. Can be either:
|
|
9
|
+
* "home" or "work"
|
|
10
|
+
*/
|
|
11
|
+
type?: string;
|
|
12
|
+
};
|
|
3
13
|
|
|
4
14
|
export type FromToPickerProps = {
|
|
5
15
|
/**
|
|
6
16
|
* Specifies the label to be rendered, or if set to true, renders the default label "Plan a trip:".
|
|
7
17
|
*/
|
|
8
|
-
label?: boolean |
|
|
18
|
+
label?: boolean | ReactElement | string;
|
|
9
19
|
/**
|
|
10
20
|
* A specific location to associate with this. This is only used when combined
|
|
11
21
|
* with the setLocation prop.
|
|
@@ -28,7 +38,6 @@ export type FromToPickerProps = {
|
|
|
28
38
|
*/
|
|
29
39
|
setLocation?: ({
|
|
30
40
|
locationType: string,
|
|
31
|
-
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
32
41
|
location: Location,
|
|
33
42
|
reverseGeocode: boolean
|
|
34
43
|
}) => void;
|
package/tsconfig.tsbuildinfo
CHANGED
|
@@ -581,14 +581,9 @@
|
|
|
581
581
|
"signature": "42509b307b7c1edd20b6fd7c92de1216a9ed27703fa74b574179d2d11c87a787",
|
|
582
582
|
"affectsGlobalScope": false
|
|
583
583
|
},
|
|
584
|
-
"../types/lib/index.d.ts": {
|
|
585
|
-
"version": "014cf9afb8b78185825b8a4dda98be807270c3efd950d40c5d8486c9a6b408bb",
|
|
586
|
-
"signature": "014cf9afb8b78185825b8a4dda98be807270c3efd950d40c5d8486c9a6b408bb",
|
|
587
|
-
"affectsGlobalScope": false
|
|
588
|
-
},
|
|
589
584
|
"./src/types.ts": {
|
|
590
|
-
"version": "
|
|
591
|
-
"signature": "
|
|
585
|
+
"version": "637c4358cc9d9ef955f4fdf995f3d6c97d5bfed3c2cfdaa0056814884065fb93",
|
|
586
|
+
"signature": "d40d84c46150505d0c8547e9d8a6876278e13cd8e0bf0580808bc0313d11b5f3",
|
|
592
587
|
"affectsGlobalScope": false
|
|
593
588
|
},
|
|
594
589
|
"./src/index.tsx": {
|
|
@@ -2839,7 +2834,7 @@
|
|
|
2839
2834
|
"../../node_modules/@types/styled-components/index.d.ts"
|
|
2840
2835
|
],
|
|
2841
2836
|
"./src/types.ts": [
|
|
2842
|
-
"
|
|
2837
|
+
"../../node_modules/@types/react/index.d.ts"
|
|
2843
2838
|
],
|
|
2844
2839
|
"../location-icon/lib/index.d.ts": [
|
|
2845
2840
|
"../../node_modules/@types/react/index.d.ts",
|
|
@@ -2848,9 +2843,6 @@
|
|
|
2848
2843
|
"../location-icon/lib/styled.d.ts": [
|
|
2849
2844
|
"../../node_modules/@styled-icons/styled-icon/index.d.ts",
|
|
2850
2845
|
"../../node_modules/@types/styled-components/index.d.ts"
|
|
2851
|
-
],
|
|
2852
|
-
"../types/lib/index.d.ts": [
|
|
2853
|
-
"../../node_modules/@types/react/index.d.ts"
|
|
2854
2846
|
]
|
|
2855
2847
|
},
|
|
2856
2848
|
"exportedModulesMap": {
|
|
@@ -3965,7 +3957,7 @@
|
|
|
3965
3957
|
"../../node_modules/@types/styled-components/index.d.ts"
|
|
3966
3958
|
],
|
|
3967
3959
|
"./src/types.ts": [
|
|
3968
|
-
"
|
|
3960
|
+
"../../node_modules/@types/react/index.d.ts"
|
|
3969
3961
|
],
|
|
3970
3962
|
"../location-icon/lib/index.d.ts": [
|
|
3971
3963
|
"../../node_modules/@types/react/index.d.ts",
|
|
@@ -3974,9 +3966,6 @@
|
|
|
3974
3966
|
"../location-icon/lib/styled.d.ts": [
|
|
3975
3967
|
"../../node_modules/@styled-icons/styled-icon/index.d.ts",
|
|
3976
3968
|
"../../node_modules/@types/styled-components/index.d.ts"
|
|
3977
|
-
],
|
|
3978
|
-
"../types/lib/index.d.ts": [
|
|
3979
|
-
"../../node_modules/@types/react/index.d.ts"
|
|
3980
3969
|
]
|
|
3981
3970
|
},
|
|
3982
3971
|
"semanticDiagnosticsPerFile": [
|
|
@@ -4319,8 +4308,7 @@
|
|
|
4319
4308
|
"./src/styled.ts",
|
|
4320
4309
|
"./src/types.ts",
|
|
4321
4310
|
"../location-icon/lib/index.d.ts",
|
|
4322
|
-
"../location-icon/lib/styled.d.ts"
|
|
4323
|
-
"../types/lib/index.d.ts"
|
|
4311
|
+
"../location-icon/lib/styled.d.ts"
|
|
4324
4312
|
]
|
|
4325
4313
|
},
|
|
4326
4314
|
"version": "4.2.4"
|