From d6a219b5e477d16f7c2d628cb28a6cd74c50b540 Mon Sep 17 00:00:00 2001 From: Joe Smallwood Date: Mon, 23 Oct 2023 17:00:15 +0300 Subject: [PATCH] Support custom indicator group titles and all indicators link --- .eslintrc.json | 1 - common/__generated__/graphql.ts | 305 ++++++++++-------- components/common/StreamField.tsx | 18 +- ...rGroupBlock.js => IndicatorGroupBlock.tsx} | 39 ++- .../indicators/IndicatorHighlightCard.tsx | 19 +- 5 files changed, 223 insertions(+), 159 deletions(-) rename components/contentblocks/{IndicatorGroupBlock.js => IndicatorGroupBlock.tsx} (74%) diff --git a/.eslintrc.json b/.eslintrc.json index fe372406..10258a28 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -10,7 +10,6 @@ "react/prop-types": [2], "react/jsx-props-no-spreading": ["off"], "import/no-extraneous-dependencies": ["error", { "devDependencies": true }], - "no-unused-vars": ["warn"], "import/extensions": [ "warn", { diff --git a/common/__generated__/graphql.ts b/common/__generated__/graphql.ts index b14df662..2e6dff94 100644 --- a/common/__generated__/graphql.ts +++ b/common/__generated__/graphql.ts @@ -444,7 +444,6 @@ export type ActionIndicator = { indicator: Indicator; }; -/** An enumeration. */ export enum ActionIndicatorEffectType { /** decreases */ Decreases = 'DECREASES', @@ -682,7 +681,6 @@ export type ActionResponsiblePartyReporteportValue = ReportValueInterface & { responsibleParty?: Maybe; }; -/** An enumeration. */ export enum ActionResponsiblePartyRole { /** Collaborator */ Collaborator = 'COLLABORATOR', @@ -773,7 +771,6 @@ export type ActionStatusSummary = { sentiment: Sentiment; }; -/** An enumeration. */ export enum ActionStatusSummaryIdentifier { Cancelled = 'CANCELLED', Completed = 'COMPLETED', @@ -817,6 +814,8 @@ export type ActionTask = { commentFi?: Maybe; commentI18n?: Maybe; commentLv?: Maybe; + commentPt?: Maybe; + commentPtBr?: Maybe; commentSv?: Maybe; /** The date when the task was completed */ completedAt?: Maybe; @@ -838,11 +837,12 @@ export type ActionTask = { nameFi: Scalars['String']; nameI18n: Scalars['String']; nameLv: Scalars['String']; + namePt: Scalars['String']; + namePtBr: Scalars['String']; nameSv: Scalars['String']; state: ActionTaskState; }; -/** An enumeration. */ export enum ActionTaskState { /** cancelled */ Cancelled = 'CANCELLED', @@ -873,7 +873,6 @@ export type ActionTimeliness = { sentiment: Sentiment; }; -/** An enumeration. */ export enum ActionTimelinessIdentifier { Acceptable = 'ACCEPTABLE', Late = 'LATE', @@ -1062,7 +1061,6 @@ export type AttributeTypeChoiceOption = { name: Scalars['String']; }; -/** An enumeration. */ export enum AttributeTypeFormat { /** Category */ CategoryChoice = 'CATEGORY_CHOICE', @@ -1132,7 +1130,6 @@ export type CartographyProviderCredentials = { publicAccessToken: Scalars['String']; }; -/** An enumeration. */ export enum CartographyProviderCredentialsProvider { /** MapBox */ Mapbox = 'MAPBOX' @@ -1158,7 +1155,7 @@ export type Category = { categoryPage?: Maybe; categoryPages: Array; children: Array; - /** Set if the category has a theme colour */ + /** Set if the category has a theme color */ color?: Maybe; common?: Maybe; externalIdentifier?: Maybe; @@ -1541,7 +1538,6 @@ export type CategoryTypePageLevelLayout = { layoutMainTop?: Maybe>; }; -/** An enumeration. */ export enum CategoryTypeSelectWidget { /** Multiple */ Multiple = 'MULTIPLE', @@ -1591,7 +1587,7 @@ export type CollectionObjectType = { export type CommonCategory = { __typename?: 'CommonCategory'; categoryInstances: Array; - /** Set if the category has a theme colour */ + /** Set if the category has a theme color */ color?: Maybe; helpText: Scalars['String']; iconImage?: Maybe; @@ -1645,7 +1641,6 @@ export type CommonIndicatorNormalization = { unit?: Maybe; }; -/** An enumeration. */ export enum Comparison { Gt = 'GT', Lte = 'LTE' @@ -1660,7 +1655,7 @@ export type CreateOrganizationMutationInput = { dissolutionDate?: InputMaybe; /** A date of founding */ foundingDate?: InputMaybe; - /** A primary name, e.g. a legally recognised name */ + /** A primary name, e.g. a legally recognized name */ name: Scalars['String']; parent?: InputMaybe; }; @@ -2119,9 +2114,9 @@ export type Indicator = { latestGraph?: Maybe; latestValue?: Maybe; level?: Maybe; - /** What is the maximum value this indicator can reach? It is used in visualisations as the Y axis maximum. */ + /** What is the maximum value this indicator can reach? It is used in visualizations as the Y axis maximum. */ maxValue?: Maybe; - /** What is the minimum value this indicator can reach? It is used in visualisations as the Y axis minimum. */ + /** What is the minimum value this indicator can reach? It is used in visualizations as the Y axis minimum. */ minValue?: Maybe; name: Scalars['String']; organization: Organization; @@ -2203,10 +2198,12 @@ export type IndicatorGraph = { export type IndicatorGroupBlock = StreamFieldInterface & { __typename?: 'IndicatorGroupBlock'; blockType: Scalars['String']; + blocks: Array; field: Scalars['String']; id?: Maybe; - items: Array; + indicators?: Maybe>>; rawValue: Scalars['String']; + title?: Maybe; }; export type IndicatorHighlightsBlock = StreamFieldInterface & { @@ -2231,7 +2228,6 @@ export type IndicatorLevel = { plan: Plan; }; -/** An enumeration. */ export enum IndicatorLevelLevel { /** operational */ Operational = 'OPERATIONAL', @@ -2353,7 +2349,6 @@ export type IndicatorShowcaseBlock = StreamFieldInterface & { title?: Maybe; }; -/** An enumeration. */ export enum IndicatorTimeResolution { /** day */ Day = 'DAY', @@ -2436,6 +2431,8 @@ export type MonitoringQualityPoint = { descriptionNoFi: Scalars['String']; descriptionNoI18n: Scalars['String']; descriptionNoLv: Scalars['String']; + descriptionNoPt: Scalars['String']; + descriptionNoPtBr: Scalars['String']; descriptionNoSv: Scalars['String']; descriptionYes?: Maybe; descriptionYesDa: Scalars['String']; @@ -2449,6 +2446,8 @@ export type MonitoringQualityPoint = { descriptionYesFi: Scalars['String']; descriptionYesI18n: Scalars['String']; descriptionYesLv: Scalars['String']; + descriptionYesPt: Scalars['String']; + descriptionYesPtBr: Scalars['String']; descriptionYesSv: Scalars['String']; i18n?: Maybe; id: Scalars['ID']; @@ -2465,6 +2464,8 @@ export type MonitoringQualityPoint = { nameFi: Scalars['String']; nameI18n: Scalars['String']; nameLv: Scalars['String']; + namePt: Scalars['String']; + namePtBr: Scalars['String']; nameSv: Scalars['String']; order: Scalars['Int']; plan: Plan; @@ -2546,19 +2547,19 @@ export type Organization = { actionCount: Scalars['Int']; adminButtons: Array; ancestors?: Maybe>>; - /** An organisation category, e.g. committee */ + /** An organization category, e.g. committee */ classification?: Maybe; /** Number of contact persons that are associated with this organization */ contactPersonCount: Scalars['Int']; descendants?: Maybe>>; description: Scalars['String']; - /** A distinct name for this organisation (generated automatically) */ + /** A distinct name for this organization (generated automatically) */ distinctName?: Maybe; email: Scalars['String']; id: Scalars['ID']; location?: Maybe; logo?: Maybe; - /** A primary name, e.g. a legally recognised name */ + /** A primary name, e.g. a legally recognized name */ name: Scalars['String']; parent?: Maybe; plansWithActionResponsibilities: Array; @@ -2596,8 +2597,10 @@ export type OrganizationClass = { nameFi: Scalars['String']; nameI18n: Scalars['String']; nameLv: Scalars['String']; + namePt: Scalars['String']; + namePtBr: Scalars['String']; nameSv: Scalars['String']; - /** An organisation category, e.g. committee */ + /** An organization category, e.g. committee */ organizationSet: Array; }; @@ -2857,7 +2860,7 @@ export type Person = { firstName: Scalars['String']; id: Scalars['ID']; lastName: Scalars['String']; - /** What is this person's organisation */ + /** What is this person's organization */ organization: Organization; title?: Maybe; }; @@ -3078,7 +3081,6 @@ export type PlanFeatures = { showAdminLink: Scalars['Boolean']; }; -/** An enumeration. */ export enum PlanFeaturesContactPersonsPublicData { /** Show all information */ All = 'ALL', @@ -3322,7 +3324,6 @@ export type PrivacyPolicyPageSiblingsArgs = { searchQuery?: InputMaybe; }; -/** An enumeration. */ export enum PublicationStatus { Published = 'PUBLISHED', Scheduled = 'SCHEDULED', @@ -3503,7 +3504,6 @@ export type RelatedCommonIndicator = { id: Scalars['ID']; }; -/** An enumeration. */ export enum RelatedCommonIndicatorEffectType { /** decreases */ Decreases = 'DECREASES', @@ -3525,7 +3525,6 @@ export type RelatedIndicator = { id: Scalars['ID']; }; -/** An enumeration. */ export enum RelatedIndicatorConfidenceLevel { /** high */ High = 'HIGH', @@ -3535,7 +3534,6 @@ export enum RelatedIndicatorConfidenceLevel { Medium = 'MEDIUM' } -/** An enumeration. */ export enum RelatedIndicatorEffectType { /** decreases */ Decreases = 'DECREASES', @@ -3694,7 +3692,6 @@ export type SearchResults = { hits?: Maybe>>; }; -/** An enumeration. */ export enum Sentiment { Negative = 'NEGATIVE', Neutral = 'NEUTRAL', @@ -3719,7 +3716,6 @@ export type SiteGeneralContent = { siteTitle: Scalars['String']; }; -/** An enumeration. */ export enum SiteGeneralContentActionTaskTerm { /** Milestone */ Milestone = 'MILESTONE', @@ -3727,7 +3723,6 @@ export enum SiteGeneralContentActionTaskTerm { Task = 'TASK' } -/** An enumeration. */ export enum SiteGeneralContentActionTerm { /** Action */ Action = 'ACTION', @@ -4017,7 +4012,7 @@ export type UpdateOrganizationMutationInput = { /** A date of founding */ foundingDate?: InputMaybe; id?: InputMaybe; - /** A primary name, e.g. a legally recognised name */ + /** A primary name, e.g. a legally recognized name */ name: Scalars['String']; parent?: InputMaybe; }; @@ -4098,7 +4093,6 @@ export type UserFeedbackNode = { url: Scalars['String']; }; -/** An enumeration. */ export enum UserFeedbackType { /** Accessibility */ Accessibility = 'ACCESSIBILITY', @@ -7617,7 +7611,7 @@ type StreamFieldFragment_CartographyVisualisationBlock_Fragment = ( type StreamFieldFragment_CategoryListBlock_Fragment = ( { style?: string | null, heading?: string | null, lead?: string | null, id?: string | null, blockType: string, field: string, categoryType?: ( { id: string, hideCategoryIdentifiers: boolean, categories: Array<( - { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, level?: ( + { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, iconSvgUrl?: string | null, level?: ( { name: string, namePlural?: string | null } & { __typename?: 'CategoryLevel' } ) | null, image?: ( @@ -7638,6 +7632,12 @@ type StreamFieldFragment_CategoryListBlock_Fragment = ( & { __typename?: 'ImageRendition' } ) | null } & { __typename?: 'Image' } + ) | null, iconImage?: ( + { rendition?: ( + { src: string } + & { __typename?: 'ImageRendition' } + ) | null } + & { __typename?: 'Image' } ) | null, categoryPage?: ( { title: string, urlPath: string, live: boolean } & { __typename?: 'CategoryPage' } @@ -7650,7 +7650,7 @@ type StreamFieldFragment_CategoryListBlock_Fragment = ( & { __typename?: 'CategoryType' } ) | null, category?: ( { id: string, children: Array<( - { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, level?: ( + { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, iconSvgUrl?: string | null, level?: ( { name: string, namePlural?: string | null } & { __typename?: 'CategoryLevel' } ) | null, image?: ( @@ -7671,6 +7671,12 @@ type StreamFieldFragment_CategoryListBlock_Fragment = ( & { __typename?: 'ImageRendition' } ) | null } & { __typename?: 'Image' } + ) | null, iconImage?: ( + { rendition?: ( + { src: string } + & { __typename?: 'ImageRendition' } + ) | null } + & { __typename?: 'Image' } ) | null, categoryPage?: ( { title: string, urlPath: string, live: boolean } & { __typename?: 'CategoryPage' } @@ -7744,23 +7750,8 @@ type StreamFieldFragment_IndicatorBlock_Fragment = ( ); type StreamFieldFragment_IndicatorGroupBlock_Fragment = ( - { id?: string | null, blockType: string, field: string, items: Array<( - { id?: string | null } - & { __typename?: 'AccessibilityStatementComplianceStatusBlock' | 'AccessibilityStatementContactFormBlock' | 'AccessibilityStatementContactInformationBlock' | 'AccessibilityStatementPreparationInformationBlock' | 'ActionAttributeTypeFilterBlock' | 'ActionAttributeTypeReportFieldBlock' | 'ActionCategoryFilterCardBlock' | 'ActionCategoryFilterCardsBlock' | 'ActionCategoryReportFieldBlock' | 'ActionContactFormBlock' | 'ActionContactPersonsBlock' | 'ActionContentAttributeTypeBlock' | 'ActionContentCategoryTypeBlock' | 'ActionContentSectionBlock' | 'ActionDescriptionBlock' | 'ActionHighlightsBlock' | 'ActionImplementationPhaseFilterBlock' | 'ActionImplementationPhaseReportFieldBlock' | 'ActionLeadParagraphBlock' | 'ActionLinksBlock' } - ) | ( - { id?: string | null } - & { __typename?: 'ActionListBlock' | 'ActionMergedActionsBlock' | 'ActionOfficialNameBlock' | 'ActionRelatedActionsBlock' | 'ActionRelatedIndicatorsBlock' | 'ActionResponsiblePartiesBlock' | 'ActionResponsiblePartyReportFieldBlock' | 'ActionScheduleBlock' | 'ActionScheduleFilterBlock' | 'ActionStatusFilterBlock' | 'ActionStatusGraphsBlock' | 'ActionStatusReportFieldBlock' | 'ActionTasksBlock' | 'AdaptiveEmbedBlock' | 'BlockQuoteBlock' | 'BooleanBlock' | 'CardBlock' | 'CardListBlock' | 'CartographyVisualisationBlock' | 'CategoryListBlock' } - ) | ( - { id?: string | null } - & { __typename?: 'CategoryPageAttributeTypeBlock' | 'CategoryPageBodyBlock' | 'CategoryPageCategoryListBlock' | 'CategoryPageContactFormBlock' | 'CategoryPageProgressBlock' | 'CategoryTreeMapBlock' | 'CategoryTypeFilterBlock' | 'CharBlock' | 'ChoiceBlock' | 'DateBlock' | 'DateTimeBlock' | 'DecimalBlock' | 'DocumentChooserBlock' | 'EmailBlock' | 'EmbedBlock' | 'FloatBlock' | 'FrontPageHeroBlock' | 'IdentifierColumnBlock' | 'ImageChooserBlock' | 'ImpactColumnBlock' } - ) | ( - { id?: string | null } - & { __typename?: 'ImplementationPhaseColumnBlock' | 'IndicatorGroupBlock' | 'IndicatorHighlightsBlock' | 'IndicatorShowcaseBlock' | 'IndicatorsColumnBlock' | 'IntegerBlock' | 'LargeImageBlock' | 'NameColumnBlock' | 'OrganizationColumnBlock' | 'PageChooserBlock' | 'PageLinkBlock' | 'PlanFilterBlock' | 'PrimaryOrganizationFilterBlock' | 'QuestionAnswerBlock' | 'QuestionBlock' | 'RawHTMLBlock' | 'RegexBlock' | 'RelatedIndicatorsBlock' | 'RelatedPlanListBlock' | 'ReportComparisonBlock' } - ) | ( - { id?: string | null } - & { __typename?: 'ReportTypeFieldChooserBlock' | 'ResponsiblePartiesColumnBlock' | 'ResponsiblePartyFilterBlock' | 'RichTextBlock' | 'StaticBlock' | 'StatusColumnBlock' | 'StreamBlock' | 'StreamFieldBlock' | 'StructBlock' | 'TasksColumnBlock' | 'TextBlock' | 'TimeBlock' | 'URLBlock' | 'UpdatedAtColumnBlock' } - ) | ( - { style?: string | null, id?: string | null, indicator?: ( + { title?: string | null, id?: string | null, blockType: string, field: string, indicators?: Array<{ __typename?: 'AccessibilityStatementComplianceStatusBlock' | 'AccessibilityStatementContactFormBlock' | 'AccessibilityStatementContactInformationBlock' | 'AccessibilityStatementPreparationInformationBlock' | 'ActionAttributeTypeFilterBlock' | 'ActionAttributeTypeReportFieldBlock' | 'ActionCategoryFilterCardBlock' | 'ActionCategoryFilterCardsBlock' | 'ActionCategoryReportFieldBlock' | 'ActionContactFormBlock' | 'ActionContactPersonsBlock' | 'ActionContentAttributeTypeBlock' | 'ActionContentCategoryTypeBlock' | 'ActionContentSectionBlock' | 'ActionDescriptionBlock' | 'ActionHighlightsBlock' | 'ActionImplementationPhaseFilterBlock' | 'ActionImplementationPhaseReportFieldBlock' | 'ActionLeadParagraphBlock' | 'ActionLinksBlock' } | { __typename?: 'ActionListBlock' | 'ActionMergedActionsBlock' | 'ActionOfficialNameBlock' | 'ActionRelatedActionsBlock' | 'ActionRelatedIndicatorsBlock' | 'ActionResponsiblePartiesBlock' | 'ActionResponsiblePartyReportFieldBlock' | 'ActionScheduleBlock' | 'ActionScheduleFilterBlock' | 'ActionStatusFilterBlock' | 'ActionStatusGraphsBlock' | 'ActionStatusReportFieldBlock' | 'ActionTasksBlock' | 'AdaptiveEmbedBlock' | 'BlockQuoteBlock' | 'BooleanBlock' | 'CardBlock' | 'CardListBlock' | 'CartographyVisualisationBlock' | 'CategoryListBlock' } | { __typename?: 'CategoryPageAttributeTypeBlock' | 'CategoryPageBodyBlock' | 'CategoryPageCategoryListBlock' | 'CategoryPageContactFormBlock' | 'CategoryPageProgressBlock' | 'CategoryTreeMapBlock' | 'CategoryTypeFilterBlock' | 'CharBlock' | 'ChoiceBlock' | 'DateBlock' | 'DateTimeBlock' | 'DecimalBlock' | 'DocumentChooserBlock' | 'EmailBlock' | 'EmbedBlock' | 'FloatBlock' | 'FrontPageHeroBlock' | 'IdentifierColumnBlock' | 'ImageChooserBlock' | 'ImpactColumnBlock' } | { __typename?: 'ImplementationPhaseColumnBlock' | 'IndicatorGroupBlock' | 'IndicatorHighlightsBlock' | 'IndicatorShowcaseBlock' | 'IndicatorsColumnBlock' | 'IntegerBlock' | 'LargeImageBlock' | 'NameColumnBlock' | 'OrganizationColumnBlock' | 'PageChooserBlock' | 'PageLinkBlock' | 'PlanFilterBlock' | 'PrimaryOrganizationFilterBlock' | 'QuestionAnswerBlock' | 'QuestionBlock' | 'RawHTMLBlock' | 'RegexBlock' | 'RelatedIndicatorsBlock' | 'RelatedPlanListBlock' | 'ReportComparisonBlock' } | { __typename?: 'ReportTypeFieldChooserBlock' | 'ResponsiblePartiesColumnBlock' | 'ResponsiblePartyFilterBlock' | 'RichTextBlock' | 'StaticBlock' | 'StatusColumnBlock' | 'StreamBlock' | 'StreamFieldBlock' | 'StructBlock' | 'TasksColumnBlock' | 'TextBlock' | 'TimeBlock' | 'URLBlock' | 'UpdatedAtColumnBlock' } | ( + { style?: string | null, indicator?: ( { id: string, identifier?: string | null, name: string, description?: string | null, timeResolution: IndicatorTimeResolution, level?: string | null, unit: ( { id: string, name: string } & { __typename?: 'Unit' } @@ -7774,7 +7765,7 @@ type StreamFieldFragment_IndicatorGroupBlock_Fragment = ( & { __typename?: 'Indicator' } ) | null } & { __typename?: 'IndicatorBlock' } - )> } + ) | null> | null } & { __typename?: 'IndicatorGroupBlock' } ); @@ -7954,7 +7945,7 @@ export type GetActionListForGraphsQuery = ( ); export type CategoryListCategoryFragment = ( - { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, level?: ( + { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, iconSvgUrl?: string | null, level?: ( { name: string, namePlural?: string | null } & { __typename?: 'CategoryLevel' } ) | null, image?: ( @@ -7975,6 +7966,12 @@ export type CategoryListCategoryFragment = ( & { __typename?: 'ImageRendition' } ) | null } & { __typename?: 'Image' } + ) | null, iconImage?: ( + { rendition?: ( + { src: string } + & { __typename?: 'ImageRendition' } + ) | null } + & { __typename?: 'Image' } ) | null, categoryPage?: ( { title: string, urlPath: string, live: boolean } & { __typename?: 'CategoryPage' } @@ -9774,6 +9771,52 @@ export type PlanContextFragment = ( & { __typename?: 'Plan' } ); +export type PlaywrightGetPlanBasicsQueryVariables = Exact<{ + plan: Scalars['ID']; +}>; + + +export type PlaywrightGetPlanBasicsQuery = ( + { plan?: ( + { id: string, identifier: string, primaryLanguage: string, otherLanguages?: Array | null } + & { __typename?: 'Plan' } + ) | null } + & { __typename?: 'Query' } +); + +export type PlaywrightGetPlanInfoQueryVariables = Exact<{ + plan: Scalars['ID']; + locale: Scalars['String']; + clientURL: Scalars['String']; +}>; + + +export type PlaywrightGetPlanInfoQuery = ( + { plan?: ( + { id: string, identifier: string, name: string, shortName?: string | null, primaryLanguage: string, otherLanguages?: Array | null, generalContent: ( + { id: string, siteTitle: string, siteDescription: string } + & { __typename?: 'SiteGeneralContent' } + ), actionListPage?: ( + { urlPath: string } + & { __typename?: 'ActionListPage' } + ) | null, actions: Array<( + { identifier: string, viewUrl: string } + & { __typename?: 'Action' } + )>, mainMenu?: ( + { items: Array<{ __typename?: 'ExternalLinkMenuItem' } | ( + { page: ( + { id?: string | null, title: string, slug: string, urlPath: string } + & { __typename?: 'AccessibilityStatementPage' | 'ActionListPage' | 'CategoryPage' | 'CategoryTypePage' | 'EmptyPage' | 'ImpactGroupPage' | 'IndicatorListPage' | 'Page' | 'PlanRootPage' | 'PrivacyPolicyPage' | 'StaticPage' } + ) } + & { __typename?: 'PageMenuItem' } + ) | null> } + & { __typename?: 'MainMenu' } + ) | null } + & { __typename?: 'Plan' } + ) | null } + & { __typename?: 'Query' } +); + export type TemplatedCategoryPageFragmentFragment = ( { layout?: ( { iconSize?: string | null, layoutMainTop?: Array<( @@ -9907,7 +9950,7 @@ export type GetPlanPageGeneralQuery = ( ) | ( { style?: string | null, heading?: string | null, lead?: string | null, id?: string | null, blockType: string, field: string, categoryType?: ( { id: string, hideCategoryIdentifiers: boolean, categories: Array<( - { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, level?: ( + { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, iconSvgUrl?: string | null, level?: ( { name: string, namePlural?: string | null } & { __typename?: 'CategoryLevel' } ) | null, image?: ( @@ -9928,6 +9971,12 @@ export type GetPlanPageGeneralQuery = ( & { __typename?: 'ImageRendition' } ) | null } & { __typename?: 'Image' } + ) | null, iconImage?: ( + { rendition?: ( + { src: string } + & { __typename?: 'ImageRendition' } + ) | null } + & { __typename?: 'Image' } ) | null, categoryPage?: ( { title: string, urlPath: string, live: boolean } & { __typename?: 'CategoryPage' } @@ -9940,7 +9989,7 @@ export type GetPlanPageGeneralQuery = ( & { __typename?: 'CategoryType' } ) | null, category?: ( { id: string, children: Array<( - { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, level?: ( + { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, iconSvgUrl?: string | null, level?: ( { name: string, namePlural?: string | null } & { __typename?: 'CategoryLevel' } ) | null, image?: ( @@ -9961,6 +10010,12 @@ export type GetPlanPageGeneralQuery = ( & { __typename?: 'ImageRendition' } ) | null } & { __typename?: 'Image' } + ) | null, iconImage?: ( + { rendition?: ( + { src: string } + & { __typename?: 'ImageRendition' } + ) | null } + & { __typename?: 'Image' } ) | null, categoryPage?: ( { title: string, urlPath: string, live: boolean } & { __typename?: 'CategoryPage' } @@ -10022,23 +10077,8 @@ export type GetPlanPageGeneralQuery = ( ) | null } & { __typename?: 'IndicatorBlock' } ) | ( - { id?: string | null, blockType: string, field: string, items: Array<( - { id?: string | null } - & { __typename?: 'AccessibilityStatementComplianceStatusBlock' | 'AccessibilityStatementContactFormBlock' | 'AccessibilityStatementContactInformationBlock' | 'AccessibilityStatementPreparationInformationBlock' | 'ActionAttributeTypeFilterBlock' | 'ActionAttributeTypeReportFieldBlock' | 'ActionCategoryFilterCardBlock' | 'ActionCategoryFilterCardsBlock' | 'ActionCategoryReportFieldBlock' | 'ActionContactFormBlock' | 'ActionContactPersonsBlock' | 'ActionContentAttributeTypeBlock' | 'ActionContentCategoryTypeBlock' | 'ActionContentSectionBlock' | 'ActionDescriptionBlock' | 'ActionHighlightsBlock' | 'ActionImplementationPhaseFilterBlock' | 'ActionImplementationPhaseReportFieldBlock' | 'ActionLeadParagraphBlock' | 'ActionLinksBlock' } - ) | ( - { id?: string | null } - & { __typename?: 'ActionListBlock' | 'ActionMergedActionsBlock' | 'ActionOfficialNameBlock' | 'ActionRelatedActionsBlock' | 'ActionRelatedIndicatorsBlock' | 'ActionResponsiblePartiesBlock' | 'ActionResponsiblePartyReportFieldBlock' | 'ActionScheduleBlock' | 'ActionScheduleFilterBlock' | 'ActionStatusFilterBlock' | 'ActionStatusGraphsBlock' | 'ActionStatusReportFieldBlock' | 'ActionTasksBlock' | 'AdaptiveEmbedBlock' | 'BlockQuoteBlock' | 'BooleanBlock' | 'CardBlock' | 'CardListBlock' | 'CartographyVisualisationBlock' | 'CategoryListBlock' } - ) | ( - { id?: string | null } - & { __typename?: 'CategoryPageAttributeTypeBlock' | 'CategoryPageBodyBlock' | 'CategoryPageCategoryListBlock' | 'CategoryPageContactFormBlock' | 'CategoryPageProgressBlock' | 'CategoryTreeMapBlock' | 'CategoryTypeFilterBlock' | 'CharBlock' | 'ChoiceBlock' | 'DateBlock' | 'DateTimeBlock' | 'DecimalBlock' | 'DocumentChooserBlock' | 'EmailBlock' | 'EmbedBlock' | 'FloatBlock' | 'FrontPageHeroBlock' | 'IdentifierColumnBlock' | 'ImageChooserBlock' | 'ImpactColumnBlock' } - ) | ( - { id?: string | null } - & { __typename?: 'ImplementationPhaseColumnBlock' | 'IndicatorGroupBlock' | 'IndicatorHighlightsBlock' | 'IndicatorShowcaseBlock' | 'IndicatorsColumnBlock' | 'IntegerBlock' | 'LargeImageBlock' | 'NameColumnBlock' | 'OrganizationColumnBlock' | 'PageChooserBlock' | 'PageLinkBlock' | 'PlanFilterBlock' | 'PrimaryOrganizationFilterBlock' | 'QuestionAnswerBlock' | 'QuestionBlock' | 'RawHTMLBlock' | 'RegexBlock' | 'RelatedIndicatorsBlock' | 'RelatedPlanListBlock' | 'ReportComparisonBlock' } - ) | ( - { id?: string | null } - & { __typename?: 'ReportTypeFieldChooserBlock' | 'ResponsiblePartiesColumnBlock' | 'ResponsiblePartyFilterBlock' | 'RichTextBlock' | 'StaticBlock' | 'StatusColumnBlock' | 'StreamBlock' | 'StreamFieldBlock' | 'StructBlock' | 'TasksColumnBlock' | 'TextBlock' | 'TimeBlock' | 'URLBlock' | 'UpdatedAtColumnBlock' } - ) | ( - { style?: string | null, id?: string | null, indicator?: ( + { title?: string | null, id?: string | null, blockType: string, field: string, indicators?: Array<{ __typename?: 'AccessibilityStatementComplianceStatusBlock' | 'AccessibilityStatementContactFormBlock' | 'AccessibilityStatementContactInformationBlock' | 'AccessibilityStatementPreparationInformationBlock' | 'ActionAttributeTypeFilterBlock' | 'ActionAttributeTypeReportFieldBlock' | 'ActionCategoryFilterCardBlock' | 'ActionCategoryFilterCardsBlock' | 'ActionCategoryReportFieldBlock' | 'ActionContactFormBlock' | 'ActionContactPersonsBlock' | 'ActionContentAttributeTypeBlock' | 'ActionContentCategoryTypeBlock' | 'ActionContentSectionBlock' | 'ActionDescriptionBlock' | 'ActionHighlightsBlock' | 'ActionImplementationPhaseFilterBlock' | 'ActionImplementationPhaseReportFieldBlock' | 'ActionLeadParagraphBlock' | 'ActionLinksBlock' } | { __typename?: 'ActionListBlock' | 'ActionMergedActionsBlock' | 'ActionOfficialNameBlock' | 'ActionRelatedActionsBlock' | 'ActionRelatedIndicatorsBlock' | 'ActionResponsiblePartiesBlock' | 'ActionResponsiblePartyReportFieldBlock' | 'ActionScheduleBlock' | 'ActionScheduleFilterBlock' | 'ActionStatusFilterBlock' | 'ActionStatusGraphsBlock' | 'ActionStatusReportFieldBlock' | 'ActionTasksBlock' | 'AdaptiveEmbedBlock' | 'BlockQuoteBlock' | 'BooleanBlock' | 'CardBlock' | 'CardListBlock' | 'CartographyVisualisationBlock' | 'CategoryListBlock' } | { __typename?: 'CategoryPageAttributeTypeBlock' | 'CategoryPageBodyBlock' | 'CategoryPageCategoryListBlock' | 'CategoryPageContactFormBlock' | 'CategoryPageProgressBlock' | 'CategoryTreeMapBlock' | 'CategoryTypeFilterBlock' | 'CharBlock' | 'ChoiceBlock' | 'DateBlock' | 'DateTimeBlock' | 'DecimalBlock' | 'DocumentChooserBlock' | 'EmailBlock' | 'EmbedBlock' | 'FloatBlock' | 'FrontPageHeroBlock' | 'IdentifierColumnBlock' | 'ImageChooserBlock' | 'ImpactColumnBlock' } | { __typename?: 'ImplementationPhaseColumnBlock' | 'IndicatorGroupBlock' | 'IndicatorHighlightsBlock' | 'IndicatorShowcaseBlock' | 'IndicatorsColumnBlock' | 'IntegerBlock' | 'LargeImageBlock' | 'NameColumnBlock' | 'OrganizationColumnBlock' | 'PageChooserBlock' | 'PageLinkBlock' | 'PlanFilterBlock' | 'PrimaryOrganizationFilterBlock' | 'QuestionAnswerBlock' | 'QuestionBlock' | 'RawHTMLBlock' | 'RegexBlock' | 'RelatedIndicatorsBlock' | 'RelatedPlanListBlock' | 'ReportComparisonBlock' } | { __typename?: 'ReportTypeFieldChooserBlock' | 'ResponsiblePartiesColumnBlock' | 'ResponsiblePartyFilterBlock' | 'RichTextBlock' | 'StaticBlock' | 'StatusColumnBlock' | 'StreamBlock' | 'StreamFieldBlock' | 'StructBlock' | 'TasksColumnBlock' | 'TextBlock' | 'TimeBlock' | 'URLBlock' | 'UpdatedAtColumnBlock' } | ( + { style?: string | null, indicator?: ( { id: string, identifier?: string | null, name: string, description?: string | null, timeResolution: IndicatorTimeResolution, level?: string | null, unit: ( { id: string, name: string } & { __typename?: 'Unit' } @@ -10052,7 +10092,7 @@ export type GetPlanPageGeneralQuery = ( & { __typename?: 'Indicator' } ) | null } & { __typename?: 'IndicatorBlock' } - )> } + ) | null> | null } & { __typename?: 'IndicatorGroupBlock' } ) | ( { title?: string | null, body?: string | null, id?: string | null, blockType: string, field: string, blocks: Array<( @@ -10185,7 +10225,7 @@ export type GetPlanPageGeneralQuery = ( ) | null } & { __typename?: 'Image' } ) | null, children: Array<( - { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, level?: ( + { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, iconSvgUrl?: string | null, level?: ( { name: string, namePlural?: string | null } & { __typename?: 'CategoryLevel' } ) | null, image?: ( @@ -10206,6 +10246,12 @@ export type GetPlanPageGeneralQuery = ( & { __typename?: 'ImageRendition' } ) | null } & { __typename?: 'Image' } + ) | null, iconImage?: ( + { rendition?: ( + { src: string } + & { __typename?: 'ImageRendition' } + ) | null } + & { __typename?: 'Image' } ) | null, categoryPage?: ( { title: string, urlPath: string, live: boolean } & { __typename?: 'CategoryPage' } @@ -10537,7 +10583,7 @@ export type GetPlanPageGeneralQuery = ( ) | ( { style?: string | null, heading?: string | null, lead?: string | null, id?: string | null, blockType: string, field: string, categoryType?: ( { id: string, hideCategoryIdentifiers: boolean, categories: Array<( - { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, level?: ( + { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, iconSvgUrl?: string | null, level?: ( { name: string, namePlural?: string | null } & { __typename?: 'CategoryLevel' } ) | null, image?: ( @@ -10558,6 +10604,12 @@ export type GetPlanPageGeneralQuery = ( & { __typename?: 'ImageRendition' } ) | null } & { __typename?: 'Image' } + ) | null, iconImage?: ( + { rendition?: ( + { src: string } + & { __typename?: 'ImageRendition' } + ) | null } + & { __typename?: 'Image' } ) | null, categoryPage?: ( { title: string, urlPath: string, live: boolean } & { __typename?: 'CategoryPage' } @@ -10570,7 +10622,7 @@ export type GetPlanPageGeneralQuery = ( & { __typename?: 'CategoryType' } ) | null, category?: ( { id: string, children: Array<( - { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, level?: ( + { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, iconSvgUrl?: string | null, level?: ( { name: string, namePlural?: string | null } & { __typename?: 'CategoryLevel' } ) | null, image?: ( @@ -10591,6 +10643,12 @@ export type GetPlanPageGeneralQuery = ( & { __typename?: 'ImageRendition' } ) | null } & { __typename?: 'Image' } + ) | null, iconImage?: ( + { rendition?: ( + { src: string } + & { __typename?: 'ImageRendition' } + ) | null } + & { __typename?: 'Image' } ) | null, categoryPage?: ( { title: string, urlPath: string, live: boolean } & { __typename?: 'CategoryPage' } @@ -10652,23 +10710,8 @@ export type GetPlanPageGeneralQuery = ( ) | null } & { __typename?: 'IndicatorBlock' } ) | ( - { id?: string | null, blockType: string, field: string, items: Array<( - { id?: string | null } - & { __typename?: 'AccessibilityStatementComplianceStatusBlock' | 'AccessibilityStatementContactFormBlock' | 'AccessibilityStatementContactInformationBlock' | 'AccessibilityStatementPreparationInformationBlock' | 'ActionAttributeTypeFilterBlock' | 'ActionAttributeTypeReportFieldBlock' | 'ActionCategoryFilterCardBlock' | 'ActionCategoryFilterCardsBlock' | 'ActionCategoryReportFieldBlock' | 'ActionContactFormBlock' | 'ActionContactPersonsBlock' | 'ActionContentAttributeTypeBlock' | 'ActionContentCategoryTypeBlock' | 'ActionContentSectionBlock' | 'ActionDescriptionBlock' | 'ActionHighlightsBlock' | 'ActionImplementationPhaseFilterBlock' | 'ActionImplementationPhaseReportFieldBlock' | 'ActionLeadParagraphBlock' | 'ActionLinksBlock' } - ) | ( - { id?: string | null } - & { __typename?: 'ActionListBlock' | 'ActionMergedActionsBlock' | 'ActionOfficialNameBlock' | 'ActionRelatedActionsBlock' | 'ActionRelatedIndicatorsBlock' | 'ActionResponsiblePartiesBlock' | 'ActionResponsiblePartyReportFieldBlock' | 'ActionScheduleBlock' | 'ActionScheduleFilterBlock' | 'ActionStatusFilterBlock' | 'ActionStatusGraphsBlock' | 'ActionStatusReportFieldBlock' | 'ActionTasksBlock' | 'AdaptiveEmbedBlock' | 'BlockQuoteBlock' | 'BooleanBlock' | 'CardBlock' | 'CardListBlock' | 'CartographyVisualisationBlock' | 'CategoryListBlock' } - ) | ( - { id?: string | null } - & { __typename?: 'CategoryPageAttributeTypeBlock' | 'CategoryPageBodyBlock' | 'CategoryPageCategoryListBlock' | 'CategoryPageContactFormBlock' | 'CategoryPageProgressBlock' | 'CategoryTreeMapBlock' | 'CategoryTypeFilterBlock' | 'CharBlock' | 'ChoiceBlock' | 'DateBlock' | 'DateTimeBlock' | 'DecimalBlock' | 'DocumentChooserBlock' | 'EmailBlock' | 'EmbedBlock' | 'FloatBlock' | 'FrontPageHeroBlock' | 'IdentifierColumnBlock' | 'ImageChooserBlock' | 'ImpactColumnBlock' } - ) | ( - { id?: string | null } - & { __typename?: 'ImplementationPhaseColumnBlock' | 'IndicatorGroupBlock' | 'IndicatorHighlightsBlock' | 'IndicatorShowcaseBlock' | 'IndicatorsColumnBlock' | 'IntegerBlock' | 'LargeImageBlock' | 'NameColumnBlock' | 'OrganizationColumnBlock' | 'PageChooserBlock' | 'PageLinkBlock' | 'PlanFilterBlock' | 'PrimaryOrganizationFilterBlock' | 'QuestionAnswerBlock' | 'QuestionBlock' | 'RawHTMLBlock' | 'RegexBlock' | 'RelatedIndicatorsBlock' | 'RelatedPlanListBlock' | 'ReportComparisonBlock' } - ) | ( - { id?: string | null } - & { __typename?: 'ReportTypeFieldChooserBlock' | 'ResponsiblePartiesColumnBlock' | 'ResponsiblePartyFilterBlock' | 'RichTextBlock' | 'StaticBlock' | 'StatusColumnBlock' | 'StreamBlock' | 'StreamFieldBlock' | 'StructBlock' | 'TasksColumnBlock' | 'TextBlock' | 'TimeBlock' | 'URLBlock' | 'UpdatedAtColumnBlock' } - ) | ( - { style?: string | null, id?: string | null, indicator?: ( + { title?: string | null, id?: string | null, blockType: string, field: string, indicators?: Array<{ __typename?: 'AccessibilityStatementComplianceStatusBlock' | 'AccessibilityStatementContactFormBlock' | 'AccessibilityStatementContactInformationBlock' | 'AccessibilityStatementPreparationInformationBlock' | 'ActionAttributeTypeFilterBlock' | 'ActionAttributeTypeReportFieldBlock' | 'ActionCategoryFilterCardBlock' | 'ActionCategoryFilterCardsBlock' | 'ActionCategoryReportFieldBlock' | 'ActionContactFormBlock' | 'ActionContactPersonsBlock' | 'ActionContentAttributeTypeBlock' | 'ActionContentCategoryTypeBlock' | 'ActionContentSectionBlock' | 'ActionDescriptionBlock' | 'ActionHighlightsBlock' | 'ActionImplementationPhaseFilterBlock' | 'ActionImplementationPhaseReportFieldBlock' | 'ActionLeadParagraphBlock' | 'ActionLinksBlock' } | { __typename?: 'ActionListBlock' | 'ActionMergedActionsBlock' | 'ActionOfficialNameBlock' | 'ActionRelatedActionsBlock' | 'ActionRelatedIndicatorsBlock' | 'ActionResponsiblePartiesBlock' | 'ActionResponsiblePartyReportFieldBlock' | 'ActionScheduleBlock' | 'ActionScheduleFilterBlock' | 'ActionStatusFilterBlock' | 'ActionStatusGraphsBlock' | 'ActionStatusReportFieldBlock' | 'ActionTasksBlock' | 'AdaptiveEmbedBlock' | 'BlockQuoteBlock' | 'BooleanBlock' | 'CardBlock' | 'CardListBlock' | 'CartographyVisualisationBlock' | 'CategoryListBlock' } | { __typename?: 'CategoryPageAttributeTypeBlock' | 'CategoryPageBodyBlock' | 'CategoryPageCategoryListBlock' | 'CategoryPageContactFormBlock' | 'CategoryPageProgressBlock' | 'CategoryTreeMapBlock' | 'CategoryTypeFilterBlock' | 'CharBlock' | 'ChoiceBlock' | 'DateBlock' | 'DateTimeBlock' | 'DecimalBlock' | 'DocumentChooserBlock' | 'EmailBlock' | 'EmbedBlock' | 'FloatBlock' | 'FrontPageHeroBlock' | 'IdentifierColumnBlock' | 'ImageChooserBlock' | 'ImpactColumnBlock' } | { __typename?: 'ImplementationPhaseColumnBlock' | 'IndicatorGroupBlock' | 'IndicatorHighlightsBlock' | 'IndicatorShowcaseBlock' | 'IndicatorsColumnBlock' | 'IntegerBlock' | 'LargeImageBlock' | 'NameColumnBlock' | 'OrganizationColumnBlock' | 'PageChooserBlock' | 'PageLinkBlock' | 'PlanFilterBlock' | 'PrimaryOrganizationFilterBlock' | 'QuestionAnswerBlock' | 'QuestionBlock' | 'RawHTMLBlock' | 'RegexBlock' | 'RelatedIndicatorsBlock' | 'RelatedPlanListBlock' | 'ReportComparisonBlock' } | { __typename?: 'ReportTypeFieldChooserBlock' | 'ResponsiblePartiesColumnBlock' | 'ResponsiblePartyFilterBlock' | 'RichTextBlock' | 'StaticBlock' | 'StatusColumnBlock' | 'StreamBlock' | 'StreamFieldBlock' | 'StructBlock' | 'TasksColumnBlock' | 'TextBlock' | 'TimeBlock' | 'URLBlock' | 'UpdatedAtColumnBlock' } | ( + { style?: string | null, indicator?: ( { id: string, identifier?: string | null, name: string, description?: string | null, timeResolution: IndicatorTimeResolution, level?: string | null, unit: ( { id: string, name: string } & { __typename?: 'Unit' } @@ -10682,7 +10725,7 @@ export type GetPlanPageGeneralQuery = ( & { __typename?: 'Indicator' } ) | null } & { __typename?: 'IndicatorBlock' } - )> } + ) | null> | null } & { __typename?: 'IndicatorGroupBlock' } ) | ( { title?: string | null, body?: string | null, id?: string | null, blockType: string, field: string, blocks: Array<( @@ -10918,7 +10961,7 @@ export type GetPlanPageGeneralQuery = ( ) | ( { style?: string | null, heading?: string | null, lead?: string | null, id?: string | null, blockType: string, field: string, categoryType?: ( { id: string, hideCategoryIdentifiers: boolean, categories: Array<( - { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, level?: ( + { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, iconSvgUrl?: string | null, level?: ( { name: string, namePlural?: string | null } & { __typename?: 'CategoryLevel' } ) | null, image?: ( @@ -10939,6 +10982,12 @@ export type GetPlanPageGeneralQuery = ( & { __typename?: 'ImageRendition' } ) | null } & { __typename?: 'Image' } + ) | null, iconImage?: ( + { rendition?: ( + { src: string } + & { __typename?: 'ImageRendition' } + ) | null } + & { __typename?: 'Image' } ) | null, categoryPage?: ( { title: string, urlPath: string, live: boolean } & { __typename?: 'CategoryPage' } @@ -10951,7 +11000,7 @@ export type GetPlanPageGeneralQuery = ( & { __typename?: 'CategoryType' } ) | null, category?: ( { id: string, children: Array<( - { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, level?: ( + { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, iconSvgUrl?: string | null, level?: ( { name: string, namePlural?: string | null } & { __typename?: 'CategoryLevel' } ) | null, image?: ( @@ -10972,6 +11021,12 @@ export type GetPlanPageGeneralQuery = ( & { __typename?: 'ImageRendition' } ) | null } & { __typename?: 'Image' } + ) | null, iconImage?: ( + { rendition?: ( + { src: string } + & { __typename?: 'ImageRendition' } + ) | null } + & { __typename?: 'Image' } ) | null, categoryPage?: ( { title: string, urlPath: string, live: boolean } & { __typename?: 'CategoryPage' } @@ -11033,23 +11088,8 @@ export type GetPlanPageGeneralQuery = ( ) | null } & { __typename?: 'IndicatorBlock' } ) | ( - { id?: string | null, blockType: string, field: string, items: Array<( - { id?: string | null } - & { __typename?: 'AccessibilityStatementComplianceStatusBlock' | 'AccessibilityStatementContactFormBlock' | 'AccessibilityStatementContactInformationBlock' | 'AccessibilityStatementPreparationInformationBlock' | 'ActionAttributeTypeFilterBlock' | 'ActionAttributeTypeReportFieldBlock' | 'ActionCategoryFilterCardBlock' | 'ActionCategoryFilterCardsBlock' | 'ActionCategoryReportFieldBlock' | 'ActionContactFormBlock' | 'ActionContactPersonsBlock' | 'ActionContentAttributeTypeBlock' | 'ActionContentCategoryTypeBlock' | 'ActionContentSectionBlock' | 'ActionDescriptionBlock' | 'ActionHighlightsBlock' | 'ActionImplementationPhaseFilterBlock' | 'ActionImplementationPhaseReportFieldBlock' | 'ActionLeadParagraphBlock' | 'ActionLinksBlock' } - ) | ( - { id?: string | null } - & { __typename?: 'ActionListBlock' | 'ActionMergedActionsBlock' | 'ActionOfficialNameBlock' | 'ActionRelatedActionsBlock' | 'ActionRelatedIndicatorsBlock' | 'ActionResponsiblePartiesBlock' | 'ActionResponsiblePartyReportFieldBlock' | 'ActionScheduleBlock' | 'ActionScheduleFilterBlock' | 'ActionStatusFilterBlock' | 'ActionStatusGraphsBlock' | 'ActionStatusReportFieldBlock' | 'ActionTasksBlock' | 'AdaptiveEmbedBlock' | 'BlockQuoteBlock' | 'BooleanBlock' | 'CardBlock' | 'CardListBlock' | 'CartographyVisualisationBlock' | 'CategoryListBlock' } - ) | ( - { id?: string | null } - & { __typename?: 'CategoryPageAttributeTypeBlock' | 'CategoryPageBodyBlock' | 'CategoryPageCategoryListBlock' | 'CategoryPageContactFormBlock' | 'CategoryPageProgressBlock' | 'CategoryTreeMapBlock' | 'CategoryTypeFilterBlock' | 'CharBlock' | 'ChoiceBlock' | 'DateBlock' | 'DateTimeBlock' | 'DecimalBlock' | 'DocumentChooserBlock' | 'EmailBlock' | 'EmbedBlock' | 'FloatBlock' | 'FrontPageHeroBlock' | 'IdentifierColumnBlock' | 'ImageChooserBlock' | 'ImpactColumnBlock' } - ) | ( - { id?: string | null } - & { __typename?: 'ImplementationPhaseColumnBlock' | 'IndicatorGroupBlock' | 'IndicatorHighlightsBlock' | 'IndicatorShowcaseBlock' | 'IndicatorsColumnBlock' | 'IntegerBlock' | 'LargeImageBlock' | 'NameColumnBlock' | 'OrganizationColumnBlock' | 'PageChooserBlock' | 'PageLinkBlock' | 'PlanFilterBlock' | 'PrimaryOrganizationFilterBlock' | 'QuestionAnswerBlock' | 'QuestionBlock' | 'RawHTMLBlock' | 'RegexBlock' | 'RelatedIndicatorsBlock' | 'RelatedPlanListBlock' | 'ReportComparisonBlock' } - ) | ( - { id?: string | null } - & { __typename?: 'ReportTypeFieldChooserBlock' | 'ResponsiblePartiesColumnBlock' | 'ResponsiblePartyFilterBlock' | 'RichTextBlock' | 'StaticBlock' | 'StatusColumnBlock' | 'StreamBlock' | 'StreamFieldBlock' | 'StructBlock' | 'TasksColumnBlock' | 'TextBlock' | 'TimeBlock' | 'URLBlock' | 'UpdatedAtColumnBlock' } - ) | ( - { style?: string | null, id?: string | null, indicator?: ( + { title?: string | null, id?: string | null, blockType: string, field: string, indicators?: Array<{ __typename?: 'AccessibilityStatementComplianceStatusBlock' | 'AccessibilityStatementContactFormBlock' | 'AccessibilityStatementContactInformationBlock' | 'AccessibilityStatementPreparationInformationBlock' | 'ActionAttributeTypeFilterBlock' | 'ActionAttributeTypeReportFieldBlock' | 'ActionCategoryFilterCardBlock' | 'ActionCategoryFilterCardsBlock' | 'ActionCategoryReportFieldBlock' | 'ActionContactFormBlock' | 'ActionContactPersonsBlock' | 'ActionContentAttributeTypeBlock' | 'ActionContentCategoryTypeBlock' | 'ActionContentSectionBlock' | 'ActionDescriptionBlock' | 'ActionHighlightsBlock' | 'ActionImplementationPhaseFilterBlock' | 'ActionImplementationPhaseReportFieldBlock' | 'ActionLeadParagraphBlock' | 'ActionLinksBlock' } | { __typename?: 'ActionListBlock' | 'ActionMergedActionsBlock' | 'ActionOfficialNameBlock' | 'ActionRelatedActionsBlock' | 'ActionRelatedIndicatorsBlock' | 'ActionResponsiblePartiesBlock' | 'ActionResponsiblePartyReportFieldBlock' | 'ActionScheduleBlock' | 'ActionScheduleFilterBlock' | 'ActionStatusFilterBlock' | 'ActionStatusGraphsBlock' | 'ActionStatusReportFieldBlock' | 'ActionTasksBlock' | 'AdaptiveEmbedBlock' | 'BlockQuoteBlock' | 'BooleanBlock' | 'CardBlock' | 'CardListBlock' | 'CartographyVisualisationBlock' | 'CategoryListBlock' } | { __typename?: 'CategoryPageAttributeTypeBlock' | 'CategoryPageBodyBlock' | 'CategoryPageCategoryListBlock' | 'CategoryPageContactFormBlock' | 'CategoryPageProgressBlock' | 'CategoryTreeMapBlock' | 'CategoryTypeFilterBlock' | 'CharBlock' | 'ChoiceBlock' | 'DateBlock' | 'DateTimeBlock' | 'DecimalBlock' | 'DocumentChooserBlock' | 'EmailBlock' | 'EmbedBlock' | 'FloatBlock' | 'FrontPageHeroBlock' | 'IdentifierColumnBlock' | 'ImageChooserBlock' | 'ImpactColumnBlock' } | { __typename?: 'ImplementationPhaseColumnBlock' | 'IndicatorGroupBlock' | 'IndicatorHighlightsBlock' | 'IndicatorShowcaseBlock' | 'IndicatorsColumnBlock' | 'IntegerBlock' | 'LargeImageBlock' | 'NameColumnBlock' | 'OrganizationColumnBlock' | 'PageChooserBlock' | 'PageLinkBlock' | 'PlanFilterBlock' | 'PrimaryOrganizationFilterBlock' | 'QuestionAnswerBlock' | 'QuestionBlock' | 'RawHTMLBlock' | 'RegexBlock' | 'RelatedIndicatorsBlock' | 'RelatedPlanListBlock' | 'ReportComparisonBlock' } | { __typename?: 'ReportTypeFieldChooserBlock' | 'ResponsiblePartiesColumnBlock' | 'ResponsiblePartyFilterBlock' | 'RichTextBlock' | 'StaticBlock' | 'StatusColumnBlock' | 'StreamBlock' | 'StreamFieldBlock' | 'StructBlock' | 'TasksColumnBlock' | 'TextBlock' | 'TimeBlock' | 'URLBlock' | 'UpdatedAtColumnBlock' } | ( + { style?: string | null, indicator?: ( { id: string, identifier?: string | null, name: string, description?: string | null, timeResolution: IndicatorTimeResolution, level?: string | null, unit: ( { id: string, name: string } & { __typename?: 'Unit' } @@ -11063,7 +11103,7 @@ export type GetPlanPageGeneralQuery = ( & { __typename?: 'Indicator' } ) | null } & { __typename?: 'IndicatorBlock' } - )> } + ) | null> | null } & { __typename?: 'IndicatorGroupBlock' } ) | ( { title?: string | null, body?: string | null, id?: string | null, blockType: string, field: string, blocks: Array<( @@ -11376,7 +11416,7 @@ export type GetHomePageQuery = ( ) | ( { style?: string | null, heading?: string | null, lead?: string | null, id?: string | null, blockType: string, field: string, categoryType?: ( { id: string, hideCategoryIdentifiers: boolean, categories: Array<( - { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, level?: ( + { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, iconSvgUrl?: string | null, level?: ( { name: string, namePlural?: string | null } & { __typename?: 'CategoryLevel' } ) | null, image?: ( @@ -11397,6 +11437,12 @@ export type GetHomePageQuery = ( & { __typename?: 'ImageRendition' } ) | null } & { __typename?: 'Image' } + ) | null, iconImage?: ( + { rendition?: ( + { src: string } + & { __typename?: 'ImageRendition' } + ) | null } + & { __typename?: 'Image' } ) | null, categoryPage?: ( { title: string, urlPath: string, live: boolean } & { __typename?: 'CategoryPage' } @@ -11409,7 +11455,7 @@ export type GetHomePageQuery = ( & { __typename?: 'CategoryType' } ) | null, category?: ( { id: string, children: Array<( - { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, level?: ( + { id: string, identifier: string, name: string, leadParagraph: string, order: number, color?: string | null, iconSvgUrl?: string | null, level?: ( { name: string, namePlural?: string | null } & { __typename?: 'CategoryLevel' } ) | null, image?: ( @@ -11430,6 +11476,12 @@ export type GetHomePageQuery = ( & { __typename?: 'ImageRendition' } ) | null } & { __typename?: 'Image' } + ) | null, iconImage?: ( + { rendition?: ( + { src: string } + & { __typename?: 'ImageRendition' } + ) | null } + & { __typename?: 'Image' } ) | null, categoryPage?: ( { title: string, urlPath: string, live: boolean } & { __typename?: 'CategoryPage' } @@ -11491,23 +11543,8 @@ export type GetHomePageQuery = ( ) | null } & { __typename?: 'IndicatorBlock' } ) | ( - { id?: string | null, blockType: string, field: string, items: Array<( - { id?: string | null } - & { __typename?: 'AccessibilityStatementComplianceStatusBlock' | 'AccessibilityStatementContactFormBlock' | 'AccessibilityStatementContactInformationBlock' | 'AccessibilityStatementPreparationInformationBlock' | 'ActionAttributeTypeFilterBlock' | 'ActionAttributeTypeReportFieldBlock' | 'ActionCategoryFilterCardBlock' | 'ActionCategoryFilterCardsBlock' | 'ActionCategoryReportFieldBlock' | 'ActionContactFormBlock' | 'ActionContactPersonsBlock' | 'ActionContentAttributeTypeBlock' | 'ActionContentCategoryTypeBlock' | 'ActionContentSectionBlock' | 'ActionDescriptionBlock' | 'ActionHighlightsBlock' | 'ActionImplementationPhaseFilterBlock' | 'ActionImplementationPhaseReportFieldBlock' | 'ActionLeadParagraphBlock' | 'ActionLinksBlock' } - ) | ( - { id?: string | null } - & { __typename?: 'ActionListBlock' | 'ActionMergedActionsBlock' | 'ActionOfficialNameBlock' | 'ActionRelatedActionsBlock' | 'ActionRelatedIndicatorsBlock' | 'ActionResponsiblePartiesBlock' | 'ActionResponsiblePartyReportFieldBlock' | 'ActionScheduleBlock' | 'ActionScheduleFilterBlock' | 'ActionStatusFilterBlock' | 'ActionStatusGraphsBlock' | 'ActionStatusReportFieldBlock' | 'ActionTasksBlock' | 'AdaptiveEmbedBlock' | 'BlockQuoteBlock' | 'BooleanBlock' | 'CardBlock' | 'CardListBlock' | 'CartographyVisualisationBlock' | 'CategoryListBlock' } - ) | ( - { id?: string | null } - & { __typename?: 'CategoryPageAttributeTypeBlock' | 'CategoryPageBodyBlock' | 'CategoryPageCategoryListBlock' | 'CategoryPageContactFormBlock' | 'CategoryPageProgressBlock' | 'CategoryTreeMapBlock' | 'CategoryTypeFilterBlock' | 'CharBlock' | 'ChoiceBlock' | 'DateBlock' | 'DateTimeBlock' | 'DecimalBlock' | 'DocumentChooserBlock' | 'EmailBlock' | 'EmbedBlock' | 'FloatBlock' | 'FrontPageHeroBlock' | 'IdentifierColumnBlock' | 'ImageChooserBlock' | 'ImpactColumnBlock' } - ) | ( - { id?: string | null } - & { __typename?: 'ImplementationPhaseColumnBlock' | 'IndicatorGroupBlock' | 'IndicatorHighlightsBlock' | 'IndicatorShowcaseBlock' | 'IndicatorsColumnBlock' | 'IntegerBlock' | 'LargeImageBlock' | 'NameColumnBlock' | 'OrganizationColumnBlock' | 'PageChooserBlock' | 'PageLinkBlock' | 'PlanFilterBlock' | 'PrimaryOrganizationFilterBlock' | 'QuestionAnswerBlock' | 'QuestionBlock' | 'RawHTMLBlock' | 'RegexBlock' | 'RelatedIndicatorsBlock' | 'RelatedPlanListBlock' | 'ReportComparisonBlock' } - ) | ( - { id?: string | null } - & { __typename?: 'ReportTypeFieldChooserBlock' | 'ResponsiblePartiesColumnBlock' | 'ResponsiblePartyFilterBlock' | 'RichTextBlock' | 'StaticBlock' | 'StatusColumnBlock' | 'StreamBlock' | 'StreamFieldBlock' | 'StructBlock' | 'TasksColumnBlock' | 'TextBlock' | 'TimeBlock' | 'URLBlock' | 'UpdatedAtColumnBlock' } - ) | ( - { style?: string | null, id?: string | null, indicator?: ( + { title?: string | null, id?: string | null, blockType: string, field: string, indicators?: Array<{ __typename?: 'AccessibilityStatementComplianceStatusBlock' | 'AccessibilityStatementContactFormBlock' | 'AccessibilityStatementContactInformationBlock' | 'AccessibilityStatementPreparationInformationBlock' | 'ActionAttributeTypeFilterBlock' | 'ActionAttributeTypeReportFieldBlock' | 'ActionCategoryFilterCardBlock' | 'ActionCategoryFilterCardsBlock' | 'ActionCategoryReportFieldBlock' | 'ActionContactFormBlock' | 'ActionContactPersonsBlock' | 'ActionContentAttributeTypeBlock' | 'ActionContentCategoryTypeBlock' | 'ActionContentSectionBlock' | 'ActionDescriptionBlock' | 'ActionHighlightsBlock' | 'ActionImplementationPhaseFilterBlock' | 'ActionImplementationPhaseReportFieldBlock' | 'ActionLeadParagraphBlock' | 'ActionLinksBlock' } | { __typename?: 'ActionListBlock' | 'ActionMergedActionsBlock' | 'ActionOfficialNameBlock' | 'ActionRelatedActionsBlock' | 'ActionRelatedIndicatorsBlock' | 'ActionResponsiblePartiesBlock' | 'ActionResponsiblePartyReportFieldBlock' | 'ActionScheduleBlock' | 'ActionScheduleFilterBlock' | 'ActionStatusFilterBlock' | 'ActionStatusGraphsBlock' | 'ActionStatusReportFieldBlock' | 'ActionTasksBlock' | 'AdaptiveEmbedBlock' | 'BlockQuoteBlock' | 'BooleanBlock' | 'CardBlock' | 'CardListBlock' | 'CartographyVisualisationBlock' | 'CategoryListBlock' } | { __typename?: 'CategoryPageAttributeTypeBlock' | 'CategoryPageBodyBlock' | 'CategoryPageCategoryListBlock' | 'CategoryPageContactFormBlock' | 'CategoryPageProgressBlock' | 'CategoryTreeMapBlock' | 'CategoryTypeFilterBlock' | 'CharBlock' | 'ChoiceBlock' | 'DateBlock' | 'DateTimeBlock' | 'DecimalBlock' | 'DocumentChooserBlock' | 'EmailBlock' | 'EmbedBlock' | 'FloatBlock' | 'FrontPageHeroBlock' | 'IdentifierColumnBlock' | 'ImageChooserBlock' | 'ImpactColumnBlock' } | { __typename?: 'ImplementationPhaseColumnBlock' | 'IndicatorGroupBlock' | 'IndicatorHighlightsBlock' | 'IndicatorShowcaseBlock' | 'IndicatorsColumnBlock' | 'IntegerBlock' | 'LargeImageBlock' | 'NameColumnBlock' | 'OrganizationColumnBlock' | 'PageChooserBlock' | 'PageLinkBlock' | 'PlanFilterBlock' | 'PrimaryOrganizationFilterBlock' | 'QuestionAnswerBlock' | 'QuestionBlock' | 'RawHTMLBlock' | 'RegexBlock' | 'RelatedIndicatorsBlock' | 'RelatedPlanListBlock' | 'ReportComparisonBlock' } | { __typename?: 'ReportTypeFieldChooserBlock' | 'ResponsiblePartiesColumnBlock' | 'ResponsiblePartyFilterBlock' | 'RichTextBlock' | 'StaticBlock' | 'StatusColumnBlock' | 'StreamBlock' | 'StreamFieldBlock' | 'StructBlock' | 'TasksColumnBlock' | 'TextBlock' | 'TimeBlock' | 'URLBlock' | 'UpdatedAtColumnBlock' } | ( + { style?: string | null, indicator?: ( { id: string, identifier?: string | null, name: string, description?: string | null, timeResolution: IndicatorTimeResolution, level?: string | null, unit: ( { id: string, name: string } & { __typename?: 'Unit' } @@ -11521,7 +11558,7 @@ export type GetHomePageQuery = ( & { __typename?: 'Indicator' } ) | null } & { __typename?: 'IndicatorBlock' } - )> } + ) | null> | null } & { __typename?: 'IndicatorGroupBlock' } ) | ( { title?: string | null, body?: string | null, id?: string | null, blockType: string, field: string, blocks: Array<( diff --git a/components/common/StreamField.tsx b/components/common/StreamField.tsx index 5b7ff23a..b830c04e 100644 --- a/components/common/StreamField.tsx +++ b/components/common/StreamField.tsx @@ -65,8 +65,8 @@ const STREAM_FIELD_FRAGMENT = gql` } } ... on IndicatorGroupBlock { - items { - id + title + indicators { ... on IndicatorBlock { style indicator { @@ -414,8 +414,18 @@ function StreamFieldBlock(props: StreamFieldBlockProps) { ); } case 'IndicatorGroupBlock': { - const { items } = block; - return ; + const { indicators, title } = block; + + if (!indicators?.length) { + return null; + } + + return ( + + ); } case 'ActionListBlock': { const { categoryFilter } = block; diff --git a/components/contentblocks/IndicatorGroupBlock.js b/components/contentblocks/IndicatorGroupBlock.tsx similarity index 74% rename from components/contentblocks/IndicatorGroupBlock.js rename to components/contentblocks/IndicatorGroupBlock.tsx index 352dc71f..eaf8fc60 100644 --- a/components/contentblocks/IndicatorGroupBlock.js +++ b/components/contentblocks/IndicatorGroupBlock.tsx @@ -1,13 +1,14 @@ import React from 'react'; -import PropTypes from 'prop-types'; import { Container, Row, Col } from 'reactstrap'; import styled from 'styled-components'; import { readableColor } from 'polished'; +import { IndicatorGroupBlock as TIndicatorGroupBlock } from 'common/__generated__/graphql'; import Icon from 'components/common/Icon'; import { useTranslation } from 'common/i18n'; -import { IndicatorLink } from 'common/links'; +import { IndicatorLink, IndicatorListLink } from 'common/links'; import IndicatorHighlightCard from 'components/indicators/IndicatorHighlightCard'; import IndicatorVisualisation from 'components/indicators/IndicatorVisualisation'; +import Button from 'components/common/Button'; const IndicatorGraphSection = styled.div` background-color: ${(props) => props.theme.neutralLight}; @@ -61,27 +62,39 @@ const IndicatorItem = (props) => { ); + return ( ); }; +const StyledColCentered = styled(Col)` + display: flex; + justify-content: center; +`; + +type Props = { + id?: string; + title?: string; + indicators: NonNullable; +}; + // TODO: Format as list for a11y -const IndicatorGroupBlock = (props) => { - const { id = '', indicators } = props; +const IndicatorGroupBlock = ({ id = '', title, indicators }: Props) => { const { t } = useTranslation(); + return ( -

{t('indicators')}

+

{title ?? t('indicators')}

{indicators.map((item) => ( { /> ))} + + + + + + +
); }; -IndicatorGroupBlock.propTypes = { - id: PropTypes.string, - indicators: PropTypes.arrayOf(PropTypes.shape()).isRequired, -}; - export default IndicatorGroupBlock; diff --git a/components/indicators/IndicatorHighlightCard.tsx b/components/indicators/IndicatorHighlightCard.tsx index 1cf55a0c..ec12611e 100644 --- a/components/indicators/IndicatorHighlightCard.tsx +++ b/components/indicators/IndicatorHighlightCard.tsx @@ -1,11 +1,7 @@ import React from 'react'; import { Card, CardImgOverlay, CardBody, CardTitle } from 'reactstrap'; import styled from 'styled-components'; -import { - getActionTermContext, - useTranslation, - withTranslation, -} from 'common/i18n'; +import { getActionTermContext, useTranslation } from 'common/i18n'; import { IndicatorLink } from 'common/links'; import { usePlan } from 'context/plan'; import { readableColor } from 'polished'; @@ -95,8 +91,13 @@ type IndicatorHighlightCardProps = { unit?: string; }; -function IndicatorHighlightCard(props: IndicatorHighlightCardProps) { - const { level, objectid, name, value = null, unit = '' } = props; +function IndicatorHighlightCard({ + level, + objectid, + name, + value, + unit = '', +}: IndicatorHighlightCardProps) { const { t, i18n } = useTranslation(); const plan = usePlan(); @@ -113,7 +114,7 @@ function IndicatorHighlightCard(props: IndicatorHighlightCardProps) { - {beautifyValue(value, i18n.language)} + {typeof value === 'number' ? beautifyValue(value) : '-'} {unit} @@ -131,4 +132,4 @@ function IndicatorHighlightCard(props: IndicatorHighlightCardProps) { ); } -export default withTranslation('common')(IndicatorHighlightCard); +export default IndicatorHighlightCard;