Skip to content

Commit 3d8f3dc

Browse files
taglialacmanetta
authored andcommitted
Update vendored jquery-ui from 1.12.1 to 1.13.3 (activeadmin#8329)
Update vendored jquery-ui JavaScript files have been manually updated because: - `jquery-ui-rails` is unmaintained and it is bundling 1.13.0 - An active fork of `jquery-ui-rails` is bundling 1.13.2, but there is a more recent version (1.13.3) `escape-selector` has been removed because jQuery UI is using jQuery's built-in escape selector. This selector is available from version 3.0, which is required by Active Admin, so it should not be a problem Ref activeadmin#8327 Ref: - https://bugs.jqueryui.com/ticket/14991/ - jquery/jquery-ui#1957
1 parent dfaab1b commit 3d8f3dc

31 files changed

+1232
-855
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
* Update vendored jQuery UI to 1.13.3 [#8329] by [@tagliala]
6+
57
## 3.2.1 [](https://github.com/activeadmin/activeadmin/compare/v3.2.0..v3.2.1)
68

79
### Enhancements
@@ -907,6 +909,7 @@ Please check [0-6-stable] for previous changes.
907909
[#8167]: https://github.com/activeadmin/activeadmin/pull/8167
908910
[#8310]: https://github.com/activeadmin/activeadmin/pull/8310
909911
[#8311]: https://github.com/activeadmin/activeadmin/pull/8311
912+
[#8329]: https://github.com/activeadmin/activeadmin/pull/8329
910913

911914
[@1000ship]: https://github.com/1000ship
912915
[@5t111111]: https://github.com/5t111111

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
},
4545
"dependencies": {
4646
"jquery": "^3.4.1",
47-
"jquery-ui": "^1.12.1",
47+
"jquery-ui": "^1.13.3",
4848
"jquery-ujs": "^1.2.2"
4949
}
5050
}
Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
//= require jquery-ui/version
22

33
/*!
4-
* jQuery UI :data 1.12.1
5-
* http://jqueryui.com
4+
* jQuery UI :data 1.13.3
5+
* https://jqueryui.com
66
*
7-
* Copyright jQuery Foundation and other contributors
7+
* Copyright OpenJS Foundation and other contributors
88
* Released under the MIT license.
9-
* http://jquery.org/license
9+
* https://jquery.org/license
1010
*/
1111

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

1717
( function( factory ) {
18+
"use strict";
19+
1820
if ( typeof define === "function" && define.amd ) {
1921

2022
// AMD. Register as an anonymous module.
@@ -24,8 +26,10 @@
2426
// Browser globals
2527
factory( jQuery );
2628
}
27-
} ( function( $ ) {
28-
return $.extend( $.expr[ ":" ], {
29+
} )( function( $ ) {
30+
"use strict";
31+
32+
return $.extend( $.expr.pseudos, {
2933
data: $.expr.createPseudo ?
3034
$.expr.createPseudo( function( dataName ) {
3135
return function( elem ) {
@@ -38,4 +42,4 @@ return $.extend( $.expr[ ":" ], {
3842
return !!$.data( elem, match[ 3 ] );
3943
}
4044
} );
41-
} ) );
45+
} );

vendor/assets/javascripts/jquery-ui/disable-selection.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
//= require jquery-ui/version
22

33
/*!
4-
* jQuery UI Disable Selection 1.12.1
5-
* http://jqueryui.com
4+
* jQuery UI Disable Selection 1.13.3
5+
* https://jqueryui.com
66
*
7-
* Copyright jQuery Foundation and other contributors
7+
* Copyright OpenJS Foundation and other contributors
88
* Released under the MIT license.
9-
* http://jquery.org/license
9+
* https://jquery.org/license
1010
*/
1111

1212
//>>label: disableSelection
1313
//>>group: Core
1414
//>>description: Disable selection of text content within the set of matched elements.
15-
//>>docs: http://api.jqueryui.com/disableSelection/
15+
//>>docs: https://api.jqueryui.com/disableSelection/
1616

1717
// This file is deprecated
1818
( function( factory ) {
19+
"use strict";
20+
1921
if ( typeof define === "function" && define.amd ) {
2022

2123
// AMD. Register as an anonymous module.
@@ -25,7 +27,8 @@
2527
// Browser globals
2628
factory( jQuery );
2729
}
28-
} ( function( $ ) {
30+
} )( function( $ ) {
31+
"use strict";
2932

3033
return $.fn.extend( {
3134
disableSelection: ( function() {
@@ -45,4 +48,4 @@ return $.fn.extend( {
4548
}
4649
} );
4750

48-
} ) );
51+
} );

vendor/assets/javascripts/jquery-ui/escape-selector.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

vendor/assets/javascripts/jquery-ui/focusable.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
//= require jquery-ui/version
22

33
/*!
4-
* jQuery UI Focusable 1.12.1
5-
* http://jqueryui.com
4+
* jQuery UI Focusable 1.13.3
5+
* https://jqueryui.com
66
*
7-
* Copyright jQuery Foundation and other contributors
7+
* Copyright OpenJS Foundation and other contributors
88
* Released under the MIT license.
9-
* http://jquery.org/license
9+
* https://jquery.org/license
1010
*/
1111

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

1717
( function( factory ) {
18+
"use strict";
19+
1820
if ( typeof define === "function" && define.amd ) {
1921

2022
// AMD. Register as an anonymous module.
@@ -24,7 +26,8 @@
2426
// Browser globals
2527
factory( jQuery );
2628
}
27-
} ( function( $ ) {
29+
} )( function( $ ) {
30+
"use strict";
2831

2932
// Selectors
3033
$.ui.focusable = function( element, hasTabindex ) {
@@ -72,15 +75,15 @@ function visible( element ) {
7275
element = element.parent();
7376
visibility = element.css( "visibility" );
7477
}
75-
return visibility !== "hidden";
78+
return visibility === "visible";
7679
}
7780

78-
$.extend( $.expr[ ":" ], {
81+
$.extend( $.expr.pseudos, {
7982
focusable: function( element ) {
8083
return $.ui.focusable( element, $.attr( element, "tabindex" ) != null );
8184
}
8285
} );
8386

8487
return $.ui.focusable;
8588

86-
} ) );
89+
} );

vendor/assets/javascripts/jquery-ui/form-reset-mixin.js

Lines changed: 60 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -2,79 +2,82 @@
22
//= require jquery-ui/version
33

44
/*!
5-
* jQuery UI Form Reset Mixin 1.12.1
6-
* http://jqueryui.com
5+
* jQuery UI Form Reset Mixin 1.13.3
6+
* https://jqueryui.com
77
*
8-
* Copyright jQuery Foundation and other contributors
8+
* Copyright OpenJS Foundation and other contributors
99
* Released under the MIT license.
10-
* http://jquery.org/license
10+
* https://jquery.org/license
1111
*/
1212

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

1818
( function( factory ) {
19-
if ( typeof define === "function" && define.amd ) {
19+
"use strict";
2020

21-
// AMD. Register as an anonymous module.
22-
define( [
23-
"jquery",
24-
"./form",
25-
"./version"
26-
], factory );
27-
} else {
21+
if ( typeof define === "function" && define.amd ) {
2822

29-
// Browser globals
30-
factory( jQuery );
31-
}
32-
}( function( $ ) {
23+
// AMD. Register as an anonymous module.
24+
define( [
25+
"jquery",
26+
"./form",
27+
"./version"
28+
], factory );
29+
} else {
3330

34-
return $.ui.formResetMixin = {
35-
_formResetHandler: function() {
36-
var form = $( this );
31+
// Browser globals
32+
factory( jQuery );
33+
}
34+
} )( function( $ ) {
35+
"use strict";
3736

38-
// Wait for the form reset to actually happen before refreshing
39-
setTimeout( function() {
40-
var instances = form.data( "ui-form-reset-instances" );
41-
$.each( instances, function() {
42-
this.refresh();
43-
} );
44-
} );
45-
},
37+
return $.ui.formResetMixin = {
38+
_formResetHandler: function() {
39+
var form = $( this );
4640

47-
_bindFormResetHandler: function() {
48-
this.form = this.element.form();
49-
if ( !this.form.length ) {
50-
return;
51-
}
41+
// Wait for the form reset to actually happen before refreshing
42+
setTimeout( function() {
43+
var instances = form.data( "ui-form-reset-instances" );
44+
$.each( instances, function() {
45+
this.refresh();
46+
} );
47+
} );
48+
},
5249

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

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

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

68-
var instances = this.form.data( "ui-form-reset-instances" );
69-
instances.splice( $.inArray( this, instances ), 1 );
70-
if ( instances.length ) {
71-
this.form.data( "ui-form-reset-instances", instances );
72-
} else {
73-
this.form
74-
.removeData( "ui-form-reset-instances" )
75-
.off( "reset.ui-form-reset" );
76-
}
77-
}
78-
};
66+
_unbindFormResetHandler: function() {
67+
if ( !this.form.length ) {
68+
return;
69+
}
7970

80-
} ) );
71+
var instances = this.form.data( "ui-form-reset-instances" );
72+
instances.splice( $.inArray( this, instances ), 1 );
73+
if ( instances.length ) {
74+
this.form.data( "ui-form-reset-instances", instances );
75+
} else {
76+
this.form
77+
.removeData( "ui-form-reset-instances" )
78+
.off( "reset.ui-form-reset" );
79+
}
80+
}
81+
};
82+
83+
} );
Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
//= require jquery-ui/version
22

33
( function( factory ) {
4-
if ( typeof define === "function" && define.amd ) {
4+
"use strict";
55

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

10-
// Browser globals
11-
factory( jQuery );
12-
}
13-
} ( function( $ ) {
8+
// AMD. Register as an anonymous module.
9+
define( [ "jquery", "./version" ], factory );
10+
} else {
11+
12+
// Browser globals
13+
factory( jQuery );
14+
}
15+
} )( function( $ ) {
16+
"use strict";
1417

1518
// Support: IE8 Only
1619
// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop
1720
// with a string, so we need to find the proper form.
18-
return $.fn.form = function() {
19-
return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form );
20-
};
21+
return $.fn._form = function() {
22+
return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form );
23+
};
2124

22-
} ) );
25+
} );
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
//= require jquery-ui/version
22

33
( function( factory ) {
4+
"use strict";
5+
46
if ( typeof define === "function" && define.amd ) {
57

68
// AMD. Register as an anonymous module.
@@ -10,8 +12,9 @@
1012
// Browser globals
1113
factory( jQuery );
1214
}
13-
} ( function( $ ) {
15+
} )( function( $ ) {
16+
"use strict";
1417

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

0 commit comments

Comments
 (0)