diff --git a/README.md b/README.md index 3a85720512..067e930ef5 100644 --- a/README.md +++ b/README.md @@ -167,3 +167,4 @@ lando drush cr ``` _* I'm not 100% sure, but I don't think global composer is necessary. One can use `lando composer install` instead. -ZK_ + diff --git a/config/block.block.sfgovpl_page_title.yml b/config/block.block.sfgovpl_page_title.yml index dd1e9a32ea..3db2d8a197 100644 --- a/config/block.block.sfgovpl_page_title.yml +++ b/config/block.block.sfgovpl_page_title.yml @@ -32,6 +32,7 @@ visibility: about: about article: article campaign: campaign + data_story: data_story department: department department_table: department_table event: event diff --git a/config/core.base_field_override.node.data_story.promote.yml b/config/core.base_field_override.node.data_story.promote.yml new file mode 100644 index 0000000000..edcf0edac4 --- /dev/null +++ b/config/core.base_field_override.node.data_story.promote.yml @@ -0,0 +1,22 @@ +uuid: 73e4e29d-7f95-4526-9bda-e624fdae9697 +langcode: en +status: true +dependencies: + config: + - node.type.data_story +id: node.data_story.promote +field_name: promote +entity_type: node +bundle: data_story +label: 'Promoted to front page' +description: '' +required: false +translatable: true +default_value: + - + value: 0 +default_value_callback: '' +settings: + on_label: 'On' + off_label: 'Off' +field_type: boolean diff --git a/config/core.entity_form_display.node.campaign.default.yml b/config/core.entity_form_display.node.campaign.default.yml index cd062c7695..6578a0b38b 100644 --- a/config/core.entity_form_display.node.campaign.default.yml +++ b/config/core.entity_form_display.node.campaign.default.yml @@ -150,23 +150,22 @@ content: region: content field_social_media_embed: type: paragraphs - weight: 8 + weight: 9 + region: content settings: title: Paragraph title_plural: Paragraphs - edit_mode: closed + edit_mode: open closed_mode: summary autocollapse: none closed_mode_threshold: 0 add_mode: dropdown form_display_mode: default - default_paragraph_type: _none + default_paragraph_type: '' features: - add_above: '0' collapse_edit_all: collapse_edit_all duplicate: duplicate third_party_settings: { } - region: content field_spotlight: weight: 7 settings: @@ -260,7 +259,7 @@ content: maxlength_js: 65 maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' translation: - weight: 9 + weight: 8 region: content settings: { } third_party_settings: { } diff --git a/config/core.entity_form_display.node.data_story.default.yml b/config/core.entity_form_display.node.data_story.default.yml new file mode 100644 index 0000000000..96c6a3a7ee --- /dev/null +++ b/config/core.entity_form_display.node.data_story.default.yml @@ -0,0 +1,151 @@ +uuid: ac8b46da-635c-443f-8e1d-215cd0d90221 +langcode: en +status: true +dependencies: + config: + - field.field.node.data_story.field_content + - field.field.node.data_story.field_description + - node.type.data_story + module: + - allowed_formats + - content_moderation + - maxlength + - path + - scheduler + - scheduler_content_moderation_integration + - sfgov_admin + - text +id: node.data_story.default +targetEntityType: node +bundle: data_story +mode: default +content: + created: + type: datetime_timestamp + weight: 6 + region: content + settings: { } + third_party_settings: { } + field_content: + weight: 3 + settings: + title: Content + title_plural: Content + edit_mode: closed + closed_mode: summary + autocollapse: all + closed_mode_threshold: '0' + add_mode: dropdown + form_display_mode: default + default_paragraph_type: data_story_section + features: + duplicate: duplicate + collapse_edit_all: collapse_edit_all + add_above: 0 + third_party_settings: { } + type: sfgov_paragraphs + region: content + field_description: + weight: 1 + settings: + rows: 3 + placeholder: '' + third_party_settings: + allowed_formats: + hide_help: '1' + hide_guidelines: '1' + maxlength: + maxlength_js: 110 + maxlength_js_label: '@remaining/@limit' + maxlength_js_enforce: false + maxlength_js_truncate_html: false + type: text_textarea + region: content + langcode: + type: language_select + weight: 4 + region: content + settings: + include_locked: true + third_party_settings: { } + moderation_state: + type: moderation_state_default + weight: 13 + settings: { } + region: content + third_party_settings: { } + path: + type: path + weight: 7 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 15 + region: content + third_party_settings: { } + publish_on: + type: datetime_timestamp_no_default + weight: 8 + region: content + settings: { } + third_party_settings: { } + publish_state: + type: scheduler_moderation + weight: 10 + region: content + settings: { } + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 14 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 16 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 5 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + match_limit: 10 + region: content + third_party_settings: { } + unpublish_on: + type: datetime_timestamp_no_default + weight: 9 + region: content + settings: { } + third_party_settings: { } + unpublish_state: + type: scheduler_moderation + weight: 11 + region: content + settings: { } + third_party_settings: { } + url_redirects: + weight: 12 + region: content + settings: { } + third_party_settings: { } +hidden: { } diff --git a/config/core.entity_form_display.node.resource_collection.default.yml b/config/core.entity_form_display.node.resource_collection.default.yml index 6d01306918..ee41990f3b 100644 --- a/config/core.entity_form_display.node.resource_collection.default.yml +++ b/config/core.entity_form_display.node.resource_collection.default.yml @@ -28,12 +28,12 @@ mode: default content: created: type: datetime_timestamp - weight: 5 + weight: 4 region: content settings: { } third_party_settings: { } field_content: - weight: 11 + weight: 10 settings: title: Paragraph title_plural: Paragraphs @@ -73,7 +73,7 @@ content: type: sfgov_customizable_paragraphs region: content field_content_bottom: - weight: 12 + weight: 11 settings: title: Paragraph title_plural: Paragraphs @@ -118,20 +118,8 @@ content: duplicate: duplicate third_party_settings: { } region: content - field_sidebar: - weight: 13 - settings: - title: Paragraph - title_plural: Paragraphs - edit_mode: open - add_mode: dropdown - form_display_mode: default - default_paragraph_type: '' - third_party_settings: { } - type: entity_reference_paragraphs - region: content field_topics: - weight: 14 + weight: 12 settings: match_operator: CONTAINS size: 60 @@ -140,34 +128,27 @@ content: third_party_settings: { } type: entity_reference_autocomplete region: content - langcode: - type: language_select - weight: 3 - region: content - settings: - include_locked: true - third_party_settings: { } moderation_state: type: moderation_state_default - weight: 9 + weight: 8 settings: { } region: content third_party_settings: { } path: type: path - weight: 7 + weight: 6 region: content settings: { } third_party_settings: { } publish_on: type: datetime_timestamp_no_default - weight: 15 + weight: 13 region: content settings: { } third_party_settings: { } publish_state: type: scheduler_moderation - weight: 16 + weight: 14 region: content settings: { } third_party_settings: { } @@ -175,7 +156,7 @@ content: type: boolean_checkbox settings: display_label: true - weight: 10 + weight: 9 region: content third_party_settings: { } title: @@ -187,13 +168,13 @@ content: placeholder: '' third_party_settings: { } translation: - weight: 6 + weight: 5 region: content settings: { } third_party_settings: { } uid: type: entity_reference_autocomplete - weight: 4 + weight: 3 settings: match_operator: CONTAINS size: 60 @@ -203,21 +184,23 @@ content: third_party_settings: { } unpublish_on: type: datetime_timestamp_no_default - weight: 18 + weight: 16 region: content settings: { } third_party_settings: { } unpublish_state: type: scheduler_moderation - weight: 17 + weight: 15 region: content settings: { } third_party_settings: { } url_redirects: - weight: 8 + weight: 7 region: content settings: { } third_party_settings: { } hidden: + field_sidebar: true + langcode: true promote: true sticky: true diff --git a/config/core.entity_form_display.paragraph.data_story_section.default.yml b/config/core.entity_form_display.paragraph.data_story_section.default.yml new file mode 100644 index 0000000000..a0bbb9dd53 --- /dev/null +++ b/config/core.entity_form_display.paragraph.data_story_section.default.yml @@ -0,0 +1,45 @@ +uuid: 9426b43d-fbd0-4514-9ad1-86141914e9a5 +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.data_story_section.field_content + - field.field.paragraph.data_story_section.field_title + - paragraphs.paragraphs_type.data_story_section + module: + - sfgov_admin +id: paragraph.data_story_section.default +targetEntityType: paragraph +bundle: data_story_section +mode: default +content: + field_content: + weight: 1 + settings: + title: Paragraph + title_plural: Paragraphs + edit_mode: closed + closed_mode: summary + autocollapse: all + closed_mode_threshold: '0' + add_mode: dropdown_custom + form_display_mode: default + default_paragraph_type: _none + features: + duplicate: duplicate + collapse_edit_all: collapse_edit_all + add_above: 0 + third_party_settings: { } + type: sfgov_paragraphs + region: content + field_title: + weight: 0 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content +hidden: + created: true + status: true diff --git a/config/core.entity_form_display.paragraph.image.default.yml b/config/core.entity_form_display.paragraph.image.default.yml new file mode 100644 index 0000000000..c1537c7797 --- /dev/null +++ b/config/core.entity_form_display.paragraph.image.default.yml @@ -0,0 +1,33 @@ +uuid: 04ac0096-de2a-413c-bbbd-b44b0ea84cb1 +langcode: en +status: true +dependencies: + config: + - entity_browser.browser.image + - field.field.paragraph.image.field_image + - paragraphs.paragraphs_type.image + module: + - entity_browser +id: paragraph.image.default +targetEntityType: paragraph +bundle: image +mode: default +content: + field_image: + weight: 0 + settings: + entity_browser: image + field_widget_display: rendered_entity + field_widget_display_settings: + view_mode: preview + field_widget_edit: true + field_widget_remove: true + selection_mode: selection_append + field_widget_replace: false + open: false + third_party_settings: { } + type: entity_browser_entity_reference + region: content +hidden: + created: true + status: true diff --git a/config/core.entity_form_display.paragraph.powerbi_embed.default.yml b/config/core.entity_form_display.paragraph.powerbi_embed.default.yml new file mode 100644 index 0000000000..fc3dc571be --- /dev/null +++ b/config/core.entity_form_display.paragraph.powerbi_embed.default.yml @@ -0,0 +1,167 @@ +uuid: 4676ccb6-dd27-430c-ac57-6ca847b30049 +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.powerbi_embed.field_data_notes + - field.field.paragraph.powerbi_embed.field_desktop_embed_url + - field.field.paragraph.powerbi_embed.field_desktop_height + - field.field.paragraph.powerbi_embed.field_desktop_width + - field.field.paragraph.powerbi_embed.field_mobile_embed_url + - field.field.paragraph.powerbi_embed.field_mobile_height + - field.field.paragraph.powerbi_embed.field_mobile_width + - field.field.paragraph.powerbi_embed.field_source_data + - paragraphs.paragraphs_type.powerbi_embed + module: + - allowed_formats + - field_group + - maxlength + - text +third_party_settings: + field_group: + group_desktop_aspect_ratio: + children: + - field_desktop_width + - field_desktop_height + parent_name: group_aspect_ratios + weight: 3 + format_type: html_element + region: content + format_settings: + element: div + show_label: true + label_element: h5 + label_element_classes: '' + required_fields: true + attributes: '' + effect: none + speed: fast + id: '' + classes: container-inline + label: 'Desktop aspect ratio' + group_mobile_aspect_ratio: + children: + - field_mobile_width + - field_mobile_height + parent_name: group_aspect_ratios + weight: 4 + format_type: html_element + region: content + format_settings: + element: div + show_label: true + label_element: h5 + label_element_classes: '' + required_fields: true + attributes: '' + effect: none + speed: fast + id: '' + classes: container-inline + label: 'Mobile aspect ratio' + group_aspect_ratios: + children: + - group_desktop_aspect_ratio + - group_mobile_aspect_ratio + parent_name: '' + weight: 3 + format_type: details + region: content + format_settings: + description: '

In Power BI Desktop > Click outside dashboard > Paint Brush > Page Size.

' + open: true + required_fields: true + id: '' + classes: paragraph-type--powerbi-embed__aspect-ratios + label: 'Aspect Ratios' + group_details: + children: + - field_desktop_embed_url + - field_mobile_embed_url + parent_name: '' + weight: 0 + format_type: details + region: content + format_settings: + description: '' + open: true + id: '' + classes: paragraph-type--powerbi-embed__urls + required_fields: false + label: URLs +id: paragraph.powerbi_embed.default +targetEntityType: paragraph +bundle: powerbi_embed +mode: default +content: + field_data_notes: + weight: 5 + settings: + rows: 3 + placeholder: '' + third_party_settings: + allowed_formats: + hide_help: '1' + hide_guidelines: '1' + maxlength: + maxlength_js: null + maxlength_js_label: 'Content limited to @limit characters, remaining: @remaining' + maxlength_js_enforce: false + maxlength_js_truncate_html: false + type: text_textarea + region: content + field_desktop_embed_url: + weight: 1 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + field_desktop_height: + weight: 4 + settings: + placeholder: '' + third_party_settings: { } + type: number + region: content + field_desktop_width: + weight: 3 + settings: + placeholder: '' + third_party_settings: { } + type: number + region: content + field_mobile_embed_url: + weight: 2 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + field_mobile_height: + weight: 5 + settings: + placeholder: '' + third_party_settings: { } + type: number + region: content + field_mobile_width: + weight: 4 + settings: + placeholder: '' + third_party_settings: { } + type: number + region: content + field_source_data: + weight: 4 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content +hidden: + created: true + status: true diff --git a/config/core.entity_view_display.node.campaign.default.yml b/config/core.entity_view_display.node.campaign.default.yml index 53252bd61d..89c89cfc9b 100644 --- a/config/core.entity_view_display.node.campaign.default.yml +++ b/config/core.entity_view_display.node.campaign.default.yml @@ -109,12 +109,12 @@ content: field_social_media_embed: type: entity_reference_revisions_entity_view weight: 6 + region: content label: hidden settings: view_mode: default link: '' third_party_settings: { } - region: content field_spotlight: weight: 5 label: hidden diff --git a/config/core.entity_view_display.node.data_story.default.yml b/config/core.entity_view_display.node.data_story.default.yml new file mode 100644 index 0000000000..5e271ea198 --- /dev/null +++ b/config/core.entity_view_display.node.data_story.default.yml @@ -0,0 +1,37 @@ +uuid: 81497f8b-bc54-4b93-900a-1fcf4ce68ce7 +langcode: en +status: true +dependencies: + config: + - field.field.node.data_story.field_content + - field.field.node.data_story.field_description + - node.type.data_story + module: + - entity_reference_revisions + - text + - user +id: node.data_story.default +targetEntityType: node +bundle: data_story +mode: default +content: + field_content: + weight: 1 + label: hidden + settings: + view_mode: default + link: '' + third_party_settings: { } + type: entity_reference_revisions_entity_view + region: content + field_description: + weight: 0 + label: hidden + settings: { } + third_party_settings: { } + type: text_default + region: content +hidden: + langcode: true + links: true + search_api_excerpt: true diff --git a/config/core.entity_view_display.node.data_story.teaser.yml b/config/core.entity_view_display.node.data_story.teaser.yml new file mode 100644 index 0000000000..0dbb52b153 --- /dev/null +++ b/config/core.entity_view_display.node.data_story.teaser.yml @@ -0,0 +1,26 @@ +uuid: d6ced65c-ca42-4012-b367-a540efbb06de +langcode: en +status: false +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.data_story.field_content + - field.field.node.data_story.field_description + - node.type.data_story + module: + - user +id: node.data_story.teaser +targetEntityType: node +bundle: data_story +mode: teaser +content: + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + field_content: true + field_description: true + langcode: true + search_api_excerpt: true diff --git a/config/core.entity_view_display.paragraph.data_story_section.default.yml b/config/core.entity_view_display.paragraph.data_story_section.default.yml new file mode 100644 index 0000000000..0d3e31d6f9 --- /dev/null +++ b/config/core.entity_view_display.paragraph.data_story_section.default.yml @@ -0,0 +1,34 @@ +uuid: 4cb14a35-5d92-4291-bf02-c93f7721d0db +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.data_story_section.field_content + - field.field.paragraph.data_story_section.field_title + - paragraphs.paragraphs_type.data_story_section + module: + - entity_reference_revisions +id: paragraph.data_story_section.default +targetEntityType: paragraph +bundle: data_story_section +mode: default +content: + field_content: + weight: 1 + label: hidden + settings: + view_mode: default + link: '' + third_party_settings: { } + type: entity_reference_revisions_entity_view + region: content + field_title: + weight: 0 + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content +hidden: + search_api_excerpt: true diff --git a/config/core.entity_view_display.paragraph.image.default.yml b/config/core.entity_view_display.paragraph.image.default.yml new file mode 100644 index 0000000000..e36f53aa4a --- /dev/null +++ b/config/core.entity_view_display.paragraph.image.default.yml @@ -0,0 +1,23 @@ +uuid: 09527b9f-23e7-4f8a-bd29-b6aff9e78111 +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.image.field_image + - paragraphs.paragraphs_type.image +id: paragraph.image.default +targetEntityType: paragraph +bundle: image +mode: default +content: + field_image: + weight: 0 + label: hidden + settings: + link: true + view_mode: default + third_party_settings: { } + type: entity_reference_entity_view + region: content +hidden: + search_api_excerpt: true diff --git a/config/core.entity_view_display.paragraph.powerbi_embed.default.yml b/config/core.entity_view_display.paragraph.powerbi_embed.default.yml new file mode 100644 index 0000000000..cc5fd2e939 --- /dev/null +++ b/config/core.entity_view_display.paragraph.powerbi_embed.default.yml @@ -0,0 +1,90 @@ +uuid: 6181259f-0548-494c-84dd-3d94fa92e86c +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.powerbi_embed.field_data_notes + - field.field.paragraph.powerbi_embed.field_desktop_embed_url + - field.field.paragraph.powerbi_embed.field_desktop_height + - field.field.paragraph.powerbi_embed.field_desktop_width + - field.field.paragraph.powerbi_embed.field_mobile_embed_url + - field.field.paragraph.powerbi_embed.field_mobile_height + - field.field.paragraph.powerbi_embed.field_mobile_width + - field.field.paragraph.powerbi_embed.field_source_data + - paragraphs.paragraphs_type.powerbi_embed + module: + - text +id: paragraph.powerbi_embed.default +targetEntityType: paragraph +bundle: powerbi_embed +mode: default +content: + field_data_notes: + weight: 6 + label: hidden + settings: { } + third_party_settings: { } + type: text_default + region: content + field_desktop_embed_url: + weight: 0 + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_desktop_height: + weight: 4 + label: hidden + settings: + thousand_separator: '' + prefix_suffix: true + third_party_settings: { } + type: number_integer + region: content + field_desktop_width: + weight: 2 + label: hidden + settings: + thousand_separator: '' + prefix_suffix: true + third_party_settings: { } + type: number_integer + region: content + field_mobile_embed_url: + weight: 1 + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_mobile_height: + weight: 5 + label: hidden + settings: + thousand_separator: '' + prefix_suffix: true + third_party_settings: { } + type: number_integer + region: content + field_mobile_width: + weight: 3 + label: hidden + settings: + thousand_separator: '' + prefix_suffix: true + third_party_settings: { } + type: number_integer + region: content + field_source_data: + weight: 7 + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content +hidden: + search_api_excerpt: true diff --git a/config/core.extension.yml b/config/core.extension.yml index 82c146fadf..376fcf4d60 100644 --- a/config/core.extension.yml +++ b/config/core.extension.yml @@ -111,6 +111,7 @@ module: sfgov_formio: 0 sfgov_image_attributes: 0 sfgov_locations: 0 + sfgov_media: 0 sfgov_news: 0 sfgov_public_bodies: 0 sfgov_qless: 0 diff --git a/config/field.field.node.campaign.field_contents.yml b/config/field.field.node.campaign.field_contents.yml index b6dff0eb6f..f2e861b180 100644 --- a/config/field.field.node.campaign.field_contents.yml +++ b/config/field.field.node.campaign.field_contents.yml @@ -8,7 +8,6 @@ dependencies: - paragraphs.paragraphs_type.accordion - paragraphs.paragraphs_type.campaign_resources - paragraphs.paragraphs_type.image_with_text - - paragraphs.paragraphs_type.instagram_embed - paragraphs.paragraphs_type.video module: - entity_reference_revisions @@ -34,7 +33,6 @@ settings: accordion: accordion campaign_resources: campaign_resources image_with_text: image_with_text - instagram_embed: instagram_embed video: video target_bundles_drag_drop: accordion: @@ -55,6 +53,9 @@ settings: agenda_item: weight: 63 enabled: false + basic_html_section: + weight: 66 + enabled: false block: weight: 58 enabled: false @@ -131,10 +132,7 @@ settings: weight: 84 enabled: false instagram_embed: - enabled: true weight: 82 - instagram_feed: - weight: 83 enabled: false link: weight: 85 @@ -208,4 +206,10 @@ settings: video: enabled: true weight: 106 + video_external: + weight: 118 + enabled: false + videos: + weight: 117 + enabled: false field_type: entity_reference_revisions diff --git a/config/field.field.node.campaign.field_social_media_embed.yml b/config/field.field.node.campaign.field_social_media_embed.yml index 657c17dfa9..2ee50045ef 100644 --- a/config/field.field.node.campaign.field_social_media_embed.yml +++ b/config/field.field.node.campaign.field_social_media_embed.yml @@ -5,7 +5,6 @@ dependencies: config: - field.storage.node.field_social_media_embed - node.type.campaign - - paragraphs.paragraphs_type.instagram_embed - paragraphs.paragraphs_type.twitter_embed module: - entity_reference_revisions @@ -28,7 +27,6 @@ settings: handler_settings: negate: 0 target_bundles: - instagram_embed: instagram_embed twitter_embed: twitter_embed target_bundles_drag_drop: accordion: @@ -37,12 +35,21 @@ settings: accordion_item: weight: 52 enabled: false + accordion_item_simple: + weight: 62 + enabled: false acuity_embed: weight: 53 enabled: false additional_info: weight: 54 enabled: false + agenda_item: + weight: 65 + enabled: false + basic_html_section: + weight: 66 + enabled: false block: weight: 55 enabled: false @@ -119,8 +126,8 @@ settings: weight: 79 enabled: false instagram_embed: - enabled: true weight: 80 + enabled: false link: weight: 80 enabled: false @@ -136,6 +143,12 @@ settings: news: weight: 84 enabled: false + other_info_card: + weight: 98 + enabled: false + other_info_document: + weight: 99 + enabled: false people: weight: 85 enabled: false @@ -184,4 +197,13 @@ settings: twitter_embed: enabled: true weight: 100 + video: + weight: 116 + enabled: false + video_external: + weight: 117 + enabled: false + videos: + weight: 118 + enabled: false field_type: entity_reference_revisions diff --git a/config/field.field.node.data_story.field_content.yml b/config/field.field.node.data_story.field_content.yml new file mode 100644 index 0000000000..ab48c7943c --- /dev/null +++ b/config/field.field.node.data_story.field_content.yml @@ -0,0 +1,215 @@ +uuid: 5f558e93-52cb-423f-ac51-5cf654d0f4af +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_content + - node.type.data_story + - paragraphs.paragraphs_type.data_story_section + module: + - entity_reference_revisions + - tmgmt_content +third_party_settings: + tmgmt_content: + excluded: false +id: node.data_story.field_content +field_name: field_content +entity_type: node +bundle: data_story +label: Content +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + handler: 'default:paragraph' + handler_settings: + negate: 0 + target_bundles: + data_story_section: data_story_section + target_bundles_drag_drop: + accordion: + weight: 61 + enabled: false + accordion_item: + weight: 62 + enabled: false + accordion_item_simple: + weight: 63 + enabled: false + acuity_embed: + weight: 64 + enabled: false + additional_info: + weight: 65 + enabled: false + agenda_item: + weight: 66 + enabled: false + basic_html_section: + weight: 67 + enabled: false + block: + weight: 68 + enabled: false + button: + weight: 69 + enabled: false + call_to_action: + weight: 70 + enabled: false + callout: + weight: 71 + enabled: false + campaign: + weight: 72 + enabled: false + campaign_resource_section: + weight: 73 + enabled: false + campaign_resources: + weight: 74 + enabled: false + campaign_spotlight: + weight: 75 + enabled: false + content_link: + weight: 76 + enabled: false + cost: + weight: 77 + enabled: false + custom_section: + weight: 78 + enabled: false + data_story_section: + enabled: true + weight: 80 + department_content: + weight: 79 + enabled: false + department_service_section: + weight: 80 + enabled: false + document: + weight: 81 + enabled: false + email: + weight: 82 + enabled: false + email_addresses: + weight: 83 + enabled: false + events: + weight: 84 + enabled: false + fact: + weight: 85 + enabled: false + facts: + weight: 86 + enabled: false + featured_item: + weight: 87 + enabled: false + form: + weight: 88 + enabled: false + form_io: + weight: 89 + enabled: false + help: + weight: 90 + enabled: false + image_with_text: + weight: 91 + enabled: false + in_person_location: + weight: 92 + enabled: false + instagram_embed: + weight: 93 + enabled: false + link: + weight: 94 + enabled: false + list: + weight: 95 + enabled: false + list_item: + weight: 96 + enabled: false + mailing_address: + weight: 97 + enabled: false + news: + weight: 98 + enabled: false + other_info_card: + weight: 99 + enabled: false + other_info_document: + weight: 100 + enabled: false + people: + weight: 101 + enabled: false + phone: + weight: 102 + enabled: false + phone_numbers: + weight: 103 + enabled: false + power_bi_chart: + weight: 104 + enabled: false + process_step: + weight: 105 + enabled: false + resources: + weight: 106 + enabled: false + section: + weight: 107 + enabled: false + social_media: + weight: 108 + enabled: false + special_case: + weight: 109 + enabled: false + spotlight: + weight: 110 + enabled: false + step: + weight: 111 + enabled: false + text: + weight: 112 + enabled: false + thing_to_know: + weight: 113 + enabled: false + timeline: + weight: 114 + enabled: false + timeline_item: + weight: 115 + enabled: false + top_search_suggestion: + weight: 116 + enabled: false + twitter_embed: + weight: 117 + enabled: false + video: + weight: 118 + enabled: false + video_external: + weight: 119 + enabled: false + videos: + weight: 120 + enabled: false +field_type: entity_reference_revisions diff --git a/config/field.field.node.data_story.field_description.yml b/config/field.field.node.data_story.field_description.yml new file mode 100644 index 0000000000..2ab35f5e96 --- /dev/null +++ b/config/field.field.node.data_story.field_description.yml @@ -0,0 +1,34 @@ +uuid: 52f44449-44f1-419b-b426-9f23839f2cb4 +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_description + - node.type.data_story + module: + - allowed_formats + - text + - tmgmt_content +third_party_settings: + allowed_formats: + plain_text: plain_text + sf_restricted_html: '0' + sf_basic_html: '0' + sf_basic_html_news: '0' + basic_html: '0' + restricted_html: '0' + full_html: '0' + tmgmt_content: + excluded: false +id: node.data_story.field_description +field_name: field_description +entity_type: node +bundle: data_story +label: Description +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/config/field.field.paragraph.data_story_section.field_content.yml b/config/field.field.paragraph.data_story_section.field_content.yml new file mode 100644 index 0000000000..0349dde2d6 --- /dev/null +++ b/config/field.field.paragraph.data_story_section.field_content.yml @@ -0,0 +1,224 @@ +uuid: f40eb010-3d9b-425a-95e9-1ba9c8d9d5b3 +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_content + - paragraphs.paragraphs_type.callout + - paragraphs.paragraphs_type.data_story_section + - paragraphs.paragraphs_type.image + - paragraphs.paragraphs_type.powerbi_embed + - paragraphs.paragraphs_type.text + module: + - entity_reference_revisions + - tmgmt_content +third_party_settings: + tmgmt_content: + excluded: false +id: paragraph.data_story_section.field_content +field_name: field_content +entity_type: paragraph +bundle: data_story_section +label: 'Section Content' +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + handler: 'default:paragraph' + handler_settings: + negate: 0 + target_bundles: + text: text + callout: callout + image: image + powerbi_embed: powerbi_embed + target_bundles_drag_drop: + accordion: + weight: 88 + enabled: false + accordion_item: + weight: 90 + enabled: false + accordion_item_simple: + weight: 91 + enabled: false + acuity_embed: + weight: 92 + enabled: false + additional_info: + weight: 93 + enabled: false + agenda_item: + weight: 94 + enabled: false + basic_html_section: + weight: 95 + enabled: false + block: + weight: 96 + enabled: false + button: + weight: 97 + enabled: false + call_to_action: + weight: 98 + enabled: false + callout: + enabled: true + weight: 85 + campaign: + weight: 99 + enabled: false + campaign_resource_section: + weight: 101 + enabled: false + campaign_resources: + weight: 100 + enabled: false + campaign_spotlight: + weight: 102 + enabled: false + content_link: + weight: 103 + enabled: false + cost: + weight: 104 + enabled: false + custom_section: + weight: 105 + enabled: false + data_story_section: + weight: 106 + enabled: false + department_content: + weight: 107 + enabled: false + department_service_section: + weight: 108 + enabled: false + document: + weight: 109 + enabled: false + email: + weight: 110 + enabled: false + email_addresses: + weight: 111 + enabled: false + events: + weight: 112 + enabled: false + fact: + weight: 113 + enabled: false + facts: + weight: 114 + enabled: false + featured_item: + weight: 115 + enabled: false + form: + weight: 116 + enabled: false + form_io: + weight: 117 + enabled: false + help: + weight: 118 + enabled: false + image: + enabled: true + weight: 86 + image_with_text: + weight: 89 + enabled: false + in_person_location: + weight: 120 + enabled: false + instagram_embed: + weight: 119 + enabled: false + link: + weight: 121 + enabled: false + list: + weight: 122 + enabled: false + list_item: + weight: 123 + enabled: false + mailing_address: + weight: 124 + enabled: false + news: + weight: 125 + enabled: false + other_info_card: + weight: 126 + enabled: false + other_info_document: + weight: 127 + enabled: false + people: + weight: 128 + enabled: false + phone: + weight: 129 + enabled: false + phone_numbers: + weight: 130 + enabled: false + powerbi_embed: + enabled: true + weight: 87 + process_step: + weight: 131 + enabled: false + resources: + weight: 132 + enabled: false + section: + weight: 133 + enabled: false + social_media: + weight: 134 + enabled: false + special_case: + weight: 135 + enabled: false + spotlight: + weight: 136 + enabled: false + step: + weight: 137 + enabled: false + text: + enabled: true + weight: 84 + thing_to_know: + weight: 138 + enabled: false + timeline: + weight: 139 + enabled: false + timeline_item: + weight: 140 + enabled: false + top_search_suggestion: + weight: 141 + enabled: false + twitter_embed: + weight: 142 + enabled: false + video: + weight: 143 + enabled: false + video_external: + weight: 145 + enabled: false + videos: + weight: 144 + enabled: false +field_type: entity_reference_revisions diff --git a/config/field.field.paragraph.data_story_section.field_title.yml b/config/field.field.paragraph.data_story_section.field_title.yml new file mode 100644 index 0000000000..94ea45da07 --- /dev/null +++ b/config/field.field.paragraph.data_story_section.field_title.yml @@ -0,0 +1,24 @@ +uuid: d9412939-ecde-4139-9482-fc6a8ac55902 +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_title + - paragraphs.paragraphs_type.data_story_section + module: + - tmgmt_content +third_party_settings: + tmgmt_content: + excluded: false +id: paragraph.data_story_section.field_title +field_name: field_title +entity_type: paragraph +bundle: data_story_section +label: 'Section Title' +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/config/field.field.paragraph.image.field_image.yml b/config/field.field.paragraph.image.field_image.yml new file mode 100644 index 0000000000..76d8ba36ff --- /dev/null +++ b/config/field.field.paragraph.image.field_image.yml @@ -0,0 +1,33 @@ +uuid: 9546e212-38a9-468f-b1c7-a2cdc7f9813b +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_image + - media.type.image + - paragraphs.paragraphs_type.image + module: + - tmgmt_content +third_party_settings: + tmgmt_content: + excluded: false +id: paragraph.image.field_image +field_name: field_image +entity_type: paragraph +bundle: image +label: Image +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + handler: 'default:media' + handler_settings: + target_bundles: + image: image + sort: + field: _none + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/config/field.field.paragraph.powerbi_embed.field_data_notes.yml b/config/field.field.paragraph.powerbi_embed.field_data_notes.yml new file mode 100644 index 0000000000..ea47c7a69b --- /dev/null +++ b/config/field.field.paragraph.powerbi_embed.field_data_notes.yml @@ -0,0 +1,34 @@ +uuid: a91bbaf5-9410-45e8-8e6e-c80d65cc83e9 +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_data_notes + - paragraphs.paragraphs_type.powerbi_embed + module: + - allowed_formats + - text + - tmgmt_content +third_party_settings: + allowed_formats: + sf_basic_html: sf_basic_html + sf_restricted_html: '0' + sf_basic_html_news: '0' + basic_html: '0' + restricted_html: '0' + full_html: '0' + plain_text: '0' + tmgmt_content: + excluded: false +id: paragraph.powerbi_embed.field_data_notes +field_name: field_data_notes +entity_type: paragraph +bundle: powerbi_embed +label: 'Data notes' +description: 'Include where the data comes from, caveats, limitations, or other details.' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/config/field.field.paragraph.powerbi_embed.field_desktop_embed_url.yml b/config/field.field.paragraph.powerbi_embed.field_desktop_embed_url.yml new file mode 100644 index 0000000000..ee06ea4cc4 --- /dev/null +++ b/config/field.field.paragraph.powerbi_embed.field_desktop_embed_url.yml @@ -0,0 +1,24 @@ +uuid: b86ffd28-e187-4b56-a936-d5ffa7e90a99 +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_desktop_embed_url + - paragraphs.paragraphs_type.powerbi_embed + module: + - tmgmt_content +third_party_settings: + tmgmt_content: + excluded: false +id: paragraph.powerbi_embed.field_desktop_embed_url +field_name: field_desktop_embed_url +entity_type: paragraph +bundle: powerbi_embed +label: 'Desktop embed URL' +description: 'Go to your report in Power BI Online > Publish to Web > Set default page to your desktop page > copy the “Link you can send in an email”.' +required: true +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/config/field.field.paragraph.powerbi_embed.field_desktop_height.yml b/config/field.field.paragraph.powerbi_embed.field_desktop_height.yml new file mode 100644 index 0000000000..7a8a835190 --- /dev/null +++ b/config/field.field.paragraph.powerbi_embed.field_desktop_height.yml @@ -0,0 +1,30 @@ +uuid: df71c4f7-b604-4443-935d-06727514eb95 +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_desktop_height + - paragraphs.paragraphs_type.powerbi_embed + module: + - tmgmt_content +third_party_settings: + tmgmt_content: + excluded: false +id: paragraph.powerbi_embed.field_desktop_height +field_name: field_desktop_height +entity_type: paragraph +bundle: powerbi_embed +label: Height +description: '' +required: true +translatable: false +default_value: + - + value: 700 +default_value_callback: '' +settings: + min: 0 + max: null + prefix: '' + suffix: '' +field_type: integer diff --git a/config/field.field.paragraph.powerbi_embed.field_desktop_width.yml b/config/field.field.paragraph.powerbi_embed.field_desktop_width.yml new file mode 100644 index 0000000000..cec463b24f --- /dev/null +++ b/config/field.field.paragraph.powerbi_embed.field_desktop_width.yml @@ -0,0 +1,30 @@ +uuid: cde6967d-5a01-4e0b-a04d-982beda5c816 +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_desktop_width + - paragraphs.paragraphs_type.powerbi_embed + module: + - tmgmt_content +third_party_settings: + tmgmt_content: + excluded: false +id: paragraph.powerbi_embed.field_desktop_width +field_name: field_desktop_width +entity_type: paragraph +bundle: powerbi_embed +label: Width +description: '' +required: true +translatable: true +default_value: + - + value: 700 +default_value_callback: '' +settings: + min: 0 + max: null + prefix: '' + suffix: '' +field_type: integer diff --git a/config/field.field.paragraph.powerbi_embed.field_mobile_embed_url.yml b/config/field.field.paragraph.powerbi_embed.field_mobile_embed_url.yml new file mode 100644 index 0000000000..817f16ca70 --- /dev/null +++ b/config/field.field.paragraph.powerbi_embed.field_mobile_embed_url.yml @@ -0,0 +1,24 @@ +uuid: f40b9748-2cd1-45ae-9097-9fb565a3aba8 +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_mobile_embed_url + - paragraphs.paragraphs_type.powerbi_embed + module: + - tmgmt_content +third_party_settings: + tmgmt_content: + excluded: false +id: paragraph.powerbi_embed.field_mobile_embed_url +field_name: field_mobile_embed_url +entity_type: paragraph +bundle: powerbi_embed +label: 'Mobile embed URL' +description: 'Go to your report in Power BI Online > Publish to Web > Set default page to your mobile page > copy the “Link you can send in an email”.' +required: true +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/config/field.field.paragraph.powerbi_embed.field_mobile_height.yml b/config/field.field.paragraph.powerbi_embed.field_mobile_height.yml new file mode 100644 index 0000000000..71ce02a2b4 --- /dev/null +++ b/config/field.field.paragraph.powerbi_embed.field_mobile_height.yml @@ -0,0 +1,30 @@ +uuid: 0f0316f4-2c29-4c12-ba1f-f2b5295b10fd +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_mobile_height + - paragraphs.paragraphs_type.powerbi_embed + module: + - tmgmt_content +third_party_settings: + tmgmt_content: + excluded: false +id: paragraph.powerbi_embed.field_mobile_height +field_name: field_mobile_height +entity_type: paragraph +bundle: powerbi_embed +label: Height +description: '' +required: true +translatable: false +default_value: + - + value: 900 +default_value_callback: '' +settings: + min: 0 + max: null + prefix: '' + suffix: '' +field_type: integer diff --git a/config/field.field.paragraph.powerbi_embed.field_mobile_width.yml b/config/field.field.paragraph.powerbi_embed.field_mobile_width.yml new file mode 100644 index 0000000000..99f5396461 --- /dev/null +++ b/config/field.field.paragraph.powerbi_embed.field_mobile_width.yml @@ -0,0 +1,30 @@ +uuid: c2b15602-0119-47e7-84e0-f21bac354742 +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_mobile_width + - paragraphs.paragraphs_type.powerbi_embed + module: + - tmgmt_content +third_party_settings: + tmgmt_content: + excluded: false +id: paragraph.powerbi_embed.field_mobile_width +field_name: field_mobile_width +entity_type: paragraph +bundle: powerbi_embed +label: Width +description: '' +required: true +translatable: true +default_value: + - + value: 360 +default_value_callback: '' +settings: + min: 0 + max: null + prefix: '' + suffix: '' +field_type: integer diff --git a/config/field.field.paragraph.powerbi_embed.field_source_data.yml b/config/field.field.paragraph.powerbi_embed.field_source_data.yml new file mode 100644 index 0000000000..6a38637c70 --- /dev/null +++ b/config/field.field.paragraph.powerbi_embed.field_source_data.yml @@ -0,0 +1,24 @@ +uuid: cbd15219-58da-4c8e-8654-6f1386990acd +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_source_data + - paragraphs.paragraphs_type.powerbi_embed + module: + - tmgmt_content +third_party_settings: + tmgmt_content: + excluded: false +id: paragraph.powerbi_embed.field_source_data +field_name: field_source_data +entity_type: paragraph +bundle: powerbi_embed +label: 'Source data' +description: 'URL for the dataset (for example, SF Open Data Portal or US Census).' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/config/field.field.paragraph.section.field_content.yml b/config/field.field.paragraph.section.field_content.yml index 6ca10c69dc..ab10688baa 100644 --- a/config/field.field.paragraph.section.field_content.yml +++ b/config/field.field.paragraph.section.field_content.yml @@ -61,12 +61,21 @@ settings: accordion_item: weight: 55 enabled: false + accordion_item_simple: + weight: 63 + enabled: false acuity_embed: weight: 42 enabled: false additional_info: weight: 20 enabled: false + agenda_item: + weight: 66 + enabled: false + basic_html_section: + weight: 67 + enabled: false block: enabled: true weight: 22 @@ -163,6 +172,12 @@ settings: news: enabled: true weight: 49 + other_info_card: + weight: 99 + enabled: false + other_info_document: + weight: 100 + enabled: false people: enabled: true weight: 21 @@ -172,6 +187,9 @@ settings: phone_numbers: weight: 62 enabled: false + power_bi_chart: + enabled: true + weight: 104 process_step: weight: 63 enabled: false @@ -214,4 +232,10 @@ settings: video: weight: 106 enabled: false + video_external: + weight: 120 + enabled: false + videos: + weight: 119 + enabled: false field_type: entity_reference_revisions diff --git a/config/field.field.paragraph.video.field_video.yml b/config/field.field.paragraph.video.field_video.yml index e142dd39d4..6634aef096 100644 --- a/config/field.field.paragraph.video.field_video.yml +++ b/config/field.field.paragraph.video.field_video.yml @@ -16,14 +16,14 @@ field_name: field_video entity_type: paragraph bundle: video label: 'YouTube URL' -description: 'Youtube video URL, ie. https://www.youtube.com/watch?v=zck4uKB-ZBQ' +description: 'YouTube video URL, in the format: https://www.youtube.com/watch?v=xyz' required: true translatable: false default_value: { } default_value_callback: '' settings: allowed_providers: - youtube: youtube vimeo: vimeo + youtube: youtube youtube_playlist: '0' field_type: video_embed_field diff --git a/config/field.storage.paragraph.field_data_notes.yml b/config/field.storage.paragraph.field_data_notes.yml new file mode 100644 index 0000000000..a844e5b72b --- /dev/null +++ b/config/field.storage.paragraph.field_data_notes.yml @@ -0,0 +1,19 @@ +uuid: 91d5a1f7-004f-4b83-9648-f1486a25b155 +langcode: en +status: true +dependencies: + module: + - paragraphs + - text +id: paragraph.field_data_notes +field_name: field_data_notes +entity_type: paragraph +type: text_long +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/field.storage.paragraph.field_desktop_embed_url.yml b/config/field.storage.paragraph.field_desktop_embed_url.yml new file mode 100644 index 0000000000..c3f61a22d2 --- /dev/null +++ b/config/field.storage.paragraph.field_desktop_embed_url.yml @@ -0,0 +1,21 @@ +uuid: 3e9f3da0-4ee4-4db5-be2a-0568e8f50401 +langcode: en +status: true +dependencies: + module: + - paragraphs +id: paragraph.field_desktop_embed_url +field_name: field_desktop_embed_url +entity_type: paragraph +type: string +settings: + max_length: 2048 + is_ascii: false + case_sensitive: false +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/field.storage.paragraph.field_desktop_height.yml b/config/field.storage.paragraph.field_desktop_height.yml new file mode 100644 index 0000000000..f73ec6efdf --- /dev/null +++ b/config/field.storage.paragraph.field_desktop_height.yml @@ -0,0 +1,20 @@ +uuid: 27af53a7-3ce4-441d-9adc-0a4d6edd62da +langcode: en +status: true +dependencies: + module: + - paragraphs +id: paragraph.field_desktop_height +field_name: field_desktop_height +entity_type: paragraph +type: integer +settings: + unsigned: false + size: normal +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/field.storage.paragraph.field_desktop_width.yml b/config/field.storage.paragraph.field_desktop_width.yml new file mode 100644 index 0000000000..b8bbe47a40 --- /dev/null +++ b/config/field.storage.paragraph.field_desktop_width.yml @@ -0,0 +1,20 @@ +uuid: ffd45faa-7ebb-4ccd-a53d-059fc1f39263 +langcode: en +status: true +dependencies: + module: + - paragraphs +id: paragraph.field_desktop_width +field_name: field_desktop_width +entity_type: paragraph +type: integer +settings: + unsigned: false + size: normal +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/field.storage.paragraph.field_mobile_embed_url.yml b/config/field.storage.paragraph.field_mobile_embed_url.yml new file mode 100644 index 0000000000..82b7e68a4e --- /dev/null +++ b/config/field.storage.paragraph.field_mobile_embed_url.yml @@ -0,0 +1,21 @@ +uuid: 1af3043f-c1a9-404a-aa89-5c44e2736239 +langcode: en +status: true +dependencies: + module: + - paragraphs +id: paragraph.field_mobile_embed_url +field_name: field_mobile_embed_url +entity_type: paragraph +type: string +settings: + max_length: 2048 + is_ascii: false + case_sensitive: false +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/field.storage.paragraph.field_mobile_height.yml b/config/field.storage.paragraph.field_mobile_height.yml new file mode 100644 index 0000000000..9d64071f08 --- /dev/null +++ b/config/field.storage.paragraph.field_mobile_height.yml @@ -0,0 +1,20 @@ +uuid: a1209216-c4e2-4f8f-afa7-2a61f2ab0012 +langcode: en +status: true +dependencies: + module: + - paragraphs +id: paragraph.field_mobile_height +field_name: field_mobile_height +entity_type: paragraph +type: integer +settings: + unsigned: false + size: normal +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/field.storage.paragraph.field_mobile_width.yml b/config/field.storage.paragraph.field_mobile_width.yml new file mode 100644 index 0000000000..7df37b988f --- /dev/null +++ b/config/field.storage.paragraph.field_mobile_width.yml @@ -0,0 +1,20 @@ +uuid: 4dafdbfd-0809-4fb3-b10d-2f69a1cb5b4c +langcode: en +status: true +dependencies: + module: + - paragraphs +id: paragraph.field_mobile_width +field_name: field_mobile_width +entity_type: paragraph +type: integer +settings: + unsigned: false + size: normal +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/field.storage.paragraph.field_source_data.yml b/config/field.storage.paragraph.field_source_data.yml new file mode 100644 index 0000000000..c3ffbd23e9 --- /dev/null +++ b/config/field.storage.paragraph.field_source_data.yml @@ -0,0 +1,21 @@ +uuid: c3e435ec-0517-4d89-a10e-a57f52df291e +langcode: en +status: true +dependencies: + module: + - paragraphs +id: paragraph.field_source_data +field_name: field_source_data +entity_type: paragraph +type: string +settings: + max_length: 255 + is_ascii: false + case_sensitive: false +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/language.content_settings.node.data_story.yml b/config/language.content_settings.node.data_story.yml new file mode 100644 index 0000000000..06520316be --- /dev/null +++ b/config/language.content_settings.node.data_story.yml @@ -0,0 +1,11 @@ +uuid: 846af230-6ae4-4522-b8f0-240a06e7874a +langcode: en +status: true +dependencies: + config: + - node.type.data_story +id: node.data_story +target_entity_type_id: node +target_bundle: data_story +default_langcode: site_default +language_alterable: false diff --git a/config/node.type.about.yml b/config/node.type.about.yml index 6bd007193c..52367350f5 100644 --- a/config/node.type.about.yml +++ b/config/node.type.about.yml @@ -21,10 +21,11 @@ third_party_settings: unpublish_enable: false unpublish_required: false unpublish_revision: false + show_message_after_update: true name: About type: about description: 'About pages for Departments and Public bodies.' help: '' -new_revision: false +new_revision: true preview_mode: 0 display_submitted: false diff --git a/config/node.type.data_story.yml b/config/node.type.data_story.yml new file mode 100644 index 0000000000..67e64ec264 --- /dev/null +++ b/config/node.type.data_story.yml @@ -0,0 +1,31 @@ +uuid: a39843ec-94c6-4bc3-80f0-d8a585ecb8a2 +langcode: en +status: true +dependencies: + module: + - menu_ui + - scheduler +third_party_settings: + menu_ui: + available_menus: { } + parent: '' + scheduler: + expand_fieldset: when_required + fields_display_mode: vertical_tab + publish_enable: false + publish_past_date: error + publish_past_date_created: false + publish_required: false + publish_revision: false + publish_touch: false + show_message_after_update: true + unpublish_enable: false + unpublish_required: false + unpublish_revision: false +name: 'Data story' +type: data_story +description: '' +help: '' +new_revision: true +preview_mode: 0 +display_submitted: false diff --git a/config/node.type.location.yml b/config/node.type.location.yml index 11b8887856..718d79c96e 100644 --- a/config/node.type.location.yml +++ b/config/node.type.location.yml @@ -26,6 +26,6 @@ name: Location type: location description: '' help: '' -new_revision: false +new_revision: true preview_mode: 0 display_submitted: false diff --git a/config/paragraphs.paragraphs_type.data_story_section.yml b/config/paragraphs.paragraphs_type.data_story_section.yml new file mode 100644 index 0000000000..2776751f8c --- /dev/null +++ b/config/paragraphs.paragraphs_type.data_story_section.yml @@ -0,0 +1,10 @@ +uuid: 37a1857a-5657-4e0a-afa4-498155437989 +langcode: en +status: true +dependencies: { } +id: data_story_section +label: Section +icon_uuid: null +icon_default: null +description: '' +behavior_plugins: { } diff --git a/config/paragraphs.paragraphs_type.image.yml b/config/paragraphs.paragraphs_type.image.yml new file mode 100644 index 0000000000..a1e17d3afe --- /dev/null +++ b/config/paragraphs.paragraphs_type.image.yml @@ -0,0 +1,10 @@ +uuid: 597b2dcb-cb44-41fb-965b-a6ca86d487ca +langcode: en +status: true +dependencies: { } +id: image +label: Image +icon_uuid: null +icon_default: null +description: '' +behavior_plugins: { } diff --git a/config/paragraphs.paragraphs_type.powerbi_embed.yml b/config/paragraphs.paragraphs_type.powerbi_embed.yml new file mode 100644 index 0000000000..b699bdbdd3 --- /dev/null +++ b/config/paragraphs.paragraphs_type.powerbi_embed.yml @@ -0,0 +1,10 @@ +uuid: aaa00c4e-f63f-4e82-be83-1629e3401bbc +langcode: en +status: true +dependencies: { } +id: powerbi_embed +label: 'PowerBI embed' +icon_uuid: null +icon_default: null +description: '' +behavior_plugins: { } diff --git a/config/pathauto.pattern.data_story.yml b/config/pathauto.pattern.data_story.yml new file mode 100644 index 0000000000..1af3f37a83 --- /dev/null +++ b/config/pathauto.pattern.data_story.yml @@ -0,0 +1,22 @@ +uuid: 98afa30f-b0b7-40db-a7cc-cd9b6cb7df1b +langcode: en +status: true +dependencies: + module: + - node +id: data_story +label: 'Data story' +type: 'canonical_entities:node' +pattern: 'data/[node:title]' +selection_criteria: + 51dc9c35-f202-493c-bdf9-3aca304e1915: + id: node_type + bundles: + data_story: data_story + negate: false + context_mapping: + node: node + uuid: 51dc9c35-f202-493c-bdf9-3aca304e1915 +selection_logic: and +weight: -5 +relationships: { } diff --git a/config/sfgov_formio.settings.yml b/config/sfgov_formio.settings.yml index 33ed856954..b7a645020b 100644 --- a/config/sfgov_formio.settings.yml +++ b/config/sfgov_formio.settings.yml @@ -1,2 +1,2 @@ formio_version: 4.12.1 -formio_sfds_version: 8.0.0 +formio_sfds_version: 8.1.0 diff --git a/web/modules/custom/sfgov_admin/css/dist/sfgov-admin.css b/web/modules/custom/sfgov_admin/css/dist/sfgov-admin.css index 495ac949b4..107614af25 100644 --- a/web/modules/custom/sfgov_admin/css/dist/sfgov-admin.css +++ b/web/modules/custom/sfgov_admin/css/dist/sfgov-admin.css @@ -462,6 +462,46 @@ fieldset.sf-transaction-fieldset:not(.fieldgroup) > legend { padding-right: 0.2em; } +.js .field--widget-sfgov-paragraphs th .paragraphs-actions { + float: right; + margin-right: -11px; +} + +.js .paragraphs-subform .form-item label:after { + content: ""; +} + +.js .node-data-story-add-form .paragraph-top, +.js .node-data-story-edit-form .paragraph-top { + grid-template-columns: 250px auto 1fr auto; +} + +details.paragraph-type--powerbi-embed__urls .seven-details__description, details.paragraph-type--powerbi-embed__aspect-ratios .seven-details__description { + margin-bottom: 30px; +} + +details.paragraph-type--powerbi-embed__urls { + background-color: transparent; + border: 0; + margin: 0; +} + +details.paragraph-type--powerbi-embed__urls summary { + display: none; +} + +details.paragraph-type--powerbi-embed__urls .details-wrapper { + padding: 0; +} + +details.paragraph-type--powerbi-embed__aspect-ratios div.form-wrapper.paragraphs-content { + margin-top: 10px; +} + +details.paragraph-type--powerbi-embed__aspect-ratios div.form-wrapper.paragraphs-content label { + font-weight: normal; +} + .field--name-field-cost-type .form-radios, .field--name-field-cost-type .form-chexboxes { align-items: center; display: flex; diff --git a/web/modules/custom/sfgov_admin/css/src/components/_paragraphs.form.scss b/web/modules/custom/sfgov_admin/css/src/components/_paragraphs.form.scss index bef7d2543f..fc50efd418 100644 --- a/web/modules/custom/sfgov_admin/css/src/components/_paragraphs.form.scss +++ b/web/modules/custom/sfgov_admin/css/src/components/_paragraphs.form.scss @@ -223,3 +223,52 @@ fieldset.sf-transaction-fieldset:not(.fieldgroup) { margin-right: 0; padding-right: 0.2em; } +.js .field--widget-sfgov-paragraphs th .paragraphs-actions { + float: right; + margin-right: -11px; +} +.js .paragraphs-subform .form-item label:after { + content: ""; +} +.js .node-data-story-add-form .paragraph-top, +.js .node-data-story-edit-form .paragraph-top { + grid-template-columns: 250px auto 1fr auto; +} + +// Custom styles for PowerBI paragraph subform. +// ----------------------------------------------------------------------------- +details.paragraph-type--powerbi-embed { + + &__urls, + &__aspect-ratios { + + .seven-details__description { + margin-bottom: 30px; + } + } + + &__urls { + background-color: transparent; + border: 0; + margin: 0; + + summary { + display: none; + } + + .details-wrapper { + padding: 0; + } + } + + &__aspect-ratios { + + div.form-wrapper.paragraphs-content { + margin-top: 10px; + + label { + font-weight: normal; + } + } + } +} diff --git a/web/modules/custom/sfgov_admin/src/Plugin/Field/FieldWidget/SfgovParagraphsWidget.php b/web/modules/custom/sfgov_admin/src/Plugin/Field/FieldWidget/SfgovParagraphsWidget.php index 1dfe050036..d4bcddf2b9 100644 --- a/web/modules/custom/sfgov_admin/src/Plugin/Field/FieldWidget/SfgovParagraphsWidget.php +++ b/web/modules/custom/sfgov_admin/src/Plugin/Field/FieldWidget/SfgovParagraphsWidget.php @@ -2,8 +2,13 @@ namespace Drupal\sfgov_admin\Plugin\Field\FieldWidget; +use Drupal\Core\Entity\EntityTypeBundleInfoInterface; +use Drupal\Core\Field\FieldDefinitionInterface; +use Drupal\Core\Field\FieldItemListInterface; +use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Url; use Drupal\paragraphs\Plugin\Field\FieldWidget\ParagraphsWidget; +use Symfony\Component\DependencyInjection\ContainerInterface; /** * Plugin implementation of the 'entity_reference_revisions paragraphs' widget. @@ -19,6 +24,48 @@ */ class SfgovParagraphsWidget extends ParagraphsWidget { + /** + * The bundle info manager. + * + * @var \Drupal\Core\Entity\EntityTypeBundleInfoInterface + */ + protected $bundleInfo; + + /** + * SfgovParagraphsWidget constructor. + * + * @param $plugin_id + * The plugin_id for the widget. + * @param mixed $plugin_definition + * The plugin implementation definition. + * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition + * The definition of the field to which the widget is associated. + * @param array $settings + * The widget settings. + * @param array $third_party_settings + * Any third party settings. + * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $bundle_info + * The bundle info manager. + */ + public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, EntityTypeBundleInfoInterface $bundle_info) { + parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings); + $this->bundleInfo = $bundle_info; + } + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { + return new static( + $plugin_id, + $plugin_definition, + $configuration['field_definition'], + $configuration['settings'], + $configuration['third_party_settings'], + $container->get('entity_type.bundle.info') + ); + } + /** * {@inheritdoc} */ @@ -98,4 +145,58 @@ protected function buildButtonsAddMode() { return $elements; } + /** + * {@inheritdoc} + */ + public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) { + $element = parent::formElement($items, $delta, $element, $form, $form_state); + $field_name = $this->fieldDefinition->getName(); + $parents = $element['#field_parents']; + $item_bundles = $this->bundleInfo->getBundleInfo('paragraph'); + + $widget_state = static::getWidgetState($parents, $field_name, $form_state); + $paragraphs_entity = NULL; + if ($element['#paragraph_type'] === "data_story_section") { + $child_bundles = []; + if (isset($widget_state['paragraphs'][$delta]['entity'])) { + $paragraphs_entity = $widget_state['paragraphs'][$delta]['entity']; + } + elseif (isset($items[$delta]->entity)) { + $paragraphs_entity = $items[$delta]->entity; + } + if ($paragraphs_entity) { + /** @var \Drupal\paragraphs\ParagraphInterface[] $child_paragraphs */ + $child_paragraphs = $paragraphs_entity->get('field_content')->referencedEntities(); + $content = []; + + if ($heading = $paragraphs_entity->get('field_title')->value) { + $content[] = $heading; + } + + + foreach ($child_paragraphs as $child_paragraph) { + $localized_paragraph = $child_paragraph->getTranslation($form_state->get('langcode')); + $child_bundles[] = $item_bundles[$child_paragraph->bundle()]['label']; + $row_content = $child_paragraph->bundle() === "powerbi_embed" ? $item_bundles[$child_paragraph->bundle()]['label'] : ''; + if (!$heading && $child_paragraph->hasField('field_text')) { + if ($text = $localized_paragraph->get('field_text')->value) { + $text = strip_tags($text); + $row_content = $text; + } + } + + $content[] = $row_content; + } + + $element['top']['summary']['fields_info']['#summary']['content'] = array_filter($content); + } + + if (count($child_bundles)) { + $element['top']['type']['label']['#markup'] .= ' (' . implode(', ', $child_bundles) . ')'; + } + } + + return $element; + } + } diff --git a/web/modules/custom/sfgov_media/config/schema/sfgov_media.schema.yml b/web/modules/custom/sfgov_media/config/schema/sfgov_media.schema.yml new file mode 100644 index 0000000000..cab19a938f --- /dev/null +++ b/web/modules/custom/sfgov_media/config/schema/sfgov_media.schema.yml @@ -0,0 +1,14 @@ +media.source.power_bi: + type: media.source.field_aware + label: 'Power BI media source configuration' + +field.formatter.settings.power_bi: + type: mapping + label: 'Field display format settings' + mapping: + width: + type: string + label: 'Width' + height: + type: string + label: 'Height' diff --git a/web/modules/custom/sfgov_media/js/sfgov_media.power_bi.js b/web/modules/custom/sfgov_media/js/sfgov_media.power_bi.js new file mode 100644 index 0000000000..19a78c397c --- /dev/null +++ b/web/modules/custom/sfgov_media/js/sfgov_media.power_bi.js @@ -0,0 +1,37 @@ +(function ($, Drupal) { + Drupal.behaviors.mediaPowerBi = { + attach: function (context, settings) { + // Cache. + const $charts = $('[data-power-bi]', context); + + // Handle window resize. + toggleChart(); + $(window).on("resize", function () { + toggleChart(); + }) + + function toggleChart() { + const show_device = $(window).outerWidth() > 767 ? "desktop" : "mobile"; + + $charts.each(function () { + const $chart = $(this); + const $iframe = $chart.find('> iframe'); + const device = $chart.data().device + const src = $chart.data().src + + if (device === show_device) { + if (!$iframe.attr('src')) { + $iframe.attr('src', src); + } + + $chart.show(); + } + else { + $iframe.attr('src', ''); + $chart.hide(); + } + }) + } + } + }; +})(jQuery, Drupal); diff --git a/web/modules/custom/sfgov_media/sfgov_media.info.yml b/web/modules/custom/sfgov_media/sfgov_media.info.yml new file mode 100644 index 0000000000..c95fd630f7 --- /dev/null +++ b/web/modules/custom/sfgov_media/sfgov_media.info.yml @@ -0,0 +1,7 @@ +name: 'SF Media' +type: module +description: 'Handles custom media types.' +core_version_requirement: ^8 || ^9 +package: 'SF Gov' +dependencies: + - drupal:media diff --git a/web/modules/custom/sfgov_media/sfgov_media.libraries.yml b/web/modules/custom/sfgov_media/sfgov_media.libraries.yml new file mode 100644 index 0000000000..f2f9e18e02 --- /dev/null +++ b/web/modules/custom/sfgov_media/sfgov_media.libraries.yml @@ -0,0 +1,8 @@ +power_bi: + version: VERSION + js: + js/sfgov_media.power_bi.js: {} + https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.2.2/lazysizes.min.js: { external: true } + dependencies: + - core/jquery + - core/drupal diff --git a/web/modules/custom/sfgov_media/sfgov_media.module b/web/modules/custom/sfgov_media/sfgov_media.module new file mode 100644 index 0000000000..d8b8ac2183 --- /dev/null +++ b/web/modules/custom/sfgov_media/sfgov_media.module @@ -0,0 +1,42 @@ + [ + 'variables' => [ + 'url' => NULL, + 'device' => NULL, + 'width' => NULL, + 'height' => NULL, + ], + 'file' => 'sfgov_media.theme.inc', + ], + ]; +} + +/** + * Implements hook_entity_bundle_field_info_alter(). + */ +function sfgov_media_entity_bundle_field_info_alter(&$fields, EntityTypeInterface $entity_type, $bundle) { + $power_bi_url_fields = [ + 'field_desktop_embed_url', + 'field_mobile_embed_url', + ]; + + // Add power bi url constraint. + foreach ($power_bi_url_fields as $power_bi_url_field) { + if (!empty($fields[$power_bi_url_field])) { + $fields[$power_bi_url_field]->addConstraint('PowerBiUrl'); + } + } +} diff --git a/web/modules/custom/sfgov_media/sfgov_media.theme.inc b/web/modules/custom/sfgov_media/sfgov_media.theme.inc new file mode 100644 index 0000000000..570a27212c --- /dev/null +++ b/web/modules/custom/sfgov_media/sfgov_media.theme.inc @@ -0,0 +1,15 @@ + '460', + 'height' => '355', + ] + parent::defaultSettings(); + } + + /** + * {@inheritdoc} + */ + public function settingsForm(array $form, FormStateInterface $form_state) { + $elements = parent::settingsForm($form, $form_state); + + $elements['width'] = [ + '#type' => 'textfield', + '#title' => $this->t('Width'), + '#default_value' => $this->getSetting('width'), + '#min' => 1, + '#required' => TRUE, + ]; + + $elements['height'] = [ + '#type' => 'textfield', + '#title' => $this->t('Height'), + '#default_value' => $this->getSetting('height'), + '#min' => 1, + '#required' => TRUE, + ]; + + return $elements; + } + + /** + * {@inheritdoc} + */ + public function settingsSummary() { + return [ + $this->t('Width: @width', [ + '@width' => $this->getSetting('width'), + ]), + $this->t('Height: @height', [ + '@height' => $this->getSetting('height'), + ]), + ]; + } + + /** + * {@inheritdoc} + */ + public function viewElements(FieldItemListInterface $items, $langcode) { + /** @var \Drupal\media\MediaInterface $media */ + $media = $items->getEntity(); + + $element = []; + if (($source = $media->getSource()) && $source instanceof PowerBi) { + /** @var \Drupal\Core\Field\Plugin\Field\FieldType\StringItem $item */ + foreach ($items as $delta => $item) { + if ($url = $item->value) { + $element[$delta] = [ + '#theme' => 'media_power_bi', + '#url' => $url, + '#device' => $items->getName() === "field_media_power_bi_mobile" ? "mobile" : "desktop", + '#width' => $this->getSetting('width'), + '#height' => $this->getSetting('height'), + ]; + } + } + } + return $element; + } + + /** + * {@inheritdoc} + */ + public static function isApplicable(FieldDefinitionInterface $field_definition) { + return $field_definition->getTargetEntityTypeId() === 'media'; + } + +} diff --git a/web/modules/custom/sfgov_media/src/Plugin/Validation/Constraint/PowerBiUrlConstraint.php b/web/modules/custom/sfgov_media/src/Plugin/Validation/Constraint/PowerBiUrlConstraint.php new file mode 100644 index 0000000000..d9f1df8892 --- /dev/null +++ b/web/modules/custom/sfgov_media/src/Plugin/Validation/Constraint/PowerBiUrlConstraint.php @@ -0,0 +1,22 @@ + + * + * @Constraint( + * id = "PowerBiUrl", + * label = @Translation("Power BI URL", context = "Validation"), + * ) + */ +class PowerBiUrlConstraint extends Constraint { + + /** + * {@inheritdoc} + */ + public $incorrectDurationFormat = 'The Power BI embed URL is invalid. The URL must start with "https://app.powerbigov.us/view".'; + +} diff --git a/web/modules/custom/sfgov_media/src/Plugin/Validation/Constraint/PowerBiUrlConstraintValidator.php b/web/modules/custom/sfgov_media/src/Plugin/Validation/Constraint/PowerBiUrlConstraintValidator.php new file mode 100644 index 0000000000..403f8ac338 --- /dev/null +++ b/web/modules/custom/sfgov_media/src/Plugin/Validation/Constraint/PowerBiUrlConstraintValidator.php @@ -0,0 +1,24 @@ +first(); + + // Validate URL. + if ($item && strpos($item->value, 'https://app.powerbigov.us/view?r=') !== 0) { + $this->context->addViolation($constraint->incorrectDurationFormat); + } + } +} diff --git a/web/modules/custom/sfgov_media/src/Plugin/media/Source/PowerBi.php b/web/modules/custom/sfgov_media/src/Plugin/media/Source/PowerBi.php new file mode 100644 index 0000000000..34a61d0ddb --- /dev/null +++ b/web/modules/custom/sfgov_media/src/Plugin/media/Source/PowerBi.php @@ -0,0 +1,72 @@ + $this->t('The embed URL'), + ]; + } + + /** + * {@inheritdoc} + */ + public function getMetadata(MediaInterface $media, $attribute_name) { + $embed_url = $this->getMediaUrl($media); + + if (!$embed_url) { + return []; + } + + switch ($attribute_name) { + case 'embed_url': + return $embed_url; + } + + return parent::getMetadata($media, $attribute_name); + } + + /** + * Returns the embed url from the source_url_field. + * + * @param \Drupal\media\MediaInterface $media + * The media entity. + * + * @return string|bool + * The embed url from the source_url_field if found. False otherwise. + */ + protected function getMediaUrl(MediaInterface $media) { + /** @var \Drupal\media\MediaTypeInterface $media_type */ + $media_type = $this->entityTypeManager + ->getStorage('media_type') + ->load($media->bundle()); + $source_field = $this->getSourceFieldDefinition($media_type); + $field_name = $source_field->getName(); + + if (!$media->hasField($field_name)) { + return FALSE; + } + + $property_name = $source_field->getFieldStorageDefinition()->getMainPropertyName(); + return $media->{$field_name}->{$property_name}; + } + +} diff --git a/web/modules/custom/sfgov_media/templates/media-power-bi.html.twig b/web/modules/custom/sfgov_media/templates/media-power-bi.html.twig new file mode 100644 index 0000000000..8b65b5f8f4 --- /dev/null +++ b/web/modules/custom/sfgov_media/templates/media-power-bi.html.twig @@ -0,0 +1,17 @@ +{# +/** + * @file + * Default theme implementation to embed a Power BI chart. + * + * Available variables: + * - width: The width of the iframe. + * - height: The height of the iframe. + * + * @ingroup themeable + */ +#} +{{ attach_library("sfgov_media/power_bi") }} +{% set padding = device == "desktop" ? "100%" : "225%" %} +
+ +
diff --git a/web/modules/custom/sfgov_media/tests/src/Functional/PowerBiEmbedFormatterTest.php b/web/modules/custom/sfgov_media/tests/src/Functional/PowerBiEmbedFormatterTest.php new file mode 100644 index 0000000000..60e5867e9b --- /dev/null +++ b/web/modules/custom/sfgov_media/tests/src/Functional/PowerBiEmbedFormatterTest.php @@ -0,0 +1,101 @@ +config('media.settings')->set('standalone_url', TRUE)->save(); + $this->refreshVariables(); + + \Drupal::service('router.builder')->rebuild(); + + $account = $this->drupalCreateUser([ + 'view media', + 'create media', + 'update media', + 'update any media', + 'delete media', + 'delete any media', + ]); + + $this->drupalLogin($account); + } + + /** + * Tests adding and editing a power_bi embed formatter. + */ + public function testPowerBiEmbedFormatter() { + /** @var \Drupal\Core\Entity\EntityDisplayRepositoryInterface */ + $entity_display_repository = \Drupal::service('entity_display.repository'); + + $media_type = $this->createMediaType('power_bi', ['id' => 'power_bi']); + + $source_field = $media_type->getSource()->getSourceFieldDefinition($media_type); + $this->assertSame('field_media_power_bi', $source_field->getName()); + $this->assertSame('string', $source_field->getType()); + + // Set form and view displays. + $entity_display_repository->getFormDisplay('media', $media_type->id(), 'default') + ->setComponent('field_media_power_bi', [ + 'type' => 'string_textfield', + ]) + ->save(); + + $entity_display_repository->getViewDisplay('media', $media_type->id(), 'full') + ->setComponent('field_media_power_bi', [ + 'type' => 'power_bi', + ]) + ->save(); + + $this->drupalGet('media/add/' . $media_type->id()); + $page = $this->getSession()->getPage(); + $page->fillField('name[0][value]', 'Power BI'); + $page->fillField('field_media_power_bi[0][value]', 'https://app.powerbigov.us/view?r=eyJrIjoiYWVlMDcyZjgtNGYzYS00NGE5LWE3ZmItMmI5M2E2NWM3MGEzIiwidCI6IjIyZDVjMmNmLWNlM2UtNDQzZC05YTdmLWRmY2MwMjMxZjczZiJ9&pageName=ReportSectionb342c47c7c4068d220e'); + $page->pressButton('Save'); + $assert = $this->assertSession(); + $assert->pageTextContains('has been created'); + $medias = \Drupal::entityTypeManager()->getStorage('media')->loadByProperties([ + 'name' => 'Power BI', + ]); + + /** @var \Drupal\media\MediaInterface */ + $media = reset($medias); + $this->drupalGet(Url::fromRoute('entity.media.canonical', ['media' => $media->id()])->toString()); + $assert->statusCodeEquals(200); + + // Assert that the formatter exists on this page. + $assert->elementExists('css', 'iframe[src*="powerbigov"]'); + } + +} diff --git a/web/modules/custom/sfgov_qless/src/Services/QLess.php b/web/modules/custom/sfgov_qless/src/Services/QLess.php index 2a45b97519..5252d2c614 100644 --- a/web/modules/custom/sfgov_qless/src/Services/QLess.php +++ b/web/modules/custom/sfgov_qless/src/Services/QLess.php @@ -222,7 +222,7 @@ public function renderTable() { $queues = $json['data']['queues']; $rows = []; - $queues_to_display = ['1069', '1068', '2510', '1077', '1081']; + $queues_to_display = ['1069', '2510', '1077', '1076', '1079', '1080', '1081', '1085', '1087', '1068']; // Filter out the queues we want and display them in order. foreach ($queues_to_display as $index => $queue_id) { diff --git a/web/modules/custom/sfgov_video/src/VideoService.php b/web/modules/custom/sfgov_video/src/VideoService.php index 58689f4569..1e66f59bf5 100644 --- a/web/modules/custom/sfgov_video/src/VideoService.php +++ b/web/modules/custom/sfgov_video/src/VideoService.php @@ -106,7 +106,7 @@ public function getYoutubeTranscript($video_id, $languageCode = 'en') { * @throws \GuzzleHttp\Exception\GuzzleException */ public function getYoutubeMetadata($video_id, $languageCode = 'en') { - $video_info_url = "https://www.youtube.com/get_video_info?&video_id=" . $video_id; + $video_info_url = "https://www.youtube.com/get_video_info?video_id=" . $video_id . "&html5=1"; $request = $this->httpClient->request('GET', $video_info_url); $contents = $request->getBody()->getContents(); diff --git a/web/themes/custom/sfgovpl/includes/node.inc b/web/themes/custom/sfgovpl/includes/node.inc index 1efda25386..4a9503a71d 100644 --- a/web/themes/custom/sfgovpl/includes/node.inc +++ b/web/themes/custom/sfgovpl/includes/node.inc @@ -126,6 +126,27 @@ function sfgovpl_preprocess_node__meeting__teaser(&$variables) { } } +/** + * Implements hook_preprocess_node(). + */ +function sfgovpl_preprocess_node__data_story(&$variables) { + /** @var \Drupal\node\NodeInterface $node */ + $node = $variables['node']; + /** @var \Drupal\paragraphs\ParagraphInterface[] $sections */ + $sections = $node->get('field_content')->referencedEntities(); + + $variables['sections'] = []; + if (!count($sections)) { + return; + } + + foreach ($sections as $section) { + if ($title = $section->get('field_title')->value) { + $variables['sections'][] = ['title' => $title]; + } + } +} + /** * Retrieve the transaction ids in field_department_services that will be * excluded from "more services" section on topic page send the list of ids to a diff --git a/web/themes/custom/sfgovpl/includes/paragraph.inc b/web/themes/custom/sfgovpl/includes/paragraph.inc index c2db72ec52..2252af80be 100644 --- a/web/themes/custom/sfgovpl/includes/paragraph.inc +++ b/web/themes/custom/sfgovpl/includes/paragraph.inc @@ -189,3 +189,41 @@ function sfgovpl_preprocess_paragraph__section(&$variables) { $variables['content']['field_content'][$key]['#view_mode'] = 'resource_collection_multiple'; } } + +/** + * Implements hook_preprocess_paragraph(). + */ +function sfgovpl_preprocess_paragraph__powerbi_embed(&$variables) { + /** @var \Drupal\paragraphs\ParagraphInterface $paragraph */ + $paragraph = $variables['paragraph']; + + // Format data source link. + if ($data_source = $paragraph->get('field_source_data')->value) { + $variables['content']['field_source_data'] = [ + '#type' => 'inline_template', + '#weight' => -10, + '#template' => '

{{ "View source data"}}

', + "#context" => [ + 'url' => $data_source, + ], + ]; + } + + if ($paragraph->get('field_data_notes')->value && !isset($variables['content']['field_data_notes']['#link_embedded'])) { + $variables['content']['field_data_notes'][0] = [ + $variables['content']['field_source_data'], + $variables['content']['field_data_notes'][0], + ]; + $variables['content']['field_data_notes']['#link_embedded'] = TRUE; + } + + // Calculate aspect ratios. + $variables['charts'] = []; + foreach (['desktop', 'mobile'] as $device) { + $variables['charts'][$device]['embed_url'] = $paragraph->get("field_{$device}_embed_url")->value; + $variables['charts'][$device]['padding_top'] = '100%'; + if (($device_width = $paragraph->get("field_{$device}_width")->value) && ($device_height = $paragraph->get("field_{$device}_height")->value)) { + $variables['charts'][$device]['padding_top'] = ((int) $device_height / (int) $device_width) * 100; + } + } +} diff --git a/web/themes/custom/sfgovpl/sfgovpl.libraries.yml b/web/themes/custom/sfgovpl/sfgovpl.libraries.yml index 4d86126c4e..7d50158300 100755 --- a/web/themes/custom/sfgovpl/sfgovpl.libraries.yml +++ b/web/themes/custom/sfgovpl/sfgovpl.libraries.yml @@ -127,3 +127,19 @@ filters: dependencies: - core/jquery - core/jquery.once + +sfgov-powerbi: + js: + dist/js/powerbi.js: {} + https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.2.2/lazysizes.min.js: { external: true } + dependencies: + - core/jquery + - core/drupal + +sfgov-data-story: + js: + src/js/data-story.js: {} + dependencies: + - core/jquery + - core/jquery.once + - core/drupal diff --git a/web/themes/custom/sfgovpl/src/js/data-story.js b/web/themes/custom/sfgovpl/src/js/data-story.js new file mode 100644 index 0000000000..8583c994b3 --- /dev/null +++ b/web/themes/custom/sfgovpl/src/js/data-story.js @@ -0,0 +1,126 @@ +(function($, Drupal, drupalSettings) { + 'use strict'; + + Drupal.behaviors.dataStory = { + attach: function(context, settings) { + const $toc = $('.sfgov-toc', context) + const $sticky = $toc.find('.sfgov-toc-sticky') + + if (!$toc.length) { + return; + } + + const $closeButton = $toc.find("button.sfgov-toc-close-button"); + const $expandButton = $toc.find("button.sfgov-toc-expand-button"); + + $expandButton.on("click", function () { + $toc.addClass("toc-expanded") + $closeButton.focus(); + }); + + $closeButton.on("click", function () { + $toc.removeClass("toc-expanded"); + $expandButton.focus(); + }) + + $(document, context).on('keyup', function (event) { + if (event.key === "Escape") { + if ($toc.hasClass('toc-expanded')) { + $toc.removeClass("toc-expanded"); + $expandButton.focus(); + } + } + }); + + $(window, context).on('load', function() { + var then = 0; + var now = 0; + $(window, context).once('scroll-toc').on('scroll', function() { + now = $(window, context).scrollTop(); + if (then > now && now > 700) { + $sticky.addClass('show'); + } + else { + $sticky.removeClass('show'); + } + then = now; + }); + }); + + const $anchors = $toc.find('a'); + const $content = $('.sfgov-section--content', context); + + const locationPath = filterPath(location.pathname); + $anchors.each(function () { + const thisPath = filterPath(this.pathname) || locationPath; + const hash = this.hash; + if ($("#" + hash.replace(/#/, '')).length) { + if (locationPath === thisPath && (location.hostname === this.hostname || !this.hostname) && this.hash.replace(/#/, '')) { + var $target = $(hash), target = this.hash; + if (target) { + $(this).click(function (event) { + event.preventDefault(); + $('html, body').animate({scrollTop: $target.offset().top}, 1000, function() { + location.hash = target; + $target.focus(); + if ($target.is(":focus")) { + return !1; + } else { + $target.attr('tabindex', '-1'); + $target.focus() + } + }) + }); + } + } + } + }) + + $anchors.on('click', function (event) { + if ($toc.hasClass('toc-expanded')) { + $toc.removeClass("toc-expanded"); + $expandButton.focus(); + } + }); + + function filterPath(string) { + return string + .replace(/^\//, '') + .replace(/(index|default).[a-zA-Z]{3,4}$/, '') + .replace(/\/$/, ''); + } + + function setActiveAnchor(id) { + $('.active-target').removeClass('active-target'); + $('.has-active-target').removeClass('has-active-target'); + $anchors.each(function () { + if ($(this).attr('href') === `#${id}`) { + $(this).addClass('active-target'); + $(this).parents('li').addClass('has-active-target'); + } + }) + } + + const observer = new IntersectionObserver( + (entries) => { + entries.forEach((entry) => { + if (entry.isIntersecting) { + setActiveAnchor(entry.target.id); + } + }) + }, + { rootMargin: `0% 0% -80% 0%` } + ); + + $anchors.each(function() { + const id = $(this).attr('href'); + const $target = $content.find(id); + if (!$target.length) { + return; + } + + observer.observe($target[0]) + }); + }, + }; +})(jQuery, Drupal, drupalSettings); diff --git a/web/themes/custom/sfgovpl/src/js/powerbi.js b/web/themes/custom/sfgovpl/src/js/powerbi.js new file mode 100644 index 0000000000..aa4077b51b --- /dev/null +++ b/web/themes/custom/sfgovpl/src/js/powerbi.js @@ -0,0 +1,37 @@ +(function ($, Drupal) { + Drupal.behaviors.powerBi = { + attach: function (context, settings) { + // Cache. + const $charts = $('[data-powerbi]', context); + + // Handle window resize. + toggleChart(); + $(window).on("resize", function () { + toggleChart(); + }) + + function toggleChart() { + const show_device = $(window).outerWidth() > 767 ? "desktop" : "mobile"; + + $charts.each(function () { + const $chart = $(this); + const $iframe = $chart.find('> iframe'); + const device = $chart.data().device + const src = $chart.data().src + + if (device === show_device) { + if (!$iframe.attr('src')) { + $iframe.attr('src', src); + } + + $chart.show(); + } + else { + $iframe.attr('src', ''); + $chart.hide(); + } + }) + } + } + }; +})(jQuery, Drupal); diff --git a/web/themes/custom/sfgovpl/src/sass/drupal.scss b/web/themes/custom/sfgovpl/src/sass/drupal.scss index ea8ea321f9..90fb941519 100644 --- a/web/themes/custom/sfgovpl/src/sass/drupal.scss +++ b/web/themes/custom/sfgovpl/src/sass/drupal.scss @@ -55,6 +55,7 @@ @import 'node/node-basic'; @import 'node/node-campaign'; +@import 'node/node-data-story'; @import 'node/node-dept'; @import 'node/node-dept-card'; @import 'node/node-department-table'; @@ -91,10 +92,12 @@ @import 'paragraphs/paragraph-content-link'; @import 'paragraphs/paragraph-department-content'; @import 'paragraphs/paragraph-people'; +@import 'paragraphs/paragraph-image'; @import 'paragraphs/paragraph-image-with-text'; @import 'paragraphs/paragraph-people-1mayor'; @import 'paragraphs/paragraph-people-2board'; @import 'paragraphs/paragraph-people-3elected'; +@import 'paragraphs/paragraph-powerbi-embed'; @import 'paragraphs/paragraph-services'; @import 'paragraphs/paragraph-call-to-action'; @import 'paragraphs/paragraph-process-step'; diff --git a/web/themes/custom/sfgovpl/src/sass/node/_node-data-story.scss b/web/themes/custom/sfgovpl/src/sass/node/_node-data-story.scss new file mode 100644 index 0000000000..b9bc342891 --- /dev/null +++ b/web/themes/custom/sfgovpl/src/sass/node/_node-data-story.scss @@ -0,0 +1,365 @@ +.page-node-type-data-story { + .hero-banner { + background-color: $c-slate; + color: $c-white; + + h1, + p, + a { + color: $c-white; + } + + h1 { + margin: 0; + } + } + + + .sfgov-section { + margin: 0; + + h4 { + @include fs-title-4; + } + + &--heading { + margin-bottom: 40px; + @include fs-title-1-mobile; + @include media($mobile-screen) { + @include fs-title-1; + margin-bottom: 60px; + } + } + } + + .image-with-text-content { + background-color: $c-slate; + + h5 { + margin-top: 0; + } + } + + .sfgov-header-section { + margin-top: 40px; + + @media screen and (min-width: $medium-screen) { + margin-top: 80px; + } + } + + .sfgov-section--content > .field__items > .field__item { + + &:first-child { + + .sfgov-header-section { + margin-top: 0; + } + } + } + + .group--left { + @include columns-720(left); + max-width: 700px !important; + + p { + @include fs-body-long; + } + + h2 { + @include fs-title-2; + + @media screen and (max-width: $mobile-screen) { + @include fs-title-2-mobile; + } + } + + h3 { + @include fs-title-4; + margin-top: 40px; + } + } + + .group--right { + @include columns-350(right); + margin-top: 40px; + + .sfgov-section { + background: $c-blue-1; + border-radius: 8px; + margin-bottom: 20px; + padding: 20px; + + &--heading { + margin: 0 0 20px 0; + } + } + + @include media($mobile-screen) { + margin-top: 0; + position: relative; + + .sfgov-section { + margin-bottom: 60px; + padding: 40px; + } + } + + @media screen and (min-width: $medium-screen) { + position: sticky; + top: 40px; + } + } + + .sfgov-section-container { + @include contain-1090; + padding-top: 40px; + padding-bottom: 40px; + + @include media($narrow-screen) { + padding-top: 60px; + padding-bottom: 60px; + } + } +} + +.sfgov-toc { + position: relative; + z-index: 10000; + + &-header { + background-color: $c-white; + display: flex; + align-items: center; + justify-content: space-between; + padding-left: $rhythm * 2; + @media screen and (min-width: $medium-screen) { + padding-left: $rhythm * 4; + display: none; + } + + .sfgov-toc-header-title { + @include fs-title-4; + color: $c-slate; + margin: 0; + } + } + + &-close-button { + @include background-image('x-close-white.svg', 50% 50%, $c-bright-blue); + width: 80px; + height: 80px; + display: flex; + align-items: center; + justify-content: center; + margin: 0; + border-radius: 0; + outline: none; + + &:hover, + &:focus { + background-color: $c-bright-blue; + border-color: $c-bright-blue; + } + } + + &-tree { + padding: $rhythm * 2; + @media screen and (min-width: $medium-screen) { + padding: $rhythm * 4; + } + + ol, ul { + margin: 0; + padding: 0; + list-style: none outside none; + + a { + line-height: 24px; + display: block; + max-width: 300px; + padding-left: 30px; + position: relative; + + @media screen and (min-width: $medium-screen) { + padding-left: 0; + } + + &.active-target { + color: $c-slate; + text-decoration: none; + font-weight: 500; + + &:before { + content: ""; + position: absolute; + width: 10px; + height: 10px; + background: $c-slate; + border-radius: 2px; + top: 7px; + left: 0; + + @media screen and (min-width: $medium-screen) { + display: none; + } + } + } + } + + li + li { + margin-top: 20px; + } + + li { + + &.has-active-target > a { + color: $c-slate; + text-decoration: none; + font-weight: 500; + } + + ol, ul { + margin-top: 20px; + padding-left: 20px; + display: none; + } + } + } + + hr { + border-width: 3px 0 0; + border-color: $c-grey-4; + border-style: solid; + margin: $rhythm * 4 0 $rhythm * 2; + display: none; + @media screen and (min-width: $medium-screen) { + display: block; + } + } + } + + &-expand-button { + display: flex; + align-items: center; + justify-content: center; + background-color: $c-slate; + color: $c-white; + margin: 0; + border: 0; + width: 100%; + height: 48px; + + @media screen and (min-width: $medium-screen) { + color: $c-bright-blue; + background-color: transparent; + justify-content: flex-start; + line-height: 1; + text-align: left; + } + + &:hover, + &:focus { + background-color: $c-slate; + color: $c-white; + + @media screen and (min-width: $medium-screen) { + color: $c-slate; + background-color: transparent; + } + } + } + + &.toc-expanded { + background-color: rgba($c-black, 0.25); + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + + .toolbar-horizontal & { + top: 39px; + } + + .toolbar-horizontal.toolbar-tray-open & { + top: 79px; + } + + .sfgov-toc-sticky { + opacity: 0; + + .sfgov-toc-tree { + display: none; + } + } + + .sfgov-toc-drawer { + right: 0; + } + } +} + +.sfgov-toc-sticky { + border-bottom: 3px solid $c-grey-3; + transition: opacity .5s, visibility .5s; + opacity: 0; + visibility: hidden; + position: fixed; + top: 0; + left: 0; + width: 100%; + background: $c-white; + padding: 16px 20px; + z-index: 1000; + + &.show { + opacity: 1; + visibility: visible; + } + + @media screen and (min-width: $medium-screen) { + display: none; + } +} + + +.sfgov-toc-drawer { + transition: all ease-in-out 0.25s; + position: fixed; + top: 0; + width: 100vw; + right: -100vw; + height: 100%; + z-index: 1000; + display: flex; + flex-direction: column; + background: $c-grey-1; + + @media screen and (min-width: $medium-screen) { + position: static; + width: auto; + border-radius: 8px; + } + + .toolbar-horizontal & { + top: 39px; + } + + .toolbar-horizontal.toolbar-tray-open & { + top: 79px; + } + + .sfgov-toc-tree { + flex: 1; + overflow-y: auto; + + @media screen and (min-width: $medium-screen) { + border-radius: 8px; + } + + > ol ol { + display: block; + } + } +} diff --git a/web/themes/custom/sfgovpl/src/sass/paragraphs/_paragraph-image.scss b/web/themes/custom/sfgovpl/src/sass/paragraphs/_paragraph-image.scss new file mode 100644 index 0000000000..d958e682b2 --- /dev/null +++ b/web/themes/custom/sfgovpl/src/sass/paragraphs/_paragraph-image.scss @@ -0,0 +1,7 @@ +.paragraph--type--image { + + .image img { + width: 100%; + vertical-align: bottom; + } +} diff --git a/web/themes/custom/sfgovpl/src/sass/paragraphs/_paragraph-powerbi-embed.scss b/web/themes/custom/sfgovpl/src/sass/paragraphs/_paragraph-powerbi-embed.scss new file mode 100644 index 0000000000..bee87ec8aa --- /dev/null +++ b/web/themes/custom/sfgovpl/src/sass/paragraphs/_paragraph-powerbi-embed.scss @@ -0,0 +1,22 @@ +.sfgov-powerbi-embed { + + iframe { + border: 0; + background: $c-grey-1; + } + + &__wrapper { + margin-left: -20px; + margin-right: -20px; + + @media screen and (min-width: $medium-screen) { + margin-left: 0; + margin-right: 0; + } + } + + details { + margin-top: 40px; + margin-bottom: 40px; + } +} diff --git a/web/themes/custom/sfgovpl/templates/node/node--data-story--full.html.twig b/web/themes/custom/sfgovpl/templates/node/node--data-story--full.html.twig new file mode 100644 index 0000000000..78ddb6f931 --- /dev/null +++ b/web/themes/custom/sfgovpl/templates/node/node--data-story--full.html.twig @@ -0,0 +1,55 @@ +{% extends 'node--full.html.twig' %} + +{% block header %} + {{ title_prefix }} + {% include '@theme/hero-banner-color.twig' with { + 'banner': { + 'label': node.field_part_of.value ? 'Part of @parent'|t({'@parent': node.field_part_of.entity.label(), '@url': path('entity.node.canonical', {node: node.field_part_of.entity.id() })}), + 'title': node.label, + 'text': content.field_description|render + } + } %} + {{ title_suffix }} +{% endblock %} + +{% block content %} +
+
+ {% if sections|length >= 2 %} + {{ attach_library("sfgovpl/sfgov-data-story") }} +
+
+ +
+ +
+
+

{{ "Sections"|t }}

+ +
+
+ +
+
+
+ {% endif %} +
+
+
+
+ {{ content.field_content }} +
+
+
+
+{% endblock %} diff --git a/web/themes/custom/sfgovpl/templates/paragraphs/paragraph--data-story-section.html.twig b/web/themes/custom/sfgovpl/templates/paragraphs/paragraph--data-story-section.html.twig new file mode 100644 index 0000000000..f6d7a78229 --- /dev/null +++ b/web/themes/custom/sfgovpl/templates/paragraphs/paragraph--data-story-section.html.twig @@ -0,0 +1,26 @@ +{% set parent = paragraph.getParentEntity() %} +{% set child = paragraph.field_content.entity.bundle %} +{% set classes = [ + 'paragraph', + 'paragraph--type--' ~ paragraph.bundle|clean_class, + view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class, + not paragraph.isPublished() ? 'paragraph--unpublished', + "parent--bundle--" ~ parent.bundle, + 'paragraph-child--' ~ child, + not paragraph.field_title.isEmpty ? 'paragraph--title--' ~ paragraph.field_title.getString|clean_class, +] %} + +{% block paragraph %} +
+ {% block content %} + {% if (not paragraph.field_title.isEmpty) %} + {% set title = paragraph.field_title.getString %} +

+ {{ title }} +

+ {% endif %} + + {{ content|without('field_title') }} + {% endblock %} +
+{% endblock paragraph %} diff --git a/web/themes/custom/sfgovpl/templates/paragraphs/paragraph--image.html.twig b/web/themes/custom/sfgovpl/templates/paragraphs/paragraph--image.html.twig new file mode 100644 index 0000000000..a7448e7c42 --- /dev/null +++ b/web/themes/custom/sfgovpl/templates/paragraphs/paragraph--image.html.twig @@ -0,0 +1,8 @@ +{% embed 'paragraph.html.twig' with { classes: ['image'] } %} + {% block content %} +
+ {{ content.field_image }} +
+ {% endblock %} +{% endembed %} + diff --git a/web/themes/custom/sfgovpl/templates/paragraphs/paragraph--powerbi-embed.html.twig b/web/themes/custom/sfgovpl/templates/paragraphs/paragraph--powerbi-embed.html.twig new file mode 100644 index 0000000000..f493a7e78b --- /dev/null +++ b/web/themes/custom/sfgovpl/templates/paragraphs/paragraph--powerbi-embed.html.twig @@ -0,0 +1,22 @@ +{% embed 'paragraph.html.twig' with { classes: ['sfgov-powerbi-embed'] } %} + {% block content %} + {{ attach_library("sfgovpl/sfgov-powerbi") }} + + {% for device, chart in charts %} + {% set adjust = device == 'mobile' ? '110px' : '0px' %} + + {% endfor %} + + {% if content.field_data_notes[0] %} + {% include '@theme/form-details.twig' with { + 'summary': "Data notes and sources"|t, + 'content': content.field_data_notes + } %} + {% else %} + {{ content.field_source_data }} + {% endif %} + {% endblock %} +{% endembed %}