From 3d46c1e0355b3554672f9a34837d04a652dafa1a Mon Sep 17 00:00:00 2001 From: rebeccahongsf Date: Mon, 2 Dec 2024 20:11:44 -0800 Subject: [PATCH] SUL23-690 | build out and configure accordion component --- src/components/paragraph/index.tsx | 4 + .../paragraph/stanford-accordion.tsx | 46 + src/lib/gql/__generated__/drupal.d.tsx | 944 +++++++++++++++--- src/lib/gql/__generated__/queries.ts | 22 +- src/lib/gql/fragments-paragraphs.drupal.gql | 15 + 5 files changed, 872 insertions(+), 159 deletions(-) create mode 100644 src/components/paragraph/stanford-accordion.tsx diff --git a/src/components/paragraph/index.tsx b/src/components/paragraph/index.tsx index 5c84b1fe..7a32280a 100644 --- a/src/components/paragraph/index.tsx +++ b/src/components/paragraph/index.tsx @@ -15,6 +15,7 @@ import SulLibguides from "@/components/paragraph/sul-libguides" import {ParagraphUnion} from "@/lib/gql/__generated__/drupal.d" import {ParagraphBehaviors} from "@/lib/drupal/drupal" import EditorAlertBanner from "@/components/patterns/elements/editor-alert-banner" +import StanfordAccordionParagraph from "@/components/paragraph/stanford-accordion" type ParagraphProps = HTMLAttributes & { paragraph: ParagraphUnion @@ -142,6 +143,9 @@ const ParagraphComponent = ({paragraph, singleRow = false, fullWidth = false, .. {...props} /> )} + {paragraph.__typename === "ParagraphStanfordFaq" && ( + + )} ) } diff --git a/src/components/paragraph/stanford-accordion.tsx b/src/components/paragraph/stanford-accordion.tsx new file mode 100644 index 00000000..f760570c --- /dev/null +++ b/src/components/paragraph/stanford-accordion.tsx @@ -0,0 +1,46 @@ +import {ParagraphStanfordFaq} from "@/lib/gql/__generated__/drupal.d" +import Accordion from "@/components/patterns/accordion" +import {HTMLAttributes} from "react" +import {twMerge} from "tailwind-merge" +import formatHtml from "@/lib/format-html" + +type Props = HTMLAttributes & { + paragraph: ParagraphStanfordFaq +} + +const StanfordAccordionParagraph = ({paragraph, ...props}: Props) => { + const Element = paragraph.suFaqHeadline ? "article" : "div" + console.log("paragraph", paragraph.suFaqHeadline) + return ( + + {paragraph.suFaqHeadline && ( +

+ {paragraph.suFaqHeadline} +

+ )} + + {paragraph.suFaqDescription && ( +
+ {formatHtml(paragraph.suFaqDescription.processed)} +
+ )} + + {paragraph.suFaqQuestions && + paragraph.suFaqQuestions.map(accordion => ( + +
{formatHtml(accordion.suAccordionBody.processed)}
+
+ ))} +
+ ) +} + +export default StanfordAccordionParagraph diff --git a/src/lib/gql/__generated__/drupal.d.tsx b/src/lib/gql/__generated__/drupal.d.tsx index e9d46f5d..8c0cddca 100644 --- a/src/lib/gql/__generated__/drupal.d.tsx +++ b/src/lib/gql/__generated__/drupal.d.tsx @@ -13,6 +13,7 @@ export type Scalars = { Boolean: {input: boolean; output: boolean} Int: {input: number; output: number} Float: {input: number; output: number} + Bibliography: {input: any; output: any} Cursor: {input: any; output: any} Email: {input: any; output: any} Html: {input: any; output: any} @@ -162,12 +163,215 @@ export type BookLink = { /** Entity type citation. */ export type CitationInterface = { + /** The time that the entity was last edited. */ + changed: DateTime + /** The time that the entity was created. */ + created: DateTime + /** The Universally Unique IDentifier (UUID). */ + id: Scalars["ID"]["output"] + /** The title of the Citation. */ + title: Scalars["String"]["output"] +} + +/** Entity type citation. */ +export type CitationSuArticleJournal = CitationInterface & { + __typename?: "CitationSuArticleJournal" + apa?: Maybe + /** The time that the entity was last edited. */ + changed: DateTime + chicago?: Maybe + /** The time that the entity was created. */ + created: DateTime + /** The Universally Unique IDentifier (UUID). */ + id: Scalars["ID"]["output"] + /** Author(s) */ + suAuthor?: Maybe> + /** Day */ + suDay?: Maybe + /** + * DOI id to the journal web page without the “https://doi.org/”. For example + * enter only for a link that is https://doi.org/12.345/123123 enter only + * 12.345/123123. + */ + suDoi?: Maybe + /** Issue */ + suIssue?: Maybe + /** The publisher of the journal. E.g. IEEE, Elsevier, etc. */ + suJournalPublisher?: Maybe + /** Month */ + suMonth?: Maybe + /** Page(s) */ + suPage?: Maybe + /** The name of the Journal in which the article was published. */ + suPublisher?: Maybe + /** + * Add a URL to an external source for this publication item such as https://example.com/. + * This can be the same url as the DOI link. + * By adding an external source URL, all listings of this publication will link + * to the external source instead of a page on this website. + */ + suUrl?: Maybe + /** Volume */ + suVolume?: Maybe + /** Year */ + suYear?: Maybe + /** The title of the Citation. */ + title: Scalars["String"]["output"] +} + +/** Entity type citation. */ +export type CitationSuArticleNewspaper = CitationInterface & { + __typename?: "CitationSuArticleNewspaper" + apa?: Maybe + /** The time that the entity was last edited. */ + changed: DateTime + chicago?: Maybe + /** The time that the entity was created. */ + created: DateTime + /** The Universally Unique IDentifier (UUID). */ + id: Scalars["ID"]["output"] + /** Author(s) */ + suAuthor?: Maybe> + /** Day */ + suDay?: Maybe + /** Month */ + suMonth?: Maybe + /** Publisher */ + suPublisher?: Maybe + /** + * Add a URL to an external source for this publication item such as https://example.com/. + * This can be the same url as the DOI link. + * By adding an external source URL, all listings of this publication will link + * to the external source instead of a page on this website. + */ + suUrl?: Maybe + /** Year */ + suYear?: Maybe + /** The title of the Citation. */ + title: Scalars["String"]["output"] +} + +/** Entity type citation. */ +export type CitationSuBook = CitationInterface & { + __typename?: "CitationSuBook" + apa?: Maybe + /** The time that the entity was last edited. */ + changed: DateTime + chicago?: Maybe + /** The time that the entity was created. */ + created: DateTime + /** The Universally Unique IDentifier (UUID). */ + id: Scalars["ID"]["output"] + /** Author(s) */ + suAuthor?: Maybe> + /** + * DOI id to the journal web page without the “https://doi.org/”. For example + * enter only for a link that is https://doi.org/12.345/123123 enter only + * 12.345/123123. + */ + suDoi?: Maybe + /** Edition */ + suEdition?: Maybe + /** + * Page numbers may vary based on the e-book viewer used. In these cases it is + * preferred to use chapter or paragraph numbers if they are provided (eg. chap. + */ + suPage?: Maybe + /** Publisher */ + suPublisher?: Maybe + /** Publication Place */ + suPublisherPlace?: Maybe + /** Subtitle */ + suSubtitle?: Maybe + /** + * Add a URL to an external source for this publication item such as https://example.com/. + * This can be the same url as the DOI link. + * By adding an external source URL, all listings of this publication will link + * to the external source instead of a page on this website. + */ + suUrl?: Maybe + /** Year */ + suYear?: Maybe + /** The title of the Citation. */ + title: Scalars["String"]["output"] +} + +/** Entity type citation. */ +export type CitationSuOther = CitationInterface & { + __typename?: "CitationSuOther" + apa?: Maybe + /** The time that the entity was last edited. */ + changed: DateTime + chicago?: Maybe + /** The time that the entity was created. */ + created: DateTime /** The Universally Unique IDentifier (UUID). */ id: Scalars["ID"]["output"] + /** Author(s) */ + suAuthor?: Maybe> + /** Day */ + suDay?: Maybe + /** Month */ + suMonth?: Maybe + /** Publisher */ + suPublisher?: Maybe + /** Subtitle */ + suSubtitle?: Maybe + /** External Source */ + suUrl?: Maybe + /** Year */ + suYear?: Maybe + /** The title of the Citation. */ + title: Scalars["String"]["output"] } /** Entity type citation. */ -export type CitationUnion = SuArticleJournal | SuArticleNewspaper | SuBook | SuOther | SuThesi +export type CitationSuThesi = CitationInterface & { + __typename?: "CitationSuThesi" + apa?: Maybe + /** The time that the entity was last edited. */ + changed: DateTime + chicago?: Maybe + /** The time that the entity was created. */ + created: DateTime + /** The Universally Unique IDentifier (UUID). */ + id: Scalars["ID"]["output"] + /** Author(s) */ + suAuthor?: Maybe> + /** Day */ + suDay?: Maybe + /** + * DOI id to the journal web page without the “https://doi.org/”. For example + * enter only for a link that is https://doi.org/12.345/123123 enter only + * 12.345/123123. + */ + suDoi?: Maybe + /** Type of Dissertation */ + suGenre?: Maybe + /** Month */ + suMonth?: Maybe + /** This can also be the university for the thesis. */ + suPublisher?: Maybe + /** + * Add a URL to an external source for this publication item such as https://example.com/. + * This can be the same url as the DOI link. + * By adding an external source URL, all listings of this publication will link + * to the external source instead of a page on this website. + */ + suUrl?: Maybe + /** To display the year in the citation style for Chicago format, the publisher field must be populated. */ + suYear?: Maybe + /** The title of the Citation. */ + title: Scalars["String"]["output"] +} + +/** Entity type citation. */ +export type CitationUnion = + | CitationSuArticleJournal + | CitationSuArticleNewspaper + | CitationSuBook + | CitationSuOther + | CitationSuThesi /** Entity type config_pages. */ export type ConfigPagesInterface = { @@ -1205,6 +1409,7 @@ export type NodeStanfordEventSeriesSuEventSeriesComponentsUnion = | ParagraphStanfordBanner | ParagraphStanfordCard | ParagraphStanfordEntity + | ParagraphStanfordFaq | ParagraphStanfordGallery | ParagraphStanfordList | ParagraphStanfordMediaCaption @@ -1217,6 +1422,7 @@ export type NodeStanfordEventSuEventComponentsUnion = | ParagraphStanfordBanner | ParagraphStanfordCard | ParagraphStanfordEntity + | ParagraphStanfordFaq | ParagraphStanfordGallery | ParagraphStanfordList | ParagraphStanfordMediaCaption @@ -1330,6 +1536,7 @@ export type NodeStanfordNewsSuNewsComponentsUnion = | ParagraphStanfordBanner | ParagraphStanfordCard | ParagraphStanfordEntity + | ParagraphStanfordFaq | ParagraphStanfordGallery | ParagraphStanfordList | ParagraphStanfordMediaCaption @@ -1423,6 +1630,7 @@ export type NodeStanfordPageSuPageComponentsUnion = | ParagraphStanfordBanner | ParagraphStanfordCard | ParagraphStanfordEntity + | ParagraphStanfordFaq | ParagraphStanfordGallery | ParagraphStanfordList | ParagraphStanfordMediaCaption @@ -1541,6 +1749,7 @@ export type NodeStanfordPersonSuPersonComponentsUnion = | ParagraphStanfordBanner | ParagraphStanfordCard | ParagraphStanfordEntity + | ParagraphStanfordFaq | ParagraphStanfordGallery | ParagraphStanfordList | ParagraphStanfordMediaCaption @@ -1697,17 +1906,18 @@ export type NodeStanfordPublicationEdge = Edge & { /** Choose a type of publication item to display. */ export type NodeStanfordPublicationSuPublicationCitationUnion = - | SuArticleJournal - | SuArticleNewspaper - | SuBook - | SuOther - | SuThesi + | CitationSuArticleJournal + | CitationSuArticleNewspaper + | CitationSuBook + | CitationSuOther + | CitationSuThesi /** Paragraphs */ export type NodeStanfordPublicationSuPublicationComponentsUnion = | ParagraphStanfordBanner | ParagraphStanfordCard | ParagraphStanfordEntity + | ParagraphStanfordFaq | ParagraphStanfordGallery | ParagraphStanfordList | ParagraphStanfordMediaCaption @@ -2085,6 +2295,30 @@ export type ParagraphStanfordEntitySuEntityItemUnion = | NodeStanfordPolicy | NodeStanfordPublication +/** Entity type paragraph. */ +export type ParagraphStanfordFaq = LayoutParagraphsInterface & + ParagraphInterface & { + __typename?: "ParagraphStanfordFaq" + /** Paragraph Behavior Settings. */ + behaviors?: Maybe + /** The layout information for this paragraph. */ + composition: LayoutParagraphs + /** The time that the Paragraph was created. */ + created: DateTime + /** The Universally Unique IDentifier (UUID). */ + id: Scalars["ID"]["output"] + /** The paragraphs entity language code. */ + langcode: Language + /** Published */ + status: Scalars["Boolean"]["output"] + /** Description */ + suFaqDescription?: Maybe + /** Headline */ + suFaqHeadline?: Maybe + /** Questions/Answers */ + suFaqQuestions?: Maybe> + } + /** Entity type paragraph. */ export type ParagraphStanfordGallery = LayoutParagraphsInterface & ParagraphInterface & { @@ -2410,6 +2644,7 @@ export type ParagraphUnion = | ParagraphStanfordBanner | ParagraphStanfordCard | ParagraphStanfordEntity + | ParagraphStanfordFaq | ParagraphStanfordGallery | ParagraphStanfordList | ParagraphStanfordMediaCaption @@ -2470,6 +2705,8 @@ export type Query = { redirects: RedirectConnection /** Load a Route by path. */ route?: Maybe + /** Query for view search display graphql_search. */ + search?: Maybe /** Query for view stanford_basic_pages display basic_page_type_list_graphql. */ stanfordBasicPages?: Maybe /** List of all StanfordBasicSiteSetting on the platform. */ @@ -2480,6 +2717,8 @@ export type Query = { stanfordLocalFooters: StanfordLocalFooterConnection /** News Views */ stanfordNews?: Maybe + /** Query for view stanford_opportunities display graphql. */ + stanfordOpportunities?: Maybe /** A list of people in a grid with node as the base table */ stanfordPerson?: Maybe /** Query for view stanford_shared_tags display card_grid_graphql. */ @@ -2669,6 +2908,14 @@ export type QueryRouteArgs = { path: Scalars["String"]["input"] } +/** The schema's entry-point for queries. */ +export type QuerySearchArgs = { + filter: SearchFilterInput + offset?: InputMaybe + page?: InputMaybe + pageSize?: InputMaybe +} + /** The schema's entry-point for queries. */ export type QueryStanfordBasicPagesArgs = { contextualFilter?: InputMaybe @@ -2720,6 +2967,14 @@ export type QueryStanfordNewsArgs = { sortKey?: InputMaybe } +/** The schema's entry-point for queries. */ +export type QueryStanfordOpportunitiesArgs = { + filter?: InputMaybe + offset?: InputMaybe + page?: InputMaybe + pageSize?: InputMaybe +} + /** The schema's entry-point for queries. */ export type QueryStanfordPersonArgs = { contextualFilter?: InputMaybe @@ -2929,6 +3184,46 @@ export type SchemaInformation = { version?: Maybe } +export type SearchFilterInput = { + /** Keyword Search */ + key: Scalars["String"]["input"] +} + +/** Result for view search display graphql_search. */ +export type SearchResult = View & { + __typename?: "SearchResult" + /** The description of the view. */ + description?: Maybe + /** The machine name of the display. */ + display: Scalars["String"]["output"] + /** Exposed filters for the view. */ + filters: Array> + /** The ID of the view. */ + id: Scalars["ID"]["output"] + /** The human friendly label of the view. */ + label?: Maybe + /** The language code of the view. */ + langcode?: Maybe + /** Information about the page in the view. */ + pageInfo: ViewPageInfo + /** The results of the view. */ + results: Array + /** The machine name of the view. */ + view: Scalars["String"]["output"] +} + +/** All available types for view result row. */ +export type SearchRow = + | NodeStanfordCourse + | NodeStanfordEvent + | NodeStanfordEventSeries + | NodeStanfordNews + | NodeStanfordPage + | NodeStanfordPerson + | NodeStanfordPolicy + | NodeStanfordPublication + | NodeSulLibrary + /** Smart Date data. */ export type SmartDateType = { __typename?: "SmartDateType" @@ -3028,6 +3323,8 @@ export type StanfordBasicSiteSetting = ConfigPagesInterface & * in + /** Enable Algolia searching on the search page. */ + suSiteAlgoliaUi?: Maybe /** Check this box to enable the split-button drop down menu feature. */ suSiteDropdowns?: Maybe /** Maximum Menu Levels */ @@ -3241,6 +3538,34 @@ export enum StanfordNewsSortKeys { Title = "TITLE", } +export type StanfordOpportunitiesFilterInput = { + /** Filter */ + tags?: InputMaybe>> +} + +/** Result for view stanford_opportunities display graphql. */ +export type StanfordOpportunitiesResult = View & { + __typename?: "StanfordOpportunitiesResult" + /** The description of the view. */ + description?: Maybe + /** The machine name of the display. */ + display: Scalars["String"]["output"] + /** Exposed filters for the view. */ + filters: Array> + /** The ID of the view. */ + id: Scalars["ID"]["output"] + /** The human friendly label of the view. */ + label?: Maybe + /** The language code of the view. */ + langcode?: Maybe + /** Information about the page in the view. */ + pageInfo: ViewPageInfo + /** The results of the view. */ + results: Array + /** The machine name of the view. */ + view: Scalars["String"]["output"] +} + export type StanfordPersonContextualFilterInput = { term_node_taxonomy_name_depth?: InputMaybe } @@ -3354,126 +3679,6 @@ export type StanfordSuperFooterEdge = Edge & { node: StanfordSuperFooter } -/** Entity type citation. */ -export type SuArticleJournal = CitationInterface & { - __typename?: "SuArticleJournal" - /** The Universally Unique IDentifier (UUID). */ - id: Scalars["ID"]["output"] - /** Author(s) */ - suAuthor?: Maybe> - /** Day */ - suDay?: Maybe - /** - * DOI id to the journal web page without the “https://doi.org/”. For example - * enter only for a link that is https://doi.org/12.345/123123 enter only - * 12.345/123123. - */ - suDoi?: Maybe - /** Issue */ - suIssue?: Maybe - /** The publisher of the journal. E.g. IEEE, Elsevier, etc. */ - suJournalPublisher?: Maybe - /** Month */ - suMonth?: Maybe - /** Page(s) */ - suPage?: Maybe - /** The name of the Journal in which the article was published. */ - suPublisher?: Maybe - /** - * Add a URL to an external source for this publication item such as https://example.com/. - * This can be the same url as the DOI link. - * By adding an external source URL, all listings of this publication will link - * to the external source instead of a page on this website. - */ - suUrl?: Maybe - /** Volume */ - suVolume?: Maybe - /** Year */ - suYear?: Maybe -} - -/** Entity type citation. */ -export type SuArticleNewspaper = CitationInterface & { - __typename?: "SuArticleNewspaper" - /** The Universally Unique IDentifier (UUID). */ - id: Scalars["ID"]["output"] - /** Author(s) */ - suAuthor?: Maybe> - /** Day */ - suDay?: Maybe - /** Month */ - suMonth?: Maybe - /** Publisher */ - suPublisher?: Maybe - /** - * Add a URL to an external source for this publication item such as https://example.com/. - * This can be the same url as the DOI link. - * By adding an external source URL, all listings of this publication will link - * to the external source instead of a page on this website. - */ - suUrl?: Maybe - /** Year */ - suYear?: Maybe -} - -/** Entity type citation. */ -export type SuBook = CitationInterface & { - __typename?: "SuBook" - /** The Universally Unique IDentifier (UUID). */ - id: Scalars["ID"]["output"] - /** Author(s) */ - suAuthor?: Maybe> - /** - * DOI id to the journal web page without the “https://doi.org/”. For example - * enter only for a link that is https://doi.org/12.345/123123 enter only - * 12.345/123123. - */ - suDoi?: Maybe - /** Edition */ - suEdition?: Maybe - /** - * Page numbers may vary based on the e-book viewer used. In these cases it is - * preferred to use chapter or paragraph numbers if they are provided (eg. chap. - */ - suPage?: Maybe - /** Publisher */ - suPublisher?: Maybe - /** Publication Place */ - suPublisherPlace?: Maybe - /** Subtitle */ - suSubtitle?: Maybe - /** - * Add a URL to an external source for this publication item such as https://example.com/. - * This can be the same url as the DOI link. - * By adding an external source URL, all listings of this publication will link - * to the external source instead of a page on this website. - */ - suUrl?: Maybe - /** Year */ - suYear?: Maybe -} - -/** Entity type citation. */ -export type SuOther = CitationInterface & { - __typename?: "SuOther" - /** The Universally Unique IDentifier (UUID). */ - id: Scalars["ID"]["output"] - /** Author(s) */ - suAuthor?: Maybe> - /** Day */ - suDay?: Maybe - /** Month */ - suMonth?: Maybe - /** Publisher */ - suPublisher?: Maybe - /** Subtitle */ - suSubtitle?: Maybe - /** External Source */ - suUrl?: Maybe - /** Year */ - suYear?: Maybe -} - /** Entity type su_policy_log. */ export type SuPolicyLog = SuPolicyLogInterface & { __typename?: "SuPolicyLog" @@ -3498,38 +3703,6 @@ export type SuPolicyLogInterface = { /** Entity type su_policy_log. */ export type SuPolicyLogUnion = SuPolicyLog -/** Entity type citation. */ -export type SuThesi = CitationInterface & { - __typename?: "SuThesi" - /** The Universally Unique IDentifier (UUID). */ - id: Scalars["ID"]["output"] - /** Author(s) */ - suAuthor?: Maybe> - /** Day */ - suDay?: Maybe - /** - * DOI id to the journal web page without the “https://doi.org/”. For example - * enter only for a link that is https://doi.org/12.345/123123 enter only - * 12.345/123123. - */ - suDoi?: Maybe - /** Type of Dissertation */ - suGenre?: Maybe - /** Month */ - suMonth?: Maybe - /** This can also be the university for the thesis. */ - suPublisher?: Maybe - /** - * Add a URL to an external source for this publication item such as https://example.com/. - * This can be the same url as the DOI link. - * By adding an external source URL, all listings of this publication will link - * to the external source instead of a page on this website. - */ - suUrl?: Maybe - /** To display the year in the citation style for Chicago format, the publisher field must be populated. */ - suYear?: Maybe -} - /** The schema's entry-point for subscriptions. */ export type Subscription = { __typename?: "Subscription" @@ -4240,8 +4413,10 @@ export type ViewReference = { /** All available view result types. */ export type ViewResultUnion = + | SearchResult | StanfordBasicPagesResult | StanfordNewsResult + | StanfordOpportunitiesResult | StanfordPersonResult | StanfordSharedTagsResult | SulBranchLocationsResult @@ -4492,6 +4667,23 @@ export type NodeQuery = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -4887,6 +5079,23 @@ export type NodeQuery = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -5157,6 +5366,23 @@ export type NodeQuery = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -5495,6 +5721,23 @@ export type NodeQuery = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -5787,6 +6030,23 @@ export type NodeQuery = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -6116,6 +6376,23 @@ export type NodeQuery = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -9177,6 +9454,23 @@ export type FragmentNodeStanfordPageFragment = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -9570,6 +9864,23 @@ export type FragmentNodeStanfordEventFragment = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -9960,6 +10271,23 @@ export type FragmentNodeStanfordEventSeriesFragment = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -10225,6 +10553,23 @@ export type FragmentNodeStanfordNewsFragment = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -10526,6 +10871,23 @@ export type FragmentNodeStanfordPersonFragment = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -10851,6 +11213,23 @@ export type FragmentNodeStanfordPublicationFragment = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -11190,6 +11569,23 @@ type FragmentNodeUnion_NodeStanfordEvent_Fragment = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -11580,6 +11976,23 @@ type FragmentNodeUnion_NodeStanfordEventSeries_Fragment = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -11845,6 +12258,23 @@ type FragmentNodeUnion_NodeStanfordNews_Fragment = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -12172,6 +12602,23 @@ type FragmentNodeUnion_NodeStanfordPage_Fragment = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -12453,6 +12900,23 @@ type FragmentNodeUnion_NodeStanfordPerson_Fragment = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -12778,6 +13242,23 @@ type FragmentNodeUnion_NodeStanfordPublication_Fragment = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -14541,6 +15022,13 @@ type FragmentParagraphInterface_ParagraphStanfordEntity_Fragment = { status: boolean } +type FragmentParagraphInterface_ParagraphStanfordFaq_Fragment = { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean +} + type FragmentParagraphInterface_ParagraphStanfordGallery_Fragment = { __typename: "ParagraphStanfordGallery" id: string @@ -14633,6 +15121,7 @@ export type FragmentParagraphInterfaceFragment = | FragmentParagraphInterface_ParagraphStanfordBanner_Fragment | FragmentParagraphInterface_ParagraphStanfordCard_Fragment | FragmentParagraphInterface_ParagraphStanfordEntity_Fragment + | FragmentParagraphInterface_ParagraphStanfordFaq_Fragment | FragmentParagraphInterface_ParagraphStanfordGallery_Fragment | FragmentParagraphInterface_ParagraphStanfordList_Fragment | FragmentParagraphInterface_ParagraphStanfordMediaCaption_Fragment @@ -15019,6 +15508,24 @@ export type FragmentParagraphStanfordPageTitleBannerFragment = { } } +export type FragmentParagraphStanfordFaqFragment = { + __typename: "ParagraphStanfordFaq" + suFaqHeadline?: string | null + id: string + behaviors?: string | null + status: boolean + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null +} + type FragmentParagraphUnion_ParagraphCollection_Fragment = { __typename: "ParagraphCollection" id: string @@ -15157,6 +15664,24 @@ type FragmentParagraphUnion_ParagraphStanfordEntity_Fragment = { > | null } +type FragmentParagraphUnion_ParagraphStanfordFaq_Fragment = { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null +} + type FragmentParagraphUnion_ParagraphStanfordGallery_Fragment = { __typename: "ParagraphStanfordGallery" id: string @@ -15340,6 +15865,7 @@ export type FragmentParagraphUnionFragment = | FragmentParagraphUnion_ParagraphStanfordBanner_Fragment | FragmentParagraphUnion_ParagraphStanfordCard_Fragment | FragmentParagraphUnion_ParagraphStanfordEntity_Fragment + | FragmentParagraphUnion_ParagraphStanfordFaq_Fragment | FragmentParagraphUnion_ParagraphStanfordGallery_Fragment | FragmentParagraphUnion_ParagraphStanfordList_Fragment | FragmentParagraphUnion_ParagraphStanfordMediaCaption_Fragment @@ -15667,6 +16193,23 @@ export type RouteQuery = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -16086,6 +16629,23 @@ export type RouteQuery = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -16374,6 +16934,23 @@ export type RouteQuery = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -16736,6 +17313,23 @@ export type RouteQuery = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -17052,6 +17646,23 @@ export type RouteQuery = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string @@ -17405,6 +18016,23 @@ export type RouteQuery = { | {__typename?: "NodeStanfordPublication"; id: string; path: string} > | null } + | { + __typename: "ParagraphStanfordFaq" + id: string + behaviors?: string | null + status: boolean + suFaqHeadline?: string | null + created: {__typename?: "DateTime"; timezone: any; time: any} + suFaqDescription?: {__typename?: "Text"; processed?: any | null} | null + suFaqQuestions?: Array<{ + __typename: "ParagraphStanfordAccordion" + suAccordionTitle: string + id: string + behaviors?: string | null + status: boolean + suAccordionBody: {__typename?: "Text"; processed?: any | null} + }> | null + } | { __typename: "ParagraphStanfordGallery" id: string diff --git a/src/lib/gql/__generated__/queries.ts b/src/lib/gql/__generated__/queries.ts index 76659a26..4e1945be 100644 --- a/src/lib/gql/__generated__/queries.ts +++ b/src/lib/gql/__generated__/queries.ts @@ -411,6 +411,24 @@ export const FragmentParagraphSulLibguideFragmentDoc = gql` sulLibguideId } ${FragmentParagraphInterfaceFragmentDoc}`; +export const FragmentParagraphStanfordFaqFragmentDoc = gql` + fragment FragmentParagraphStanfordFaq on ParagraphStanfordFaq { + ...FragmentParagraphInterface + created { + ...FragmentDateTime + } + suFaqDescription { + ...FragmentText + } + suFaqHeadline + suFaqQuestions { + ...FragmentParagraphStanfordAccordion + } +} + ${FragmentParagraphInterfaceFragmentDoc} +${FragmentDateTimeFragmentDoc} +${FragmentTextFragmentDoc} +${FragmentParagraphStanfordAccordionFragmentDoc}`; export const FragmentParagraphUnionFragmentDoc = gql` fragment FragmentParagraphUnion on ParagraphUnion { ...FragmentParagraphInterface @@ -430,6 +448,7 @@ export const FragmentParagraphUnionFragmentDoc = gql` ...FragmentParagraphSulContactCard ...FragmentParagraphSulFeatCollection ...FragmentParagraphSulLibguide + ...FragmentParagraphStanfordFaq } ${FragmentParagraphInterfaceFragmentDoc} ${FragmentParagraphStanfordAccordionFragmentDoc} @@ -447,7 +466,8 @@ ${FragmentParagraphCollectionCardFragmentDoc} ${FragmentParagraphSulButtonFragmentDoc} ${FragmentParagraphSulContactCardFragmentDoc} ${FragmentParagraphSulFeatCollectionFragmentDoc} -${FragmentParagraphSulLibguideFragmentDoc}`; +${FragmentParagraphSulLibguideFragmentDoc} +${FragmentParagraphStanfordFaqFragmentDoc}`; export const FragmentSmartDateTypeFragmentDoc = gql` fragment FragmentSmartDateType on SmartDateType { value diff --git a/src/lib/gql/fragments-paragraphs.drupal.gql b/src/lib/gql/fragments-paragraphs.drupal.gql index ee80400c..f3a53f44 100755 --- a/src/lib/gql/fragments-paragraphs.drupal.gql +++ b/src/lib/gql/fragments-paragraphs.drupal.gql @@ -236,6 +236,20 @@ fragment FragmentParagraphStanfordPageTitleBanner on ParagraphStanfordPageTitleB } } +fragment FragmentParagraphStanfordFaq on ParagraphStanfordFaq { + ...FragmentParagraphInterface + created { + ...FragmentDateTime + } + suFaqDescription { + ...FragmentText + } + suFaqHeadline + suFaqQuestions { + ...FragmentParagraphStanfordAccordion + } +} + fragment FragmentParagraphUnion on ParagraphUnion { ...FragmentParagraphInterface ...FragmentParagraphStanfordAccordion @@ -254,4 +268,5 @@ fragment FragmentParagraphUnion on ParagraphUnion { ...FragmentParagraphSulContactCard ...FragmentParagraphSulFeatCollection ...FragmentParagraphSulLibguide + ...FragmentParagraphStanfordFaq }