Merge develop
This commit is contained in:
4
types/components/blocks/uspGrid.ts
Normal file
4
types/components/blocks/uspGrid.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import type { UspGrid } from "@/types/trpc/routers/contentstack/blocks"
|
||||
|
||||
export interface UspGridProps extends Pick<UspGrid, "usp_grid"> {}
|
||||
export type UspIcon = UspGrid["usp_grid"]["usp_card"][number]["icon"]
|
||||
@@ -5,8 +5,9 @@ export interface DropdownState {
|
||||
isHeaderLanguageSwitcherOpen: boolean
|
||||
isHeaderLanguageSwitcherMobileOpen: boolean
|
||||
isFooterLanguageSwitcherOpen: boolean
|
||||
openMegaMenu: string | false
|
||||
toggleMegaMenu: (menu: string | false) => void
|
||||
toggleDropdown: (dropdown: DropdownTypeEnum) => void
|
||||
handleHamburgerClick: () => void
|
||||
}
|
||||
|
||||
export enum DropdownTypeEnum {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
export enum AppDownLoadLinks {
|
||||
apple_da = "/_static/img/store-badges/app-store-badge-da.svg",
|
||||
apple_de = "/_static/img/store-badges/app-store-badge-de.svg",
|
||||
apple_en = "/_static/img/store-badges/app-store-badge-en.svg",
|
||||
apple_fi = "/_static/img/store-badges/app-store-badge-fi.svg",
|
||||
apple_no = "/_static/img/store-badges/app-store-badge-no.svg",
|
||||
apple_sv = "/_static/img/store-badges/app-store-badge-sv.svg",
|
||||
google_da = "/_static/img/store-badges/google-play-badge-da.svg",
|
||||
google_de = "/_static/img/store-badges/google-play-badge-de.svg",
|
||||
google_en = "/_static/img/store-badges/google-play-badge-en.svg",
|
||||
google_fi = "/_static/img/store-badges/google-play-badge-fi.svg",
|
||||
google_no = "/_static/img/store-badges/google-play-badge-no.svg",
|
||||
google_sv = "/_static/img/store-badges/google-play-badge-sv.svg",
|
||||
Apple_da = "/_static/img/store-badges/app-store-badge-da.svg",
|
||||
Apple_de = "/_static/img/store-badges/app-store-badge-de.svg",
|
||||
Apple_en = "/_static/img/store-badges/app-store-badge-en.svg",
|
||||
Apple_fi = "/_static/img/store-badges/app-store-badge-fi.svg",
|
||||
Apple_no = "/_static/img/store-badges/app-store-badge-no.svg",
|
||||
Apple_sv = "/_static/img/store-badges/app-store-badge-sv.svg",
|
||||
Google_da = "/_static/img/store-badges/google-play-badge-da.svg",
|
||||
Google_de = "/_static/img/store-badges/google-play-badge-de.svg",
|
||||
Google_en = "/_static/img/store-badges/google-play-badge-en.svg",
|
||||
Google_fi = "/_static/img/store-badges/google-play-badge-fi.svg",
|
||||
Google_no = "/_static/img/store-badges/google-play-badge-no.svg",
|
||||
Google_sv = "/_static/img/store-badges/google-play-badge-sv.svg",
|
||||
}
|
||||
|
||||
9
types/components/header/megaMenu.ts
Normal file
9
types/components/header/megaMenu.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import type { MenuItem } from "@/types/trpc/routers/contentstack/header"
|
||||
|
||||
export interface MegaMenuProps {
|
||||
title: MenuItem["title"]
|
||||
seeAllLink: MenuItem["seeAllLink"]
|
||||
submenu: MenuItem["submenu"]
|
||||
card: MenuItem["card"]
|
||||
isMobile: boolean
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import { navigationQueryRouter } from "@/server/routers/contentstack/myPages/navigation/query"
|
||||
|
||||
import { MembershipLevel } from "@/utils/user"
|
||||
import { FriendsMembership } from "@/utils/user"
|
||||
|
||||
import type { User } from "@/types/user"
|
||||
|
||||
@@ -11,7 +11,7 @@ type MyPagesNavigation = Awaited<
|
||||
export interface MyPagesMenuProps {
|
||||
navigation: MyPagesNavigation
|
||||
user: Pick<User, "firstName" | "lastName">
|
||||
membership?: MembershipLevel | null
|
||||
membership?: FriendsMembership | null
|
||||
}
|
||||
|
||||
export interface MyPagesMenuContentProps extends MyPagesMenuProps {
|
||||
|
||||
@@ -9,9 +9,11 @@ export interface IconProps
|
||||
export enum IconName {
|
||||
Accessibility = "Accessibility",
|
||||
AccountCircle = "AccountCircle",
|
||||
Airplane = "Airplane",
|
||||
ArrowRight = "ArrowRight",
|
||||
Bar = "Bar",
|
||||
Biking = "Biking",
|
||||
Business = "Business",
|
||||
Calendar = "Calendar",
|
||||
Camera = "Camera",
|
||||
Cellphone = "Cellphone",
|
||||
@@ -21,6 +23,7 @@ export enum IconName {
|
||||
ChevronDown = "ChevronDown",
|
||||
ChevronLeft = "ChevronLeft",
|
||||
ChevronRight = "ChevronRight",
|
||||
ChevronRightSmall = "ChevronRightSmall",
|
||||
Close = "Close",
|
||||
CloseLarge = "CloseLarge",
|
||||
Coffee = "Coffee",
|
||||
@@ -54,6 +57,7 @@ export enum IconName {
|
||||
Search = "Search",
|
||||
Service = "Service",
|
||||
Shopping = "Shopping",
|
||||
Snowflake = "Snowflake",
|
||||
StarFilled = "StarFilled",
|
||||
Train = "Train",
|
||||
Tripadvisor = "Tripadvisor",
|
||||
|
||||
@@ -2,7 +2,14 @@ import { poiVariants } from "@/components/Maps/Markers/Poi/variants"
|
||||
|
||||
import type { VariantProps } from "class-variance-authority"
|
||||
|
||||
import {
|
||||
PointOfInterestCategoryNameEnum,
|
||||
PointOfInterestGroupEnum,
|
||||
} from "@/types/hotel"
|
||||
|
||||
export interface PoiMarkerProps extends VariantProps<typeof poiVariants> {
|
||||
group: PointOfInterestGroupEnum
|
||||
categoryName?: PointOfInterestCategoryNameEnum
|
||||
size?: number
|
||||
className?: string
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { membershipLevels } from "@/constants/membershipLevels"
|
||||
import { MembershipLevel } from "@/constants/membershipLevels"
|
||||
|
||||
export type MembershipLevelProps = {
|
||||
level: membershipLevels
|
||||
}
|
||||
import { LevelProps } from "@/components/Levels/levels"
|
||||
|
||||
export type MembershipLevelIconProps = {
|
||||
level: MembershipLevel
|
||||
} & LevelProps
|
||||
|
||||
export type CopyButtonProps = {
|
||||
membershipNumber: string
|
||||
|
||||
@@ -1,69 +1,36 @@
|
||||
import { Lang } from "@/constants/languages"
|
||||
import { membershipLevels } from "@/constants/membershipLevels"
|
||||
|
||||
import { MembershipLevel } from "@/utils/user"
|
||||
|
||||
import type { IntlFormatters } from "@formatjs/intl"
|
||||
|
||||
type BenefitTitle = { title: string }
|
||||
import { MembershipLevel } from "@/constants/membershipLevels"
|
||||
import { LoyaltyLevel } from "@/server/routers/contentstack/loyaltyLevel/output"
|
||||
import { Reward } from "@/server/routers/contentstack/reward/output"
|
||||
|
||||
export type OverviewTableClientProps = {
|
||||
activeMembership: MembershipLevel | null
|
||||
}
|
||||
|
||||
export type Level = {
|
||||
level: membershipLevels
|
||||
name: string
|
||||
requiredPoints: number
|
||||
requiredNights?: number
|
||||
benefits: BenefitTitle[]
|
||||
levels: ComparisonLevel[]
|
||||
}
|
||||
|
||||
export type LevelCardProps = {
|
||||
formatMessage: IntlFormatters["formatMessage"]
|
||||
lang: Lang
|
||||
level: Level
|
||||
level: LevelWithRewards
|
||||
}
|
||||
|
||||
export type ComparisonLevel = {
|
||||
level: membershipLevels
|
||||
name: string
|
||||
description: string
|
||||
requirement: string
|
||||
icon: string
|
||||
benefits: Benefit[]
|
||||
}
|
||||
export type LevelWithRewards = LoyaltyLevel & { rewards: Reward[] }
|
||||
|
||||
export type Benefit = {
|
||||
name: string
|
||||
description: string
|
||||
unlocked: boolean
|
||||
value?: string
|
||||
valueDetails?: string
|
||||
}
|
||||
export type ComparisonLevel = LevelWithRewards
|
||||
|
||||
export type LevelSummaryProps = {
|
||||
level: ComparisonLevel
|
||||
showDescription?: boolean
|
||||
}
|
||||
|
||||
export type BenefitCardProps = {
|
||||
comparedValues: BenefitValueInformation[]
|
||||
export type RewardCardProps = {
|
||||
comparedValues: (Reward | undefined)[]
|
||||
title: string
|
||||
description: string
|
||||
}
|
||||
|
||||
type BenefitValueInformation = {
|
||||
unlocked: boolean
|
||||
value?: string
|
||||
valueDetails?: string
|
||||
export type RewardValueProps = {
|
||||
reward?: Reward
|
||||
}
|
||||
|
||||
export type BenefitValueProps = {
|
||||
benefit: BenefitValueInformation
|
||||
}
|
||||
|
||||
export type BenefitListProps = {
|
||||
export type RewardListProps = {
|
||||
levels: ComparisonLevel[]
|
||||
}
|
||||
|
||||
@@ -77,16 +44,16 @@ export type DesktopSelectColumns = {
|
||||
|
||||
export type LargeTableProps = {
|
||||
levels: ComparisonLevel[]
|
||||
activeLevel: membershipLevels | null
|
||||
activeLevel: MembershipLevel | null
|
||||
Select?: (column: DesktopSelectColumns) => JSX.Element | null
|
||||
}
|
||||
|
||||
export type BenefitTableHeaderProps = {
|
||||
export type RewardTableHeaderProps = {
|
||||
name: string
|
||||
description: string
|
||||
}
|
||||
|
||||
export enum overviewTableActionsEnum {
|
||||
export enum OverviewTableActionsEnum {
|
||||
SET_SELECTED_LEVEL_A_MOBILE = "SET_SELECTED_LEVEL_A_MOBILE",
|
||||
SET_SELECTED_LEVEL_B_MOBILE = "SET_SELECTED_LEVEL_B_MOBILE",
|
||||
SET_SELECTED_LEVEL_A_DESKTOP = "SET_SELECTED_LEVEL_A_DESKTOP",
|
||||
@@ -95,6 +62,6 @@ export enum overviewTableActionsEnum {
|
||||
}
|
||||
|
||||
export type OverviewTableReducerAction = {
|
||||
type: overviewTableActionsEnum
|
||||
type: OverviewTableActionsEnum
|
||||
payload: ComparisonLevel
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { VariantProps } from "class-variance-authority"
|
||||
|
||||
import { contentCardVariants } from "@/components/TempDesignSystem/ContentCard/variants"
|
||||
import { teaserCardVariants } from "@/components/TempDesignSystem/TeaserCard/variants"
|
||||
|
||||
import { ImageVaultAsset } from "@/types/components/imageVault"
|
||||
import type { CardProps } from "@/components/TempDesignSystem/Card/card"
|
||||
@@ -9,13 +9,13 @@ interface SidePeekButton {
|
||||
title: string
|
||||
}
|
||||
|
||||
export interface ContentCardProps
|
||||
extends VariantProps<typeof contentCardVariants> {
|
||||
export interface TeaserCardProps
|
||||
extends VariantProps<typeof teaserCardVariants> {
|
||||
title: string
|
||||
description: string
|
||||
primaryButton?: CardProps["primaryButton"]
|
||||
secondaryButton?: CardProps["secondaryButton"]
|
||||
sidePeekButton?: SidePeekButton
|
||||
backgroundImage?: ImageVaultAsset
|
||||
image?: ImageVaultAsset
|
||||
className?: string
|
||||
}
|
||||
@@ -6,5 +6,6 @@ export namespace BlocksEnums {
|
||||
Shortcuts = "Shortcuts",
|
||||
TextCols = "TextCols",
|
||||
TextContent = "TextContent",
|
||||
UspGrid = "UspGrid",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,5 +2,6 @@ export namespace CardsGridEnum {
|
||||
export const enum cards {
|
||||
Card = "Card",
|
||||
LoyaltyCard = "LoyaltyCard",
|
||||
TeaserCard = "TeaserCard",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ export namespace ContentPageEnum {
|
||||
DynamicContent = "ContentPageBlocksDynamicContent",
|
||||
Shortcuts = "ContentPageBlocksShortcuts",
|
||||
TextCols = "ContentPageBlocksTextCols",
|
||||
UspGrid = "ContentPageBlocksUspGrid",
|
||||
}
|
||||
|
||||
export const enum sidebar {
|
||||
|
||||
10
types/enums/uspGrid.ts
Normal file
10
types/enums/uspGrid.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { IconName } from "../components/icon"
|
||||
|
||||
export namespace UspGridEnum {
|
||||
export const enum icons {
|
||||
Snowflake = IconName.Snowflake,
|
||||
}
|
||||
export const uspIcons = z.enum([icons.Snowflake])
|
||||
}
|
||||
@@ -20,4 +20,32 @@ export type HotelTripAdvisor =
|
||||
export type RoomData = z.infer<typeof roomSchema>
|
||||
|
||||
export type PointOfInterest = z.output<typeof pointOfInterestSchema>
|
||||
export type PointOfInterestCategory = PointOfInterest["category"]
|
||||
|
||||
export enum PointOfInterestCategoryNameEnum {
|
||||
AIRPORT = "Airport",
|
||||
AMUSEMENT_PARK = "Amusement park",
|
||||
BUS_TERMINAL = "Bus terminal",
|
||||
FAIR = "Fair",
|
||||
HOSPITAL = "Hospital",
|
||||
HOTEL = "Hotel",
|
||||
MARKETING_CITY = "Marketing city",
|
||||
MUSEUM = "Museum",
|
||||
NEARBY_COMPANIES = "Nearby companies",
|
||||
PARKING_GARAGE = "Parking / Garage",
|
||||
RESTAURANT = "Restaurant",
|
||||
SHOPPING = "Shopping",
|
||||
SPORTS = "Sports",
|
||||
THEATRE = "Theatre",
|
||||
TOURIST = "Tourist",
|
||||
TRANSPORTATIONS = "Transportations",
|
||||
ZOO = "Zoo",
|
||||
}
|
||||
|
||||
export enum PointOfInterestGroupEnum {
|
||||
PUBLIC_TRANSPORT = "Public transport",
|
||||
ATTRACTIONS = "Attractions",
|
||||
BUSINESS = "Business",
|
||||
LOCATION = "Location",
|
||||
PARKING = "Parking",
|
||||
SHOPPING_DINING = "Shopping & Dining",
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ export enum EmbedEnum {
|
||||
LoyaltyPage = "LoyaltyPage",
|
||||
AccountPage = "AccountPage",
|
||||
ContentPage = "ContentPage",
|
||||
HotelPage = "HotelPage",
|
||||
}
|
||||
|
||||
export type Embed = keyof typeof EmbedEnum
|
||||
|
||||
@@ -4,13 +4,13 @@ import { cardsGridSchema } from "@/server/routers/contentstack/schemas/blocks/ca
|
||||
import { contentSchema } from "@/server/routers/contentstack/schemas/blocks/content"
|
||||
import { dynamicContentSchema } from "@/server/routers/contentstack/schemas/blocks/dynamicContent"
|
||||
import { shortcutsSchema } from "@/server/routers/contentstack/schemas/blocks/shortcuts"
|
||||
|
||||
import { textColsSchema } from "@/server/routers/contentstack/schemas/blocks/textCols"
|
||||
import { uspGridSchema } from "@/server/routers/contentstack/schemas/blocks/uspGrid"
|
||||
|
||||
export interface CardsGrid extends z.output<typeof cardsGridSchema> { }
|
||||
export interface Content extends z.output<typeof contentSchema> { }
|
||||
export interface DynamicContent extends z.output<typeof dynamicContentSchema> { }
|
||||
export interface Shortcuts extends z.output<typeof shortcutsSchema> { }
|
||||
export interface CardsGrid extends z.output<typeof cardsGridSchema> {}
|
||||
export interface Content extends z.output<typeof contentSchema> {}
|
||||
export interface DynamicContent extends z.output<typeof dynamicContentSchema> {}
|
||||
export interface Shortcuts extends z.output<typeof shortcutsSchema> {}
|
||||
export type Shortcut = Shortcuts["shortcuts"]
|
||||
export interface TextCols extends z.output<typeof textColsSchema> { }
|
||||
|
||||
export interface TextCols extends z.output<typeof textColsSchema> {}
|
||||
export interface UspGrid extends z.output<typeof uspGridSchema> {}
|
||||
|
||||
@@ -8,15 +8,15 @@ import {
|
||||
} from "@/server/routers/contentstack/contentPage/output"
|
||||
|
||||
export interface GetContentPageRefsSchema
|
||||
extends z.input<typeof contentPageRefsSchema> { }
|
||||
extends z.input<typeof contentPageRefsSchema> {}
|
||||
|
||||
export interface ContentPageRefs
|
||||
extends z.output<typeof contentPageRefsSchema> { }
|
||||
extends z.output<typeof contentPageRefsSchema> {}
|
||||
|
||||
export interface GetContentPageSchema
|
||||
extends z.input<typeof contentPageSchema> { }
|
||||
extends z.input<typeof contentPageSchema> {}
|
||||
|
||||
export interface ContentPage extends z.output<typeof contentPageSchema> { }
|
||||
export interface ContentPage extends z.output<typeof contentPageSchema> {}
|
||||
|
||||
export type Block = z.output<typeof blocksSchema>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user