@opentripplanner/from-to-location-picker 2.1.0 → 2.1.1-alpha.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/lib/types.d.ts CHANGED
@@ -1,19 +1,10 @@
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
- };
1
+ /// <reference types="react" />
2
+ import type { Location } from "@opentripplanner/types";
12
3
  export declare type FromToPickerProps = {
13
4
  /**
14
5
  * Specifies the label to be rendered, or if set to true, renders the default label "Plan a trip:".
15
6
  */
16
- label?: boolean | ReactElement | string;
7
+ label?: boolean | React.ReactElement | string;
17
8
  /**
18
9
  * A specific location to associate with this. This is only used when combined
19
10
  * with the setLocation prop.
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,oBAAY,iBAAiB,GAAG;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC,YAAY,GAAG,MAAM,CAAC;IAC9C;;;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,EAEpB,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.0",
3
+ "version": "2.1.1-alpha.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 && echo Remove the @ts-expect-error exception in index.tsx once core-utils is typed!"
25
+ "tsc": "tsc"
26
26
  },
27
27
  "bugs": {
28
28
  "url": "https://github.com/opentripplanner/otp-ui/issues"
package/src/types.ts CHANGED
@@ -1,21 +1,11 @@
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
- };
1
+ // eslint-disable-next-line prettier/prettier
2
+ import type { Location } from "@opentripplanner/types";
13
3
 
14
4
  export type FromToPickerProps = {
15
5
  /**
16
6
  * Specifies the label to be rendered, or if set to true, renders the default label "Plan a trip:".
17
7
  */
18
- label?: boolean | ReactElement | string;
8
+ label?: boolean | React.ReactElement | string;
19
9
  /**
20
10
  * A specific location to associate with this. This is only used when combined
21
11
  * with the setLocation prop.
@@ -38,6 +28,7 @@ export type FromToPickerProps = {
38
28
  */
39
29
  setLocation?: ({
40
30
  locationType: string,
31
+ // eslint-disable-next-line @typescript-eslint/no-shadow
41
32
  location: Location,
42
33
  reverseGeocode: boolean
43
34
  }) => void;
@@ -581,9 +581,14 @@
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
+ },
584
589
  "./src/types.ts": {
585
- "version": "637c4358cc9d9ef955f4fdf995f3d6c97d5bfed3c2cfdaa0056814884065fb93",
586
- "signature": "d40d84c46150505d0c8547e9d8a6876278e13cd8e0bf0580808bc0313d11b5f3",
590
+ "version": "b2d66720aa20ebfa64e5247166f8a4d691be15a83988aaa354649c5a9e477220",
591
+ "signature": "cab7284b5126359a2a46a1f4e85b2c1727d1d9a9943efd9a7c5d2cf955d9ecd4",
587
592
  "affectsGlobalScope": false
588
593
  },
589
594
  "./src/index.tsx": {
@@ -2834,7 +2839,7 @@
2834
2839
  "../../node_modules/@types/styled-components/index.d.ts"
2835
2840
  ],
2836
2841
  "./src/types.ts": [
2837
- "../../node_modules/@types/react/index.d.ts"
2842
+ "../types/lib/index.d.ts"
2838
2843
  ],
2839
2844
  "../location-icon/lib/index.d.ts": [
2840
2845
  "../../node_modules/@types/react/index.d.ts",
@@ -2843,6 +2848,9 @@
2843
2848
  "../location-icon/lib/styled.d.ts": [
2844
2849
  "../../node_modules/@styled-icons/styled-icon/index.d.ts",
2845
2850
  "../../node_modules/@types/styled-components/index.d.ts"
2851
+ ],
2852
+ "../types/lib/index.d.ts": [
2853
+ "../../node_modules/@types/react/index.d.ts"
2846
2854
  ]
2847
2855
  },
2848
2856
  "exportedModulesMap": {
@@ -3957,7 +3965,7 @@
3957
3965
  "../../node_modules/@types/styled-components/index.d.ts"
3958
3966
  ],
3959
3967
  "./src/types.ts": [
3960
- "../../node_modules/@types/react/index.d.ts"
3968
+ "../types/lib/index.d.ts"
3961
3969
  ],
3962
3970
  "../location-icon/lib/index.d.ts": [
3963
3971
  "../../node_modules/@types/react/index.d.ts",
@@ -3966,6 +3974,9 @@
3966
3974
  "../location-icon/lib/styled.d.ts": [
3967
3975
  "../../node_modules/@styled-icons/styled-icon/index.d.ts",
3968
3976
  "../../node_modules/@types/styled-components/index.d.ts"
3977
+ ],
3978
+ "../types/lib/index.d.ts": [
3979
+ "../../node_modules/@types/react/index.d.ts"
3969
3980
  ]
3970
3981
  },
3971
3982
  "semanticDiagnosticsPerFile": [
@@ -4308,7 +4319,8 @@
4308
4319
  "./src/styled.ts",
4309
4320
  "./src/types.ts",
4310
4321
  "../location-icon/lib/index.d.ts",
4311
- "../location-icon/lib/styled.d.ts"
4322
+ "../location-icon/lib/styled.d.ts",
4323
+ "../types/lib/index.d.ts"
4312
4324
  ]
4313
4325
  },
4314
4326
  "version": "4.2.4"