diff --git a/core/core.libraries.yml b/core/core.libraries.yml index 9f17f189f50d8f98700648ecd07428dd2442b67b..7df34ed0ea2c663f93410ba5085b5c32146a493d 100644 --- a/core/core.libraries.yml +++ b/core/core.libraries.yml @@ -405,42 +405,54 @@ loadjs: js: assets/vendor/loadjs/loadjs.min.js: { minified: true } -drupal.autocomplete: +# Common files for libraries that still rely on jQuery UI components. +# @todo Remove when no longer required by drupal.autocomplete and drupal.dialog. +internal.jquery_ui: version: VERSION js: - misc/autocomplete.js: { weight: -1 } - # The remaining JavaScript assets previously came from core/jquery.ui, a - # deprecated library. # All weights are based on the requirements defined within each file. - # @todo replace with solution in https://drupal.org/node/3076171 - assets/vendor/jquery.ui/ui/widgets/autocomplete-min.js: { weight: -11.7, minified: true } assets/vendor/jquery.ui/ui/labels-min.js: { weight: -11.7, minified: true } - assets/vendor/jquery.ui/ui/widgets/menu-min.js: { weight: -11.7, minified: true } assets/vendor/jquery.ui/ui/data-min.js: { weight: -11.8, minified: true } assets/vendor/jquery.ui/ui/disable-selection-min.js: { weight: -11.8, minified: true } - assets/vendor/jquery.ui/ui/focusable-min.js: { weight: -11.8, minified: true } assets/vendor/jquery.ui/ui/form-min.js: { weight: -11.8, minified: true } - assets/vendor/jquery.ui/ui/ie-min.js: { weight: -11.8, minified: true } assets/vendor/jquery.ui/ui/jquery-patch-min.js: { weight: -11.8, minified: true } + assets/vendor/jquery.ui/ui/scroll-parent-min.js: { weight: -11.8, minified: true } + assets/vendor/jquery.ui/ui/unique-id-min.js: { weight: -11.8, minified: true } + assets/vendor/jquery.ui/ui/focusable-min.js: { weight: -11.8, minified: true } + assets/vendor/jquery.ui/ui/ie-min.js: { weight: -11.8, minified: true } assets/vendor/jquery.ui/ui/keycode-min.js: { weight: -11.8, minified: true } assets/vendor/jquery.ui/ui/plugin-min.js: { weight: -11.8, minified: true } assets/vendor/jquery.ui/ui/safe-active-element-min.js: { weight: -11.8, minified: true } assets/vendor/jquery.ui/ui/safe-blur-min.js: { weight: -11.8, minified: true } - assets/vendor/jquery.ui/ui/scroll-parent-min.js: { weight: -11.8, minified: true } - assets/vendor/jquery.ui/ui/unique-id-min.js: { weight: -11.8, minified: true } assets/vendor/jquery.ui/ui/widget-min.js: { weight: -11.8, minified: true } assets/vendor/jquery.ui/ui/version-min.js: { weight: -11.9, minified: true } + css: + component: + assets/vendor/jquery.ui/themes/base/core.css: { weight: -11.8 } + theme: + assets/vendor/jquery.ui/themes/base/theme.css: { weight: -11.8 } + dependencies: + - core/jquery + +drupal.autocomplete: + version: VERSION + js: + misc/autocomplete.js: { weight: -1 } + # The remaining JavaScript assets previously came from core/jquery.ui, a + # deprecated library. + # All weights are based on the requirements defined within each file. + # @todo replace with solution in https://drupal.org/node/3076171 + assets/vendor/jquery.ui/ui/widgets/autocomplete-min.js: { weight: -11.7, minified: true } + assets/vendor/jquery.ui/ui/widgets/menu-min.js: { weight: -11.7, minified: true } # All CSS assets previously came from core/jquery.ui, a deprecated library. # @todo replace with solution found in https://drupal.org/node/3076171 css: component: assets/vendor/jquery.ui/themes/base/autocomplete.css: { weight: -11.7 } assets/vendor/jquery.ui/themes/base/menu.css: { weight: -11.7 } - assets/vendor/jquery.ui/themes/base/core.css: { weight: -11.8 } - theme: - assets/vendor/jquery.ui/themes/base/theme.css: { weight: -11.8 } dependencies: - core/jquery + - core/internal.jquery_ui - core/drupal - core/drupalSettings - core/drupal.ajax @@ -518,22 +530,7 @@ drupal.dialog: assets/vendor/jquery.ui/ui/widgets/resizable-min.js: { weight: -11.6, minified: true } assets/vendor/jquery.ui/ui/widgets/controlgroup-min.js: { weight: -11.7, minified: true } assets/vendor/jquery.ui/ui/form-reset-mixin-min.js: { weight: -11.7, minified: true } - assets/vendor/jquery.ui/ui/labels-min.js: { weight: -11.7, minified: true } assets/vendor/jquery.ui/ui/widgets/mouse-min.js: { weight: -11.7, minified: true } - assets/vendor/jquery.ui/ui/data-min.js: { weight: -11.8, minified: true } - assets/vendor/jquery.ui/ui/disable-selection-min.js: { weight: -11.8, minified: true } - assets/vendor/jquery.ui/ui/form-min.js: { weight: -11.8, minified: true } - assets/vendor/jquery.ui/ui/jquery-patch-min.js: { weight: -11.8, minified: true } - assets/vendor/jquery.ui/ui/scroll-parent-min.js: { weight: -11.8, minified: true } - assets/vendor/jquery.ui/ui/unique-id-min.js: { weight: -11.8, minified: true } - assets/vendor/jquery.ui/ui/focusable-min.js: { weight: -11.8, minified: true } - assets/vendor/jquery.ui/ui/ie-min.js: { weight: -11.8, minified: true } - assets/vendor/jquery.ui/ui/keycode-min.js: { weight: -11.8, minified: true } - assets/vendor/jquery.ui/ui/plugin-min.js: { weight: -11.8, minified: true } - assets/vendor/jquery.ui/ui/safe-active-element-min.js: { weight: -11.8, minified: true } - assets/vendor/jquery.ui/ui/safe-blur-min.js: { weight: -11.8, minified: true } - assets/vendor/jquery.ui/ui/widget-min.js: { weight: -11.8, minified: true } - assets/vendor/jquery.ui/ui/version-min.js: { weight: -11.9, minified: true } assets/vendor/tua-body-scroll-lock/tua-bsl.umd.min.js: { weight: -1, minified: true } # All CSS assets previously came from core/jquery.ui, a deprecated library. # @todo replace with solution found in https://drupal.org/node/2158943 @@ -544,11 +541,9 @@ drupal.dialog: assets/vendor/jquery.ui/themes/base/checkboxradio.css: { weight: -11.6 } assets/vendor/jquery.ui/themes/base/resizable.css: { weight: -11.6 } assets/vendor/jquery.ui/themes/base/controlgroup.css: { weight: -11.7 } - assets/vendor/jquery.ui/themes/base/core.css: { weight: -11.8 } - theme: - assets/vendor/jquery.ui/themes/base/theme.css: { weight: -11.8 } dependencies: - core/jquery + - core/internal.jquery_ui - core/drupal - core/drupalSettings - core/drupal.debounce diff --git a/core/tests/Drupal/FunctionalTests/Libraries/JqueryUiLibraryAssetsTest.php b/core/tests/Drupal/FunctionalTests/Libraries/JqueryUiLibraryAssetsTest.php index e276f4a6d09b7dd01a88ef41ab13e198b7364e54..e9bcedaa2f3ddb1231052751251ec5477c9e18ca 100644 --- a/core/tests/Drupal/FunctionalTests/Libraries/JqueryUiLibraryAssetsTest.php +++ b/core/tests/Drupal/FunctionalTests/Libraries/JqueryUiLibraryAssetsTest.php @@ -56,6 +56,7 @@ protected function setUp(): void { // All the core libraries that use jQuery UI assets. $libraries_to_check = [ + 'internal.jquery_ui', 'drupal.autocomplete', 'drupal.dialog', ]; diff --git a/core/themes/claro/claro.info.yml b/core/themes/claro/claro.info.yml index 1f4ce4a80dfb97d9b8f934907d3856c5cd82ffef..92f2b14cc4c0d3735f94e2dbec27d0041a0f43cf 100644 --- a/core/themes/claro/claro.info.yml +++ b/core/themes/claro/claro.info.yml @@ -47,12 +47,7 @@ libraries-override: component: misc/vertical-tabs.css: false - core/drupal.autocomplete: - css: - theme: - assets/vendor/jquery.ui/themes/base/theme.css: false - - core/drupal.tabbingmanager: + core/internal.jquery_ui: css: theme: assets/vendor/jquery.ui/themes/base/theme.css: false @@ -61,8 +56,6 @@ libraries-override: css: component: assets/vendor/jquery.ui/themes/base/dialog.css: false - theme: - assets/vendor/jquery.ui/themes/base/theme.css: false user/drupal.user: css: