@road-labs/map-sdk 0.0.28-rc.8 → 3.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/README.md +6 -2
- package/dist/components/Pin/Pin.d.ts +3 -1
- package/dist/contexts/Map.d.ts +2 -0
- package/dist/i18n.d.ts +3 -0
- package/dist/index.js +27 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2714 -2535
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.ts +8 -0
- package/dist/utils/filters.d.ts +1 -0
- package/dist/utils/filters.test.d.ts +1 -0
- package/dist/utils/pinState.d.ts +3 -1
- package/dist/utils/price.d.ts +8 -0
- package/dist/utils/price.test.d.ts +1 -0
- package/dist/utils/request.d.ts +5 -0
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -12,6 +12,11 @@ export type FilterConfiguration = {
|
|
|
12
12
|
showPaymentMethodFilter?: boolean;
|
|
13
13
|
operators?: string[];
|
|
14
14
|
showAnalytics?: boolean;
|
|
15
|
+
showPriceFilter?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type EnergyPrice = {
|
|
18
|
+
amount: number;
|
|
19
|
+
currency: string;
|
|
15
20
|
};
|
|
16
21
|
export type AnalyticsBucket = {
|
|
17
22
|
name: string;
|
|
@@ -39,6 +44,7 @@ export type RoadMapOptions = {
|
|
|
39
44
|
enableZoomControls?: boolean;
|
|
40
45
|
height: number;
|
|
41
46
|
position?: Position;
|
|
47
|
+
zoomLevel?: number;
|
|
42
48
|
useBrowserLocation?: boolean;
|
|
43
49
|
sdkRoot?: string;
|
|
44
50
|
apiRoot?: string;
|
|
@@ -47,6 +53,7 @@ export type RoadMapOptions = {
|
|
|
47
53
|
locationBaseUrl?: string;
|
|
48
54
|
locationUrlTemplate?: string;
|
|
49
55
|
version?: "v1" | "v2" | "v3";
|
|
56
|
+
currency?: string;
|
|
50
57
|
authorization: string;
|
|
51
58
|
language?: string;
|
|
52
59
|
shadowRoot?: any;
|
|
@@ -105,6 +112,7 @@ export type GeohashItem = {
|
|
|
105
112
|
count: number;
|
|
106
113
|
}>;
|
|
107
114
|
count: number;
|
|
115
|
+
energyPrice?: EnergyPrice;
|
|
108
116
|
};
|
|
109
117
|
export type OcpiPriceComponent = {
|
|
110
118
|
type: "FLAT" | "TIME" | "ENERGY" | "PARKING_TIME" | "CONGESTION_TIME";
|
package/dist/utils/filters.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/utils/pinState.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MapKind } from '../types';
|
|
1
|
+
import { EnergyPrice, GeohashItem, MapKind } from '../types';
|
|
2
2
|
export type PinTone = "available" | "inUse" | "offline" | "fault" | "planned" | "unknown";
|
|
3
3
|
export type PinGlyph = "bolt" | "ratio" | "dash" | "plus" | "alert";
|
|
4
4
|
export type PinColours = {
|
|
@@ -39,3 +39,5 @@ export declare function describePin(statuses: Array<{
|
|
|
39
39
|
name: string;
|
|
40
40
|
count: number;
|
|
41
41
|
}> | undefined, kind?: MapKind, cluster?: boolean): PinState;
|
|
42
|
+
export declare function isCluster(data: Pick<GeohashItem, "count" | "ids">): boolean;
|
|
43
|
+
export declare function pinPrice(data: GeohashItem): EnergyPrice | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EnergyPrice } from '../types';
|
|
2
|
+
export declare function usablePrice(price?: EnergyPrice): price is EnergyPrice;
|
|
3
|
+
export declare function formatEnergyPrice(language: string, price?: EnergyPrice): string | undefined;
|
|
4
|
+
export type PriceTick = {
|
|
5
|
+
value: number | undefined;
|
|
6
|
+
label: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function priceTicks(language: string, currency: string, anyLabel: string): PriceTick[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/utils/request.d.ts
CHANGED
|
@@ -14,6 +14,11 @@ export declare function buildSearchBody(limitToLocationIds: string[], props: Rec
|
|
|
14
14
|
searchPhrase: any;
|
|
15
15
|
excludeOperator: any;
|
|
16
16
|
authMethodCapabilities: any;
|
|
17
|
+
currency: any;
|
|
18
|
+
maxEnergyPrice: {
|
|
19
|
+
amount: number;
|
|
20
|
+
currency: any;
|
|
21
|
+
};
|
|
17
22
|
operator?: any[];
|
|
18
23
|
locationIds: string[];
|
|
19
24
|
};
|