@opentripplanner/trip-details 2.1.1 → 2.1.3
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/esm/fare-table.js +3 -3
- package/esm/index.js +14 -53
- package/esm/index.js.map +1 -1
- package/esm/styled.js +7 -15
- package/esm/styled.js.map +1 -1
- package/i18n/en-US.yml +2 -18
- package/i18n/fr.yml +0 -17
- package/lib/fare-table.d.ts +1 -0
- package/lib/fare-table.d.ts.map +1 -1
- package/lib/fare-table.js +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +9 -51
- package/lib/index.js.map +1 -1
- package/lib/styled.d.ts +0 -2
- package/lib/styled.d.ts.map +1 -1
- package/lib/styled.js +8 -22
- package/lib/styled.js.map +1 -1
- package/package.json +3 -3
- package/src/TripDetails.story.tsx +4 -1
- package/src/index.tsx +11 -65
- package/src/styled.ts +0 -4
- package/tsconfig.json +1 -0
- package/tsconfig.tsbuildinfo +1 -4602
package/lib/styled.d.ts
CHANGED
|
@@ -11,8 +11,6 @@ export declare const Timing: import("styled-components").StyledComponent<"span",
|
|
|
11
11
|
export declare const TransitFare: import("styled-components").StyledComponent<"details", any, {}, never>;
|
|
12
12
|
export declare const TransitFareSingle: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
13
13
|
export declare const FlexSummary: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
14
|
-
export declare const FlexPickupSummary: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
15
|
-
export declare const FlexDropOffSummary: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
16
14
|
export declare const TripDetail: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
15
|
export declare const TripDetailDescription: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
18
16
|
export declare const TripDetailIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
|
package/lib/styled.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../src/styled.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,mBAAmB,qEAAgB,CAAC;AAEjD,eAAO,MAAM,eAAe,qEAAgB,CAAC;AAE7C,eAAO,MAAM,YAAY;;gBAOxB,CAAC;AAEF,eAAO,MAAM,IAAI,qEAAgB,CAAC;AAElC,eAAO,MAAM,UAAU,uEAEtB,CAAC;AAEF,eAAO,MAAM,OAAO,qEAAgB,CAAC;AAErC,eAAO,MAAM,gBAAgB,qEAE5B,CAAC;AAEF,eAAO,MAAM,MAAM,qEAAgB,CAAC;AAEpC,eAAO,MAAM,WAAW,wEASvB,CAAC;AACF,eAAO,MAAM,iBAAiB,qEAAgB,CAAC;AAE/C,eAAO,MAAM,WAAW,qEAAgB,CAAC;AAEzC,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../src/styled.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,mBAAmB,qEAAgB,CAAC;AAEjD,eAAO,MAAM,eAAe,qEAAgB,CAAC;AAE7C,eAAO,MAAM,YAAY;;gBAOxB,CAAC;AAEF,eAAO,MAAM,IAAI,qEAAgB,CAAC;AAElC,eAAO,MAAM,UAAU,uEAEtB,CAAC;AAEF,eAAO,MAAM,OAAO,qEAAgB,CAAC;AAErC,eAAO,MAAM,gBAAgB,qEAE5B,CAAC;AAEF,eAAO,MAAM,MAAM,qEAAgB,CAAC;AAEpC,eAAO,MAAM,WAAW,wEASvB,CAAC;AACF,eAAO,MAAM,iBAAiB,qEAAgB,CAAC;AAE/C,eAAO,MAAM,WAAW,qEAAgB,CAAC;AAEzC,eAAO,MAAM,UAAU,oEAEtB,CAAC;AAEF,eAAO,MAAM,qBAAqB,oEAMjC,CAAC;AAEF,eAAO,MAAM,cAAc,oEAG1B,CAAC;AAEF,eAAO,MAAM,WAAW,oEAMvB,CAAC;AAEF,eAAO,MAAM,eAAe,oEAAe,CAAC;AAE5C,eAAO,MAAM,iBAAiB,oEAG7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,oEAK7B,CAAC"}
|
package/lib/styled.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.TripDetailSummary = exports.TripDetailsHeader = exports.TripDetailsBody = exports.TripDetails = exports.TripDetailIcon = exports.TripDetailDescription = exports.TripDetail = exports.
|
|
8
|
+
exports.TripDetailSummary = exports.TripDetailsHeader = exports.TripDetailsBody = exports.TripDetails = exports.TripDetailIcon = exports.TripDetailDescription = exports.TripDetail = exports.FlexSummary = exports.TransitFareSingle = exports.TransitFare = exports.Timing = exports.TNCFareCompanies = exports.TNCFare = exports.HideButton = exports.Fare = exports.ExpandButton = exports.CaloriesSummary = exports.CaloriesDescription = void 0;
|
|
9
9
|
|
|
10
10
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
11
|
|
|
@@ -89,65 +89,51 @@ const FlexSummary = _styledComponents.default.span.withConfig({
|
|
|
89
89
|
|
|
90
90
|
exports.FlexSummary = FlexSummary;
|
|
91
91
|
|
|
92
|
-
const FlexPickupSummary = _styledComponents.default.span.withConfig({
|
|
93
|
-
displayName: "styled__FlexPickupSummary",
|
|
94
|
-
componentId: "sc-6q2ok2-12"
|
|
95
|
-
})([""]);
|
|
96
|
-
|
|
97
|
-
exports.FlexPickupSummary = FlexPickupSummary;
|
|
98
|
-
|
|
99
|
-
const FlexDropOffSummary = _styledComponents.default.span.withConfig({
|
|
100
|
-
displayName: "styled__FlexDropOffSummary",
|
|
101
|
-
componentId: "sc-6q2ok2-13"
|
|
102
|
-
})([""]);
|
|
103
|
-
|
|
104
|
-
exports.FlexDropOffSummary = FlexDropOffSummary;
|
|
105
|
-
|
|
106
92
|
const TripDetail = _styledComponents.default.div.withConfig({
|
|
107
93
|
displayName: "styled__TripDetail",
|
|
108
|
-
componentId: "sc-6q2ok2-
|
|
94
|
+
componentId: "sc-6q2ok2-12"
|
|
109
95
|
})(["margin-top:6px;"]);
|
|
110
96
|
|
|
111
97
|
exports.TripDetail = TripDetail;
|
|
112
98
|
|
|
113
99
|
const TripDetailDescription = _styledComponents.default.div.withConfig({
|
|
114
100
|
displayName: "styled__TripDetailDescription",
|
|
115
|
-
componentId: "sc-6q2ok2-
|
|
101
|
+
componentId: "sc-6q2ok2-13"
|
|
116
102
|
})(["background-color:#fff;border:1px solid #888;font-size:12px;margin-top:2px;padding:8px;"]);
|
|
117
103
|
|
|
118
104
|
exports.TripDetailDescription = TripDetailDescription;
|
|
119
105
|
|
|
120
106
|
const TripDetailIcon = _styledComponents.default.div.withConfig({
|
|
121
107
|
displayName: "styled__TripDetailIcon",
|
|
122
|
-
componentId: "sc-6q2ok2-
|
|
108
|
+
componentId: "sc-6q2ok2-14"
|
|
123
109
|
})(["float:left;font-size:17px;"]);
|
|
124
110
|
|
|
125
111
|
exports.TripDetailIcon = TripDetailIcon;
|
|
126
112
|
|
|
127
113
|
const TripDetails = _styledComponents.default.div.withConfig({
|
|
128
114
|
displayName: "styled__TripDetails",
|
|
129
|
-
componentId: "sc-6q2ok2-
|
|
115
|
+
componentId: "sc-6q2ok2-15"
|
|
130
116
|
})(["background-color:#eee;border-radius:6px;margin-bottom:15px;margin-top:16px;padding:10px 16px;"]);
|
|
131
117
|
|
|
132
118
|
exports.TripDetails = TripDetails;
|
|
133
119
|
|
|
134
120
|
const TripDetailsBody = _styledComponents.default.div.withConfig({
|
|
135
121
|
displayName: "styled__TripDetailsBody",
|
|
136
|
-
componentId: "sc-6q2ok2-
|
|
122
|
+
componentId: "sc-6q2ok2-16"
|
|
137
123
|
})([""]);
|
|
138
124
|
|
|
139
125
|
exports.TripDetailsBody = TripDetailsBody;
|
|
140
126
|
|
|
141
127
|
const TripDetailsHeader = _styledComponents.default.div.withConfig({
|
|
142
128
|
displayName: "styled__TripDetailsHeader",
|
|
143
|
-
componentId: "sc-6q2ok2-
|
|
129
|
+
componentId: "sc-6q2ok2-17"
|
|
144
130
|
})(["font-size:18px;font-weight:600;"]);
|
|
145
131
|
|
|
146
132
|
exports.TripDetailsHeader = TripDetailsHeader;
|
|
147
133
|
|
|
148
134
|
const TripDetailSummary = _styledComponents.default.div.withConfig({
|
|
149
135
|
displayName: "styled__TripDetailSummary",
|
|
150
|
-
componentId: "sc-6q2ok2-
|
|
136
|
+
componentId: "sc-6q2ok2-18"
|
|
151
137
|
})(["margin-left:28px;padding-top:2px;display:flex;align-items:baseline;"]);
|
|
152
138
|
|
|
153
139
|
exports.TripDetailSummary = TripDetailSummary;
|
package/lib/styled.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/styled.ts"],"names":["BaseButton","styled","button","CaloriesDescription","span","CaloriesSummary","ExpandButton","attrs","Fare","HideButton","TNCFare","TNCFareCompanies","Timing","TransitFare","details","TransitFareSingle","FlexSummary","
|
|
1
|
+
{"version":3,"sources":["../src/styled.ts"],"names":["BaseButton","styled","button","CaloriesDescription","span","CaloriesSummary","ExpandButton","attrs","Fare","HideButton","TNCFare","TNCFareCompanies","Timing","TransitFare","details","TransitFareSingle","FlexSummary","TripDetail","div","TripDetailDescription","TripDetailIcon","TripDetails","TripDetailsBody","TripDetailsHeader","TripDetailSummary"],"mappings":";;;;;;;;;AAAA;;AAEA,MAAMA,UAAU,GAAGC,0BAAOC,MAAV;AAAA;AAAA;AAAA,8PAAhB;;AAiBO,MAAMC,mBAAmB,GAAGF,0BAAOG,IAAV;AAAA;AAAA;AAAA,QAAzB;;;;AAEA,MAAMC,eAAe,GAAGJ,0BAAOG,IAAV;AAAA;AAAA;AAAA,QAArB;;;AAEA,MAAME,YAAY,GAAG,+BAAON,UAAP,EAAmBO,KAAnB,CAAyB;AACnD,gBAAc;AADqC,CAAzB,CAAH;AAAA;AAAA;AAAA,kEAAlB;;;AASA,MAAMC,IAAI,GAAGP,0BAAOG,IAAV;AAAA;AAAA;AAAA,QAAV;;;AAEA,MAAMK,UAAU,GAAG,+BAAOT,UAAP,CAAH;AAAA;AAAA;AAAA,oBAAhB;;;AAIA,MAAMU,OAAO,GAAGT,0BAAOG,IAAV;AAAA;AAAA;AAAA,QAAb;;;;AAEA,MAAMO,gBAAgB,GAAGV,0BAAOG,IAAV;AAAA;AAAA;AAAA,kCAAtB;;;;AAIA,MAAMQ,MAAM,GAAGX,0BAAOG,IAAV;AAAA;AAAA;AAAA,QAAZ;;;;AAEA,MAAMS,WAAW,GAAGZ,0BAAOa,OAAV;AAAA;AAAA;AAAA,uEAAjB;;;;AAUA,MAAMC,iBAAiB,GAAGd,0BAAOG,IAAV;AAAA;AAAA;AAAA,QAAvB;;;;AAEA,MAAMY,WAAW,GAAGf,0BAAOG,IAAV;AAAA;AAAA;AAAA,QAAjB;;;;AAEA,MAAMa,UAAU,GAAGhB,0BAAOiB,GAAV;AAAA;AAAA;AAAA,uBAAhB;;;;AAIA,MAAMC,qBAAqB,GAAGlB,0BAAOiB,GAAV;AAAA;AAAA;AAAA,8FAA3B;;;;AAQA,MAAME,cAAc,GAAGnB,0BAAOiB,GAAV;AAAA;AAAA;AAAA,kCAApB;;;;AAKA,MAAMG,WAAW,GAAGpB,0BAAOiB,GAAV;AAAA;AAAA;AAAA,qGAAjB;;;;AAQA,MAAMI,eAAe,GAAGrB,0BAAOiB,GAAV;AAAA;AAAA;AAAA,QAArB;;;;AAEA,MAAMK,iBAAiB,GAAGtB,0BAAOiB,GAAV;AAAA;AAAA;AAAA,uCAAvB;;;;AAKA,MAAMM,iBAAiB,GAAGvB,0BAAOiB,GAAV;AAAA;AAAA;AAAA,2EAAvB","sourcesContent":["import styled from \"styled-components\";\n\nconst BaseButton = styled.button`\n background: transparent;\n border: 0;\n cursor: pointer;\n display: inline-block;\n font-size: 14px;\n font-weight: 400;\n line-height: 1.42857143;\n margin: 0;\n padding: 0;\n text-decoration: none;\n touch-action: manipulation;\n user-select: none;\n vertical-align: middle;\n white-space: nowrap;\n`;\n\nexport const CaloriesDescription = styled.span``;\n\nexport const CaloriesSummary = styled.span``;\n\nexport const ExpandButton = styled(BaseButton).attrs({\n \"aria-label\": \"What does this mean?\"\n})`\n color: #00f;\n font-size: 16px;\n margin-left: 6px;\n margin-top: -2px;\n`;\n\nexport const Fare = styled.span``;\n\nexport const HideButton = styled(BaseButton)`\n float: right;\n`;\n\nexport const TNCFare = styled.span``;\n\nexport const TNCFareCompanies = styled.span`\n text-transform: capitalize;\n`;\n\nexport const Timing = styled.span``;\n\nexport const TransitFare = styled.details`\n display: inline-block;\n\n > span {\n display: block;\n /* This may seem wrong, but this value gives the most aligned results */\n /* see: https://github.com/opentripplanner/otp-ui/pull/294#discussion_r742045851 */\n padding-left: 1.75ch;\n }\n`;\nexport const TransitFareSingle = styled.span``;\n\nexport const FlexSummary = styled.span``;\n\nexport const TripDetail = styled.div`\n margin-top: 6px;\n`;\n\nexport const TripDetailDescription = styled.div`\n background-color: #fff;\n border: 1px solid #888;\n font-size: 12px;\n margin-top: 2px;\n padding: 8px;\n`;\n\nexport const TripDetailIcon = styled.div`\n float: left;\n font-size: 17px;\n`;\n\nexport const TripDetails = styled.div`\n background-color: #eee;\n border-radius: 6px;\n margin-bottom: 15px;\n margin-top: 16px;\n padding: 10px 16px;\n`;\n\nexport const TripDetailsBody = styled.div``;\n\nexport const TripDetailsHeader = styled.div`\n font-size: 18px;\n font-weight: 600;\n`;\n\nexport const TripDetailSummary = styled.div`\n margin-left: 28px;\n padding-top: 2px;\n display: flex;\n align-items: baseline;\n`;\n"],"file":"styled.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentripplanner/trip-details",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "A component for displaying details about a trip planning itinerary",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"private": false,
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@opentripplanner/core-utils": "^
|
|
14
|
+
"@opentripplanner/core-utils": "^7.0.0-alpha.3",
|
|
15
15
|
"@styled-icons/fa-solid": "^10.34.0",
|
|
16
16
|
"flat": "^5.0.2",
|
|
17
17
|
"velocity-react": "^1.4.3"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@opentripplanner/types": "^
|
|
20
|
+
"@opentripplanner/types": "^3.0.0-alpha.4",
|
|
21
21
|
"@types/flat": "^5.0.2"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
@@ -37,6 +37,7 @@ const walkOnlyItinerary = require("@opentripplanner/itinerary-body/src/__mocks__
|
|
|
37
37
|
const walkTransitWalkItinerary = require("@opentripplanner/itinerary-body/src/__mocks__/itineraries/walk-transit-walk.json");
|
|
38
38
|
const walkTransitWalkTransitWalkItinerary = require("@opentripplanner/itinerary-body/src/__mocks__/itineraries/walk-transit-walk-transit-walk.json");
|
|
39
39
|
const fareComponentsItinerary = require("@opentripplanner/itinerary-body/src/__mocks__/itineraries/fare-components.json");
|
|
40
|
+
const flexItinerary = require("@opentripplanner/itinerary-body/src/__mocks__/itineraries/flex-itinerary.json");
|
|
40
41
|
const otp2ScooterItinerary = require("@opentripplanner/itinerary-body/src/__mocks__/itineraries/otp2-scooter.json");
|
|
41
42
|
|
|
42
43
|
const flattenedEnglishMessages = flatten(customEnglishMessages);
|
|
@@ -332,6 +333,8 @@ export const TncTransitItineraryWithCustomMessages = makeStory(
|
|
|
332
333
|
StyledTripDetails
|
|
333
334
|
);
|
|
334
335
|
|
|
335
|
-
export const
|
|
336
|
+
export const FareComponentsItinerary = makeStory({
|
|
336
337
|
itinerary: fareComponentsItinerary
|
|
337
338
|
});
|
|
339
|
+
|
|
340
|
+
export const OTP2FlexItinerary = makeStory({ itinerary: flexItinerary });
|
package/src/index.tsx
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import flatten from "flat";
|
|
2
2
|
import coreUtils from "@opentripplanner/core-utils";
|
|
3
|
-
import { FlexBookingInfo } from "@opentripplanner/types";
|
|
4
3
|
import React, { ReactElement } from "react";
|
|
5
4
|
import { FormattedMessage } from "react-intl";
|
|
6
5
|
import { CalendarAlt } from "@styled-icons/fa-solid/CalendarAlt";
|
|
7
|
-
import { HandPaper } from "@styled-icons/fa-solid/HandPaper";
|
|
8
6
|
import { Heartbeat } from "@styled-icons/fa-solid/Heartbeat";
|
|
9
7
|
import { MoneyBillAlt } from "@styled-icons/fa-solid/MoneyBillAlt";
|
|
10
|
-
import { PhoneVolume } from "@styled-icons/fa-solid/PhoneVolume";
|
|
11
8
|
import { Route } from "@styled-icons/fa-solid/Route";
|
|
12
9
|
|
|
13
10
|
import * as S from "./styled";
|
|
@@ -44,19 +41,6 @@ function dietaryLink(contents: ReactElement): ReactElement {
|
|
|
44
41
|
</a>
|
|
45
42
|
);
|
|
46
43
|
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Helper function that assembles values for flex pickup/dropoff messages.
|
|
50
|
-
*/
|
|
51
|
-
function getFlexMessageValues(info: FlexBookingInfo) {
|
|
52
|
-
return {
|
|
53
|
-
hasLeadTime: coreUtils.itinerary.isAdvanceBookingRequired(info),
|
|
54
|
-
hasPhone: !!info?.contactInfo?.phoneNumber,
|
|
55
|
-
leadDays: info.latestBookingTime.daysPrior,
|
|
56
|
-
phoneNumber: info?.contactInfo?.phoneNumber
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
44
|
/**
|
|
61
45
|
* Default rendering if no component is provided for the CaloriesDetails
|
|
62
46
|
* slot in the TripDetails component.
|
|
@@ -127,7 +111,7 @@ export function TripDetails({
|
|
|
127
111
|
}: TripDetailsProps): ReactElement {
|
|
128
112
|
// process the transit fare
|
|
129
113
|
const fareResult = coreUtils.itinerary.calculateTncFares(itinerary);
|
|
130
|
-
const { maxTNCFare, minTNCFare
|
|
114
|
+
const { currencyCode, maxTNCFare, minTNCFare } = fareResult;
|
|
131
115
|
const transitFares = itinerary?.fare?.fare;
|
|
132
116
|
const fareDetails = itinerary.fare?.details;
|
|
133
117
|
|
|
@@ -211,8 +195,8 @@ export function TripDetails({
|
|
|
211
195
|
{companies.toLowerCase()}
|
|
212
196
|
</S.TNCFareCompanies>
|
|
213
197
|
),
|
|
214
|
-
maxTNCFare: renderFare(
|
|
215
|
-
minTNCFare: renderFare(
|
|
198
|
+
maxTNCFare: renderFare(currencyCode, maxTNCFare),
|
|
199
|
+
minTNCFare: renderFare(currencyCode, minTNCFare),
|
|
216
200
|
strong: boldText
|
|
217
201
|
}}
|
|
218
202
|
/>
|
|
@@ -325,58 +309,20 @@ export function TripDetails({
|
|
|
325
309
|
}
|
|
326
310
|
description="Text stating that portions of the trip include a flex (on-demand) transit service."
|
|
327
311
|
id="otpUi.TripDetails.tripIncludesFlex"
|
|
312
|
+
values={{
|
|
313
|
+
extraMessage: [
|
|
314
|
+
...new Set([
|
|
315
|
+
...pickupBookingInfo.map(info => info.message),
|
|
316
|
+
...dropOffBookingInfo.map(info => info.message)
|
|
317
|
+
])
|
|
318
|
+
].join(" ")
|
|
319
|
+
}}
|
|
328
320
|
/>
|
|
329
321
|
</S.FlexSummary>
|
|
330
322
|
}
|
|
331
323
|
icon={<Route size={17} />}
|
|
332
324
|
/>
|
|
333
325
|
)}
|
|
334
|
-
{pickupBookingInfo &&
|
|
335
|
-
pickupBookingInfo.map(info => (
|
|
336
|
-
<TripDetail
|
|
337
|
-
key={info.pickupMessage}
|
|
338
|
-
icon={<PhoneVolume size={17} />}
|
|
339
|
-
summary={
|
|
340
|
-
<S.FlexPickupSummary>
|
|
341
|
-
<FormattedMessage
|
|
342
|
-
defaultMessage={
|
|
343
|
-
defaultMessages["otpUi.TripDetails.flexPickupMessage"]
|
|
344
|
-
}
|
|
345
|
-
description="Instructions for booking and boarding the flex (on-demand) transit service."
|
|
346
|
-
id="otpUi.TripDetails.flexPickupMessage"
|
|
347
|
-
values={getFlexMessageValues(info)}
|
|
348
|
-
/>
|
|
349
|
-
</S.FlexPickupSummary>
|
|
350
|
-
}
|
|
351
|
-
description={info.pickupMessage}
|
|
352
|
-
/>
|
|
353
|
-
))}
|
|
354
|
-
{dropOffBookingInfo &&
|
|
355
|
-
dropOffBookingInfo.map(info => (
|
|
356
|
-
<TripDetail
|
|
357
|
-
description={info.dropOffMessage}
|
|
358
|
-
icon={
|
|
359
|
-
coreUtils.itinerary.isAdvanceBookingRequired(info) ? (
|
|
360
|
-
<PhoneVolume size={17} />
|
|
361
|
-
) : (
|
|
362
|
-
<HandPaper size={17} />
|
|
363
|
-
)
|
|
364
|
-
}
|
|
365
|
-
key={info.dropOffMessage}
|
|
366
|
-
summary={
|
|
367
|
-
<S.FlexDropOffSummary>
|
|
368
|
-
<FormattedMessage
|
|
369
|
-
defaultMessage={
|
|
370
|
-
defaultMessages["otpUi.TripDetails.flexDropOffMessage"]
|
|
371
|
-
}
|
|
372
|
-
description="Instructions for getting off the flex (on-demand) transit service."
|
|
373
|
-
id="otpUi.TripDetails.flexDropOffMessage"
|
|
374
|
-
values={getFlexMessageValues(info)}
|
|
375
|
-
/>
|
|
376
|
-
</S.FlexDropOffSummary>
|
|
377
|
-
}
|
|
378
|
-
/>
|
|
379
|
-
))}
|
|
380
326
|
</S.TripDetailsBody>
|
|
381
327
|
</S.TripDetails>
|
|
382
328
|
);
|
package/src/styled.ts
CHANGED
|
@@ -58,10 +58,6 @@ export const TransitFareSingle = styled.span``;
|
|
|
58
58
|
|
|
59
59
|
export const FlexSummary = styled.span``;
|
|
60
60
|
|
|
61
|
-
export const FlexPickupSummary = styled.span``;
|
|
62
|
-
|
|
63
|
-
export const FlexDropOffSummary = styled.span``;
|
|
64
|
-
|
|
65
61
|
export const TripDetail = styled.div`
|
|
66
62
|
margin-top: 6px;
|
|
67
63
|
`;
|