Merged in chore/cleanup-unused (pull request #3461)
chore: Cleanup unused vars, exports, types * Cleanup some unused exports * Remove more * Readd CampaignPageIncludedHotelsRef * Add alias comment to procedure exports * Remove unused exports Approved-by: Linus Flood
This commit is contained in:
@@ -1,26 +0,0 @@
|
|||||||
"use client"
|
|
||||||
|
|
||||||
import { type IntlConfig, IntlProvider } from "react-intl"
|
|
||||||
|
|
||||||
import type { Lang } from "@scandic-hotels/common/constants/language"
|
|
||||||
|
|
||||||
export type ClientIntlProviderProps = React.PropsWithChildren<
|
|
||||||
Pick<IntlConfig, "defaultLocale" | "messages"> & { locale: Lang }
|
|
||||||
>
|
|
||||||
|
|
||||||
export default function ClientIntlProvider({
|
|
||||||
children,
|
|
||||||
locale,
|
|
||||||
defaultLocale,
|
|
||||||
messages,
|
|
||||||
}: ClientIntlProviderProps) {
|
|
||||||
return (
|
|
||||||
<IntlProvider
|
|
||||||
locale={locale}
|
|
||||||
defaultLocale={defaultLocale}
|
|
||||||
messages={messages}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</IntlProvider>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@@ -30,7 +30,7 @@ type LanguageSwitcherProps = {
|
|||||||
type?: "footer" | "header"
|
type?: "footer" | "header"
|
||||||
}
|
}
|
||||||
|
|
||||||
export function replaceUrlPart(currentPath: string, newPart: string): string {
|
function replaceUrlPart(currentPath: string, newPart: string): string {
|
||||||
const pathSegments = currentPath.split("/").filter((segment) => segment)
|
const pathSegments = currentPath.split("/").filter((segment) => segment)
|
||||||
|
|
||||||
const newPathSegments = newPart
|
const newPathSegments = newPart
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import { IntlProvider } from "react-intl"
|
import { type IntlConfig, IntlProvider } from "react-intl"
|
||||||
|
|
||||||
import { Lang } from "@scandic-hotels/common/constants/language"
|
import { Lang } from "@scandic-hotels/common/constants/language"
|
||||||
import { logger } from "@scandic-hotels/common/logger"
|
import { logger } from "@scandic-hotels/common/logger"
|
||||||
|
|
||||||
import type { ClientIntlProviderProps } from "@/components/IntlProvider"
|
type ClientIntlProviderProps = React.PropsWithChildren<
|
||||||
|
Pick<IntlConfig, "defaultLocale" | "messages"> & { locale: Lang }
|
||||||
|
>
|
||||||
|
|
||||||
const logged: Record<string, boolean> = {}
|
const logged: Record<string, boolean> = {}
|
||||||
|
|
||||||
|
|||||||
@@ -28,20 +28,6 @@ export function badRequest(cause?: unknown) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function notFound(cause?: unknown) {
|
|
||||||
const resInit = {
|
|
||||||
status: 404,
|
|
||||||
statusText: "Not found",
|
|
||||||
}
|
|
||||||
|
|
||||||
return NextResponse.json(
|
|
||||||
{
|
|
||||||
cause,
|
|
||||||
},
|
|
||||||
resInit
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export function internalServerError(cause?: unknown) {
|
export function internalServerError(cause?: unknown) {
|
||||||
const resInit = {
|
const resInit = {
|
||||||
status: 500,
|
status: 500,
|
||||||
@@ -56,20 +42,6 @@ export function internalServerError(cause?: unknown) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function serviceUnavailable(cause?: unknown) {
|
|
||||||
const resInit = {
|
|
||||||
status: 503,
|
|
||||||
statusText: "Service Unavailable",
|
|
||||||
}
|
|
||||||
|
|
||||||
return NextResponse.json(
|
|
||||||
{
|
|
||||||
cause,
|
|
||||||
},
|
|
||||||
resInit
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export function response<T>(data: T, status: number, statusText: string) {
|
export function response<T>(data: T, status: number, statusText: string) {
|
||||||
return NextResponse.json(data, {
|
return NextResponse.json(data, {
|
||||||
status,
|
status,
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import { NextRequest } from "next/server"
|
|
||||||
|
|
||||||
import { logger } from "@scandic-hotels/common/logger"
|
|
||||||
|
|
||||||
import { env } from "@/env/server"
|
import { env } from "@/env/server"
|
||||||
|
|
||||||
|
import type { NextRequest } from "next/server"
|
||||||
/**
|
/**
|
||||||
* Use this function when you want to create URLs that are public facing, for
|
* Use this function when you want to create URLs that are public facing, for
|
||||||
* example for redirects or redirectTo query parameters.
|
* example for redirects or redirectTo query parameters.
|
||||||
@@ -44,51 +42,3 @@ export function getPublicURL(request: NextRequest) {
|
|||||||
}
|
}
|
||||||
return request.nextUrl.origin
|
return request.nextUrl.origin
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Use this function when you want to create URLs that are internal (behind Akamai),
|
|
||||||
* for example for rewrites. Mainly used for middleware wrapped in auth().
|
|
||||||
* The auth() function overrides the origin of the incoming request. It sets it
|
|
||||||
* to the origin of AUTH_URL/NEXTAUTH_URL. This means we cannot use the augmented
|
|
||||||
* request from auth() for rewrites, as those will point to auth url origin
|
|
||||||
* (in front of Akamai) and not the origin of the incoming request (behind Akamai).
|
|
||||||
* This results in rewrites going over the internet instead of going through the
|
|
||||||
* internal routing at Netlify.
|
|
||||||
* For dedicated environments (test, stage and production) we are behind Akamai.
|
|
||||||
* For those we have set a value for AUTH_URL/NEXTAUTH_URL, they point to the
|
|
||||||
* PUBLIC_URL. For rewrites we need the internal origin inside Netlify.
|
|
||||||
* In middleware.ts we copy the incoming origin to a header 'x-sh-origin'. We try
|
|
||||||
* and use that first, if not present we assume the internal origin is the value
|
|
||||||
* of the host header, as that is what Netlify used for routing to this deployment.
|
|
||||||
* @param request The incoming request.
|
|
||||||
* @returns NextURL The internal request, in Netlify behind Akamai.
|
|
||||||
*/
|
|
||||||
export function getInternalNextURL(request: NextRequest) {
|
|
||||||
const { href, origin } = request.nextUrl
|
|
||||||
|
|
||||||
const originHeader = request.headers.get("x-sh-origin")
|
|
||||||
if (originHeader) {
|
|
||||||
logger.debug(`[internalNextUrl] using x-sh-origin header`, {
|
|
||||||
origin,
|
|
||||||
originHeader,
|
|
||||||
newOrigin: href.replace(origin, originHeader),
|
|
||||||
})
|
|
||||||
return new NextRequest(href.replace(origin, originHeader), request).nextUrl
|
|
||||||
}
|
|
||||||
|
|
||||||
const hostHeader = request.headers.get("host")
|
|
||||||
if (hostHeader) {
|
|
||||||
const inputHostOrigin = `${request.nextUrl.protocol}//${hostHeader}`
|
|
||||||
logger.debug(`[internalNextUrl] using host header`, {
|
|
||||||
origin,
|
|
||||||
hostHeader,
|
|
||||||
hostOrigin: inputHostOrigin,
|
|
||||||
newOrigin: href.replace(origin, inputHostOrigin),
|
|
||||||
})
|
|
||||||
const { origin: hostOrigin } = new URL(inputHostOrigin)
|
|
||||||
return new NextRequest(href.replace(origin, hostOrigin), request).nextUrl
|
|
||||||
}
|
|
||||||
|
|
||||||
logger.debug(`[internalNextUrl] falling back to incoming request`)
|
|
||||||
return request.nextUrl
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -14,6 +14,6 @@ export type LangParams = {
|
|||||||
lang: Lang
|
lang: Lang
|
||||||
}
|
}
|
||||||
|
|
||||||
export type LayoutArgs<P = undefined> = P extends undefined ? {} : Params<P>
|
type LayoutArgs<P = undefined> = P extends undefined ? {} : Params<P>
|
||||||
|
|
||||||
export type PageArgs<P = undefined> = LayoutArgs<P> & SearchParams
|
export type PageArgs<P = undefined> = LayoutArgs<P> & SearchParams
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ export function csvFilePath(lang: Lang) {
|
|||||||
return `${import.meta.dirname}/../data/csv/${lang}.csv`
|
return `${import.meta.dirname}/../data/csv/${lang}.csv`
|
||||||
}
|
}
|
||||||
|
|
||||||
export function jsonFilePath(lang: Lang) {
|
|
||||||
return `${import.meta.dirname}/../data/json/${lang}.json`
|
|
||||||
}
|
|
||||||
|
|
||||||
export function outputFilepath(lang: Lang) {
|
export function outputFilepath(lang: Lang) {
|
||||||
return path.resolve(
|
return path.resolve(
|
||||||
import.meta.dirname,
|
import.meta.dirname,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { dt } from "@scandic-hotels/common/dt"
|
|||||||
|
|
||||||
import type { IntlShape } from "react-intl"
|
import type { IntlShape } from "react-intl"
|
||||||
|
|
||||||
export const DAYS_UNTIL_EXPIRY_WARNING = 30
|
const DAYS_UNTIL_EXPIRY_WARNING = 30
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get expiry label for points based on the expiry date.
|
* Get expiry label for points based on the expiry date.
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ export enum NodeNames {
|
|||||||
table = "table",
|
table = "table",
|
||||||
tbody = "tbody",
|
tbody = "tbody",
|
||||||
td = "td",
|
td = "td",
|
||||||
text = "text",
|
|
||||||
th = "th",
|
th = "th",
|
||||||
tr = "tr",
|
tr = "tr",
|
||||||
ul = "ul",
|
ul = "ul",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import FooterNavigation from "./Navigation"
|
|||||||
|
|
||||||
import styles from "./footer.module.css"
|
import styles from "./footer.module.css"
|
||||||
|
|
||||||
export function preload() {
|
function preload() {
|
||||||
void getFooter()
|
void getFooter()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,7 @@ import styles from "./topLink.module.css"
|
|||||||
import type { Header } from "@scandic-hotels/trpc/types/header"
|
import type { Header } from "@scandic-hotels/trpc/types/header"
|
||||||
import type { ComponentProps } from "react"
|
import type { ComponentProps } from "react"
|
||||||
|
|
||||||
export interface TopLinkProps
|
interface TopLinkProps extends Omit<
|
||||||
extends Omit<
|
|
||||||
ComponentProps<typeof HeaderLink>,
|
ComponentProps<typeof HeaderLink>,
|
||||||
"href" | "iconName" | "children"
|
"href" | "iconName" | "children"
|
||||||
> {
|
> {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ export {
|
|||||||
ACCESS_GRANTED,
|
ACCESS_GRANTED,
|
||||||
accessBooking as default,
|
accessBooking as default,
|
||||||
ERROR_BAD_REQUEST,
|
ERROR_BAD_REQUEST,
|
||||||
ERROR_FORBIDDEN,
|
|
||||||
ERROR_NOT_FOUND,
|
ERROR_NOT_FOUND,
|
||||||
ERROR_UNAUTHORIZED,
|
ERROR_UNAUTHORIZED,
|
||||||
}
|
}
|
||||||
@@ -66,11 +65,6 @@ const ERROR_UNAUTHORIZED = {
|
|||||||
status: 401,
|
status: 401,
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
const ERROR_FORBIDDEN = {
|
|
||||||
code: "FORBIDDEN",
|
|
||||||
status: 403,
|
|
||||||
} as const
|
|
||||||
|
|
||||||
const ERROR_NOT_FOUND = {
|
const ERROR_NOT_FOUND = {
|
||||||
code: "NOT_FOUND",
|
code: "NOT_FOUND",
|
||||||
status: 404,
|
status: 404,
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ Located at `utils/profilingConsent.ts`:
|
|||||||
- `storageKey(memberKey)` — Generate storage key
|
- `storageKey(memberKey)` — Generate storage key
|
||||||
- `readDismissed(memberKey)` — Check if modal was dismissed
|
- `readDismissed(memberKey)` — Check if modal was dismissed
|
||||||
- `setDismissed(memberKey)` — Mark modal as dismissed
|
- `setDismissed(memberKey)` — Mark modal as dismissed
|
||||||
- `clearDismissed(memberKey)` — Clear dismissal flag
|
|
||||||
- `profilingConsentOpenEvent` — CustomEvent name for opening modal
|
- `profilingConsentOpenEvent` — CustomEvent name for opening modal
|
||||||
- `requestOpen()` — Dispatch event to open modal
|
- `requestOpen()` — Dispatch event to open modal
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const myPages = {
|
|||||||
sv: "/sv/webview/scandic-friends/mina-sidor",
|
sv: "/sv/webview/scandic-friends/mina-sidor",
|
||||||
}
|
}
|
||||||
|
|
||||||
export const overview = {
|
const overview = {
|
||||||
da: `${myPages.da}/oversigt`,
|
da: `${myPages.da}/oversigt`,
|
||||||
de: `${myPages.de}/uberblick`,
|
de: `${myPages.de}/uberblick`,
|
||||||
en: `${myPages.en}/overview`,
|
en: `${myPages.en}/overview`,
|
||||||
|
|||||||
@@ -38,15 +38,6 @@ export const partners: LangRoute = {
|
|||||||
sv: `/${Lang.sv}/scandic-friends/partners`,
|
sv: `/${Lang.sv}/scandic-friends/partners`,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const spendPoints: LangRoute = {
|
|
||||||
da: `/${Lang.da}/scandic-friends/brug-point`,
|
|
||||||
de: `/${Lang.de}/scandic-friends/ausgeben`,
|
|
||||||
en: `/${Lang.en}/scandic-friends/spend-points`,
|
|
||||||
fi: `/${Lang.fi}/scandic-friends/hyodynna`,
|
|
||||||
no: `/${Lang.no}/scandic-friends/bruk-poeng`,
|
|
||||||
sv: `/${Lang.sv}/scandic-friends/anvand-poang`,
|
|
||||||
}
|
|
||||||
|
|
||||||
export const offers: LangRoute = {
|
export const offers: LangRoute = {
|
||||||
da: `/${Lang.da}/tilbud`,
|
da: `/${Lang.da}/tilbud`,
|
||||||
de: `/${Lang.de}/angebote`,
|
de: `/${Lang.de}/angebote`,
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ function filterPoints(ancillaries: Ancillaries, user: User | null) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function generateUniqueAncillaries(
|
function generateUniqueAncillaries(
|
||||||
ancillaries: Ancillaries
|
ancillaries: Ancillaries
|
||||||
): Ancillary["ancillaryContent"] {
|
): Ancillary["ancillaryContent"] {
|
||||||
const uniqueAncillaries = new Map(
|
const uniqueAncillaries = new Map(
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { logger } from "@scandic-hotels/common/logger"
|
|||||||
|
|
||||||
const logged: Record<string, boolean> = {}
|
const logged: Record<string, boolean> = {}
|
||||||
|
|
||||||
export type ClientIntlProviderProps = React.PropsWithChildren<
|
type ClientIntlProviderProps = React.PropsWithChildren<
|
||||||
Pick<IntlConfig, "defaultLocale" | "messages"> & { locale: Lang }
|
Pick<IntlConfig, "defaultLocale" | "messages"> & { locale: Lang }
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ type FailedWarmup = {
|
|||||||
|
|
||||||
export type WarmupResult = BaseWarmup | FailedWarmup
|
export type WarmupResult = BaseWarmup | FailedWarmup
|
||||||
|
|
||||||
export const warmupFunctions: Record<WarmupFunctionsKey, WarmupFunction> = {
|
const warmupFunctions: Record<WarmupFunctionsKey, WarmupFunction> = {
|
||||||
countries_en: warmupCountry(Lang.en),
|
countries_en: warmupCountry(Lang.en),
|
||||||
countries_da: warmupCountry(Lang.da),
|
countries_da: warmupCountry(Lang.da),
|
||||||
countries_de: warmupCountry(Lang.de),
|
countries_de: warmupCountry(Lang.de),
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ const langs = Object.keys(Lang) as Lang[]
|
|||||||
/*
|
/*
|
||||||
* Keys for warmup functions, the order of the keys is the order in which they will be executed
|
* Keys for warmup functions, the order of the keys is the order in which they will be executed
|
||||||
*/
|
*/
|
||||||
export const warmupKeys = [
|
const warmupKeys = [
|
||||||
...langs.map((lang) => `countries_${lang}` as const),
|
...langs.map((lang) => `countries_${lang}` as const),
|
||||||
"hotelsByCountry",
|
"hotelsByCountry",
|
||||||
...langs.map((lang) => `hotelData_${lang}` as const),
|
...langs.map((lang) => `hotelData_${lang}` as const),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { create } from "zustand"
|
import { create } from "zustand"
|
||||||
|
|
||||||
export type SelectedMarker = {
|
type SelectedMarker = {
|
||||||
cityId: string
|
cityId: string
|
||||||
location: { lat: number; lng: number }
|
location: { lat: number; lng: number }
|
||||||
} | null
|
} | null
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ export interface CityMarker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type CityMarkerProperties = Omit<CityMarker, "coordinates">
|
export type CityMarkerProperties = Omit<CityMarker, "coordinates">
|
||||||
export type CitiesClusterMarkerProperties = CityMarkerProperties[]
|
|
||||||
|
|
||||||
export type CityMarkerGeojson = FeatureCollection<Point, CityMarkerProperties>
|
export type CityMarkerGeojson = FeatureCollection<Point, CityMarkerProperties>
|
||||||
export type CityMarkerFeature = CityMarkerGeojson["features"][number]
|
export type CityMarkerFeature = CityMarkerGeojson["features"][number]
|
||||||
|
|||||||
@@ -6,7 +6,3 @@ export type MembershipLevelIconProps = {
|
|||||||
level: MembershipLevel
|
level: MembershipLevel
|
||||||
rows?: 1 | 2
|
rows?: 1 | 2
|
||||||
} & LevelProps
|
} & LevelProps
|
||||||
|
|
||||||
export type CopyButtonProps = {
|
|
||||||
membershipNumber: string
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -66,9 +66,3 @@ export interface StepsProps {
|
|||||||
savedCreditCards: CreditCard[] | null
|
savedCreditCards: CreditCard[] | null
|
||||||
error: AncillaryErrorMessage | null
|
error: AncillaryErrorMessage | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ActionButtonsProps {
|
|
||||||
isPriceDetailsOpen: boolean
|
|
||||||
togglePriceDetails: () => void
|
|
||||||
isSubmitting: boolean
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,8 +1,3 @@
|
|||||||
import type { userQueryRouter } from "@scandic-hotels/trpc/routers/user/query"
|
import type { userQueryRouter } from "@scandic-hotels/trpc/routers/user/query"
|
||||||
import type { User } from "@scandic-hotels/trpc/types/user"
|
|
||||||
|
|
||||||
export type UserQueryRouter = typeof userQueryRouter
|
export type UserQueryRouter = typeof userQueryRouter
|
||||||
|
|
||||||
export interface UserProps {
|
|
||||||
user: User
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,34 +1,5 @@
|
|||||||
import type { Lang } from "@scandic-hotels/common/constants/language"
|
import type { Lang } from "@scandic-hotels/common/constants/language"
|
||||||
import type { PageContentTypeEnum } from "@scandic-hotels/trpc/enums/contentType"
|
|
||||||
|
|
||||||
export type NextSearchParams = { [key: string]: string | string[] | undefined }
|
|
||||||
|
|
||||||
export type SearchParams<S = object> = {
|
|
||||||
searchParams: Promise<S & { [key: string]: string }>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type LangParams = {
|
export type LangParams = {
|
||||||
lang: Lang
|
lang: Lang
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StatusParams = {
|
|
||||||
status: number
|
|
||||||
}
|
|
||||||
|
|
||||||
export type ContentTypeParams = {
|
|
||||||
contentType:
|
|
||||||
| PageContentTypeEnum.loyaltyPage
|
|
||||||
| PageContentTypeEnum.campaignOverviewPage
|
|
||||||
| PageContentTypeEnum.campaignPage
|
|
||||||
| PageContentTypeEnum.contentPage
|
|
||||||
| PageContentTypeEnum.hotelPage
|
|
||||||
| PageContentTypeEnum.collectionPage
|
|
||||||
| PageContentTypeEnum.destinationOverviewPage
|
|
||||||
| PageContentTypeEnum.destinationCountryPage
|
|
||||||
| PageContentTypeEnum.destinationCityPage
|
|
||||||
| PageContentTypeEnum.startPage
|
|
||||||
}
|
|
||||||
|
|
||||||
export type UIDParams = {
|
|
||||||
uid: string
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { Lang } from "@scandic-hotels/common/constants/language"
|
import type { Lang } from "@scandic-hotels/common/constants/language"
|
||||||
import type { SyncResult } from "contentstack"
|
import type { SyncResult } from "contentstack"
|
||||||
|
|
||||||
export type ChangeFrequency =
|
type ChangeFrequency =
|
||||||
| "always"
|
| "always"
|
||||||
| "hourly"
|
| "hourly"
|
||||||
| "daily"
|
| "daily"
|
||||||
@@ -10,7 +10,7 @@ export type ChangeFrequency =
|
|||||||
| "yearly"
|
| "yearly"
|
||||||
| "never"
|
| "never"
|
||||||
|
|
||||||
export interface SitemapEntry {
|
interface SitemapEntry {
|
||||||
url: string
|
url: string
|
||||||
lastModified: string
|
lastModified: string
|
||||||
changeFrequency: ChangeFrequency
|
changeFrequency: ChangeFrequency
|
||||||
@@ -62,8 +62,3 @@ export interface SyncItem {
|
|||||||
export interface SyncResponse extends Omit<SyncResult, "items"> {
|
export interface SyncResponse extends Omit<SyncResult, "items"> {
|
||||||
items: SyncItem[]
|
items: SyncItem[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SyncItemsByUid = {
|
|
||||||
mainEntry: SyncItem
|
|
||||||
alternates: SyncItem[]
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
export const profilingConsentOpenEvent = "profiling-consent:open"
|
export const profilingConsentOpenEvent = "profiling-consent:open"
|
||||||
|
|
||||||
export const storageKey = (memberKey: string) =>
|
const storageKey = (memberKey: string) =>
|
||||||
`profiling-consent:dismissed:${memberKey}`
|
`profiling-consent:dismissed:${memberKey}`
|
||||||
|
|
||||||
export function readDismissed(memberKey: string): boolean {
|
export function readDismissed(memberKey: string): boolean {
|
||||||
@@ -13,11 +13,6 @@ export function setDismissed(memberKey: string): void {
|
|||||||
localStorage.setItem(storageKey(memberKey), "1")
|
localStorage.setItem(storageKey(memberKey), "1")
|
||||||
}
|
}
|
||||||
|
|
||||||
export function clearDismissed(memberKey: string): void {
|
|
||||||
if (!memberKey || typeof window === "undefined") return
|
|
||||||
localStorage.removeItem(storageKey(memberKey))
|
|
||||||
}
|
|
||||||
|
|
||||||
export function requestOpen(): void {
|
export function requestOpen(): void {
|
||||||
if (typeof window === "undefined") return
|
if (typeof window === "undefined") return
|
||||||
window.dispatchEvent(new CustomEvent(profilingConsentOpenEvent))
|
window.dispatchEvent(new CustomEvent(profilingConsentOpenEvent))
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export async function getLastUpdated() {
|
|||||||
return await store().get(lastUpdatedKey)
|
return await store().get(lastUpdatedKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getSitemapData() {
|
async function getSitemapData() {
|
||||||
const sitemapData: SitemapData | null = await store().get(sitemapDataKey, {
|
const sitemapData: SitemapData | null = await store().get(sitemapDataKey, {
|
||||||
type: "json",
|
type: "json",
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -11,7 +11,4 @@ export {
|
|||||||
trackSocialMediaClick,
|
trackSocialMediaClick,
|
||||||
} from "@scandic-hotels/tracking/navigation"
|
} from "@scandic-hotels/tracking/navigation"
|
||||||
export { trackPageViewStart } from "@scandic-hotels/tracking/pageview"
|
export { trackPageViewStart } from "@scandic-hotels/tracking/pageview"
|
||||||
export {
|
export { trackUpdatePaymentMethod } from "@scandic-hotels/tracking/payment"
|
||||||
trackPaymentEvent,
|
|
||||||
trackUpdatePaymentMethod,
|
|
||||||
} from "@scandic-hotels/tracking/payment"
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { webviews } from "@/constants/routes/webviews"
|
|||||||
|
|
||||||
import type { Lang } from "@scandic-hotels/common/constants/language"
|
import type { Lang } from "@scandic-hotels/common/constants/language"
|
||||||
|
|
||||||
export async function webviewSearchParams() {
|
async function webviewSearchParams() {
|
||||||
const searchParams = new URLSearchParams()
|
const searchParams = new URLSearchParams()
|
||||||
const headersList = await headers()
|
const headersList = await headers()
|
||||||
const loginType = headersList.get("loginType")
|
const loginType = headersList.get("loginType")
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import type { CreditCard } from "@scandic-hotels/trpc/types/user"
|
|||||||
import type { RedemptionType } from "../../../bookingFlowConfig/bookingFlowConfig"
|
import type { RedemptionType } from "../../../bookingFlowConfig/bookingFlowConfig"
|
||||||
import type { RoomState } from "../../../stores/enter-details/types"
|
import type { RoomState } from "../../../stores/enter-details/types"
|
||||||
|
|
||||||
export function isPaymentMethodEnum(value: string): value is PaymentMethodEnum {
|
function isPaymentMethodEnum(value: string): value is PaymentMethodEnum {
|
||||||
return Object.values<string>(PaymentMethodEnum).includes(value)
|
return Object.values<string>(PaymentMethodEnum).includes(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ export function calculateTotalRoomPrice(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const paymentInfoStorageName = "payment-info-storage"
|
const paymentInfoStorageName = "payment-info-storage"
|
||||||
|
|
||||||
type PaymentInfoSessionData = {
|
type PaymentInfoSessionData = {
|
||||||
paymentMethod: string
|
paymentMethod: string
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
import type { RateEnum } from "@scandic-hotels/common/constants/rate"
|
|
||||||
import type { Child } from "@scandic-hotels/trpc/types/child"
|
import type { Child } from "@scandic-hotels/trpc/types/child"
|
||||||
import type { PackageEnum, Packages } from "@scandic-hotels/trpc/types/packages"
|
import type { PackageEnum } from "@scandic-hotels/trpc/types/packages"
|
||||||
import type {
|
|
||||||
Product,
|
|
||||||
RoomConfiguration,
|
|
||||||
} from "@scandic-hotels/trpc/types/roomAvailability"
|
|
||||||
|
|
||||||
import type { BookingSearchType } from "../../../misc/searchType"
|
import type { BookingSearchType } from "../../../misc/searchType"
|
||||||
|
|
||||||
@@ -27,25 +22,3 @@ export type SelectRateBooking = {
|
|||||||
searchType?: BookingSearchType
|
searchType?: BookingSearchType
|
||||||
toDate: string
|
toDate: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Rate = {
|
|
||||||
features: RoomConfiguration["features"]
|
|
||||||
packages: NonNullable<Packages>
|
|
||||||
priceName?: string
|
|
||||||
priceTerm?: string
|
|
||||||
product: Product
|
|
||||||
rate: RateEnum
|
|
||||||
roomRates?: {
|
|
||||||
rate: Rate
|
|
||||||
roomIndex: number
|
|
||||||
}[]
|
|
||||||
roomType: RoomConfiguration["roomType"]
|
|
||||||
roomTypeCode: RoomConfiguration["roomTypeCode"]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type RateCode = {
|
|
||||||
publicRateCode: string
|
|
||||||
roomTypeCode: string
|
|
||||||
name: string
|
|
||||||
paymentTerm: string
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import type { CacheOrGetOptions } from "./cacheOrGetOptions"
|
|||||||
const ONE_HOUR_IN_SECONDS = 3_600 as const
|
const ONE_HOUR_IN_SECONDS = 3_600 as const
|
||||||
const ONE_DAY_IN_SECONDS = 86_400 as const
|
const ONE_DAY_IN_SECONDS = 86_400 as const
|
||||||
|
|
||||||
export const namedCacheTimeMap: Record<NamedCacheTimes, number> = {
|
const namedCacheTimeMap: Record<NamedCacheTimes, number> = {
|
||||||
"no cache": 0,
|
"no cache": 0,
|
||||||
"1m": 60,
|
"1m": 60,
|
||||||
"5m": 300,
|
"5m": 300,
|
||||||
@@ -16,7 +16,7 @@ export const namedCacheTimeMap: Record<NamedCacheTimes, number> = {
|
|||||||
max: ONE_DAY_IN_SECONDS * 30,
|
max: ONE_DAY_IN_SECONDS * 30,
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export const namedCacheTimes = [
|
const _namedCacheTimes = [
|
||||||
"no cache",
|
"no cache",
|
||||||
"1m",
|
"1m",
|
||||||
"5m",
|
"5m",
|
||||||
@@ -29,7 +29,7 @@ export const namedCacheTimes = [
|
|||||||
"max",
|
"max",
|
||||||
] as const
|
] as const
|
||||||
|
|
||||||
export type NamedCacheTimes = (typeof namedCacheTimes)[number]
|
type NamedCacheTimes = (typeof _namedCacheTimes)[number]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the cache time in seconds based on the given cache time.
|
* Retrieves the cache time in seconds based on the given cache time.
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export type CacheOrGetOptions = {
|
|||||||
includeGitHashInKey?: boolean
|
includeGitHashInKey?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export function defaultCacheOrGetOptions(
|
function defaultCacheOrGetOptions(
|
||||||
opts: CacheOrGetOptions = {}
|
opts: CacheOrGetOptions = {}
|
||||||
): CacheOrGetOptions {
|
): CacheOrGetOptions {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
"./constants/rateType": "./constants/rateType.ts",
|
"./constants/rateType": "./constants/rateType.ts",
|
||||||
"./constants/routes/*": "./constants/routes/*.ts",
|
"./constants/routes/*": "./constants/routes/*.ts",
|
||||||
"./constants/sessionKeys": "./constants/sessionKeys.ts",
|
"./constants/sessionKeys": "./constants/sessionKeys.ts",
|
||||||
"./constants/sidepeekContent": "./constants/sidepeekContent.ts",
|
|
||||||
"./constants/signatureHotels": "./constants/signatureHotels.ts",
|
"./constants/signatureHotels": "./constants/signatureHotels.ts",
|
||||||
"./constants/transactionType": "./constants/transactionType.ts",
|
"./constants/transactionType": "./constants/transactionType.ts",
|
||||||
"./dataCache": "./dataCache/index.ts",
|
"./dataCache": "./dataCache/index.ts",
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { cva } from "class-variance-authority"
|
import { cva } from "class-variance-authority"
|
||||||
|
|
||||||
import { deepmerge } from "deepmerge-ts"
|
|
||||||
import styles from "./chip-button.module.css"
|
import styles from "./chip-button.module.css"
|
||||||
import { config as typographyConfig } from "../Typography/variants"
|
import { config as typographyConfig } from "../Typography/variants"
|
||||||
|
|
||||||
@@ -106,14 +105,3 @@ export const config = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const variants = cva(styles.chip, config)
|
export const variants = cva(styles.chip, config)
|
||||||
|
|
||||||
const chipConfig = {
|
|
||||||
variants: {
|
|
||||||
...config.variants,
|
|
||||||
},
|
|
||||||
defaultVariants: config.defaultVariants,
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export function withChipButton<T>(config: T) {
|
|
||||||
return deepmerge(chipConfig, config)
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { cva } from "class-variance-authority"
|
|||||||
|
|
||||||
import styles from "./chip-static.module.css"
|
import styles from "./chip-static.module.css"
|
||||||
|
|
||||||
export const config = {
|
const config = {
|
||||||
variants: {
|
variants: {
|
||||||
color: {
|
color: {
|
||||||
Subtle: styles["color-subtle"],
|
Subtle: styles["color-subtle"],
|
||||||
|
|||||||
@@ -16,6 +16,3 @@ export type CountryProps = {
|
|||||||
disabled?: boolean
|
disabled?: boolean
|
||||||
registerOptions?: RegisterOptions
|
registerOptions?: RegisterOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CountryPortalContainer = HTMLDivElement | undefined
|
|
||||||
export type CountryPortalContainerArgs = HTMLDivElement | null
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { Lang } from "@scandic-hotels/common/constants/language"
|
|||||||
import type { RegisterOptions } from "react-hook-form"
|
import type { RegisterOptions } from "react-hook-form"
|
||||||
|
|
||||||
export const enum DateName {
|
export const enum DateName {
|
||||||
date = "date",
|
|
||||||
day = "day",
|
day = "day",
|
||||||
month = "month",
|
month = "month",
|
||||||
year = "year",
|
year = "year",
|
||||||
|
|||||||
@@ -96,6 +96,3 @@ export const FormTextArea = forwardRef<HTMLTextAreaElement, FormTextAreaProps>(
|
|||||||
)
|
)
|
||||||
|
|
||||||
FormTextArea.displayName = "FormTextArea"
|
FormTextArea.displayName = "FormTextArea"
|
||||||
|
|
||||||
// Default export for backwards compatibility
|
|
||||||
export default FormTextArea
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { cva } from "class-variance-authority"
|
|||||||
|
|
||||||
import styles from "./imageCounter.module.css"
|
import styles from "./imageCounter.module.css"
|
||||||
|
|
||||||
export const config = {
|
const config = {
|
||||||
variants: {
|
variants: {
|
||||||
size: {
|
size: {
|
||||||
Large: styles.large,
|
Large: styles.large,
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
import type { Lang } from "@scandic-hotels/common/constants/language"
|
import type { RTEItemType } from "./enums"
|
||||||
|
|
||||||
import type { EmbedTypesEnum, RTEItemType, RTEItemTypeEnum } from "./enums"
|
|
||||||
|
|
||||||
export interface Attributes {
|
export interface Attributes {
|
||||||
[key: string]: unknown
|
[key: string]: unknown
|
||||||
@@ -9,47 +7,7 @@ export interface Attributes {
|
|||||||
style?: { [key: string]: unknown } | undefined
|
style?: { [key: string]: unknown } | undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RTEAssetAttrs extends Attributes {
|
|
||||||
alt: string
|
|
||||||
"asset-alt": string
|
|
||||||
"asset-link": string
|
|
||||||
"asset-name": string
|
|
||||||
"asset-type": "image/png" | "image/jpg" | "image/jpeg"
|
|
||||||
"asset-uid": string
|
|
||||||
"display-type": EmbedTypesEnum.display
|
|
||||||
"content-type-uid": "sys_assets"
|
|
||||||
inline: false
|
|
||||||
type: RTEItemTypeEnum.asset
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RTEAnchorAttrs extends Attributes {
|
export interface RTEAnchorAttrs extends Attributes {
|
||||||
target: string
|
target: string
|
||||||
url: string
|
url: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RTELinkAttrs extends Attributes {
|
|
||||||
"display-type": EmbedTypesEnum.link
|
|
||||||
"class-name": string
|
|
||||||
"content-type-uid": string
|
|
||||||
"entry-uid": string
|
|
||||||
locale: Lang
|
|
||||||
href: string
|
|
||||||
target: HTMLAnchorElement["target"]
|
|
||||||
type: RTEItemTypeEnum.entry
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RTEImageVaultAttrs extends Attributes {
|
|
||||||
height: string
|
|
||||||
// style: string[]
|
|
||||||
width: string
|
|
||||||
id: number
|
|
||||||
title: string
|
|
||||||
url: string
|
|
||||||
dimensions: {
|
|
||||||
width: number
|
|
||||||
height: number
|
|
||||||
aspectRatio: number
|
|
||||||
}
|
|
||||||
meta: { alt: string | undefined | null; caption: string | undefined | null }
|
|
||||||
focalPoint: { x: number; y: number }
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,13 +1,3 @@
|
|||||||
export enum EmbedTypesEnum {
|
|
||||||
block = "block",
|
|
||||||
display = "display",
|
|
||||||
download = "download",
|
|
||||||
inline = "inline",
|
|
||||||
link = "link",
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EmbedTypes = keyof typeof EmbedTypesEnum
|
|
||||||
|
|
||||||
/** Copied from https://github.com/contentstack/contentstack-utils-javascript/blob/master/src/nodes/node-type.ts */
|
/** Copied from https://github.com/contentstack/contentstack-utils-javascript/blob/master/src/nodes/node-type.ts */
|
||||||
export enum RTETypeEnum {
|
export enum RTETypeEnum {
|
||||||
a = "a",
|
a = "a",
|
||||||
@@ -45,8 +35,6 @@ export enum RTETypeEnum {
|
|||||||
fragment = "fragment",
|
fragment = "fragment",
|
||||||
}
|
}
|
||||||
|
|
||||||
export type RTEType = keyof typeof RTETypeEnum
|
|
||||||
|
|
||||||
export enum RTEItemTypeEnum {
|
export enum RTEItemTypeEnum {
|
||||||
asset = "asset",
|
asset = "asset",
|
||||||
entry = "entry",
|
entry = "entry",
|
||||||
|
|||||||
@@ -5,12 +5,7 @@ import {
|
|||||||
ImageVaultAssetResponse,
|
ImageVaultAssetResponse,
|
||||||
} from "@scandic-hotels/common/utils/imageVault"
|
} from "@scandic-hotels/common/utils/imageVault"
|
||||||
import type { EmbedByUid } from "../../JsonToHtml"
|
import type { EmbedByUid } from "../../JsonToHtml"
|
||||||
import type {
|
import type { Attributes, RTEAnchorAttrs } from "./attrs"
|
||||||
Attributes,
|
|
||||||
RTEAnchorAttrs,
|
|
||||||
RTEAssetAttrs,
|
|
||||||
RTELinkAttrs,
|
|
||||||
} from "./attrs"
|
|
||||||
import type { RTETypeEnum } from "./enums"
|
import type { RTETypeEnum } from "./enums"
|
||||||
import type { RenderOptions } from "./option"
|
import type { RenderOptions } from "./option"
|
||||||
|
|
||||||
@@ -21,26 +16,11 @@ export interface RTEDefaultNode {
|
|||||||
uid: string
|
uid: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RTELinkNode {
|
interface RTEAnchorNode extends RTEDefaultNode {
|
||||||
attrs: Attributes
|
|
||||||
children: RTENode[]
|
|
||||||
type: RTETypeEnum
|
|
||||||
uid: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RTEReferenceAssetNode extends RTEDefaultNode {
|
|
||||||
attrs: RTEAssetAttrs
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RTEAnchorNode extends RTEDefaultNode {
|
|
||||||
attrs: RTEAnchorAttrs
|
attrs: RTEAnchorAttrs
|
||||||
type: RTETypeEnum.a
|
type: RTETypeEnum.a
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RTEReferenceLinkNode extends RTEDefaultNode {
|
|
||||||
attrs: RTELinkAttrs
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RTEImageVaultNode extends RTEDefaultNode {
|
export interface RTEImageVaultNode extends RTEDefaultNode {
|
||||||
attrs: Attributes &
|
attrs: Attributes &
|
||||||
(DeprecatedImageVaultAssetResponse | ImageVaultAssetResponse)
|
(DeprecatedImageVaultAssetResponse | ImageVaultAssetResponse)
|
||||||
@@ -73,7 +53,7 @@ export type RTERegularNode = RTEDefaultNode | RTEAnchorNode | RTEImageVaultNode
|
|||||||
|
|
||||||
export type RTEImageNode = RTEDefaultNode | RTEImageVaultNode
|
export type RTEImageNode = RTEDefaultNode | RTEImageVaultNode
|
||||||
|
|
||||||
export type RTEReferenceNode = RTEAnchorNode
|
type RTEReferenceNode = RTEAnchorNode
|
||||||
|
|
||||||
export type RTENode = RTERegularNode | RTEReferenceNode | RTETextNode
|
export type RTENode = RTERegularNode | RTEReferenceNode | RTETextNode
|
||||||
|
|
||||||
@@ -83,11 +63,6 @@ export type RTERenderMark = (
|
|||||||
id?: string
|
id?: string
|
||||||
) => JSX.Element
|
) => JSX.Element
|
||||||
|
|
||||||
export interface RTEDocument extends RTEDefaultNode {
|
|
||||||
type: RTETypeEnum.doc
|
|
||||||
_version: number
|
|
||||||
}
|
|
||||||
|
|
||||||
export type RTERenderOptionComponent = (
|
export type RTERenderOptionComponent = (
|
||||||
node: RTERegularNode,
|
node: RTERegularNode,
|
||||||
embeds: EmbedByUid,
|
embeds: EmbedByUid,
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import {
|
|||||||
} from "./types/rte/node"
|
} from "./types/rte/node"
|
||||||
import type { RenderOptions } from "./types/rte/option"
|
import type { RenderOptions } from "./types/rte/option"
|
||||||
|
|
||||||
export function groupEmbedsByUid(embedsArray: Node<Embeds>[]) {
|
function groupEmbedsByUid(embedsArray: Node<Embeds>[]) {
|
||||||
const embedsByUid = embedsArray.reduce<EmbedByUid>((acc, embed) => {
|
const embedsByUid = embedsArray.reduce<EmbedByUid>((acc, embed) => {
|
||||||
if ("system" in embed.node && embed.node.system?.uid) {
|
if ("system" in embed.node && embed.node.system?.uid) {
|
||||||
acc[embed.node.system.uid] = embed
|
acc[embed.node.system.uid] = embed
|
||||||
@@ -29,7 +29,7 @@ export function groupEmbedsByUid(embedsArray: Node<Embeds>[]) {
|
|||||||
return embedsByUid
|
return embedsByUid
|
||||||
}
|
}
|
||||||
|
|
||||||
export function nodeChildrenToHtml(
|
function nodeChildrenToHtml(
|
||||||
nodes: RTENode[],
|
nodes: RTENode[],
|
||||||
embeds: EmbedByUid,
|
embeds: EmbedByUid,
|
||||||
fullRenderOptions: RenderOptions
|
fullRenderOptions: RenderOptions
|
||||||
@@ -51,10 +51,7 @@ export function nodeChildrenToHtml(
|
|||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function textNodeToHtml(
|
function textNodeToHtml(node: RTETextNode, fullRenderOptions: RenderOptions) {
|
||||||
node: RTETextNode,
|
|
||||||
fullRenderOptions: RenderOptions
|
|
||||||
) {
|
|
||||||
let text = <>{node.text}</>
|
let text = <>{node.text}</>
|
||||||
|
|
||||||
if (node.classname || node.id) {
|
if (node.classname || node.id) {
|
||||||
@@ -116,7 +113,7 @@ export function extractAvailableListClassNames(className?: string) {
|
|||||||
.map((item) => styles[item] || item)
|
.map((item) => styles[item] || item)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function nodeToHtml(
|
function nodeToHtml(
|
||||||
node: RTENode,
|
node: RTENode,
|
||||||
embeds: EmbedByUid,
|
embeds: EmbedByUid,
|
||||||
fullRenderOptions: RenderOptions
|
fullRenderOptions: RenderOptions
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
import { useMemo } from "react"
|
import { useMemo } from "react"
|
||||||
import { LightboxImage } from ".."
|
import { LightboxImage } from ".."
|
||||||
|
|
||||||
export const THUMBNAIL_WINDOW = 5
|
const THUMBNAIL_WINDOW = 5
|
||||||
export const THUMBNAIL_OFFSET = Math.ceil(THUMBNAIL_WINDOW / 2)
|
const THUMBNAIL_OFFSET = Math.ceil(THUMBNAIL_WINDOW / 2)
|
||||||
|
|
||||||
interface useThumbnailProps {
|
interface useThumbnailProps {
|
||||||
images: LightboxImage[]
|
images: LightboxImage[]
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { PoiMarker } from "../../Markers/PoiMarker"
|
|||||||
import styles from "./poiMapMarkers.module.css"
|
import styles from "./poiMapMarkers.module.css"
|
||||||
import { MarkerInfo, PointOfInterest } from "../../types"
|
import { MarkerInfo, PointOfInterest } from "../../types"
|
||||||
|
|
||||||
export type PoiMapMarkersProps = {
|
type PoiMapMarkersProps = {
|
||||||
activePoi?: string | null
|
activePoi?: string | null
|
||||||
coordinates: { lat: number; lng: number }
|
coordinates: { lat: number; lng: number }
|
||||||
onActivePoiChange?: (poiName: string | null) => void
|
onActivePoiChange?: (poiName: string | null) => void
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { cva } from "class-variance-authority"
|
|||||||
|
|
||||||
import styles from "./radio.module.css"
|
import styles from "./radio.module.css"
|
||||||
|
|
||||||
export const config = {
|
const config = {
|
||||||
variants: {
|
variants: {
|
||||||
color: {
|
color: {
|
||||||
Burgundy: styles["color-burgundy"],
|
Burgundy: styles["color-burgundy"],
|
||||||
|
|||||||
@@ -21,16 +21,3 @@ export const slideInOut = {
|
|||||||
transition: { duration: 0.4, ease: "easeInOut" },
|
transition: { duration: 0.4, ease: "easeInOut" },
|
||||||
},
|
},
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export const slideFromTop = {
|
|
||||||
hidden: {
|
|
||||||
opacity: 0,
|
|
||||||
y: -32,
|
|
||||||
transition: { duration: 0.4, ease: "easeInOut" },
|
|
||||||
},
|
|
||||||
visible: {
|
|
||||||
opacity: 1,
|
|
||||||
y: 0,
|
|
||||||
transition: { duration: 0.4, ease: "easeInOut" },
|
|
||||||
},
|
|
||||||
} as const
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { cva } from "class-variance-authority"
|
|||||||
|
|
||||||
import styles from "./rate-card.module.css"
|
import styles from "./rate-card.module.css"
|
||||||
|
|
||||||
export const config = {
|
const config = {
|
||||||
variants: {
|
variants: {
|
||||||
variant: {
|
variant: {
|
||||||
Regular: styles["variant-regular"],
|
Regular: styles["variant-regular"],
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import {
|
|||||||
withTypography,
|
withTypography,
|
||||||
} from "../Typography/variants"
|
} from "../Typography/variants"
|
||||||
|
|
||||||
import { deepmerge } from "deepmerge-ts"
|
|
||||||
import styles from "./textLink.module.css"
|
import styles from "./textLink.module.css"
|
||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
@@ -33,7 +32,3 @@ const textLinkConfig = {
|
|||||||
} as const
|
} as const
|
||||||
|
|
||||||
export const variants = cva(styles.textLink, withTypography(textLinkConfig))
|
export const variants = cva(styles.textLink, withTypography(textLinkConfig))
|
||||||
|
|
||||||
export function withTextLink<T>(config: T) {
|
|
||||||
return deepmerge(textLinkConfig, config)
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ export const GlobalAccordionBlock = gql`
|
|||||||
${PromoCampaignPageLink}
|
${PromoCampaignPageLink}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const GlobalAccordion_AccountPage = gql`
|
const GlobalAccordion_AccountPage = gql`
|
||||||
fragment GlobalAccordion_AccountPage on AccountPageContentAccordionBlockAccordionsGlobalAccordion {
|
fragment GlobalAccordion_AccountPage on AccountPageContentAccordionBlockAccordionsGlobalAccordion {
|
||||||
__typename
|
__typename
|
||||||
global_accordion {
|
global_accordion {
|
||||||
@@ -134,7 +134,7 @@ export const GlobalAccordion_AccountPage = gql`
|
|||||||
${AccordionBlock}
|
${AccordionBlock}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const SpecificAccordion_AccountPage = gql`
|
const SpecificAccordion_AccountPage = gql`
|
||||||
fragment SpecificAccordion_AccountPage on AccountPageContentAccordionBlockAccordionsSpecificAccordion {
|
fragment SpecificAccordion_AccountPage on AccountPageContentAccordionBlockAccordionsSpecificAccordion {
|
||||||
__typename
|
__typename
|
||||||
specific_accordion {
|
specific_accordion {
|
||||||
@@ -196,7 +196,7 @@ export const Accordion_AccountPage = gql`
|
|||||||
${SpecificAccordion_AccountPage}
|
${SpecificAccordion_AccountPage}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const GlobalAccordion_AccountPageRefs = gql`
|
const GlobalAccordion_AccountPageRefs = gql`
|
||||||
fragment GlobalAccordion_AccountPageRefs on AccountPageContentAccordionBlockAccordionsGlobalAccordion {
|
fragment GlobalAccordion_AccountPageRefs on AccountPageContentAccordionBlockAccordionsGlobalAccordion {
|
||||||
global_accordion {
|
global_accordion {
|
||||||
global_accordionConnection {
|
global_accordionConnection {
|
||||||
@@ -211,7 +211,7 @@ export const GlobalAccordion_AccountPageRefs = gql`
|
|||||||
${AccordionBlockRefs}
|
${AccordionBlockRefs}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const SpecificAccordion_AccountPageRefs = gql`
|
const SpecificAccordion_AccountPageRefs = gql`
|
||||||
fragment SpecificAccordion_AccountPageRefs on AccountPageContentAccordionBlockAccordionsSpecificAccordion {
|
fragment SpecificAccordion_AccountPageRefs on AccountPageContentAccordionBlockAccordionsSpecificAccordion {
|
||||||
specific_accordion {
|
specific_accordion {
|
||||||
questions {
|
questions {
|
||||||
@@ -266,7 +266,7 @@ export const Accordion_AccountPageRefs = gql`
|
|||||||
${SpecificAccordion_AccountPageRefs}
|
${SpecificAccordion_AccountPageRefs}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const GlobalAccordion_ContentPage = gql`
|
const GlobalAccordion_ContentPage = gql`
|
||||||
fragment GlobalAccordion_ContentPage on ContentPageBlocksAccordionBlockAccordionsGlobalAccordion {
|
fragment GlobalAccordion_ContentPage on ContentPageBlocksAccordionBlockAccordionsGlobalAccordion {
|
||||||
__typename
|
__typename
|
||||||
global_accordion {
|
global_accordion {
|
||||||
@@ -282,7 +282,7 @@ export const GlobalAccordion_ContentPage = gql`
|
|||||||
${AccordionBlock}
|
${AccordionBlock}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const SpecificAccordion_ContentPage = gql`
|
const SpecificAccordion_ContentPage = gql`
|
||||||
fragment SpecificAccordion_ContentPage on ContentPageBlocksAccordionBlockAccordionsSpecificAccordion {
|
fragment SpecificAccordion_ContentPage on ContentPageBlocksAccordionBlockAccordionsSpecificAccordion {
|
||||||
__typename
|
__typename
|
||||||
specific_accordion {
|
specific_accordion {
|
||||||
@@ -345,7 +345,7 @@ export const Accordion_ContentPage = gql`
|
|||||||
${SpecificAccordion_ContentPage}
|
${SpecificAccordion_ContentPage}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const GlobalAccordion_ContentPageRefs = gql`
|
const GlobalAccordion_ContentPageRefs = gql`
|
||||||
fragment GlobalAccordion_ContentPageRefs on ContentPageBlocksAccordionBlockAccordionsGlobalAccordion {
|
fragment GlobalAccordion_ContentPageRefs on ContentPageBlocksAccordionBlockAccordionsGlobalAccordion {
|
||||||
global_accordion {
|
global_accordion {
|
||||||
global_accordionConnection {
|
global_accordionConnection {
|
||||||
@@ -361,7 +361,7 @@ export const GlobalAccordion_ContentPageRefs = gql`
|
|||||||
${AccordionBlockRefs}
|
${AccordionBlockRefs}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const SpecificAccordion_ContentPageRefs = gql`
|
const SpecificAccordion_ContentPageRefs = gql`
|
||||||
fragment SpecificAccordion_ContentPageRefs on ContentPageBlocksAccordionBlockAccordionsSpecificAccordion {
|
fragment SpecificAccordion_ContentPageRefs on ContentPageBlocksAccordionBlockAccordionsSpecificAccordion {
|
||||||
specific_accordion {
|
specific_accordion {
|
||||||
questions {
|
questions {
|
||||||
@@ -404,7 +404,7 @@ export const SpecificAccordion_ContentPageRefs = gql`
|
|||||||
${PromoCampaignPageRef}
|
${PromoCampaignPageRef}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const GlobalAccordion_DestinationCityPage = gql`
|
const GlobalAccordion_DestinationCityPage = gql`
|
||||||
fragment GlobalAccordion_DestinationCityPage on DestinationCityPageBlocksAccordionBlockAccordionsGlobalAccordion {
|
fragment GlobalAccordion_DestinationCityPage on DestinationCityPageBlocksAccordionBlockAccordionsGlobalAccordion {
|
||||||
__typename
|
__typename
|
||||||
global_accordion {
|
global_accordion {
|
||||||
@@ -420,7 +420,7 @@ export const GlobalAccordion_DestinationCityPage = gql`
|
|||||||
${AccordionBlock}
|
${AccordionBlock}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const SpecificAccordion_DestinationCityPage = gql`
|
const SpecificAccordion_DestinationCityPage = gql`
|
||||||
fragment SpecificAccordion_DestinationCityPage on DestinationCityPageBlocksAccordionBlockAccordionsSpecificAccordion {
|
fragment SpecificAccordion_DestinationCityPage on DestinationCityPageBlocksAccordionBlockAccordionsSpecificAccordion {
|
||||||
__typename
|
__typename
|
||||||
specific_accordion {
|
specific_accordion {
|
||||||
@@ -467,7 +467,7 @@ export const SpecificAccordion_DestinationCityPage = gql`
|
|||||||
${PromoCampaignPageLink}
|
${PromoCampaignPageLink}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const GlobalAccordion_DestinationCityPageRefs = gql`
|
const GlobalAccordion_DestinationCityPageRefs = gql`
|
||||||
fragment GlobalAccordion_DestinationCityPageRefs on DestinationCityPageBlocksAccordionBlockAccordionsGlobalAccordion {
|
fragment GlobalAccordion_DestinationCityPageRefs on DestinationCityPageBlocksAccordionBlockAccordionsGlobalAccordion {
|
||||||
global_accordion {
|
global_accordion {
|
||||||
global_accordionConnection {
|
global_accordionConnection {
|
||||||
@@ -496,7 +496,7 @@ export const Accordion_ContentPageRefs = gql`
|
|||||||
${SpecificAccordion_ContentPageRefs}
|
${SpecificAccordion_ContentPageRefs}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const SpecificAccordion_DestinationCityPageRefs = gql`
|
const SpecificAccordion_DestinationCityPageRefs = gql`
|
||||||
fragment SpecificAccordion_DestinationCityPageRefs on DestinationCityPageBlocksAccordionBlockAccordionsSpecificAccordion {
|
fragment SpecificAccordion_DestinationCityPageRefs on DestinationCityPageBlocksAccordionBlockAccordionsSpecificAccordion {
|
||||||
specific_accordion {
|
specific_accordion {
|
||||||
questions {
|
questions {
|
||||||
@@ -551,7 +551,7 @@ export const Accordion_DestinationCityPageRefs = gql`
|
|||||||
${SpecificAccordion_DestinationCityPageRefs}
|
${SpecificAccordion_DestinationCityPageRefs}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const GlobalAccordion_DestinationCountryPage = gql`
|
const GlobalAccordion_DestinationCountryPage = gql`
|
||||||
fragment GlobalAccordion_DestinationCountryPage on DestinationCountryPageBlocksAccordionBlockAccordionsGlobalAccordion {
|
fragment GlobalAccordion_DestinationCountryPage on DestinationCountryPageBlocksAccordionBlockAccordionsGlobalAccordion {
|
||||||
__typename
|
__typename
|
||||||
global_accordion {
|
global_accordion {
|
||||||
@@ -567,7 +567,7 @@ export const GlobalAccordion_DestinationCountryPage = gql`
|
|||||||
${AccordionBlock}
|
${AccordionBlock}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const SpecificAccordion_DestinationCountryPage = gql`
|
const SpecificAccordion_DestinationCountryPage = gql`
|
||||||
fragment SpecificAccordion_DestinationCountryPage on DestinationCountryPageBlocksAccordionBlockAccordionsSpecificAccordion {
|
fragment SpecificAccordion_DestinationCountryPage on DestinationCountryPageBlocksAccordionBlockAccordionsSpecificAccordion {
|
||||||
__typename
|
__typename
|
||||||
specific_accordion {
|
specific_accordion {
|
||||||
@@ -630,7 +630,7 @@ export const Accordion_DestinationCountryPage = gql`
|
|||||||
${SpecificAccordion_DestinationCountryPage}
|
${SpecificAccordion_DestinationCountryPage}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const GlobalAccordion_DestinationCountryPageRefs = gql`
|
const GlobalAccordion_DestinationCountryPageRefs = gql`
|
||||||
fragment GlobalAccordion_DestinationCountryPageRefs on DestinationCountryPageBlocksAccordionBlockAccordionsGlobalAccordion {
|
fragment GlobalAccordion_DestinationCountryPageRefs on DestinationCountryPageBlocksAccordionBlockAccordionsGlobalAccordion {
|
||||||
global_accordion {
|
global_accordion {
|
||||||
global_accordionConnection {
|
global_accordionConnection {
|
||||||
@@ -645,7 +645,7 @@ export const GlobalAccordion_DestinationCountryPageRefs = gql`
|
|||||||
${AccordionBlockRefs}
|
${AccordionBlockRefs}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const SpecificAccordion_DestinationCountryPageRefs = gql`
|
const SpecificAccordion_DestinationCountryPageRefs = gql`
|
||||||
fragment SpecificAccordion_DestinationCountryPageRefs on DestinationCountryPageBlocksAccordionBlockAccordionsSpecificAccordion {
|
fragment SpecificAccordion_DestinationCountryPageRefs on DestinationCountryPageBlocksAccordionBlockAccordionsSpecificAccordion {
|
||||||
specific_accordion {
|
specific_accordion {
|
||||||
questions {
|
questions {
|
||||||
@@ -701,7 +701,7 @@ export const Accordion_DestinationCountryPageRefs = gql`
|
|||||||
${SpecificAccordion_DestinationCountryPageRefs}
|
${SpecificAccordion_DestinationCountryPageRefs}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const GlobalAccordion_CampaignPage = gql`
|
const GlobalAccordion_CampaignPage = gql`
|
||||||
fragment GlobalAccordion_CampaignPage on CampaignPageBlocksAccordionBlockAccordionsGlobalAccordion {
|
fragment GlobalAccordion_CampaignPage on CampaignPageBlocksAccordionBlockAccordionsGlobalAccordion {
|
||||||
__typename
|
__typename
|
||||||
global_accordion {
|
global_accordion {
|
||||||
@@ -717,7 +717,7 @@ export const GlobalAccordion_CampaignPage = gql`
|
|||||||
${AccordionBlock}
|
${AccordionBlock}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const SpecificAccordion_CampaignPage = gql`
|
const SpecificAccordion_CampaignPage = gql`
|
||||||
fragment SpecificAccordion_CampaignPage on CampaignPageBlocksAccordionBlockAccordionsSpecificAccordion {
|
fragment SpecificAccordion_CampaignPage on CampaignPageBlocksAccordionBlockAccordionsSpecificAccordion {
|
||||||
__typename
|
__typename
|
||||||
specific_accordion {
|
specific_accordion {
|
||||||
@@ -779,7 +779,7 @@ export const Accordion_CampaignPage = gql`
|
|||||||
${SpecificAccordion_CampaignPage}
|
${SpecificAccordion_CampaignPage}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const GlobalAccordion_CampaignPageRefs = gql`
|
const GlobalAccordion_CampaignPageRefs = gql`
|
||||||
fragment GlobalAccordion_CampaignPageRefs on CampaignPageBlocksAccordionBlockAccordionsGlobalAccordion {
|
fragment GlobalAccordion_CampaignPageRefs on CampaignPageBlocksAccordionBlockAccordionsGlobalAccordion {
|
||||||
global_accordion {
|
global_accordion {
|
||||||
global_accordionConnection {
|
global_accordionConnection {
|
||||||
@@ -794,7 +794,7 @@ export const GlobalAccordion_CampaignPageRefs = gql`
|
|||||||
${AccordionBlockRefs}
|
${AccordionBlockRefs}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const SpecificAccordion_CampaignPageRefs = gql`
|
const SpecificAccordion_CampaignPageRefs = gql`
|
||||||
fragment SpecificAccordion_CampaignPageRefs on CampaignPageBlocksAccordionBlockAccordionsSpecificAccordion {
|
fragment SpecificAccordion_CampaignPageRefs on CampaignPageBlocksAccordionBlockAccordionsSpecificAccordion {
|
||||||
specific_accordion {
|
specific_accordion {
|
||||||
questions {
|
questions {
|
||||||
@@ -849,7 +849,7 @@ export const Accordion_CampaignPageRefs = gql`
|
|||||||
${SpecificAccordion_CampaignPageRefs}
|
${SpecificAccordion_CampaignPageRefs}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const GlobalAccordion_DestinationFilterBlocks = gql`
|
const GlobalAccordion_DestinationFilterBlocks = gql`
|
||||||
fragment GlobalAccordion_DestinationFilterBlocks on DestinationFilterBlocksAccordionBlockAccordionsGlobalAccordion {
|
fragment GlobalAccordion_DestinationFilterBlocks on DestinationFilterBlocksAccordionBlockAccordionsGlobalAccordion {
|
||||||
__typename
|
__typename
|
||||||
global_accordion {
|
global_accordion {
|
||||||
@@ -865,7 +865,7 @@ export const GlobalAccordion_DestinationFilterBlocks = gql`
|
|||||||
${AccordionBlock}
|
${AccordionBlock}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const SpecificAccordion_DestinationFilterBlocks = gql`
|
const SpecificAccordion_DestinationFilterBlocks = gql`
|
||||||
fragment SpecificAccordion_DestinationFilterBlocks on DestinationFilterBlocksAccordionBlockAccordionsSpecificAccordion {
|
fragment SpecificAccordion_DestinationFilterBlocks on DestinationFilterBlocksAccordionBlockAccordionsSpecificAccordion {
|
||||||
__typename
|
__typename
|
||||||
specific_accordion {
|
specific_accordion {
|
||||||
@@ -927,7 +927,7 @@ export const Accordion_DestinationFilterBlocks = gql`
|
|||||||
${SpecificAccordion_DestinationFilterBlocks}
|
${SpecificAccordion_DestinationFilterBlocks}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const GlobalAccordion_DestinationFilterBlocksRefs = gql`
|
const GlobalAccordion_DestinationFilterBlocksRefs = gql`
|
||||||
fragment GlobalAccordion_DestinationFilterBlocksRefs on DestinationFilterBlocksAccordionBlockAccordionsGlobalAccordion {
|
fragment GlobalAccordion_DestinationFilterBlocksRefs on DestinationFilterBlocksAccordionBlockAccordionsGlobalAccordion {
|
||||||
global_accordion {
|
global_accordion {
|
||||||
global_accordionConnection {
|
global_accordionConnection {
|
||||||
@@ -942,7 +942,7 @@ export const GlobalAccordion_DestinationFilterBlocksRefs = gql`
|
|||||||
${AccordionBlockRefs}
|
${AccordionBlockRefs}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const SpecificAccordion_DestinationFilterBlocksRefs = gql`
|
const SpecificAccordion_DestinationFilterBlocksRefs = gql`
|
||||||
fragment SpecificAccordion_DestinationFilterBlocksRefs on DestinationFilterBlocksAccordionBlockAccordionsSpecificAccordion {
|
fragment SpecificAccordion_DestinationFilterBlocksRefs on DestinationFilterBlocksAccordionBlockAccordionsSpecificAccordion {
|
||||||
specific_accordion {
|
specific_accordion {
|
||||||
questions {
|
questions {
|
||||||
@@ -997,7 +997,7 @@ export const Accordion_DestinationFilterBlocksRefs = gql`
|
|||||||
${SpecificAccordion_DestinationFilterBlocksRefs}
|
${SpecificAccordion_DestinationFilterBlocksRefs}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const GlobalAccordion_PromoCampaignPage = gql`
|
const GlobalAccordion_PromoCampaignPage = gql`
|
||||||
fragment GlobalAccordion_PromoCampaignPage on PromoCampaignPageBlocksAccordionBlockAccordionsGlobalAccordion {
|
fragment GlobalAccordion_PromoCampaignPage on PromoCampaignPageBlocksAccordionBlockAccordionsGlobalAccordion {
|
||||||
__typename
|
__typename
|
||||||
global_accordion {
|
global_accordion {
|
||||||
@@ -1013,7 +1013,7 @@ export const GlobalAccordion_PromoCampaignPage = gql`
|
|||||||
${AccordionBlock}
|
${AccordionBlock}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const SpecificAccordion_PromoCampaignPage = gql`
|
const SpecificAccordion_PromoCampaignPage = gql`
|
||||||
fragment SpecificAccordion_PromoCampaignPage on PromoCampaignPageBlocksAccordionBlockAccordionsSpecificAccordion {
|
fragment SpecificAccordion_PromoCampaignPage on PromoCampaignPageBlocksAccordionBlockAccordionsSpecificAccordion {
|
||||||
__typename
|
__typename
|
||||||
specific_accordion {
|
specific_accordion {
|
||||||
@@ -1074,7 +1074,7 @@ export const Accordion_PromoCampaignPage = gql`
|
|||||||
${SpecificAccordion_PromoCampaignPage}
|
${SpecificAccordion_PromoCampaignPage}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const GlobalAccordion_PromoCampaignPageRefs = gql`
|
const GlobalAccordion_PromoCampaignPageRefs = gql`
|
||||||
fragment GlobalAccordion_PromoCampaignPageRefs on PromoCampaignPageBlocksAccordionBlockAccordionsGlobalAccordion {
|
fragment GlobalAccordion_PromoCampaignPageRefs on PromoCampaignPageBlocksAccordionBlockAccordionsGlobalAccordion {
|
||||||
global_accordion {
|
global_accordion {
|
||||||
global_accordionConnection {
|
global_accordionConnection {
|
||||||
@@ -1089,7 +1089,7 @@ export const GlobalAccordion_PromoCampaignPageRefs = gql`
|
|||||||
${AccordionBlockRefs}
|
${AccordionBlockRefs}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const SpecificAccordion_PromoCampaignPageRefs = gql`
|
const SpecificAccordion_PromoCampaignPageRefs = gql`
|
||||||
fragment SpecificAccordion_PromoCampaignPageRefs on PromoCampaignPageBlocksAccordionBlockAccordionsSpecificAccordion {
|
fragment SpecificAccordion_PromoCampaignPageRefs on PromoCampaignPageBlocksAccordionBlockAccordionsSpecificAccordion {
|
||||||
specific_accordion {
|
specific_accordion {
|
||||||
questions {
|
questions {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { gql } from "graphql-tag"
|
import { gql } from "graphql-tag"
|
||||||
|
|
||||||
export const HotelListing = gql`
|
const HotelListing = gql`
|
||||||
fragment HotelListing on HotelListing {
|
fragment HotelListing on HotelListing {
|
||||||
heading
|
heading
|
||||||
location_filter {
|
location_filter {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { gql } from "graphql-tag"
|
|||||||
import { System } from "../System.graphql"
|
import { System } from "../System.graphql"
|
||||||
import { Video, VideoRef } from "../Video.graphql"
|
import { Video, VideoRef } from "../Video.graphql"
|
||||||
|
|
||||||
export const VideoQuoteCard = gql`
|
const VideoQuoteCard = gql`
|
||||||
fragment VideoQuoteCard on VideoQuoteCard {
|
fragment VideoQuoteCard on VideoQuoteCard {
|
||||||
video {
|
video {
|
||||||
...Video
|
...Video
|
||||||
@@ -16,7 +16,7 @@ export const VideoQuoteCard = gql`
|
|||||||
${Video}
|
${Video}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const VideoTextCard = gql`
|
const VideoTextCard = gql`
|
||||||
fragment VideoTextCard on VideoTextCard {
|
fragment VideoTextCard on VideoTextCard {
|
||||||
video {
|
video {
|
||||||
...Video
|
...Video
|
||||||
@@ -85,7 +85,7 @@ export const VideoCard_StartPage = gql`
|
|||||||
${VideoTextCard}
|
${VideoTextCard}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const VideoQuoteCardRef = gql`
|
const VideoQuoteCardRef = gql`
|
||||||
fragment VideoQuoteCardRef on VideoQuoteCard {
|
fragment VideoQuoteCardRef on VideoQuoteCard {
|
||||||
video {
|
video {
|
||||||
...VideoRef
|
...VideoRef
|
||||||
@@ -98,7 +98,7 @@ export const VideoQuoteCardRef = gql`
|
|||||||
${System}
|
${System}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const VideoTextCardRef = gql`
|
const VideoTextCardRef = gql`
|
||||||
fragment VideoTextCardRef on VideoTextCard {
|
fragment VideoTextCardRef on VideoTextCard {
|
||||||
video {
|
video {
|
||||||
...VideoRef
|
...VideoRef
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import { StartPageLink } from "../PageLink/StartPageLink.graphql"
|
|||||||
import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql"
|
import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql"
|
||||||
import { StartPageRef } from "../StartPage/Ref.graphql"
|
import { StartPageRef } from "../StartPage/Ref.graphql"
|
||||||
|
|
||||||
export const ContactFields = gql`
|
const ContactFields = gql`
|
||||||
fragment ContactFields on ContactFields {
|
fragment ContactFields on ContactFields {
|
||||||
display_text
|
display_text
|
||||||
contact_field
|
contact_field
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ export const baseProcedure = procedure
|
|||||||
.use(durationMiddleware)
|
.use(durationMiddleware)
|
||||||
.use(sentryMiddleware)
|
.use(sentryMiddleware)
|
||||||
|
|
||||||
|
/** @alias */
|
||||||
export const publicProcedure = baseProcedure
|
export const publicProcedure = baseProcedure
|
||||||
|
|
||||||
export const languageProcedure = baseProcedure.use(async function (opts) {
|
export const languageProcedure = baseProcedure.use(async function (opts) {
|
||||||
@@ -53,6 +54,7 @@ export const languageProcedure = baseProcedure.use(async function (opts) {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/** @alias */
|
||||||
export const contentstackBaseProcedure = languageProcedure
|
export const contentstackBaseProcedure = languageProcedure
|
||||||
|
|
||||||
export const contentstackExtendedProcedureUID = contentstackBaseProcedure.use(
|
export const contentstackExtendedProcedureUID = contentstackBaseProcedure.use(
|
||||||
|
|||||||
Reference in New Issue
Block a user