From 121be7a16863184268991d3ea865d8ea95daed55 Mon Sep 17 00:00:00 2001
From: Herve Donner <hervedonner@gmail.com>
Date: Wed, 23 Oct 2024 11:27:06 +0200
Subject: [PATCH] Revert "ISAICP-8958: WIP fix libraries dependencies."

This reverts commit 7eb5f88c6a6df455204ddb3d9b596b60d6fe07b7.
---
 web/themes/iop/iop.libraries.yml         |  8 +--
 web/themes/ventuno/ventuno.libraries.yml | 63 +++++++++++-------------
 2 files changed, 34 insertions(+), 37 deletions(-)

diff --git a/web/themes/iop/iop.libraries.yml b/web/themes/iop/iop.libraries.yml
index de003a5133..0b8806b54f 100644
--- a/web/themes/iop/iop.libraries.yml
+++ b/web/themes/iop/iop.libraries.yml
@@ -8,8 +8,9 @@ components:
     - iop/components.js
 
 components.js:
+  header: true
   js:
-    assets/js/oe-bcl-joinup.bundle.min.js: { minified: true }
+    assets/js/oe-bcl-joinup.bundle.min.js: { minified: true, attributes: { defer: true } }
   dependencies:
     - core/drupal
 
@@ -77,10 +78,9 @@ paragraph__carousel:
     - iop/paragraph__carousel.js
 
 paragraph__carousel.js:
+  header: true
   js:
-    assets/js/glide.min.js: { minified: true  }
-  dependencies:
-    - core/drupal
+    assets/js/glide.min.js: { minified: true, attributes: { defer: true }  }
 
 paragraph__image:
   css:
diff --git a/web/themes/ventuno/ventuno.libraries.yml b/web/themes/ventuno/ventuno.libraries.yml
index b16458fa44..6f03acae12 100644
--- a/web/themes/ventuno/ventuno.libraries.yml
+++ b/web/themes/ventuno/ventuno.libraries.yml
@@ -25,8 +25,9 @@ components:
     - ventuno/components.js
 
 components.js:
+  header: true
   js:
-    assets/js/oe-bcl-joinup.bundle.min.js: { minified: true }
+    assets/js/oe-bcl-joinup.bundle.min.js: { minified: true, attributes: { defer: true } }
   dependencies:
     - core/drupal
 
@@ -82,7 +83,7 @@ group:
     theme:
       assets/css/group.min.css: { minified: true }
   js:
-    assets/js/sticky-groupheader.min.js: { minified: true }
+    assets/js/sticky-groupheader.min.js: { minified: true, attributes: { defer: true } }
   dependencies:
     - core/drupal
     - core/drupal.displace
@@ -106,8 +107,9 @@ actions-menu:
       assets/css/actions-menu.min.css: { minified: true }
 
 ajax-throbber:
+  header: true
   js:
-    assets/js/ajax-throbber.min.js: { minified: true }
+    assets/js/ajax-throbber.min.js: { minified: true, attributes: { defer: true } }
   css:
     theme:
       assets/css/ajax-throbber.min.css: { minified: true }
@@ -120,7 +122,7 @@ alert:
     theme:
       assets/css/alert.min.css: { minified: true }
   js:
-    assets/js/alert.min.js: { minified: true }
+    assets/js/alert.min.js: {  }
   dependencies:
     - ventuno/close
     - core/drupalSettings
@@ -158,8 +160,9 @@ image-gallery:
     - ventuno/carousel-theme
 
 carousel.js:
+  header: true
   js:
-    assets/js/carousel.min.js: { minified: true }
+    assets/js/carousel.min.js: { minified: true, attributes: { defer: true } }
   dependencies:
     - ventuno/glide
     - core/drupal
@@ -200,10 +203,10 @@ etrans:
       assets/css/etrans.min.css: { minified: true }
 
 explore-block:
+  header: true
   js:
-    assets/js/explore-block.min.js: { minified: true }
+    assets/js/explore-block.min.js: { minified: true, attributes: { defer: true } }
   dependencies:
-    - core/drupal
     - ventuno/glide
 
 fieldset-show-more:
@@ -214,8 +217,9 @@ fieldset-show-more:
     - ventuno/fieldset-show-more.js
 
 fieldset-show-more.js:
+  header: true
   js:
-    assets/js/fieldset-show-more.min.js: { minified: true }
+    assets/js/fieldset-show-more.min.js: { minified: true, attributes: { defer: true } }
   dependencies:
     - core/drupal
     - core/once
@@ -243,10 +247,9 @@ webform:
       assets/css/webform.min.css: { minified: true }
 
 highlight-invalid-fields.js:
+  header: true
   js:
-    assets/js/highlight-invalid-fields.min.js: { minified: true }
-  dependencies:
-    - core/drupal
+    assets/js/highlight-invalid-fields.min.js: { minified: true, attributes: { defer: true } }
 
 glide:
   css:
@@ -324,7 +327,6 @@ navbar:
   js:
     assets/js/navbar-hover-dropdown.min.js: { minified: true }
   dependencies:
-    - core/drupal
     - core/once
 
 mmenu:
@@ -347,16 +349,20 @@ navbar-search:
     - ventuno/searchbox-focus.js
 
 searchbox-focus.js:
+  header: true
   js:
-    assets/js/searchbox-focus.min.js: { minified: true }
-  dependencies:
-    - core/drupal
+    assets/js/searchbox-focus.min.js: { minified: true, attributes: { defer: true } }
 
 navigation-bottom:
   css:
     theme:
       assets/css/navigation-bottom.min.css: { minified: true }
 
+outdated-content-notice:
+  header: true
+  js:
+    assets/js/outdated-content-notice.min.js: { minified: true, attributes: { defer: true } }
+
 page-title:
   css:
     theme:
@@ -372,10 +378,7 @@ paragraph:
     theme:
       assets/css/paragraph.min.css: { minified: true }
   js:
-    assets/js/paragraph-inline-img.min.js: { minified: true }
-  dependencies:
-    - core/drupal
-    - core/once
+    assets/js/paragraph-inline-img.min.js: { minified: true, attributes: { defer: true } }
 
 paragraph__accordion:
   dependencies:
@@ -427,9 +430,6 @@ see-more:
       assets/css/see-more.min.css: { minified: true }
   js:
     assets/js/toggle-text-seemore-btn.min.js: { minified: true }
-  dependencies:
-    - core/drupal
-    - core/drupalSettings
 
 share-content-form:
   css:
@@ -437,16 +437,16 @@ share-content-form:
       assets/css/share-content-form.min.css: { minified: true }
 
 shared-entity:
+  header: true
   js:
-    assets/js/shared-entity.min.js: { minified: true }
+    assets/js/shared-entity.min.js: { minified: true, attributes: { defer: true } }
   dependencies:
     - core/drupalSettings
 
 show-accordion-invalid-fields:
+  header: true
   js:
-    assets/js/show-accordion-invalid-fields.min.js: { minified: true }
-  dependencies:
-    - core/drupal
+    assets/js/show-accordion-invalid-fields.min.js: { minified: true, attributes: { defer: true } }
 
 spinners:
   css:
@@ -471,11 +471,9 @@ tables:
     - ventuno/responsive-tables.js
 
 responsive-tables.js:
+  header: true
   js:
-    assets/js/responsive-tables.min.js: { minified: true }
-  dependencies:
-    - core/drupal
-    - core/once
+    assets/js/responsive-tables.min.js: { minified: true, attributes: { defer: true } }
 
 tabs:
   css:
@@ -498,10 +496,9 @@ toolbar:
       assets/css/toolbar.min.css: { minified: true }
 
 tour-first-balloon:
+  header: true
   js:
-    assets/js/tour-first-balloon.min.js: { minified: true }
-  dependencies:
-    - core/drupal
+    assets/js/tour-first-balloon.min.js: { minified: true, attributes: { defer: true } }
 
 user--group-header:
   css:
-- 
GitLab