From 85a73c742a21888461b70533353383fbbe078ab5 Mon Sep 17 00:00:00 2001 From: bach Date: Tue, 3 Sep 2024 13:02:22 +0200 Subject: [PATCH] thesaurus straw --- composer.json | 1 + composer.lock | 59 ++++++++++++++++++- ...ity_form_display.node.materiau.default.yml | 19 +++--- config/sync/core.extension.yml | 1 + ...ld.field.node.materiau.field_thesaurus.yml | 4 +- .../gdpr_fields.gdpr_fields_config.node.yml | 2 +- config/sync/user.role.root.yml | 11 +++- 7 files changed, 80 insertions(+), 17 deletions(-) diff --git a/composer.json b/composer.json index d1d72c22..e437e037 100644 --- a/composer.json +++ b/composer.json @@ -138,6 +138,7 @@ "drupal/simplenews": "^4.0", "drupal/simplenews_mailjet_subscriptions": "^1.3", "drupal/social_media_links": "^2.8", + "drupal/straw": "^2.0@beta", "drupal/string_translation_ui": "^2.0", "drupal/structure_sync": "^2.0", "drupal/symfony_mailer": "^1", diff --git a/composer.lock b/composer.lock index 8517fc7a..7bc4e4bc 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c06b6f15da536261ffb851027ab3ec9a", + "content-hash": "656f1adeff23fd80dc3c84e225dffb91", "packages": [ { "name": "algolia/places", @@ -11694,6 +11694,62 @@ "source": "https://git.drupalcode.org/project/state_machine" } }, + { + "name": "drupal/straw", + "version": "2.0.0-beta1", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/straw.git", + "reference": "2.0.0-beta1" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/straw-2.0.0-beta1.zip", + "reference": "2.0.0-beta1", + "shasum": "c52f76962eb236057ed2505b2016d71984797f26" + }, + "require": { + "drupal/core": "^9 || ^10 || ^11" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "2.0.0-beta1", + "datestamp": "1717271050", + "security-coverage": { + "status": "not-covered", + "message": "Beta releases are not covered by Drupal security advisories." + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "brian.seek", + "homepage": "https://www.drupal.org/user/2625761" + }, + { + "name": "camprandall", + "homepage": "https://www.drupal.org/user/1837862" + }, + { + "name": "jcnventura", + "homepage": "https://www.drupal.org/user/122464" + }, + { + "name": "mikeegoulding", + "homepage": "https://www.drupal.org/user/2867877" + } + ], + "description": "Adds a form widget for seeing and editing the whole term hierarchy in an autocomplete.", + "homepage": "https://drupal.org/project/straw", + "support": { + "source": "https://git.drupalcode.org/project/straw" + } + }, { "name": "drupal/string_translation_ui", "version": "2.0.1", @@ -21014,6 +21070,7 @@ "drupal/search_api_page": 20, "drupal/select_translation": 15, "drupal/session_limit": 10, + "drupal/straw": 10, "drupal/telephone_formatter": 10, "drupal/views_field_view": 10, "drupal/bulkdelete": 20, diff --git a/config/sync/core.entity_form_display.node.materiau.default.yml b/config/sync/core.entity_form_display.node.materiau.default.yml index e9c2d385..a3209174 100644 --- a/config/sync/core.entity_form_display.node.materiau.default.yml +++ b/config/sync/core.entity_form_display.node.materiau.default.yml @@ -26,12 +26,12 @@ dependencies: - node.type.materiau module: - computed_field - - cshs - field_group - file - image - materio_samples - path + - straw - text - video_embed_field third_party_settings: @@ -297,7 +297,7 @@ content: third_party_settings: { } field_tags: type: entity_reference_autocomplete - weight: 12 + weight: 36 region: content settings: match_operator: CONTAINS @@ -306,17 +306,14 @@ content: placeholder: '' third_party_settings: { } field_thesaurus: - type: cshs - weight: 11 + type: super_term_reference_autocomplete_widget + weight: 35 region: content settings: - save_lineage: false - force_deepest: false - parent: null - level_labels: '' - hierarchy_depth: 0 - required_depth: 0 - none_label: '- Please select -' + match_operator: STARTS_WITH + match_limit: '0' + size: '60' + placeholder: '' third_party_settings: { } field_video: type: video_embed_field_textfield diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index ab57d3e3..8999e419 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -187,6 +187,7 @@ module: social_media_links: 0 sophron: 0 state_machine: 0 + straw: 0 string_translation_ui: 0 structure_sync: 0 symfony_mailer: 0 diff --git a/config/sync/field.field.node.materiau.field_thesaurus.yml b/config/sync/field.field.node.materiau.field_thesaurus.yml index 1d24c359..37a3f880 100644 --- a/config/sync/field.field.node.materiau.field_thesaurus.yml +++ b/config/sync/field.field.node.materiau.field_thesaurus.yml @@ -25,13 +25,13 @@ translatable: false default_value: { } default_value_callback: '' settings: - handler: 'default:taxonomy_term' + handler: straw handler_settings: target_bundles: thesaurus: thesaurus sort: field: name direction: asc - auto_create: false + auto_create: 0 auto_create_bundle: '' field_type: entity_reference diff --git a/config/sync/gdpr_fields.gdpr_fields_config.node.yml b/config/sync/gdpr_fields.gdpr_fields_config.node.yml index 8325a8f8..fb8de68f 100644 --- a/config/sync/gdpr_fields.gdpr_fields_config.node.yml +++ b/config/sync/gdpr_fields.gdpr_fields_config.node.yml @@ -239,7 +239,7 @@ bundles: enabled: false rta: 'no' rtf: 'no' - anonymizer: '' + anonymizer: email_anonymizer notes: '' relationship: 0 sars_filename: '' diff --git a/config/sync/user.role.root.yml b/config/sync/user.role.root.yml index efdc9da9..0af85559 100644 --- a/config/sync/user.role.root.yml +++ b/config/sync/user.role.root.yml @@ -1,11 +1,18 @@ uuid: 64d7b66e-e495-4c9d-9394-449a43e55ec1 langcode: fr status: true -dependencies: { } +dependencies: + module: + - field_permissions _core: default_config_hash: TBu83Sl_ckotQqV22pDBGe0jLnR1nLyiVeVVnYJX_kQ id: root label: Root weight: 2 is_admin: true -permissions: { } +permissions: + - 'create field_thesaurus' + - 'edit field_thesaurus' + - 'edit own field_thesaurus' + - 'view field_thesaurus' + - 'view own field_thesaurus'