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:
63
packages/trpc/lib/graphql/Fragments/Blocks/Video.graphql.ts
Normal file
63
packages/trpc/lib/graphql/Fragments/Blocks/Video.graphql.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import { gql } from "graphql-tag"
|
||||
|
||||
import { Video, VideoRef } from "../Video.graphql"
|
||||
|
||||
export const Video_ContentPage = gql`
|
||||
fragment Video_ContentPage on ContentPageBlocksVideo {
|
||||
__typename
|
||||
video {
|
||||
...Video
|
||||
}
|
||||
}
|
||||
${Video}
|
||||
`
|
||||
|
||||
export const Video_CollectionPage = gql`
|
||||
fragment Video_CollectionPage on CollectionPageBlocksVideo {
|
||||
__typename
|
||||
video {
|
||||
...Video
|
||||
}
|
||||
}
|
||||
${Video}
|
||||
`
|
||||
|
||||
export const Video_StartPage = gql`
|
||||
fragment Video_StartPage on StartPageBlocksVideo {
|
||||
__typename
|
||||
video {
|
||||
...Video
|
||||
}
|
||||
}
|
||||
${Video}
|
||||
`
|
||||
|
||||
export const Video_ContentPageRefs = gql`
|
||||
fragment Video_ContentPageRefs on ContentPageBlocksVideo {
|
||||
__typename
|
||||
video {
|
||||
...VideoRef
|
||||
}
|
||||
}
|
||||
${VideoRef}
|
||||
`
|
||||
|
||||
export const Video_CollectionPageRefs = gql`
|
||||
fragment Video_CollectionPageRefs on CollectionPageBlocksVideo {
|
||||
__typename
|
||||
video {
|
||||
...VideoRef
|
||||
}
|
||||
}
|
||||
${VideoRef}
|
||||
`
|
||||
|
||||
export const Video_StartPageRefs = gql`
|
||||
fragment Video_StartPageRefs on StartPageBlocksVideo {
|
||||
__typename
|
||||
video {
|
||||
...VideoRef
|
||||
}
|
||||
}
|
||||
${VideoRef}
|
||||
`
|
||||
166
packages/trpc/lib/graphql/Fragments/Blocks/VideoCard.graphql.ts
Normal file
166
packages/trpc/lib/graphql/Fragments/Blocks/VideoCard.graphql.ts
Normal file
@@ -0,0 +1,166 @@
|
||||
import { gql } from "graphql-tag"
|
||||
|
||||
import { System } from "../System.graphql"
|
||||
import { Video, VideoRef } from "../Video.graphql"
|
||||
|
||||
export const VideoQuoteCard = gql`
|
||||
fragment VideoQuoteCard on VideoQuoteCard {
|
||||
video {
|
||||
...Video
|
||||
}
|
||||
style
|
||||
quote
|
||||
author
|
||||
author_description
|
||||
}
|
||||
${Video}
|
||||
`
|
||||
|
||||
export const VideoTextCard = gql`
|
||||
fragment VideoTextCard on VideoTextCard {
|
||||
video {
|
||||
...Video
|
||||
}
|
||||
style
|
||||
heading
|
||||
text
|
||||
}
|
||||
${Video}
|
||||
`
|
||||
|
||||
export const VideoCard_ContentPage = gql`
|
||||
fragment VideoCard_ContentPage on ContentPageBlocksVideoCard {
|
||||
__typename
|
||||
video_card {
|
||||
video_cardConnection {
|
||||
edges {
|
||||
node {
|
||||
__typename
|
||||
...VideoQuoteCard
|
||||
...VideoTextCard
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
${VideoQuoteCard}
|
||||
${VideoTextCard}
|
||||
`
|
||||
|
||||
export const VideoCard_CollectionPage = gql`
|
||||
fragment VideoCard_CollectionPage on CollectionPageBlocksVideoCard {
|
||||
__typename
|
||||
video_card {
|
||||
video_cardConnection {
|
||||
edges {
|
||||
node {
|
||||
__typename
|
||||
...VideoQuoteCard
|
||||
...VideoTextCard
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
${VideoQuoteCard}
|
||||
${VideoTextCard}
|
||||
`
|
||||
|
||||
export const VideoCard_StartPage = gql`
|
||||
fragment VideoCard_StartPage on StartPageBlocksVideoCard {
|
||||
__typename
|
||||
video_card {
|
||||
video_cardConnection {
|
||||
edges {
|
||||
node {
|
||||
__typename
|
||||
...VideoQuoteCard
|
||||
...VideoTextCard
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
${VideoQuoteCard}
|
||||
${VideoTextCard}
|
||||
`
|
||||
|
||||
export const VideoQuoteCardRef = gql`
|
||||
fragment VideoQuoteCardRef on VideoQuoteCard {
|
||||
video {
|
||||
...VideoRef
|
||||
}
|
||||
system {
|
||||
...System
|
||||
}
|
||||
}
|
||||
${VideoRef}
|
||||
${System}
|
||||
`
|
||||
|
||||
export const VideoTextCardRef = gql`
|
||||
fragment VideoTextCardRef on VideoTextCard {
|
||||
video {
|
||||
...VideoRef
|
||||
}
|
||||
system {
|
||||
...System
|
||||
}
|
||||
}
|
||||
${VideoRef}
|
||||
${System}
|
||||
`
|
||||
|
||||
export const VideoCard_ContentPageRefs = gql`
|
||||
fragment VideoCard_ContentPageRefs on ContentPageBlocksVideoCard {
|
||||
video_card {
|
||||
video_cardConnection {
|
||||
edges {
|
||||
node {
|
||||
__typename
|
||||
...VideoQuoteCardRef
|
||||
...VideoTextCardRef
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
${VideoQuoteCardRef}
|
||||
${VideoTextCardRef}
|
||||
`
|
||||
|
||||
export const VideoCard_CollectionPageRefs = gql`
|
||||
fragment VideoCard_CollectionPageRefs on CollectionPageBlocksVideoCard {
|
||||
video_card {
|
||||
video_cardConnection {
|
||||
edges {
|
||||
node {
|
||||
__typename
|
||||
...VideoQuoteCardRef
|
||||
...VideoTextCardRef
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
${VideoQuoteCardRef}
|
||||
${VideoTextCardRef}
|
||||
`
|
||||
|
||||
export const VideoCard_StartPageRefs = gql`
|
||||
fragment VideoCard_StartPageRefs on StartPageBlocksVideoCard {
|
||||
video_card {
|
||||
video_cardConnection {
|
||||
edges {
|
||||
node {
|
||||
__typename
|
||||
...VideoQuoteCardRef
|
||||
...VideoTextCardRef
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
${VideoQuoteCardRef}
|
||||
${VideoTextCardRef}
|
||||
`
|
||||
@@ -16,6 +16,14 @@ import {
|
||||
UspGrid_CollectionPage,
|
||||
UspGrid_CollectionPageRefs,
|
||||
} from "../../Fragments/Blocks/UspGrid.graphql"
|
||||
import {
|
||||
Video_CollectionPage,
|
||||
Video_CollectionPageRefs,
|
||||
} from "../../Fragments/Blocks/Video.graphql"
|
||||
import {
|
||||
VideoCard_CollectionPage,
|
||||
VideoCard_CollectionPageRefs,
|
||||
} from "../../Fragments/Blocks/VideoCard.graphql"
|
||||
import {
|
||||
NavigationLinks_CollectionPage,
|
||||
NavigationLinksRef_CollectionPage,
|
||||
@@ -51,6 +59,8 @@ export const GetCollectionPage = gql`
|
||||
...Shortcuts_CollectionPage
|
||||
...UspGrid_CollectionPage
|
||||
...DynamicContent_CollectionPage
|
||||
...VideoCard_CollectionPage
|
||||
...Video_CollectionPage
|
||||
}
|
||||
system {
|
||||
...System
|
||||
@@ -62,13 +72,16 @@ export const GetCollectionPage = gql`
|
||||
url
|
||||
}
|
||||
}
|
||||
${System}
|
||||
${TopPrimaryButton_CollectionPage}
|
||||
${NavigationLinks_CollectionPage}
|
||||
${CardsGrid_CollectionPage}
|
||||
${Shortcuts_CollectionPage}
|
||||
${UspGrid_CollectionPage}
|
||||
${DynamicContent_CollectionPage}
|
||||
${VideoCard_CollectionPage}
|
||||
${Video}
|
||||
${Video_CollectionPage}
|
||||
`
|
||||
|
||||
export const GetCollectionPageRefs = gql`
|
||||
@@ -87,6 +100,8 @@ export const GetCollectionPageRefs = gql`
|
||||
...Shortcuts_CollectionPageRefs
|
||||
...UspGrid_CollectionPageRefs
|
||||
...DynamicContent_CollectionPageRefs
|
||||
...VideoCard_CollectionPageRefs
|
||||
...Video_CollectionPageRefs
|
||||
}
|
||||
system {
|
||||
...System
|
||||
@@ -101,6 +116,8 @@ export const GetCollectionPageRefs = gql`
|
||||
${UspGrid_CollectionPageRefs}
|
||||
${DynamicContent_CollectionPageRefs}
|
||||
${VideoRef}
|
||||
${VideoCard_CollectionPageRefs}
|
||||
${Video_CollectionPageRefs}
|
||||
`
|
||||
|
||||
export const GetDaDeEnUrlsCollectionPage = gql`
|
||||
|
||||
@@ -30,6 +30,14 @@ import {
|
||||
UspGrid_ContentPage,
|
||||
UspGrid_ContentPageRefs,
|
||||
} from "../../Fragments/Blocks/UspGrid.graphql"
|
||||
import {
|
||||
Video_ContentPage,
|
||||
Video_ContentPageRefs,
|
||||
} from "../../Fragments/Blocks/Video.graphql"
|
||||
import {
|
||||
VideoCard_ContentPage,
|
||||
VideoCard_ContentPageRefs,
|
||||
} from "../../Fragments/Blocks/VideoCard.graphql"
|
||||
import {
|
||||
NavigationLinks_ContentPage,
|
||||
NavigationLinksRef_ContentPage,
|
||||
@@ -126,6 +134,8 @@ export const GetContentPageBlocksBatch1 = gql`
|
||||
...CardsGrid_ContentPage
|
||||
...Content_ContentPage
|
||||
...DynamicContent_ContentPage
|
||||
...VideoCard_ContentPage
|
||||
...Video_ContentPage
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -133,6 +143,8 @@ export const GetContentPageBlocksBatch1 = gql`
|
||||
${CardsGrid_ContentPage}
|
||||
${Content_ContentPage}
|
||||
${DynamicContent_ContentPage}
|
||||
${VideoCard_ContentPage}
|
||||
${Video_ContentPage}
|
||||
`
|
||||
|
||||
export const GetContentPageBlocksBatch2 = gql`
|
||||
@@ -204,6 +216,8 @@ export const GetContentPageBlocksRefs = gql`
|
||||
...Shortcuts_ContentPageRefs
|
||||
...TextCols_ContentPageRef
|
||||
...UspGrid_ContentPageRefs
|
||||
...VideoCard_ContentPageRefs
|
||||
...Video_ContentPageRefs
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -214,6 +228,8 @@ export const GetContentPageBlocksRefs = gql`
|
||||
${Shortcuts_ContentPageRefs}
|
||||
${TextCols_ContentPageRef}
|
||||
${UspGrid_ContentPageRefs}
|
||||
${VideoCard_ContentPageRefs}
|
||||
${Video_ContentPageRefs}
|
||||
`
|
||||
|
||||
export const GetDaDeEnUrlsContentPage = gql`
|
||||
|
||||
@@ -16,6 +16,14 @@ import {
|
||||
JoinScandicFriends_StartPage,
|
||||
JoinScandicFriends_StartPageRefs,
|
||||
} from "../../Fragments/Blocks/JoinScandicFriends.graphql"
|
||||
import {
|
||||
Video_StartPage,
|
||||
Video_StartPageRefs,
|
||||
} from "../../Fragments/Blocks/Video.graphql"
|
||||
import {
|
||||
VideoCard_StartPage,
|
||||
VideoCard_StartPageRefs,
|
||||
} from "../../Fragments/Blocks/VideoCard.graphql"
|
||||
import { System } from "../../Fragments/System.graphql"
|
||||
|
||||
export const GetStartPage = gql`
|
||||
@@ -44,6 +52,8 @@ export const GetStartPage = gql`
|
||||
}
|
||||
}
|
||||
...JoinScandicFriends_StartPage
|
||||
...VideoCard_StartPage
|
||||
...Video_StartPage
|
||||
}
|
||||
system {
|
||||
...System
|
||||
@@ -60,6 +70,8 @@ export const GetStartPage = gql`
|
||||
${FullWidthCampaign}
|
||||
${CarouselCards_StartPage}
|
||||
${JoinScandicFriends_StartPage}
|
||||
${VideoCard_StartPage}
|
||||
${Video_StartPage}
|
||||
`
|
||||
|
||||
export const GetStartPageRefs = gql`
|
||||
@@ -81,6 +93,8 @@ export const GetStartPageRefs = gql`
|
||||
}
|
||||
}
|
||||
...JoinScandicFriends_StartPageRefs
|
||||
...VideoCard_StartPageRefs
|
||||
...Video_StartPageRefs
|
||||
}
|
||||
system {
|
||||
...System
|
||||
@@ -92,6 +106,8 @@ export const GetStartPageRefs = gql`
|
||||
${FullWidthCampaignRefs}
|
||||
${CarouselCards_StartPageRefs}
|
||||
${JoinScandicFriends_StartPageRefs}
|
||||
${VideoCard_StartPageRefs}
|
||||
${Video_StartPageRefs}
|
||||
`
|
||||
|
||||
export const GetDaDeEnUrlsStartPage = gql`
|
||||
|
||||
Reference in New Issue
Block a user