diff --git a/CHANGELOG.md b/CHANGELOG.md index ab0147402aa..43951e1146c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +* Update vendored jQuery UI to 1.14.1 [#8670] by [@tagliala] (thanks to [@tobischo]) + ## 3.3.0 [☰](https://github.com/activeadmin/activeadmin/compare/v3.2.5..v3.3.0) ### Enhancements @@ -984,6 +986,7 @@ Please check [0-6-stable] for previous changes. [#8614]: https://github.com/activeadmin/activeadmin/pull/8614 [#8650]: https://github.com/activeadmin/activeadmin/pull/8650 [#8652]: https://github.com/activeadmin/activeadmin/pull/8652 +[#8670]: https://github.com/activeadmin/activeadmin/pull/8670 [@1000ship]: https://github.com/1000ship [@5t111111]: https://github.com/5t111111 @@ -1108,6 +1111,7 @@ Please check [0-6-stable] for previous changes. [@timoschilling]: https://github.com/timoschilling [@TimPetricola]: https://github.com/TimPetricola [@timwis]: https://github.com/timwis +[@tobischo]: https://github.com/tobischo [@tomgilligan]: https://github.com/tomgilligan [@TonyArra]: https://github.com/TonyArra [@tordans]: https://github.com/tordans diff --git a/package.json b/package.json index 597d99916f8..1d38b0b5a6e 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ }, "dependencies": { "jquery": "^3.4.1", - "jquery-ui": "^1.13.3", + "jquery-ui": "^1.14.1", "jquery-ujs": "^1.2.2" } } diff --git a/vendor/assets/javascripts/jquery-ui/data.js b/vendor/assets/javascripts/jquery-ui/data.js index c4e871ab6aa..cca24b02e02 100644 --- a/vendor/assets/javascripts/jquery-ui/data.js +++ b/vendor/assets/javascripts/jquery-ui/data.js @@ -1,7 +1,7 @@ //= require jquery-ui/version /*! - * jQuery UI :data 1.13.3 + * jQuery UI :data 1.14.1 * https://jqueryui.com * * Copyright OpenJS Foundation and other contributors @@ -30,16 +30,10 @@ "use strict"; return $.extend( $.expr.pseudos, { - data: $.expr.createPseudo ? - $.expr.createPseudo( function( dataName ) { - return function( elem ) { - return !!$.data( elem, dataName ); - }; - } ) : - - // Support: jQuery <1.8 - function( elem, i, match ) { - return !!$.data( elem, match[ 3 ] ); - } + data: $.expr.createPseudo( function( dataName ) { + return function( elem ) { + return !!$.data( elem, dataName ); + }; + } ) } ); } ); diff --git a/vendor/assets/javascripts/jquery-ui/disable-selection.js b/vendor/assets/javascripts/jquery-ui/disable-selection.js index 8536fb23611..ca7a4536af0 100644 --- a/vendor/assets/javascripts/jquery-ui/disable-selection.js +++ b/vendor/assets/javascripts/jquery-ui/disable-selection.js @@ -1,7 +1,7 @@ //= require jquery-ui/version /*! - * jQuery UI Disable Selection 1.13.3 + * jQuery UI Disable Selection 1.14.1 * https://jqueryui.com * * Copyright OpenJS Foundation and other contributors diff --git a/vendor/assets/javascripts/jquery-ui/focusable.js b/vendor/assets/javascripts/jquery-ui/focusable.js index e33c9bfaa8e..5fd31327e16 100644 --- a/vendor/assets/javascripts/jquery-ui/focusable.js +++ b/vendor/assets/javascripts/jquery-ui/focusable.js @@ -1,7 +1,7 @@ //= require jquery-ui/version /*! - * jQuery UI Focusable 1.13.3 + * jQuery UI Focusable 1.14.1 * https://jqueryui.com * * Copyright OpenJS Foundation and other contributors @@ -64,20 +64,10 @@ $.ui.focusable = function( element, hasTabindex ) { focusableIfVisible = hasTabindex; } - return focusableIfVisible && $( element ).is( ":visible" ) && visible( $( element ) ); + return focusableIfVisible && $( element ).is( ":visible" ) && + $( element ).css( "visibility" ) === "visible"; }; -// Support: IE 8 only -// IE 8 doesn't resolve inherit to visible/hidden for computed values -function visible( element ) { - var visibility = element.css( "visibility" ); - while ( visibility === "inherit" ) { - element = element.parent(); - visibility = element.css( "visibility" ); - } - return visibility === "visible"; -} - $.extend( $.expr.pseudos, { focusable: function( element ) { return $.ui.focusable( element, $.attr( element, "tabindex" ) != null ); diff --git a/vendor/assets/javascripts/jquery-ui/form-reset-mixin.js b/vendor/assets/javascripts/jquery-ui/form-reset-mixin.js index acd392d0750..fc3c9ba6ced 100644 --- a/vendor/assets/javascripts/jquery-ui/form-reset-mixin.js +++ b/vendor/assets/javascripts/jquery-ui/form-reset-mixin.js @@ -1,8 +1,7 @@ -//= require jquery-ui/form //= require jquery-ui/version /*! - * jQuery UI Form Reset Mixin 1.13.3 + * jQuery UI Form Reset Mixin 1.14.1 * https://jqueryui.com * * Copyright OpenJS Foundation and other contributors @@ -23,7 +22,6 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./form", "./version" ], factory ); } else { @@ -48,7 +46,7 @@ return $.ui.formResetMixin = { }, _bindFormResetHandler: function() { - this.form = this.element._form(); + this.form = $( this.element.prop( "form" ) ); if ( !this.form.length ) { return; } diff --git a/vendor/assets/javascripts/jquery-ui/form.js b/vendor/assets/javascripts/jquery-ui/form.js deleted file mode 100644 index 95b47836982..00000000000 --- a/vendor/assets/javascripts/jquery-ui/form.js +++ /dev/null @@ -1,25 +0,0 @@ -//= require jquery-ui/version - -( function( factory ) { - "use strict"; - - if ( typeof define === "function" && define.amd ) { - - // AMD. Register as an anonymous module. - define( [ "jquery", "./version" ], factory ); - } else { - - // Browser globals - factory( jQuery ); - } -} )( function( $ ) { -"use strict"; - -// Support: IE8 Only -// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop -// with a string, so we need to find the proper form. -return $.fn._form = function() { - return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form ); -}; - -} ); diff --git a/vendor/assets/javascripts/jquery-ui/ie.js b/vendor/assets/javascripts/jquery-ui/ie.js deleted file mode 100644 index a758a1b97e1..00000000000 --- a/vendor/assets/javascripts/jquery-ui/ie.js +++ /dev/null @@ -1,20 +0,0 @@ -//= require jquery-ui/version - -( function( factory ) { - "use strict"; - - if ( typeof define === "function" && define.amd ) { - - // AMD. Register as an anonymous module. - define( [ "jquery", "./version" ], factory ); - } else { - - // Browser globals - factory( jQuery ); - } -} )( function( $ ) { -"use strict"; - -// This file is deprecated -return $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); -} ); diff --git a/vendor/assets/javascripts/jquery-ui/keycode.js b/vendor/assets/javascripts/jquery-ui/keycode.js index 7769b96d571..e2dfe97d59d 100644 --- a/vendor/assets/javascripts/jquery-ui/keycode.js +++ b/vendor/assets/javascripts/jquery-ui/keycode.js @@ -1,7 +1,7 @@ //= require jquery-ui/version /*! - * jQuery UI Keycode 1.13.3 + * jQuery UI Keycode 1.14.1 * https://jqueryui.com * * Copyright OpenJS Foundation and other contributors diff --git a/vendor/assets/javascripts/jquery-ui/labels.js b/vendor/assets/javascripts/jquery-ui/labels.js index b2fbe87dc80..9f0aad53d0f 100644 --- a/vendor/assets/javascripts/jquery-ui/labels.js +++ b/vendor/assets/javascripts/jquery-ui/labels.js @@ -1,7 +1,7 @@ //= require jquery-ui/version /*! - * jQuery UI Labels 1.13.3 + * jQuery UI Labels 1.14.1 * https://jqueryui.com * * Copyright OpenJS Foundation and other contributors @@ -41,9 +41,8 @@ return $.fn.labels = function() { return this.pushStack( this[ 0 ].labels ); } - // Support: IE <= 11, FF <= 37, Android <= 2.3 only - // Above browsers do not support control.labels. Everything below is to support them - // as well as document fragments. control.labels does not work on document fragments + // If `control.labels` is empty - e.g. inside of document fragments - find + // the labels manually labels = this.eq( 0 ).parents( "label" ); // Look for the label based on the id @@ -58,7 +57,7 @@ return $.fn.labels = function() { ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() ); // Create a selector for the label based on the id - selector = "label[for='" + $.escapeSelector( id ) + "']"; + selector = "label[for='" + CSS.escape( id ) + "']"; labels = labels.add( ancestors.find( selector ).addBack( selector ) ); diff --git a/vendor/assets/javascripts/jquery-ui/position.js b/vendor/assets/javascripts/jquery-ui/position.js index 062e2011987..d6539328008 100644 --- a/vendor/assets/javascripts/jquery-ui/position.js +++ b/vendor/assets/javascripts/jquery-ui/position.js @@ -1,7 +1,7 @@ //= require jquery-ui/version /*! - * jQuery UI Position 1.13.3 + * jQuery UI Position 1.14.1 * https://jqueryui.com * * Copyright OpenJS Foundation and other contributors diff --git a/vendor/assets/javascripts/jquery-ui/safe-active-element.js b/vendor/assets/javascripts/jquery-ui/safe-active-element.js deleted file mode 100644 index 101fe1fcc56..00000000000 --- a/vendor/assets/javascripts/jquery-ui/safe-active-element.js +++ /dev/null @@ -1,46 +0,0 @@ -//= require jquery-ui/version - -( function( factory ) { - "use strict"; - - if ( typeof define === "function" && define.amd ) { - - // AMD. Register as an anonymous module. - define( [ "jquery", "./version" ], factory ); - } else { - - // Browser globals - factory( jQuery ); - } -} )( function( $ ) { -"use strict"; - -return $.ui.safeActiveElement = function( document ) { - var activeElement; - - // Support: IE 9 only - // IE9 throws an "Unspecified error" accessing document.activeElement from an