@road-labs/map-sdk 0.0.28-rc.8 → 0.0.28-rc.9
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 +2710 -2531
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.ts +7 -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;
|
|
@@ -47,6 +52,7 @@ export type RoadMapOptions = {
|
|
|
47
52
|
locationBaseUrl?: string;
|
|
48
53
|
locationUrlTemplate?: string;
|
|
49
54
|
version?: "v1" | "v2" | "v3";
|
|
55
|
+
currency?: string;
|
|
50
56
|
authorization: string;
|
|
51
57
|
language?: string;
|
|
52
58
|
shadowRoot?: any;
|
|
@@ -105,6 +111,7 @@ export type GeohashItem = {
|
|
|
105
111
|
count: number;
|
|
106
112
|
}>;
|
|
107
113
|
count: number;
|
|
114
|
+
energyPrice?: EnergyPrice;
|
|
108
115
|
};
|
|
109
116
|
export type OcpiPriceComponent = {
|
|
110
117
|
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
|
};
|