Skip to content

Commit

Permalink
Update vendored jquery-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
tagliala committed May 9, 2024
1 parent 9dd364c commit 7e3715a
Show file tree
Hide file tree
Showing 30 changed files with 1,229 additions and 855 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"dependencies": {
"jquery": "^3.4.1",
"jquery-ui": "^1.12.1",
"jquery-ui": "^1.13.2",
"jquery-ujs": "^1.2.2"
}
}
20 changes: 12 additions & 8 deletions vendor/assets/javascripts/jquery-ui/data.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
//= require jquery-ui/version

/*!
* jQuery UI :data 1.12.1
* http://jqueryui.com
* jQuery UI :data 1.13.3
* https://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
* https://jquery.org/license
*/

//>>label: :data Selector
//>>group: Core
//>>description: Selects elements which have data stored under the specified key.
//>>docs: http://api.jqueryui.com/data-selector/
//>>docs: https://api.jqueryui.com/data-selector/

( function( factory ) {
"use strict";

if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
Expand All @@ -24,8 +26,10 @@
// Browser globals
factory( jQuery );
}
} ( function( $ ) {
return $.extend( $.expr[ ":" ], {
} )( function( $ ) {
"use strict";

return $.extend( $.expr.pseudos, {
data: $.expr.createPseudo ?
$.expr.createPseudo( function( dataName ) {
return function( elem ) {
Expand All @@ -38,4 +42,4 @@ return $.extend( $.expr[ ":" ], {
return !!$.data( elem, match[ 3 ] );
}
} );
} ) );
} );
17 changes: 10 additions & 7 deletions vendor/assets/javascripts/jquery-ui/disable-selection.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
//= require jquery-ui/version

/*!
* jQuery UI Disable Selection 1.12.1
* http://jqueryui.com
* jQuery UI Disable Selection 1.13.3
* https://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
* https://jquery.org/license
*/

//>>label: disableSelection
//>>group: Core
//>>description: Disable selection of text content within the set of matched elements.
//>>docs: http://api.jqueryui.com/disableSelection/
//>>docs: https://api.jqueryui.com/disableSelection/

// This file is deprecated
( function( factory ) {
"use strict";

if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
Expand All @@ -25,7 +27,8 @@
// Browser globals
factory( jQuery );
}
} ( function( $ ) {
} )( function( $ ) {
"use strict";

return $.fn.extend( {
disableSelection: ( function() {
Expand All @@ -45,4 +48,4 @@ return $.fn.extend( {
}
} );

} ) );
} );
23 changes: 0 additions & 23 deletions vendor/assets/javascripts/jquery-ui/escape-selector.js

This file was deleted.

21 changes: 12 additions & 9 deletions vendor/assets/javascripts/jquery-ui/focusable.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
//= require jquery-ui/version

/*!
* jQuery UI Focusable 1.12.1
* http://jqueryui.com
* jQuery UI Focusable 1.13.3
* https://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
* https://jquery.org/license
*/

//>>label: :focusable Selector
//>>group: Core
//>>description: Selects elements which can be focused.
//>>docs: http://api.jqueryui.com/focusable-selector/
//>>docs: https://api.jqueryui.com/focusable-selector/

( function( factory ) {
"use strict";

if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
Expand All @@ -24,7 +26,8 @@
// Browser globals
factory( jQuery );
}
} ( function( $ ) {
} )( function( $ ) {
"use strict";

// Selectors
$.ui.focusable = function( element, hasTabindex ) {
Expand Down Expand Up @@ -72,15 +75,15 @@ function visible( element ) {
element = element.parent();
visibility = element.css( "visibility" );
}
return visibility !== "hidden";
return visibility === "visible";
}

$.extend( $.expr[ ":" ], {
$.extend( $.expr.pseudos, {
focusable: function( element ) {
return $.ui.focusable( element, $.attr( element, "tabindex" ) != null );
}
} );

return $.ui.focusable;

} ) );
} );
117 changes: 60 additions & 57 deletions vendor/assets/javascripts/jquery-ui/form-reset-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,79 +2,82 @@
//= require jquery-ui/version

/*!
* jQuery UI Form Reset Mixin 1.12.1
* http://jqueryui.com
* jQuery UI Form Reset Mixin 1.13.3
* https://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
* https://jquery.org/license
*/

//>>label: Form Reset Mixin
//>>group: Core
//>>description: Refresh input widgets when their form is reset
//>>docs: http://api.jqueryui.com/form-reset-mixin/
//>>docs: https://api.jqueryui.com/form-reset-mixin/

( function( factory ) {
if ( typeof define === "function" && define.amd ) {
"use strict";

// AMD. Register as an anonymous module.
define( [
"jquery",
"./form",
"./version"
], factory );
} else {
if ( typeof define === "function" && define.amd ) {

// Browser globals
factory( jQuery );
}
}( function( $ ) {
// AMD. Register as an anonymous module.
define( [
"jquery",
"./form",
"./version"
], factory );
} else {

return $.ui.formResetMixin = {
_formResetHandler: function() {
var form = $( this );
// Browser globals
factory( jQuery );
}
} )( function( $ ) {
"use strict";

// Wait for the form reset to actually happen before refreshing
setTimeout( function() {
var instances = form.data( "ui-form-reset-instances" );
$.each( instances, function() {
this.refresh();
} );
} );
},
return $.ui.formResetMixin = {
_formResetHandler: function() {
var form = $( this );

_bindFormResetHandler: function() {
this.form = this.element.form();
if ( !this.form.length ) {
return;
}
// Wait for the form reset to actually happen before refreshing
setTimeout( function() {
var instances = form.data( "ui-form-reset-instances" );
$.each( instances, function() {
this.refresh();
} );
} );
},

var instances = this.form.data( "ui-form-reset-instances" ) || [];
if ( !instances.length ) {
_bindFormResetHandler: function() {
this.form = this.element._form();
if ( !this.form.length ) {
return;
}

// We don't use _on() here because we use a single event handler per form
this.form.on( "reset.ui-form-reset", this._formResetHandler );
}
instances.push( this );
this.form.data( "ui-form-reset-instances", instances );
},
var instances = this.form.data( "ui-form-reset-instances" ) || [];
if ( !instances.length ) {

_unbindFormResetHandler: function() {
if ( !this.form.length ) {
return;
}
// We don't use _on() here because we use a single event handler per form
this.form.on( "reset.ui-form-reset", this._formResetHandler );
}
instances.push( this );
this.form.data( "ui-form-reset-instances", instances );
},

var instances = this.form.data( "ui-form-reset-instances" );
instances.splice( $.inArray( this, instances ), 1 );
if ( instances.length ) {
this.form.data( "ui-form-reset-instances", instances );
} else {
this.form
.removeData( "ui-form-reset-instances" )
.off( "reset.ui-form-reset" );
}
}
};
_unbindFormResetHandler: function() {
if ( !this.form.length ) {
return;
}

} ) );
var instances = this.form.data( "ui-form-reset-instances" );
instances.splice( $.inArray( this, instances ), 1 );
if ( instances.length ) {
this.form.data( "ui-form-reset-instances", instances );
} else {
this.form
.removeData( "ui-form-reset-instances" )
.off( "reset.ui-form-reset" );
}
}
};

} );
27 changes: 15 additions & 12 deletions vendor/assets/javascripts/jquery-ui/form.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
//= require jquery-ui/version

( function( factory ) {
if ( typeof define === "function" && define.amd ) {
"use strict";

// AMD. Register as an anonymous module.
define( [ "jquery", "./version" ], factory );
} else {
if ( typeof define === "function" && define.amd ) {

// Browser globals
factory( jQuery );
}
} ( function( $ ) {
// 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 );
};
return $.fn._form = function() {
return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form );
};

} ) );
} );
7 changes: 5 additions & 2 deletions vendor/assets/javascripts/jquery-ui/ie.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
//= require jquery-ui/version

( function( factory ) {
"use strict";

if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
Expand All @@ -10,8 +12,9 @@
// Browser globals
factory( jQuery );
}
} ( function( $ ) {
} )( function( $ ) {
"use strict";

// This file is deprecated
return $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
} ) );
} );
Loading

0 comments on commit 7e3715a

Please sign in to comment.