diff --git a/composer.lock b/composer.lock index 2002529a..d70aac4a 100644 --- a/composer.lock +++ b/composer.lock @@ -3226,16 +3226,16 @@ }, { "name": "drupal/core", - "version": "10.3.9", + "version": "10.3.10", "source": { "type": "git", "url": "https://github.com/drupal/core.git", - "reference": "42a6516491b4793158542a2326dc6ad1fe2aa5bd" + "reference": "3ebb71e9c4ef0c13f683353547551fca49f9a144" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core/zipball/42a6516491b4793158542a2326dc6ad1fe2aa5bd", - "reference": "42a6516491b4793158542a2326dc6ad1fe2aa5bd", + "url": "https://api.github.com/repos/drupal/core/zipball/3ebb71e9c4ef0c13f683353547551fca49f9a144", + "reference": "3ebb71e9c4ef0c13f683353547551fca49f9a144", "shasum": "" }, "require": { @@ -3384,13 +3384,13 @@ ], "description": "Drupal is an open source content management platform powering millions of websites and applications.", "support": { - "source": "https://github.com/drupal/core/tree/10.3.9" + "source": "https://github.com/drupal/core/tree/10.3.10" }, - "time": "2024-11-20T17:59:45+00:00" + "time": "2024-11-22T12:51:33+00:00" }, { "name": "drupal/core-composer-scaffold", - "version": "10.3.9", + "version": "10.3.10", "source": { "type": "git", "url": "https://github.com/drupal/core-composer-scaffold.git", @@ -3434,13 +3434,13 @@ "drupal" ], "support": { - "source": "https://github.com/drupal/core-composer-scaffold/tree/10.3.9" + "source": "https://github.com/drupal/core-composer-scaffold/tree/10.3.10" }, "time": "2024-08-22T14:31:34+00:00" }, { "name": "drupal/core-dev", - "version": "10.3.9", + "version": "10.3.10", "source": { "type": "git", "url": "https://github.com/drupal/core-dev.git", @@ -3490,13 +3490,13 @@ ], "description": "require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.", "support": { - "source": "https://github.com/drupal/core-dev/tree/10.3.9" + "source": "https://github.com/drupal/core-dev/tree/10.3.10" }, "time": "2024-07-04T10:19:29+00:00" }, { "name": "drupal/core-project-message", - "version": "10.3.9", + "version": "10.3.10", "source": { "type": "git", "url": "https://github.com/drupal/core-project-message.git", @@ -3537,16 +3537,16 @@ }, { "name": "drupal/core-recommended", - "version": "10.3.9", + "version": "10.3.10", "source": { "type": "git", "url": "https://github.com/drupal/core-recommended.git", - "reference": "03da2860a10c12b86714e778178433b620bb890d" + "reference": "1d739e569c9324bcac1ecc7be600d414386a399b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core-recommended/zipball/03da2860a10c12b86714e778178433b620bb890d", - "reference": "03da2860a10c12b86714e778178433b620bb890d", + "url": "https://api.github.com/repos/drupal/core-recommended/zipball/1d739e569c9324bcac1ecc7be600d414386a399b", + "reference": "1d739e569c9324bcac1ecc7be600d414386a399b", "shasum": "" }, "require": { @@ -3555,7 +3555,7 @@ "doctrine/annotations": "~1.14.3", "doctrine/deprecations": "~1.1.3", "doctrine/lexer": "~2.1.1", - "drupal/core": "10.3.9", + "drupal/core": "10.3.10", "egulias/email-validator": "~4.0.2", "guzzlehttp/guzzle": "~7.8.1", "guzzlehttp/promises": "~2.0.2", @@ -3616,9 +3616,9 @@ ], "description": "Core and its dependencies with known-compatible minor versions. Require this project INSTEAD OF drupal/core.", "support": { - "source": "https://github.com/drupal/core-recommended/tree/10.3.9" + "source": "https://github.com/drupal/core-recommended/tree/10.3.10" }, - "time": "2024-11-20T17:59:45+00:00" + "time": "2024-11-22T12:51:33+00:00" }, { "name": "drupal/csp", @@ -6026,27 +6026,27 @@ }, { "name": "drupal/replicate_ui", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/replicate_ui.git", - "reference": "8.x-1.1" + "reference": "8.x-1.2" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/replicate_ui-8.x-1.1.zip", - "reference": "8.x-1.1", - "shasum": "fade816b12a76df62621c363264e18ae17ee99e2" + "url": "https://ftp.drupal.org/files/projects/replicate_ui-8.x-1.2.zip", + "reference": "8.x-1.2", + "shasum": "b9eed2578e341a844370e5ab4542950bf150f0d5" }, "require": { - "drupal/core": "^9 || ^10", + "drupal/core": "^10.1 || ^11", "drupal/replicate": "^1.0" }, "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.1", - "datestamp": "1679704077", + "version": "8.x-1.2", + "datestamp": "1732358026", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -6059,7 +6059,7 @@ ], "authors": [ { - "name": "Berdir", + "name": "berdir", "homepage": "https://www.drupal.org/user/214652" }, { @@ -8455,16 +8455,16 @@ }, { "name": "mglaman/composer-drupal-lenient", - "version": "1.0.6", + "version": "1.0.7", "source": { "type": "git", "url": "https://github.com/mglaman/composer-drupal-lenient.git", - "reference": "78aa8780daa200d1e0bb427e2e0628c4e807c6de" + "reference": "bcb9be7f2d3160be43cd1d13a44580734a5afee0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mglaman/composer-drupal-lenient/zipball/78aa8780daa200d1e0bb427e2e0628c4e807c6de", - "reference": "78aa8780daa200d1e0bb427e2e0628c4e807c6de", + "url": "https://api.github.com/repos/mglaman/composer-drupal-lenient/zipball/bcb9be7f2d3160be43cd1d13a44580734a5afee0", + "reference": "bcb9be7f2d3160be43cd1d13a44580734a5afee0", "shasum": "" }, "require": { @@ -8501,7 +8501,7 @@ ], "support": { "issues": "https://github.com/mglaman/composer-drupal-lenient/issues", - "source": "https://github.com/mglaman/composer-drupal-lenient/tree/1.0.6" + "source": "https://github.com/mglaman/composer-drupal-lenient/tree/1.0.7" }, "funding": [ { @@ -8509,7 +8509,7 @@ "type": "github" } ], - "time": "2024-11-02T00:48:53+00:00" + "time": "2024-11-21T15:59:26+00:00" }, { "name": "mglaman/phpstan-drupal", @@ -9577,16 +9577,16 @@ }, { "name": "pear/pear-core-minimal", - "version": "v1.10.15", + "version": "v1.10.16", "source": { "type": "git", "url": "https://github.com/pear/pear-core-minimal.git", - "reference": "ce0adade8b97561656ace07cdaac4751c271ea8c" + "reference": "c0f51b45f50683bf5bbf558036854ebc9b54d033" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/ce0adade8b97561656ace07cdaac4751c271ea8c", - "reference": "ce0adade8b97561656ace07cdaac4751c271ea8c", + "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/c0f51b45f50683bf5bbf558036854ebc9b54d033", + "reference": "c0f51b45f50683bf5bbf558036854ebc9b54d033", "shasum": "" }, "require": { @@ -9622,7 +9622,7 @@ "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR", "source": "https://github.com/pear/pear-core-minimal" }, - "time": "2024-03-16T18:41:45+00:00" + "time": "2024-11-24T22:27:58+00:00" }, { "name": "pear/pear_exception", @@ -10332,16 +10332,16 @@ }, { "name": "phpoffice/phpspreadsheet", - "version": "1.29.4", + "version": "1.29.5", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "7ca7e325dca3adb6a598385aab81f527b8d6c75d" + "reference": "727cb704d5479fe4ddc291497ee471c4ec08f1b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/7ca7e325dca3adb6a598385aab81f527b8d6c75d", - "reference": "7ca7e325dca3adb6a598385aab81f527b8d6c75d", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/727cb704d5479fe4ddc291497ee471c4ec08f1b6", + "reference": "727cb704d5479fe4ddc291497ee471c4ec08f1b6", "shasum": "" }, "require": { @@ -10431,9 +10431,9 @@ ], "support": { "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", - "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.4" + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.5" }, - "time": "2024-11-10T16:26:22+00:00" + "time": "2024-11-22T05:57:44+00:00" }, { "name": "phpowermove/docblock", diff --git a/config/core.entity_form_display.paragraph.achievement_list.default.yml b/config/core.entity_form_display.paragraph.achievement_list.default.yml index 8db8ca96..e4c6d753 100755 --- a/config/core.entity_form_display.paragraph.achievement_list.default.yml +++ b/config/core.entity_form_display.paragraph.achievement_list.default.yml @@ -122,10 +122,6 @@ content: settings: display_label: true third_party_settings: { } - translation: - weight: 3 - region: content - settings: { } - third_party_settings: { } hidden: created: true + translation: true diff --git a/config/core.entity_form_display.paragraph.facts_and_figures.default.yml b/config/core.entity_form_display.paragraph.facts_and_figures.default.yml index b136b1da..f8deed64 100755 --- a/config/core.entity_form_display.paragraph.facts_and_figures.default.yml +++ b/config/core.entity_form_display.paragraph.facts_and_figures.default.yml @@ -3,6 +3,7 @@ langcode: en status: true dependencies: config: + - field.field.paragraph.facts_and_figures.field_columns - field.field.paragraph.facts_and_figures.field_paragraphs - field.field.paragraph.facts_and_figures.field_title - paragraphs.paragraphs_type.facts_and_figures @@ -14,6 +15,7 @@ third_party_settings: group_tabs: children: - group_facts_and_figures + - group_settings label: Tabs region: content parent_name: '' @@ -41,11 +43,34 @@ third_party_settings: formatter: open description: '' required_fields: true + group_settings: + children: + - field_columns + label: Settings + region: content + parent_name: group_tabs + weight: 7 + format_type: tab + format_settings: + classes: '' + show_empty_fields: false + id: '' + label_as_html: false + formatter: closed + description: '' + required_fields: true id: paragraph.facts_and_figures.default targetEntityType: paragraph bundle: facts_and_figures mode: default content: + field_columns: + type: number + weight: 2 + region: content + settings: + placeholder: '' + third_party_settings: { } field_paragraphs: type: paragraphs weight: 2 @@ -76,7 +101,7 @@ content: third_party_settings: { } status: type: boolean_checkbox - weight: 3 + weight: 2 region: content settings: display_label: true diff --git a/config/core.entity_form_display.paragraph.image_with_text.default.yml b/config/core.entity_form_display.paragraph.image_with_text.default.yml index eecbd6ae..90a8087f 100755 --- a/config/core.entity_form_display.paragraph.image_with_text.default.yml +++ b/config/core.entity_form_display.paragraph.image_with_text.default.yml @@ -3,6 +3,7 @@ langcode: en status: true dependencies: config: + - field.field.paragraph.image_with_text.field_footnotes - field.field.paragraph.image_with_text.field_image - field.field.paragraph.image_with_text.field_text - paragraphs.paragraphs_type.image_with_text @@ -15,6 +16,17 @@ targetEntityType: paragraph bundle: image_with_text mode: default content: + field_footnotes: + type: text_textarea + weight: 2 + region: content + settings: + rows: 5 + placeholder: '' + third_party_settings: + allowed_formats: + hide_help: '1' + hide_guidelines: '1' field_image: type: media_library_widget weight: 0 @@ -35,7 +47,7 @@ content: hide_guidelines: '1' status: type: boolean_checkbox - weight: 2 + weight: 3 region: content settings: display_label: true diff --git a/config/core.entity_view_display.paragraph.facts_and_figures.default.yml b/config/core.entity_view_display.paragraph.facts_and_figures.default.yml index 9e4ab302..4d691b0a 100755 --- a/config/core.entity_view_display.paragraph.facts_and_figures.default.yml +++ b/config/core.entity_view_display.paragraph.facts_and_figures.default.yml @@ -3,6 +3,7 @@ langcode: en status: true dependencies: config: + - field.field.paragraph.facts_and_figures.field_columns - field.field.paragraph.facts_and_figures.field_paragraphs - field.field.paragraph.facts_and_figures.field_title - paragraphs.paragraphs_type.facts_and_figures @@ -20,7 +21,7 @@ content: view_mode: facts_and_figures link: '' third_party_settings: { } - weight: 2 + weight: 1 region: content field_title: type: string @@ -30,4 +31,5 @@ content: third_party_settings: { } weight: 0 region: content -hidden: { } +hidden: + field_columns: true diff --git a/config/core.entity_view_display.paragraph.facts_and_figures.single_column.yml b/config/core.entity_view_display.paragraph.facts_and_figures.single_column.yml index 432f93f3..fcdaad44 100755 --- a/config/core.entity_view_display.paragraph.facts_and_figures.single_column.yml +++ b/config/core.entity_view_display.paragraph.facts_and_figures.single_column.yml @@ -4,6 +4,7 @@ status: false dependencies: config: - core.entity_view_mode.paragraph.single_column + - field.field.paragraph.facts_and_figures.field_columns - field.field.paragraph.facts_and_figures.field_paragraphs - field.field.paragraph.facts_and_figures.field_title - paragraphs.paragraphs_type.facts_and_figures @@ -36,4 +37,5 @@ content: third_party_settings: { } weight: 0 region: content -hidden: { } +hidden: + field_columns: true diff --git a/config/core.entity_view_display.paragraph.facts_and_figures.three_columns.yml b/config/core.entity_view_display.paragraph.facts_and_figures.three_columns.yml index c8c10d34..686e5669 100755 --- a/config/core.entity_view_display.paragraph.facts_and_figures.three_columns.yml +++ b/config/core.entity_view_display.paragraph.facts_and_figures.three_columns.yml @@ -4,6 +4,7 @@ status: false dependencies: config: - core.entity_view_mode.paragraph.three_columns + - field.field.paragraph.facts_and_figures.field_columns - field.field.paragraph.facts_and_figures.field_paragraphs - field.field.paragraph.facts_and_figures.field_title - paragraphs.paragraphs_type.facts_and_figures @@ -36,4 +37,5 @@ content: third_party_settings: { } weight: 0 region: content -hidden: { } +hidden: + field_columns: true diff --git a/config/core.entity_view_display.paragraph.facts_and_figures.two_columns.yml b/config/core.entity_view_display.paragraph.facts_and_figures.two_columns.yml index f68a70ce..7e093757 100755 --- a/config/core.entity_view_display.paragraph.facts_and_figures.two_columns.yml +++ b/config/core.entity_view_display.paragraph.facts_and_figures.two_columns.yml @@ -4,6 +4,7 @@ status: false dependencies: config: - core.entity_view_mode.paragraph.two_columns + - field.field.paragraph.facts_and_figures.field_columns - field.field.paragraph.facts_and_figures.field_paragraphs - field.field.paragraph.facts_and_figures.field_title - paragraphs.paragraphs_type.facts_and_figures @@ -36,4 +37,5 @@ content: third_party_settings: { } weight: 0 region: content -hidden: { } +hidden: + field_columns: true diff --git a/config/core.entity_view_display.paragraph.image_with_text.default.yml b/config/core.entity_view_display.paragraph.image_with_text.default.yml index 4b793163..ea4124f7 100755 --- a/config/core.entity_view_display.paragraph.image_with_text.default.yml +++ b/config/core.entity_view_display.paragraph.image_with_text.default.yml @@ -3,6 +3,7 @@ langcode: en status: true dependencies: config: + - field.field.paragraph.image_with_text.field_footnotes - field.field.paragraph.image_with_text.field_image - field.field.paragraph.image_with_text.field_text - paragraphs.paragraphs_type.image_with_text @@ -29,4 +30,5 @@ content: third_party_settings: { } weight: 1 region: content -hidden: { } +hidden: + field_footnotes: true diff --git a/config/core.entity_view_display.paragraph.image_with_text.facts_and_figures.yml b/config/core.entity_view_display.paragraph.image_with_text.facts_and_figures.yml index 21cf7d7f..9efbad8e 100755 --- a/config/core.entity_view_display.paragraph.image_with_text.facts_and_figures.yml +++ b/config/core.entity_view_display.paragraph.image_with_text.facts_and_figures.yml @@ -4,6 +4,7 @@ status: true dependencies: config: - core.entity_view_mode.paragraph.facts_and_figures + - field.field.paragraph.image_with_text.field_footnotes - field.field.paragraph.image_with_text.field_image - field.field.paragraph.image_with_text.field_text - paragraphs.paragraphs_type.image_with_text @@ -19,6 +20,13 @@ targetEntityType: paragraph bundle: image_with_text mode: facts_and_figures content: + field_footnotes: + type: text_default + label: above + settings: { } + third_party_settings: { } + weight: 2 + region: content field_image: type: entity_reference_entity_view label: hidden @@ -26,13 +34,13 @@ content: view_mode: facts_and_figures link: false third_party_settings: { } - weight: 2 + weight: 0 region: content field_text: type: text_default label: hidden settings: { } third_party_settings: { } - weight: 3 + weight: 1 region: content hidden: { } diff --git a/config/core.entity_view_display.paragraph.image_with_text.preview.yml b/config/core.entity_view_display.paragraph.image_with_text.preview.yml new file mode 100644 index 00000000..44e335f5 --- /dev/null +++ b/config/core.entity_view_display.paragraph.image_with_text.preview.yml @@ -0,0 +1,19 @@ +uuid: 7079aa40-74b7-44d9-b6d7-a738727d77e2 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.paragraph.preview + - field.field.paragraph.image_with_text.field_footnotes + - field.field.paragraph.image_with_text.field_image + - field.field.paragraph.image_with_text.field_text + - paragraphs.paragraphs_type.image_with_text +id: paragraph.image_with_text.preview +targetEntityType: paragraph +bundle: image_with_text +mode: preview +content: { } +hidden: + field_footnotes: true + field_image: true + field_text: true diff --git a/config/field.field.paragraph.facts_and_figures.field_columns.yml b/config/field.field.paragraph.facts_and_figures.field_columns.yml new file mode 100644 index 00000000..e55cfc5f --- /dev/null +++ b/config/field.field.paragraph.facts_and_figures.field_columns.yml @@ -0,0 +1,34 @@ +uuid: 5cb467cf-1409-4c42-a66e-6df6a9da1b1f +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_columns + - paragraphs.paragraphs_type.facts_and_figures + module: + - field_config_cardinality +third_party_settings: + field_config_cardinality: + cardinality_config: '1' + cardinality_label_config: false + unlimited_not_required: '' + limited_not_required: '' + limited_required: '' +id: paragraph.facts_and_figures.field_columns +field_name: field_columns +entity_type: paragraph +bundle: facts_and_figures +label: Columns +description: 'Set the number of columns for the display of the achievement list.' +required: false +translatable: true +default_value: + - + value: 3 +default_value_callback: '' +settings: + min: 1 + max: 3 + prefix: '' + suffix: '' +field_type: integer diff --git a/config/field.field.paragraph.facts_and_figures.field_paragraphs.yml b/config/field.field.paragraph.facts_and_figures.field_paragraphs.yml index 37260ee1..b1c0dbab 100755 --- a/config/field.field.paragraph.facts_and_figures.field_paragraphs.yml +++ b/config/field.field.paragraph.facts_and_figures.field_paragraphs.yml @@ -8,6 +8,14 @@ dependencies: - paragraphs.paragraphs_type.image_with_text module: - entity_reference_revisions + - field_config_cardinality +third_party_settings: + field_config_cardinality: + cardinality_config: '-1' + cardinality_label_config: false + unlimited_not_required: '' + limited_not_required: '' + limited_required: '' id: paragraph.facts_and_figures.field_paragraphs field_name: field_paragraphs entity_type: paragraph @@ -15,7 +23,7 @@ bundle: facts_and_figures label: 'Facts and figures' description: '' required: true -translatable: false +translatable: true default_value: { } default_value_callback: '' settings: @@ -25,28 +33,70 @@ settings: image_with_text: image_with_text negate: 0 target_bundles_drag_drop: + achievement: + weight: 23 + enabled: false + achievement_list: + weight: 24 + enabled: false + article_card_list: + weight: 25 + enabled: false + article_list: + weight: 26 + enabled: false + bottom_figure_row: + weight: 27 + enabled: false + document_articles: + weight: 28 + enabled: false + document_chapter: + weight: 29 + enabled: false + download_button: + weight: 30 + enabled: false facts_and_figures: weight: 9 enabled: false - image: - weight: 10 + further_reading: + weight: 32 enabled: false - image_link: - weight: 11 + heading: + weight: 33 enabled: false image_with_text: weight: 12 enabled: true - layout: - weight: 13 + infographic: + weight: 35 + enabled: false + interactive_content: + weight: 36 enabled: false - page_title: - weight: 14 + interactive_content_2_columns: + weight: 37 enabled: false photo_gallery: weight: 15 enabled: false + separator: + weight: 39 + enabled: false + story: + weight: 40 + enabled: false + sub_article: + weight: 41 + enabled: false text: weight: 16 enabled: false + top_figures: + weight: 43 + enabled: false + top_figures_small: + weight: 44 + enabled: false field_type: entity_reference_revisions diff --git a/config/field.field.paragraph.image_with_text.field_footnotes.yml b/config/field.field.paragraph.image_with_text.field_footnotes.yml new file mode 100644 index 00000000..4bfb073b --- /dev/null +++ b/config/field.field.paragraph.image_with_text.field_footnotes.yml @@ -0,0 +1,36 @@ +uuid: bb9c881b-bffe-4b1f-b4c0-b7ed1702dc2d +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_footnotes + - filter.format.footnotes + - paragraphs.paragraphs_type.image_with_text + module: + - allowed_formats + - field_config_cardinality + - text +third_party_settings: + allowed_formats: + allowed_formats: + - footnotes + field_config_cardinality: + cardinality_config: '1' + cardinality_label_config: false + unlimited_not_required: '' + limited_not_required: '' + limited_required: '' +id: paragraph.image_with_text.field_footnotes +field_name: field_footnotes +entity_type: paragraph +bundle: image_with_text +label: Footnotes +description: 'Enter one footnote per line. They can be referenced in the text field above via their number in the form [X] where X is the number of the footnote. Links to the footnotes will be generated automatically when rendered.' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + allowed_formats: + - footnotes +field_type: text_long diff --git a/config/field.field.paragraph.image_with_text.field_text.yml b/config/field.field.paragraph.image_with_text.field_text.yml index 9bc45aec..38353196 100755 --- a/config/field.field.paragraph.image_with_text.field_text.yml +++ b/config/field.field.paragraph.image_with_text.field_text.yml @@ -4,15 +4,26 @@ status: true dependencies: config: - field.storage.paragraph.field_text + - filter.format.filtered_html + - filter.format.limited_html + - filter.format.plain_text - paragraphs.paragraphs_type.image_with_text module: - allowed_formats + - field_config_cardinality - text third_party_settings: allowed_formats: - limited_html: limited_html - plain_text: '0' - filtered_html: '0' + allowed_formats: + - plain_text + - filtered_html + - limited_html + field_config_cardinality: + cardinality_config: '1' + cardinality_label_config: false + unlimited_not_required: '' + limited_not_required: '' + limited_required: '' id: paragraph.image_with_text.field_text field_name: field_text entity_type: paragraph @@ -23,5 +34,9 @@ required: true translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - plain_text + - filtered_html + - limited_html field_type: text_long diff --git a/config/field.field.paragraph.text.field_footnotes.yml b/config/field.field.paragraph.text.field_footnotes.yml index 26df27f2..8ce332a9 100755 --- a/config/field.field.paragraph.text.field_footnotes.yml +++ b/config/field.field.paragraph.text.field_footnotes.yml @@ -4,16 +4,22 @@ status: true dependencies: config: - field.storage.paragraph.field_footnotes + - filter.format.footnotes - paragraphs.paragraphs_type.text module: - allowed_formats + - field_config_cardinality - text third_party_settings: allowed_formats: - footnotes: footnotes - plain_text: '0' - filtered_html: '0' - limited_html: '0' + allowed_formats: + - footnotes + field_config_cardinality: + cardinality_config: '1' + cardinality_label_config: false + unlimited_not_required: '' + limited_not_required: '' + limited_required: '' id: paragraph.text.field_footnotes field_name: field_footnotes entity_type: paragraph @@ -24,5 +30,7 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - footnotes field_type: text_long diff --git a/config/field.field.paragraph.text.field_text.yml b/config/field.field.paragraph.text.field_text.yml index 3b406279..6f0f240c 100755 --- a/config/field.field.paragraph.text.field_text.yml +++ b/config/field.field.paragraph.text.field_text.yml @@ -4,16 +4,26 @@ status: true dependencies: config: - field.storage.paragraph.field_text + - filter.format.filtered_html + - filter.format.limited_html + - filter.format.plain_text - paragraphs.paragraphs_type.text module: - allowed_formats + - field_config_cardinality - text third_party_settings: allowed_formats: - limited_html: limited_html - plain_text: '0' - filtered_html: '0' - footnotes: '0' + allowed_formats: + - plain_text + - filtered_html + - limited_html + field_config_cardinality: + cardinality_config: '1' + cardinality_label_config: false + unlimited_not_required: '' + limited_not_required: '' + limited_required: '' id: paragraph.text.field_text field_name: field_text entity_type: paragraph @@ -24,5 +34,9 @@ required: true translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: + - plain_text + - filtered_html + - limited_html field_type: text_long diff --git a/html/modules/custom/gho_footnotes/gho_footnotes.module b/html/modules/custom/gho_footnotes/gho_footnotes.module index 4a111464..0027d897 100644 --- a/html/modules/custom/gho_footnotes/gho_footnotes.module +++ b/html/modules/custom/gho_footnotes/gho_footnotes.module @@ -6,8 +6,9 @@ */ use Drupal\Component\Utility\Html; -use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\FieldableEntityInterface; use Drupal\gho_footnotes\GhoFootnotes; /** @@ -51,6 +52,9 @@ function gho_footnotes_theme() { * Implements hook_node_view_alter(). */ function gho_footnotes_node_view_alter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) { + if (!empty($build['#skip_footnotes_processing'])) { + return; + } gho_footnotes_prepare_build($build, $entity); } @@ -58,7 +62,7 @@ function gho_footnotes_node_view_alter(array &$build, EntityInterface $entity, E * Implements hook_paragraph_view_alter(). */ function gho_footnotes_paragraph_view_alter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) { - if ($entity->bundle() === 'text') { + if ($entity instanceof FieldableEntityInterface && $entity->hasField('field_text') && $entity->hasField('field_footnotes')) { gho_footnotes_prepare_build($build, $entity); } } @@ -110,7 +114,16 @@ function gho_footnotes_prepare_build(array &$build, EntityInterface $entity) { } } - if ($build['#view_mode'] === 'preview' || $build['#view_mode'] === 'full') { + // On edit pages, we want to support different view modes, so that the + // footnotes appear rendered more or less correctly in the paragraph preview. + $is_edit_page = \Drupal::routeMatch()->getRouteName() == 'entity.node.edit_form'; + $full_view_modes = array_filter([ + 'preview', + 'full', + $is_edit_page ? 'default' : NULL, + $is_edit_page ? 'facts_and_figures' : NULL, + ]); + if (in_array($build['#view_mode'], $full_view_modes)) { // Create a footnote list placeholder. $build['footnotes'] = [ '#type' => 'inline_template', diff --git a/html/modules/custom/gho_footnotes/src/GhoFootnotes.php b/html/modules/custom/gho_footnotes/src/GhoFootnotes.php index c4765332..2e6c498b 100644 --- a/html/modules/custom/gho_footnotes/src/GhoFootnotes.php +++ b/html/modules/custom/gho_footnotes/src/GhoFootnotes.php @@ -25,8 +25,11 @@ public static function trustedCallbacks() { public static function updateFootnotes($html, $build) { $dom = Html::load($html); + // Define view modes that should not use accumulated. + $single_view_modes = ['preview', 'facts_and_figures']; + $accumulator = []; - $accumulated = ($build['#view_mode'] ?? NULL) !== 'preview'; + $accumulated = !in_array(($build['#view_mode'] ?? NULL), $single_view_modes); // Process the texts with footnotes. foreach (iterator_to_array($dom->getElementsByTagName('gho-footnotes-text')) as $node) { diff --git a/html/modules/custom/ncms_graphql/graphql/ncms_schema_extension.base.graphqls b/html/modules/custom/ncms_graphql/graphql/ncms_schema_extension.base.graphqls index e7079aec..4429ef07 100644 --- a/html/modules/custom/ncms_graphql/graphql/ncms_schema_extension.base.graphqls +++ b/html/modules/custom/ncms_graphql/graphql/ncms_schema_extension.base.graphqls @@ -6,6 +6,8 @@ type MetaData { created: String updated: String summary: String + content_space: String + tags: [String] autoVisible: Int! forceUpdate: Int } diff --git a/html/modules/custom/ncms_graphql/src/Plugin/GraphQL/DataProducer/EntityLoadMultipleByTitle.php b/html/modules/custom/ncms_graphql/src/Plugin/GraphQL/DataProducer/EntityLoadMultipleByTitle.php index e2877b51..a3c6d95c 100644 --- a/html/modules/custom/ncms_graphql/src/Plugin/GraphQL/DataProducer/EntityLoadMultipleByTitle.php +++ b/html/modules/custom/ncms_graphql/src/Plugin/GraphQL/DataProducer/EntityLoadMultipleByTitle.php @@ -2,6 +2,7 @@ namespace Drupal\ncms_graphql\Plugin\GraphQL\DataProducer; +use Drupal\Core\Entity\ContentEntityInterface; use Drupal\Core\Entity\EntityPublishedInterface; use Drupal\Core\Entity\EntityRepositoryInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; @@ -197,6 +198,9 @@ public function resolve($type, string $title, ?string $language, ?array $bundles continue; } } + uasort($entities, function (ContentEntityInterface $a, ContentEntityInterface $b) { + return $a->get('created')->value <= $b->get('created')->value; + }); return new ContentSearchWrapper($entities); }); } diff --git a/html/modules/custom/ncms_graphql/src/Wrappers/ContentExportWrapper.php b/html/modules/custom/ncms_graphql/src/Wrappers/ContentExportWrapper.php index cb42001d..4a006a1d 100644 --- a/html/modules/custom/ncms_graphql/src/Wrappers/ContentExportWrapper.php +++ b/html/modules/custom/ncms_graphql/src/Wrappers/ContentExportWrapper.php @@ -66,6 +66,9 @@ public function metaData() { $field_query->addJoin('LEFT', 'node__field_summary', 'summary', 'n.nid = summary.entity_id'); $field_query->addJoin('LEFT', 'node__field_short_title', 'short_title', 'n.nid = short_title.entity_id'); $field_query->addJoin('LEFT', 'node__field_automatically_visible', 'auto_visible', 'n.nid = auto_visible.entity_id'); + $field_query->addJoin('LEFT', 'node__field_content_space', 'content_space', 'n.nid = content_space.entity_id'); + $field_query->addJoin('LEFT', 'node__field_computed_tags', 'computed_tags', 'n.nid = computed_tags.entity_id'); + $field_query->addJoin('LEFT', 'taxonomy_term_field_data', 'cm_tag', 'content_space.field_content_space_target_id = cm_tag.tid'); $field_query->addField('n', 'nid', 'id'); $field_query->addField('n', 'status'); $field_query->addExpression('FROM_UNIXTIME(n.created)', 'created'); @@ -73,11 +76,17 @@ public function metaData() { $field_query->addField('n', 'title'); $field_query->addField('short_title', 'field_short_title_value', 'title_short'); $field_query->addField('summary', 'field_summary_value', 'summary'); + $field_query->addField('cm_tag', 'name', 'content_space'); + $field_query->addField('computed_tags', 'field_computed_tags_value', 'tags'); $field_query->addField('n', 'force_update', 'forceUpdate'); $field_query->addField('auto_visible', 'field_automatically_visible_value', 'autoVisible'); $field_query->orderBy('n.changed', 'DESC'); - $result = $field_query->execute(); - return $result->fetchAllAssoc('id'); + $result = $field_query->execute()->fetchAllAssoc('id'); + $result = array_map(function ($item) { + $item->tags = explode(',', $item->tags); + return $item; + }, $result); + return $result; } /** diff --git a/html/modules/custom/ncms_ui/css/frontend_styles.css b/html/modules/custom/ncms_ui/css/frontend_styles.css index 57695f9f..b60a0788 100644 --- a/html/modules/custom/ncms_ui/css/frontend_styles.css +++ b/html/modules/custom/ncms_ui/css/frontend_styles.css @@ -83,9 +83,28 @@ flex-flow: row wrap; margin: 0 -.5em; } -.paragraph--type--facts-and-figures .field--name-field-paragraphs > .field__item { - flex: 0 0 32%; - padding: 0 .5em; +.paragraph--type--facts-and-figures .field--name-field-paragraphs.field__items { + display: flex; + flex-flow: row wrap; + gap: 1rem; +} +.paragraph--type--facts-and-figures .field--name-field-paragraphs.field__items > .field__item { + padding: 0; +} +.paragraph--type--facts-and-figures .field--name-field-paragraphs.field__items.col-1 > .field__item { + flex: 0 0 calc((100% - 3rem)); +} +.paragraph--type--facts-and-figures .field--name-field-paragraphs.field__items.col-2 > .field__item { + flex: 0 0 calc((100% - 3rem) / 2); +} +.paragraph--type--facts-and-figures .field--name-field-paragraphs.field__items.col-3 > .field__item { + flex: 0 0 calc((100% - 3rem) / 3); +} +.paragraph--type--facts-and-figures .field--name-field-paragraphs.field__items.col-4 > .field__item { + flex: 0 0 calc((100% - 3rem) / 4); +} +.paragraph--type--facts-and-figures .field--name-field-paragraphs.field__items > .field__item > * { + padding: 0 0.5rem; } /*------------------------------------------------------------------------------ diff --git a/html/modules/custom/ncms_ui/ncms_ui.module b/html/modules/custom/ncms_ui/ncms_ui.module index 6a4f14b6..9c7efb78 100644 --- a/html/modules/custom/ncms_ui/ncms_ui.module +++ b/html/modules/custom/ncms_ui/ncms_ui.module @@ -318,11 +318,17 @@ function ncms_ui_preprocess_field__paragraph__field_title__document_chapter(&$va /** * Implements hook_preprocess_hook(). */ -function ncms_ui_preprocess_field__paragraph__achievement_list(&$variables) { +function ncms_ui_preprocess_field__paragraph(&$variables, $original_hook) { /** @var \Drupal\paragraphs\Entity\Paragraph $paragraph */ $paragraph = $variables['element']['#object']; - $columns = $paragraph->hasField('field_columns') ? ($paragraph->get('field_columns')->value ?? 4) : 4; - $variables['attributes']['class'][] = 'col-' . $columns; + if ($paragraph->hasField('field_columns')) { + $columns_field = $paragraph->get('field_columns'); + if ($columns_field->isEmpty()) { + $columns_field->applyDefaultValue(); + } + $columns = $columns_field->value; + $variables['attributes']['class'][] = 'col-' . $columns; + } } /** diff --git a/html/themes/custom/common_design_subtheme/common_design_subtheme.libraries.yml b/html/themes/custom/common_design_subtheme/common_design_subtheme.libraries.yml index 1dbcd848..80b4d252 100644 --- a/html/themes/custom/common_design_subtheme/common_design_subtheme.libraries.yml +++ b/html/themes/custom/common_design_subtheme/common_design_subtheme.libraries.yml @@ -80,6 +80,8 @@ gho-facts-and-figures: css: theme: components/gho-facts-and-figures/gho-facts-and-figures.css: {} + dependencies: + - common_design_subtheme/gho-aside gho-further-reading: css: @@ -119,6 +121,8 @@ gho-story: css: theme: components/gho-story/gho-story.css: {} + dependencies: + - common_design_subtheme/gho-aside gho-text: css: diff --git a/html/themes/custom/common_design_subtheme/components/gho-achievement-list/gho-achievement-list.css b/html/themes/custom/common_design_subtheme/components/gho-achievement-list/gho-achievement-list.css index e98e9a9a..ccede85e 100644 --- a/html/themes/custom/common_design_subtheme/components/gho-achievement-list/gho-achievement-list.css +++ b/html/themes/custom/common_design_subtheme/components/gho-achievement-list/gho-achievement-list.css @@ -21,7 +21,7 @@ /* Full size col-2 */ flex: 0 0 calc((100% - 2rem) / 2); } - .gho-achievement-list .field__items.col-4 > .field__items { + .gho-achievement-list .field__items.col-4 > .field__item { flex: 0 0 calc((100% - 2rem) / 3); } } diff --git a/html/themes/custom/common_design_subtheme/components/gho-facts-and-figures/gho-facts-and-figures.css b/html/themes/custom/common_design_subtheme/components/gho-facts-and-figures/gho-facts-and-figures.css index d0bde01c..5b75f58a 100644 --- a/html/themes/custom/common_design_subtheme/components/gho-facts-and-figures/gho-facts-and-figures.css +++ b/html/themes/custom/common_design_subtheme/components/gho-facts-and-figures/gho-facts-and-figures.css @@ -5,48 +5,50 @@ margin-bottom: 1.25rem; } -/** - * Base facts and figures. - */ -.gho-facts-and-figures__list { - /* Compensate for the padding of the image and text paragraphs */ - margin: -0.625rem; -} .gho-facts-and-figures__item { padding: 0.625rem; } -.gho-facts-and-figures__caption { - margin-top: 1.25rem; +.gho-facts-and-figures__item img { + width: 100%; } -.gho-facts-and-figures__item + .gho-facts-and-figures__item { - margin-top: 1.5rem; +.gho-facts-and-figures__caption { + margin-top: 1.25rem; } /** - * Three columns. + * Up to three columns. * * In this mode, the images (responsive) span 1/3 of the width of the page's * content region on desktop and on smaller screens they take up the entire * content column width like the single column. */ -@media screen and (min-width: 768px) { - .gho-facts-and-figures__list { - display: flex; - flex-wrap: wrap; - justify-content: space-around; +.gho-facts-and-figures__list { + display: flex; + flex-flow: row wrap; + gap: 1rem; + /* Compensate for the padding of the image and text paragraphs */ + margin: -0.625rem; +} + +.gho-facts-and-figures__list .gho-facts-and-figures__item { + width: 100%; +} + +@media (min-width: 734px) { + .col-2 .gho-facts-and-figures__list > .gho-facts-and-figures__item { + flex: 0 0 calc((100% - 1rem) / 2); } - .gho-facts-and-figures__item { - /* Not using flex-basis to determine the width because it doesn't work well - * in IE11 wih the padding and negative margins on the parent. Using the - * width works everywhere. */ - flex-basis: auto; - flex-grow: 0; - flex-shrink: 0; - width: 33.33%; + .col-3 .gho-facts-and-figures__list > .gho-facts-and-figures__item { + /* Full size col-2 */ + flex: 0 0 calc((100% - 2rem) / 2); } - .gho-facts-and-figures__item + .gho-facts-and-figures__item { - margin-top: 0; +} + +@media (min-width: 960px) { + .col-3 .gho-facts-and-figures__list > .gho-facts-and-figures__item { + /* Full size col-3 */ + flex: 0 0 calc((100% - 2rem) / 3); } } diff --git a/html/themes/custom/common_design_subtheme/templates/fields/field--paragraph--field-paragraphs--facts-and-figures.html.twig b/html/themes/custom/common_design_subtheme/templates/fields/field--paragraph--field-paragraphs--facts-and-figures.html.twig index 88112f25..6cf1002f 100644 --- a/html/themes/custom/common_design_subtheme/templates/fields/field--paragraph--field-paragraphs--facts-and-figures.html.twig +++ b/html/themes/custom/common_design_subtheme/templates/fields/field--paragraph--field-paragraphs--facts-and-figures.html.twig @@ -1,4 +1,4 @@ -
+
{%- for item in items -%}
diff --git a/html/themes/custom/common_design_subtheme/templates/paragraphs/paragraph--facts-and-figures.html.twig b/html/themes/custom/common_design_subtheme/templates/paragraphs/paragraph--facts-and-figures.html.twig index 407530f8..e4a740b0 100644 --- a/html/themes/custom/common_design_subtheme/templates/paragraphs/paragraph--facts-and-figures.html.twig +++ b/html/themes/custom/common_design_subtheme/templates/paragraphs/paragraph--facts-and-figures.html.twig @@ -41,7 +41,6 @@ */ #} {{ attach_library('common_design_subtheme/gho-facts-and-figures') }} -{{ attach_library('common_design_subtheme/gho-aside') }} {% set classes = [ 'paragraph', diff --git a/html/themes/custom/common_design_subtheme/templates/paragraphs/paragraph--story.html.twig b/html/themes/custom/common_design_subtheme/templates/paragraphs/paragraph--story.html.twig index dc5ad575..d9d280a6 100644 --- a/html/themes/custom/common_design_subtheme/templates/paragraphs/paragraph--story.html.twig +++ b/html/themes/custom/common_design_subtheme/templates/paragraphs/paragraph--story.html.twig @@ -40,7 +40,6 @@ * @ingroup themeable */ #} -{{ attach_library('common_design_subtheme/gho-aside') }} {{ attach_library('common_design_subtheme/gho-story') }} {% set classes = [