@road-labs/map-sdk 0.0.21 → 0.0.24

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.
Files changed (36) hide show
  1. package/dist/components/Icons/Icons.d.ts +3 -0
  2. package/dist/components/LocationRow/LocationRow.d.ts +10 -0
  3. package/dist/components/StatusDot/StatusDot.d.ts +7 -0
  4. package/dist/contexts/Map.d.ts +7 -0
  5. package/dist/i18n.d.ts +28 -0
  6. package/dist/index.css +1 -1
  7. package/dist/index.js +13 -13
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +4916 -3765
  10. package/dist/index.mjs.map +1 -1
  11. package/dist/screens/Locations/v2/ActiveTariff.d.ts +15 -0
  12. package/dist/screens/Locations/v2/AvailabilitySummary.d.ts +7 -0
  13. package/dist/screens/Locations/v2/ChargingAccessibility.d.ts +6 -0
  14. package/dist/screens/Locations/v2/Connector.d.ts +13 -0
  15. package/dist/screens/Locations/v2/ConnectorPricing.d.ts +3 -0
  16. package/dist/screens/Locations/v2/ConnectorSocket.d.ts +7 -0
  17. package/dist/screens/Locations/v2/Directions.d.ts +7 -0
  18. package/dist/screens/Locations/v2/Evse.d.ts +11 -0
  19. package/dist/screens/Locations/v2/EvseHeader.d.ts +7 -0
  20. package/dist/screens/Locations/v2/EvseStatus.d.ts +7 -0
  21. package/dist/screens/Locations/v2/Location.d.ts +8 -0
  22. package/dist/screens/Locations/v2/LocationHeader.d.ts +7 -0
  23. package/dist/screens/Locations/v2/NoTariff.d.ts +9 -0
  24. package/dist/screens/Locations/v2/OpeningHours.d.ts +8 -0
  25. package/dist/screens/Locations/v2/OperatorSection.d.ts +10 -0
  26. package/dist/screens/Locations/v2/ParkingType.d.ts +7 -0
  27. package/dist/screens/Locations/v2/ReportProblemButton.d.ts +10 -0
  28. package/dist/screens/Locations/v2/TariffChips.d.ts +11 -0
  29. package/dist/screens/Locations/v2/TariffDetails.d.ts +1 -0
  30. package/dist/screens/Locations/v2/TariffLine.d.ts +13 -0
  31. package/dist/types.d.ts +1 -0
  32. package/dist/utils/activeTariff.d.ts +7 -0
  33. package/dist/utils/openingTimes.d.ts +31 -0
  34. package/dist/utils/request.d.ts +7 -0
  35. package/package.json +1 -1
  36. 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,7 @@
1
+ import { default as React } from 'react';
2
+ import { OcpiEvse } from '../../../types';
3
+ interface Props {
4
+ evses: OcpiEvse[];
5
+ }
6
+ export declare const AvailabilitySummary: React.FC<Props>;
7
+ export default AvailabilitySummary;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface Props {
3
+ accessibility?: string;
4
+ }
5
+ export declare const ChargingAccessibility: React.FC<Props>;
6
+ export default ChargingAccessibility;
@@ -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,3 @@
1
+ import { default as React } from 'react';
2
+ export declare const ConnectorPricing: React.FC;
3
+ export default ConnectorPricing;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { OcpiConnector } from '../../../types';
3
+ interface Props {
4
+ connector: OcpiConnector;
5
+ }
6
+ export declare const ConnectorSocket: React.FC<Props>;
7
+ export default ConnectorSocket;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { OcpiDisplayText } from '../../../types';
3
+ interface Props {
4
+ directions?: OcpiDisplayText[];
5
+ }
6
+ export declare const Directions: React.FC<Props>;
7
+ export default Directions;
@@ -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,7 @@
1
+ import { default as React } from 'react';
2
+ import { OcpiEvse } from '../../../types';
3
+ interface Props {
4
+ evse: OcpiEvse;
5
+ }
6
+ export declare const EvseHeader: React.FC<Props>;
7
+ export default EvseHeader;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { OcpiEvse } from '../../../types';
3
+ interface Props {
4
+ evse: OcpiEvse;
5
+ }
6
+ export declare const EvseStatus: React.FC<Props>;
7
+ export default EvseStatus;
@@ -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,7 @@
1
+ import { default as React } from 'react';
2
+ import { OcpiLocation } from '../../../types';
3
+ interface Props {
4
+ location: OcpiLocation;
5
+ }
6
+ export declare const LocationHeader: React.FC<Props>;
7
+ export default LocationHeader;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ interface Props {
3
+ country_code: string;
4
+ party_id: string;
5
+ location_id: string;
6
+ evse_uid: string;
7
+ }
8
+ export declare const NoTariff: React.FC<Props>;
9
+ export default NoTariff;
@@ -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,7 @@
1
+ import { default as React } from 'react';
2
+ import { OcpiLocationType } from '../../../types';
3
+ interface Props {
4
+ parkingType?: OcpiLocationType;
5
+ }
6
+ export declare const ParkingType: React.FC<Props>;
7
+ export default ParkingType;
@@ -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
@@ -291,6 +291,7 @@ export type OcpiLocation = {
291
291
  };
292
292
  suboperator?: OcpiSuboperator;
293
293
  subOperator?: OcpiSuboperator;
294
+ owner?: OcpiSuboperator;
294
295
  operator_name?: string;
295
296
  operatorName?: string;
296
297
  suboperator_name?: string;
@@ -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 {};
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "@road-labs/map-sdk",
3
- "version": "0.0.21",
3
+ "version": "0.0.24",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -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;