@autobusal/routes-order 1.39.0 → 1.40.1

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.
@@ -2,6 +2,20 @@ import { TFunction } from 'i18next';
2
2
  import { JsonLd } from '@autobusal/common';
3
3
  import { LOW_SEATS, Prepared } from './service';
4
4
 
5
+ /** the URL with the assistant/partner attribution tags removed */
6
+ const untagged = (url: string): string => {
7
+ try {
8
+ const parsed = new URL(url);
9
+
10
+ parsed.searchParams.delete('utm_source');
11
+ parsed.searchParams.delete('utm_medium');
12
+
13
+ return parsed.toString();
14
+ } catch {
15
+ return url;
16
+ }
17
+ };
18
+
5
19
  interface Props {
6
20
  // The SAME object the section renders from - see ./service. Not a second
7
21
  // pass over the payload that happens to agree with the first one.
@@ -86,7 +100,11 @@ const Schema = ({ data, t }: Props): (JSX.Element | null) => {
86
100
  price: row.amount,
87
101
  priceCurrency: data.currency,
88
102
 
89
- ...(row.url ? { url: row.url } : {}),
103
+ // Claude - 2026-09-26: without the partner-feed tags. row.url is
104
+ // built for assistants and partners (utm_source=busmagus-api&
105
+ // utm_medium=assistant); on our own page's markup it would credit a
106
+ // search engine's visitors to the assistant channel.
107
+ ...(row.url ? { url: untagged(row.url) } : {}),
90
108
 
91
109
  /*
92
110
  * READ off the seat count the row prints, never asserted. Below the
@@ -226,7 +226,8 @@ export const dated = (date: string, t: TFunction<'common'>): (string | null) =>
226
226
  return t('routes_order.availability.date', {
227
227
  weekday: t(`data.days.${ weekday }`),
228
228
  day: String(Number(parts[3])),
229
- month: t(`data.months.${ month }`)
229
+ // Claude - 2026-09-26: the after-a-day form (genitive in el/hr/sr/bs/me/sl)
230
+ month: t(`data.months_day.${ month }`)
230
231
  });
231
232
  };
232
233
 
@@ -273,7 +274,7 @@ export const checked = (stamp: string, zone: string, t: TFunction<'common'>): (s
273
274
 
274
275
  return t('routes_order.availability.updated', {
275
276
  day: String(Number(value('day'))),
276
- month: t(`data.months.${ month }`),
277
+ month: t(`data.months_day.${ month }`),
277
278
  year: value('year'),
278
279
  // hour12: false renders midnight as "24" in some engines
279
280
  time: `${ value('hour') === '24' ? '00' : value('hour') }:${ value('minute') }`
package/Facts/service.ts CHANGED
@@ -84,7 +84,8 @@ export const ran = (iso: string, t: TFunction<'common'>): (string | null) => {
84
84
 
85
85
  return t('routes_order.facts.not_scheduled_last', {
86
86
  day: String(Number(parts[3])),
87
- month: t(`data.months.${ month }`),
87
+ // Claude - 2026-09-26: the after-a-day form (genitive in el/hr/sr/bs/me/sl)
88
+ month: t(`data.months_day.${ month }`),
88
89
  year: parts[1]
89
90
  });
90
91
  };
package/RoutesOrder.tsx CHANGED
@@ -2,7 +2,7 @@ import { useState, useEffect, useMemo, useRef } from 'react';
2
2
  import { useParams, useSearchParams, useNavigate, useLocation } from 'react-router-dom';
3
3
  import { TFunction } from 'i18next';
4
4
  import { AiOutlineSearch, AiOutlineCaretDown, AiOutlineCaretUp } from 'react-icons/ai';
5
- import { Meta } from '@autobusal/common';
5
+ import { Meta, PageBreadcrumbs } from '@autobusal/common';
6
6
  import { useSystemTheme } from '@autobusal/hooks';
7
7
  import { useGetSettings } from '@autobusal/providers/services';
8
8
  import { selectItem } from '@autobusal/providers/Setup/commerce';
@@ -428,6 +428,20 @@ const RoutesOrder = ({ t }: Props): JSX.Element => {
428
428
  </SearchAgain>
429
429
  ) }
430
430
 
431
+ { /* Claude - 2026-09-26: Home > {from city} > {from} to {to}, on the
432
+ pair page itself (step 1 - the URL the sitemap lists and the
433
+ prerender snapshots). The funnel steps after it are not pages
434
+ anybody navigates up from. */ }
435
+ { showStep1 && fromCity && toCity && (
436
+ <PageBreadcrumbs
437
+ items={ [
438
+ { name: fromCity.name, path: `/city/${ fromCity.slug }` },
439
+ { name: t('breadcrumbs.pair', { from: fromCity.name, to: toCity.name }) }
440
+ ] }
441
+ t={ t }
442
+ />
443
+ ) }
444
+
431
445
  { showStep1 && (
432
446
  <Step1
433
447
  value={ step1 }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/routes-order",
3
- "version": "1.39.0",
3
+ "version": "1.40.1",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts",