react-spatial 1.2.0 → 1.2.3-beta.2

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 (185) hide show
  1. package/LayerService.js +128 -184
  2. package/LayerService.js.map +7 -1
  3. package/Projections.js +29 -12
  4. package/Projections.js.map +7 -1
  5. package/components/BaseLayerSwitcher/BaseLayerSwitcher.js +163 -221
  6. package/components/BaseLayerSwitcher/BaseLayerSwitcher.js.map +7 -1
  7. package/components/BaseLayerSwitcher/index.js +1 -3
  8. package/components/BaseLayerSwitcher/index.js.map +7 -1
  9. package/components/BasicMap/BasicMap.js +147 -285
  10. package/components/BasicMap/BasicMap.js.map +7 -1
  11. package/components/BasicMap/index.js +1 -3
  12. package/components/BasicMap/index.js.map +7 -1
  13. package/components/CanvasSaveButton/CanvasSaveButton.js +165 -419
  14. package/components/CanvasSaveButton/CanvasSaveButton.js.map +7 -1
  15. package/components/CanvasSaveButton/index.js +1 -3
  16. package/components/CanvasSaveButton/index.js.map +7 -1
  17. package/components/Copyright/Copyright.js +29 -70
  18. package/components/Copyright/Copyright.js.map +7 -1
  19. package/components/Copyright/index.js +1 -3
  20. package/components/Copyright/index.js.map +7 -1
  21. package/components/FeatureExportButton/FeatureExportButton.js +40 -106
  22. package/components/FeatureExportButton/FeatureExportButton.js.map +7 -1
  23. package/components/FeatureExportButton/index.js +1 -3
  24. package/components/FeatureExportButton/index.js.map +7 -1
  25. package/components/FilterButton/FilterButton.js +41 -106
  26. package/components/FilterButton/FilterButton.js.map +7 -1
  27. package/components/FilterButton/index.js +1 -3
  28. package/components/FilterButton/index.js.map +7 -1
  29. package/components/FitExtent/FitExtent.js +17 -50
  30. package/components/FitExtent/FitExtent.js.map +7 -1
  31. package/components/FitExtent/index.js +1 -3
  32. package/components/FitExtent/index.js.map +7 -1
  33. package/components/FollowButton/FollowButton.js +41 -111
  34. package/components/FollowButton/FollowButton.js.map +7 -1
  35. package/components/FollowButton/index.js +1 -3
  36. package/components/FollowButton/index.js.map +7 -1
  37. package/components/Geolocation/Geolocation.js +104 -213
  38. package/components/Geolocation/Geolocation.js.map +7 -1
  39. package/components/Geolocation/index.js +1 -3
  40. package/components/Geolocation/index.js.map +7 -1
  41. package/components/LayerTree/LayerTree.js +207 -397
  42. package/components/LayerTree/LayerTree.js.map +7 -1
  43. package/components/LayerTree/index.js +1 -3
  44. package/components/LayerTree/index.js.map +7 -1
  45. package/components/MousePosition/MousePosition.js +61 -130
  46. package/components/MousePosition/MousePosition.js.map +7 -1
  47. package/components/MousePosition/index.js +1 -3
  48. package/components/MousePosition/index.js.map +7 -1
  49. package/components/NorthArrow/NorthArrow.js +22 -62
  50. package/components/NorthArrow/NorthArrow.js.map +7 -1
  51. package/components/NorthArrow/index.js +1 -3
  52. package/components/NorthArrow/index.js.map +7 -1
  53. package/components/Overlay/Overlay.js +85 -132
  54. package/components/Overlay/Overlay.js.map +7 -1
  55. package/components/Overlay/index.js +1 -3
  56. package/components/Overlay/index.js.map +7 -1
  57. package/components/Permalink/Permalink.js +151 -231
  58. package/components/Permalink/Permalink.js.map +7 -1
  59. package/components/Permalink/index.js +1 -3
  60. package/components/Permalink/index.js.map +7 -1
  61. package/components/Popup/Popup.js +106 -233
  62. package/components/Popup/Popup.js.map +7 -1
  63. package/components/Popup/index.js +1 -3
  64. package/components/Popup/index.js.map +7 -1
  65. package/components/ResizeHandler/ResizeHandler.js +60 -115
  66. package/components/ResizeHandler/ResizeHandler.js.map +7 -1
  67. package/components/ResizeHandler/index.js +1 -3
  68. package/components/ResizeHandler/index.js.map +7 -1
  69. package/components/RouteSchedule/RouteSchedule.js +153 -285
  70. package/components/RouteSchedule/RouteSchedule.js.map +7 -1
  71. package/components/RouteSchedule/index.js +1 -3
  72. package/components/RouteSchedule/index.js.map +7 -1
  73. package/components/ScaleLine/ScaleLine.js +21 -45
  74. package/components/ScaleLine/ScaleLine.js.map +7 -1
  75. package/components/ScaleLine/index.js +1 -3
  76. package/components/ScaleLine/index.js.map +7 -1
  77. package/components/Search/Search.js +122 -186
  78. package/components/Search/Search.js.map +7 -1
  79. package/components/Search/SearchService.js +45 -69
  80. package/components/Search/SearchService.js.map +7 -1
  81. package/components/Search/engines/Engine.js +18 -25
  82. package/components/Search/engines/Engine.js.map +7 -1
  83. package/components/Search/engines/StopFinder.js +21 -38
  84. package/components/Search/engines/StopFinder.js.map +7 -1
  85. package/components/Search/index.js +3 -6
  86. package/components/Search/index.js.map +7 -1
  87. package/components/StopsFinder/StopsFinder.js +123 -174
  88. package/components/StopsFinder/StopsFinder.js.map +7 -1
  89. package/components/StopsFinder/StopsFinderOption.js +37 -54
  90. package/components/StopsFinder/StopsFinderOption.js.map +7 -1
  91. package/components/StopsFinder/index.js +1 -3
  92. package/components/StopsFinder/index.js.map +7 -1
  93. package/components/TrackerControl/TrackerControl.js +73 -128
  94. package/components/TrackerControl/TrackerControl.js.map +7 -1
  95. package/components/TrackerControl/index.js +1 -3
  96. package/components/TrackerControl/index.js.map +7 -1
  97. package/components/Zoom/Zoom.js +69 -112
  98. package/components/Zoom/Zoom.js.map +7 -1
  99. package/components/Zoom/index.js +1 -3
  100. package/components/Zoom/index.js.map +7 -1
  101. package/package.json +20 -15
  102. package/propTypes.js +17 -23
  103. package/propTypes.js.map +7 -1
  104. package/setupTests.js +2 -4
  105. package/setupTests.js.map +7 -1
  106. package/themes/default/components.scss +0 -1
  107. package/themes/default/examples.scss +0 -1
  108. package/utils/GlobalsForOle.js +63 -64
  109. package/utils/GlobalsForOle.js.map +7 -1
  110. package/utils/KML.js +178 -364
  111. package/utils/KML.js.map +7 -1
  112. package/utils/KMLFormat.js +37 -73
  113. package/utils/KMLFormat.js.map +7 -1
  114. package/utils/Styles.js +24 -32
  115. package/utils/Styles.js.map +7 -1
  116. package/utils/getPolygonPattern.js +11 -44
  117. package/utils/getPolygonPattern.js.map +7 -1
  118. package/utils/timeUtils.js +16 -35
  119. package/utils/timeUtils.js.map +7 -1
  120. package/LayerService.test.js +0 -160
  121. package/LayerService.test.js.map +0 -1
  122. package/components/BaseLayerSwitcher/BaseLayerSwitcher.test.js +0 -88
  123. package/components/BaseLayerSwitcher/BaseLayerSwitcher.test.js.map +0 -1
  124. package/components/BaseLayerToggler/BaseLayerToggler.js +0 -490
  125. package/components/BaseLayerToggler/BaseLayerToggler.js.map +0 -1
  126. package/components/BaseLayerToggler/BaseLayerToggler.md.scss +0 -9
  127. package/components/BaseLayerToggler/BaseLayerToggler.scss +0 -49
  128. package/components/BaseLayerToggler/BaseLayerToggler.test.js +0 -127
  129. package/components/BaseLayerToggler/BaseLayerToggler.test.js.map +0 -1
  130. package/components/BaseLayerToggler/index.js +0 -3
  131. package/components/BaseLayerToggler/index.js.map +0 -1
  132. package/components/BasicMap/BasicMap.test.js +0 -288
  133. package/components/BasicMap/BasicMap.test.js.map +0 -1
  134. package/components/CanvasSaveButton/CanvasSaveButton.test.js +0 -173
  135. package/components/CanvasSaveButton/CanvasSaveButton.test.js.map +0 -1
  136. package/components/Copyright/Copyright.test.js +0 -133
  137. package/components/Copyright/Copyright.test.js.map +0 -1
  138. package/components/FeatureExportButton/FeatureExportButton.test.js +0 -407
  139. package/components/FeatureExportButton/FeatureExportButton.test.js.map +0 -1
  140. package/components/FilterButton/FilterButton.test.js +0 -48
  141. package/components/FilterButton/FilterButton.test.js.map +0 -1
  142. package/components/FitExtent/FitExtent.test.js +0 -44
  143. package/components/FitExtent/FitExtent.test.js.map +0 -1
  144. package/components/FollowButton/FollowButton.test.js +0 -57
  145. package/components/FollowButton/FollowButton.test.js.map +0 -1
  146. package/components/Geolocation/Geolocation.test.js +0 -263
  147. package/components/Geolocation/Geolocation.test.js.map +0 -1
  148. package/components/LayerTree/LayerTree.test.js +0 -323
  149. package/components/LayerTree/LayerTree.test.js.map +0 -1
  150. package/components/MousePosition/MousePosition.test.js +0 -125
  151. package/components/MousePosition/MousePosition.test.js.map +0 -1
  152. package/components/NorthArrow/NorthArrow.test.js +0 -106
  153. package/components/NorthArrow/NorthArrow.test.js.map +0 -1
  154. package/components/Overlay/Overlay.test.js +0 -145
  155. package/components/Overlay/Overlay.test.js.map +0 -1
  156. package/components/Permalink/Permalink.test.js +0 -267
  157. package/components/Permalink/Permalink.test.js.map +0 -1
  158. package/components/Popup/Popup.test.js +0 -291
  159. package/components/Popup/Popup.test.js.map +0 -1
  160. package/components/ResizeHandler/ResizeHandler.test.js +0 -410
  161. package/components/ResizeHandler/ResizeHandler.test.js.map +0 -1
  162. package/components/RouteSchedule/RouteSchedule.test.js +0 -102
  163. package/components/RouteSchedule/RouteSchedule.test.js.map +0 -1
  164. package/components/ScaleLine/ScaleLine.test.js +0 -32
  165. package/components/ScaleLine/ScaleLine.test.js.map +0 -1
  166. package/components/Search/Search.test.js +0 -15
  167. package/components/Search/Search.test.js.map +0 -1
  168. package/components/StopsFinder/StopsFinder.test.js +0 -19
  169. package/components/StopsFinder/StopsFinder.test.js.map +0 -1
  170. package/components/TrackerControl/TrackerControl.test.js +0 -17
  171. package/components/TrackerControl/TrackerControl.test.js.map +0 -1
  172. package/components/Zoom/Zoom.test.js +0 -150
  173. package/components/Zoom/Zoom.test.js.map +0 -1
  174. package/styleguidist/ComponentsList.js +0 -52
  175. package/styleguidist/ComponentsList.js.map +0 -1
  176. package/styleguidist/StyleGuide.js +0 -253
  177. package/styleguidist/StyleGuide.js.map +0 -1
  178. package/utils/KML.test.js +0 -163
  179. package/utils/KML.test.js.map +0 -1
  180. package/utils/KMLFormat.test.js +0 -22
  181. package/utils/KMLFormat.test.js.map +0 -1
  182. package/utils/getPolygonPattern.test.js +0 -66
  183. package/utils/getPolygonPattern.test.js.map +0 -1
  184. package/utils/timeUtils.test.js +0 -32
  185. package/utils/timeUtils.test.js.map +0 -1
@@ -1,350 +1,218 @@
1
- /* eslint-disable react/no-unused-prop-types */
2
- /* eslint-disable react/prop-types */
3
- import React from 'react';
4
- import PropTypes from 'prop-types';
5
- import { TrackerLayer } from 'mobility-toolbox-js/ol';
6
- import { getBgColor } from 'mobility-toolbox-js/common/trackerConfig';
7
- import { getHoursAndMinutes, getDelayString } from '../../utils/timeUtils';
8
- import ReactTransitPropTypes from '../../propTypes';
9
- import firstStation from '../../images/RouteSchedule/firstStation.png';
10
- import station from '../../images/RouteSchedule/station.png';
11
- import lastStation from '../../images/RouteSchedule/lastStation.png';
12
- import line from '../../images/RouteSchedule/line.png';
13
-
14
- /**
15
- * Returns a color class to display the delay.
16
- * @param {Number} time Delay time in milliseconds.
17
- */
18
- var getDelayColor = function (time) {
19
- var secs = Math.round(((time / 1800 / 2) * 3600) / 1000);
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+ import {
4
+ RealtimeLayer as TrackerLayer,
5
+ trackerConfig
6
+ } from "mobility-toolbox-js/ol";
7
+ import { getHoursAndMinutes, getDelayString } from "../../utils/timeUtils";
8
+ import ReactTransitPropTypes from "../../propTypes";
9
+ import firstStation from "../../images/RouteSchedule/firstStation.png";
10
+ import station from "../../images/RouteSchedule/station.png";
11
+ import lastStation from "../../images/RouteSchedule/lastStation.png";
12
+ import line from "../../images/RouteSchedule/line.png";
13
+ const { getBgColor } = trackerConfig;
14
+ const getDelayColor = (time) => {
15
+ const secs = Math.round(time / 1800 / 2 * 3600 / 1e3);
20
16
  if (secs >= 3600) {
21
- return 'dark-red';
17
+ return "dark-red";
22
18
  }
23
19
  if (secs >= 500) {
24
- return 'middle-red';
20
+ return "middle-red";
25
21
  }
26
22
  if (secs >= 300) {
27
- return 'light-red';
23
+ return "light-red";
28
24
  }
29
25
  if (secs >= 180) {
30
- return 'orange';
26
+ return "orange";
31
27
  }
32
- return 'green';
28
+ return "green";
33
29
  };
34
-
35
- /**
36
- * Returns true if the train doesn't stop to the station.
37
- * @param {Object} stop Station information.
38
- */
39
- var isNotStop = function (stop) {
30
+ const isNotStop = (stop) => {
40
31
  return !stop.arrivalTime && !stop.departureTime;
41
32
  };
42
-
43
- /**
44
- * Returns if the station has already been passed by the vehicule.
45
- * @param {Object} stop Station information.
46
- * @param {number} time The current time to test in ms.
47
- * @param {Array<Object>} stops the list of all stops of the train.
48
- * @param {idx} idx The index of the stop object in the stops array.
49
- */
50
- var isPassed = function (stop, time, stops, idx) {
51
- // If the train doesn't stop to the stop object, we test if the stop just before has been passed or not.
52
- // if yes the current stop is considered as passed.
33
+ const isPassed = (stop, time, stops, idx) => {
53
34
  if (isNotStop(stop)) {
54
35
  if (stops[idx - 1] && idx > 0) {
55
36
  return isPassed(stops[idx - 1], time, stops, idx);
56
37
  }
57
38
  return true;
58
39
  }
59
-
60
- // Sometimes stop.departureDelay is undefined.
61
- var timeToCompare = stop.departureTime || stop.arrivalTime || 0;
62
- var delayToCompare = stop.departureDelay || stop.arrivalDelay || 0;
40
+ const timeToCompare = stop.departureTime || stop.arrivalTime || 0;
41
+ const delayToCompare = stop.departureDelay || stop.arrivalDelay || 0;
63
42
  return timeToCompare + delayToCompare <= time;
64
43
  };
65
-
66
- /**
67
- * Returns an image for first, middle or last stations.
68
- * @param {Number} stations The stations list.
69
- * @param {Number} index Index of the station in the list.
70
- * @param {Boolean} isStationPassed If the train is already passed at this station.
71
- * @param {Boolean} isNotStation If the train doesn't stop to this station.
72
- */
73
- var defaultRenderStationImg = function (
74
- stations,
75
- index,
76
- isStationPassed,
77
- isNotStation
78
- ) {
79
- var length = stations.length;
80
- var src = station;
44
+ const defaultRenderStationImg = (stations, index, isStationPassed, isNotStation) => {
45
+ const { length } = stations;
46
+ let src = station.src || station;
81
47
  if (index === 0) {
82
- src = firstStation;
48
+ src = firstStation.src || firstStation;
83
49
  } else if (index === length - 1) {
84
- src = lastStation;
50
+ src = lastStation.src || lastStation;
85
51
  } else if (isNotStation) {
86
- src = line;
52
+ src = line.src || line;
87
53
  }
88
- return React.createElement( 'img', { src: src, alt: "routeScheduleLine", className: "rt-route-icon" });
54
+ return /* @__PURE__ */ React.createElement("img", {
55
+ src,
56
+ alt: "routeScheduleLine",
57
+ className: "rt-route-icon"
58
+ });
89
59
  };
90
-
91
- var defaultRenderStation = function (ref) {
92
- var lineInfos = ref.lineInfos;
93
- var onStationClick = ref.onStationClick;
94
- var trackerLayer = ref.trackerLayer;
95
- var renderStationImg = ref.renderStationImg;
96
- var stop = ref.stop;
97
- var idx = ref.idx;
98
-
99
- var stationId = stop.stationId;
100
- var arrivalDelay = stop.arrivalDelay;
101
- var departureDelay = stop.departureDelay;
102
- var arrivalTime = stop.arrivalTime;
103
- var departureTime = stop.departureTime;
104
- var cancelled = stop.cancelled;
105
- var stationName = stop.stationName;
106
- var stations = lineInfos.stations;
107
- var isFirstStation = idx === 0;
108
- var isLastStation = idx === stations.length - 1;
109
- var isStationPassed = isPassed(stop, trackerLayer.time, stations, idx);
110
- var isNotStation = isNotStop(stop);
111
- return (
112
- React.createElement( 'div', {
113
- // Train line can go in circle so begin and end have the same id,
114
- // using the time in the key should fix the issue.
115
- key: (stationId || stationName) + arrivalTime + departureTime, role: "button", className: [
116
- 'rt-route-station',
117
- isStationPassed ? ' rt-passed' : '',
118
- isNotStation ? ' rt-no-stop' : '' ].join(''), onClick: function (e) {
119
- return onStationClick(stop, e);
120
- }, tabIndex: 0, onKeyPress: function (e) {
121
- return e.which === 13 && onStationClick(stop, e);
122
- } },
123
- React.createElement( 'div', { className: "rt-route-delay" },
124
- typeof arrivalDelay === 'undefined' || isFirstStation || cancelled ? (
125
- ''
126
- ) : (
127
- React.createElement( 'span', {
128
- className: ("rt-route-delay-arrival" + (" " + (getDelayColor(
129
- arrivalDelay
130
- )))) },
131
- ("+" + (getDelayString(arrivalDelay)))
132
- )
133
- ),
134
- typeof departureDelay === 'undefined' || isLastStation || cancelled ? (
135
- ''
136
- ) : (
137
- React.createElement( 'span', {
138
- className: ("rt-route-delay-departure" + (" " + (getDelayColor(
139
- departureDelay
140
- )))) },
141
- ("+" + (getDelayString(departureDelay)))
142
- )
143
- )
144
- ),
145
- React.createElement( 'div', { className: "rt-route-times" },
146
- React.createElement( 'span', {
147
- className: ("rt-route-time-arrival " + (cancelled ? 'rt-route-cancelled' : '')) },
148
- getHoursAndMinutes(arrivalTime)
149
- ),
150
- React.createElement( 'span', {
151
- className: ("rt-route-time-departure " + (cancelled ? 'rt-route-cancelled' : '')) },
152
- getHoursAndMinutes(departureTime)
153
- )
154
- ),
155
- renderStationImg(stations, idx, isStationPassed, isNotStation),
156
- React.createElement( 'div', { className: cancelled ? 'rt-route-cancelled' : '' }, stationName)
157
- )
158
- );
60
+ const defaultRenderStation = ({
61
+ lineInfos,
62
+ onStationClick,
63
+ trackerLayer,
64
+ renderStationImg,
65
+ stop,
66
+ idx
67
+ }) => {
68
+ const {
69
+ stationId,
70
+ arrivalDelay,
71
+ departureDelay,
72
+ arrivalTime,
73
+ departureTime,
74
+ state,
75
+ stationName
76
+ } = stop;
77
+ const cancelled = state === "JOURNEY_CANCELLED" || state === "STOP_CANCELLED";
78
+ const { stations } = lineInfos;
79
+ const isFirstStation = idx === 0;
80
+ const isLastStation = idx === stations.length - 1;
81
+ const isStationPassed = isPassed(stop, trackerLayer.time, stations, idx);
82
+ const isNotStation = isNotStop(stop);
83
+ return /* @__PURE__ */ React.createElement("div", {
84
+ key: (stationId || stationName) + arrivalTime + departureTime,
85
+ role: "button",
86
+ className: [
87
+ "rt-route-station",
88
+ isStationPassed ? " rt-passed" : "",
89
+ isNotStation ? " rt-no-stop" : ""
90
+ ].join(""),
91
+ onClick: (e) => {
92
+ return onStationClick(stop, e);
93
+ },
94
+ tabIndex: 0,
95
+ onKeyPress: (e) => {
96
+ return e.which === 13 && onStationClick(stop, e);
97
+ }
98
+ }, /* @__PURE__ */ React.createElement("div", {
99
+ className: "rt-route-delay"
100
+ }, typeof arrivalDelay === "undefined" || isFirstStation || cancelled ? "" : /* @__PURE__ */ React.createElement("span", {
101
+ className: `rt-route-delay-arrival${` ${getDelayColor(
102
+ arrivalDelay
103
+ )}`}`
104
+ }, `+${getDelayString(arrivalDelay)}`), typeof departureDelay === "undefined" || isLastStation || cancelled ? "" : /* @__PURE__ */ React.createElement("span", {
105
+ className: `rt-route-delay-departure${` ${getDelayColor(
106
+ departureDelay
107
+ )}`}`
108
+ }, `+${getDelayString(departureDelay)}`)), /* @__PURE__ */ React.createElement("div", {
109
+ className: "rt-route-times"
110
+ }, /* @__PURE__ */ React.createElement("span", {
111
+ className: `rt-route-time-arrival ${cancelled ? "rt-route-cancelled" : ""}`
112
+ }, getHoursAndMinutes(arrivalTime)), /* @__PURE__ */ React.createElement("span", {
113
+ className: `rt-route-time-departure ${cancelled ? "rt-route-cancelled" : ""}`
114
+ }, getHoursAndMinutes(departureTime))), renderStationImg(stations, idx, isStationPassed, isNotStation), /* @__PURE__ */ React.createElement("div", {
115
+ className: cancelled ? "rt-route-cancelled" : ""
116
+ }, stationName));
159
117
  };
160
-
161
- var renderRouteIdentifier = function (ref) {
162
- var routeIdentifier = ref.routeIdentifier;
163
- var longName = ref.longName;
164
-
118
+ const renderRouteIdentifier = ({ routeIdentifier, longName }) => {
165
119
  if (routeIdentifier) {
166
- // first part of the id, without leading zeros.
167
- var id = parseInt(routeIdentifier.split('.')[0], 10);
120
+ const id = parseInt(routeIdentifier.split(".")[0], 10);
168
121
  if (!longName.includes(id)) {
169
- return (" (" + id + ")");
122
+ return ` (${id})`;
170
123
  }
171
124
  }
172
125
  return null;
173
126
  };
174
-
175
- var defaultRenderHeader = function (ref) {
176
- var lineInfos = ref.lineInfos;
177
- var renderHeaderButtons = ref.renderHeaderButtons;
178
-
179
- var type = lineInfos.type;
180
- var vehicleType = lineInfos.vehicleType;
181
- var shortName = lineInfos.shortName;
182
- var longName = lineInfos.longName;
183
- var stroke = lineInfos.stroke;
184
- var destination = lineInfos.destination;
185
- var routeIdentifier = lineInfos.routeIdentifier;
186
- var textColor = lineInfos.text_color;
187
- return (
188
- React.createElement( 'div', { className: "rt-route-header" },
189
- React.createElement( 'span', {
190
- className: "rt-route-icon", style: {
191
- /* stylelint-disable-next-line value-keyword-case */
192
- backgroundColor: stroke || getBgColor(type || vehicleType),
193
- color: textColor || 'black',
194
- } },
195
- shortName
196
- ),
197
- React.createElement( 'div', { className: "rt-route-title" },
198
- React.createElement( 'span', { className: "rt-route-name" }, destination),
199
- React.createElement( 'span', null,
200
- longName,
201
- renderRouteIdentifier(lineInfos)
202
- )
203
- ),
204
- React.createElement( 'div', { className: "rt-route-buttons" },
205
- renderHeaderButtons(routeIdentifier)
206
- )
207
- )
208
- );
127
+ const defaultRenderHeader = ({ lineInfos, renderHeaderButtons }) => {
128
+ const {
129
+ type,
130
+ vehicleType,
131
+ shortName,
132
+ longName,
133
+ stroke,
134
+ destination,
135
+ routeIdentifier,
136
+ text_color: textColor
137
+ } = lineInfos;
138
+ return /* @__PURE__ */ React.createElement("div", {
139
+ className: "rt-route-header"
140
+ }, /* @__PURE__ */ React.createElement("span", {
141
+ className: "rt-route-icon",
142
+ style: {
143
+ backgroundColor: stroke || getBgColor(type || vehicleType),
144
+ color: textColor || "black"
145
+ }
146
+ }, shortName), /* @__PURE__ */ React.createElement("div", {
147
+ className: "rt-route-title"
148
+ }, /* @__PURE__ */ React.createElement("span", {
149
+ className: "rt-route-name"
150
+ }, destination), /* @__PURE__ */ React.createElement("span", null, longName, renderRouteIdentifier(lineInfos))), /* @__PURE__ */ React.createElement("div", {
151
+ className: "rt-route-buttons"
152
+ }, renderHeaderButtons(routeIdentifier)));
209
153
  };
210
-
211
- var defaultRenderFooter = function (props) {
212
- var lineInfos = props.lineInfos;
213
- var renderCopyright = props.renderCopyright;
154
+ const defaultRenderFooter = (props) => {
155
+ const { lineInfos, renderCopyright } = props;
214
156
  if (!lineInfos.operator && !lineInfos.publisher) {
215
157
  return null;
216
158
  }
217
- return React.createElement( 'div', { className: "rt-route-footer" }, renderCopyright(Object.assign({}, props)));
159
+ return /* @__PURE__ */ React.createElement("div", {
160
+ className: "rt-route-footer"
161
+ }, renderCopyright({ ...props }));
218
162
  };
219
-
220
- var defaultRenderLink = function (text, url) {
221
- return (
222
- React.createElement( 'div', { className: "rt-route-copyright-link" },
223
- url ? (
224
- React.createElement( 'a', { href: url, target: "_blank", rel: "noreferrer" },
225
- text
226
- )
227
- ) : (
228
- React.createElement( React.Fragment, null, text )
229
- )
230
- )
231
- );
163
+ const defaultRenderLink = (text, url) => {
164
+ return /* @__PURE__ */ React.createElement("div", {
165
+ className: "rt-route-copyright-link"
166
+ }, url ? /* @__PURE__ */ React.createElement("a", {
167
+ href: url,
168
+ target: "_blank",
169
+ rel: "noreferrer"
170
+ }, text) : /* @__PURE__ */ React.createElement(React.Fragment, null, text));
232
171
  };
233
-
234
- var defaultRenderCopyright = function (ref) {
235
- var lineInfos = ref.lineInfos;
236
-
237
- return (
238
- React.createElement( 'span', { className: "rt-route-copyright" },
239
- lineInfos.operator &&
240
- defaultRenderLink(lineInfos.operator, lineInfos.operatorUrl),
241
- lineInfos.operator && lineInfos.publisher && React.createElement( 'span', null, " - " ),
242
- lineInfos.publisher &&
243
- defaultRenderLink(lineInfos.publisher, lineInfos.publisherUrl),
244
- lineInfos.license && React.createElement( 'span', null, " (" ),
245
- lineInfos.license &&
246
- defaultRenderLink(lineInfos.license, lineInfos.licenseUrl),
247
- lineInfos.license && ')'
248
- )
249
- );
172
+ const defaultRenderCopyright = ({ lineInfos }) => {
173
+ return /* @__PURE__ */ React.createElement("span", {
174
+ className: "rt-route-copyright"
175
+ }, lineInfos.operator && defaultRenderLink(lineInfos.operator, lineInfos.operatorUrl), lineInfos.operator && lineInfos.publisher && /* @__PURE__ */ React.createElement("span", null, "\xA0-\xA0"), lineInfos.publisher && defaultRenderLink(lineInfos.publisher, lineInfos.publisherUrl), lineInfos.license && /* @__PURE__ */ React.createElement("span", null, "\xA0("), lineInfos.license && defaultRenderLink(lineInfos.license, lineInfos.licenseUrl), lineInfos.license && ")");
250
176
  };
251
-
252
- var propTypes = {
253
- /**
254
- * CSS class of the route schedule wrapper.
255
- */
177
+ const propTypes = {
256
178
  className: PropTypes.string,
257
-
258
- /**
259
- * Trajectory stations informations.
260
- */
261
179
  lineInfos: ReactTransitPropTypes.lineInfos,
262
-
263
- /**
264
- * Trackerlayer.
265
- */
266
180
  trackerLayer: PropTypes.instanceOf(TrackerLayer).isRequired,
267
-
268
- /**
269
- * Render Header of the route scheduler.
270
- */
271
181
  renderHeader: PropTypes.func,
272
-
273
- /**
274
- * Render Footer of the route scheduler.
275
- */
276
182
  renderFooter: PropTypes.func,
277
-
278
- /**
279
- * Render Copyright of the route scheduler.
280
- */
281
183
  renderCopyright: PropTypes.func,
282
-
283
- /**
284
- * Render the status of the station image.
285
- */
286
184
  renderStationImg: PropTypes.func,
287
-
288
- /**
289
- * Render a station.
290
- */
291
185
  renderStation: PropTypes.func,
292
-
293
- /**
294
- * Function triggered on station's click event.
295
- */
296
186
  onStationClick: PropTypes.func,
297
-
298
- /**
299
- * Function to render header buttons.
300
- */
301
- renderHeaderButtons: PropTypes.func,
187
+ renderHeaderButtons: PropTypes.func
302
188
  };
303
-
304
- var defaultProps = {
305
- className: 'rt-route-schedule',
189
+ const defaultProps = {
190
+ className: "rt-route-schedule",
306
191
  lineInfos: null,
307
192
  renderHeader: defaultRenderHeader,
308
193
  renderStation: defaultRenderStation,
309
194
  renderStationImg: defaultRenderStationImg,
310
195
  renderCopyright: defaultRenderCopyright,
311
196
  renderFooter: defaultRenderFooter,
312
- renderHeaderButtons: function () {
197
+ renderHeaderButtons: () => {
313
198
  return null;
314
199
  },
315
- onStationClick: function () {},
200
+ onStationClick: () => {
201
+ }
316
202
  };
317
-
318
- /**
319
- * RouteSchedule displays information, stops and punctuality about the clicked route.
320
- */
321
203
  function RouteSchedule(props) {
322
- var lineInfos = props.lineInfos;
323
- var className = props.className;
324
- var renderStation = props.renderStation;
325
- var renderHeader = props.renderHeader;
326
- var renderFooter = props.renderFooter;
327
-
204
+ const { lineInfos, className, renderStation, renderHeader, renderFooter } = props;
328
205
  if (!lineInfos) {
329
206
  return null;
330
207
  }
331
-
332
- return (
333
- React.createElement( 'div', { className: className },
334
- renderHeader(Object.assign({}, props)),
335
- React.createElement( 'div', { className: "rt-route-body" },
336
- lineInfos.stations.map(function (stop, idx) {
337
- return renderStation(Object.assign({}, props, {stop: stop, idx: idx}));
338
- })
339
- ),
340
- renderFooter(Object.assign({}, props))
341
- )
342
- );
208
+ return /* @__PURE__ */ React.createElement("div", {
209
+ className
210
+ }, renderHeader({ ...props }), /* @__PURE__ */ React.createElement("div", {
211
+ className: "rt-route-body"
212
+ }, lineInfos.stations.map((stop, idx) => {
213
+ return renderStation({ ...props, stop, idx });
214
+ })), renderFooter({ ...props }));
343
215
  }
344
-
345
216
  RouteSchedule.propTypes = propTypes;
346
217
  RouteSchedule.defaultProps = defaultProps;
347
-
348
218
  export default React.memo(RouteSchedule);
349
-
350
- //# sourceMappingURL=RouteSchedule.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"RouteSchedule.js","sources":["../../../src/components/RouteSchedule/RouteSchedule.js"],"sourcesContent":["/* eslint-disable react/no-unused-prop-types */\n/* eslint-disable react/prop-types */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { TrackerLayer } from 'mobility-toolbox-js/ol';\nimport { getBgColor } from 'mobility-toolbox-js/common/trackerConfig';\nimport { getHoursAndMinutes, getDelayString } from '../../utils/timeUtils';\nimport ReactTransitPropTypes from '../../propTypes';\nimport firstStation from '../../images/RouteSchedule/firstStation.png';\nimport station from '../../images/RouteSchedule/station.png';\nimport lastStation from '../../images/RouteSchedule/lastStation.png';\nimport line from '../../images/RouteSchedule/line.png';\n\n/**\n * Returns a color class to display the delay.\n * @param {Number} time Delay time in milliseconds.\n */\nconst getDelayColor = (time) => {\n const secs = Math.round(((time / 1800 / 2) * 3600) / 1000);\n if (secs >= 3600) {\n return 'dark-red';\n }\n if (secs >= 500) {\n return 'middle-red';\n }\n if (secs >= 300) {\n return 'light-red';\n }\n if (secs >= 180) {\n return 'orange';\n }\n return 'green';\n};\n\n/**\n * Returns true if the train doesn't stop to the station.\n * @param {Object} stop Station information.\n */\nconst isNotStop = (stop) => {\n return !stop.arrivalTime && !stop.departureTime;\n};\n\n/**\n * Returns if the station has already been passed by the vehicule.\n * @param {Object} stop Station information.\n * @param {number} time The current time to test in ms.\n * @param {Array<Object>} stops the list of all stops of the train.\n * @param {idx} idx The index of the stop object in the stops array.\n */\nconst isPassed = (stop, time, stops, idx) => {\n // If the train doesn't stop to the stop object, we test if the stop just before has been passed or not.\n // if yes the current stop is considered as passed.\n if (isNotStop(stop)) {\n if (stops[idx - 1] && idx > 0) {\n return isPassed(stops[idx - 1], time, stops, idx);\n }\n return true;\n }\n\n // Sometimes stop.departureDelay is undefined.\n const timeToCompare = stop.departureTime || stop.arrivalTime || 0;\n const delayToCompare = stop.departureDelay || stop.arrivalDelay || 0;\n return timeToCompare + delayToCompare <= time;\n};\n\n/**\n * Returns an image for first, middle or last stations.\n * @param {Number} stations The stations list.\n * @param {Number} index Index of the station in the list.\n * @param {Boolean} isStationPassed If the train is already passed at this station.\n * @param {Boolean} isNotStation If the train doesn't stop to this station.\n */\nconst defaultRenderStationImg = (\n stations,\n index,\n isStationPassed,\n isNotStation,\n) => {\n const { length } = stations;\n let src = station;\n if (index === 0) {\n src = firstStation;\n } else if (index === length - 1) {\n src = lastStation;\n } else if (isNotStation) {\n src = line;\n }\n return <img src={src} alt=\"routeScheduleLine\" className=\"rt-route-icon\" />;\n};\n\nconst defaultRenderStation = ({\n lineInfos,\n onStationClick,\n trackerLayer,\n renderStationImg,\n stop,\n idx,\n}) => {\n const {\n stationId,\n arrivalDelay,\n departureDelay,\n arrivalTime,\n departureTime,\n cancelled,\n stationName,\n } = stop;\n const { stations } = lineInfos;\n const isFirstStation = idx === 0;\n const isLastStation = idx === stations.length - 1;\n const isStationPassed = isPassed(stop, trackerLayer.time, stations, idx);\n const isNotStation = isNotStop(stop);\n return (\n <div\n // Train line can go in circle so begin and end have the same id,\n // using the time in the key should fix the issue.\n key={(stationId || stationName) + arrivalTime + departureTime}\n role=\"button\"\n className={[\n 'rt-route-station',\n isStationPassed ? ' rt-passed' : '',\n isNotStation ? ' rt-no-stop' : '',\n ].join('')}\n onClick={(e) => {\n return onStationClick(stop, e);\n }}\n tabIndex={0}\n onKeyPress={(e) => {\n return e.which === 13 && onStationClick(stop, e);\n }}\n >\n <div className=\"rt-route-delay\">\n {typeof arrivalDelay === 'undefined' || isFirstStation || cancelled ? (\n ''\n ) : (\n <span\n className={`rt-route-delay-arrival${` ${getDelayColor(\n arrivalDelay,\n )}`}`}\n >\n {`+${getDelayString(arrivalDelay)}`}\n </span>\n )}\n {typeof departureDelay === 'undefined' || isLastStation || cancelled ? (\n ''\n ) : (\n <span\n className={`rt-route-delay-departure${` ${getDelayColor(\n departureDelay,\n )}`}`}\n >\n {`+${getDelayString(departureDelay)}`}\n </span>\n )}\n </div>\n <div className=\"rt-route-times\">\n <span\n className={`rt-route-time-arrival ${\n cancelled ? 'rt-route-cancelled' : ''\n }`}\n >\n {getHoursAndMinutes(arrivalTime)}\n </span>\n <span\n className={`rt-route-time-departure ${\n cancelled ? 'rt-route-cancelled' : ''\n }`}\n >\n {getHoursAndMinutes(departureTime)}\n </span>\n </div>\n {renderStationImg(stations, idx, isStationPassed, isNotStation)}\n <div className={cancelled ? 'rt-route-cancelled' : ''}>{stationName}</div>\n </div>\n );\n};\n\nconst renderRouteIdentifier = ({ routeIdentifier, longName }) => {\n if (routeIdentifier) {\n // first part of the id, without leading zeros.\n const id = parseInt(routeIdentifier.split('.')[0], 10);\n if (!longName.includes(id)) {\n return ` (${id})`;\n }\n }\n return null;\n};\n\nconst defaultRenderHeader = ({ lineInfos, renderHeaderButtons }) => {\n const {\n type,\n vehicleType,\n shortName,\n longName,\n stroke,\n destination,\n routeIdentifier,\n text_color: textColor,\n } = lineInfos;\n return (\n <div className=\"rt-route-header\">\n <span\n className=\"rt-route-icon\"\n style={{\n /* stylelint-disable-next-line value-keyword-case */\n backgroundColor: stroke || getBgColor(type || vehicleType),\n color: textColor || 'black',\n }}\n >\n {shortName}\n </span>\n <div className=\"rt-route-title\">\n <span className=\"rt-route-name\">{destination}</span>\n <span>\n {longName}\n {renderRouteIdentifier(lineInfos)}\n </span>\n </div>\n <div className=\"rt-route-buttons\">\n {renderHeaderButtons(routeIdentifier)}\n </div>\n </div>\n );\n};\n\nconst defaultRenderFooter = (props) => {\n const { lineInfos, renderCopyright } = props;\n if (!lineInfos.operator && !lineInfos.publisher) {\n return null;\n }\n return <div className=\"rt-route-footer\">{renderCopyright({ ...props })}</div>;\n};\n\nconst defaultRenderLink = (text, url) => {\n return (\n <div className=\"rt-route-copyright-link\">\n {url ? (\n <a href={url} target=\"_blank\" rel=\"noreferrer\">\n {text}\n </a>\n ) : (\n <>{text}</>\n )}\n </div>\n );\n};\n\nconst defaultRenderCopyright = ({ lineInfos }) => {\n return (\n <span className=\"rt-route-copyright\">\n {lineInfos.operator &&\n defaultRenderLink(lineInfos.operator, lineInfos.operatorUrl)}\n {lineInfos.operator && lineInfos.publisher && <span>&nbsp;-&nbsp;</span>}\n {lineInfos.publisher &&\n defaultRenderLink(lineInfos.publisher, lineInfos.publisherUrl)}\n {lineInfos.license && <span>&nbsp;(</span>}\n {lineInfos.license &&\n defaultRenderLink(lineInfos.license, lineInfos.licenseUrl)}\n {lineInfos.license && ')'}\n </span>\n );\n};\n\nconst propTypes = {\n /**\n * CSS class of the route schedule wrapper.\n */\n className: PropTypes.string,\n\n /**\n * Trajectory stations informations.\n */\n lineInfos: ReactTransitPropTypes.lineInfos,\n\n /**\n * Trackerlayer.\n */\n trackerLayer: PropTypes.instanceOf(TrackerLayer).isRequired,\n\n /**\n * Render Header of the route scheduler.\n */\n renderHeader: PropTypes.func,\n\n /**\n * Render Footer of the route scheduler.\n */\n renderFooter: PropTypes.func,\n\n /**\n * Render Copyright of the route scheduler.\n */\n renderCopyright: PropTypes.func,\n\n /**\n * Render the status of the station image.\n */\n renderStationImg: PropTypes.func,\n\n /**\n * Render a station.\n */\n renderStation: PropTypes.func,\n\n /**\n * Function triggered on station's click event.\n */\n onStationClick: PropTypes.func,\n\n /**\n * Function to render header buttons.\n */\n renderHeaderButtons: PropTypes.func,\n};\n\nconst defaultProps = {\n className: 'rt-route-schedule',\n lineInfos: null,\n renderHeader: defaultRenderHeader,\n renderStation: defaultRenderStation,\n renderStationImg: defaultRenderStationImg,\n renderCopyright: defaultRenderCopyright,\n renderFooter: defaultRenderFooter,\n renderHeaderButtons: () => {\n return null;\n },\n onStationClick: () => {},\n};\n\n/**\n * RouteSchedule displays information, stops and punctuality about the clicked route.\n */\nfunction RouteSchedule(props) {\n const { lineInfos, className, renderStation, renderHeader, renderFooter } =\n props;\n\n if (!lineInfos) {\n return null;\n }\n\n return (\n <div className={className}>\n {renderHeader({ ...props })}\n <div className=\"rt-route-body\">\n {lineInfos.stations.map((stop, idx) => {\n return renderStation({ ...props, stop, idx });\n })}\n </div>\n {renderFooter({ ...props })}\n </div>\n );\n}\n\nRouteSchedule.propTypes = propTypes;\nRouteSchedule.defaultProps = defaultProps;\n\nexport default React.memo(RouteSchedule);\n"],"names":["const","let"],"mappings":"AAAA;AACA;AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,SAAS,YAAY,QAAQ,wBAAwB,CAAC;AACtD,SAAS,UAAU,QAAQ,0CAA0C,CAAC;AACtE,SAAS,kBAAkB,EAAE,cAAc,QAAQ,uBAAuB,CAAC;AAC3E,OAAO,qBAAqB,MAAM,iBAAiB,CAAC;AACpD,OAAO,YAAY,MAAM,6CAA6C,CAAC;AACvE,OAAO,OAAO,MAAM,wCAAwC,CAAC;AAC7D,OAAO,WAAW,MAAM,4CAA4C,CAAC;AACrE,OAAO,IAAI,MAAM,qCAAqC,CAAC;AACvD;AACA;AACA;AACA;AACA;AACAA,GAAK,CAAC,aAAa,YAAG,CAAC,IAAI,EAAK;AAChC,EAAEA,GAAK,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,C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teSchedule/RouteSchedule.js"],
4
+ "sourcesContent": ["/* eslint-disable react/no-unused-prop-types */\n/* eslint-disable react/prop-types */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n RealtimeLayer as TrackerLayer,\n trackerConfig,\n} from 'mobility-toolbox-js/ol';\nimport { getHoursAndMinutes, getDelayString } from '../../utils/timeUtils';\nimport ReactTransitPropTypes from '../../propTypes';\nimport firstStation from '../../images/RouteSchedule/firstStation.png';\nimport station from '../../images/RouteSchedule/station.png';\nimport lastStation from '../../images/RouteSchedule/lastStation.png';\nimport line from '../../images/RouteSchedule/line.png';\n\nconst { getBgColor } = trackerConfig;\n\n/**\n * Returns a color class to display the delay.\n * @param {Number} time Delay time in milliseconds.\n */\nconst getDelayColor = (time) => {\n const secs = Math.round(((time / 1800 / 2) * 3600) / 1000);\n if (secs >= 3600) {\n return 'dark-red';\n }\n if (secs >= 500) {\n return 'middle-red';\n }\n if (secs >= 300) {\n return 'light-red';\n }\n if (secs >= 180) {\n return 'orange';\n }\n return 'green';\n};\n\n/**\n * Returns true if the train doesn't stop to the station.\n * @param {Object} stop Station information.\n */\nconst isNotStop = (stop) => {\n return !stop.arrivalTime && !stop.departureTime;\n};\n\n/**\n * Returns if the station has already been passed by the vehicule.\n * @param {Object} stop Station information.\n * @param {number} time The current time to test in ms.\n * @param {Array<Object>} stops the list of all stops of the train.\n * @param {idx} idx The index of the stop object in the stops array.\n */\nconst isPassed = (stop, time, stops, idx) => {\n // If the train doesn't stop to the stop object, we test if the stop just before has been passed or not.\n // if yes the current stop is considered as passed.\n if (isNotStop(stop)) {\n if (stops[idx - 1] && idx > 0) {\n return isPassed(stops[idx - 1], time, stops, idx);\n }\n return true;\n }\n\n // Sometimes stop.departureDelay is undefined.\n const timeToCompare = stop.departureTime || stop.arrivalTime || 0;\n const delayToCompare = stop.departureDelay || stop.arrivalDelay || 0;\n return timeToCompare + delayToCompare <= time;\n};\n\n/**\n * Returns an image for first, middle or last stations.\n * @param {Number} stations The stations list.\n * @param {Number} index Index of the station in the list.\n * @param {Boolean} isStationPassed If the train is already passed at this station.\n * @param {Boolean} isNotStation If the train doesn't stop to this station.\n */\nconst defaultRenderStationImg = (\n stations,\n index,\n isStationPassed,\n isNotStation,\n) => {\n const { length } = stations;\n let src = station.src || station;\n if (index === 0) {\n src = firstStation.src || firstStation;\n } else if (index === length - 1) {\n src = lastStation.src || lastStation;\n } else if (isNotStation) {\n src = line.src || line;\n }\n return <img src={src} alt=\"routeScheduleLine\" className=\"rt-route-icon\" />;\n};\n\nconst defaultRenderStation = ({\n lineInfos,\n onStationClick,\n trackerLayer,\n renderStationImg,\n stop,\n idx,\n}) => {\n const {\n stationId,\n arrivalDelay,\n departureDelay,\n arrivalTime,\n departureTime,\n state,\n stationName,\n } = stop;\n const cancelled = state === 'JOURNEY_CANCELLED' || state === 'STOP_CANCELLED';\n const { stations } = lineInfos;\n const isFirstStation = idx === 0;\n const isLastStation = idx === stations.length - 1;\n const isStationPassed = isPassed(stop, trackerLayer.time, stations, idx);\n const isNotStation = isNotStop(stop);\n return (\n <div\n // Train line can go in circle so begin and end have the same id,\n // using the time in the key should fix the issue.\n key={(stationId || stationName) + arrivalTime + departureTime}\n role=\"button\"\n className={[\n 'rt-route-station',\n isStationPassed ? ' rt-passed' : '',\n isNotStation ? ' rt-no-stop' : '',\n ].join('')}\n onClick={(e) => {\n return onStationClick(stop, e);\n }}\n tabIndex={0}\n onKeyPress={(e) => {\n return e.which === 13 && onStationClick(stop, e);\n }}\n >\n <div className=\"rt-route-delay\">\n {typeof arrivalDelay === 'undefined' || isFirstStation || cancelled ? (\n ''\n ) : (\n <span\n className={`rt-route-delay-arrival${` ${getDelayColor(\n arrivalDelay,\n )}`}`}\n >\n {`+${getDelayString(arrivalDelay)}`}\n </span>\n )}\n {typeof departureDelay === 'undefined' || isLastStation || cancelled ? (\n ''\n ) : (\n <span\n className={`rt-route-delay-departure${` ${getDelayColor(\n departureDelay,\n )}`}`}\n >\n {`+${getDelayString(departureDelay)}`}\n </span>\n )}\n </div>\n <div className=\"rt-route-times\">\n <span\n className={`rt-route-time-arrival ${\n cancelled ? 'rt-route-cancelled' : ''\n }`}\n >\n {getHoursAndMinutes(arrivalTime)}\n </span>\n <span\n className={`rt-route-time-departure ${\n cancelled ? 'rt-route-cancelled' : ''\n }`}\n >\n {getHoursAndMinutes(departureTime)}\n </span>\n </div>\n {renderStationImg(stations, idx, isStationPassed, isNotStation)}\n <div className={cancelled ? 'rt-route-cancelled' : ''}>{stationName}</div>\n </div>\n );\n};\n\nconst renderRouteIdentifier = ({ routeIdentifier, longName }) => {\n if (routeIdentifier) {\n // first part of the id, without leading zeros.\n const id = parseInt(routeIdentifier.split('.')[0], 10);\n if (!longName.includes(id)) {\n return ` (${id})`;\n }\n }\n return null;\n};\n\nconst defaultRenderHeader = ({ lineInfos, renderHeaderButtons }) => {\n const {\n type,\n vehicleType,\n shortName,\n longName,\n stroke,\n destination,\n routeIdentifier,\n text_color: textColor,\n } = lineInfos;\n return (\n <div className=\"rt-route-header\">\n <span\n className=\"rt-route-icon\"\n style={{\n /* stylelint-disable-next-line value-keyword-case */\n backgroundColor: stroke || getBgColor(type || vehicleType),\n color: textColor || 'black',\n }}\n >\n {shortName}\n </span>\n <div className=\"rt-route-title\">\n <span className=\"rt-route-name\">{destination}</span>\n <span>\n {longName}\n {renderRouteIdentifier(lineInfos)}\n </span>\n </div>\n <div className=\"rt-route-buttons\">\n {renderHeaderButtons(routeIdentifier)}\n </div>\n </div>\n );\n};\n\nconst defaultRenderFooter = (props) => {\n const { lineInfos, renderCopyright } = props;\n if (!lineInfos.operator && !lineInfos.publisher) {\n return null;\n }\n return <div className=\"rt-route-footer\">{renderCopyright({ ...props })}</div>;\n};\n\nconst defaultRenderLink = (text, url) => {\n return (\n <div className=\"rt-route-copyright-link\">\n {url ? (\n <a href={url} target=\"_blank\" rel=\"noreferrer\">\n {text}\n </a>\n ) : (\n <>{text}</>\n )}\n </div>\n );\n};\n\nconst defaultRenderCopyright = ({ lineInfos }) => {\n return (\n <span className=\"rt-route-copyright\">\n {lineInfos.operator &&\n defaultRenderLink(lineInfos.operator, lineInfos.operatorUrl)}\n {lineInfos.operator && lineInfos.publisher && <span>&nbsp;-&nbsp;</span>}\n {lineInfos.publisher &&\n defaultRenderLink(lineInfos.publisher, lineInfos.publisherUrl)}\n {lineInfos.license && <span>&nbsp;(</span>}\n {lineInfos.license &&\n defaultRenderLink(lineInfos.license, lineInfos.licenseUrl)}\n {lineInfos.license && ')'}\n </span>\n );\n};\n\nconst propTypes = {\n /**\n * CSS class of the route schedule wrapper.\n */\n className: PropTypes.string,\n\n /**\n * Trajectory stations informations.\n */\n lineInfos: ReactTransitPropTypes.lineInfos,\n\n /**\n * Trackerlayer.\n */\n trackerLayer: PropTypes.instanceOf(TrackerLayer).isRequired,\n\n /**\n * Render Header of the route scheduler.\n */\n renderHeader: PropTypes.func,\n\n /**\n * Render Footer of the route scheduler.\n */\n renderFooter: PropTypes.func,\n\n /**\n * Render Copyright of the route scheduler.\n */\n renderCopyright: PropTypes.func,\n\n /**\n * Render the status of the station image.\n */\n renderStationImg: PropTypes.func,\n\n /**\n * Render a station.\n */\n renderStation: PropTypes.func,\n\n /**\n * Function triggered on station's click event.\n */\n onStationClick: PropTypes.func,\n\n /**\n * Function to render header buttons.\n */\n renderHeaderButtons: PropTypes.func,\n};\n\nconst defaultProps = {\n className: 'rt-route-schedule',\n lineInfos: null,\n renderHeader: defaultRenderHeader,\n renderStation: defaultRenderStation,\n renderStationImg: defaultRenderStationImg,\n renderCopyright: defaultRenderCopyright,\n renderFooter: defaultRenderFooter,\n renderHeaderButtons: () => {\n return null;\n },\n onStationClick: () => {},\n};\n\n/**\n * RouteSchedule displays information, stops and punctuality about the clicked route.\n */\nfunction RouteSchedule(props) {\n const { lineInfos, className, renderStation, renderHeader, renderFooter } =\n props;\n\n if (!lineInfos) {\n return null;\n }\n\n return (\n <div className={className}>\n {renderHeader({ ...props })}\n <div className=\"rt-route-body\">\n {lineInfos.stations.map((stop, idx) => {\n return renderStation({ ...props, stop, idx });\n })}\n </div>\n {renderFooter({ ...props })}\n </div>\n );\n}\n\nRouteSchedule.propTypes = propTypes;\nRouteSchedule.defaultProps = defaultProps;\n\nexport default React.memo(RouteSchedule);\n"],
5
+ "mappings": "AAEA,OAAO,WAAW;AAClB,OAAO,eAAe;AACtB;AAAA,EACE,iBAAiB;AAAA,EACjB;AAAA,OACK;AACP,SAAS,oBAAoB,sBAAsB;AACnD,OAAO,2BAA2B;AAClC,OAAO,kBAAkB;AACzB,OAAO,aAAa;AACpB,OAAO,iBAAiB;AACxB,OAAO,UAAU;AAEjB,MAAM,EAAE,WAAW,IAAI;AAMvB,MAAM,gBAAgB,CAAC,SAAS;AAC9B,QAAM,OAAO,KAAK,MAAQ,OAAO,OAAO,IAAK,OAAQ,GAAI;AACzD,MAAI,QAAQ,MAAM;AAChB,WAAO;AAAA,EACT;AACA,MAAI,QAAQ,KAAK;AACf,WAAO;AAAA,EACT;AACA,MAAI,QAAQ,KAAK;AACf,WAAO;AAAA,EACT;AACA,MAAI,QAAQ,KAAK;AACf,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAMA,MAAM,YAAY,CAAC,SAAS;AAC1B,SAAO,CAAC,KAAK,eAAe,CAAC,KAAK;AACpC;AASA,MAAM,WAAW,CAAC,MAAM,MAAM,OAAO,QAAQ;AAG3C,MAAI,UAAU,IAAI,GAAG;AACnB,QAAI,MAAM,MAAM,MAAM,MAAM,GAAG;AAC7B,aAAO,SAAS,MAAM,MAAM,IAAI,MAAM,OAAO,GAAG;AAAA,IAClD;AACA,WAAO;AAAA,EACT;AAGA,QAAM,gBAAgB,KAAK,iBAAiB,KAAK,eAAe;AAChE,QAAM,iBAAiB,KAAK,kBAAkB,KAAK,gBAAgB;AACnE,SAAO,gBAAgB,kBAAkB;AAC3C;AASA,MAAM,0BAA0B,CAC9B,UACA,OACA,iBACA,iBACG;AACH,QAAM,EAAE,OAAO,IAAI;AACnB,MA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X,WAAW;AAAA,EACX,cAAc;AAAA,EACd,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,qBAAqB,MAAM;AACzB,WAAO;AAAA,EACT;AAAA,EACA,gBAAgB,MAAM;AAAA,EAAC;AACzB;AAKA,SAAS,cAAc,OAAO;AAC5B,QAAM,EAAE,WAAW,WAAW,eAAe,cAAc,aAAa,IACtE;AAEF,MAAI,CAAC,WAAW;AACd,WAAO;AAAA,EACT;AAEA,SACE,oCAAC;AAAA,IAAI;AAAA,KACF,aAAa,EAAE,GAAG,MAAM,CAAC,GAC1B,oCAAC;AAAA,IAAI,WAAU;AAAA,KACZ,UAAU,SAAS,IAAI,CAAC,MAAM,QAAQ;AACrC,WAAO,cAAc,EAAE,GAAG,OAAO,MAAM,IAAI,CAAC;AAAA,EAC9C,CAAC,CACH,GACC,aAAa,EAAE,GAAG,MAAM,CAAC,CAC5B;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,eAAe;AAE7B,eAAe,MAAM,KAAK,aAAa;",
6
+ "names": []
7
+ }
@@ -1,3 +1 @@
1
- export { default } from './RouteSchedule';
2
-
3
- //# sourceMappingURL=index.js.map
1
+ export { default } from "./RouteSchedule";
@@ -1 +1,7 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/RouteSchedule/index.js"],"sourcesContent":["export { default } from './RouteSchedule';\n"],"names":[],"mappings":"AAAA,SAAS,OAAO,QAAQ,iBAAiB,CAAC;"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/RouteSchedule/index.js"],
4
+ "sourcesContent": ["export { default } from './RouteSchedule';\n"],
5
+ "mappings": "AAAA,wBAAwB;",
6
+ "names": []
7
+ }