Unverified Commit 1c201591 authored by alexpott's avatar alexpott
Browse files

Issue #3113400 by bnjmnm, alexpott, catch, ankithashetty, sarvjeetsingh,...

Issue #3113400 by bnjmnm, alexpott, catch, ankithashetty, sarvjeetsingh, anmolgoyal74, Suresh Prabhu Parkala, lauriii, zrpnr, xjm, DamienMcKenna, nod_: Deprecate more jQuery UI library definitions
parent 986fdecf
......@@ -88,12 +88,44 @@ 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 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/tabbable-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/escape-selector-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-1-7-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/position-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 }
# 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/drupal
- core/drupalSettings
- core/drupal.ajax
- core/jquery.ui.autocomplete
drupal.array.find:
version: VERSION
......@@ -155,13 +187,54 @@ drupal.dialog:
misc/dialog/dialog.js: {}
misc/dialog/dialog.position.js: {}
misc/dialog/dialog.jquery-ui.js: {}
# The remaining JavaScript assets previously came from core/jquery.ui, a
# deprecated library.
# All weights are based on on the requirements defined within each file.
# @todo replace with solution in https://drupal.org/node/2158943
assets/vendor/jquery.ui/ui/widgets/dialog-min.js: { weight: -11.4, minified: true }
assets/vendor/jquery.ui/ui/widgets/button-min.js: { weight: -11.5, minified: true }
assets/vendor/jquery.ui/ui/widgets/checkboxradio-min.js: { weight: -11.6, minified: true }
assets/vendor/jquery.ui/ui/widgets/draggable-min.js: { weight: -11.6, minified: true }
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/tabbable-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-1-7-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/escape-selector-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/position-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 }
# All CSS assets previously came from core/jquery.ui, a deprecated library.
# @todo replace with solution found in https://drupal.org/node/2158943
css:
component:
assets/vendor/jquery.ui/themes/base/dialog.css: { weight: -11.4 }
assets/vendor/jquery.ui/themes/base/button.css: { weight: -11.5 }
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/drupal
- core/drupalSettings
- core/drupal.debounce
- core/drupal.displace
- core/jquery.ui.dialog
drupal.dialog.ajax:
version: VERSION
......@@ -265,10 +338,36 @@ drupal.tabbingmanager:
version: VERSION
js:
misc/tabbingmanager.js: {}
# The remaining JavaScript assets previously came from core/jquery.ui, a
# deprecated library. These assets are used to provide the :tabbable pseudo
# selector to core's JavaScript. It should be possible to remove them once
# :tabbable is provided via a non-jQuery UI based library.
# All weights are based on on the requirements defined within each file.
# @todo replace with solution found in https://drupal.org/node/3113649
assets/vendor/jquery.ui/ui/labels-min.js: { weight: -11.7, minified: true }
assets/vendor/jquery.ui/ui/tabbable-min.js: { weight: -11.7, 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/escape-selector-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/jquery-1-7-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/version-min.js: { weight: -11.9, minified: true }
# All CSS assets previously came from core/jquery.ui, a deprecated library.
# @todo replace with solution found in https://drupal.org/node/3113649
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
# Supplies the ':tabbable' pseudo selector.
- core/jquery.ui
- core/drupal
drupal.tabledrag:
......@@ -428,82 +527,105 @@ jquery.ui:
url: https://raw.githubusercontent.com/jquery/jquery-ui/1.12.1/LICENSE.txt
gpl-compatible: true
js:
assets/vendor/jquery.ui/ui/data-min.js: { weight: -11, minified: true }
assets/vendor/jquery.ui/ui/disable-selection-min.js: { weight: -11, minified: true }
assets/vendor/jquery.ui/ui/form-min.js: { weight: -11, minified: true }
assets/vendor/jquery.ui/ui/labels-min.js: { weight: -11, minified: true }
assets/vendor/jquery.ui/ui/jquery-1-7-min.js: { weight: -11, minified: true }
assets/vendor/jquery.ui/ui/scroll-parent-min.js: { weight: -11, minified: true }
assets/vendor/jquery.ui/ui/tabbable-min.js: { weight: -11, minified: true }
assets/vendor/jquery.ui/ui/unique-id-min.js: { weight: -11, minified: true }
assets/vendor/jquery.ui/ui/version-min.js: { weight: -11, minified: true }
assets/vendor/jquery.ui/ui/escape-selector-min.js: { weight: -11, minified: true }
assets/vendor/jquery.ui/ui/focusable-min.js: { weight: -11, minified: true }
assets/vendor/jquery.ui/ui/ie-min.js: { weight: -11, minified: true }
assets/vendor/jquery.ui/ui/keycode-min.js: { weight: -11, minified: true }
assets/vendor/jquery.ui/ui/plugin-min.js: { weight: -11, minified: true }
assets/vendor/jquery.ui/ui/safe-active-element-min.js: { weight: -11, minified: true }
assets/vendor/jquery.ui/ui/safe-blur-min.js: { weight: -11, minified: true }
assets/vendor/jquery.ui/ui/labels-min.js: { weight: -11.7, minified: true }
assets/vendor/jquery.ui/ui/tabbable-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/escape-selector-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-1-7-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/version-min.js: { weight: -11.9, minified: true }
css:
component:
assets/vendor/jquery.ui/themes/base/core.css: {}
assets/vendor/jquery.ui/themes/base/core.css: { weight: -11.8 }
theme:
assets/vendor/jquery.ui/themes/base/theme.css: {}
assets/vendor/jquery.ui/themes/base/theme.css: { weight: -11.8 }
dependencies:
- core/jquery
deprecated: &jquery_ui_unused_deprecated The "%library_id%" asset library is deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. See https://www.drupal.org/node/3067969
jquery.ui.autocomplete:
version: *jquery_ui_version
license: *jquery_ui_license
js:
assets/vendor/jquery.ui/ui/widgets/autocomplete-min.js: { minified: true }
assets/vendor/jquery.ui/ui/widgets/autocomplete-min.js: { weight: -11.7, minified: true }
css:
component:
assets/vendor/jquery.ui/themes/base/autocomplete.css: {}
assets/vendor/jquery.ui/themes/base/autocomplete.css: { weight: -11.7 }
dependencies:
- core/jquery.ui
- core/jquery.ui.widget
- core/jquery.ui.position
- core/jquery.ui.menu
deprecated: *jquery_ui_unused_deprecated
jquery.ui.button:
version: *jquery_ui_version
license: *jquery_ui_license
js:
assets/vendor/jquery.ui/ui/widgets/checkboxradio-min.js: { minified: true }
assets/vendor/jquery.ui/ui/widgets/controlgroup-min.js: { minified: true }
assets/vendor/jquery.ui/ui/widgets/button-min.js: { minified: true }
assets/vendor/jquery.ui/ui/widgets/button-min.js: { weight: -11.5, minified: true }
assets/vendor/jquery.ui/ui/widgets/checkboxradio-min.js: { weight: -11.6, minified: true }
assets/vendor/jquery.ui/ui/widgets/controlgroup-min.js: { weight: -11.7, minified: true }
css:
component:
assets/vendor/jquery.ui/themes/base/checkboxradio.css: {}
assets/vendor/jquery.ui/themes/base/controlgroup.css: {}
assets/vendor/jquery.ui/themes/base/button.css: {}
assets/vendor/jquery.ui/themes/base/button.css: { weight: -11.5 }
assets/vendor/jquery.ui/themes/base/checkboxradio.css: { weight: -11.6 }
assets/vendor/jquery.ui/themes/base/controlgroup.css: { weight: -11.7 }
dependencies:
- core/jquery.ui
- core/jquery.ui.widget
deprecated: *jquery_ui_unused_deprecated
jquery.ui.dialog:
version: *jquery_ui_version
license: *jquery_ui_license
js:
assets/vendor/jquery.ui/ui/form-reset-mixin-min.js: { minified: true }
assets/vendor/jquery.ui/ui/widgets/checkboxradio-min.js: { minified: true }
assets/vendor/jquery.ui/ui/widgets/controlgroup-min.js: { minified: true }
assets/vendor/jquery.ui/ui/widgets/button-min.js: { minified: true }
assets/vendor/jquery.ui/ui/widgets/dialog-min.js: { minified: true }
# All weights are based on on the requirements defined within each file.
assets/vendor/jquery.ui/ui/widgets/dialog-min.js: { weight: -11.4, minified: true }
assets/vendor/jquery.ui/ui/widgets/button-min.js: { weight: -11.5, minified: true }
assets/vendor/jquery.ui/ui/widgets/checkboxradio-min.js: { weight: -11.6, minified: true }
assets/vendor/jquery.ui/ui/widgets/draggable-min.js: { weight: -11.6, minified: true }
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/tabbable-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/escape-selector-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-1-7-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/position-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/checkboxradio.css: {}
assets/vendor/jquery.ui/themes/base/controlgroup.css: {}
assets/vendor/jquery.ui/themes/base/button.css: {}
assets/vendor/jquery.ui/themes/base/dialog.css: {}
dependencies:
- core/jquery.ui
- core/jquery.ui.widget
- core/jquery.ui.draggable
- core/jquery.ui.mouse
- core/jquery.ui.position
- core/jquery.ui.resizable
assets/vendor/jquery.ui/themes/base/dialog.css: { weight: -11.4 }
assets/vendor/jquery.ui/themes/base/button.css: { weight: -11.5 }
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 }
deprecated: *jquery_ui_unused_deprecated
jquery.ui.draggable:
version: *jquery_ui_version
......@@ -514,57 +636,63 @@ jquery.ui.draggable:
- core/jquery.ui
- core/jquery.ui.mouse
- core/jquery.ui.widget
deprecated: *jquery_ui_unused_deprecated
jquery.ui.menu:
version: *jquery_ui_version
license: *jquery_ui_license
js:
assets/vendor/jquery.ui/ui/widgets/menu-min.js: { minified: true }
assets/vendor/jquery.ui/ui/widgets/menu-min.js: { weight: -11.7, minified: true }
css:
component:
assets/vendor/jquery.ui/themes/base/menu.css: {}
assets/vendor/jquery.ui/themes/base/menu.css: { weight: -11.7 }
dependencies:
- core/jquery.ui
- core/jquery.ui.position
- core/jquery.ui.widget
deprecated: *jquery_ui_unused_deprecated
jquery.ui.mouse:
version: *jquery_ui_version
license: *jquery_ui_license
js:
assets/vendor/jquery.ui/ui/ie-min.js: { minified: true }
assets/vendor/jquery.ui/ui/widgets/mouse-min.js: { minified: true }
assets/vendor/jquery.ui/ui/widgets/mouse-min.js: { weight: -11.7, minified: true }
assets/vendor/jquery.ui/ui/ie-min.js: { weight: -11.8, minified: true }
dependencies:
- core/jquery.ui.widget
deprecated: *jquery_ui_unused_deprecated
jquery.ui.position:
version: *jquery_ui_version
license: *jquery_ui_license
js:
assets/vendor/jquery.ui/ui/position-min.js: { minified: true }
assets/vendor/jquery.ui/ui/position-min.js: { weight: -11.8, minified: true }
dependencies:
- core/jquery.ui
deprecated: *jquery_ui_unused_deprecated
jquery.ui.resizable:
version: *jquery_ui_version
license: *jquery_ui_license
js:
assets/vendor/jquery.ui/ui/widgets/resizable-min.js: { minified: true }
assets/vendor/jquery.ui/ui/widgets/resizable-min.js: { weight: -11.6, minified: true }
css:
component:
assets/vendor/jquery.ui/themes/base/resizable.css: {}
assets/vendor/jquery.ui/themes/base/resizable.css: { weight: -11.6 }
dependencies:
- core/jquery.ui
- core/jquery.ui.widget
- core/jquery.ui.mouse
deprecated: *jquery_ui_unused_deprecated
jquery.ui.widget:
version: *jquery_ui_version
license: *jquery_ui_license
js:
assets/vendor/jquery.ui/ui/widget-min.js: { weight: -10, minified: true }
assets/vendor/jquery.ui/ui/widget-min.js: { weight: -11.8, minified: true }
dependencies:
- core/jquery.ui
deprecated: *jquery_ui_unused_deprecated
modernizr:
# Block the page from being loaded until Modernizr is initialized.
......
name: 'jQuery UI library assets test'
type: module
description: 'Tests jQuery UI library asset loading'
package: Testing
version: VERSION
jqueryui_library_asset_test_page:
path: '/jqueryui_library_assets_test/{library}'
defaults:
_controller: '\Drupal\jqueryui_library_assets_test\Controller\JqueryUiTestAssetsController::build'
_title: 'Test jQuery UI asset loading order'
requirements:
_access: 'TRUE'
<?php
namespace Drupal\jqueryui_library_assets_test\Controller;
use Drupal\Core\Controller\ControllerBase;
/**
* Controller for testing jQuery UI asset loading order.
*/
class JqueryUiTestAssetsController extends ControllerBase {
/**
* Provides a page that loads a library.
*
* @param string $library
* A pipe delimited list of library names.
*
* @return array
* The render array.
*/
public function build($library) {
// If there are pipes in $library, they are separating multiple library
// names.
if (strpos($library, '|') !== FALSE) {
$library = explode('|', $library);
$library = array_map(function ($item) {
return "core/$item";
}, $library);
}
else {
$library = "core/$library";
}
return [
'#markup' => 'I am a page for testing jQuery UI asset loading order.',
'#attached' => [
'library' => $library,
],
];
}
}
......@@ -53,10 +53,9 @@ libraries-override:
component:
/core/themes/stable/css/core/vertical-tabs.css: public://my_css/vertical-tabs.css
# Use a protocol-relative URI.
core/jquery.ui:
css:
component:
assets/vendor/jquery.ui/themes/base/core.css: //my-server/my_theme/css/jquery_ui.css
core/drupal.displace:
js:
misc/displace.js: //my-server/my_theme/js/overridden.js
# Use an absolute URI.
core/jquery.farbtastic:
css:
......
<?php
namespace Drupal\KernelTests\Core\Asset;
use Drupal\KernelTests\KernelTestBase;
/**
* Checks the deprecation status and contents of jQuery UI libraries.
*
* @group Asset
*/
class DeprecatedJqueryUiAssetsTest extends KernelTestBase {
/**
* Confirm deprecation status and contents of jQuery UI libraries.
*
* @group legacy
*/
public function testDeprecatedJqueryUi() {
/** @var \Drupal\Core\Asset\LibraryDiscoveryInterface $library_discovery */
$library_discovery = $this->container->get('library.discovery');
$deprecated_jquery_ui_libraries = [
'jquery.ui' => '1396fab9268ee2cce47df6ac3e4781c8',
'jquery.ui.autocomplete' => '153f2836f8f2da39767208b6e09cb5b4',
'jquery.ui.button' => 'ad23e5de0fa1de1f511d10ba2e10d2dd',
'jquery.ui.dialog' => 'dc72e5bd38a3d2697bcf3e7964852e4b',
'jquery.ui.draggable' => 'af0f2bdc8aa4ade1e3de8042f31a9312',
'jquery.ui.menu' => '7d0c4d57f43d2f881d2cd5e5b79effbb',
'jquery.ui.mouse' => '626bb203807fa2cdc62510412685df4a',
'jquery.ui.position' => '6d1759c7d3eb94accbed78416487469b',
'jquery.ui.resizable' => 'a2448fa87071a17a9756f39c9becb70d',
'jquery.ui.widget' => 'eacd675de09572383b58e52309ba2245',
];
// DrupalCI uses a precision of 100 in certain environments which breaks
// this test.
ini_set('serialize_precision', -1);
foreach ($deprecated_jquery_ui_libraries as $library => $expected_hashed_library_definition) {
$this->expectDeprecation("The \"core/$library\" asset library is deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. See https://www.drupal.org/node/3067969");
$library_definition = $library_discovery->getLibraryByName('core', $library);
$this->assertEquals($expected_hashed_library_definition, md5(serialize($library_definition)));
}
}
}
......@@ -147,7 +147,7 @@ public function testLibrariesOverrideOtherAssetLibraryNames() {
$this->assertAssetInLibrary('public://my_css/vertical-tabs.css', 'core', 'drupal.vertical-tabs', 'css');
// Assert a protocol-relative URI.
$this->assertAssetInLibrary('//my-server/my_theme/css/jquery_ui.css', 'core', 'jquery.ui', 'css');
$this->assertAssetInLibrary('//my-server/my_theme/js/overridden.js', 'core', 'drupal.displace', 'js');
// Assert an absolute URI.
$this->assertAssetInLibrary('http://example.com/my_theme/css/farbtastic.css', 'core', 'jquery.farbtastic', 'css');
......
......@@ -59,15 +59,22 @@ libraries-override:
js:
misc/vertical-tabs.js: js/vertical-tabs.js
core/jquery.ui:
core/drupal.autocomplete:
css:
theme:
assets/vendor/jquery.ui/themes/base/theme.css: false
core/drupal.tabbingmanager:
css:
theme:
assets/vendor/jquery.ui/themes/base/theme.css: false
core/jquery.ui.dialog:
core/drupal.dialog:
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:
......@@ -118,6 +125,7 @@ libraries-extend:
- claro/details-focus
core/drupal.dialog:
- claro/claro.drupal.dialog
- claro/claro.jquery.ui
core/drupal.dropbutton:
- claro/dropbutton
core/drupal.checkbox:
......@@ -126,10 +134,10 @@ libraries-extend:
- claro/messages
core/drupal.progress:
- claro/progress
core/drupal.tabbingmanager:
- claro/claro.jquery.ui
core/drupal.vertical-tabs:
- claro/vertical-tabs
core/jquery.ui:
- claro/claro.jquery.ui
file/drupal.file:
- claro/file
filter/drupal.filter.admin:
......@@ -140,6 +148,7 @@ libraries-extend:
- claro/system.admin
core/drupal.autocomplete:
- claro/autocomplete
- claro/claro.jquery.ui
tour/tour-styling:
- claro/tour-styling
shortcut/drupal.shortcut:
......
......@@ -34,28 +34,37 @@ libraries-override:
css:
component:
misc/vertical-tabs.css: false
core/jquery.ui:
core/drupal.autocomplete:
css:
theme:
assets/vendor/jquery.ui/themes/base/theme.css: false
core/jquery.ui.dialog:
core/drupal.tabbingmanager:
css:
theme:
assets/vendor/jquery.ui/themes/base/theme.css: false
core/drupal.dialog:
css:
component:
assets/vendor/jquery.ui/themes/base/dialog.css: false
theme:
assets/vendor/jquery.ui/themes/base/theme.css: false
libraries-extend:
core/ckeditor:
- seven/ckeditor-dialog
core/drupal.autocomplete:
- seven/seven.jquery.ui
core/drupal.dialog:
- seven/seven.drupal.dialog
- seven/seven.jquery.ui
core/drupal.dropbutton:
- seven/classy.dropbutton
core/drupal.progress:
- seven/classy.progress
core/drupal.tabbingmanager:
- seven/seven.jquery.ui
core/drupal.vertical-tabs:
- seven/vertical-tabs
core/jquery.ui:
- seven/seven.jquery.ui
file/drupal.file:
- seven/classy.file
filter/drupal.filter.admin:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment