Feat/BOOK-257 videoplayer with card
* feat(BOOK-257): Added VideoPlayer with card component * feat(BOOK-257): Added queries and component for VideoCard block to Content and Collection pages * fix(BOOK-257): Only setting object-fit: cover on the video if it is not fullscreen * feat(BOOK-257): Added queries and component for VideoCard block to Startpage * feat(BOOK-257): Added queries and component for Video block to content/collection/start page Approved-by: Chuma Mcphoy (We Ahead)
This commit is contained in:
@@ -28,6 +28,11 @@ import {
|
||||
import { tableSchema } from "../schemas/blocks/table"
|
||||
import { textColsRefsSchema, textColsSchema } from "../schemas/blocks/textCols"
|
||||
import { uspGridRefsSchema, uspGridSchema } from "../schemas/blocks/uspGrid"
|
||||
import { videoBlockRefsSchema, videoBlockSchema } from "../schemas/blocks/video"
|
||||
import {
|
||||
videoCardRefsSchema,
|
||||
videoCardSchema,
|
||||
} from "../schemas/blocks/videoCard"
|
||||
import {
|
||||
dynamicContentRefsSchema as headerDynamicContentRefsSchema,
|
||||
dynamicContentSchema as headerDynamicContentSchema,
|
||||
@@ -116,6 +121,18 @@ export const contentPageHotelListing = z
|
||||
})
|
||||
.merge(contentPageHotelListingSchema)
|
||||
|
||||
export const contentPageVideoCard = z
|
||||
.object({
|
||||
__typename: z.literal(ContentPageEnum.ContentStack.blocks.VideoCard),
|
||||
})
|
||||
.merge(videoCardSchema)
|
||||
|
||||
export const contentPageVideo = z
|
||||
.object({
|
||||
__typename: z.literal(ContentPageEnum.ContentStack.blocks.Video),
|
||||
})
|
||||
.merge(videoBlockSchema)
|
||||
|
||||
export const blocksSchema = z.discriminatedUnion("__typename", [
|
||||
contentPageAccordion,
|
||||
contentPageCards,
|
||||
@@ -126,6 +143,8 @@ export const blocksSchema = z.discriminatedUnion("__typename", [
|
||||
contentPageTextCols,
|
||||
contentPageUspGrid,
|
||||
contentPageHotelListing,
|
||||
contentPageVideoCard,
|
||||
contentPageVideo,
|
||||
])
|
||||
|
||||
export const contentPageSidebarContent = z
|
||||
@@ -267,6 +286,18 @@ const contentPageAccordionRefs = z
|
||||
})
|
||||
.merge(accordionRefsSchema)
|
||||
|
||||
const contentPageVideoCardRefs = z
|
||||
.object({
|
||||
__typename: z.literal(ContentPageEnum.ContentStack.blocks.VideoCard),
|
||||
})
|
||||
.merge(videoCardRefsSchema)
|
||||
|
||||
const contentPageVideoRefs = z
|
||||
.object({
|
||||
__typename: z.literal(ContentPageEnum.ContentStack.blocks.Video),
|
||||
})
|
||||
.merge(videoBlockRefsSchema)
|
||||
|
||||
const contentPageBlockRefsItem = z.discriminatedUnion("__typename", [
|
||||
contentPageAccordionRefs,
|
||||
contentPageBlockContentRefs,
|
||||
@@ -275,6 +306,8 @@ const contentPageBlockRefsItem = z.discriminatedUnion("__typename", [
|
||||
contentPageDynamicContentRefs,
|
||||
contentPageTextColsRefs,
|
||||
contentPageUspGridRefs,
|
||||
contentPageVideoCardRefs,
|
||||
contentPageVideoRefs,
|
||||
])
|
||||
|
||||
const contentPageSidebarContentRef = z
|
||||
|
||||
Reference in New Issue
Block a user