@road-labs/map-sdk 0.0.23 → 0.0.25
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/components/Icons/Icons.d.ts +3 -0
- package/dist/components/LocationRow/LocationRow.d.ts +10 -0
- package/dist/components/StatusDot/StatusDot.d.ts +7 -0
- package/dist/contexts/Map.d.ts +7 -0
- package/dist/i18n.d.ts +28 -0
- package/dist/index.css +1 -1
- package/dist/index.js +13 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4911 -3764
- package/dist/index.mjs.map +1 -1
- package/dist/screens/Locations/v2/ActiveTariff.d.ts +15 -0
- package/dist/screens/Locations/v2/AvailabilitySummary.d.ts +7 -0
- package/dist/screens/Locations/v2/ChargingAccessibility.d.ts +6 -0
- package/dist/screens/Locations/v2/Connector.d.ts +13 -0
- package/dist/screens/Locations/v2/ConnectorPricing.d.ts +3 -0
- package/dist/screens/Locations/v2/ConnectorSocket.d.ts +7 -0
- package/dist/screens/Locations/v2/Directions.d.ts +7 -0
- package/dist/screens/Locations/v2/Evse.d.ts +11 -0
- package/dist/screens/Locations/v2/EvseHeader.d.ts +7 -0
- package/dist/screens/Locations/v2/EvseStatus.d.ts +7 -0
- package/dist/screens/Locations/v2/Location.d.ts +8 -0
- package/dist/screens/Locations/v2/LocationHeader.d.ts +7 -0
- package/dist/screens/Locations/v2/NoTariff.d.ts +9 -0
- package/dist/screens/Locations/v2/OpeningHours.d.ts +8 -0
- package/dist/screens/Locations/v2/OperatorSection.d.ts +10 -0
- package/dist/screens/Locations/v2/ParkingType.d.ts +7 -0
- package/dist/screens/Locations/v2/ReportProblemButton.d.ts +10 -0
- package/dist/screens/Locations/v2/TariffChips.d.ts +11 -0
- package/dist/screens/Locations/v2/TariffDetails.d.ts +1 -0
- package/dist/screens/Locations/v2/TariffLine.d.ts +13 -0
- package/dist/types.d.ts +1 -0
- package/dist/utils/activeTariff.d.ts +7 -0
- package/dist/utils/openingTimes.d.ts +31 -0
- package/dist/utils/request.d.ts +7 -0
- package/package.json +1 -1
- package/dist/screens/Locations/LocationDetailsV2.d.ts +0 -8
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CdrAdditionalCharge, OcpiTariff } from '../../../types';
|
|
3
|
+
interface Props {
|
|
4
|
+
tariff?: OcpiTariff;
|
|
5
|
+
additionalCharges?: CdrAdditionalCharge[];
|
|
6
|
+
evseId?: string;
|
|
7
|
+
evseUid: string;
|
|
8
|
+
countryCode: string;
|
|
9
|
+
partyId: string;
|
|
10
|
+
locationId: string;
|
|
11
|
+
locationName: string;
|
|
12
|
+
setView: (view: string, args?: any) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const ActiveTariff: React.FC<Props>;
|
|
15
|
+
export default ActiveTariff;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CdrAdditionalCharge, OcpiConnector, OcpiLocation, Tariff as TariffType } from '../../../types';
|
|
3
|
+
interface Props {
|
|
4
|
+
connector: OcpiConnector;
|
|
5
|
+
tariffs?: TariffType[];
|
|
6
|
+
cdrAdditionalCharges: CdrAdditionalCharge[];
|
|
7
|
+
location: OcpiLocation;
|
|
8
|
+
evseId?: string;
|
|
9
|
+
evseUid?: string;
|
|
10
|
+
setView: (view: string, args?: any) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const Connector: React.FC<Props>;
|
|
13
|
+
export default Connector;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CdrAdditionalCharge, OcpiEvse, OcpiLocation, Tariff as TariffType } from '../../../types';
|
|
3
|
+
interface Props {
|
|
4
|
+
evse: OcpiEvse;
|
|
5
|
+
tariffs?: TariffType[];
|
|
6
|
+
cdrAdditionalCharges: CdrAdditionalCharge[];
|
|
7
|
+
location: OcpiLocation;
|
|
8
|
+
setView: (view: string, args?: any) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const Evse: React.FC<Props>;
|
|
11
|
+
export default Evse;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { OcpiLocation } from '../../../types';
|
|
3
|
+
interface Props {
|
|
4
|
+
currentLocation: OcpiLocation;
|
|
5
|
+
setView: (view: string, args?: any) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const Location: React.FC<Props>;
|
|
8
|
+
export default Location;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { OpeningTimes } from '../../../utils/openingTimes';
|
|
3
|
+
interface Props {
|
|
4
|
+
openingTimes?: OpeningTimes;
|
|
5
|
+
chargingWhenClosed?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const OpeningHours: React.FC<Props>;
|
|
8
|
+
export default OpeningHours;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { OcpiSuboperator } from '../../../types';
|
|
3
|
+
interface Props {
|
|
4
|
+
operator?: OcpiSuboperator;
|
|
5
|
+
suboperator?: OcpiSuboperator;
|
|
6
|
+
fallbackOperatorName?: string;
|
|
7
|
+
fallbackSuboperatorName?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const OperatorSection: React.FC<Props>;
|
|
10
|
+
export default OperatorSection;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
type: string;
|
|
4
|
+
country_code: string;
|
|
5
|
+
party_id: string;
|
|
6
|
+
location_id: string;
|
|
7
|
+
evse_uid: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const ReportProblemButton: React.FC<Props>;
|
|
10
|
+
export default ReportProblemButton;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CdrAdditionalCharge, TariffElement } from '../../../types';
|
|
3
|
+
interface Props {
|
|
4
|
+
elements: TariffElement[];
|
|
5
|
+
currency: string;
|
|
6
|
+
skipZero?: boolean;
|
|
7
|
+
highlight?: boolean;
|
|
8
|
+
additionalCharges?: CdrAdditionalCharge[];
|
|
9
|
+
}
|
|
10
|
+
export declare const TariffChips: React.FC<Props>;
|
|
11
|
+
export default TariffChips;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function TariffDetails(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { CdrAdditionalCharge, TariffElement } from '../../../types';
|
|
3
|
+
interface Props {
|
|
4
|
+
elements: TariffElement[];
|
|
5
|
+
currency: string;
|
|
6
|
+
label?: ReactNode;
|
|
7
|
+
trailing?: ReactNode;
|
|
8
|
+
highlight?: boolean;
|
|
9
|
+
additionalCharges?: CdrAdditionalCharge[];
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const TariffLine: React.FC<Props>;
|
|
13
|
+
export default TariffLine;
|
package/dist/types.d.ts
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Tariff, TariffElement } from '../types';
|
|
2
|
+
export declare function isElementActive(el: TariffElement, now: Date): boolean;
|
|
3
|
+
export type ActiveTariffSelection = {
|
|
4
|
+
elements: TariffElement[];
|
|
5
|
+
currency: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function getActiveTariffElements(tariff: Tariff | null | undefined, now?: Date): ActiveTariffSelection;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LabelsType } from '../i18n';
|
|
2
|
+
export type RegularHours = {
|
|
3
|
+
weekday: number;
|
|
4
|
+
period_begin: string;
|
|
5
|
+
period_end: string;
|
|
6
|
+
};
|
|
7
|
+
export type ExceptionalPeriod = {
|
|
8
|
+
period_begin: string;
|
|
9
|
+
period_end: string;
|
|
10
|
+
};
|
|
11
|
+
export type OpeningTimes = {
|
|
12
|
+
twentyfourseven: boolean;
|
|
13
|
+
regular_hours?: RegularHours[];
|
|
14
|
+
exceptional_openings?: ExceptionalPeriod[];
|
|
15
|
+
exceptional_closings?: ExceptionalPeriod[];
|
|
16
|
+
};
|
|
17
|
+
type Translate = (key: keyof LabelsType, args?: Record<string, string>) => string;
|
|
18
|
+
export declare function getWeekdayLabel(t: Translate, weekday: number): string;
|
|
19
|
+
export declare function groupRegularHoursByWeekday(regularHours: RegularHours[] | undefined): Record<number, RegularHours[]>;
|
|
20
|
+
export declare function formatPeriod(begin: string, end: string): string;
|
|
21
|
+
export type OpenStatus = {
|
|
22
|
+
open: boolean;
|
|
23
|
+
nextChange?: {
|
|
24
|
+
time: string;
|
|
25
|
+
label: "opens" | "closes";
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export declare function isOpenNow(openingTimes: OpeningTimes | undefined, now?: Date): OpenStatus;
|
|
29
|
+
export declare function getFutureExceptionalPeriods(periods: ExceptionalPeriod[] | undefined, now?: Date): ExceptionalPeriod[];
|
|
30
|
+
export declare function formatExceptionalRange(p: ExceptionalPeriod): string;
|
|
31
|
+
export {};
|
package/dist/utils/request.d.ts
CHANGED
|
@@ -22,5 +22,12 @@ export declare function _fetchLocations(apiRoot: any, version: any, authorizatio
|
|
|
22
22
|
ids: any;
|
|
23
23
|
status: any;
|
|
24
24
|
}): Promise<any>;
|
|
25
|
+
export declare function _reportProblem(apiRoot: any, version: any, authorization: any, { type, country_code, party_id, location_id, evse_uid, }: {
|
|
26
|
+
type: string;
|
|
27
|
+
country_code: string;
|
|
28
|
+
party_id: string;
|
|
29
|
+
location_id: string;
|
|
30
|
+
evse_uid: string;
|
|
31
|
+
}): Promise<any>;
|
|
25
32
|
export declare function loadRemoteConfig(apiRoot: string, version: string, authorization: string): Promise<RemoteConfig>;
|
|
26
33
|
export {};
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { CurrentLocation } from '../../types';
|
|
3
|
-
interface Props {
|
|
4
|
-
currentLocation: CurrentLocation;
|
|
5
|
-
setView(view: string, args?: any): void;
|
|
6
|
-
}
|
|
7
|
-
declare const LocationDetailsV2: React.FC<Props>;
|
|
8
|
-
export default LocationDetailsV2;
|