@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/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";
@@ -12,5 +12,6 @@ export declare const defaultFilter: {
12
12
  searchPhrase: string;
13
13
  excludeOperator: any[];
14
14
  authMethodCapabilities: any[];
15
+ maxEnergyPrice: any;
15
16
  };
16
17
  export declare function hasFilters(filter: any): boolean;
@@ -0,0 +1 @@
1
+ export {};
@@ -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 {};
@@ -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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@road-labs/map-sdk",
3
- "version": "0.0.28-rc.8",
3
+ "version": "0.0.28-rc.9",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",