diff --git a/modules/oe_whitelabel_paragraphs/config/install/field.field.paragraph.oe_description_list.oe_bt_orientation.yml b/modules/oe_whitelabel_paragraphs/config/install/field.field.paragraph.oe_description_list.oe_bt_orientation.yml new file mode 100644 index 0000000000000000000000000000000000000000..73b09a472d8fca82e66e5c1a1ccda494d88fb33c --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/install/field.field.paragraph.oe_description_list.oe_bt_orientation.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.oe_bt_orientation + - paragraphs.paragraphs_type.oe_description_list + module: + - options +id: paragraph.oe_description_list.oe_bt_orientation +field_name: oe_bt_orientation +entity_type: paragraph +bundle: oe_description_list +label: Orientation +description: 'Sets the orientation (vertical|horizontal) for the paragraph.' +required: true +translatable: false +default_value: + - + value: horizontal +default_value_callback: '' +settings: { } +field_type: list_string diff --git a/modules/oe_whitelabel_paragraphs/config/install/field.field.paragraph.oe_facts_figures.oe_bt_n_columns.yml b/modules/oe_whitelabel_paragraphs/config/install/field.field.paragraph.oe_facts_figures.oe_bt_n_columns.yml new file mode 100644 index 0000000000000000000000000000000000000000..eec70a14e1e037db51893287df01d018fc6b868e --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/install/field.field.paragraph.oe_facts_figures.oe_bt_n_columns.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.oe_bt_n_columns + - paragraphs.paragraphs_type.oe_facts_figures +id: paragraph.oe_facts_figures.oe_bt_n_columns +field_name: oe_bt_n_columns +entity_type: paragraph +bundle: oe_facts_figures +label: 'Number of columns' +description: 'Sets the number of grid columns. Minimum number is 1 column and maximum is 3.' +required: false +translatable: false +default_value: + - + value: 1 +default_value_callback: '' +settings: + min: 1 + max: 3 + prefix: '' + suffix: '' +field_type: integer diff --git a/modules/oe_whitelabel_paragraphs/config/install/field.field.paragraph.oe_links_block.oe_bt_links_block_background.yml b/modules/oe_whitelabel_paragraphs/config/install/field.field.paragraph.oe_links_block.oe_bt_links_block_background.yml new file mode 100644 index 0000000000000000000000000000000000000000..de66c69713d5ed89c8815b1dbdb3f599a21eb2cd --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/install/field.field.paragraph.oe_links_block.oe_bt_links_block_background.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.oe_bt_links_block_background + - paragraphs.paragraphs_type.oe_links_block + module: + - options +id: paragraph.oe_links_block.oe_bt_links_block_background +field_name: oe_bt_links_block_background +entity_type: paragraph +bundle: oe_links_block +label: Background +description: 'Allows to select the background color of the links block.' +required: false +translatable: false +default_value: + - + value: gray +default_value_callback: '' +settings: { } +field_type: list_string diff --git a/modules/oe_whitelabel_paragraphs/config/install/field.field.paragraph.oe_links_block.oe_bt_links_block_orientation.yml b/modules/oe_whitelabel_paragraphs/config/install/field.field.paragraph.oe_links_block.oe_bt_links_block_orientation.yml new file mode 100644 index 0000000000000000000000000000000000000000..610c35d3739f035f44364e2852bebd7247e1698c --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/install/field.field.paragraph.oe_links_block.oe_bt_links_block_orientation.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.oe_bt_links_block_orientation + - paragraphs.paragraphs_type.oe_links_block + module: + - options +id: paragraph.oe_links_block.oe_bt_links_block_orientation +field_name: oe_bt_links_block_orientation +entity_type: paragraph +bundle: oe_links_block +label: Orientation +description: 'Allows to select the direction of the links block.' +required: false +translatable: false +default_value: + - + value: vertical +default_value_callback: '' +settings: { } +field_type: list_string diff --git a/modules/oe_whitelabel_paragraphs/config/install/field.field.paragraph.oe_social_media_follow.oe_bt_links_block_background.yml b/modules/oe_whitelabel_paragraphs/config/install/field.field.paragraph.oe_social_media_follow.oe_bt_links_block_background.yml new file mode 100644 index 0000000000000000000000000000000000000000..8e167195da6f02c6d387c8ad0c0426a04a6123cb --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/install/field.field.paragraph.oe_social_media_follow.oe_bt_links_block_background.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.oe_bt_links_block_background + - paragraphs.paragraphs_type.oe_social_media_follow + module: + - options +id: paragraph.oe_social_media_follow.oe_bt_links_block_background +field_name: oe_bt_links_block_background +entity_type: paragraph +bundle: oe_social_media_follow +label: Background +description: 'Allows to select the background color of the Social Media Links block.' +required: false +translatable: false +default_value: + - + value: gray +default_value_callback: '' +settings: { } +field_type: list_string diff --git a/modules/oe_whitelabel_paragraphs/config/install/field.storage.paragraph.oe_bt_links_block_background.yml b/modules/oe_whitelabel_paragraphs/config/install/field.storage.paragraph.oe_bt_links_block_background.yml new file mode 100644 index 0000000000000000000000000000000000000000..1a7dbec06489349b31b105c506d6256d6ca9d4f8 --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/install/field.storage.paragraph.oe_bt_links_block_background.yml @@ -0,0 +1,26 @@ +langcode: en +status: true +dependencies: + module: + - options + - paragraphs +id: paragraph.oe_bt_links_block_background +field_name: oe_bt_links_block_background +entity_type: paragraph +type: list_string +settings: + allowed_values: + - + value: gray + label: Gray + - + value: transparent + label: Transparent + allowed_values_function: '' +module: options +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/oe_whitelabel_paragraphs/config/install/field.storage.paragraph.oe_bt_links_block_orientation.yml b/modules/oe_whitelabel_paragraphs/config/install/field.storage.paragraph.oe_bt_links_block_orientation.yml new file mode 100644 index 0000000000000000000000000000000000000000..d582eb8126c744b0643c987431a6cc6dfa4cbd20 --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/install/field.storage.paragraph.oe_bt_links_block_orientation.yml @@ -0,0 +1,26 @@ +langcode: en +status: true +dependencies: + module: + - options + - paragraphs +id: paragraph.oe_bt_links_block_orientation +field_name: oe_bt_links_block_orientation +entity_type: paragraph +type: list_string +settings: + allowed_values: + - + value: horizontal + label: Horizontal + - + value: vertical + label: Vertical + allowed_values_function: '' +module: options +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/oe_whitelabel_paragraphs/config/install/field.storage.paragraph.oe_bt_n_columns.yml b/modules/oe_whitelabel_paragraphs/config/install/field.storage.paragraph.oe_bt_n_columns.yml new file mode 100644 index 0000000000000000000000000000000000000000..f2a740718db02227ad37f1ae65b8a425745e32e1 --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/install/field.storage.paragraph.oe_bt_n_columns.yml @@ -0,0 +1,19 @@ +langcode: en +status: true +dependencies: + module: + - paragraphs +id: paragraph.oe_bt_n_columns +field_name: oe_bt_n_columns +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/modules/oe_whitelabel_paragraphs/config/install/field.storage.paragraph.oe_bt_orientation.yml b/modules/oe_whitelabel_paragraphs/config/install/field.storage.paragraph.oe_bt_orientation.yml new file mode 100644 index 0000000000000000000000000000000000000000..94f290a8e681aa0e93bef75192d167d80ea24ae5 --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/install/field.storage.paragraph.oe_bt_orientation.yml @@ -0,0 +1,26 @@ +langcode: en +status: true +dependencies: + module: + - options + - paragraphs +id: paragraph.oe_bt_orientation +field_name: oe_bt_orientation +entity_type: paragraph +type: list_string +settings: + allowed_values: + - + value: vertical + label: Vertical + - + value: horizontal + label: Horizontal + allowed_values_function: '' +module: options +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_accordion_item.default.yml b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_accordion_item.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..3b7368e64cbba5a66750ac514b72b55ba4be3d6d --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_accordion_item.default.yml @@ -0,0 +1,36 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.oe_accordion_item.field_oe_icon + - field.field.paragraph.oe_accordion_item.field_oe_text + - field.field.paragraph.oe_accordion_item.field_oe_text_long + - paragraphs.paragraphs_type.oe_accordion_item + module: + - text +id: paragraph.oe_accordion_item.default +targetEntityType: paragraph +bundle: oe_accordion_item +mode: default +content: + field_oe_text: + weight: 0 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + field_oe_text_long: + weight: 1 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: text_textarea + region: content +hidden: + created: true + field_oe_icon: true + status: true + uid: true diff --git a/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_description_list.default.yml b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_description_list.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..363809ded20fc2b2eacfdfd196394aab4919bc7e --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_description_list.default.yml @@ -0,0 +1,38 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.oe_description_list.field_oe_description_list_items + - field.field.paragraph.oe_description_list.field_oe_title + - field.field.paragraph.oe_description_list.oe_bt_orientation + - paragraphs.paragraphs_type.oe_description_list + module: + - description_list_field +id: paragraph.oe_description_list.default +targetEntityType: paragraph +bundle: oe_description_list +mode: default +content: + field_oe_description_list_items: + weight: 2 + settings: { } + third_party_settings: { } + type: description_list_widget + region: content + field_oe_title: + weight: 1 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + oe_bt_orientation: + type: options_select + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + created: true + status: true diff --git a/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_facts_figures.default.yml b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_facts_figures.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..96a0c1fb937db07a8b97809f529596638e47e7f7 --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_facts_figures.default.yml @@ -0,0 +1,61 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.oe_facts_figures.field_oe_link + - field.field.paragraph.oe_facts_figures.field_oe_paragraphs + - field.field.paragraph.oe_facts_figures.field_oe_title + - field.field.paragraph.oe_facts_figures.oe_bt_n_columns + - paragraphs.paragraphs_type.oe_facts_figures + module: + - link + - oe_paragraphs +id: paragraph.oe_facts_figures.default +targetEntityType: paragraph +bundle: oe_facts_figures +mode: default +content: + field_oe_link: + type: link_default + weight: 2 + region: content + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + field_oe_paragraphs: + type: oe_paragraphs_variants + weight: 8 + region: content + settings: + title: Paragraph + title_plural: Paragraphs + edit_mode: open + add_mode: dropdown + form_display_mode: default + default_paragraph_type: '' + closed_mode: summary + autocollapse: none + closed_mode_threshold: 0 + features: + collapse_edit_all: collapse_edit_all + duplicate: duplicate + third_party_settings: { } + field_oe_title: + type: string_textfield + weight: 1 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + oe_bt_n_columns: + weight: 6 + settings: + placeholder: '' + third_party_settings: { } + type: number + region: content +hidden: + created: true + status: true diff --git a/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_links_block.default.yml b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_links_block.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..1fab747a22e1e43d52010c60ebedf587a1626af9 --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_links_block.default.yml @@ -0,0 +1,48 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.oe_links_block.field_oe_links + - field.field.paragraph.oe_links_block.oe_bt_links_block_background + - field.field.paragraph.oe_links_block.oe_bt_links_block_orientation + - field.field.paragraph.oe_links_block.field_oe_text + - paragraphs.paragraphs_type.oe_links_block + module: + - link +id: paragraph.oe_links_block.default +targetEntityType: paragraph +bundle: oe_links_block +mode: default +content: + field_oe_links: + weight: 3 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + oe_bt_links_block_background: + weight: 1 + settings: { } + third_party_settings: { } + type: options_select + region: content + oe_bt_links_block_orientation: + weight: 0 + settings: { } + third_party_settings: { } + type: options_select + region: content + field_oe_text: + weight: 2 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content +hidden: + created: true + status: true + uid: true diff --git a/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_list_item.default.yml b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_list_item.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..a80ab7071e5dce0520213b47ff64699517e6fc23 --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_list_item.default.yml @@ -0,0 +1,71 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.oe_list_item.field_oe_date + - field.field.paragraph.oe_list_item.field_oe_image + - field.field.paragraph.oe_list_item.field_oe_link + - field.field.paragraph.oe_list_item.field_oe_meta + - field.field.paragraph.oe_list_item.field_oe_text_long + - field.field.paragraph.oe_list_item.field_oe_title + - image.style.thumbnail + - paragraphs.paragraphs_type.oe_list_item + module: + - allowed_formats + - image + - link + - text +id: paragraph.oe_list_item.default +targetEntityType: paragraph +bundle: oe_list_item +mode: default +content: + field_oe_image: + type: image_image + weight: 3 + region: content + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + field_oe_link: + type: link_default + weight: 0 + region: content + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + field_oe_meta: + type: string_textfield + weight: 4 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + field_oe_text_long: + type: text_textarea + weight: 2 + region: content + settings: + rows: 3 + placeholder: '' + third_party_settings: + allowed_formats: + hide_help: '1' + hide_guidelines: '1' + field_oe_title: + type: string_textfield + weight: 1 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } +hidden: + created: true + field_oe_date: true + status: true + translation: true + uid: true diff --git a/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_list_item_block.default.yml b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_list_item_block.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..6497f1fd68ed773d1041bb78ecfd57d63cc1bc91 --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_list_item_block.default.yml @@ -0,0 +1,67 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.oe_list_item_block.field_oe_link + - field.field.paragraph.oe_list_item_block.field_oe_list_item_block_layout + - field.field.paragraph.oe_list_item_block.field_oe_paragraphs + - field.field.paragraph.oe_list_item_block.field_oe_title + - paragraphs.paragraphs_type.oe_list_item_block + module: + - link + - paragraphs +id: paragraph.oe_list_item_block.default +targetEntityType: paragraph +bundle: oe_list_item_block +mode: default +content: + field_oe_link: + type: link_default + weight: 3 + region: content + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + field_oe_list_item_block_layout: + type: options_select + weight: 0 + region: content + settings: { } + third_party_settings: { } + field_oe_paragraphs: + type: paragraphs + weight: 2 + region: content + settings: + title: Paragraph + title_plural: Paragraphs + edit_mode: closed + closed_mode: summary + autocollapse: none + closed_mode_threshold: 0 + add_mode: dropdown + form_display_mode: default + default_paragraph_type: oe_list_item + features: + add_above: '0' + collapse_edit_all: collapse_edit_all + duplicate: duplicate + third_party_settings: { } + field_oe_title: + type: string_textfield + weight: 1 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + translation: + weight: 4 + region: content + settings: { } + third_party_settings: { } +hidden: + created: true + status: true + uid: true diff --git a/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_list_item_block.highlight.yml b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_list_item_block.highlight.yml new file mode 100644 index 0000000000000000000000000000000000000000..28e0a334f75d1213de8a45ffd1edc543d710b3fe --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_list_item_block.highlight.yml @@ -0,0 +1,68 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_form_mode.paragraph.highlight + - field.field.paragraph.oe_list_item_block.field_oe_link + - field.field.paragraph.oe_list_item_block.field_oe_list_item_block_layout + - field.field.paragraph.oe_list_item_block.field_oe_paragraphs + - field.field.paragraph.oe_list_item_block.field_oe_title + - paragraphs.paragraphs_type.oe_list_item_block + module: + - link + - paragraphs +id: paragraph.oe_list_item_block.highlight +targetEntityType: paragraph +bundle: oe_list_item_block +mode: highlight +content: + field_oe_link: + type: link_default + weight: 3 + region: content + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + field_oe_list_item_block_layout: + type: options_select + weight: 0 + region: content + settings: { } + third_party_settings: { } + field_oe_paragraphs: + type: paragraphs + weight: 2 + region: content + settings: + title: Paragraph + title_plural: Paragraphs + edit_mode: closed + closed_mode: summary + autocollapse: none + closed_mode_threshold: 0 + add_mode: dropdown + form_display_mode: highlight + default_paragraph_type: oe_list_item + features: + add_above: '0' + collapse_edit_all: collapse_edit_all + duplicate: duplicate + third_party_settings: { } + field_oe_title: + type: string_textfield + weight: 1 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + translation: + weight: 4 + region: content + settings: { } + third_party_settings: { } +hidden: + created: true + status: true + uid: true diff --git a/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_social_media_follow.default.yml b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_social_media_follow.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..8b7cd07f113fb1fe70c0a66b81df425bdd18d7fa --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_form_display.paragraph.oe_social_media_follow.default.yml @@ -0,0 +1,57 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.oe_social_media_follow.oe_bt_links_block_background + - field.field.paragraph.oe_social_media_follow.field_oe_social_media_links + - field.field.paragraph.oe_social_media_follow.field_oe_social_media_see_more + - field.field.paragraph.oe_social_media_follow.field_oe_social_media_variant + - field.field.paragraph.oe_social_media_follow.field_oe_title + - paragraphs.paragraphs_type.oe_social_media_follow + module: + - link + - typed_link +id: paragraph.oe_social_media_follow.default +targetEntityType: paragraph +bundle: oe_social_media_follow +mode: default +content: + oe_bt_links_block_background: + type: options_select + weight: 1 + region: content + settings: { } + third_party_settings: { } + field_oe_social_media_links: + weight: 3 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: typed_link + region: content + field_oe_social_media_see_more: + weight: 4 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + field_oe_social_media_variant: + weight: 0 + settings: { } + third_party_settings: { } + type: options_select + region: content + field_oe_title: + weight: 2 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content +hidden: + created: true + status: true diff --git a/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_view_display.paragraph.oe_accordion_item.default.yml b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_view_display.paragraph.oe_accordion_item.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..8c3a67f6a8eb54e91907ed324a6cc13b39d354ab --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_view_display.paragraph.oe_accordion_item.default.yml @@ -0,0 +1,32 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.oe_accordion_item.field_oe_icon + - field.field.paragraph.oe_accordion_item.field_oe_text + - field.field.paragraph.oe_accordion_item.field_oe_text_long + - paragraphs.paragraphs_type.oe_accordion_item + module: + - text +id: paragraph.oe_accordion_item.default +targetEntityType: paragraph +bundle: oe_accordion_item +mode: default +content: + field_oe_text: + weight: 0 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_oe_text_long: + weight: 1 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content +hidden: + field_oe_icon: true diff --git a/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_view_display.paragraph.oe_description_list.default.yml b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_view_display.paragraph.oe_description_list.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..2e3b81d7d058e73fe447b41c76b363752f1c411b --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_view_display.paragraph.oe_description_list.default.yml @@ -0,0 +1,32 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.oe_description_list.oe_bt_orientation + - field.field.paragraph.oe_description_list.field_oe_description_list_items + - field.field.paragraph.oe_description_list.field_oe_title + - paragraphs.paragraphs_type.oe_description_list + module: + - description_list_field +id: paragraph.oe_description_list.default +targetEntityType: paragraph +bundle: oe_description_list +mode: default +content: + field_oe_description_list_items: + weight: 1 + label: hidden + settings: { } + third_party_settings: { } + type: description_list_formatter + region: content + field_oe_title: + weight: 0 + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content +hidden: + oe_bt_orientation: true diff --git a/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_view_display.paragraph.oe_facts_figures.default.yml b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_view_display.paragraph.oe_facts_figures.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..e9dd9cf684fb08b7f2b8542a2fe0d4bfe93076c6 --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_view_display.paragraph.oe_facts_figures.default.yml @@ -0,0 +1,48 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.oe_facts_figures.field_oe_link + - field.field.paragraph.oe_facts_figures.field_oe_paragraphs + - field.field.paragraph.oe_facts_figures.field_oe_title + - field.field.paragraph.oe_facts_figures.oe_bt_n_columns + - paragraphs.paragraphs_type.oe_facts_figures + module: + - entity_reference_revisions + - link +id: paragraph.oe_facts_figures.default +targetEntityType: paragraph +bundle: oe_facts_figures +mode: default +content: + field_oe_link: + weight: 2 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_oe_paragraphs: + weight: 1 + label: above + settings: + view_mode: default + link: '' + third_party_settings: { } + type: entity_reference_revisions_entity_view + region: content + field_oe_title: + weight: 0 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content +hidden: + oe_bt_n_columns: true diff --git a/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_view_display.paragraph.oe_links_block.default.yml b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_view_display.paragraph.oe_links_block.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..0d927d07494e95fdfc6b4b8c7acb9cfe479221fc --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_view_display.paragraph.oe_links_block.default.yml @@ -0,0 +1,39 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.oe_links_block.field_oe_links + - field.field.paragraph.oe_links_block.field_oe_links_block_background + - field.field.paragraph.oe_links_block.field_oe_links_block_orientation + - field.field.paragraph.oe_links_block.field_oe_text + - paragraphs.paragraphs_type.oe_links_block + module: + - link +id: paragraph.oe_links_block.default +targetEntityType: paragraph +bundle: oe_links_block +mode: default +content: + field_oe_links: + weight: 1 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_oe_text: + weight: 0 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content +hidden: + field_oe_links_block_background: true + field_oe_links_block_orientation: true diff --git a/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_view_display.paragraph.oe_social_media_follow.default.yml b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_view_display.paragraph.oe_social_media_follow.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..8e15a2313f92cfd423cb4bb1c7b11f0b481b0fca --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/overrides/core.entity_view_display.paragraph.oe_social_media_follow.default.yml @@ -0,0 +1,53 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.oe_social_media_follow.oe_bt_links_block_background + - field.field.paragraph.oe_social_media_follow.field_oe_social_media_links + - field.field.paragraph.oe_social_media_follow.field_oe_social_media_see_more + - field.field.paragraph.oe_social_media_follow.field_oe_social_media_variant + - field.field.paragraph.oe_social_media_follow.field_oe_title + - paragraphs.paragraphs_type.oe_social_media_follow + module: + - link + - typed_link +id: paragraph.oe_social_media_follow.default +targetEntityType: paragraph +bundle: oe_social_media_follow +mode: default +content: + field_oe_social_media_links: + weight: 1 + label: hidden + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: typed_link + region: content + field_oe_social_media_see_more: + weight: 2 + label: hidden + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_oe_title: + weight: 0 + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content +hidden: + oe_bt_links_block_background: true + field_oe_social_media_variant: true diff --git a/modules/oe_whitelabel_paragraphs/config/overrides/field.field.paragraph.oe_social_media_follow.field_oe_social_media_variant.yml b/modules/oe_whitelabel_paragraphs/config/overrides/field.field.paragraph.oe_social_media_follow.field_oe_social_media_variant.yml new file mode 100755 index 0000000000000000000000000000000000000000..ecf09e79bba7735bac6ef639e4ee10889593bcb7 --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/overrides/field.field.paragraph.oe_social_media_follow.field_oe_social_media_variant.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_oe_social_media_variant + - paragraphs.paragraphs_type.oe_social_media_follow + module: + - options +id: paragraph.oe_social_media_follow.field_oe_social_media_variant +field_name: field_oe_social_media_variant +entity_type: paragraph +bundle: oe_social_media_follow +label: Orientation +description: '' +required: true +translatable: false +default_value: + - + value: horizontal +default_value_callback: '' +settings: { } +field_type: list_string diff --git a/modules/oe_whitelabel_paragraphs/config/post_updates/00001/core.entity_form_display.paragraph.oe_description_list.default.yml b/modules/oe_whitelabel_paragraphs/config/post_updates/00001/core.entity_form_display.paragraph.oe_description_list.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..363809ded20fc2b2eacfdfd196394aab4919bc7e --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/post_updates/00001/core.entity_form_display.paragraph.oe_description_list.default.yml @@ -0,0 +1,38 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.oe_description_list.field_oe_description_list_items + - field.field.paragraph.oe_description_list.field_oe_title + - field.field.paragraph.oe_description_list.oe_bt_orientation + - paragraphs.paragraphs_type.oe_description_list + module: + - description_list_field +id: paragraph.oe_description_list.default +targetEntityType: paragraph +bundle: oe_description_list +mode: default +content: + field_oe_description_list_items: + weight: 2 + settings: { } + third_party_settings: { } + type: description_list_widget + region: content + field_oe_title: + weight: 1 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + oe_bt_orientation: + type: options_select + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + created: true + status: true diff --git a/modules/oe_whitelabel_paragraphs/config/post_updates/00001/core.entity_view_display.paragraph.oe_description_list.default.yml b/modules/oe_whitelabel_paragraphs/config/post_updates/00001/core.entity_view_display.paragraph.oe_description_list.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..2e3b81d7d058e73fe447b41c76b363752f1c411b --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/post_updates/00001/core.entity_view_display.paragraph.oe_description_list.default.yml @@ -0,0 +1,32 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.oe_description_list.oe_bt_orientation + - field.field.paragraph.oe_description_list.field_oe_description_list_items + - field.field.paragraph.oe_description_list.field_oe_title + - paragraphs.paragraphs_type.oe_description_list + module: + - description_list_field +id: paragraph.oe_description_list.default +targetEntityType: paragraph +bundle: oe_description_list +mode: default +content: + field_oe_description_list_items: + weight: 1 + label: hidden + settings: { } + third_party_settings: { } + type: description_list_formatter + region: content + field_oe_title: + weight: 0 + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content +hidden: + oe_bt_orientation: true diff --git a/modules/oe_whitelabel_paragraphs/config/post_updates/00001/field.field.paragraph.oe_description_list.oe_bt_orientation.yml b/modules/oe_whitelabel_paragraphs/config/post_updates/00001/field.field.paragraph.oe_description_list.oe_bt_orientation.yml new file mode 100644 index 0000000000000000000000000000000000000000..73b09a472d8fca82e66e5c1a1ccda494d88fb33c --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/post_updates/00001/field.field.paragraph.oe_description_list.oe_bt_orientation.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.oe_bt_orientation + - paragraphs.paragraphs_type.oe_description_list + module: + - options +id: paragraph.oe_description_list.oe_bt_orientation +field_name: oe_bt_orientation +entity_type: paragraph +bundle: oe_description_list +label: Orientation +description: 'Sets the orientation (vertical|horizontal) for the paragraph.' +required: true +translatable: false +default_value: + - + value: horizontal +default_value_callback: '' +settings: { } +field_type: list_string diff --git a/modules/oe_whitelabel_paragraphs/config/post_updates/00001/field.storage.paragraph.oe_bt_orientation.yml b/modules/oe_whitelabel_paragraphs/config/post_updates/00001/field.storage.paragraph.oe_bt_orientation.yml new file mode 100644 index 0000000000000000000000000000000000000000..94f290a8e681aa0e93bef75192d167d80ea24ae5 --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/post_updates/00001/field.storage.paragraph.oe_bt_orientation.yml @@ -0,0 +1,26 @@ +langcode: en +status: true +dependencies: + module: + - options + - paragraphs +id: paragraph.oe_bt_orientation +field_name: oe_bt_orientation +entity_type: paragraph +type: list_string +settings: + allowed_values: + - + value: vertical + label: Vertical + - + value: horizontal + label: Horizontal + allowed_values_function: '' +module: options +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/modules/oe_whitelabel_paragraphs/config/post_updates/00002/core.entity_form_display.paragraph.oe_accordion_item.default.yml b/modules/oe_whitelabel_paragraphs/config/post_updates/00002/core.entity_form_display.paragraph.oe_accordion_item.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..3b7368e64cbba5a66750ac514b72b55ba4be3d6d --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/post_updates/00002/core.entity_form_display.paragraph.oe_accordion_item.default.yml @@ -0,0 +1,36 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.oe_accordion_item.field_oe_icon + - field.field.paragraph.oe_accordion_item.field_oe_text + - field.field.paragraph.oe_accordion_item.field_oe_text_long + - paragraphs.paragraphs_type.oe_accordion_item + module: + - text +id: paragraph.oe_accordion_item.default +targetEntityType: paragraph +bundle: oe_accordion_item +mode: default +content: + field_oe_text: + weight: 0 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + field_oe_text_long: + weight: 1 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: text_textarea + region: content +hidden: + created: true + field_oe_icon: true + status: true + uid: true diff --git a/modules/oe_whitelabel_paragraphs/config/post_updates/00002/core.entity_view_display.paragraph.oe_accordion_item.default.yml b/modules/oe_whitelabel_paragraphs/config/post_updates/00002/core.entity_view_display.paragraph.oe_accordion_item.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..8c3a67f6a8eb54e91907ed324a6cc13b39d354ab --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/post_updates/00002/core.entity_view_display.paragraph.oe_accordion_item.default.yml @@ -0,0 +1,32 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.oe_accordion_item.field_oe_icon + - field.field.paragraph.oe_accordion_item.field_oe_text + - field.field.paragraph.oe_accordion_item.field_oe_text_long + - paragraphs.paragraphs_type.oe_accordion_item + module: + - text +id: paragraph.oe_accordion_item.default +targetEntityType: paragraph +bundle: oe_accordion_item +mode: default +content: + field_oe_text: + weight: 0 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_oe_text_long: + weight: 1 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content +hidden: + field_oe_icon: true diff --git a/modules/oe_whitelabel_paragraphs/config/post_updates/00003/core.entity_form_display.paragraph.oe_facts_figures.default.yml b/modules/oe_whitelabel_paragraphs/config/post_updates/00003/core.entity_form_display.paragraph.oe_facts_figures.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..96a0c1fb937db07a8b97809f529596638e47e7f7 --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/post_updates/00003/core.entity_form_display.paragraph.oe_facts_figures.default.yml @@ -0,0 +1,61 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.oe_facts_figures.field_oe_link + - field.field.paragraph.oe_facts_figures.field_oe_paragraphs + - field.field.paragraph.oe_facts_figures.field_oe_title + - field.field.paragraph.oe_facts_figures.oe_bt_n_columns + - paragraphs.paragraphs_type.oe_facts_figures + module: + - link + - oe_paragraphs +id: paragraph.oe_facts_figures.default +targetEntityType: paragraph +bundle: oe_facts_figures +mode: default +content: + field_oe_link: + type: link_default + weight: 2 + region: content + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + field_oe_paragraphs: + type: oe_paragraphs_variants + weight: 8 + region: content + settings: + title: Paragraph + title_plural: Paragraphs + edit_mode: open + add_mode: dropdown + form_display_mode: default + default_paragraph_type: '' + closed_mode: summary + autocollapse: none + closed_mode_threshold: 0 + features: + collapse_edit_all: collapse_edit_all + duplicate: duplicate + third_party_settings: { } + field_oe_title: + type: string_textfield + weight: 1 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + oe_bt_n_columns: + weight: 6 + settings: + placeholder: '' + third_party_settings: { } + type: number + region: content +hidden: + created: true + status: true diff --git a/modules/oe_whitelabel_paragraphs/config/post_updates/00003/core.entity_form_display.paragraph.oe_list_item.default.yml b/modules/oe_whitelabel_paragraphs/config/post_updates/00003/core.entity_form_display.paragraph.oe_list_item.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..a80ab7071e5dce0520213b47ff64699517e6fc23 --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/post_updates/00003/core.entity_form_display.paragraph.oe_list_item.default.yml @@ -0,0 +1,71 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.oe_list_item.field_oe_date + - field.field.paragraph.oe_list_item.field_oe_image + - field.field.paragraph.oe_list_item.field_oe_link + - field.field.paragraph.oe_list_item.field_oe_meta + - field.field.paragraph.oe_list_item.field_oe_text_long + - field.field.paragraph.oe_list_item.field_oe_title + - image.style.thumbnail + - paragraphs.paragraphs_type.oe_list_item + module: + - allowed_formats + - image + - link + - text +id: paragraph.oe_list_item.default +targetEntityType: paragraph +bundle: oe_list_item +mode: default +content: + field_oe_image: + type: image_image + weight: 3 + region: content + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + field_oe_link: + type: link_default + weight: 0 + region: content + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + field_oe_meta: + type: string_textfield + weight: 4 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + field_oe_text_long: + type: text_textarea + weight: 2 + region: content + settings: + rows: 3 + placeholder: '' + third_party_settings: + allowed_formats: + hide_help: '1' + hide_guidelines: '1' + field_oe_title: + type: string_textfield + weight: 1 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } +hidden: + created: true + field_oe_date: true + status: true + translation: true + uid: true diff --git a/modules/oe_whitelabel_paragraphs/config/post_updates/00003/core.entity_form_display.paragraph.oe_list_item_block.default.yml b/modules/oe_whitelabel_paragraphs/config/post_updates/00003/core.entity_form_display.paragraph.oe_list_item_block.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..6497f1fd68ed773d1041bb78ecfd57d63cc1bc91 --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/post_updates/00003/core.entity_form_display.paragraph.oe_list_item_block.default.yml @@ -0,0 +1,67 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.oe_list_item_block.field_oe_link + - field.field.paragraph.oe_list_item_block.field_oe_list_item_block_layout + - field.field.paragraph.oe_list_item_block.field_oe_paragraphs + - field.field.paragraph.oe_list_item_block.field_oe_title + - paragraphs.paragraphs_type.oe_list_item_block + module: + - link + - paragraphs +id: paragraph.oe_list_item_block.default +targetEntityType: paragraph +bundle: oe_list_item_block +mode: default +content: + field_oe_link: + type: link_default + weight: 3 + region: content + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + field_oe_list_item_block_layout: + type: options_select + weight: 0 + region: content + settings: { } + third_party_settings: { } + field_oe_paragraphs: + type: paragraphs + weight: 2 + region: content + settings: + title: Paragraph + title_plural: Paragraphs + edit_mode: closed + closed_mode: summary + autocollapse: none + closed_mode_threshold: 0 + add_mode: dropdown + form_display_mode: default + default_paragraph_type: oe_list_item + features: + add_above: '0' + collapse_edit_all: collapse_edit_all + duplicate: duplicate + third_party_settings: { } + field_oe_title: + type: string_textfield + weight: 1 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + translation: + weight: 4 + region: content + settings: { } + third_party_settings: { } +hidden: + created: true + status: true + uid: true diff --git a/modules/oe_whitelabel_paragraphs/config/post_updates/00003/core.entity_form_display.paragraph.oe_list_item_block.highlight.yml b/modules/oe_whitelabel_paragraphs/config/post_updates/00003/core.entity_form_display.paragraph.oe_list_item_block.highlight.yml new file mode 100644 index 0000000000000000000000000000000000000000..28e0a334f75d1213de8a45ffd1edc543d710b3fe --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/post_updates/00003/core.entity_form_display.paragraph.oe_list_item_block.highlight.yml @@ -0,0 +1,68 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_form_mode.paragraph.highlight + - field.field.paragraph.oe_list_item_block.field_oe_link + - field.field.paragraph.oe_list_item_block.field_oe_list_item_block_layout + - field.field.paragraph.oe_list_item_block.field_oe_paragraphs + - field.field.paragraph.oe_list_item_block.field_oe_title + - paragraphs.paragraphs_type.oe_list_item_block + module: + - link + - paragraphs +id: paragraph.oe_list_item_block.highlight +targetEntityType: paragraph +bundle: oe_list_item_block +mode: highlight +content: + field_oe_link: + type: link_default + weight: 3 + region: content + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + field_oe_list_item_block_layout: + type: options_select + weight: 0 + region: content + settings: { } + third_party_settings: { } + field_oe_paragraphs: + type: paragraphs + weight: 2 + region: content + settings: + title: Paragraph + title_plural: Paragraphs + edit_mode: closed + closed_mode: summary + autocollapse: none + closed_mode_threshold: 0 + add_mode: dropdown + form_display_mode: highlight + default_paragraph_type: oe_list_item + features: + add_above: '0' + collapse_edit_all: collapse_edit_all + duplicate: duplicate + third_party_settings: { } + field_oe_title: + type: string_textfield + weight: 1 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + translation: + weight: 4 + region: content + settings: { } + third_party_settings: { } +hidden: + created: true + status: true + uid: true diff --git a/modules/oe_whitelabel_paragraphs/config/post_updates/00003/core.entity_view_display.paragraph.oe_facts_figures.default.yml b/modules/oe_whitelabel_paragraphs/config/post_updates/00003/core.entity_view_display.paragraph.oe_facts_figures.default.yml new file mode 100644 index 0000000000000000000000000000000000000000..e9dd9cf684fb08b7f2b8542a2fe0d4bfe93076c6 --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/post_updates/00003/core.entity_view_display.paragraph.oe_facts_figures.default.yml @@ -0,0 +1,48 @@ +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.oe_facts_figures.field_oe_link + - field.field.paragraph.oe_facts_figures.field_oe_paragraphs + - field.field.paragraph.oe_facts_figures.field_oe_title + - field.field.paragraph.oe_facts_figures.oe_bt_n_columns + - paragraphs.paragraphs_type.oe_facts_figures + module: + - entity_reference_revisions + - link +id: paragraph.oe_facts_figures.default +targetEntityType: paragraph +bundle: oe_facts_figures +mode: default +content: + field_oe_link: + weight: 2 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + field_oe_paragraphs: + weight: 1 + label: above + settings: + view_mode: default + link: '' + third_party_settings: { } + type: entity_reference_revisions_entity_view + region: content + field_oe_title: + weight: 0 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content +hidden: + oe_bt_n_columns: true diff --git a/modules/oe_whitelabel_paragraphs/config/post_updates/00003/field.field.paragraph.oe_facts_figures.oe_bt_n_columns.yml b/modules/oe_whitelabel_paragraphs/config/post_updates/00003/field.field.paragraph.oe_facts_figures.oe_bt_n_columns.yml new file mode 100644 index 0000000000000000000000000000000000000000..eec70a14e1e037db51893287df01d018fc6b868e --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/post_updates/00003/field.field.paragraph.oe_facts_figures.oe_bt_n_columns.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.oe_bt_n_columns + - paragraphs.paragraphs_type.oe_facts_figures +id: paragraph.oe_facts_figures.oe_bt_n_columns +field_name: oe_bt_n_columns +entity_type: paragraph +bundle: oe_facts_figures +label: 'Number of columns' +description: 'Sets the number of grid columns. Minimum number is 1 column and maximum is 3.' +required: false +translatable: false +default_value: + - + value: 1 +default_value_callback: '' +settings: + min: 1 + max: 3 + prefix: '' + suffix: '' +field_type: integer diff --git a/modules/oe_whitelabel_paragraphs/config/post_updates/00003/field.storage.paragraph.oe_bt_n_columns.yml b/modules/oe_whitelabel_paragraphs/config/post_updates/00003/field.storage.paragraph.oe_bt_n_columns.yml new file mode 100644 index 0000000000000000000000000000000000000000..f2a740718db02227ad37f1ae65b8a425745e32e1 --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/config/post_updates/00003/field.storage.paragraph.oe_bt_n_columns.yml @@ -0,0 +1,19 @@ +langcode: en +status: true +dependencies: + module: + - paragraphs +id: paragraph.oe_bt_n_columns +field_name: oe_bt_n_columns +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/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.info.yml b/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.info.yml new file mode 100644 index 0000000000000000000000000000000000000000..5f237ddddf1e9b95147a9eda8545e93ec51a04b8 --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.info.yml @@ -0,0 +1,23 @@ +name: OpenEuropa Whitelabel Paragraphs +type: module +description: Companion module to add support and customisations for oe_paragraphs. +package: OpenEuropa Whitelabel Theme +core_version_requirement: ^9.2 +dependencies: + - oe_paragraphs:oe_paragraphs + - oe_whitelabel:oe_whitelabel_helper + - oe_paragraphs:oe_paragraphs_timeline + - oe_content:oe_content_timeline_field + - drupal:description_list_field + - oe_paragraphs:oe_paragraphs_description_list +config_devel: + install: + - field.field.paragraph.oe_links_block.oe_bt_links_block_background + - field.field.paragraph.oe_links_block.oe_bt_links_block_orientation + - field.field.paragraph.oe_social_media_follow.oe_bt_links_block_background + - field.field.paragraph.oe_facts_figures.oe_bt_n_columns + - field.storage.paragraph.oe_bt_links_block_orientation + - field.storage.paragraph.oe_bt_links_block_background + - field.field.paragraph.oe_description_list.oe_bt_orientation + - field.storage.paragraph.oe_bt_orientation + - field.storage.paragraph.oe_bt_n_columns diff --git a/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.install b/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.install new file mode 100644 index 0000000000000000000000000000000000000000..ac746f3f331841ce7e5d81d376e7ed00c2b9b642 --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.install @@ -0,0 +1,40 @@ +<?php + +/** + * @file + * Install and update functions for the OE Whitelabel Paragraphs module. + */ + +declare(strict_types = 1); + +use Drupal\oe_bootstrap_theme\ConfigImporter; + +/** + * Implements hook_install(). + * + * Customise fields for whitelabel paragraphs. + */ +function oe_whitelabel_paragraphs_install($is_syncing): void { + // If we are installing from config, we bail out. + if ($is_syncing) { + return; + } + + $configs = [ + 'core.entity_form_display.paragraph.oe_links_block.default', + 'core.entity_form_display.paragraph.oe_social_media_follow.default', + 'core.entity_view_display.paragraph.oe_links_block.default', + 'core.entity_view_display.paragraph.oe_social_media_follow.default', + 'core.entity_form_display.paragraph.oe_description_list.default', + 'core.entity_view_display.paragraph.oe_description_list.default', + 'core.entity_form_display.paragraph.oe_accordion_item.default', + 'core.entity_view_display.paragraph.oe_accordion_item.default', + 'core.entity_form_display.paragraph.oe_facts_figures.default', + 'core.entity_view_display.paragraph.oe_facts_figures.default', + 'core.entity_form_display.paragraph.oe_list_item_block.default', + 'core.entity_form_display.paragraph.oe_list_item_block.highlight', + 'core.entity_form_display.paragraph.oe_list_item.default', + ]; + + ConfigImporter::importMultiple('oe_whitelabel_paragraphs', '/config/overrides/', $configs); +} diff --git a/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.module b/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.module new file mode 100644 index 0000000000000000000000000000000000000000..6113f0d0d92416d161c6426270bc3d5947ce4cc3 --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.module @@ -0,0 +1,535 @@ +<?php + +/** + * @file + * OE Whitelabel Paragraphs module. + */ + +declare(strict_types = 1); + +use Drupal\Component\Utility\Html; +use Drupal\Core\Cache\CacheableMetadata; +use Drupal\Core\Entity\Entity\EntityViewDisplay; +use Drupal\Core\Render\Element; +use Drupal\Core\Url; +use Drupal\media\Entity\Media; +use Drupal\media\MediaInterface; +use Drupal\media\MediaSourceInterface; +use Drupal\media\Plugin\media\Source\Image; +use Drupal\media\Plugin\media\Source\OEmbed; +use Drupal\media_avportal\Plugin\media\Source\MediaAvPortalPhotoSource; +use Drupal\media_avportal\Plugin\media\Source\MediaAvPortalSourceInterface; +use Drupal\media_avportal\Plugin\media\Source\MediaAvPortalVideoSource; +use Drupal\oe_bootstrap_theme\ValueObject\ImageValueObject; +use Drupal\oe_media_iframe\Plugin\media\Source\Iframe; +use Drupal\paragraphs\Entity\Paragraph; + +/** + * Implements hook_theme_suggestions_HOOK_alter(). + * + * Adds a bare, markup-free template suggestion to all paragraph fields. + */ +function oe_whitelabel_paragraphs_theme_suggestions_field_alter(array &$suggestions, array $variables): void { + $element = $variables['element']; + + // Do not output field labels and wrapping markup for paragraph fields. + if (isset($element['#entity_type']) && $element['#entity_type'] === 'paragraph') { + // Prepend the new suggestion to the list. This will put it right after the + // default field template. By doing this we allow to override single + // fields, while keeping all the rest markup-free. + array_unshift($suggestions, 'field__bare'); + } +} + +/** + * Implements hook_preprocess_paragraph(). + */ +function oe_whitelabel_paragraphs_preprocess_paragraph__oe_links_block(array &$variables): void { + /** @var \Drupal\paragraphs\Entity\Paragraph $paragraph */ + $paragraph = $variables['paragraph']; + $variables['orientation'] = $paragraph->get('oe_bt_links_block_orientation')->value; + $variables['background'] = $paragraph->get('oe_bt_links_block_background')->value; + if (!$paragraph->get('field_oe_text')->isEmpty()) { + $variables['title'] = $paragraph->get('field_oe_text')->value; + } + + foreach (Element::children($variables['content']['field_oe_links']) as $index) { + $variables['links'][] = [ + 'label' => $variables['content']['field_oe_links'][$index]['#title'], + 'path' => $variables['content']['field_oe_links'][$index]['#url']->toString(), + ]; + } +} + +/** + * Implements hook_preprocess_paragraph() for oe_social_media_follow paragraph. + */ +function oe_whitelabel_preprocess_paragraph__oe_social_media_follow(array &$variables): void { + /** @var \Drupal\paragraphs\Entity\Paragraph $paragraph */ + $paragraph = $variables['paragraph']; + $variables['orientation'] = $paragraph->get('field_oe_social_media_variant')->value; + $variables['background'] = $paragraph->get('oe_bt_links_block_background')->value; + if (!$paragraph->get('field_oe_title')->isEmpty()) { + $variables['title'] = $paragraph->get('field_oe_title')->value; + } + $links = $paragraph->get('field_oe_social_media_links')->getValue(); + $variables['links'] = []; + foreach ($links as $key => $link) { + $variables['links'][$key]['icon_position'] = 'before'; + $variables['links'][$key]['icon']['path'] = $variables['bcl_icon_path']; + $variables['links'][$key]['icon']['name'] = $link['link_type']; + $variables['links'][$key]['label'] = $link['title']; + $variables['links'][$key]['path'] = Url::fromUri($link['uri'])->toString(); + } + if (!$paragraph->get('field_oe_social_media_see_more')->isEmpty()) { + $other_link = $paragraph->get('field_oe_social_media_see_more') + ->first() + ->getValue(); + $variables['links'][] = [ + 'label' => $other_link['title'], + 'path' => Url::fromUri($other_link['uri'])->toString(), + ]; + } +} + +/** + * Implements hook_preprocess_paragraph__oe_accordion(). + */ +function oe_whitelabel_preprocess_paragraph__oe_accordion(array &$variables): void { + // Massage data to be compliant with OE Bootstrap Theme accordion component + // data structure. + $builder = \Drupal::entityTypeManager()->getViewBuilder('paragraph'); + $variables['items'] = []; + + /** @var \Drupal\entity_reference_revisions\Plugin\Field\FieldType\EntityReferenceRevisionsItem $field_item */ + foreach ($variables['paragraph']->get('field_oe_paragraphs') as $field_item) { + $paragraph = \Drupal::service('entity.repository')->getTranslationFromContext($field_item->entity); + $variables['items'][] = [ + 'title' => $builder->viewField($paragraph->get('field_oe_text')), + 'content' => $builder->viewField($paragraph->get('field_oe_text_long')), + ]; + } +} + +/** + * Implements hook_preprocess_paragraph() for paragraph--oe-text-feature-media.html.twig. + */ +function oe_whitelabel_preprocess_paragraph__oe_text_feature_media(array &$variables): void { + /** @var \Drupal\paragraphs\Entity\Paragraph $paragraph */ + $paragraph = $variables['paragraph']; + + // Bail out if there is no media present. + if ($paragraph->get('field_oe_media')->isEmpty()) { + return; + } + + /** @var \Drupal\media\Entity\Media $media */ + $media = $paragraph->get('field_oe_media')->entity; + if (!$media instanceof MediaInterface) { + // The media entity is not available anymore, bail out. + return; + } + + // Retrieve the correct media translation. + /** @var \Drupal\media\Entity\Media $media */ + $media = \Drupal::service('entity.repository')->getTranslationFromContext($media, $paragraph->language()->getId()); + + // Caches are handled by the formatter usually. Since we are not rendering + // the original render arrays, we need to propagate our caches to the + // paragraph template. + $cacheability = CacheableMetadata::createFromRenderArray($variables); + $cacheability->addCacheableDependency($media); + + // Run access checks on the media entity. + $access = $media->access('view', $variables['user'], TRUE); + $cacheability->addCacheableDependency($access); + if (!$access->isAllowed()) { + $cacheability->applyTo($variables); + return; + } + + // Get the media source. + $source = $media->getSource(); + + $is_image = $source instanceof MediaAvPortalPhotoSource || $source instanceof Image; + $is_video = $source instanceof MediaAvPortalVideoSource || $source instanceof OEmbed || $source instanceof Iframe; + + // If it's not an image and not a video, bail out. + if (!$is_image && !$is_video) { + $cacheability->applyTo($variables); + return; + } + + $variant = $paragraph->get('oe_paragraphs_variant')->value ?? 'default'; + $variables['text_position'] = str_replace([ + '_featured', + '_simple', + ], '', $variant); + + if ($is_image) { + $thumbnail = $media->get('thumbnail')->first(); + $variables['image'] = ImageValueObject::fromStyledImageItem($thumbnail, 'oe_bootstrap_theme_medium_no_crop'); + } + elseif ($is_video) { + _oe_whitelabel_featured_media_set_embedded_media($variables, $media, $cacheability, $source); + } + + $cacheability->applyTo($variables); + + if (empty($paragraph->get('field_oe_link')->first())) { + return; + } + + /** @var \Drupal\link\Plugin\Field\FieldType\LinkItem $link_item */ + $link_item = $paragraph->get('field_oe_link')->first(); + $variables['link'] = [ + 'path' => $link_item->getUrl()->toString(), + 'label' => $link_item->get('title')->getValue(), + ]; +} + +/** + * Implements hook_preprocess_paragraph() for paragraph--oe-list-item-block.html.twig. + */ +function oe_whitelabel_preprocess_paragraph__oe_list_item_block(array &$variables): void { + /** @var \Drupal\paragraphs\Entity\Paragraph $paragraph */ + $paragraph = $variables['paragraph']; + + // @todo Use ->isEmpty() as in other preprocess functions. + // In the OpenEuropa team it was decided that ->isEmpty() calls should be + // the preferred way to deal with empty field values. + // This function instead relies on ->value or ->first() returning NULL for + // empty fields, which the team is not fully confident about, and which does + // not follow the team convention. + // It was agreed to keep it like this for now in this function, but refactor + // it in the future. + // See also https://www.drupal.org/project/drupal/issues/3268137. + $variables['variant'] = $paragraph->get('oe_paragraphs_variant')->value; + $variables['title'] = $paragraph->get('field_oe_title')->value; + + $layout_name = $paragraph->get('field_oe_list_item_block_layout')->value; + $variables['columns'] = ['two_columns' => '2', 'three_columns' => '3'][$layout_name] ?? '1'; + + $variables['items'] = []; + foreach ($variables['paragraph']->get('field_oe_paragraphs') as $card_paragraph_item) { + /** @var \Drupal\paragraphs\ParagraphInterface $card_paragraph */ + $card_paragraph = $card_paragraph_item->entity; + + /** @var \Drupal\file\Plugin\Field\FieldType\FileFieldItemList $card_image_items */ + $card_image_items = $card_paragraph->get('field_oe_image'); + /** @var \Drupal\file\FileInterface|null $card_image_file */ + $card_image_file = $card_image_items->entity; + $card_image = $card_image_file ? [ + 'path' => file_url_transform_relative(file_create_url($card_image_file->getFileUri())), + 'alt' => $card_image_items->alt, + ] : []; + + // Prepare the metas if available. + $card_badges = []; + foreach ($card_paragraph->get('field_oe_meta') as $meta_item) { + $card_badges[] = $meta_item->value; + } + + $card_title = $card_paragraph->get('field_oe_title')->value; + /** @var \Drupal\link\LinkItemInterface|null $card_link_item */ + $card_link_item = $card_paragraph->get('field_oe_link')->first(); + $variables['items'][] = [ + 'title' => $card_title, + 'url' => $card_link_item ? $card_link_item->getUrl() : '', + 'text' => $card_paragraph->get('field_oe_text_long')->value, + 'image' => $card_image, + 'badges' => $card_badges, + ]; + } + + // Prepare the button variables if a link has been specified. + /** @var \Drupal\link\Plugin\Field\FieldType\LinkItem $link_item */ + $link_item = $paragraph->get('field_oe_link')->first(); + $variables['link'] = $link_item ? [ + 'path' => $link_item->getUrl()->toString(), + 'label' => $link_item->title, + 'icon' => [ + 'path' => $variables['bcl_icon_path'], + 'name' => 'chevron-right', + ], + ] : NULL; +} + +/** + * Implements hook_preprocess_paragraph() for oe_banner paragraph. + */ +function oe_whitelabel_preprocess_paragraph__oe_banner(array &$variables): void { + /** @var Drupal\paragraphs\Entity\Paragraph $paragraph */ + $paragraph = $variables['paragraph']; + $variables['title'] = $paragraph->get('field_oe_title')->value; + $variables['description'] = $paragraph->get('field_oe_text')->value; + $variables['full_width'] = (bool) $paragraph->get('field_oe_banner_full_width')->value; + oe_whitelabel_set_banner_link($paragraph, $variables); + + // The alignment field value contains the information regarding the pattern + // type and centering. + $alignment = $paragraph->get('field_oe_banner_type')->value; + [$banner_type, $banner_alignment] = explode('_', $alignment); + // The beginning of the string determines the pattern. + $variables['pattern'] = 'banner_' . $banner_type; + // The end of the string determines the position. + $variables['alignment'] = $banner_alignment; + + $variant = $paragraph->get('oe_paragraphs_variant')->value ?? 'default'; + $variables['variant'] = str_replace('oe_banner_', '', $variant); + + if ($variables['variant'] === 'default' || $variables['variant'] === 'primary') { + return; + } + + // Bail out if there is no media present. + if ($paragraph->get('field_oe_media')->isEmpty()) { + return; + } + $cacheability = CacheableMetadata::createFromRenderArray($variables); + + /** @var \Drupal\media\Entity\Media $media */ + $media = $paragraph->get('field_oe_media')->entity; + if (!$media instanceof MediaInterface) { + // The media entity is not available anymore, bail out. + return; + } + + // Retrieve the correct translation to display. + $media = \Drupal::service('entity.repository')->getTranslationFromContext($media, $paragraph->language()->getId()); + + // Caches are handled by the formatter usually. Since we are not rendering + // the original render arrays, we need to propagate our caches to the + // paragraph template. + $cacheability->addCacheableDependency($media); + + // Run access checks on the media entity. + $access = $media->access('view', $variables['user'], TRUE); + $cacheability->addCacheableDependency($access); + if (!$access->isAllowed()) { + $cacheability->applyTo($variables); + return; + } + + $source = $media->getSource(); + // We only support images and AV Portal photos for now. + if (!$source instanceof MediaAvPortalSourceInterface && !$source instanceof Image) { + $cacheability->applyTo($variables); + return; + } + + $uri = oe_whitelabel_get_media_uri($source, $media, $cacheability); + + // The uri might be empty if the source is of type Image and the file entity + // was deleted. + if (empty($uri)) { + $cacheability->applyTo($variables); + return; + } + + $variables['image'] = ImageValueObject::fromArray([ + 'src' => file_create_url($uri), + 'alt' => $source->getMetadata($media, 'thumbnail_alt_value') ?? $media->label(), + 'name' => $media->getName(), + ]); + $cacheability->applyTo($variables); +} + +/** + * Implements hook_preprocess_paragraph() for timeline paragraph. + */ +function oe_whitelabel_preprocess_paragraph__oe_timeline(array &$variables): void { + $paragraph = $variables['paragraph']; + if (!$paragraph->get('field_oe_title')->isEmpty()) { + $variables['heading'] = $paragraph->get('field_oe_title')->value; + } + + if (!isset($variables['content']['field_oe_timeline']['#items'])) { + return; + } + // Adapting body to content as defined in pattern. + foreach ($variables['content']['field_oe_timeline']['#items'] as &$timeline_item) { + $timeline_item['content'] = $timeline_item['body']; + unset($timeline_item['body']); + $variables['content']['items'][] = $timeline_item; + } + $variables['hide_from'] = $paragraph->get('field_oe_timeline_expand')->value; +} + +/** + * Implements hook_preprocess_paragraph() for paragraph--oe-content-row--variant-inpage-navigation.html.twig. + */ +function oe_whitelabel_preprocess_paragraph__oe_content_row__variant_inpage_navigation(array &$variables): void { + /** @var \Drupal\paragraphs\Entity\Paragraph $paragraph */ + $paragraph = $variables['paragraph']; + + if ($paragraph->get('field_oe_paragraphs')->isEmpty()) { + return; + } + + $variables['attributes']['id'] = Html::getUniqueId('bcl-inpage-navigation-pid-' . $paragraph->id()); + + $variables['title'] = t('Page contents'); + if (!$paragraph->get('field_oe_title')->isEmpty()) { + $variables['title'] = $paragraph->get('field_oe_title')->value; + } + + $field_render = &$variables['content']['field_oe_paragraphs']; + $links = []; + foreach ($paragraph->get('field_oe_paragraphs')->referencedEntities() as $delta => $sub_paragraph) { + /** @var \Drupal\paragraphs\Entity\Paragraph $sub_paragraph */ + if (!$sub_paragraph->hasField('field_oe_title') || $sub_paragraph->get('field_oe_title')->isEmpty()) { + continue; + } + + $unique_id = Html::getUniqueId('bcl-inpage-item-' . $sub_paragraph->id()); + $field_render[$delta]['#theme_wrappers']['container'] = [ + '#attributes' => ['id' => $unique_id], + ]; + + $sub_paragraph = \Drupal::service('entity.repository') + ->getTranslationFromContext($sub_paragraph, $paragraph->language()->getId()); + + $links[] = [ + 'path' => '#' . $unique_id, + 'label' => $sub_paragraph->get('field_oe_title')->first()->value, + ]; + } + + $variables['links'] = $links; +} + +/** + * Implements hook_preprocess_paragraph() for oe_description-list paragraph. + */ +function oe_whitelabel_preprocess_paragraph__oe_description_list(array &$variables): void { + /** @var Drupal\paragraphs\Entity\Paragraph $paragraph */ + $paragraph = $variables['paragraph']; + $variables['title'] = $paragraph->get('field_oe_title')->value ?? ''; + $variables['orientation'] = $paragraph->get('oe_bt_orientation')->value; + + foreach ($paragraph->get('field_oe_description_list_items') as $item) { + $variables['items'][] = [ + 'term' => $item->term, + 'definition' => $item->description, + ]; + } +} + +/** + * Implements hook_preprocess_paragraph(). + */ +function oe_whitelabel_preprocess_paragraph__oe_facts_figures(array &$variables): void { + /** @var \Drupal\paragraphs\ParagraphInterface $paragraph */ + $paragraph = $variables['paragraph']; + if (!$paragraph->get('field_oe_title')->isEmpty()) { + $variables['title'] = $paragraph->get('field_oe_title')->value; + } + + if (!$paragraph->get('field_oe_link')->isEmpty()) { + $link_item = $paragraph->get('field_oe_link')->first(); + $variables['link_more']['path'] = $link_item->getUrl()->toString(); + $variables['link_more']['label'] = $link_item->get('title')->getValue(); + } + $variables['items'] = []; + + /** @var \Drupal\paragraphs\Entity\Paragraph $sub_paragraph */ + foreach ($paragraph->get('field_oe_paragraphs')->referencedEntities() as $sub_paragraph) { + // Get the paragraph translation. + $sub_paragraph = \Drupal::service('entity.repository') + ->getTranslationFromContext($sub_paragraph, $paragraph->language()->getId()); + $description = ''; + if (!$sub_paragraph->get('field_oe_plain_text_long')->isEmpty()) { + $description = $sub_paragraph->get('field_oe_plain_text_long')->value; + } + $variables['items'][] = [ + 'icon' => $sub_paragraph->get('field_oe_icon')->value, + 'title' => $sub_paragraph->get('field_oe_title')->value, + 'subtitle' => $sub_paragraph->get('field_oe_subtitle')->value, + 'description' => $description, + ]; + } + + if (!$paragraph->get('oe_bt_n_columns')->isEmpty()) { + $variables['columns'] = $paragraph->get('oe_bt_n_columns')->value; + } +} + +/** + * Sets link variable for banner paragraph. + * + * @param \Drupal\paragraphs\Entity\Paragraph $paragraph + * The paragraph. + * @param array $variables + * The render array. + */ +function oe_whitelabel_set_banner_link(Paragraph $paragraph, array &$variables): void { + if ($paragraph->get('field_oe_link')->isEmpty()) { + return; + } + + $link = $paragraph->get('field_oe_link')->first(); + $variables['url'] = $link->getUrl()->toString(); + $variables['label'] = $link->get('title')->getValue(); +} + +/** + * Gets the uri from a media object. + * + * @param \Drupal\media\MediaSourceInterface $source + * The media source. + * @param \Drupal\media\Entity\Media $media + * The media object. + * @param \Drupal\Core\Cache\CacheableMetadata $cacheability + * The cacheability object. + * + * @return string + * The uri string. + */ +function oe_whitelabel_get_media_uri(MediaSourceInterface $source, Media $media, CacheableMetadata $cacheability): string { + $field_name = $source->getConfiguration()['source_field']; + + if ($source instanceof Image && ($file_entity = $media->get($field_name)->entity)) { + $cacheability->addCacheableDependency($file_entity); + return $file_entity->getFileUri(); + } + + if ($source instanceof MediaAvPortalSourceInterface) { + $resource_ref = $media->get($field_name)->value; + return 'avportal://' . $resource_ref . '.jpg'; + } + + return ''; +} + +/** + * Prepares embedded media variables for "text with featured media" paragraph. + * + * @param array $variables + * The render array. + * @param \Drupal\media\MediaInterface $media + * Media object. + * @param \Drupal\Core\Cache\CacheableMetadata $cacheability + * CacheableMetadata object. + * @param \Drupal\media\MediaSourceInterface $source + * Media source. + */ +function _oe_whitelabel_featured_media_set_embedded_media(array &$variables, MediaInterface $media, CacheableMetadata $cacheability, MediaSourceInterface $source): void { + // Default video aspect ratio is set to 16x9. + $variables['ratio'] = '16x9'; + + // Load information about the media and the display. + $media_type = \Drupal::entityTypeManager()->getStorage('media_type')->load($media->bundle()); + $cacheability->addCacheableDependency($media_type); + $source_field = $source->getSourceFieldDefinition($media_type); + $display = EntityViewDisplay::collectRenderDisplay($media, 'default'); + $cacheability->addCacheableDependency($display); + $display_options = $display->getComponent($source_field->getName()); + + $variables['embedded_media'] = $media->{$source_field->getName()}->view($display_options); + + if ($media->bundle() === 'video_iframe') { + $ratio = $media->get('oe_media_iframe_ratio')->value; + $variables['ratio'] = str_replace('_', 'x', $ratio); + } +} diff --git a/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.post_update.php b/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.post_update.php new file mode 100644 index 0000000000000000000000000000000000000000..4806627ebb80a171c1b33b845708d3d57c3ca7ac --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.post_update.php @@ -0,0 +1,65 @@ +<?php + +/** + * @file + * Post update functions for the OE Bootstrap theme paragraphs module. + */ + +declare(strict_types = 1); + +use Drupal\oe_whitelabel\ConfigImporter; + +/** + * Add extra fields to description list paragraph. + */ +function oe_whitelabel_paragraphs_post_update_00001(array &$sandbox): void { + \Drupal::service('module_installer')->install(['oe_paragraphs_description_list']); + + $configs = [ + 'field.storage.paragraph.oe_bt_orientation', + 'field.field.paragraph.oe_description_list.oe_bt_orientation', + 'core.entity_form_display.paragraph.oe_description_list.default', + 'core.entity_view_display.paragraph.oe_description_list.default', + ]; + + ConfigImporter::importMultiple('oe_whitelabel_paragraphs', '/config/post_updates/00001/', $configs, TRUE); +} + +/** + * Hides the field icon at Accordion item paragraph. + */ +function oe_whitelabel_paragraphs_post_update_00002(array &$sandbox): void { + $configs = [ + 'core.entity_form_display.paragraph.oe_accordion_item.default', + 'core.entity_view_display.paragraph.oe_accordion_item.default', + ]; + + ConfigImporter::importMultiple('oe_whitelabel_paragraphs', '/config/post_updates/00002/', $configs, TRUE); +} + +/** + * Display new layout field at facts&figures paragraph. + */ +function oe_whitelabel_paragraphs_post_update_00003(array &$sandbox): void { + $configs = [ + 'field.storage.paragraph.oe_bt_n_columns', + 'field.field.paragraph.oe_facts_figures.oe_bt_n_columns', + 'core.entity_form_display.paragraph.oe_facts_figures.default', + 'core.entity_view_display.paragraph.oe_facts_figures.default', + ]; + + ConfigImporter::importMultiple('oe_whitelabel_paragraphs', '/config/post_updates/00003/', $configs, TRUE); +} + +/** + * Form modes for variants of list paragraphs. + */ +function oe_whitelabel_paragraphs_post_update_00004(array &$sandbox): void { + $configs = [ + 'core.entity_form_display.paragraph.oe_list_item_block.default', + 'core.entity_form_display.paragraph.oe_list_item_block.highlight', + 'core.entity_form_display.paragraph.oe_list_item.default', + ]; + + ConfigImporter::importMultiple('oe_whitelabel_paragraphs', '/config/post_updates/00003/', $configs, TRUE); +} diff --git a/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.services.yml b/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.services.yml new file mode 100644 index 0000000000000000000000000000000000000000..5dfebd8df61f745e482f6c0940c9b5c145573723 --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.services.yml @@ -0,0 +1,5 @@ +services: + oe_whitelabel_paragraphs.icon_options_subscriber: + class: 'Drupal\oe_whitelabel_paragraphs\EventSubscriber\IconOptionsSubscriber' + tags: + - { name: 'event_subscriber' } diff --git a/modules/oe_whitelabel_paragraphs/src/EventSubscriber/IconOptionsSubscriber.php b/modules/oe_whitelabel_paragraphs/src/EventSubscriber/IconOptionsSubscriber.php new file mode 100644 index 0000000000000000000000000000000000000000..38785ea5ba0d0797601e9d7545f49afe6ff8bf6b --- /dev/null +++ b/modules/oe_whitelabel_paragraphs/src/EventSubscriber/IconOptionsSubscriber.php @@ -0,0 +1,57 @@ +<?php + +declare(strict_types = 1); + +namespace Drupal\oe_whitelabel_paragraphs\EventSubscriber; + +use Drupal\oe_paragraphs\Event\IconOptionsEvent; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Provides options for the icon field. + * + * @see \Drupal\oe_paragraphs\EventSubscriber\OptionsSubscriber + * @see _oe_paragraphs_allowed_values_icons() + */ +class IconOptionsSubscriber implements EventSubscriberInterface { + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents(): array { + return [ + IconOptionsEvent::class => ['getIconOptions', -1], + ]; + } + + /** + * Gets the icon options. + * + * @param \Drupal\oe_paragraphs\Event\IconOptionsEvent $event + * Allowed format event object. + */ + public function getIconOptions(IconOptionsEvent $event): void { + $event->setIconOptions([ + 'arrow-down' => 'Arrow down', + 'box-arrow-up' => 'External', + 'arrow-up' => 'Arrow up', + 'book' => 'Book', + 'camera' => 'Camera', + 'check' => 'Check', + 'download' => 'Download', + 'currency-euro' => 'Euro', + 'facebook' => 'Facebook', + 'file' => 'File', + 'image' => 'Image', + 'info' => 'Info', + 'linkedin' => 'LinkedIn', + 'files' => 'Multiple files', + 'rss' => 'RSS', + 'search' => 'Search', + 'share' => 'Share', + 'twitter' => 'Twitter', + 'camera-video' => 'Video', + ]); + } + +}