@coras-io/embed 0.13.1 → 0.13.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @coras-io/embed
2
2
 
3
+ ## 0.13.2
4
+
5
+ ### Patch Changes
6
+
7
+ - ddb3a51: Stop adding a date to attraction card links when the visitor has not chosen dates. Cards on the landing page, the suggestion widget and the details page's highlights row linked to `?date=<first bookable day>`, so every attraction had a new URL each day for search engines to crawl. The details page already opens on the first bookable day without it. With a date filter applied, landing page cards keep the date
8
+
3
9
  ## 0.13.1
4
10
 
5
11
  ### Patch Changes
@@ -10,7 +10,6 @@ import { ifDefined } from "lit/directives/if-defined.js";
10
10
  import { consume } from "@lit/context";
11
11
  import { localized, msg, str } from "@lit/localize";
12
12
  import { Task } from "@lit/task";
13
- import { formatISO, parseISO } from "date-fns";
14
13
  import "../../../../components/attraction-card/short/attraction-short-card.js";
15
14
  import { apiGet } from "../../../../core/api/queries.js";
16
15
  import { APIError } from "../../../../core/api/api-error.js";
@@ -79,7 +78,6 @@ let CorasLocationHighlights = class CorasLocationHighlights extends LitElement {
79
78
  return {
80
79
  page: "details",
81
80
  id: card.id,
82
- date: formatISO(parseISO(card.date), { representation: "date" }),
83
81
  locale: this.locale,
84
82
  currency: this.currency,
85
83
  };
@@ -822,6 +822,7 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(LocationSe
822
822
  const currency = this.currency;
823
823
  const locale = this.locale;
824
824
  const cards = section.items;
825
+ const datesFiltered = Boolean(this.startDate || this.endDate);
825
826
  return html `
826
827
  <section>
827
828
  <header class="section-header">
@@ -836,8 +837,10 @@ let CorasLandingPage = class CorasLandingPage extends ErrorModalMixin(LocationSe
836
837
  currency: this.currency,
837
838
  page: "details",
838
839
  id: card.id,
839
- date: formatISO(parseISO(card.date), {
840
- representation: "date",
840
+ ...(datesFiltered && {
841
+ date: formatISO(parseISO(card.date), {
842
+ representation: "date",
843
+ }),
841
844
  }),
842
845
  };
843
846
  return html `
@@ -9,7 +9,6 @@ import { property } from "lit/decorators.js";
9
9
  import { ifDefined } from "lit/directives/if-defined.js";
10
10
  import { localized, msg, str } from "@lit/localize";
11
11
  import { Task } from "@lit/task";
12
- import { formatISO, parseISO } from "date-fns";
13
12
  import { ExploreCardVariants } from "../../components/explore-card/explore-card.constants.js";
14
13
  import styles from "./suggestion-widget.styles.js";
15
14
  import "../../components/explore-card/explore-card.js";
@@ -66,7 +65,6 @@ let CorasSuggestionWidget = class CorasSuggestionWidget extends BaseMixin(LitEle
66
65
  return {
67
66
  page: "details",
68
67
  id: card.id,
69
- date: formatISO(parseISO(card.date), { representation: "date" }),
70
68
  locale: this.locale,
71
69
  currency: this.currency,
72
70
  };
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "engines": {
21
21
  "node": ">=22"
22
22
  },
23
- "version": "0.13.1",
23
+ "version": "0.13.2",
24
24
  "private": false,
25
25
  "homepage": "https://docs.coras.io",
26
26
  "bugs": {