Skip to content

Commit

Permalink
Updates jQuery UI to the latest version v1.14.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajsakariya23 committed Dec 31, 2024
1 parent 2ba8433 commit bea2edb
Show file tree
Hide file tree
Showing 38 changed files with 1,633 additions and 1,879 deletions.
26 changes: 13 additions & 13 deletions src/js/_enqueues/vendor/jquery/ui/accordion.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery UI Accordion 1.13.3
* jQuery UI Accordion 1.14.1
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
Expand Down Expand Up @@ -40,7 +40,7 @@
"use strict";

return $.widget( "ui.accordion", {
version: "1.13.3",
version: "1.14.1",
options: {
active: 0,
animate: {},
Expand All @@ -52,7 +52,17 @@ return $.widget( "ui.accordion", {
collapsible: false,
event: "click",
header: function( elem ) {
return elem.find( "> li > :first-child" ).add( elem.find( "> :not(li)" ).even() );
return elem
.find( "> li > :first-child" )
.add(
elem.find( "> :not(li)" )

// Support: jQuery <3.5 only
// We could use `.even()` but that's unavailable in older jQuery.
.filter( function( i ) {
return i % 2 === 0;
} )
);
},
heightStyle: "auto",
icons: {
Expand Down Expand Up @@ -187,13 +197,7 @@ return $.widget( "ui.accordion", {
this._super( value );

this.element.attr( "aria-disabled", value );

// Support: IE8 Only
// #5332 / #6059 - opacity doesn't cascade to positioned elements in IE
// so we need to add the disabled class to the headers and panels
this._toggleClass( null, "ui-state-disabled", !!value );
this._toggleClass( this.headers.add( this.headers.next() ), null, "ui-state-disabled",
!!value );
},

_keydown: function( event ) {
Expand Down Expand Up @@ -611,10 +615,6 @@ return $.widget( "ui.accordion", {
this._removeClass( prev, "ui-accordion-header-active" )
._addClass( prev, "ui-accordion-header-collapsed" );

// Work around for rendering bug in IE (#5421)
if ( toHide.length ) {
toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className;
}
this._trigger( "activate", null, data );
}
} );
Expand Down
52 changes: 7 additions & 45 deletions src/js/_enqueues/vendor/jquery/ui/autocomplete.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery UI Autocomplete 1.13.3
* jQuery UI Autocomplete 1.14.1
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
Expand Down Expand Up @@ -27,7 +27,6 @@
"./menu",
"../keycode",
"../position",
"../safe-active-element",
"../version",
"../widget"
], factory );
Expand All @@ -40,7 +39,7 @@
"use strict";

$.widget( "ui.autocomplete", {
version: "1.13.3",
version: "1.14.1",
defaultElement: "<input>",
options: {
appendTo: null,
Expand Down Expand Up @@ -84,9 +83,9 @@ $.widget( "ui.autocomplete", {

// Textareas are always multi-line
// Inputs are always single-line, even if inside a contentEditable element
// IE also treats inputs as contentEditable
// All other element types are determined by whether or not they're contentEditable
this.isMultiLine = isTextarea || !isInput && this._isContentEditable( this.element );
// All other element types are determined by whether they're contentEditable
this.isMultiLine = isTextarea ||
!isInput && this.element.prop( "contentEditable" ) === "true";

this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
this.isNewMenu = true;
Expand Down Expand Up @@ -150,7 +149,6 @@ $.widget( "ui.autocomplete", {

// Different browsers have different default behavior for escape
// Single press can mean undo or clear
// Double press in IE means clear the whole form
event.preventDefault();
}
break;
Expand Down Expand Up @@ -219,16 +217,6 @@ $.widget( "ui.autocomplete", {
role: null
} )
.hide()

// Support: IE 11 only, Edge <= 14
// For other browsers, we preventDefault() on the mousedown event
// to keep the dropdown from taking focus from the input. This doesn't
// work for IE/Edge, causing problems with selection and scrolling (#9638)
// Happily, IE and Edge support an "unselectable" attribute that
// prevents an element from receiving focus, exactly what we want here.
.attr( {
"unselectable": "on"
} )
.menu( "instance" );

this._addClass( this.menu.element, "ui-autocomplete", "ui-front" );
Expand All @@ -241,7 +229,7 @@ $.widget( "ui.autocomplete", {
menufocus: function( event, ui ) {
var label, item;

// support: Firefox
// Support: Firefox
// Prevent accidental activation of menu items in Firefox (#7024 #9118)
if ( this.isNewMenu ) {
this.isNewMenu = false;
Expand Down Expand Up @@ -279,17 +267,9 @@ $.widget( "ui.autocomplete", {
previous = this.previous;

// Only trigger when focus was lost (click on menu)
if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) {
if ( this.element[ 0 ] !== this.document[ 0 ].activeElement ) {
this.element.trigger( "focus" );
this.previous = previous;

// #6109 - IE triggers two focus events and the second
// is asynchronous, so we need to reset the previous
// term synchronously and asynchronously :-(
this._delay( function() {
this.previous = previous;
this.selectedItem = item;
} );
}

if ( false !== this._trigger( "select", event, { item: item } ) ) {
Expand Down Expand Up @@ -608,24 +588,6 @@ $.widget( "ui.autocomplete", {
// Prevents moving cursor to beginning/end of the text field in some browsers
event.preventDefault();
}
},

// Support: Chrome <=50
// We should be able to just use this.element.prop( "isContentEditable" )
// but hidden elements always report false in Chrome.
// https://code.google.com/p/chromium/issues/detail?id=313082
_isContentEditable: function( element ) {
if ( !element.length ) {
return false;
}

var editable = element.prop( "contentEditable" );

if ( editable === "inherit" ) {
return this._isContentEditable( element.parent() );
}

return editable === "true";
}
} );

Expand Down
12 changes: 6 additions & 6 deletions src/js/_enqueues/vendor/jquery/ui/button.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery UI Button 1.13.3
* jQuery UI Button 1.14.1
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
Expand Down Expand Up @@ -42,7 +42,7 @@
"use strict";

$.widget( "ui.button", {
version: "1.13.3",
version: "1.14.1",
defaultElement: "<button>",
options: {
classes: {
Expand Down Expand Up @@ -109,9 +109,9 @@ $.widget( "ui.button", {
if ( event.keyCode === $.ui.keyCode.SPACE ) {
event.preventDefault();

// Support: PhantomJS <= 1.9, IE 8 Only
// If a native click is available use it so we actually cause navigation
// otherwise just trigger a click event
// If a native click is available use it, so we
// actually cause navigation. Otherwise, just trigger
// a click event.
if ( this.element[ 0 ].click ) {
this.element[ 0 ].click();
} else {
Expand Down Expand Up @@ -287,7 +287,7 @@ $.widget( "ui.button", {
} );

// DEPRECATED
if ( $.uiBackCompat !== false ) {
if ( $.uiBackCompat === true ) {

// Text and Icons options
$.widget( "ui.button", $.ui.button, {
Expand Down
8 changes: 4 additions & 4 deletions src/js/_enqueues/vendor/jquery/ui/checkboxradio.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery UI Checkboxradio 1.13.3
* jQuery UI Checkboxradio 1.14.1
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
Expand Down Expand Up @@ -38,7 +38,7 @@
"use strict";

$.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
version: "1.13.3",
version: "1.14.1",
options: {
disabled: null,
label: null,
Expand Down Expand Up @@ -156,7 +156,7 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
_getRadioGroup: function() {
var group;
var name = this.element[ 0 ].name;
var nameSelector = "input[name='" + $.escapeSelector( name ) + "']";
var nameSelector = "input[name='" + CSS.escape( name ) + "']";

if ( !name ) {
return $( [] );
Expand All @@ -168,7 +168,7 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {

// Not inside a form, check all inputs that also are not inside a form
group = $( nameSelector ).filter( function() {
return $( this )._form().length === 0;
return $( $( this ).prop( "form" ) ).length === 0;
} );
}

Expand Down
4 changes: 2 additions & 2 deletions src/js/_enqueues/vendor/jquery/ui/controlgroup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery UI Controlgroup 1.13.3
* jQuery UI Controlgroup 1.14.1
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
Expand Down Expand Up @@ -37,7 +37,7 @@
var controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g;

return $.widget( "ui.controlgroup", {
version: "1.13.3",
version: "1.14.1",
defaultElement: "<div>",
options: {
direction: "horizontal",
Expand Down
Loading

0 comments on commit bea2edb

Please sign in to comment.