web: colocate graphql fragments, unmask where needed, more idiomatic client-preset use
This commit is contained in:
@@ -10,6 +10,18 @@ const config: CodegenConfig = {
|
||||
generates: {
|
||||
"./src/gql/": {
|
||||
preset: "client",
|
||||
presetConfig: {
|
||||
fragmentMasking: { unmaskFunctionName: "unmaskFragment" },
|
||||
},
|
||||
config: {
|
||||
scalars: {
|
||||
DateTime: "string",
|
||||
JSONString: "string",
|
||||
PositiveInt: "number",
|
||||
RichText: "string",
|
||||
UUID: "string",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -86,7 +86,7 @@ export default async function Page({ params }: { params: Params }) {
|
||||
<Breadcrumb
|
||||
link="/aktuelt"
|
||||
text="Nyhet"
|
||||
date={formatDate(news.firstPublishedAt, "d. MMMM yyyy")}
|
||||
date={news.firstPublishedAt ? formatDate(news.firstPublishedAt, "d. MMMM yyyy") : ""}
|
||||
/>
|
||||
<h1 className="news-title">{news.title}</h1>
|
||||
{news.lead && (
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
import { Metadata, ResolvingMetadata } from "next";
|
||||
import { notFound } from "next/navigation";
|
||||
import { getClient } from "@/app/client";
|
||||
import { ImageSliderBlock } from "@/components/blocks/ImageSliderBlock";
|
||||
import {
|
||||
ImageSliderBlock,
|
||||
ImageSliderBlockFragmentDefinition,
|
||||
} from "@/components/blocks/ImageSliderBlock";
|
||||
import { Breadcrumb } from "@/components/general/Breadcrumb";
|
||||
import { PageContent } from "@/components/general/PageContent";
|
||||
import { NeufMap } from "@/components/venues/NeufMap";
|
||||
import { VenueInfo } from "@/components/venues/VenueInfo";
|
||||
import { graphql } from "@/gql";
|
||||
import { graphql, unmaskFragment } from "@/gql";
|
||||
import { VenueFragment } from "@/gql/graphql";
|
||||
import { getSeoMetadata } from "@/lib/seo";
|
||||
|
||||
@@ -86,8 +89,14 @@ export default async function Page({ params }: { params: Params }) {
|
||||
|
||||
return (
|
||||
<main className="site-main" id="main">
|
||||
{venue.images && venue.images.length !== 0 && (
|
||||
<ImageSliderBlock block={venue.images[0]} hero />
|
||||
{venue.images?.[0]?.__typename === "ImageSliderBlock" && (
|
||||
<ImageSliderBlock
|
||||
block={unmaskFragment(
|
||||
ImageSliderBlockFragmentDefinition,
|
||||
venue.images[0]
|
||||
)}
|
||||
hero
|
||||
/>
|
||||
)}
|
||||
<div className="page-header-small">
|
||||
<Breadcrumb link="/utleie" text="Lokale" />
|
||||
|
||||
@@ -45,7 +45,10 @@ const VenueFragmentDefinition = graphql(`
|
||||
seoTitle
|
||||
searchDescription
|
||||
images {
|
||||
...Blocks
|
||||
__typename
|
||||
... on ImageSliderBlock {
|
||||
...ImageSliderBlock
|
||||
}
|
||||
}
|
||||
body {
|
||||
...Blocks
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Metadata, ResolvingMetadata } from "next";
|
||||
import { graphql } from "@/gql";
|
||||
import { SponsorsPage, SponsorBlock } from "@/gql/graphql";
|
||||
import { type SponsorFragment, type SponsorsPageFragment } from "@/gql/graphql";
|
||||
import { getClient } from "@/app/client";
|
||||
import { PageHeader } from "@/components/general/PageHeader";
|
||||
import { PageContent } from "@/components/general/PageContent";
|
||||
@@ -30,7 +30,7 @@ export async function generateMetadata(
|
||||
return null;
|
||||
}
|
||||
|
||||
const index = data.page as SponsorsPage;
|
||||
const index = data.page as SponsorsPageFragment;
|
||||
const metadata = await getSeoMetadata(index, parent);
|
||||
return metadata;
|
||||
}
|
||||
@@ -47,13 +47,7 @@ const SponsorsPageFragmentDefinition = graphql(`
|
||||
}
|
||||
sponsors {
|
||||
... on SponsorBlock {
|
||||
id
|
||||
name
|
||||
logo {
|
||||
...Image
|
||||
}
|
||||
text
|
||||
website
|
||||
...Sponsor
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,13 +64,15 @@ export default async function Page() {
|
||||
throw new Error("Failed to render /sponsorer");
|
||||
}
|
||||
|
||||
const page = data.page as SponsorsPage;
|
||||
const page = data.page as SponsorsPageFragment;
|
||||
|
||||
return (
|
||||
<main className="site-main" id="main">
|
||||
<PageHeader heading={page.title} lead={page.lead} />
|
||||
{page.body && <PageContent blocks={page.body} />}
|
||||
<SponsorList sponsors={page.sponsors as SponsorBlock[]} />
|
||||
{page.sponsors && (
|
||||
<SponsorList sponsors={page.sponsors as SponsorFragment[]} />
|
||||
)}
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,15 +1,26 @@
|
||||
import { AccordionBlock as AccordionBlockType } from "@/gql/graphql";
|
||||
import { graphql } from "@/gql";
|
||||
import { type AccordionBlockFragment } from "@/gql/graphql";
|
||||
import { Blocks } from "./Blocks";
|
||||
import { Accordion } from "@/components/general/Accordion";
|
||||
|
||||
const AccordionBlockFragmentDefinition = graphql(`
|
||||
fragment AccordionBlock on AccordionBlock {
|
||||
heading
|
||||
body {
|
||||
id
|
||||
blockType
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
export const AccordionBlock = ({
|
||||
block,
|
||||
}: {
|
||||
block: AccordionBlockType;
|
||||
block: AccordionBlockFragment;
|
||||
}) => {
|
||||
return (
|
||||
<Accordion heading={block.heading}>
|
||||
<Blocks blocks={block.body} />
|
||||
</Accordion>
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,15 +1,33 @@
|
||||
import { ContactEntityBlock as ContactEntityBlockType } from "@/gql/graphql";
|
||||
import { graphql, unmaskFragment } from "@/gql";
|
||||
import { type ContactEntityBlockFragment } from "@/gql/graphql";
|
||||
import styles from "./contactEntityBlock.module.scss";
|
||||
import { formatNorwegianPhoneNumber, formatPhoneE164 } from "@/lib/common";
|
||||
import {
|
||||
ContactEntityFragmentDefinition,
|
||||
ImageFragmentDefinition,
|
||||
formatNorwegianPhoneNumber,
|
||||
formatPhoneE164,
|
||||
} from "@/lib/common";
|
||||
import { Icon } from "../general/Icon";
|
||||
import { Image } from "../general/Image";
|
||||
|
||||
const ContactEntityBlockFragmentDefinition = graphql(`
|
||||
fragment ContactEntityBlock on ContactEntityBlock {
|
||||
contactEntity {
|
||||
...ContactEntity
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
export const ContactEntityBlock = ({
|
||||
block,
|
||||
}: {
|
||||
block: ContactEntityBlockType;
|
||||
block: ContactEntityBlockFragment;
|
||||
}) => {
|
||||
const contact = block?.contactEntity;
|
||||
const contact = unmaskFragment(
|
||||
ContactEntityFragmentDefinition,
|
||||
block?.contactEntity
|
||||
);
|
||||
const image = unmaskFragment(ImageFragmentDefinition, contact?.image);
|
||||
|
||||
if (!contact) {
|
||||
return <></>;
|
||||
@@ -21,18 +39,18 @@ export const ContactEntityBlock = ({
|
||||
return (
|
||||
<li className={styles.contactItem}>
|
||||
<div className={styles.image}>
|
||||
{!contact.image && (
|
||||
{!image && (
|
||||
<img
|
||||
src="/assets/graphics/portrait-pig.svg"
|
||||
className={styles.portraitPlaceholder}
|
||||
/>
|
||||
)}
|
||||
{contact.image && (
|
||||
{image && (
|
||||
<Image
|
||||
src={contact.image.url}
|
||||
alt={contact.image.alt ?? ""}
|
||||
width={contact.image.width}
|
||||
height={contact.image.height}
|
||||
src={image.url}
|
||||
alt={image.alt ?? ""}
|
||||
width={image.width}
|
||||
height={image.height}
|
||||
sizes="25vw"
|
||||
className={styles.portrait}
|
||||
/>
|
||||
|
||||
@@ -1,11 +1,25 @@
|
||||
import { ContactListBlock as ContactListBlockType } from "@/gql/graphql";
|
||||
import { graphql } from "@/gql";
|
||||
import { type ContactListBlockFragment } from "@/gql/graphql";
|
||||
import styles from "./contactListBlock.module.scss";
|
||||
import { Blocks } from "./Blocks";
|
||||
|
||||
const ContactListBlockFragmentDefinition = graphql(`
|
||||
fragment ContactListBlock on ContactListBlock {
|
||||
items {
|
||||
blockType
|
||||
... on ContactEntityBlock {
|
||||
contactEntity {
|
||||
...ContactEntity
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
export const ContactListBlock = ({
|
||||
block,
|
||||
}: {
|
||||
block: ContactListBlockType;
|
||||
block: ContactListBlockFragment;
|
||||
}) => {
|
||||
return (
|
||||
<ul className={styles.contactList}>
|
||||
|
||||
@@ -1,11 +1,37 @@
|
||||
import { ContactSectionBlock as ContactSectionBlockType } from "@/gql/graphql";
|
||||
import { graphql } from "@/gql";
|
||||
import {
|
||||
type ContactSectionBlockFragment,
|
||||
type ContactSubsectionBlockFragment,
|
||||
} from "@/gql/graphql";
|
||||
import styles from "./contactSection.module.scss";
|
||||
import { Blocks } from "./Blocks";
|
||||
|
||||
const ContactSectionBlockFragmentDefinition = graphql(`
|
||||
fragment ContactSectionBlock on ContactSectionBlock {
|
||||
title
|
||||
text
|
||||
blocks {
|
||||
id
|
||||
blockType
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
const ContactSubsectionBlockFragmentDefinition = graphql(`
|
||||
fragment ContactSubsectionBlock on ContactSubsectionBlock {
|
||||
title
|
||||
text
|
||||
blocks {
|
||||
id
|
||||
blockType
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
export const ContactSectionBlock = ({
|
||||
block,
|
||||
}: {
|
||||
block: ContactSectionBlockType;
|
||||
block: ContactSectionBlockFragment;
|
||||
}) => {
|
||||
return (
|
||||
<section className={styles.contactSection}>
|
||||
@@ -24,7 +50,7 @@ export const ContactSectionBlock = ({
|
||||
export const ContactSubsectionBlock = ({
|
||||
block,
|
||||
}: {
|
||||
block: ContactSectionBlockType;
|
||||
block: ContactSubsectionBlockFragment;
|
||||
}) => {
|
||||
return (
|
||||
<section className={styles.contactSubsection}>
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
import { EmbedBlock as EmbedBlockType } from "@/gql/graphql";
|
||||
import { graphql } from "@/gql";
|
||||
import { type EmbedBlockFragment } from "@/gql/graphql";
|
||||
import styles from "./embedBlock.module.scss";
|
||||
|
||||
export const EmbedBlock = ({ block }: { block: EmbedBlockType }) => {
|
||||
const EmbedBlockFragmentDefinition = graphql(`
|
||||
fragment EmbedBlock on EmbedBlock {
|
||||
url
|
||||
embed
|
||||
rawEmbed
|
||||
}
|
||||
`);
|
||||
|
||||
export const EmbedBlock = ({ block }: { block: EmbedBlockFragment }) => {
|
||||
if (!block.embed) {
|
||||
return <></>;
|
||||
}
|
||||
@@ -18,7 +27,7 @@ export const EmbedBlock = ({ block }: { block: EmbedBlockType }) => {
|
||||
*/
|
||||
let embedData: any = {};
|
||||
try {
|
||||
embedData = JSON.parse(block.rawEmbed);
|
||||
embedData = block.rawEmbed ? JSON.parse(block.rawEmbed) : {};
|
||||
} catch (e) {
|
||||
embedData = {};
|
||||
}
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
import { FactBoxBlock as FactBoxBlockType } from "@/gql/graphql";
|
||||
import { graphql } from "@/gql";
|
||||
import { type FactBoxBlockFragment } from "@/gql/graphql";
|
||||
import styles from "./factBoxBlock.module.scss";
|
||||
|
||||
type FactBoxBlockTypeWithAlias = FactBoxBlockType & {
|
||||
factBoxBody?: string;
|
||||
};
|
||||
const FactBoxBlockFragmentDefinition = graphql(`
|
||||
fragment FactBoxBlock on FactBoxBlock {
|
||||
backgroundColor
|
||||
factBoxBody: body
|
||||
}
|
||||
`);
|
||||
|
||||
export const FactBoxBlock = ({
|
||||
block,
|
||||
}: {
|
||||
block: FactBoxBlockTypeWithAlias;
|
||||
block: FactBoxBlockFragment;
|
||||
}) => {
|
||||
if (!block.factBoxBody) {
|
||||
return <></>;
|
||||
|
||||
@@ -1,22 +1,47 @@
|
||||
import { FeaturedBlock as FeaturedBlockType } from "@/gql/graphql";
|
||||
import { graphql, unmaskFragment } from "@/gql";
|
||||
import { type FeaturedBlockFragment } from "@/gql/graphql";
|
||||
import Link from "next/link";
|
||||
import { Image } from "@/components/general/Image";
|
||||
import { ImageFragmentDefinition } from "@/lib/common";
|
||||
import styles from "./featuredBlock.module.scss";
|
||||
|
||||
// the 'text' field has been aliased to 'featuredBlockText' and i'm
|
||||
// using codegen the wrong way. let's specify the field here and move on
|
||||
type FeaturedBlockTypeWithAlias = FeaturedBlockType & {
|
||||
featuredBlockText: string;
|
||||
};
|
||||
const FeaturedBlockFragmentDefinition = graphql(`
|
||||
fragment FeaturedBlock on FeaturedBlock {
|
||||
title
|
||||
featuredBlockText: text
|
||||
linkText
|
||||
imagePosition
|
||||
backgroundColor
|
||||
featuredPage {
|
||||
contentType
|
||||
pageType
|
||||
url
|
||||
... on EventPage {
|
||||
featuredImage {
|
||||
...Image
|
||||
}
|
||||
}
|
||||
... on NewsPage {
|
||||
featuredImage {
|
||||
...Image
|
||||
}
|
||||
}
|
||||
}
|
||||
featuredImageOverride {
|
||||
...Image
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
export const FeaturedBlock = ({
|
||||
block,
|
||||
}: {
|
||||
block: FeaturedBlockTypeWithAlias;
|
||||
block: FeaturedBlockFragment;
|
||||
}) => {
|
||||
const image = !!block.featuredImageOverride
|
||||
? block.featuredImageOverride
|
||||
: null;
|
||||
const image = unmaskFragment(
|
||||
ImageFragmentDefinition,
|
||||
block.featuredImageOverride
|
||||
);
|
||||
// TODO: fetch image from target page
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
import { HorizontalRuleBlock as HorizontalRuleBlockType } from "@/gql/graphql";
|
||||
import { graphql } from "@/gql";
|
||||
import { type HorizontalRuleBlockFragment } from "@/gql/graphql";
|
||||
import { Image } from "@/components/general/Image";
|
||||
import styles from "./horizontalRuleBlock.module.scss";
|
||||
|
||||
const HorizontalRuleBlockFragmentDefinition = graphql(`
|
||||
fragment HorizontalRuleBlock on HorizontalRuleBlock {
|
||||
color
|
||||
}
|
||||
`);
|
||||
|
||||
export const HorizontalRuleBlock = ({
|
||||
block,
|
||||
}: {
|
||||
block: HorizontalRuleBlockType;
|
||||
block: HorizontalRuleBlockFragment;
|
||||
}) => {
|
||||
const knownColors = [
|
||||
"deepBrick",
|
||||
|
||||
@@ -1,8 +1,30 @@
|
||||
"use client";
|
||||
import { ImageSliderBlock as ImageSliderBlockType } from "@/gql/graphql";
|
||||
import { graphql, unmaskFragment, type FragmentType } from "@/gql";
|
||||
import { type ImageSliderBlockFragment } from "@/gql/graphql";
|
||||
import { ImageFigure } from "@/components/general/Image";
|
||||
import { ImageFragmentDefinition } from "@/lib/common";
|
||||
import styles from "./imageSliderBlock.module.scss";
|
||||
|
||||
const ImageSliderItemFragmentDefinition = graphql(`
|
||||
fragment ImageSliderItem on ImageSliderItemBlock {
|
||||
image {
|
||||
...Image
|
||||
}
|
||||
text
|
||||
}
|
||||
`);
|
||||
|
||||
export const ImageSliderBlockFragmentDefinition = graphql(`
|
||||
fragment ImageSliderBlock on ImageSliderBlock {
|
||||
images {
|
||||
__typename
|
||||
... on ImageSliderItemBlock {
|
||||
...ImageSliderItem
|
||||
}
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
// import swiper modules & styles
|
||||
import { Swiper, SwiperSlide } from "swiper/react";
|
||||
import { Pagination, Navigation } from "swiper/modules";
|
||||
@@ -11,17 +33,42 @@ import "swiper/css/pagination";
|
||||
import "swiper/css/navigation";
|
||||
import "./swiper.scss";
|
||||
|
||||
const Slide = ({
|
||||
item: maskedItem,
|
||||
}: {
|
||||
item: FragmentType<typeof ImageSliderItemFragmentDefinition>;
|
||||
}) => {
|
||||
const item = unmaskFragment(ImageSliderItemFragmentDefinition, maskedItem);
|
||||
const image = unmaskFragment(ImageFragmentDefinition, item.image);
|
||||
return (
|
||||
<ImageFigure
|
||||
key={image.id}
|
||||
src={image.url}
|
||||
alt={image.alt ?? ""}
|
||||
width={image.width}
|
||||
height={image.height}
|
||||
attribution={image.attribution}
|
||||
caption={item.text}
|
||||
sizes="100vw"
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const ImageSliderBlock = ({
|
||||
block,
|
||||
hero,
|
||||
pageContent
|
||||
pageContent,
|
||||
}: {
|
||||
block: ImageSliderBlockType | any;
|
||||
block: ImageSliderBlockFragment;
|
||||
hero?: boolean;
|
||||
pageContent?: boolean;
|
||||
}) => {
|
||||
return (
|
||||
<div className={styles.imageSliderBlock} data-hero={hero} data-pagecontent={pageContent}>
|
||||
<div
|
||||
className={styles.imageSliderBlock}
|
||||
data-hero={hero}
|
||||
data-pagecontent={pageContent}
|
||||
>
|
||||
<Swiper
|
||||
pagination={{
|
||||
type: "fraction",
|
||||
@@ -30,21 +77,16 @@ export const ImageSliderBlock = ({
|
||||
modules={[Pagination, Navigation]}
|
||||
className="mySwiper"
|
||||
>
|
||||
{block.images &&
|
||||
block.images.map((imageItem: any, index: number) => (
|
||||
{block.images?.map((item, index) => {
|
||||
if (item?.__typename !== "ImageSliderItemBlock") {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<SwiperSlide key={index}>
|
||||
<ImageFigure
|
||||
key={imageItem.image.id}
|
||||
src={imageItem.image.url}
|
||||
alt={imageItem.image.alt ?? ""}
|
||||
width={imageItem.image.width}
|
||||
height={imageItem.image.height}
|
||||
attribution={imageItem.image.attribution}
|
||||
caption={imageItem.text}
|
||||
sizes="100vw"
|
||||
/>
|
||||
<Slide item={item} />
|
||||
</SwiperSlide>
|
||||
))}
|
||||
);
|
||||
})}
|
||||
</Swiper>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,18 +1,31 @@
|
||||
import { ImageWithTextBlock as ImageWithTextBlockType } from "@/gql/graphql";
|
||||
import { graphql, unmaskFragment } from "@/gql";
|
||||
import { type ImageWithTextBlockFragment } from "@/gql/graphql";
|
||||
import { ImageFigure } from "@/components/general/Image";
|
||||
import { ImageFragmentDefinition } from "@/lib/common";
|
||||
|
||||
const ImageWithTextBlockFragmentDefinition = graphql(`
|
||||
fragment ImageWithTextBlock on ImageWithTextBlock {
|
||||
image {
|
||||
...Image
|
||||
}
|
||||
imageFormat
|
||||
text
|
||||
}
|
||||
`);
|
||||
|
||||
export function ImageWithTextBlock({
|
||||
block,
|
||||
}: {
|
||||
block: ImageWithTextBlockType;
|
||||
block: ImageWithTextBlockFragment;
|
||||
}) {
|
||||
const image = unmaskFragment(ImageFragmentDefinition, block.image);
|
||||
return (
|
||||
<ImageFigure
|
||||
src={block.image.url}
|
||||
alt={block.image.alt ?? ""}
|
||||
width={block.image.width}
|
||||
height={block.image.height}
|
||||
attribution={block.image.attribution}
|
||||
src={image.url}
|
||||
alt={image.alt ?? ""}
|
||||
width={image.width}
|
||||
height={image.height}
|
||||
attribution={image.attribution}
|
||||
caption={block.text}
|
||||
imageFormat={block.imageFormat}
|
||||
/>
|
||||
|
||||
@@ -1,13 +1,26 @@
|
||||
import { PageSectionBlock as PageSectionBlockType } from "@/gql/graphql";
|
||||
import { graphql } from "@/gql";
|
||||
import { type PageSectionBlockFragment } from "@/gql/graphql";
|
||||
import styles from "./pageSection.module.scss";
|
||||
import { Blocks } from "./Blocks";
|
||||
import slugify from "@sindresorhus/slugify";
|
||||
import { DecorativeIcon } from "../general/Icon";
|
||||
|
||||
const PageSectionBlockFragmentDefinition = graphql(`
|
||||
fragment PageSectionBlock on PageSectionBlock {
|
||||
title
|
||||
backgroundColor
|
||||
icon
|
||||
body {
|
||||
id
|
||||
blockType
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
export const PageSectionBlock = ({
|
||||
block,
|
||||
}: {
|
||||
block: PageSectionBlockType;
|
||||
block: PageSectionBlockFragment;
|
||||
}) => {
|
||||
const anchor = slugify(block.title);
|
||||
|
||||
@@ -31,7 +44,7 @@ export const PageSectionBlock = ({
|
||||
export const PageSectionNavigationBlock = ({
|
||||
sections,
|
||||
}: {
|
||||
sections: PageSectionBlockType[];
|
||||
sections: PageSectionBlockFragment[];
|
||||
}) => {
|
||||
if (!sections.length) {
|
||||
return <></>;
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
import { graphql } from "@/gql";
|
||||
import { type RichTextBlockFragment } from "@/gql/graphql";
|
||||
import styles from "./richTextBlock.module.scss";
|
||||
|
||||
export const RichTextBlock = ({ block }: any) => {
|
||||
const RichTextBlockFragmentDefinition = graphql(`
|
||||
fragment RichTextBlock on RichTextBlock {
|
||||
rawValue
|
||||
value
|
||||
}
|
||||
`);
|
||||
|
||||
export const RichTextBlock = ({ block }: { block: RichTextBlockFragment }) => {
|
||||
return (
|
||||
<div
|
||||
className={styles.richTextBlock}
|
||||
|
||||
@@ -9,7 +9,10 @@ import {
|
||||
} from "nuqs";
|
||||
import { EventItem } from "./EventItem";
|
||||
import { EventFilter, EventFilterExplained } from "./EventFilter";
|
||||
import { unmaskFragment } from "@/gql";
|
||||
import {
|
||||
EventCategoryFragmentDefinition,
|
||||
EventOrganizerFragmentDefinition,
|
||||
EventFragment,
|
||||
EventCategory,
|
||||
SingularEvent,
|
||||
@@ -48,11 +51,11 @@ export const EventContainer = ({
|
||||
}) => {
|
||||
const [mode, setMode] = useQueryState(
|
||||
"mode",
|
||||
parseAsStringLiteral(["list", "calendar"]).withDefault("list")
|
||||
parseAsStringLiteral(["list", "calendar"]).withDefault("list"),
|
||||
);
|
||||
const [categories, setCategories] = useQueryState(
|
||||
"category",
|
||||
parseAsArrayOf(parseAsString, ",")
|
||||
parseAsArrayOf(parseAsString, ","),
|
||||
);
|
||||
const [organizer, setOrganizer] = useQueryState("organizer", parseAsString);
|
||||
const [venue, setVenue] = useQueryState("venue", parseAsString);
|
||||
@@ -75,13 +78,15 @@ export const EventContainer = ({
|
||||
Filtering on an organizer with no upcoming events will work,
|
||||
and in that case it's included in the dropdown
|
||||
*/
|
||||
const allOrganizers = unmaskFragment(
|
||||
EventOrganizerFragmentDefinition,
|
||||
events.flatMap((x) => x.organizers),
|
||||
);
|
||||
const uniqueOrganizers: string[] = unique(
|
||||
events
|
||||
.map((x) => x.organizers)
|
||||
.flat()
|
||||
allOrganizers
|
||||
.filter((x) => x.__typename === "EventOrganizer")
|
||||
.map((x) => x.slug)
|
||||
.filter((x) => typeof x === "string" && x !== "")
|
||||
.filter((x) => typeof x === "string" && x !== ""),
|
||||
);
|
||||
const filterableOrganizers = uniqueOrganizers
|
||||
.map((slug) => eventOrganizers.find((haystack) => haystack.slug === slug))
|
||||
@@ -118,11 +123,11 @@ export const EventContainer = ({
|
||||
.flat()
|
||||
.filter((x) => x.venue?.__typename === "VenuePage")
|
||||
.map((x) => x.venue?.slug)
|
||||
.filter((x) => typeof x === "string")
|
||||
.filter((x) => typeof x === "string"),
|
||||
);
|
||||
const filterableVenues = venues
|
||||
.filter(
|
||||
(x) => venueSlugsWithUpcomingEvents.includes(x.slug) || x.slug === venue
|
||||
(x) => venueSlugsWithUpcomingEvents.includes(x.slug) || x.slug === venue,
|
||||
)
|
||||
.map((x) => venues.find((haystack) => haystack.slug === x.slug))
|
||||
.filter((x) => x !== undefined) as VenueFragment[];
|
||||
@@ -134,27 +139,32 @@ export const EventContainer = ({
|
||||
}
|
||||
}, [venues, venue]);
|
||||
|
||||
const filteredEvents = events
|
||||
.filter(
|
||||
(x) =>
|
||||
!organizer ||
|
||||
x.organizers.map((organizer) => organizer.slug).includes(organizer)
|
||||
)
|
||||
.filter(
|
||||
(x) =>
|
||||
!categories ||
|
||||
x.categories
|
||||
.map((eventCategory) => eventCategory.slug)
|
||||
.filter((x) => categories.includes(x)).length !== 0
|
||||
)
|
||||
.filter(
|
||||
(x) =>
|
||||
!venue ||
|
||||
x.occurrences
|
||||
.map((occurrence) => occurrence.venue?.slug)
|
||||
.filter((x) => typeof x === "string")
|
||||
.includes(venue)
|
||||
);
|
||||
const filteredEvents = events.filter((event) => {
|
||||
if (organizer) {
|
||||
const organizers = unmaskFragment(
|
||||
EventOrganizerFragmentDefinition,
|
||||
event.organizers,
|
||||
);
|
||||
if (!organizers.some((o) => o.slug === organizer)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (categories) {
|
||||
const eventCategories = unmaskFragment(
|
||||
EventCategoryFragmentDefinition,
|
||||
event.categories,
|
||||
);
|
||||
if (!eventCategories.some((c) => categories.includes(c.slug))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (venue) {
|
||||
if (!event.occurrences.some((occ) => occ.venue?.slug === venue)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
const [showFilter, setShowFilter] = useState(false);
|
||||
function toggleFilter() {
|
||||
@@ -302,12 +312,12 @@ function maybeYear(yearMonthString: string) {
|
||||
|
||||
const EventCalendar = ({ events }: { events: EventFragment[] }) => {
|
||||
const futureSingularEvents = getSingularEvents(events).filter(
|
||||
(x) => x.occurrence?.start && isTodayOrFuture(x.occurrence.start)
|
||||
(x) => x.occurrence?.start && isTodayOrFuture(x.occurrence.start),
|
||||
);
|
||||
const eventsByDate = organizeEventsInCalendar(futureSingularEvents);
|
||||
const yearMonths = Object.keys(eventsByDate);
|
||||
const [visibleYearMonths, setVisibleYearMonths] = useState(
|
||||
yearMonths.slice(0, 2)
|
||||
yearMonths.slice(0, 2),
|
||||
);
|
||||
|
||||
const toggleYearMonth = (yearMonth: string) => {
|
||||
@@ -327,9 +337,9 @@ const EventCalendar = ({ events }: { events: EventFragment[] }) => {
|
||||
yearMonthSum +
|
||||
Object.values(week).reduce(
|
||||
(weekSum, day) => weekSum + day.length,
|
||||
0
|
||||
0,
|
||||
),
|
||||
0
|
||||
0,
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,19 +1,30 @@
|
||||
import { EventFragment } from "@/lib/event";
|
||||
import { unmaskFragment } from "@/gql";
|
||||
import {
|
||||
EventCategoryFragmentDefinition,
|
||||
EventFragment,
|
||||
} from "@/lib/event";
|
||||
import { ImageFragmentDefinition } from "@/lib/common";
|
||||
import styles from "./eventHeader.module.scss";
|
||||
import { ImageFigure } from "@/components/general/Image";
|
||||
import { Breadcrumb } from "../general/Breadcrumb";
|
||||
import { Icon } from "../general/Icon";
|
||||
|
||||
export const EventHeader = ({ event }: { event: EventFragment }) => {
|
||||
const featuredImage: any = event.featuredImage;
|
||||
const featuredImage = unmaskFragment(
|
||||
ImageFragmentDefinition,
|
||||
event.featuredImage
|
||||
);
|
||||
const categories = unmaskFragment(
|
||||
EventCategoryFragmentDefinition,
|
||||
event.categories
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={styles.eventHeader}>
|
||||
<div className={styles.heading}>
|
||||
{/*<Breadcrumb link="/arrangementer" text="Arrangement" />*/}
|
||||
{event.categories.length > 0 && (
|
||||
{categories.length > 0 && (
|
||||
<div className={styles.categories}>
|
||||
{event.categories.map((category) => (
|
||||
{categories.map((category) => (
|
||||
<div key={category.name} className="tag">
|
||||
{category.name}
|
||||
</div>
|
||||
@@ -33,7 +44,7 @@ export const EventHeader = ({ event }: { event: EventFragment }) => {
|
||||
{featuredImage && (
|
||||
<ImageFigure
|
||||
src={featuredImage.url}
|
||||
alt={featuredImage.alt}
|
||||
alt={featuredImage.alt ?? ""}
|
||||
width={featuredImage.width}
|
||||
height={featuredImage.height}
|
||||
attribution={featuredImage.attribution}
|
||||
|
||||
@@ -1,15 +1,23 @@
|
||||
"use client";
|
||||
|
||||
import { EventFragment, EventOrganizer } from "@/lib/event";
|
||||
import { unmaskFragment } from "@/gql";
|
||||
import {
|
||||
EventFragment,
|
||||
EventOrganizerFragmentDefinition,
|
||||
} from "@/lib/event";
|
||||
import styles from "./organizerList.module.scss";
|
||||
import Link from "next/link";
|
||||
import { Fragment } from "react";
|
||||
|
||||
export const OrganizerList = ({ event }: { event: EventFragment }) => {
|
||||
const total = event.organizers.length;
|
||||
const organizers = unmaskFragment(
|
||||
EventOrganizerFragmentDefinition,
|
||||
event.organizers
|
||||
);
|
||||
const total = organizers.length;
|
||||
return (
|
||||
<div className={styles.organizerList}>
|
||||
{event.organizers.map((organizer, index) => {
|
||||
{organizers.map((organizer, index) => {
|
||||
const url = organizer.association?.url ?? organizer.externalUrl ?? null;
|
||||
const hasValidUrl =
|
||||
typeof url === "string" &&
|
||||
|
||||
@@ -6,7 +6,7 @@ export const PageHeader = ({
|
||||
align
|
||||
}: {
|
||||
heading: string;
|
||||
lead?: string;
|
||||
lead?: string | null;
|
||||
align?: "center" | "left"
|
||||
}) => {
|
||||
return (
|
||||
|
||||
@@ -21,9 +21,11 @@ export const NewsItem = ({ news }: { news: NewsFragment }) => {
|
||||
)}
|
||||
</div>
|
||||
<div className={styles.text}>
|
||||
<p className={styles.date}>
|
||||
{formatDate(news.firstPublishedAt, 'd. MMMM yyyy')}
|
||||
</p>
|
||||
{news.firstPublishedAt && (
|
||||
<p className={styles.date}>
|
||||
{formatDate(news.firstPublishedAt, "d. MMMM yyyy")}
|
||||
</p>
|
||||
)}
|
||||
<h2 className={styles.title}>{news.title}</h2>
|
||||
<p className={styles.lead}>{news.excerpt}</p>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,24 @@
|
||||
import { SponsorBlock } from "@/gql/graphql";
|
||||
import { Blocks } from "../blocks/Blocks";
|
||||
import { graphql, unmaskFragment } from "@/gql";
|
||||
import { type SponsorFragment } from "@/gql/graphql";
|
||||
import { Image } from "../general/Image";
|
||||
import { ImageFragmentDefinition } from "@/lib/common";
|
||||
import styles from "./sponsorList.module.scss";
|
||||
|
||||
const SponsorItem = ({ sponsor }: { sponsor: SponsorBlock }) => {
|
||||
const { name, logo, website, text } = sponsor;
|
||||
export const SponsorFragmentDefinition = graphql(`
|
||||
fragment Sponsor on SponsorBlock {
|
||||
id
|
||||
name
|
||||
logo {
|
||||
...Image
|
||||
}
|
||||
text
|
||||
website
|
||||
}
|
||||
`);
|
||||
|
||||
const SponsorItem = ({ sponsor }: { sponsor: SponsorFragment }) => {
|
||||
const { name, logo: maskedLogo, website, text } = sponsor;
|
||||
const logo = unmaskFragment(ImageFragmentDefinition, maskedLogo);
|
||||
return (
|
||||
<li className={styles.sponsorItem}>
|
||||
<div className={styles.image}>
|
||||
@@ -38,7 +52,7 @@ const SponsorItem = ({ sponsor }: { sponsor: SponsorBlock }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const SponsorList = ({ sponsors }: { sponsors: SponsorBlock[] }) => {
|
||||
export const SponsorList = ({ sponsors }: { sponsors: SponsorFragment[] }) => {
|
||||
return (
|
||||
<section className={styles.sponsorList}>
|
||||
<ul>
|
||||
|
||||
@@ -16,46 +16,46 @@ export type FragmentType<TDocumentType extends DocumentTypeDecoration<any, any>>
|
||||
: never;
|
||||
|
||||
// return non-nullable if `fragmentType` is non-nullable
|
||||
export function useFragment<TType>(
|
||||
export function unmaskFragment<TType>(
|
||||
_documentNode: DocumentTypeDecoration<TType, any>,
|
||||
fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>
|
||||
): TType;
|
||||
// return nullable if `fragmentType` is undefined
|
||||
export function useFragment<TType>(
|
||||
export function unmaskFragment<TType>(
|
||||
_documentNode: DocumentTypeDecoration<TType, any>,
|
||||
fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | undefined
|
||||
): TType | undefined;
|
||||
// return nullable if `fragmentType` is nullable
|
||||
export function useFragment<TType>(
|
||||
export function unmaskFragment<TType>(
|
||||
_documentNode: DocumentTypeDecoration<TType, any>,
|
||||
fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null
|
||||
): TType | null;
|
||||
// return nullable if `fragmentType` is nullable or undefined
|
||||
export function useFragment<TType>(
|
||||
export function unmaskFragment<TType>(
|
||||
_documentNode: DocumentTypeDecoration<TType, any>,
|
||||
fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null | undefined
|
||||
): TType | null | undefined;
|
||||
// return array of non-nullable if `fragmentType` is array of non-nullable
|
||||
export function useFragment<TType>(
|
||||
export function unmaskFragment<TType>(
|
||||
_documentNode: DocumentTypeDecoration<TType, any>,
|
||||
fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>>
|
||||
): Array<TType>;
|
||||
// return array of nullable if `fragmentType` is array of nullable
|
||||
export function useFragment<TType>(
|
||||
export function unmaskFragment<TType>(
|
||||
_documentNode: DocumentTypeDecoration<TType, any>,
|
||||
fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined
|
||||
): Array<TType> | null | undefined;
|
||||
// return readonly array of non-nullable if `fragmentType` is array of non-nullable
|
||||
export function useFragment<TType>(
|
||||
export function unmaskFragment<TType>(
|
||||
_documentNode: DocumentTypeDecoration<TType, any>,
|
||||
fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>
|
||||
): ReadonlyArray<TType>;
|
||||
// return readonly array of nullable if `fragmentType` is array of nullable
|
||||
export function useFragment<TType>(
|
||||
export function unmaskFragment<TType>(
|
||||
_documentNode: DocumentTypeDecoration<TType, any>,
|
||||
fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined
|
||||
): ReadonlyArray<TType> | null | undefined;
|
||||
export function useFragment<TType>(
|
||||
export function unmaskFragment<TType>(
|
||||
_documentNode: DocumentTypeDecoration<TType, any>,
|
||||
fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | Array<FragmentType<DocumentTypeDecoration<TType, any>>> | ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined
|
||||
): TType | Array<TType> | ReadonlyArray<TType> | null | undefined {
|
||||
|
||||
+130
-28
@@ -32,28 +32,45 @@ type Documents = {
|
||||
"\n query allVenueSlugs {\n pages(contentType: \"venues.VenuePage\", limit: 100) {\n id\n slug\n }\n }\n ": typeof types.AllVenueSlugsDocument,
|
||||
"\n query venueIndex {\n index: venueIndex {\n ... on VenueIndex {\n ...VenueIndex\n }\n }\n venues: pages(contentType: \"venues.VenuePage\", limit: 100) {\n ... on VenuePage {\n ...Venue\n }\n }\n }\n": typeof types.VenueIndexDocument,
|
||||
"\n fragment VenueIndex on VenueIndex {\n ... on VenueIndex {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n }\n": typeof types.VenueIndexFragmentDoc,
|
||||
"\n fragment Venue on VenuePage {\n __typename\n id\n slug\n title\n seoTitle\n searchDescription\n images {\n ...Blocks\n }\n body {\n ...Blocks\n }\n featuredImage {\n ...Image\n }\n showAsBookable\n showInOverview\n floor\n preposition\n usedFor\n techSpecsUrl\n capabilityAudio\n capabilityAudioVideo\n capabilityBar\n capabilityLighting\n capacityLegal\n capacityStanding\n capacitySitting\n }\n": typeof types.VenueFragmentDoc,
|
||||
"\n fragment Venue on VenuePage {\n __typename\n id\n slug\n title\n seoTitle\n searchDescription\n images {\n __typename\n ... on ImageSliderBlock {\n ...ImageSliderBlock\n }\n }\n body {\n ...Blocks\n }\n featuredImage {\n ...Image\n }\n showAsBookable\n showInOverview\n floor\n preposition\n usedFor\n techSpecsUrl\n capabilityAudio\n capabilityAudioVideo\n capabilityBar\n capabilityLighting\n capacityLegal\n capacityStanding\n capacitySitting\n }\n": typeof types.VenueFragmentDoc,
|
||||
"\n fragment Home on HomePage {\n ... on HomePage {\n featuredEvents {\n id\n }\n }\n }\n": typeof types.HomeFragmentDoc,
|
||||
"\n query home {\n events: eventIndex {\n ... on EventIndex {\n futureEvents {\n ... on EventPage {\n ...Event\n }\n }\n }\n }\n home: page(contentType: \"home.HomePage\", urlPath: \"/home/\") {\n ... on HomePage {\n ...Home\n }\n }\n news: pages(contentType: \"news.newsPage\", order: \"-first_published_at\", limit: 4) {\n ... on NewsPage {\n ...News\n }\n }\n }\n ": typeof types.HomeDocument,
|
||||
"\n query search($query: String) {\n results: search(query: $query) {\n __typename\n ... on PageInterface {\n slug\n }\n ... on NewsPage {\n id\n title\n }\n ... on EventPage {\n id\n title\n }\n ... on GenericPage {\n id\n title\n }\n ... on VenuePage {\n id\n title\n }\n ... on AssociationPage {\n id\n title\n associationType\n }\n }\n }\n ": typeof types.SearchDocument,
|
||||
"\n query sponsors {\n page: sponsorsPage {\n ... on SponsorsPage {\n ...SponsorsPage\n }\n }\n }\n": typeof types.SponsorsDocument,
|
||||
"\n fragment SponsorsPage on SponsorsPage {\n ... on SponsorsPage {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n sponsors {\n ... on SponsorBlock {\n id\n name\n logo {\n ...Image\n }\n text\n website\n }\n }\n }\n }\n": typeof types.SponsorsPageFragmentDoc,
|
||||
"\n fragment SponsorsPage on SponsorsPage {\n ... on SponsorsPage {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n sponsors {\n ... on SponsorBlock {\n ...Sponsor\n }\n }\n }\n }\n": typeof types.SponsorsPageFragmentDoc,
|
||||
"\n query venueRentalIndex {\n index: venueRentalIndex {\n ... on VenueRentalIndex {\n ...VenueRentalIndex\n }\n }\n venues: pages(contentType: \"venues.VenuePage\", limit: 100) {\n ... on VenuePage {\n ...Venue\n }\n }\n }\n": typeof types.VenueRentalIndexDocument,
|
||||
"\n fragment VenueRentalIndex on VenueRentalIndex {\n ... on VenueRentalIndex {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n }\n": typeof types.VenueRentalIndexFragmentDoc,
|
||||
"\n fragment LeafBlocks on StreamFieldInterface {\n id\n blockType\n field\n ... on RichTextBlock {\n rawValue\n value\n }\n ... on ImageWithTextBlock {\n image {\n ...Image\n }\n imageFormat\n text\n }\n ... on ImageSliderBlock {\n images {\n ... on ImageSliderItemBlock {\n image {\n ...Image\n }\n text\n }\n }\n }\n ... on HorizontalRuleBlock {\n color\n }\n ... on FeaturedBlock {\n title\n featuredBlockText: text\n linkText\n imagePosition\n backgroundColor\n featuredPage {\n contentType\n pageType\n url\n ... on EventPage {\n featuredImage {\n ...Image\n }\n }\n ... on NewsPage {\n featuredImage {\n ...Image\n }\n }\n }\n featuredImageOverride {\n ...Image\n }\n }\n ... on ContactListBlock {\n items {\n blockType\n ... on ContactEntityBlock {\n contactEntity {\n ...ContactEntity\n }\n }\n }\n }\n ... on EmbedBlock {\n url\n embed\n rawEmbed\n }\n ... on FactBoxBlock {\n backgroundColor\n factBoxBody: body\n }\n }\n": typeof types.LeafBlocksFragmentDoc,
|
||||
"\n fragment OneLevelOfBlocks on StreamFieldInterface {\n ...LeafBlocks\n ... on AccordionBlock {\n heading\n body {\n ...LeafBlocks\n }\n }\n ... on PageSectionBlock {\n title\n backgroundColor\n icon\n body {\n ...LeafBlocks\n }\n }\n }\n": typeof types.OneLevelOfBlocksFragmentDoc,
|
||||
"\n fragment Blocks on StreamFieldInterface {\n ... on AccordionBlock {\n heading\n body {\n ...OneLevelOfBlocks\n }\n }\n ... on PageSectionBlock {\n title\n backgroundColor\n icon\n body {\n ...OneLevelOfBlocks\n }\n }\n ... on ContactSectionBlock {\n title\n text\n blocks {\n ... on ContactSubsectionBlock {\n title\n text\n blocks {\n ...OneLevelOfBlocks\n }\n }\n ...OneLevelOfBlocks\n }\n }\n ...OneLevelOfBlocks\n }\n": typeof types.BlocksFragmentDoc,
|
||||
"\n fragment AccordionBlock on AccordionBlock {\n heading\n body {\n id\n blockType\n }\n }\n": typeof types.AccordionBlockFragmentDoc,
|
||||
"\n fragment ContactEntityBlock on ContactEntityBlock {\n contactEntity {\n ...ContactEntity\n }\n }\n": typeof types.ContactEntityBlockFragmentDoc,
|
||||
"\n fragment ContactListBlock on ContactListBlock {\n items {\n blockType\n ... on ContactEntityBlock {\n contactEntity {\n ...ContactEntity\n }\n }\n }\n }\n": typeof types.ContactListBlockFragmentDoc,
|
||||
"\n fragment ContactSectionBlock on ContactSectionBlock {\n title\n text\n blocks {\n id\n blockType\n }\n }\n": typeof types.ContactSectionBlockFragmentDoc,
|
||||
"\n fragment ContactSubsectionBlock on ContactSubsectionBlock {\n title\n text\n blocks {\n id\n blockType\n }\n }\n": typeof types.ContactSubsectionBlockFragmentDoc,
|
||||
"\n fragment EmbedBlock on EmbedBlock {\n url\n embed\n rawEmbed\n }\n": typeof types.EmbedBlockFragmentDoc,
|
||||
"\n fragment FactBoxBlock on FactBoxBlock {\n backgroundColor\n factBoxBody: body\n }\n": typeof types.FactBoxBlockFragmentDoc,
|
||||
"\n fragment FeaturedBlock on FeaturedBlock {\n title\n featuredBlockText: text\n linkText\n imagePosition\n backgroundColor\n featuredPage {\n contentType\n pageType\n url\n ... on EventPage {\n featuredImage {\n ...Image\n }\n }\n ... on NewsPage {\n featuredImage {\n ...Image\n }\n }\n }\n featuredImageOverride {\n ...Image\n }\n }\n": typeof types.FeaturedBlockFragmentDoc,
|
||||
"\n fragment HorizontalRuleBlock on HorizontalRuleBlock {\n color\n }\n": typeof types.HorizontalRuleBlockFragmentDoc,
|
||||
"\n fragment ImageSliderItem on ImageSliderItemBlock {\n image {\n ...Image\n }\n text\n }\n": typeof types.ImageSliderItemFragmentDoc,
|
||||
"\n fragment ImageSliderBlock on ImageSliderBlock {\n images {\n __typename\n ... on ImageSliderItemBlock {\n ...ImageSliderItem\n }\n }\n }\n": typeof types.ImageSliderBlockFragmentDoc,
|
||||
"\n fragment ImageWithTextBlock on ImageWithTextBlock {\n image {\n ...Image\n }\n imageFormat\n text\n }\n": typeof types.ImageWithTextBlockFragmentDoc,
|
||||
"\n fragment PageSectionBlock on PageSectionBlock {\n title\n backgroundColor\n icon\n body {\n id\n blockType\n }\n }\n": typeof types.PageSectionBlockFragmentDoc,
|
||||
"\n fragment RichTextBlock on RichTextBlock {\n rawValue\n value\n }\n": typeof types.RichTextBlockFragmentDoc,
|
||||
"\n fragment Sponsor on SponsorBlock {\n id\n name\n logo {\n ...Image\n }\n text\n website\n }\n": typeof types.SponsorFragmentDoc,
|
||||
"\n fragment LeafBlocks on StreamFieldInterface {\n id\n blockType\n field\n ... on RichTextBlock {\n ...RichTextBlock\n }\n ... on ImageWithTextBlock {\n ...ImageWithTextBlock\n }\n ... on ImageSliderBlock {\n ...ImageSliderBlock\n }\n ... on HorizontalRuleBlock {\n ...HorizontalRuleBlock\n }\n ... on FeaturedBlock {\n ...FeaturedBlock\n }\n ... on ContactListBlock {\n ...ContactListBlock\n }\n ... on EmbedBlock {\n ...EmbedBlock\n }\n ... on FactBoxBlock {\n ...FactBoxBlock\n }\n }\n": typeof types.LeafBlocksFragmentDoc,
|
||||
"\n fragment OneLevelOfBlocks on StreamFieldInterface {\n ...LeafBlocks\n ... on AccordionBlock {\n ...AccordionBlock\n body {\n ...LeafBlocks\n }\n }\n ... on PageSectionBlock {\n ...PageSectionBlock\n body {\n ...LeafBlocks\n }\n }\n }\n": typeof types.OneLevelOfBlocksFragmentDoc,
|
||||
"\n fragment Blocks on StreamFieldInterface {\n ...OneLevelOfBlocks\n ... on AccordionBlock {\n ...AccordionBlock\n body {\n ...OneLevelOfBlocks\n }\n }\n ... on PageSectionBlock {\n ...PageSectionBlock\n body {\n ...OneLevelOfBlocks\n }\n }\n ... on ContactSectionBlock {\n ...ContactSectionBlock\n blocks {\n ...OneLevelOfBlocks\n ... on ContactSubsectionBlock {\n ...ContactSubsectionBlock\n blocks {\n ...OneLevelOfBlocks\n }\n }\n }\n }\n }\n": typeof types.BlocksFragmentDoc,
|
||||
"\n fragment Image on CustomImage {\n id\n url\n width\n height\n alt\n attribution\n }\n": typeof types.ImageFragmentDoc,
|
||||
"\n fragment ContactEntity on ContactEntity {\n id\n name\n contactType\n title\n email\n phoneNumber\n image {\n ...Image\n }\n }\n": typeof types.ContactEntityFragmentDoc,
|
||||
"\n fragment Event on EventPage {\n __typename\n id\n slug\n seoTitle\n searchDescription\n title\n subtitle\n lead\n body {\n ...OneLevelOfBlocks\n }\n featuredImage {\n ...Image\n }\n pig\n facebookUrl\n ticketUrl\n free\n priceRegular\n priceMember\n priceStudent\n categories {\n ... on EventCategory {\n name\n slug\n pig\n }\n }\n occurrences(limit: 5000) {\n ... on EventOccurrence {\n __typename\n id\n start\n end\n venue {\n __typename\n id\n slug\n title\n preposition\n url\n }\n venueCustom\n }\n }\n organizers {\n ... on EventOrganizer {\n id\n name\n slug\n externalUrl\n association {\n ... on AssociationPage {\n url\n }\n }\n }\n }\n }\n": typeof types.EventFragmentDoc,
|
||||
"\n fragment EventCategory on EventCategory {\n __typename\n name\n slug\n pig\n showInFilters\n }\n": typeof types.EventCategoryFragmentDoc,
|
||||
"\n fragment EventOrganizer on EventOrganizer {\n __typename\n id\n name\n slug\n externalUrl\n association {\n ... on AssociationPage {\n url\n }\n }\n }\n": typeof types.EventOrganizerFragmentDoc,
|
||||
"\n fragment Event on EventPage {\n __typename\n id\n slug\n seoTitle\n searchDescription\n title\n subtitle\n lead\n body {\n ...OneLevelOfBlocks\n }\n featuredImage {\n ...Image\n }\n pig\n facebookUrl\n ticketUrl\n free\n priceRegular\n priceMember\n priceStudent\n categories {\n ... on EventCategory {\n ...EventCategory\n }\n }\n occurrences(limit: 5000) {\n ... on EventOccurrence {\n __typename\n id\n start\n end\n venue {\n __typename\n id\n slug\n title\n preposition\n url\n }\n venueCustom\n }\n }\n organizers {\n ... on EventOrganizer {\n ...EventOrganizer\n }\n }\n }\n": typeof types.EventFragmentDoc,
|
||||
"\n fragment EventIndex on EventIndex {\n __typename\n id\n slug\n seoTitle\n searchDescription\n title\n }\n": typeof types.EventIndexFragmentDoc,
|
||||
"\n query eventIndexMetadata {\n index: eventIndex {\n ... on EventIndex {\n ...EventIndex\n }\n }\n }\n": typeof types.EventIndexMetadataDocument,
|
||||
"\n query futureEvents {\n index: eventIndex {\n ... on EventIndex {\n ...EventIndex\n }\n }\n events: eventIndex {\n ... on EventIndex {\n futureEvents {\n ... on EventPage {\n ...Event\n }\n }\n }\n }\n eventCategories: eventCategories(limit: 5000) {\n ... on EventCategory {\n name\n slug\n showInFilters\n }\n }\n eventOrganizers: eventOrganizers(limit: 5000) {\n ... on EventOrganizer {\n id\n name\n slug\n }\n }\n venues: pages(contentType: \"venues.VenuePage\") {\n ... on VenuePage {\n id\n title\n slug\n preposition\n }\n }\n }\n": typeof types.FutureEventsDocument,
|
||||
"\n query futureEvents {\n index: eventIndex {\n ... on EventIndex {\n ...EventIndex\n }\n }\n events: eventIndex {\n ... on EventIndex {\n futureEvents {\n ... on EventPage {\n ...Event\n }\n }\n }\n }\n eventCategories: eventCategories(limit: 5000) {\n ... on EventCategory {\n ...EventCategory\n }\n }\n eventOrganizers: eventOrganizers(limit: 5000) {\n ... on EventOrganizer {\n ...EventOrganizer\n }\n }\n venues: pages(contentType: \"venues.VenuePage\") {\n ... on VenuePage {\n id\n title\n slug\n preposition\n }\n }\n }\n": typeof types.FutureEventsDocument,
|
||||
"\n fragment News on NewsPage {\n __typename\n id\n slug\n seoTitle\n searchDescription\n title\n firstPublishedAt\n excerpt\n lead\n featuredImage {\n ...Image\n }\n body {\n ...Blocks\n }\n }\n": typeof types.NewsFragmentDoc,
|
||||
"\n fragment NewsIndex on NewsIndex {\n __typename\n id\n slug\n seoTitle\n searchDescription\n title\n lead\n }\n": typeof types.NewsIndexFragmentDoc,
|
||||
"\n query news {\n index: newsIndex {\n ... on NewsIndex {\n ...NewsIndex\n }\n }\n news: pages(contentType: \"news.NewsPage\", order: \"-first_published_at\", limit: 1000) {\n ... on NewsPage {\n ...News\n }\n }\n }\n": typeof types.NewsDocument,
|
||||
"\n query openingHoursSets {\n openingHoursSets {\n ...OpeningHoursSetFragment\n }\n }\n": typeof types.OpeningHoursSetsDocument,
|
||||
"\n fragment OpeningHoursSetFragment on OpeningHoursSet {\n name\n effectiveFrom\n effectiveTo\n announcement\n items {\n id\n function\n week {\n id\n blockType\n ... on OpeningHoursWeekBlock {\n ...OpeningHoursWeekBlock\n }\n }\n }\n }\n": typeof types.OpeningHoursSetFragmentFragmentDoc,
|
||||
"\n query openingHoursSets {\n openingHoursSets {\n ...OpeningHoursSet\n }\n }\n": typeof types.OpeningHoursSetsDocument,
|
||||
"\n fragment OpeningHoursSet on OpeningHoursSet {\n name\n effectiveFrom\n effectiveTo\n announcement\n items {\n id\n function\n week {\n __typename\n ... on OpeningHoursWeekBlock {\n ...OpeningHoursWeekBlock\n }\n }\n }\n }\n": typeof types.OpeningHoursSetFragmentDoc,
|
||||
"\n fragment OpeningHoursRangeBlock on OpeningHoursRangeBlock {\n timeFrom\n timeTo\n custom\n }\n": typeof types.OpeningHoursRangeBlockFragmentDoc,
|
||||
"\n fragment OpeningHoursWeekBlock on OpeningHoursWeekBlock {\n monday {\n ... on OpeningHoursRangeBlock {\n ...OpeningHoursRangeBlock\n }\n }\n tuesday {\n ... on OpeningHoursRangeBlock {\n ...OpeningHoursRangeBlock\n }\n }\n wednesday {\n ... on OpeningHoursRangeBlock {\n ...OpeningHoursRangeBlock\n }\n }\n thursday {\n ... on OpeningHoursRangeBlock {\n ...OpeningHoursRangeBlock\n }\n }\n friday {\n ... on OpeningHoursRangeBlock {\n ...OpeningHoursRangeBlock\n }\n }\n saturday {\n ... on OpeningHoursRangeBlock {\n ...OpeningHoursRangeBlock\n }\n }\n sunday {\n ... on OpeningHoursRangeBlock {\n ...OpeningHoursRangeBlock\n }\n }\n }\n": typeof types.OpeningHoursWeekBlockFragmentDoc,
|
||||
};
|
||||
@@ -76,28 +93,45 @@ const documents: Documents = {
|
||||
"\n query allVenueSlugs {\n pages(contentType: \"venues.VenuePage\", limit: 100) {\n id\n slug\n }\n }\n ": types.AllVenueSlugsDocument,
|
||||
"\n query venueIndex {\n index: venueIndex {\n ... on VenueIndex {\n ...VenueIndex\n }\n }\n venues: pages(contentType: \"venues.VenuePage\", limit: 100) {\n ... on VenuePage {\n ...Venue\n }\n }\n }\n": types.VenueIndexDocument,
|
||||
"\n fragment VenueIndex on VenueIndex {\n ... on VenueIndex {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n }\n": types.VenueIndexFragmentDoc,
|
||||
"\n fragment Venue on VenuePage {\n __typename\n id\n slug\n title\n seoTitle\n searchDescription\n images {\n ...Blocks\n }\n body {\n ...Blocks\n }\n featuredImage {\n ...Image\n }\n showAsBookable\n showInOverview\n floor\n preposition\n usedFor\n techSpecsUrl\n capabilityAudio\n capabilityAudioVideo\n capabilityBar\n capabilityLighting\n capacityLegal\n capacityStanding\n capacitySitting\n }\n": types.VenueFragmentDoc,
|
||||
"\n fragment Venue on VenuePage {\n __typename\n id\n slug\n title\n seoTitle\n searchDescription\n images {\n __typename\n ... on ImageSliderBlock {\n ...ImageSliderBlock\n }\n }\n body {\n ...Blocks\n }\n featuredImage {\n ...Image\n }\n showAsBookable\n showInOverview\n floor\n preposition\n usedFor\n techSpecsUrl\n capabilityAudio\n capabilityAudioVideo\n capabilityBar\n capabilityLighting\n capacityLegal\n capacityStanding\n capacitySitting\n }\n": types.VenueFragmentDoc,
|
||||
"\n fragment Home on HomePage {\n ... on HomePage {\n featuredEvents {\n id\n }\n }\n }\n": types.HomeFragmentDoc,
|
||||
"\n query home {\n events: eventIndex {\n ... on EventIndex {\n futureEvents {\n ... on EventPage {\n ...Event\n }\n }\n }\n }\n home: page(contentType: \"home.HomePage\", urlPath: \"/home/\") {\n ... on HomePage {\n ...Home\n }\n }\n news: pages(contentType: \"news.newsPage\", order: \"-first_published_at\", limit: 4) {\n ... on NewsPage {\n ...News\n }\n }\n }\n ": types.HomeDocument,
|
||||
"\n query search($query: String) {\n results: search(query: $query) {\n __typename\n ... on PageInterface {\n slug\n }\n ... on NewsPage {\n id\n title\n }\n ... on EventPage {\n id\n title\n }\n ... on GenericPage {\n id\n title\n }\n ... on VenuePage {\n id\n title\n }\n ... on AssociationPage {\n id\n title\n associationType\n }\n }\n }\n ": types.SearchDocument,
|
||||
"\n query sponsors {\n page: sponsorsPage {\n ... on SponsorsPage {\n ...SponsorsPage\n }\n }\n }\n": types.SponsorsDocument,
|
||||
"\n fragment SponsorsPage on SponsorsPage {\n ... on SponsorsPage {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n sponsors {\n ... on SponsorBlock {\n id\n name\n logo {\n ...Image\n }\n text\n website\n }\n }\n }\n }\n": types.SponsorsPageFragmentDoc,
|
||||
"\n fragment SponsorsPage on SponsorsPage {\n ... on SponsorsPage {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n sponsors {\n ... on SponsorBlock {\n ...Sponsor\n }\n }\n }\n }\n": types.SponsorsPageFragmentDoc,
|
||||
"\n query venueRentalIndex {\n index: venueRentalIndex {\n ... on VenueRentalIndex {\n ...VenueRentalIndex\n }\n }\n venues: pages(contentType: \"venues.VenuePage\", limit: 100) {\n ... on VenuePage {\n ...Venue\n }\n }\n }\n": types.VenueRentalIndexDocument,
|
||||
"\n fragment VenueRentalIndex on VenueRentalIndex {\n ... on VenueRentalIndex {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n }\n": types.VenueRentalIndexFragmentDoc,
|
||||
"\n fragment LeafBlocks on StreamFieldInterface {\n id\n blockType\n field\n ... on RichTextBlock {\n rawValue\n value\n }\n ... on ImageWithTextBlock {\n image {\n ...Image\n }\n imageFormat\n text\n }\n ... on ImageSliderBlock {\n images {\n ... on ImageSliderItemBlock {\n image {\n ...Image\n }\n text\n }\n }\n }\n ... on HorizontalRuleBlock {\n color\n }\n ... on FeaturedBlock {\n title\n featuredBlockText: text\n linkText\n imagePosition\n backgroundColor\n featuredPage {\n contentType\n pageType\n url\n ... on EventPage {\n featuredImage {\n ...Image\n }\n }\n ... on NewsPage {\n featuredImage {\n ...Image\n }\n }\n }\n featuredImageOverride {\n ...Image\n }\n }\n ... on ContactListBlock {\n items {\n blockType\n ... on ContactEntityBlock {\n contactEntity {\n ...ContactEntity\n }\n }\n }\n }\n ... on EmbedBlock {\n url\n embed\n rawEmbed\n }\n ... on FactBoxBlock {\n backgroundColor\n factBoxBody: body\n }\n }\n": types.LeafBlocksFragmentDoc,
|
||||
"\n fragment OneLevelOfBlocks on StreamFieldInterface {\n ...LeafBlocks\n ... on AccordionBlock {\n heading\n body {\n ...LeafBlocks\n }\n }\n ... on PageSectionBlock {\n title\n backgroundColor\n icon\n body {\n ...LeafBlocks\n }\n }\n }\n": types.OneLevelOfBlocksFragmentDoc,
|
||||
"\n fragment Blocks on StreamFieldInterface {\n ... on AccordionBlock {\n heading\n body {\n ...OneLevelOfBlocks\n }\n }\n ... on PageSectionBlock {\n title\n backgroundColor\n icon\n body {\n ...OneLevelOfBlocks\n }\n }\n ... on ContactSectionBlock {\n title\n text\n blocks {\n ... on ContactSubsectionBlock {\n title\n text\n blocks {\n ...OneLevelOfBlocks\n }\n }\n ...OneLevelOfBlocks\n }\n }\n ...OneLevelOfBlocks\n }\n": types.BlocksFragmentDoc,
|
||||
"\n fragment AccordionBlock on AccordionBlock {\n heading\n body {\n id\n blockType\n }\n }\n": types.AccordionBlockFragmentDoc,
|
||||
"\n fragment ContactEntityBlock on ContactEntityBlock {\n contactEntity {\n ...ContactEntity\n }\n }\n": types.ContactEntityBlockFragmentDoc,
|
||||
"\n fragment ContactListBlock on ContactListBlock {\n items {\n blockType\n ... on ContactEntityBlock {\n contactEntity {\n ...ContactEntity\n }\n }\n }\n }\n": types.ContactListBlockFragmentDoc,
|
||||
"\n fragment ContactSectionBlock on ContactSectionBlock {\n title\n text\n blocks {\n id\n blockType\n }\n }\n": types.ContactSectionBlockFragmentDoc,
|
||||
"\n fragment ContactSubsectionBlock on ContactSubsectionBlock {\n title\n text\n blocks {\n id\n blockType\n }\n }\n": types.ContactSubsectionBlockFragmentDoc,
|
||||
"\n fragment EmbedBlock on EmbedBlock {\n url\n embed\n rawEmbed\n }\n": types.EmbedBlockFragmentDoc,
|
||||
"\n fragment FactBoxBlock on FactBoxBlock {\n backgroundColor\n factBoxBody: body\n }\n": types.FactBoxBlockFragmentDoc,
|
||||
"\n fragment FeaturedBlock on FeaturedBlock {\n title\n featuredBlockText: text\n linkText\n imagePosition\n backgroundColor\n featuredPage {\n contentType\n pageType\n url\n ... on EventPage {\n featuredImage {\n ...Image\n }\n }\n ... on NewsPage {\n featuredImage {\n ...Image\n }\n }\n }\n featuredImageOverride {\n ...Image\n }\n }\n": types.FeaturedBlockFragmentDoc,
|
||||
"\n fragment HorizontalRuleBlock on HorizontalRuleBlock {\n color\n }\n": types.HorizontalRuleBlockFragmentDoc,
|
||||
"\n fragment ImageSliderItem on ImageSliderItemBlock {\n image {\n ...Image\n }\n text\n }\n": types.ImageSliderItemFragmentDoc,
|
||||
"\n fragment ImageSliderBlock on ImageSliderBlock {\n images {\n __typename\n ... on ImageSliderItemBlock {\n ...ImageSliderItem\n }\n }\n }\n": types.ImageSliderBlockFragmentDoc,
|
||||
"\n fragment ImageWithTextBlock on ImageWithTextBlock {\n image {\n ...Image\n }\n imageFormat\n text\n }\n": types.ImageWithTextBlockFragmentDoc,
|
||||
"\n fragment PageSectionBlock on PageSectionBlock {\n title\n backgroundColor\n icon\n body {\n id\n blockType\n }\n }\n": types.PageSectionBlockFragmentDoc,
|
||||
"\n fragment RichTextBlock on RichTextBlock {\n rawValue\n value\n }\n": types.RichTextBlockFragmentDoc,
|
||||
"\n fragment Sponsor on SponsorBlock {\n id\n name\n logo {\n ...Image\n }\n text\n website\n }\n": types.SponsorFragmentDoc,
|
||||
"\n fragment LeafBlocks on StreamFieldInterface {\n id\n blockType\n field\n ... on RichTextBlock {\n ...RichTextBlock\n }\n ... on ImageWithTextBlock {\n ...ImageWithTextBlock\n }\n ... on ImageSliderBlock {\n ...ImageSliderBlock\n }\n ... on HorizontalRuleBlock {\n ...HorizontalRuleBlock\n }\n ... on FeaturedBlock {\n ...FeaturedBlock\n }\n ... on ContactListBlock {\n ...ContactListBlock\n }\n ... on EmbedBlock {\n ...EmbedBlock\n }\n ... on FactBoxBlock {\n ...FactBoxBlock\n }\n }\n": types.LeafBlocksFragmentDoc,
|
||||
"\n fragment OneLevelOfBlocks on StreamFieldInterface {\n ...LeafBlocks\n ... on AccordionBlock {\n ...AccordionBlock\n body {\n ...LeafBlocks\n }\n }\n ... on PageSectionBlock {\n ...PageSectionBlock\n body {\n ...LeafBlocks\n }\n }\n }\n": types.OneLevelOfBlocksFragmentDoc,
|
||||
"\n fragment Blocks on StreamFieldInterface {\n ...OneLevelOfBlocks\n ... on AccordionBlock {\n ...AccordionBlock\n body {\n ...OneLevelOfBlocks\n }\n }\n ... on PageSectionBlock {\n ...PageSectionBlock\n body {\n ...OneLevelOfBlocks\n }\n }\n ... on ContactSectionBlock {\n ...ContactSectionBlock\n blocks {\n ...OneLevelOfBlocks\n ... on ContactSubsectionBlock {\n ...ContactSubsectionBlock\n blocks {\n ...OneLevelOfBlocks\n }\n }\n }\n }\n }\n": types.BlocksFragmentDoc,
|
||||
"\n fragment Image on CustomImage {\n id\n url\n width\n height\n alt\n attribution\n }\n": types.ImageFragmentDoc,
|
||||
"\n fragment ContactEntity on ContactEntity {\n id\n name\n contactType\n title\n email\n phoneNumber\n image {\n ...Image\n }\n }\n": types.ContactEntityFragmentDoc,
|
||||
"\n fragment Event on EventPage {\n __typename\n id\n slug\n seoTitle\n searchDescription\n title\n subtitle\n lead\n body {\n ...OneLevelOfBlocks\n }\n featuredImage {\n ...Image\n }\n pig\n facebookUrl\n ticketUrl\n free\n priceRegular\n priceMember\n priceStudent\n categories {\n ... on EventCategory {\n name\n slug\n pig\n }\n }\n occurrences(limit: 5000) {\n ... on EventOccurrence {\n __typename\n id\n start\n end\n venue {\n __typename\n id\n slug\n title\n preposition\n url\n }\n venueCustom\n }\n }\n organizers {\n ... on EventOrganizer {\n id\n name\n slug\n externalUrl\n association {\n ... on AssociationPage {\n url\n }\n }\n }\n }\n }\n": types.EventFragmentDoc,
|
||||
"\n fragment EventCategory on EventCategory {\n __typename\n name\n slug\n pig\n showInFilters\n }\n": types.EventCategoryFragmentDoc,
|
||||
"\n fragment EventOrganizer on EventOrganizer {\n __typename\n id\n name\n slug\n externalUrl\n association {\n ... on AssociationPage {\n url\n }\n }\n }\n": types.EventOrganizerFragmentDoc,
|
||||
"\n fragment Event on EventPage {\n __typename\n id\n slug\n seoTitle\n searchDescription\n title\n subtitle\n lead\n body {\n ...OneLevelOfBlocks\n }\n featuredImage {\n ...Image\n }\n pig\n facebookUrl\n ticketUrl\n free\n priceRegular\n priceMember\n priceStudent\n categories {\n ... on EventCategory {\n ...EventCategory\n }\n }\n occurrences(limit: 5000) {\n ... on EventOccurrence {\n __typename\n id\n start\n end\n venue {\n __typename\n id\n slug\n title\n preposition\n url\n }\n venueCustom\n }\n }\n organizers {\n ... on EventOrganizer {\n ...EventOrganizer\n }\n }\n }\n": types.EventFragmentDoc,
|
||||
"\n fragment EventIndex on EventIndex {\n __typename\n id\n slug\n seoTitle\n searchDescription\n title\n }\n": types.EventIndexFragmentDoc,
|
||||
"\n query eventIndexMetadata {\n index: eventIndex {\n ... on EventIndex {\n ...EventIndex\n }\n }\n }\n": types.EventIndexMetadataDocument,
|
||||
"\n query futureEvents {\n index: eventIndex {\n ... on EventIndex {\n ...EventIndex\n }\n }\n events: eventIndex {\n ... on EventIndex {\n futureEvents {\n ... on EventPage {\n ...Event\n }\n }\n }\n }\n eventCategories: eventCategories(limit: 5000) {\n ... on EventCategory {\n name\n slug\n showInFilters\n }\n }\n eventOrganizers: eventOrganizers(limit: 5000) {\n ... on EventOrganizer {\n id\n name\n slug\n }\n }\n venues: pages(contentType: \"venues.VenuePage\") {\n ... on VenuePage {\n id\n title\n slug\n preposition\n }\n }\n }\n": types.FutureEventsDocument,
|
||||
"\n query futureEvents {\n index: eventIndex {\n ... on EventIndex {\n ...EventIndex\n }\n }\n events: eventIndex {\n ... on EventIndex {\n futureEvents {\n ... on EventPage {\n ...Event\n }\n }\n }\n }\n eventCategories: eventCategories(limit: 5000) {\n ... on EventCategory {\n ...EventCategory\n }\n }\n eventOrganizers: eventOrganizers(limit: 5000) {\n ... on EventOrganizer {\n ...EventOrganizer\n }\n }\n venues: pages(contentType: \"venues.VenuePage\") {\n ... on VenuePage {\n id\n title\n slug\n preposition\n }\n }\n }\n": types.FutureEventsDocument,
|
||||
"\n fragment News on NewsPage {\n __typename\n id\n slug\n seoTitle\n searchDescription\n title\n firstPublishedAt\n excerpt\n lead\n featuredImage {\n ...Image\n }\n body {\n ...Blocks\n }\n }\n": types.NewsFragmentDoc,
|
||||
"\n fragment NewsIndex on NewsIndex {\n __typename\n id\n slug\n seoTitle\n searchDescription\n title\n lead\n }\n": types.NewsIndexFragmentDoc,
|
||||
"\n query news {\n index: newsIndex {\n ... on NewsIndex {\n ...NewsIndex\n }\n }\n news: pages(contentType: \"news.NewsPage\", order: \"-first_published_at\", limit: 1000) {\n ... on NewsPage {\n ...News\n }\n }\n }\n": types.NewsDocument,
|
||||
"\n query openingHoursSets {\n openingHoursSets {\n ...OpeningHoursSetFragment\n }\n }\n": types.OpeningHoursSetsDocument,
|
||||
"\n fragment OpeningHoursSetFragment on OpeningHoursSet {\n name\n effectiveFrom\n effectiveTo\n announcement\n items {\n id\n function\n week {\n id\n blockType\n ... on OpeningHoursWeekBlock {\n ...OpeningHoursWeekBlock\n }\n }\n }\n }\n": types.OpeningHoursSetFragmentFragmentDoc,
|
||||
"\n query openingHoursSets {\n openingHoursSets {\n ...OpeningHoursSet\n }\n }\n": types.OpeningHoursSetsDocument,
|
||||
"\n fragment OpeningHoursSet on OpeningHoursSet {\n name\n effectiveFrom\n effectiveTo\n announcement\n items {\n id\n function\n week {\n __typename\n ... on OpeningHoursWeekBlock {\n ...OpeningHoursWeekBlock\n }\n }\n }\n }\n": types.OpeningHoursSetFragmentDoc,
|
||||
"\n fragment OpeningHoursRangeBlock on OpeningHoursRangeBlock {\n timeFrom\n timeTo\n custom\n }\n": types.OpeningHoursRangeBlockFragmentDoc,
|
||||
"\n fragment OpeningHoursWeekBlock on OpeningHoursWeekBlock {\n monday {\n ... on OpeningHoursRangeBlock {\n ...OpeningHoursRangeBlock\n }\n }\n tuesday {\n ... on OpeningHoursRangeBlock {\n ...OpeningHoursRangeBlock\n }\n }\n wednesday {\n ... on OpeningHoursRangeBlock {\n ...OpeningHoursRangeBlock\n }\n }\n thursday {\n ... on OpeningHoursRangeBlock {\n ...OpeningHoursRangeBlock\n }\n }\n friday {\n ... on OpeningHoursRangeBlock {\n ...OpeningHoursRangeBlock\n }\n }\n saturday {\n ... on OpeningHoursRangeBlock {\n ...OpeningHoursRangeBlock\n }\n }\n sunday {\n ... on OpeningHoursRangeBlock {\n ...OpeningHoursRangeBlock\n }\n }\n }\n": types.OpeningHoursWeekBlockFragmentDoc,
|
||||
};
|
||||
@@ -191,7 +225,7 @@ export function graphql(source: "\n fragment VenueIndex on VenueIndex {\n ..
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment Venue on VenuePage {\n __typename\n id\n slug\n title\n seoTitle\n searchDescription\n images {\n ...Blocks\n }\n body {\n ...Blocks\n }\n featuredImage {\n ...Image\n }\n showAsBookable\n showInOverview\n floor\n preposition\n usedFor\n techSpecsUrl\n capabilityAudio\n capabilityAudioVideo\n capabilityBar\n capabilityLighting\n capacityLegal\n capacityStanding\n capacitySitting\n }\n"): (typeof documents)["\n fragment Venue on VenuePage {\n __typename\n id\n slug\n title\n seoTitle\n searchDescription\n images {\n ...Blocks\n }\n body {\n ...Blocks\n }\n featuredImage {\n ...Image\n }\n showAsBookable\n showInOverview\n floor\n preposition\n usedFor\n techSpecsUrl\n capabilityAudio\n capabilityAudioVideo\n capabilityBar\n capabilityLighting\n capacityLegal\n capacityStanding\n capacitySitting\n }\n"];
|
||||
export function graphql(source: "\n fragment Venue on VenuePage {\n __typename\n id\n slug\n title\n seoTitle\n searchDescription\n images {\n __typename\n ... on ImageSliderBlock {\n ...ImageSliderBlock\n }\n }\n body {\n ...Blocks\n }\n featuredImage {\n ...Image\n }\n showAsBookable\n showInOverview\n floor\n preposition\n usedFor\n techSpecsUrl\n capabilityAudio\n capabilityAudioVideo\n capabilityBar\n capabilityLighting\n capacityLegal\n capacityStanding\n capacitySitting\n }\n"): (typeof documents)["\n fragment Venue on VenuePage {\n __typename\n id\n slug\n title\n seoTitle\n searchDescription\n images {\n __typename\n ... on ImageSliderBlock {\n ...ImageSliderBlock\n }\n }\n body {\n ...Blocks\n }\n featuredImage {\n ...Image\n }\n showAsBookable\n showInOverview\n floor\n preposition\n usedFor\n techSpecsUrl\n capabilityAudio\n capabilityAudioVideo\n capabilityBar\n capabilityLighting\n capacityLegal\n capacityStanding\n capacitySitting\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
@@ -211,7 +245,7 @@ export function graphql(source: "\n query sponsors {\n page: sponsorsPage {\
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment SponsorsPage on SponsorsPage {\n ... on SponsorsPage {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n sponsors {\n ... on SponsorBlock {\n id\n name\n logo {\n ...Image\n }\n text\n website\n }\n }\n }\n }\n"): (typeof documents)["\n fragment SponsorsPage on SponsorsPage {\n ... on SponsorsPage {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n sponsors {\n ... on SponsorBlock {\n id\n name\n logo {\n ...Image\n }\n text\n website\n }\n }\n }\n }\n"];
|
||||
export function graphql(source: "\n fragment SponsorsPage on SponsorsPage {\n ... on SponsorsPage {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n sponsors {\n ... on SponsorBlock {\n ...Sponsor\n }\n }\n }\n }\n"): (typeof documents)["\n fragment SponsorsPage on SponsorsPage {\n ... on SponsorsPage {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n sponsors {\n ... on SponsorBlock {\n ...Sponsor\n }\n }\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
@@ -223,15 +257,75 @@ export function graphql(source: "\n fragment VenueRentalIndex on VenueRentalInd
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment LeafBlocks on StreamFieldInterface {\n id\n blockType\n field\n ... on RichTextBlock {\n rawValue\n value\n }\n ... on ImageWithTextBlock {\n image {\n ...Image\n }\n imageFormat\n text\n }\n ... on ImageSliderBlock {\n images {\n ... on ImageSliderItemBlock {\n image {\n ...Image\n }\n text\n }\n }\n }\n ... on HorizontalRuleBlock {\n color\n }\n ... on FeaturedBlock {\n title\n featuredBlockText: text\n linkText\n imagePosition\n backgroundColor\n featuredPage {\n contentType\n pageType\n url\n ... on EventPage {\n featuredImage {\n ...Image\n }\n }\n ... on NewsPage {\n featuredImage {\n ...Image\n }\n }\n }\n featuredImageOverride {\n ...Image\n }\n }\n ... on ContactListBlock {\n items {\n blockType\n ... on ContactEntityBlock {\n contactEntity {\n ...ContactEntity\n }\n }\n }\n }\n ... on EmbedBlock {\n url\n embed\n rawEmbed\n }\n ... on FactBoxBlock {\n backgroundColor\n factBoxBody: body\n }\n }\n"): (typeof documents)["\n fragment LeafBlocks on StreamFieldInterface {\n id\n blockType\n field\n ... on RichTextBlock {\n rawValue\n value\n }\n ... on ImageWithTextBlock {\n image {\n ...Image\n }\n imageFormat\n text\n }\n ... on ImageSliderBlock {\n images {\n ... on ImageSliderItemBlock {\n image {\n ...Image\n }\n text\n }\n }\n }\n ... on HorizontalRuleBlock {\n color\n }\n ... on FeaturedBlock {\n title\n featuredBlockText: text\n linkText\n imagePosition\n backgroundColor\n featuredPage {\n contentType\n pageType\n url\n ... on EventPage {\n featuredImage {\n ...Image\n }\n }\n ... on NewsPage {\n featuredImage {\n ...Image\n }\n }\n }\n featuredImageOverride {\n ...Image\n }\n }\n ... on ContactListBlock {\n items {\n blockType\n ... on ContactEntityBlock {\n contactEntity {\n ...ContactEntity\n }\n }\n }\n }\n ... on EmbedBlock {\n url\n embed\n rawEmbed\n }\n ... on FactBoxBlock {\n backgroundColor\n factBoxBody: body\n }\n }\n"];
|
||||
export function graphql(source: "\n fragment AccordionBlock on AccordionBlock {\n heading\n body {\n id\n blockType\n }\n }\n"): (typeof documents)["\n fragment AccordionBlock on AccordionBlock {\n heading\n body {\n id\n blockType\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment OneLevelOfBlocks on StreamFieldInterface {\n ...LeafBlocks\n ... on AccordionBlock {\n heading\n body {\n ...LeafBlocks\n }\n }\n ... on PageSectionBlock {\n title\n backgroundColor\n icon\n body {\n ...LeafBlocks\n }\n }\n }\n"): (typeof documents)["\n fragment OneLevelOfBlocks on StreamFieldInterface {\n ...LeafBlocks\n ... on AccordionBlock {\n heading\n body {\n ...LeafBlocks\n }\n }\n ... on PageSectionBlock {\n title\n backgroundColor\n icon\n body {\n ...LeafBlocks\n }\n }\n }\n"];
|
||||
export function graphql(source: "\n fragment ContactEntityBlock on ContactEntityBlock {\n contactEntity {\n ...ContactEntity\n }\n }\n"): (typeof documents)["\n fragment ContactEntityBlock on ContactEntityBlock {\n contactEntity {\n ...ContactEntity\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment Blocks on StreamFieldInterface {\n ... on AccordionBlock {\n heading\n body {\n ...OneLevelOfBlocks\n }\n }\n ... on PageSectionBlock {\n title\n backgroundColor\n icon\n body {\n ...OneLevelOfBlocks\n }\n }\n ... on ContactSectionBlock {\n title\n text\n blocks {\n ... on ContactSubsectionBlock {\n title\n text\n blocks {\n ...OneLevelOfBlocks\n }\n }\n ...OneLevelOfBlocks\n }\n }\n ...OneLevelOfBlocks\n }\n"): (typeof documents)["\n fragment Blocks on StreamFieldInterface {\n ... on AccordionBlock {\n heading\n body {\n ...OneLevelOfBlocks\n }\n }\n ... on PageSectionBlock {\n title\n backgroundColor\n icon\n body {\n ...OneLevelOfBlocks\n }\n }\n ... on ContactSectionBlock {\n title\n text\n blocks {\n ... on ContactSubsectionBlock {\n title\n text\n blocks {\n ...OneLevelOfBlocks\n }\n }\n ...OneLevelOfBlocks\n }\n }\n ...OneLevelOfBlocks\n }\n"];
|
||||
export function graphql(source: "\n fragment ContactListBlock on ContactListBlock {\n items {\n blockType\n ... on ContactEntityBlock {\n contactEntity {\n ...ContactEntity\n }\n }\n }\n }\n"): (typeof documents)["\n fragment ContactListBlock on ContactListBlock {\n items {\n blockType\n ... on ContactEntityBlock {\n contactEntity {\n ...ContactEntity\n }\n }\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment ContactSectionBlock on ContactSectionBlock {\n title\n text\n blocks {\n id\n blockType\n }\n }\n"): (typeof documents)["\n fragment ContactSectionBlock on ContactSectionBlock {\n title\n text\n blocks {\n id\n blockType\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment ContactSubsectionBlock on ContactSubsectionBlock {\n title\n text\n blocks {\n id\n blockType\n }\n }\n"): (typeof documents)["\n fragment ContactSubsectionBlock on ContactSubsectionBlock {\n title\n text\n blocks {\n id\n blockType\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment EmbedBlock on EmbedBlock {\n url\n embed\n rawEmbed\n }\n"): (typeof documents)["\n fragment EmbedBlock on EmbedBlock {\n url\n embed\n rawEmbed\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment FactBoxBlock on FactBoxBlock {\n backgroundColor\n factBoxBody: body\n }\n"): (typeof documents)["\n fragment FactBoxBlock on FactBoxBlock {\n backgroundColor\n factBoxBody: body\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment FeaturedBlock on FeaturedBlock {\n title\n featuredBlockText: text\n linkText\n imagePosition\n backgroundColor\n featuredPage {\n contentType\n pageType\n url\n ... on EventPage {\n featuredImage {\n ...Image\n }\n }\n ... on NewsPage {\n featuredImage {\n ...Image\n }\n }\n }\n featuredImageOverride {\n ...Image\n }\n }\n"): (typeof documents)["\n fragment FeaturedBlock on FeaturedBlock {\n title\n featuredBlockText: text\n linkText\n imagePosition\n backgroundColor\n featuredPage {\n contentType\n pageType\n url\n ... on EventPage {\n featuredImage {\n ...Image\n }\n }\n ... on NewsPage {\n featuredImage {\n ...Image\n }\n }\n }\n featuredImageOverride {\n ...Image\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment HorizontalRuleBlock on HorizontalRuleBlock {\n color\n }\n"): (typeof documents)["\n fragment HorizontalRuleBlock on HorizontalRuleBlock {\n color\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment ImageSliderItem on ImageSliderItemBlock {\n image {\n ...Image\n }\n text\n }\n"): (typeof documents)["\n fragment ImageSliderItem on ImageSliderItemBlock {\n image {\n ...Image\n }\n text\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment ImageSliderBlock on ImageSliderBlock {\n images {\n __typename\n ... on ImageSliderItemBlock {\n ...ImageSliderItem\n }\n }\n }\n"): (typeof documents)["\n fragment ImageSliderBlock on ImageSliderBlock {\n images {\n __typename\n ... on ImageSliderItemBlock {\n ...ImageSliderItem\n }\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment ImageWithTextBlock on ImageWithTextBlock {\n image {\n ...Image\n }\n imageFormat\n text\n }\n"): (typeof documents)["\n fragment ImageWithTextBlock on ImageWithTextBlock {\n image {\n ...Image\n }\n imageFormat\n text\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment PageSectionBlock on PageSectionBlock {\n title\n backgroundColor\n icon\n body {\n id\n blockType\n }\n }\n"): (typeof documents)["\n fragment PageSectionBlock on PageSectionBlock {\n title\n backgroundColor\n icon\n body {\n id\n blockType\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment RichTextBlock on RichTextBlock {\n rawValue\n value\n }\n"): (typeof documents)["\n fragment RichTextBlock on RichTextBlock {\n rawValue\n value\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment Sponsor on SponsorBlock {\n id\n name\n logo {\n ...Image\n }\n text\n website\n }\n"): (typeof documents)["\n fragment Sponsor on SponsorBlock {\n id\n name\n logo {\n ...Image\n }\n text\n website\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment LeafBlocks on StreamFieldInterface {\n id\n blockType\n field\n ... on RichTextBlock {\n ...RichTextBlock\n }\n ... on ImageWithTextBlock {\n ...ImageWithTextBlock\n }\n ... on ImageSliderBlock {\n ...ImageSliderBlock\n }\n ... on HorizontalRuleBlock {\n ...HorizontalRuleBlock\n }\n ... on FeaturedBlock {\n ...FeaturedBlock\n }\n ... on ContactListBlock {\n ...ContactListBlock\n }\n ... on EmbedBlock {\n ...EmbedBlock\n }\n ... on FactBoxBlock {\n ...FactBoxBlock\n }\n }\n"): (typeof documents)["\n fragment LeafBlocks on StreamFieldInterface {\n id\n blockType\n field\n ... on RichTextBlock {\n ...RichTextBlock\n }\n ... on ImageWithTextBlock {\n ...ImageWithTextBlock\n }\n ... on ImageSliderBlock {\n ...ImageSliderBlock\n }\n ... on HorizontalRuleBlock {\n ...HorizontalRuleBlock\n }\n ... on FeaturedBlock {\n ...FeaturedBlock\n }\n ... on ContactListBlock {\n ...ContactListBlock\n }\n ... on EmbedBlock {\n ...EmbedBlock\n }\n ... on FactBoxBlock {\n ...FactBoxBlock\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment OneLevelOfBlocks on StreamFieldInterface {\n ...LeafBlocks\n ... on AccordionBlock {\n ...AccordionBlock\n body {\n ...LeafBlocks\n }\n }\n ... on PageSectionBlock {\n ...PageSectionBlock\n body {\n ...LeafBlocks\n }\n }\n }\n"): (typeof documents)["\n fragment OneLevelOfBlocks on StreamFieldInterface {\n ...LeafBlocks\n ... on AccordionBlock {\n ...AccordionBlock\n body {\n ...LeafBlocks\n }\n }\n ... on PageSectionBlock {\n ...PageSectionBlock\n body {\n ...LeafBlocks\n }\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment Blocks on StreamFieldInterface {\n ...OneLevelOfBlocks\n ... on AccordionBlock {\n ...AccordionBlock\n body {\n ...OneLevelOfBlocks\n }\n }\n ... on PageSectionBlock {\n ...PageSectionBlock\n body {\n ...OneLevelOfBlocks\n }\n }\n ... on ContactSectionBlock {\n ...ContactSectionBlock\n blocks {\n ...OneLevelOfBlocks\n ... on ContactSubsectionBlock {\n ...ContactSubsectionBlock\n blocks {\n ...OneLevelOfBlocks\n }\n }\n }\n }\n }\n"): (typeof documents)["\n fragment Blocks on StreamFieldInterface {\n ...OneLevelOfBlocks\n ... on AccordionBlock {\n ...AccordionBlock\n body {\n ...OneLevelOfBlocks\n }\n }\n ... on PageSectionBlock {\n ...PageSectionBlock\n body {\n ...OneLevelOfBlocks\n }\n }\n ... on ContactSectionBlock {\n ...ContactSectionBlock\n blocks {\n ...OneLevelOfBlocks\n ... on ContactSubsectionBlock {\n ...ContactSubsectionBlock\n blocks {\n ...OneLevelOfBlocks\n }\n }\n }\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
@@ -243,7 +337,15 @@ export function graphql(source: "\n fragment ContactEntity on ContactEntity {\n
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment Event on EventPage {\n __typename\n id\n slug\n seoTitle\n searchDescription\n title\n subtitle\n lead\n body {\n ...OneLevelOfBlocks\n }\n featuredImage {\n ...Image\n }\n pig\n facebookUrl\n ticketUrl\n free\n priceRegular\n priceMember\n priceStudent\n categories {\n ... on EventCategory {\n name\n slug\n pig\n }\n }\n occurrences(limit: 5000) {\n ... on EventOccurrence {\n __typename\n id\n start\n end\n venue {\n __typename\n id\n slug\n title\n preposition\n url\n }\n venueCustom\n }\n }\n organizers {\n ... on EventOrganizer {\n id\n name\n slug\n externalUrl\n association {\n ... on AssociationPage {\n url\n }\n }\n }\n }\n }\n"): (typeof documents)["\n fragment Event on EventPage {\n __typename\n id\n slug\n seoTitle\n searchDescription\n title\n subtitle\n lead\n body {\n ...OneLevelOfBlocks\n }\n featuredImage {\n ...Image\n }\n pig\n facebookUrl\n ticketUrl\n free\n priceRegular\n priceMember\n priceStudent\n categories {\n ... on EventCategory {\n name\n slug\n pig\n }\n }\n occurrences(limit: 5000) {\n ... on EventOccurrence {\n __typename\n id\n start\n end\n venue {\n __typename\n id\n slug\n title\n preposition\n url\n }\n venueCustom\n }\n }\n organizers {\n ... on EventOrganizer {\n id\n name\n slug\n externalUrl\n association {\n ... on AssociationPage {\n url\n }\n }\n }\n }\n }\n"];
|
||||
export function graphql(source: "\n fragment EventCategory on EventCategory {\n __typename\n name\n slug\n pig\n showInFilters\n }\n"): (typeof documents)["\n fragment EventCategory on EventCategory {\n __typename\n name\n slug\n pig\n showInFilters\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment EventOrganizer on EventOrganizer {\n __typename\n id\n name\n slug\n externalUrl\n association {\n ... on AssociationPage {\n url\n }\n }\n }\n"): (typeof documents)["\n fragment EventOrganizer on EventOrganizer {\n __typename\n id\n name\n slug\n externalUrl\n association {\n ... on AssociationPage {\n url\n }\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment Event on EventPage {\n __typename\n id\n slug\n seoTitle\n searchDescription\n title\n subtitle\n lead\n body {\n ...OneLevelOfBlocks\n }\n featuredImage {\n ...Image\n }\n pig\n facebookUrl\n ticketUrl\n free\n priceRegular\n priceMember\n priceStudent\n categories {\n ... on EventCategory {\n ...EventCategory\n }\n }\n occurrences(limit: 5000) {\n ... on EventOccurrence {\n __typename\n id\n start\n end\n venue {\n __typename\n id\n slug\n title\n preposition\n url\n }\n venueCustom\n }\n }\n organizers {\n ... on EventOrganizer {\n ...EventOrganizer\n }\n }\n }\n"): (typeof documents)["\n fragment Event on EventPage {\n __typename\n id\n slug\n seoTitle\n searchDescription\n title\n subtitle\n lead\n body {\n ...OneLevelOfBlocks\n }\n featuredImage {\n ...Image\n }\n pig\n facebookUrl\n ticketUrl\n free\n priceRegular\n priceMember\n priceStudent\n categories {\n ... on EventCategory {\n ...EventCategory\n }\n }\n occurrences(limit: 5000) {\n ... on EventOccurrence {\n __typename\n id\n start\n end\n venue {\n __typename\n id\n slug\n title\n preposition\n url\n }\n venueCustom\n }\n }\n organizers {\n ... on EventOrganizer {\n ...EventOrganizer\n }\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
@@ -255,7 +357,7 @@ export function graphql(source: "\n query eventIndexMetadata {\n index: even
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n query futureEvents {\n index: eventIndex {\n ... on EventIndex {\n ...EventIndex\n }\n }\n events: eventIndex {\n ... on EventIndex {\n futureEvents {\n ... on EventPage {\n ...Event\n }\n }\n }\n }\n eventCategories: eventCategories(limit: 5000) {\n ... on EventCategory {\n name\n slug\n showInFilters\n }\n }\n eventOrganizers: eventOrganizers(limit: 5000) {\n ... on EventOrganizer {\n id\n name\n slug\n }\n }\n venues: pages(contentType: \"venues.VenuePage\") {\n ... on VenuePage {\n id\n title\n slug\n preposition\n }\n }\n }\n"): (typeof documents)["\n query futureEvents {\n index: eventIndex {\n ... on EventIndex {\n ...EventIndex\n }\n }\n events: eventIndex {\n ... on EventIndex {\n futureEvents {\n ... on EventPage {\n ...Event\n }\n }\n }\n }\n eventCategories: eventCategories(limit: 5000) {\n ... on EventCategory {\n name\n slug\n showInFilters\n }\n }\n eventOrganizers: eventOrganizers(limit: 5000) {\n ... on EventOrganizer {\n id\n name\n slug\n }\n }\n venues: pages(contentType: \"venues.VenuePage\") {\n ... on VenuePage {\n id\n title\n slug\n preposition\n }\n }\n }\n"];
|
||||
export function graphql(source: "\n query futureEvents {\n index: eventIndex {\n ... on EventIndex {\n ...EventIndex\n }\n }\n events: eventIndex {\n ... on EventIndex {\n futureEvents {\n ... on EventPage {\n ...Event\n }\n }\n }\n }\n eventCategories: eventCategories(limit: 5000) {\n ... on EventCategory {\n ...EventCategory\n }\n }\n eventOrganizers: eventOrganizers(limit: 5000) {\n ... on EventOrganizer {\n ...EventOrganizer\n }\n }\n venues: pages(contentType: \"venues.VenuePage\") {\n ... on VenuePage {\n id\n title\n slug\n preposition\n }\n }\n }\n"): (typeof documents)["\n query futureEvents {\n index: eventIndex {\n ... on EventIndex {\n ...EventIndex\n }\n }\n events: eventIndex {\n ... on EventIndex {\n futureEvents {\n ... on EventPage {\n ...Event\n }\n }\n }\n }\n eventCategories: eventCategories(limit: 5000) {\n ... on EventCategory {\n ...EventCategory\n }\n }\n eventOrganizers: eventOrganizers(limit: 5000) {\n ... on EventOrganizer {\n ...EventOrganizer\n }\n }\n venues: pages(contentType: \"venues.VenuePage\") {\n ... on VenuePage {\n id\n title\n slug\n preposition\n }\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
@@ -271,11 +373,11 @@ export function graphql(source: "\n query news {\n index: newsIndex {\n
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n query openingHoursSets {\n openingHoursSets {\n ...OpeningHoursSetFragment\n }\n }\n"): (typeof documents)["\n query openingHoursSets {\n openingHoursSets {\n ...OpeningHoursSetFragment\n }\n }\n"];
|
||||
export function graphql(source: "\n query openingHoursSets {\n openingHoursSets {\n ...OpeningHoursSet\n }\n }\n"): (typeof documents)["\n query openingHoursSets {\n openingHoursSets {\n ...OpeningHoursSet\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n fragment OpeningHoursSetFragment on OpeningHoursSet {\n name\n effectiveFrom\n effectiveTo\n announcement\n items {\n id\n function\n week {\n id\n blockType\n ... on OpeningHoursWeekBlock {\n ...OpeningHoursWeekBlock\n }\n }\n }\n }\n"): (typeof documents)["\n fragment OpeningHoursSetFragment on OpeningHoursSet {\n name\n effectiveFrom\n effectiveTo\n announcement\n items {\n id\n function\n week {\n id\n blockType\n ... on OpeningHoursWeekBlock {\n ...OpeningHoursWeekBlock\n }\n }\n }\n }\n"];
|
||||
export function graphql(source: "\n fragment OpeningHoursSet on OpeningHoursSet {\n name\n effectiveFrom\n effectiveTo\n announcement\n items {\n id\n function\n week {\n __typename\n ... on OpeningHoursWeekBlock {\n ...OpeningHoursWeekBlock\n }\n }\n }\n }\n"): (typeof documents)["\n fragment OpeningHoursSet on OpeningHoursSet {\n name\n effectiveFrom\n effectiveTo\n announcement\n items {\n id\n function\n week {\n __typename\n ... on OpeningHoursWeekBlock {\n ...OpeningHoursWeekBlock\n }\n }\n }\n }\n"];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
@@ -289,4 +391,4 @@ export function graphql(source: string) {
|
||||
return (documents as any)[source] ?? {};
|
||||
}
|
||||
|
||||
export type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;
|
||||
export type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;
|
||||
|
||||
+1446
-6994
File diff suppressed because one or more lines are too long
+18
-68
@@ -97,72 +97,28 @@ const LeafBlocksFragmentDefinition = graphql(`
|
||||
blockType
|
||||
field
|
||||
... on RichTextBlock {
|
||||
rawValue
|
||||
value
|
||||
...RichTextBlock
|
||||
}
|
||||
... on ImageWithTextBlock {
|
||||
image {
|
||||
...Image
|
||||
}
|
||||
imageFormat
|
||||
text
|
||||
...ImageWithTextBlock
|
||||
}
|
||||
... on ImageSliderBlock {
|
||||
images {
|
||||
... on ImageSliderItemBlock {
|
||||
image {
|
||||
...Image
|
||||
}
|
||||
text
|
||||
}
|
||||
}
|
||||
...ImageSliderBlock
|
||||
}
|
||||
... on HorizontalRuleBlock {
|
||||
color
|
||||
...HorizontalRuleBlock
|
||||
}
|
||||
... on FeaturedBlock {
|
||||
title
|
||||
featuredBlockText: text
|
||||
linkText
|
||||
imagePosition
|
||||
backgroundColor
|
||||
featuredPage {
|
||||
contentType
|
||||
pageType
|
||||
url
|
||||
... on EventPage {
|
||||
featuredImage {
|
||||
...Image
|
||||
}
|
||||
}
|
||||
... on NewsPage {
|
||||
featuredImage {
|
||||
...Image
|
||||
}
|
||||
}
|
||||
}
|
||||
featuredImageOverride {
|
||||
...Image
|
||||
}
|
||||
...FeaturedBlock
|
||||
}
|
||||
... on ContactListBlock {
|
||||
items {
|
||||
blockType
|
||||
... on ContactEntityBlock {
|
||||
contactEntity {
|
||||
...ContactEntity
|
||||
}
|
||||
}
|
||||
}
|
||||
...ContactListBlock
|
||||
}
|
||||
... on EmbedBlock {
|
||||
url
|
||||
embed
|
||||
rawEmbed
|
||||
...EmbedBlock
|
||||
}
|
||||
... on FactBoxBlock {
|
||||
backgroundColor
|
||||
factBoxBody: body
|
||||
...FactBoxBlock
|
||||
}
|
||||
}
|
||||
`);
|
||||
@@ -171,15 +127,13 @@ const OneLevelOfBlocksFragmentDefinition = graphql(`
|
||||
fragment OneLevelOfBlocks on StreamFieldInterface {
|
||||
...LeafBlocks
|
||||
... on AccordionBlock {
|
||||
heading
|
||||
...AccordionBlock
|
||||
body {
|
||||
...LeafBlocks
|
||||
}
|
||||
}
|
||||
... on PageSectionBlock {
|
||||
title
|
||||
backgroundColor
|
||||
icon
|
||||
...PageSectionBlock
|
||||
body {
|
||||
...LeafBlocks
|
||||
}
|
||||
@@ -189,39 +143,35 @@ const OneLevelOfBlocksFragmentDefinition = graphql(`
|
||||
|
||||
const BlockFragmentDefinition = graphql(`
|
||||
fragment Blocks on StreamFieldInterface {
|
||||
...OneLevelOfBlocks
|
||||
... on AccordionBlock {
|
||||
heading
|
||||
...AccordionBlock
|
||||
body {
|
||||
...OneLevelOfBlocks
|
||||
}
|
||||
}
|
||||
... on PageSectionBlock {
|
||||
title
|
||||
backgroundColor
|
||||
icon
|
||||
...PageSectionBlock
|
||||
body {
|
||||
...OneLevelOfBlocks
|
||||
}
|
||||
}
|
||||
... on ContactSectionBlock {
|
||||
title
|
||||
text
|
||||
...ContactSectionBlock
|
||||
blocks {
|
||||
...OneLevelOfBlocks
|
||||
... on ContactSubsectionBlock {
|
||||
title
|
||||
text
|
||||
...ContactSubsectionBlock
|
||||
blocks {
|
||||
...OneLevelOfBlocks
|
||||
}
|
||||
}
|
||||
...OneLevelOfBlocks
|
||||
}
|
||||
}
|
||||
...OneLevelOfBlocks
|
||||
}
|
||||
`);
|
||||
|
||||
const ImageFragmentDefinition = graphql(`
|
||||
export const ImageFragmentDefinition = graphql(`
|
||||
fragment Image on CustomImage {
|
||||
id
|
||||
url
|
||||
@@ -232,7 +182,7 @@ const ImageFragmentDefinition = graphql(`
|
||||
}
|
||||
`);
|
||||
|
||||
const ContactEntityFragmentDefinition = graphql(`
|
||||
export const ContactEntityFragmentDefinition = graphql(`
|
||||
fragment ContactEntity on ContactEntity {
|
||||
id
|
||||
name
|
||||
|
||||
+44
-27
@@ -8,21 +8,48 @@ import {
|
||||
parseISO,
|
||||
} from "date-fns";
|
||||
import { toLocalTime, formatDate, compareDates } from "./date";
|
||||
import { graphql } from "@/gql";
|
||||
import { EventFragment, EventOccurrence } from "@/gql/graphql";
|
||||
import { graphql, unmaskFragment } from "@/gql";
|
||||
import {
|
||||
type EventCategoryFragment,
|
||||
type EventFragment,
|
||||
type EventOrganizerFragment,
|
||||
} from "@/gql/graphql";
|
||||
import { PIG_NAMES, randomElement } from "@/lib/common";
|
||||
|
||||
export type {
|
||||
EventFragment,
|
||||
EventCategory,
|
||||
EventOccurrence,
|
||||
EventOrganizer,
|
||||
} from "@/gql/graphql";
|
||||
export type EventOccurrence = EventFragment["occurrences"][number];
|
||||
export type EventCategory = EventCategoryFragment;
|
||||
export type EventOrganizer = EventOrganizerFragment;
|
||||
export type { EventFragment };
|
||||
|
||||
export type SingularEvent = EventFragment & {
|
||||
occurrence: EventOccurrence;
|
||||
};
|
||||
|
||||
export const EventCategoryFragmentDefinition = graphql(`
|
||||
fragment EventCategory on EventCategory {
|
||||
__typename
|
||||
name
|
||||
slug
|
||||
pig
|
||||
showInFilters
|
||||
}
|
||||
`);
|
||||
|
||||
export const EventOrganizerFragmentDefinition = graphql(`
|
||||
fragment EventOrganizer on EventOrganizer {
|
||||
__typename
|
||||
id
|
||||
name
|
||||
slug
|
||||
externalUrl
|
||||
association {
|
||||
... on AssociationPage {
|
||||
url
|
||||
}
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
const EventFragmentDefinition = graphql(`
|
||||
fragment Event on EventPage {
|
||||
__typename
|
||||
@@ -48,9 +75,7 @@ const EventFragmentDefinition = graphql(`
|
||||
priceStudent
|
||||
categories {
|
||||
... on EventCategory {
|
||||
name
|
||||
slug
|
||||
pig
|
||||
...EventCategory
|
||||
}
|
||||
}
|
||||
occurrences(limit: 5000) {
|
||||
@@ -72,15 +97,7 @@ const EventFragmentDefinition = graphql(`
|
||||
}
|
||||
organizers {
|
||||
... on EventOrganizer {
|
||||
id
|
||||
name
|
||||
slug
|
||||
externalUrl
|
||||
association {
|
||||
... on AssociationPage {
|
||||
url
|
||||
}
|
||||
}
|
||||
...EventOrganizer
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -125,16 +142,12 @@ export const eventsOverviewQuery = graphql(`
|
||||
}
|
||||
eventCategories: eventCategories(limit: 5000) {
|
||||
... on EventCategory {
|
||||
name
|
||||
slug
|
||||
showInFilters
|
||||
...EventCategory
|
||||
}
|
||||
}
|
||||
eventOrganizers: eventOrganizers(limit: 5000) {
|
||||
... on EventOrganizer {
|
||||
id
|
||||
name
|
||||
slug
|
||||
...EventOrganizer
|
||||
}
|
||||
}
|
||||
venues: pages(contentType: "venues.VenuePage") {
|
||||
@@ -270,7 +283,11 @@ export function getEventPig(event: EventFragment): string | null {
|
||||
return event.pig;
|
||||
}
|
||||
if (event.pig === "automatic") {
|
||||
const categoryPigs = event.categories
|
||||
const categories = unmaskFragment(
|
||||
EventCategoryFragmentDefinition,
|
||||
event.categories
|
||||
);
|
||||
const categoryPigs = categories
|
||||
?.map((category) => category.pig)
|
||||
.filter((pig) => PIG_NAMES.includes(pig));
|
||||
const chosenPig = randomElement(categoryPigs ?? []);
|
||||
|
||||
+28
-23
@@ -1,19 +1,18 @@
|
||||
import {
|
||||
startOfToday,
|
||||
isAfter,
|
||||
getISODay,
|
||||
parseISO,
|
||||
isSameDay,
|
||||
compareDesc,
|
||||
getISODay,
|
||||
isAfter,
|
||||
isSameDay,
|
||||
parseISO,
|
||||
startOfToday,
|
||||
} from "date-fns";
|
||||
|
||||
import { graphql } from "@/gql";
|
||||
import {
|
||||
OpeningHoursRangeBlock,
|
||||
OpeningHoursSet,
|
||||
OpeningHoursWeekBlock,
|
||||
} from "@/gql/graphql";
|
||||
import { getClient } from "@/app/client";
|
||||
import { graphql, unmaskFragment } from "@/gql";
|
||||
import type {
|
||||
OpeningHoursRangeBlockFragment as OpeningHoursRangeBlock,
|
||||
OpeningHoursSetFragment as OpeningHoursSet,
|
||||
} from "@/gql/graphql";
|
||||
|
||||
const MISSING_OPENING_HOURS = {
|
||||
name: "Åpningstider mangler",
|
||||
@@ -45,7 +44,7 @@ const WEEKDAYS_NORWEGIAN = [
|
||||
const openingHoursQuery = graphql(`
|
||||
query openingHoursSets {
|
||||
openingHoursSets {
|
||||
...OpeningHoursSetFragment
|
||||
...OpeningHoursSet
|
||||
}
|
||||
}
|
||||
`);
|
||||
@@ -79,7 +78,7 @@ export async function getOpeningHours() {
|
||||
}
|
||||
// pick the set that msot recently took effect
|
||||
return validSets.sort((a, b) =>
|
||||
compareDesc(a.effectiveFrom, b.effectiveFrom)
|
||||
compareDesc(a.effectiveFrom, b.effectiveFrom),
|
||||
)[0];
|
||||
}
|
||||
|
||||
@@ -93,7 +92,7 @@ type OpeningHoursGroup = {
|
||||
type OpeningHoursPerDay = Record<string, OpeningHoursRangeBlock>;
|
||||
|
||||
export function groupOpeningHours(
|
||||
week: OpeningHoursPerDay
|
||||
week: OpeningHoursPerDay,
|
||||
): OpeningHoursGroup[] {
|
||||
const grouped: OpeningHoursGroup[] = [];
|
||||
let previous: string | null = null;
|
||||
@@ -132,7 +131,7 @@ export type PrettyOpeningHours = {
|
||||
};
|
||||
|
||||
function formatGroupedHours(
|
||||
grouped: OpeningHoursGroup[]
|
||||
grouped: OpeningHoursGroup[],
|
||||
): PrettyOpeningHours[] {
|
||||
return grouped.map((group) => {
|
||||
const startDayIndex = WEEKDAYS.indexOf(group.days[0]);
|
||||
@@ -160,19 +159,26 @@ function formatGroupedHours(
|
||||
|
||||
export function getOpeningHoursForFunction(
|
||||
openingHours: OpeningHoursSet,
|
||||
name: string
|
||||
name: string,
|
||||
) {
|
||||
const item = openingHours.items?.find((x) => x?.function === name);
|
||||
if (!item || !Array.isArray(item?.week) || item?.week.length !== 1) {
|
||||
return;
|
||||
}
|
||||
const week = item.week[0] as OpeningHoursWeekBlock;
|
||||
const maskedWeek = item.week[0];
|
||||
if (maskedWeek?.__typename !== "OpeningHoursWeekBlock") {
|
||||
return;
|
||||
}
|
||||
const week = unmaskFragment(
|
||||
OpeningHoursWeekBlockFragmentDefinition,
|
||||
maskedWeek,
|
||||
);
|
||||
return week;
|
||||
}
|
||||
|
||||
export function getPrettyOpeningHoursForFunction(
|
||||
openingHours: OpeningHoursSet,
|
||||
name: string
|
||||
name: string,
|
||||
) {
|
||||
const week = getOpeningHoursForFunction(openingHours, name);
|
||||
if (!week) {
|
||||
@@ -194,7 +200,7 @@ export function getPrettyOpeningHoursForFunction(
|
||||
|
||||
export function getTodaysOpeningHoursForFunction(
|
||||
openingHours: OpeningHoursSet,
|
||||
name: string
|
||||
name: string,
|
||||
): string {
|
||||
const week: any = getOpeningHoursForFunction(openingHours, name);
|
||||
if (!week) {
|
||||
@@ -213,7 +219,7 @@ export function getTodaysOpeningHoursForFunction(
|
||||
}
|
||||
|
||||
const OpeningHoursSetFragmentDefinition = graphql(`
|
||||
fragment OpeningHoursSetFragment on OpeningHoursSet {
|
||||
fragment OpeningHoursSet on OpeningHoursSet {
|
||||
name
|
||||
effectiveFrom
|
||||
effectiveTo
|
||||
@@ -222,8 +228,7 @@ const OpeningHoursSetFragmentDefinition = graphql(`
|
||||
id
|
||||
function
|
||||
week {
|
||||
id
|
||||
blockType
|
||||
__typename
|
||||
... on OpeningHoursWeekBlock {
|
||||
...OpeningHoursWeekBlock
|
||||
}
|
||||
@@ -240,7 +245,7 @@ const OpeningHoursRangeBlockFragmentDefinition = graphql(`
|
||||
}
|
||||
`);
|
||||
|
||||
const OpeningHoursWeekBlockFragmentDefinition = graphql(`
|
||||
export const OpeningHoursWeekBlockFragmentDefinition = graphql(`
|
||||
fragment OpeningHoursWeekBlock on OpeningHoursWeekBlock {
|
||||
monday {
|
||||
... on OpeningHoursRangeBlock {
|
||||
|
||||
Reference in New Issue
Block a user