@coras-io/embed 0.2.0 → 0.3.0
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 +127 -0
- package/README.md +8 -7
- package/dist/components/accordion/accordion-item/accordion-item.styles.js +1 -1
- package/dist/components/alert/alert.styles.js +14 -14
- package/dist/components/attraction-card/base/attraction-card.styles.js +7 -3
- package/dist/components/attraction-discovery/attraction-discovery.styles.js +1 -1
- package/dist/components/attraction-header/attraction-header.styles.js +1 -1
- package/dist/components/attraction-option/attraction-option.styles.js +4 -4
- package/dist/components/basket/basket.styles.js +27 -26
- package/dist/components/basket-empty/basket-empty.styles.js +1 -0
- package/dist/components/basket-item/basket-item.component.js +10 -4
- package/dist/components/basket-item/basket-item.styles.js +9 -3
- package/dist/components/basket-item-ticket/basket-item-ticket.styles.js +1 -3
- package/dist/components/basket-mobile/basket-mobile.styles.js +5 -5
- package/dist/components/better-carousel/better-carousel.styles.js +2 -0
- package/dist/components/bottom-drawer/bottom-drawer.styles.js +6 -4
- package/dist/components/button/button.component.d.ts +0 -1
- package/dist/components/button/button.component.js +1 -8
- package/dist/components/button/button.constants.d.ts +1 -1
- package/dist/components/button/button.constants.js +1 -1
- package/dist/components/button/button.styles.js +66 -39
- package/dist/components/calendar/base/calendar.styles.js +3 -5
- package/dist/components/calendar/multi/multi.styles.js +7 -0
- package/dist/components/category-tag/category-tag.styles.js +10 -7
- package/dist/components/checkbox/checkbox.styles.js +2 -2
- package/dist/components/chip/chip.styles.js +2 -2
- package/dist/components/collect-fida/collect-fida.component.js +5 -3
- package/dist/components/collect-fida/collect-fida.styles.js +9 -16
- package/dist/components/crypto-auth-modal/crypto-auth-modal.component.js +6 -4
- package/dist/components/crypto-auth-modal/crypto-auth-modal.styles.js +2 -2
- package/dist/components/dialog/dialog.styles.js +10 -17
- package/dist/components/drawer/drawer.component.js +6 -0
- package/dist/components/drawer/drawer.styles.js +17 -3
- package/dist/components/dropdown/dropdown.component.js +7 -0
- package/dist/components/dropdown/dropdown.styles.js +3 -6
- package/dist/components/expiration-timer/expiration-timer.styles.js +3 -3
- package/dist/components/explore-card/explore-card.styles.js +1 -1
- package/dist/components/filter-chip/filter-chip.styles.js +11 -9
- package/dist/components/filters-drawer/filters-drawer.component.js +1 -1
- package/dist/components/filters-drawer/filters-drawer.styles.js +6 -5
- package/dist/components/image/image.styles.js +3 -3
- package/dist/components/image-chip/image-chip.styles.js +1 -1
- package/dist/components/input-field/input-field.styles.js +22 -17
- package/dist/components/itinerary/itinerary-item/itinerary-item.styles.js +1 -1
- package/dist/components/joined-fields/joined-fields.styles.js +10 -6
- package/dist/components/loading-spinner/loading-spinner.styles.js +1 -1
- package/dist/components/location-image/location-image.component.d.ts +6 -0
- package/dist/components/location-image/location-image.component.js +15 -2
- package/dist/components/location-image/location-image.styles.js +1 -1
- package/dist/components/locations-results/locations-results.styles.js +4 -6
- package/dist/components/marketing-tag/marketing-tag.styles.js +1 -1
- package/dist/components/message-card/message-card.styles.js +6 -6
- package/dist/components/option-group/option-chip/option-chip.styles.js +4 -3
- package/dist/components/order-confirmation/order-confirmation-item/order-confirmation-item.styles.js +9 -0
- package/dist/components/order-confirmation/order-confirmation.component.js +4 -3
- package/dist/components/order-confirmation/order-confirmation.styles.js +1 -1
- package/dist/components/otp/otp.styles.js +6 -6
- package/dist/components/overlay/overlay.styles.js +5 -1
- package/dist/components/pay-in/pay-in.styles.js +2 -2
- package/dist/components/payment-fiat-method/payment-fiat-method.styles.js +20 -4
- package/dist/components/payment-option/payment-option.styles.js +10 -12
- package/dist/components/performance-time/performance-time.styles.js +2 -2
- package/dist/components/phone-country-code/phone-country-code.styles.js +1 -1
- package/dist/components/points/points.styles.js +1 -1
- package/dist/components/search-button/search-button.styles.js +15 -7
- package/dist/components/seated-selector/seated-selector.component.d.ts +2 -0
- package/dist/components/seated-selector/seated-selector.component.js +53 -10
- package/dist/components/seated-selector/seated-selector.styles.js +77 -14
- package/dist/components/seats-io/seats-io.component.d.ts +2 -0
- package/dist/components/seats-io/seats-io.component.js +25 -2
- package/dist/components/seats-io/seats-io.constants.d.ts +2 -1
- package/dist/components/seats-io/seats-io.constants.js +6 -1
- package/dist/components/seats-io/seats-io.transform.d.ts +8 -2
- package/dist/components/seats-io/seats-io.transform.js +12 -4
- package/dist/components/select-list/select-list.styles.js +1 -0
- package/dist/components/select-list/select-option/select-option.styles.js +3 -3
- package/dist/components/sort-dropdown/sort-dropdown.styles.js +1 -1
- package/dist/components/sort-list/sort-list.styles.js +1 -1
- package/dist/components/sport-options/sport-option/sport-option.styles.js +2 -2
- package/dist/components/star-rating/star-rating.component.d.ts +1 -0
- package/dist/components/star-rating/star-rating.component.js +19 -23
- package/dist/components/star-rating/star-rating.styles.js +32 -6
- package/dist/components/tab/tab.styles.js +1 -1
- package/dist/components/tabs/tabs.styles.js +1 -1
- package/dist/components/tag/tag.styles.js +7 -7
- package/dist/components/text-section/text-section.styles.js +2 -1
- package/dist/components/time-tag/time-tag.styles.js +1 -2
- package/dist/components/tooltip/tooltip.styles.js +3 -3
- package/dist/components/tour-ticket-type-selector/tour-ticket-type/tour-ticket-type.styles.js +2 -2
- package/dist/components/tour-ticket-type-selector/tour-ticket-type-selector.component.js +1 -1
- package/dist/components/tour-ticket-type-selector/tour-ticket-type-selector.styles.js +1 -10
- package/dist/components/transfer-modal/transfer-modal.component.js +3 -3
- package/dist/components/transfer-modal/transfer-modal.styles.js +6 -8
- package/dist/containers/basket/basket.component.d.ts +1 -1
- package/dist/containers/basket/basket.component.js +56 -25
- package/dist/containers/footer/footer.styles.js +4 -0
- package/dist/containers/navbar/navbar.component.d.ts +5 -1
- package/dist/containers/navbar/navbar.component.js +38 -9
- package/dist/containers/navbar/navbar.styles.js +38 -12
- package/dist/contexts/basket/basket.provider.d.ts +1 -0
- package/dist/contexts/basket/basket.provider.js +31 -4
- package/dist/contexts/properties.context.d.ts +4 -4
- package/dist/core/api/middlewares/booking-session/booking-session.constants.d.ts +1 -0
- package/dist/core/api/middlewares/booking-session/booking-session.constants.js +1 -0
- package/dist/core/api/middlewares/booking-session/booking-session.js +18 -27
- package/dist/core/api/middlewares/booking-session/booking-session.utils.d.ts +4 -4
- package/dist/core/api/middlewares/booking-session/booking-session.utils.js +13 -10
- package/dist/core/api/queries.js +3 -2
- package/dist/core/color-scheme.d.ts +14 -0
- package/dist/core/color-scheme.js +48 -0
- package/dist/core/currency/constants.d.ts +1 -1
- package/dist/core/currency/constants.js +4 -3
- package/dist/core/i18n/date.js +20 -9
- package/dist/core/i18n/locale-codes.d.ts +2 -2
- package/dist/core/i18n/locale-codes.js +4 -0
- package/dist/core/images/constants.d.ts +0 -5
- package/dist/core/images/constants.js +0 -5
- package/dist/core/images/helpers.d.ts +8 -0
- package/dist/core/images/helpers.js +14 -6
- package/dist/core/images/srcset.js +2 -2
- package/dist/core/storybook/demo.d.ts +4 -0
- package/dist/core/storybook/demo.js +17 -0
- package/dist/core/types/locales.d.ts +7 -0
- package/dist/core/utils/datetime.js +10 -4
- package/dist/core/utils/locale.d.ts +8 -1
- package/dist/core/utils/locale.js +10 -0
- package/dist/helpers/helpers.d.ts +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.js +1 -2
- package/dist/locales/ar-SA.d.ts +279 -0
- package/dist/locales/ar-SA.js +288 -0
- package/dist/locales/da-DK.d.ts +100 -82
- package/dist/locales/da-DK.js +104 -89
- package/dist/locales/de-DE.d.ts +100 -82
- package/dist/locales/de-DE.js +104 -89
- package/dist/locales/en-IE.d.ts +250 -232
- package/dist/locales/en-IE.js +253 -238
- package/dist/locales/en-US.d.ts +100 -82
- package/dist/locales/en-US.js +105 -90
- package/dist/locales/es-ES.d.ts +100 -82
- package/dist/locales/es-ES.js +104 -89
- package/dist/locales/fr-FR.d.ts +100 -82
- package/dist/locales/fr-FR.js +104 -89
- package/dist/locales/fr-MA.d.ts +100 -82
- package/dist/locales/fr-MA.js +104 -89
- package/dist/locales/is-IS.d.ts +100 -82
- package/dist/locales/is-IS.js +104 -89
- package/dist/locales/it-IT.d.ts +100 -82
- package/dist/locales/it-IT.js +104 -89
- package/dist/locales/ms-MY.d.ts +100 -82
- package/dist/locales/ms-MY.js +104 -89
- package/dist/locales/nb-NO.d.ts +100 -82
- package/dist/locales/nb-NO.js +104 -89
- package/dist/locales/pl-PL.d.ts +100 -82
- package/dist/locales/pl-PL.js +104 -89
- package/dist/locales/pt-PT.d.ts +100 -82
- package/dist/locales/pt-PT.js +104 -89
- package/dist/locales/sv-SE.d.ts +100 -82
- package/dist/locales/sv-SE.js +104 -89
- package/dist/locales/th-TH.d.ts +100 -82
- package/dist/locales/th-TH.js +104 -89
- package/dist/locales/tr-TR.d.ts +100 -82
- package/dist/locales/tr-TR.js +104 -89
- package/dist/locales/zh-CN.d.ts +100 -82
- package/dist/locales/zh-CN.js +105 -90
- package/dist/locales/zh-HK.d.ts +279 -0
- package/dist/locales/zh-HK.js +288 -0
- package/dist/mixins/coinbase.mixin.js +1 -1
- package/dist/mixins/error-modal.styles.js +2 -2
- package/dist/mixins/location-search/location-search.js +3 -3
- package/dist/mixins/location-search/location-search.styles.js +6 -5
- package/dist/sdk/chrome.d.ts +9 -3
- package/dist/sdk/chrome.js +21 -9
- package/dist/sdk/element-adapter.js +11 -8
- package/dist/sdk/mount.d.ts +3 -3
- package/dist/sdk/mount.js +150 -42
- package/dist/sdk/navigation-intent.js +3 -0
- package/dist/sdk/page-registry.d.ts +14 -2
- package/dist/sdk/page-registry.js +33 -13
- package/dist/sdk/theme.d.ts +1 -15
- package/dist/sdk/theme.js +4 -39
- package/dist/sdk/types.d.ts +55 -24
- package/dist/sdk/url.d.ts +24 -3
- package/dist/sdk/url.js +66 -27
- package/dist/sdk/validation.d.ts +0 -7
- package/dist/sdk/validation.js +105 -47
- package/dist/styles/contrast-fixtures.d.ts +0 -5
- package/dist/styles/contrast-fixtures.js +79 -9
- package/dist/styles/contrast.js +4 -3
- package/dist/styles/defaults/component.js +17 -1
- package/dist/styles/primitives.d.ts +0 -10
- package/dist/styles/primitives.js +2 -12
- package/dist/styles/tokens.d.ts +1 -1
- package/dist/styles/tokens.generated.d.ts +1 -1
- package/dist/styles/tokens.generated.js +1 -1
- package/dist/styles/tokens.metadata.d.ts +1 -1
- package/dist/styles/tokens.metadata.js +360 -90
- package/dist/views/details-page/details-page.component.d.ts +5 -5
- package/dist/views/details-page/details-page.component.js +72 -79
- package/dist/views/details-page/details-page.styles.js +64 -9
- package/dist/views/help-page/help-page.component.d.ts +1 -0
- package/dist/views/help-page/help-page.component.js +11 -4
- package/dist/views/help-page/help-page.styles.js +21 -8
- package/dist/views/landing-page/landing-page.component.d.ts +4 -4
- package/dist/views/landing-page/landing-page.component.js +65 -65
- package/dist/views/landing-page/landing-page.styles.js +70 -3
- package/dist/views/payment-page/partials/activity-details/activity-details.styles.js +10 -33
- package/dist/views/payment-page/partials/billing-address/billing-address.styles.js +4 -9
- package/dist/views/payment-page/partials/confirmation/confirmation.styles.js +6 -6
- package/dist/views/payment-page/partials/hotel-pickup-list/hotel-pickup-list.styles.js +4 -4
- package/dist/views/payment-page/partials/payment-type-selector/payment-type-selector.styles.js +1 -0
- package/dist/views/payment-page/partials/stripe/stripe.component.d.ts +1 -1
- package/dist/views/payment-page/partials/stripe/stripe.component.js +11 -12
- package/dist/views/payment-page/partials/stripe/stripe.constants.d.ts +2 -15
- package/dist/views/payment-page/partials/stripe/stripe.constants.js +4 -17
- package/dist/views/payment-page/partials/stripe/stripe.styles.js +16 -23
- package/dist/views/payment-page/partials/stripe/stripe.utils.d.ts +25 -14
- package/dist/views/payment-page/partials/stripe/stripe.utils.js +111 -62
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.styles.js +1 -1
- package/dist/views/payment-page/payment-page.component.d.ts +1 -0
- package/dist/views/payment-page/payment-page.component.js +19 -9
- package/dist/views/payment-page/payment-page.styles.js +37 -32
- package/dist/views/payment-page/payment-page.utils.d.ts +7 -0
- package/dist/views/payment-page/payment-page.utils.js +29 -14
- package/dist/views/payment-page/payment-page.validators.js +9 -3
- package/dist/views/payment-page/services/payment-api.service.d.ts +1 -1
- package/dist/views/search-page/search-page.component.d.ts +1 -0
- package/dist/views/search-page/search-page.component.js +12 -6
- package/dist/views/search-page/search-page.styles.js +24 -2
- package/dist/views/suggestion-widget/suggestion-widget.styles.js +1 -1
- package/package.json +62 -75
- package/dist/custom-elements.json +0 -37397
- package/dist/sdk/meta.d.ts +0 -7
- package/dist/sdk/meta.js +0 -9
- package/dist/styles/tokens.css +0 -359
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
import { DEFAULT_LOCATION_IMAGE
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { DEFAULT_LOCATION_IMAGE } from "./constants.js";
|
|
2
|
+
/**
|
|
3
|
+
* Compose the CDN path for a location image.
|
|
4
|
+
*
|
|
5
|
+
* `params` is optional and omitted by default: callers that render through
|
|
6
|
+
* `coras-image` must leave it unset, because that component appends its own
|
|
7
|
+
* `w`/`h`/`fit`/`crop`. Passing `ar` here as well would win over the `h` the
|
|
8
|
+
* component derives from its own aspect ratio, cropping the image twice.
|
|
9
|
+
*/
|
|
10
|
+
export function getLocationImageURL({ baseURL, country = "", city = "", imageExtension, params, }) {
|
|
11
|
+
const query = params ? `?${new URLSearchParams(params).toString()}` : "";
|
|
4
12
|
// TODO: improve it
|
|
5
13
|
if (city && country !== "" && city !== "") {
|
|
6
|
-
return `${baseURL}/${country}/${city}.${imageExtension}
|
|
14
|
+
return `${baseURL}/${country}/${city}.${imageExtension}${query}`;
|
|
7
15
|
}
|
|
8
16
|
else if (country !== "" && city === "") {
|
|
9
|
-
return `${baseURL}/${country}.${imageExtension}
|
|
17
|
+
return `${baseURL}/${country}.${imageExtension}${query}`;
|
|
10
18
|
}
|
|
11
19
|
else {
|
|
12
|
-
return `${baseURL}/${DEFAULT_LOCATION_IMAGE}
|
|
20
|
+
return `${baseURL}/${DEFAULT_LOCATION_IMAGE}${query}`;
|
|
13
21
|
}
|
|
14
22
|
}
|
|
@@ -38,14 +38,14 @@ export function buildSrcset(src, widths = RESPONSIVE_WIDTHS, options = {}) {
|
|
|
38
38
|
* - `carousel-hero` - better-carousel item on the details page
|
|
39
39
|
* - `gallery` - image-carousel item (legacy 780px hero)
|
|
40
40
|
* - `thumbnail` - basket-item, tour-ticket-type thumbs
|
|
41
|
-
* - `header-banner` - location-image
|
|
41
|
+
* - `header-banner` - location-image banner, capped at 952px by its own CSS
|
|
42
42
|
*/
|
|
43
43
|
const SIZES_PRESETS = {
|
|
44
44
|
"card-grid": "(min-width: 1001px) 25vw, (min-width: 501px) 50vw, 100vw",
|
|
45
45
|
"carousel-hero": "(min-width: 1024px) 480px, 90vw",
|
|
46
46
|
gallery: "(min-width: 1024px) 780px, 100vw",
|
|
47
47
|
thumbnail: "70px",
|
|
48
|
-
"header-banner": "
|
|
48
|
+
"header-banner": "952px",
|
|
49
49
|
};
|
|
50
50
|
export function buildSizes(preset) {
|
|
51
51
|
return SIZES_PRESETS[preset];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Shared demo configuration for Storybook stories.
|
|
2
|
+
//
|
|
3
|
+
// Assets are served by Storybook itself at `/assets` (see `.storybook/main.ts`
|
|
4
|
+
// `staticDirs`), so a root-relative path resolves against whatever origin is
|
|
5
|
+
// serving Storybook: `localhost:8082` in local dev and `storybook.*.coras.io`
|
|
6
|
+
// in the deployed build, with no cross-origin request. The previous hardcoded
|
|
7
|
+
// `http://localhost:8082/assets` only existed on a dev machine, so the deployed
|
|
8
|
+
// Storybook loaded no icons or flags.
|
|
9
|
+
export const DEMO_ASSETS_URL = "/assets";
|
|
10
|
+
// Flag SVGs live under the shared assets tree at `/assets/flags`.
|
|
11
|
+
export const DEMO_FLAGS_URL = `${DEMO_ASSETS_URL}/flags`;
|
|
12
|
+
// The API host and distributor point at the shared Coras sandbox demo
|
|
13
|
+
// distributor by default, so stories that fetch live data work in the deployed
|
|
14
|
+
// Storybook. Both are overridable via env for local work against another
|
|
15
|
+
// backend (see `.env.example`).
|
|
16
|
+
export const DEMO_API_HOST = import.meta.env.VITE_API_HOST ?? "https://sandbox.coras.io";
|
|
17
|
+
export const DEMO_DISTRIBUTOR_ID = import.meta.env.VITE_DISTRIBUTOR_ID ?? "a8405267cbcf4bd2b70114e618516645";
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { allLocales } from "../i18n/locale-codes.js";
|
|
2
|
+
import type { components } from "./api-schema.js";
|
|
2
3
|
import type { SupportedLocales } from "./core/index.js";
|
|
3
4
|
export type Locale = (typeof allLocales)[number];
|
|
4
5
|
export type LocalePrefix = SupportedLocales extends `${infer P}-${string}` ? P : never;
|
|
6
|
+
/**
|
|
7
|
+
* The language codes the booking API accepts. Not the same set as
|
|
8
|
+
* `LocalePrefix`: the API spells Norwegian `no` where the SDK's locale is
|
|
9
|
+
* `nb-NO`, so a prefix is not always a valid code (see `getApiLanguageCode`).
|
|
10
|
+
*/
|
|
11
|
+
export type ApiLanguageCode = components["schemas"]["BookingSessionPostRequestSchema"]["language"];
|
|
@@ -15,13 +15,19 @@ export const formatDateTimeForDisplay = (apiData, options = {}) => {
|
|
|
15
15
|
return "";
|
|
16
16
|
}
|
|
17
17
|
try {
|
|
18
|
+
// A date-only value ("2026-05-26") is a calendar day with no timezone.
|
|
19
|
+
// Applying a venue timeZone would re-interpret it as an instant and shift
|
|
20
|
+
// the rendered day for viewers whose zone differs from the venue, so treat
|
|
21
|
+
// it as civil and skip timezone conversion. Full datetimes keep venue tz.
|
|
22
|
+
const isDateOnly = /^\d{4}-\d{2}-\d{2}$/.test(apiData.dateTime);
|
|
23
|
+
const timezone = isDateOnly ? undefined : apiData.timezone;
|
|
18
24
|
const date = parseISO(apiData.dateTime);
|
|
19
25
|
// If custom format is provided, use date-fns-tz for timezone support
|
|
20
26
|
if (customFormat) {
|
|
21
|
-
if (
|
|
22
|
-
const zonedDate = toZonedTime(date,
|
|
27
|
+
if (timezone) {
|
|
28
|
+
const zonedDate = toZonedTime(date, timezone);
|
|
23
29
|
return formatTZ(zonedDate, customFormat, {
|
|
24
|
-
timeZone:
|
|
30
|
+
timeZone: timezone,
|
|
25
31
|
});
|
|
26
32
|
}
|
|
27
33
|
return formatTZ(date, customFormat);
|
|
@@ -35,7 +41,7 @@ export const formatDateTimeForDisplay = (apiData, options = {}) => {
|
|
|
35
41
|
hour: "numeric",
|
|
36
42
|
minute: "2-digit",
|
|
37
43
|
}),
|
|
38
|
-
...(
|
|
44
|
+
...(timezone && { timeZone: timezone }),
|
|
39
45
|
};
|
|
40
46
|
return intlFormat(date, formatOptions, {
|
|
41
47
|
locale: apiData.locale || "en-GB",
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import type { SupportedLocales } from "../types/index.js";
|
|
2
|
-
import type { LocalePrefix } from "../types/locales.js";
|
|
2
|
+
import type { ApiLanguageCode, LocalePrefix } from "../types/locales.js";
|
|
3
3
|
export declare function getLocalePrefix(locale: SupportedLocales): LocalePrefix;
|
|
4
|
+
/**
|
|
5
|
+
* The booking-API language code for a locale. Every supported locale's prefix
|
|
6
|
+
* is a valid code except `nb-NO`: the API enumerates Norwegian as `no`. It
|
|
7
|
+
* serves the same Norwegian copy for either spelling, so this keeps requests
|
|
8
|
+
* inside the documented contract rather than relying on that tolerance.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getApiLanguageCode(locale: SupportedLocales): ApiLanguageCode;
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
export function getLocalePrefix(locale) {
|
|
2
2
|
return locale.split("-")[0];
|
|
3
3
|
}
|
|
4
|
+
/**
|
|
5
|
+
* The booking-API language code for a locale. Every supported locale's prefix
|
|
6
|
+
* is a valid code except `nb-NO`: the API enumerates Norwegian as `no`. It
|
|
7
|
+
* serves the same Norwegian copy for either spelling, so this keeps requests
|
|
8
|
+
* inside the documented contract rather than relying on that tolerance.
|
|
9
|
+
*/
|
|
10
|
+
export function getApiLanguageCode(locale) {
|
|
11
|
+
const prefix = getLocalePrefix(locale);
|
|
12
|
+
return prefix === "nb" ? "no" : prefix;
|
|
13
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SupportedLocales } from "../core/types/index.js";
|
|
2
2
|
export declare function getLocale(fallbackLocale?: string | string[]): SupportedLocales;
|
|
3
3
|
export declare function isLocaleSupported(locale: string): boolean;
|
|
4
|
-
export declare const getCurrency: (locale: string) => "AED" | "ALL" | "AUD" | "CAD" | "CHF" | "CNY" | "DKK" | "EUR" | "GBP" | "
|
|
4
|
+
export declare const getCurrency: (locale: string) => "AED" | "ALL" | "AUD" | "CAD" | "CHF" | "CNY" | "DKK" | "EUR" | "GBP" | "HUF" | "IDR" | "ISK" | "JPY" | "MAD" | "MYR" | "NOK" | "PHP" | "PLN" | "SAR" | "SEK" | "SGD" | "THB" | "TRY" | "USD" | "VND";
|
|
5
5
|
export declare function isCurrencySupported(currency: string): boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export { mount
|
|
2
|
-
export { getPageMeta } from "./sdk/meta.js";
|
|
1
|
+
export { mount } from "./sdk/mount.js";
|
|
3
2
|
export { CorasValidationError, type CorasValidationErrorCode, } from "./sdk/validation.js";
|
|
4
|
-
export type { CorasApp, CorasConfig, CorasTheme, CorasColorScheme, CorasChrome, CorasChromeOptions, CorasNavbar, CorasFooter, CorasManagedNavbar, CorasManagedFooter, CorasNavbarSlotName, CorasNavbarProps, CorasMountOptions, CorasState, CorasUpdate, CorasNavigateOptions, CorasCallbacks, CorasLogger, CorasObservabilityEvent, CorasPageName,
|
|
3
|
+
export type { CorasApp, CorasConfig, CorasTheme, CorasColorScheme, CorasChrome, CorasChromeOptions, CorasNavbar, CorasFooter, CorasManagedNavbar, CorasManagedFooter, CorasNavbarSlotName, CorasNavbarProps, CorasMountOptions, CorasState, CorasUpdate, CorasConfigUpdate, CorasNavigateOptions, CorasCallbacks, CorasLogger, CorasObservabilityEvent, CorasPageName, CorasPageParams, CorasPageParamsByPage, CorasLandingPageParams, CorasSearchPageParams, CorasDetailsPageParams, CorasPaymentPageParams, CorasHelpPageParams, CorasSuggestionWidgetParams, CorasHostEventMap, CorasHostEventName, CorasReadyDetail, CorasNavigateDetail, CorasStateChangeDetail, CorasReservationCreatedDetail, CorasPaymentStatusDetail, CorasPaymentStatus, CorasErrorDetail, CorasNavigationSource, } from "./sdk/types.js";
|
|
5
4
|
export type { SupportedLocales } from "./core/types/core/locale.js";
|
|
6
5
|
export type { SupportedCurrencies } from "./core/types/core/currency.js";
|
|
7
6
|
export { allLocales } from "./core/i18n/locale-codes.js";
|
package/dist/index.js
CHANGED
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
// contexts, or other internals (ADR 0001). The page custom elements are
|
|
5
5
|
// implementation details and are loaded lazily by `mount()`; importing this
|
|
6
6
|
// module must not pull in Stripe, Coinbase, viem, seats.io, or page UI.
|
|
7
|
-
export { mount
|
|
8
|
-
export { getPageMeta } from "./sdk/meta.js";
|
|
7
|
+
export { mount } from "./sdk/mount.js";
|
|
9
8
|
export { CorasValidationError, } from "./sdk/validation.js";
|
|
10
9
|
// The matching runtime lists, for hosts that build their own locale/currency
|
|
11
10
|
// pickers (e.g. the Studio). These are plain constant arrays and pull
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
export declare const templates: {
|
|
2
|
+
h0453a9c8ddf1e74c: import("lit").TemplateResult<1>;
|
|
3
|
+
h0f22760eabebc0d2: import("lit").TemplateResult<1>;
|
|
4
|
+
h41ee003df7011ba3: import("lit").TemplateResult<1>;
|
|
5
|
+
h4653b4623e11cce8: import("lit").TemplateResult<1>;
|
|
6
|
+
h62aa06b7d898393a: import("lit").TemplateResult<1>;
|
|
7
|
+
h95c0ee9db9bc7a2e: import("lit").TemplateResult<1>;
|
|
8
|
+
hd48f85821228fb37: import("lit").TemplateResult<1>;
|
|
9
|
+
s003d3f04ab3c63af: string;
|
|
10
|
+
s01769b46d7a9bcbe: string;
|
|
11
|
+
s01ca6f3c6dcac61b: string;
|
|
12
|
+
s0230dfb6b6c1e011: string;
|
|
13
|
+
s02cbd3b6873bf3cc: string;
|
|
14
|
+
s0379fc73608ab971: string;
|
|
15
|
+
s0487f33d9ddaabde: string;
|
|
16
|
+
s053945ad43e9d1d6: string;
|
|
17
|
+
s055e7b1eb0e8152f: string;
|
|
18
|
+
s065490f8b6557fa8: string;
|
|
19
|
+
s065493f8b65584c1: string;
|
|
20
|
+
s068d4dd16d9106d0: string;
|
|
21
|
+
s06963fd6fbd255b6: string;
|
|
22
|
+
s06e48df1da26857e: string;
|
|
23
|
+
s072873fcb8392b95: string;
|
|
24
|
+
s07c32b16a0cc7f41: string;
|
|
25
|
+
s0832cb53a9099084: string;
|
|
26
|
+
s088e2b07b5393093: string;
|
|
27
|
+
s0a88a6ae24e8ac10: string;
|
|
28
|
+
s0d642c7eac029f8c: string;
|
|
29
|
+
s0ec46bff04cae43d: string;
|
|
30
|
+
s0f670499517f14df: string;
|
|
31
|
+
s0fb0fc272e807ad1: string;
|
|
32
|
+
s11602ea206accf6e: string;
|
|
33
|
+
s11cc9ffa7ddc8e94: string;
|
|
34
|
+
s13a66c3ef0b5bf5f: string;
|
|
35
|
+
s14cc42e0b8fe4c84: string;
|
|
36
|
+
s15194cf12eb014cd: string;
|
|
37
|
+
s1726f691155bad09: string;
|
|
38
|
+
s195e67d70525b331: string;
|
|
39
|
+
s1a3c32dd624ff8fd: string;
|
|
40
|
+
s1d1d5f97e6c7c7bd: import("@lit/localize").StrResult;
|
|
41
|
+
s1edc4e64bd3d07fa: import("@lit/localize").StrResult;
|
|
42
|
+
s1f496958555429be: string;
|
|
43
|
+
s1f7703cffaf7880b: string;
|
|
44
|
+
s207d7cbee7214197: string;
|
|
45
|
+
s208665855189c10c: string;
|
|
46
|
+
s214bac601e6d7da8: string;
|
|
47
|
+
s2220ac9a490a6aad: string;
|
|
48
|
+
s22771f6bba73d648: string;
|
|
49
|
+
s2468b69d10791c82: string;
|
|
50
|
+
s24836d5e8de2ef53: string;
|
|
51
|
+
s255857544a9d5ec0: string;
|
|
52
|
+
s261f88c673a6b512: string;
|
|
53
|
+
s289520a696583a56: string;
|
|
54
|
+
s28b1ee8b52306d04: string;
|
|
55
|
+
s291aac5ed9761710: string;
|
|
56
|
+
s2a0431e62980ccb6: string;
|
|
57
|
+
s2af92d203c6533c4: string;
|
|
58
|
+
s2b62420bebf9e6e4: import("@lit/localize").StrResult;
|
|
59
|
+
s2d1d27aa9a7ab857: string;
|
|
60
|
+
s2d6ceb2ed95d2aec: string;
|
|
61
|
+
s302b8b3db5e19407: string;
|
|
62
|
+
s30953bd831efad6c: string;
|
|
63
|
+
s318aefcc44f6fbdc: string;
|
|
64
|
+
s31b54217aedd072d: string;
|
|
65
|
+
s32b30574fbef4a04: string;
|
|
66
|
+
s344c7633610bf8b0: string;
|
|
67
|
+
s355b21b89ce5d9c5: string;
|
|
68
|
+
s3606b9d856cdbafe: string;
|
|
69
|
+
s376766fd26cf3bd3: string;
|
|
70
|
+
s38887b94b3320533: string;
|
|
71
|
+
s38b7890d18383c99: string;
|
|
72
|
+
s38bf5b02316633fe: import("@lit/localize").StrResult;
|
|
73
|
+
s38eb6b65959cd214: string;
|
|
74
|
+
s393fa33e92e1b35c: string;
|
|
75
|
+
s3b8a6245b12fa2ad: string;
|
|
76
|
+
s3b9cb6516f644f10: string;
|
|
77
|
+
s3bd9192a47014fac: string;
|
|
78
|
+
s3d0bb0448ae28706: string;
|
|
79
|
+
s3d1d2fdc677de804: string;
|
|
80
|
+
s3d52d1be2d6d171d: string;
|
|
81
|
+
s3dc9fd50cee69d30: string;
|
|
82
|
+
s3e7884bf4f412c6f: string;
|
|
83
|
+
s40d76f1f51639ec0: string;
|
|
84
|
+
s42211e5b076304b9: string;
|
|
85
|
+
s42c3f76163444278: string;
|
|
86
|
+
s42cbc1ed3d490ba8: import("@lit/localize").StrResult;
|
|
87
|
+
s4356163009e59310: string;
|
|
88
|
+
s43f528d2fff00362: import("@lit/localize").StrResult;
|
|
89
|
+
s4543ff29118e088d: string;
|
|
90
|
+
s463b8c4e92751ba5: string;
|
|
91
|
+
s4715435f75327cc1: string;
|
|
92
|
+
s4840b56c1ccf7c87: string;
|
|
93
|
+
s48cecdf70134bbb2: string;
|
|
94
|
+
s48e186fb300e5464: string;
|
|
95
|
+
s4a0aa9b114d56102: string;
|
|
96
|
+
s4a0ed56eb391ce22: string;
|
|
97
|
+
s4a6cd7e038947472: import("@lit/localize").StrResult;
|
|
98
|
+
s4acf0b8071b38761: string;
|
|
99
|
+
s4c4e33c8c5ffe216: string;
|
|
100
|
+
s517acbf1f96324f9: string;
|
|
101
|
+
s52f99caec1114ea3: import("@lit/localize").StrResult;
|
|
102
|
+
s539cc7126a88f5a8: string;
|
|
103
|
+
s56d9d499ce21aa71: string;
|
|
104
|
+
s589ade03e24b3dec: string;
|
|
105
|
+
s5921af1f9988e939: string;
|
|
106
|
+
s5b0cdec697634a43: string;
|
|
107
|
+
s5baecf6a8b5e582f: string;
|
|
108
|
+
s5bd685b647375404: string;
|
|
109
|
+
s5c843d9e674e1c41: import("@lit/localize").StrResult;
|
|
110
|
+
s5cf68140409e6208: string;
|
|
111
|
+
s5d86c9720b06c065: string;
|
|
112
|
+
s5e27738a2e8eb763: string;
|
|
113
|
+
s5e8250fb85d64c23: string;
|
|
114
|
+
s5f0835c3498593e7: string;
|
|
115
|
+
s5f343a43e7ea9f91: string;
|
|
116
|
+
s613ca1dae8c9c2f2: string;
|
|
117
|
+
s62c8714f22e8581e: string;
|
|
118
|
+
s632b0d6f5b8f60b5: string;
|
|
119
|
+
s63a8d5c967692fd8: import("@lit/localize").StrResult;
|
|
120
|
+
s6434ccb2ab38de1e: string;
|
|
121
|
+
s64c725e7c35bfc44: string;
|
|
122
|
+
s65d8b64cc2edc07f: string;
|
|
123
|
+
s66241ced41f02eaa: string;
|
|
124
|
+
s6765e69c04d66039: string;
|
|
125
|
+
s67b559eeb2136588: string;
|
|
126
|
+
s68323a30f0d5bdfa: string;
|
|
127
|
+
s698589c71ed3203f: string;
|
|
128
|
+
s6992d6150e46d6fc: string;
|
|
129
|
+
s6bc8b1530d693ee9: string;
|
|
130
|
+
s6c76b294d740446c: string;
|
|
131
|
+
s6d84c67f663fb24d: string;
|
|
132
|
+
s6e8059179423bfa0: string;
|
|
133
|
+
s6f932154a669cc49: string;
|
|
134
|
+
s709af33057592dd8: string;
|
|
135
|
+
s70ab5bb776df5e7c: string;
|
|
136
|
+
s732385cbc938b7a1: string;
|
|
137
|
+
s732d031b2be46181: string;
|
|
138
|
+
s7571bffb300cd56a: string;
|
|
139
|
+
s7572f8d1e64214a9: string;
|
|
140
|
+
s76e508e5ee58da2d: string;
|
|
141
|
+
s771897106728d3f6: string;
|
|
142
|
+
s77dde5ef6c52def6: string;
|
|
143
|
+
s791ef75ce61f73be: string;
|
|
144
|
+
s7aa03410a4afcc96: string;
|
|
145
|
+
s7ac23a5b8153fad5: string;
|
|
146
|
+
s7f3437809d931336: string;
|
|
147
|
+
s8195430312d62be0: string;
|
|
148
|
+
s8315ddc4161a498b: string;
|
|
149
|
+
s84a7ee7d2559f1e1: string;
|
|
150
|
+
s8654133f4227b6dc: string;
|
|
151
|
+
s86d7da761b5e390d: string;
|
|
152
|
+
s86e180b4d89f9bbe: string;
|
|
153
|
+
s871b1fe6d1846958: string;
|
|
154
|
+
s87bae2710b2492c3: string;
|
|
155
|
+
s8bcbc2856e771f09: string;
|
|
156
|
+
s8cda828dac449ea5: string;
|
|
157
|
+
s8dd38519f42fc289: string;
|
|
158
|
+
s8f683174898a4afa: string;
|
|
159
|
+
s8f94436e63f36047: string;
|
|
160
|
+
s90e83b2c18f39409: string;
|
|
161
|
+
s9145aa93cf917ae4: string;
|
|
162
|
+
s9181c89c4a58402a: string;
|
|
163
|
+
s92921878e886e36d: string;
|
|
164
|
+
s93c046d8c5bb2047: string;
|
|
165
|
+
s953fc82dcd20c9f8: string;
|
|
166
|
+
s970136aeacc82f0c: string;
|
|
167
|
+
s978836a21387aa75: string;
|
|
168
|
+
s99a14b1e12386fa1: import("@lit/localize").StrResult;
|
|
169
|
+
s9ab68896f4be9e65: string;
|
|
170
|
+
s9ca2c3aecc846712: string;
|
|
171
|
+
s9ca372a6096ddd54: string;
|
|
172
|
+
s9f0f97043cfaffb1: string;
|
|
173
|
+
s9fe1c455c8e043b2: string;
|
|
174
|
+
sa13dd70348dac081: string;
|
|
175
|
+
sa40ddac6755d18e2: string;
|
|
176
|
+
sa4425361d4b8e155: import("@lit/localize").StrResult;
|
|
177
|
+
sa61534a5c0c71f5e: string;
|
|
178
|
+
sa6ab5184d6315895: string;
|
|
179
|
+
sa7d09574ece17145: string;
|
|
180
|
+
sa8535600e6997bcf: string;
|
|
181
|
+
sa8beb6b1182241ac: string;
|
|
182
|
+
sa8e8cc2558962d51: string;
|
|
183
|
+
saaf58da3a384352a: import("@lit/localize").StrResult;
|
|
184
|
+
sab459038e3c6bcb8: string;
|
|
185
|
+
sac33f8b1ee0a8a70: import("@lit/localize").StrResult;
|
|
186
|
+
sad4a0401aafaab57: string;
|
|
187
|
+
sb05eb16313ad5810: string;
|
|
188
|
+
sb074169ce94feeb0: string;
|
|
189
|
+
sb182f52b56175d8c: string;
|
|
190
|
+
sb26e53053d747113: string;
|
|
191
|
+
sb3d4f79d9d8b71e5: string;
|
|
192
|
+
sb3dbeaf294fd9bdd: string;
|
|
193
|
+
sb46123a97302f3ae: string;
|
|
194
|
+
sb47b0b39e28f35a8: string;
|
|
195
|
+
sb59d68ed12d46377: string;
|
|
196
|
+
sb5c2050ca21cdee6: string;
|
|
197
|
+
sb5fd6f925a5bd3ea: string;
|
|
198
|
+
sb61dfe1d5012cc35: string;
|
|
199
|
+
sb75ee24776b3d425: string;
|
|
200
|
+
sb7600e1426fb67c7: string;
|
|
201
|
+
sb84d72388b33a3a4: string;
|
|
202
|
+
sb85774dc5d18ff0f: string;
|
|
203
|
+
sb9bd4f5a3810b77e: string;
|
|
204
|
+
sba5dce52c7f589f2: string;
|
|
205
|
+
sba690fe0b679f723: string;
|
|
206
|
+
sbb7d883d08cba223: import("@lit/localize").StrResult;
|
|
207
|
+
sbb9b8e30a21c6548: string;
|
|
208
|
+
sbbb558d4adb8c7c4: string;
|
|
209
|
+
sbc57430ab412e891: import("@lit/localize").StrResult;
|
|
210
|
+
sbd34c25455a075a8: import("@lit/localize").StrResult;
|
|
211
|
+
sc0a0c87d5c556c38: string;
|
|
212
|
+
sc16e00a7a8b2fde2: string;
|
|
213
|
+
sc1a94937d6795b91: string;
|
|
214
|
+
sc2f116c0ea77d58a: string;
|
|
215
|
+
sc34d8c2a3d180a29: string;
|
|
216
|
+
sc354c34c1a7cbcc4: string;
|
|
217
|
+
sc377239766b138ef: string;
|
|
218
|
+
sc84bf2d183cd320b: import("@lit/localize").StrResult;
|
|
219
|
+
sc9f3dcec92273865: string;
|
|
220
|
+
sca6f02fbd9e373b4: string;
|
|
221
|
+
scbaa2a2ceb044c0a: string;
|
|
222
|
+
scc1db59d292cbc4c: string;
|
|
223
|
+
scd0b9d7c6f9c597d: string;
|
|
224
|
+
scd1ca177bf7ddf98: string;
|
|
225
|
+
scd1dd6ff53d0d01a: string;
|
|
226
|
+
scd525a733e4c9110: string;
|
|
227
|
+
sce2300ea82130155: string;
|
|
228
|
+
scf61ccc6056c17d2: string;
|
|
229
|
+
sd002a6411d593b33: string;
|
|
230
|
+
sd0827f83a77da218: string;
|
|
231
|
+
sd15de0dcd2378a55: string;
|
|
232
|
+
sd1797c5a30652800: string;
|
|
233
|
+
sd20a2299b31382f0: string;
|
|
234
|
+
sd4d1e43525fd598a: string;
|
|
235
|
+
sd574f2d5de170480: string;
|
|
236
|
+
sd715e3f32ad86586: string;
|
|
237
|
+
sd7d17730c0c10ec4: string;
|
|
238
|
+
sd8fc3dc0c9cc5758: string;
|
|
239
|
+
sd964b91b1084d970: string;
|
|
240
|
+
sdc2fc49bb9d4b82e: string;
|
|
241
|
+
sdf566eeae04c0483: string;
|
|
242
|
+
se046d97f0d9dd903: string;
|
|
243
|
+
se256f991824c9ae0: string;
|
|
244
|
+
se2b298fd65f45cc7: string;
|
|
245
|
+
se374a10ee87f7f8c: string;
|
|
246
|
+
se3d2b191408a6254: string;
|
|
247
|
+
se46604e4550a957d: string;
|
|
248
|
+
se4bfd14e0c3355ac: string;
|
|
249
|
+
se789bfdae3410a1b: string;
|
|
250
|
+
se78c02e9a98a0f47: string;
|
|
251
|
+
se80ccbc8f2174567: string;
|
|
252
|
+
se8b912e5bbd4b067: string;
|
|
253
|
+
seaacf6e071686155: string;
|
|
254
|
+
seb5e1ea8f8f5728a: string;
|
|
255
|
+
sec06d1d43580b496: string;
|
|
256
|
+
sed8ec5e3c64fa25d: string;
|
|
257
|
+
see2fcaedf9743ec6: string;
|
|
258
|
+
seed76e8afe9f604a: string;
|
|
259
|
+
seeda9b3e208305ff: string;
|
|
260
|
+
sef49aec68fd1dc66: string;
|
|
261
|
+
sefcf950b3cc4fc3b: string;
|
|
262
|
+
sf07904be22a6165a: string;
|
|
263
|
+
sf1bc83d2509bafcf: string;
|
|
264
|
+
sf2671450062ca53d: string;
|
|
265
|
+
sf40442de55b19e30: string;
|
|
266
|
+
sf430ade9e0767d02: string;
|
|
267
|
+
sf5036bf805af865e: string;
|
|
268
|
+
sf5f07bb2e5b280b7: string;
|
|
269
|
+
sf60706e54bda838a: string;
|
|
270
|
+
sf61433571f3a443b: string;
|
|
271
|
+
sf89196d28dfa8629: string;
|
|
272
|
+
sfa28319e707cf5d5: string;
|
|
273
|
+
sfd25dcb1e3a468be: string;
|
|
274
|
+
sffdadf0a576fd802: string;
|
|
275
|
+
h12f3bd3a64c46efe: import("lit").TemplateResult<1>;
|
|
276
|
+
h82c989f2494613fa: import("lit").TemplateResult<1>;
|
|
277
|
+
hb3090d5e6b53fe7c: import("lit").TemplateResult<1>;
|
|
278
|
+
hc94338efbdc293e0: import("lit").TemplateResult<1>;
|
|
279
|
+
};
|