@digitransit-component/digitransit-component-autosuggest 11.0.14 → 11.0.15

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/lib/index.js CHANGED
@@ -3,12 +3,12 @@ import require$$0, { memo, useState, useRef, useEffect, useCallback, useReducer,
3
3
  import { useTranslation, I18nextProvider } from 'react-i18next';
4
4
  import cx from 'classnames';
5
5
  import { useCombobox } from 'downshift';
6
+ import SuggestionItem, { STOP_STATUS } from '@digitransit-component/digitransit-component-suggestion-item';
6
7
  import Icon, { defaultColors } from '@digitransit-component/digitransit-component-icon';
7
8
  import { createInstance as createInstance$1 } from 'i18next';
8
9
  import { DateTime } from 'luxon';
9
10
  import ReactModal from 'react-modal';
10
11
  import DialogModal from '@digitransit-component/digitransit-component-dialog-modal';
11
- import SuggestionItem from '@digitransit-component/digitransit-component-suggestion-item';
12
12
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
13
13
 
14
14
  function _typeof(o) {
@@ -13180,6 +13180,10 @@ const translations = {
13180
13180
  'stop-near-you-subway': 'Search metro routes or stations ',
13181
13181
  'stop-near-you-tram': 'Search tram routes or stops',
13182
13182
  'stop-route-station': 'Bus and stop search',
13183
+ 'stop-status-alert': 'Service alert at stop',
13184
+ 'stop-status-info': 'Notice at stop',
13185
+ 'stop-status-no-service-today': 'No departures today',
13186
+ 'stop-status-out-of-service': 'Stop out of service',
13183
13187
  street: 'Street',
13184
13188
  subway: 'Metro',
13185
13189
  'today-at': 'today at',
@@ -13260,6 +13264,10 @@ const translations = {
13260
13264
  'stop-near-you-subway': 'Hae metrolinjaa tai asemaa',
13261
13265
  'stop-near-you-tram': 'Hae raitiolinjaa tai pysäkkiä',
13262
13266
  'stop-route-station': 'Linja- ja pysäkkihaku',
13267
+ 'stop-status-alert': 'Häiriö pysäkillä',
13268
+ 'stop-status-info': 'Tiedote pysäkillä',
13269
+ 'stop-status-no-service-today': 'Ei lähtöjä tänään',
13270
+ 'stop-status-out-of-service': 'Pysäkki poissa käytöstä',
13263
13271
  street: 'Katu',
13264
13272
  subway: 'Metro',
13265
13273
  'today-at': 'tänään klo',
@@ -13339,6 +13347,10 @@ const translations = {
13339
13347
  'stop-near-you-subway': 'Szukaj tras metra i przystanków ',
13340
13348
  'stop-near-you-tram': 'Szukaj tras tramwajowych i przystanków',
13341
13349
  'stop-route-station': 'Wyszukiwanie autobusów i przystanków',
13350
+ 'stop-status-alert': 'Utrudnienie na przystanku',
13351
+ 'stop-status-info': 'Komunikat na przystanku',
13352
+ 'stop-status-no-service-today': 'Dziś brak odjazdów',
13353
+ 'stop-status-out-of-service': 'Przystanek nieczynny',
13342
13354
  street: 'Ulica',
13343
13355
  subway: 'Metro',
13344
13356
  'today-at': 'dziś o',
@@ -13419,6 +13431,10 @@ const translations = {
13419
13431
  'stop-near-you-subway': 'Sök metrolinjer eller stationer',
13420
13432
  'stop-near-you-tram': 'Sök spårvagnlinjer eller hållplatser',
13421
13433
  'stop-route-station': 'Buss och stopp sökningen',
13434
+ 'stop-status-alert': 'Störning vid hållplatsen',
13435
+ 'stop-status-info': 'Meddelande vid hållplatsen',
13436
+ 'stop-status-no-service-today': 'Inga avgångar idag',
13437
+ 'stop-status-out-of-service': 'Hållplats ur bruk',
13422
13438
  street: 'Gata',
13423
13439
  subway: 'Metro',
13424
13440
  'today-at': 'i dag kl',
@@ -15003,7 +15019,21 @@ function DTAutosuggest({
15003
15019
  getAutoSuggestIcons,
15004
15020
  colors,
15005
15021
  modeSet,
15006
- showStopStatusMarkers: !!searchContext.showStopStatusMarkers
15022
+ showStopStatusMarkers: !!searchContext.showStopStatusMarkers,
15023
+ stopStatusLabels: {
15024
+ [STOP_STATUS.OUT_OF_SERVICE]: t('stop-status-out-of-service', {
15025
+ lng
15026
+ }),
15027
+ [STOP_STATUS.NO_SERVICE_TODAY]: t('stop-status-no-service-today', {
15028
+ lng
15029
+ }),
15030
+ [STOP_STATUS.ALERT]: t('stop-status-alert', {
15031
+ lng
15032
+ }),
15033
+ [STOP_STATUS.INFO]: t('stop-status-info', {
15034
+ lng
15035
+ })
15036
+ }
15007
15037
  }), [state.loading, isMobile, t, lng, getAutoSuggestIcons, colors, modeSet, searchContext.showStopStatusMarkers]);
15008
15038
  const {
15009
15039
  ariaCurrentSuggestion,