activeadmin 3.4.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/app/assets/javascripts/active_admin/base.js +1 -0
  4. data/app/javascript/active_admin/initializers/datepicker.js +3 -0
  5. data/lib/active_admin/dependency.rb +1 -1
  6. data/lib/active_admin/resource.rb +8 -2
  7. data/lib/active_admin/version.rb +1 -1
  8. data/vendor/assets/javascripts/jquery-ui/data.js +6 -12
  9. data/vendor/assets/javascripts/jquery-ui/disable-selection.js +1 -1
  10. data/vendor/assets/javascripts/jquery-ui/focusable.js +3 -13
  11. data/vendor/assets/javascripts/jquery-ui/form-reset-mixin.js +2 -4
  12. data/vendor/assets/javascripts/jquery-ui/keycode.js +1 -1
  13. data/vendor/assets/javascripts/jquery-ui/labels.js +4 -5
  14. data/vendor/assets/javascripts/jquery-ui/position.js +1 -1
  15. data/vendor/assets/javascripts/jquery-ui/scroll-parent.js +1 -1
  16. data/vendor/assets/javascripts/jquery-ui/tabbable.js +1 -1
  17. data/vendor/assets/javascripts/jquery-ui/unique-id.js +1 -1
  18. data/vendor/assets/javascripts/jquery-ui/version.js +1 -1
  19. data/vendor/assets/javascripts/jquery-ui/widget.js +4 -1
  20. data/vendor/assets/javascripts/jquery-ui/widgets/button.js +6 -6
  21. data/vendor/assets/javascripts/jquery-ui/widgets/checkboxradio.js +4 -4
  22. data/vendor/assets/javascripts/jquery-ui/widgets/controlgroup.js +2 -2
  23. data/vendor/assets/javascripts/jquery-ui/widgets/datepicker.js +11 -14
  24. data/vendor/assets/javascripts/jquery-ui/widgets/dialog.js +20 -34
  25. data/vendor/assets/javascripts/jquery-ui/widgets/draggable.js +4 -8
  26. data/vendor/assets/javascripts/jquery-ui/widgets/mouse.js +16 -31
  27. data/vendor/assets/javascripts/jquery-ui/widgets/resizable.js +73 -20
  28. data/vendor/assets/javascripts/jquery-ui/widgets/sortable.js +9 -17
  29. data/vendor/assets/javascripts/jquery-ui/widgets/tabs.js +53 -66
  30. metadata +2 -6
  31. data/vendor/assets/javascripts/jquery-ui/form.js +0 -25
  32. data/vendor/assets/javascripts/jquery-ui/ie.js +0 -20
  33. data/vendor/assets/javascripts/jquery-ui/safe-active-element.js +0 -46
  34. data/vendor/assets/javascripts/jquery-ui/safe-blur.js +0 -27
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3421560bc8ebcddcb2685e3a296c5dbecd08d53f90c858f747dd57729e63136b
4
- data.tar.gz: 53a03320dfd11b59d81392a942a138d84c50403119f2f8007700e433a1ac32db
3
+ metadata.gz: afa1c1c32021e663fdfbf9f57274716deb64f84ac184453bc2b73b6073053303
4
+ data.tar.gz: 183d57d9d1d7bf90399aaeb8e46ba97077ec30f3028ead82d34d976de1cd295c
5
5
  SHA512:
6
- metadata.gz: 25514fe7c810b5df4cd6f91fb5af09f1997d67a0b350003d47c1d3a9bb7c8a4e240045c83a32c07c6207e79a2d3ff29ddbffb0d73801751b8b6f1b0defa354ec
7
- data.tar.gz: 338c4417858bd84fa539e983c841412d8ebeab3ae1c069410fa015bfc1b5f16506f73d05f3b3e5e95462d1a899d9451359496eddfb519cd33f23d09fd93c9bfc
6
+ metadata.gz: 6bb9e12a1b4efcf8ed33044499cffb92019ca3e5b9b81b02aa94586f142fb8f22f68e7659c01551c07d2a37fecea912cf7ac61e28c05c2e4a531b5ea74f262e2
7
+ data.tar.gz: 6de75bee7cec2b1241ce989d55186a19801d272ccc4d2b06e73e022043f20e16c1781ae9ca00906681d6a2f5db22f1f6f6baa3f67b05703e2b7dacefd863f896
data/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 3.5.0 [☰](https://github.com/activeadmin/activeadmin/compare/v3.4.0..v3.5.0)
6
+
7
+ ### Enhancements
8
+
9
+ * Backport Devise 5 support [#8964] by @tagliala
10
+ * Backport Drop legacy connection support [#8965] by @tagliala
11
+
12
+ ### Dependency Changes
13
+
14
+ * Update vendored jQuery UI to 1.14.2 [#8670] by @tagliala (thanks to @tobischo)
15
+
5
16
  ## 3.4.0 [☰](https://github.com/activeadmin/activeadmin/compare/v3.3.0..v3.4.0)
6
17
 
7
18
  * Add Rails 8.1 compatibility and drop Ruby < 3.0 support [#8837] by [@tagliala]
@@ -988,7 +999,10 @@ Please check [0-6-stable] for previous changes.
988
999
  [#8614]: https://github.com/activeadmin/activeadmin/pull/8614
989
1000
  [#8650]: https://github.com/activeadmin/activeadmin/pull/8650
990
1001
  [#8652]: https://github.com/activeadmin/activeadmin/pull/8652
1002
+ [#8670]: https://github.com/activeadmin/activeadmin/pull/8670
991
1003
  [#8837]: https://github.com/activeadmin/activeadmin/pull/8837
1004
+ [#8964]: https://github.com/activeadmin/activeadmin/pull/8964
1005
+ [#8965]: https://github.com/activeadmin/activeadmin/pull/8965
992
1006
 
993
1007
  [@1000ship]: https://github.com/1000ship
994
1008
  [@5t111111]: https://github.com/5t111111
@@ -1113,6 +1127,7 @@ Please check [0-6-stable] for previous changes.
1113
1127
  [@timoschilling]: https://github.com/timoschilling
1114
1128
  [@TimPetricola]: https://github.com/TimPetricola
1115
1129
  [@timwis]: https://github.com/timwis
1130
+ [@tobischo]: https://github.com/tobischo
1116
1131
  [@tomgilligan]: https://github.com/tomgilligan
1117
1132
  [@TonyArra]: https://github.com/TonyArra
1118
1133
  [@tordans]: https://github.com/tordans
@@ -187,6 +187,7 @@
187
187
  };
188
188
  var options = input.data("datepicker-options");
189
189
  input.datepicker($.extend(defaults, options));
190
+ input.datepicker("show");
190
191
  });
191
192
  })(jQuery);
192
193
  var DropdownMenu = function() {
@@ -11,6 +11,9 @@
11
11
  const options = input.data('datepicker-options');
12
12
 
13
13
  input.datepicker($.extend(defaults, options));
14
+
15
+ // See https://github.com/jquery/jquery-ui/issues/2385
16
+ input.datepicker('show');
14
17
  });
15
18
 
16
19
  })(jQuery);
@@ -2,7 +2,7 @@
2
2
  module ActiveAdmin
3
3
  module Dependency
4
4
  module Requirements
5
- DEVISE = ">= 4.0", "< 5"
5
+ DEVISE = ">= 4.0", "< 6"
6
6
  end
7
7
 
8
8
  # Provides a clean interface to check for gem dependencies at runtime.
@@ -70,7 +70,7 @@ module ActiveAdmin
70
70
  module Base
71
71
  def initialize(namespace, resource_class, options = {})
72
72
  @namespace = namespace
73
- @resource_class_name = "::#{resource_class.name}"
73
+ @resource_class_name = resource_class.respond_to?(:name) ? "::#{resource_class.name}" : resource_class.to_s
74
74
  @options = options
75
75
  @sort_order = options[:sort_order]
76
76
  @member_actions = []
@@ -119,7 +119,13 @@ module ActiveAdmin
119
119
  end
120
120
 
121
121
  def resource_quoted_column_name(column)
122
- resource_class.connection.quote_column_name(column)
122
+ if resource_class.respond_to?(:with_connection)
123
+ resource_class.with_connection do |connection|
124
+ connection.quote_column_name(column)
125
+ end
126
+ else
127
+ resource_class.connection.quote_column_name(column)
128
+ end
123
129
  end
124
130
 
125
131
  # Clears all the member actions this resource knows about
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ActiveAdmin
3
- VERSION = "3.4.0"
3
+ VERSION = "3.5.0"
4
4
  end
@@ -1,7 +1,7 @@
1
1
  //= require jquery-ui/version
2
2
 
3
3
  /*!
4
- * jQuery UI :data 1.13.3
4
+ * jQuery UI :data 1.14.2
5
5
  * https://jqueryui.com
6
6
  *
7
7
  * Copyright OpenJS Foundation and other contributors
@@ -30,16 +30,10 @@
30
30
  "use strict";
31
31
 
32
32
  return $.extend( $.expr.pseudos, {
33
- data: $.expr.createPseudo ?
34
- $.expr.createPseudo( function( dataName ) {
35
- return function( elem ) {
36
- return !!$.data( elem, dataName );
37
- };
38
- } ) :
39
-
40
- // Support: jQuery <1.8
41
- function( elem, i, match ) {
42
- return !!$.data( elem, match[ 3 ] );
43
- }
33
+ data: $.expr.createPseudo( function( dataName ) {
34
+ return function( elem ) {
35
+ return !!$.data( elem, dataName );
36
+ };
37
+ } )
44
38
  } );
45
39
  } );
@@ -1,7 +1,7 @@
1
1
  //= require jquery-ui/version
2
2
 
3
3
  /*!
4
- * jQuery UI Disable Selection 1.13.3
4
+ * jQuery UI Disable Selection 1.14.2
5
5
  * https://jqueryui.com
6
6
  *
7
7
  * Copyright OpenJS Foundation and other contributors
@@ -1,7 +1,7 @@
1
1
  //= require jquery-ui/version
2
2
 
3
3
  /*!
4
- * jQuery UI Focusable 1.13.3
4
+ * jQuery UI Focusable 1.14.2
5
5
  * https://jqueryui.com
6
6
  *
7
7
  * Copyright OpenJS Foundation and other contributors
@@ -64,20 +64,10 @@ $.ui.focusable = function( element, hasTabindex ) {
64
64
  focusableIfVisible = hasTabindex;
65
65
  }
66
66
 
67
- return focusableIfVisible && $( element ).is( ":visible" ) && visible( $( element ) );
67
+ return focusableIfVisible && $( element ).is( ":visible" ) &&
68
+ $( element ).css( "visibility" ) === "visible";
68
69
  };
69
70
 
70
- // Support: IE 8 only
71
- // IE 8 doesn't resolve inherit to visible/hidden for computed values
72
- function visible( element ) {
73
- var visibility = element.css( "visibility" );
74
- while ( visibility === "inherit" ) {
75
- element = element.parent();
76
- visibility = element.css( "visibility" );
77
- }
78
- return visibility === "visible";
79
- }
80
-
81
71
  $.extend( $.expr.pseudos, {
82
72
  focusable: function( element ) {
83
73
  return $.ui.focusable( element, $.attr( element, "tabindex" ) != null );
@@ -1,8 +1,7 @@
1
- //= require jquery-ui/form
2
1
  //= require jquery-ui/version
3
2
 
4
3
  /*!
5
- * jQuery UI Form Reset Mixin 1.13.3
4
+ * jQuery UI Form Reset Mixin 1.14.2
6
5
  * https://jqueryui.com
7
6
  *
8
7
  * Copyright OpenJS Foundation and other contributors
@@ -23,7 +22,6 @@
23
22
  // AMD. Register as an anonymous module.
24
23
  define( [
25
24
  "jquery",
26
- "./form",
27
25
  "./version"
28
26
  ], factory );
29
27
  } else {
@@ -48,7 +46,7 @@ return $.ui.formResetMixin = {
48
46
  },
49
47
 
50
48
  _bindFormResetHandler: function() {
51
- this.form = this.element._form();
49
+ this.form = $( this.element.prop( "form" ) );
52
50
  if ( !this.form.length ) {
53
51
  return;
54
52
  }
@@ -1,7 +1,7 @@
1
1
  //= require jquery-ui/version
2
2
 
3
3
  /*!
4
- * jQuery UI Keycode 1.13.3
4
+ * jQuery UI Keycode 1.14.2
5
5
  * https://jqueryui.com
6
6
  *
7
7
  * Copyright OpenJS Foundation and other contributors
@@ -1,7 +1,7 @@
1
1
  //= require jquery-ui/version
2
2
 
3
3
  /*!
4
- * jQuery UI Labels 1.13.3
4
+ * jQuery UI Labels 1.14.2
5
5
  * https://jqueryui.com
6
6
  *
7
7
  * Copyright OpenJS Foundation and other contributors
@@ -41,9 +41,8 @@ return $.fn.labels = function() {
41
41
  return this.pushStack( this[ 0 ].labels );
42
42
  }
43
43
 
44
- // Support: IE <= 11, FF <= 37, Android <= 2.3 only
45
- // Above browsers do not support control.labels. Everything below is to support them
46
- // as well as document fragments. control.labels does not work on document fragments
44
+ // If `control.labels` is empty - e.g. inside of document fragments - find
45
+ // the labels manually
47
46
  labels = this.eq( 0 ).parents( "label" );
48
47
 
49
48
  // Look for the label based on the id
@@ -58,7 +57,7 @@ return $.fn.labels = function() {
58
57
  ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() );
59
58
 
60
59
  // Create a selector for the label based on the id
61
- selector = "label[for='" + $.escapeSelector( id ) + "']";
60
+ selector = "label[for='" + CSS.escape( id ) + "']";
62
61
 
63
62
  labels = labels.add( ancestors.find( selector ).addBack( selector ) );
64
63
 
@@ -1,7 +1,7 @@
1
1
  //= require jquery-ui/version
2
2
 
3
3
  /*!
4
- * jQuery UI Position 1.13.3
4
+ * jQuery UI Position 1.14.2
5
5
  * https://jqueryui.com
6
6
  *
7
7
  * Copyright OpenJS Foundation and other contributors
@@ -1,7 +1,7 @@
1
1
  //= require jquery-ui/version
2
2
 
3
3
  /*!
4
- * jQuery UI Scroll Parent 1.13.3
4
+ * jQuery UI Scroll Parent 1.14.2
5
5
  * https://jqueryui.com
6
6
  *
7
7
  * Copyright OpenJS Foundation and other contributors
@@ -2,7 +2,7 @@
2
2
  //= require jquery-ui/focusable
3
3
 
4
4
  /*!
5
- * jQuery UI Tabbable 1.13.3
5
+ * jQuery UI Tabbable 1.14.2
6
6
  * https://jqueryui.com
7
7
  *
8
8
  * Copyright OpenJS Foundation and other contributors
@@ -1,7 +1,7 @@
1
1
  //= require jquery-ui/version
2
2
 
3
3
  /*!
4
- * jQuery UI Unique ID 1.13.3
4
+ * jQuery UI Unique ID 1.14.2
5
5
  * https://jqueryui.com
6
6
  *
7
7
  * Copyright OpenJS Foundation and other contributors
@@ -15,6 +15,6 @@
15
15
 
16
16
  $.ui = $.ui || {};
17
17
 
18
- return $.ui.version = "1.13.3";
18
+ return $.ui.version = "1.14.2";
19
19
 
20
20
  } );
@@ -1,7 +1,7 @@
1
1
  //= require jquery-ui/version
2
2
 
3
3
  /*!
4
- * jQuery UI Widget 1.13.3
4
+ * jQuery UI Widget 1.14.2
5
5
  * https://jqueryui.com
6
6
  *
7
7
  * Copyright OpenJS Foundation and other contributors
@@ -58,6 +58,9 @@ $.widget = function( name, base, prototype ) {
58
58
 
59
59
  var namespace = name.split( "." )[ 0 ];
60
60
  name = name.split( "." )[ 1 ];
61
+ if ( name === "__proto__" || name === "constructor" ) {
62
+ return $.error( "Invalid widget name: " + name );
63
+ }
61
64
  var fullName = namespace + "-" + name;
62
65
 
63
66
  if ( !prototype ) {
@@ -4,7 +4,7 @@
4
4
  //= require jquery-ui/widget
5
5
 
6
6
  /*!
7
- * jQuery UI Button 1.13.3
7
+ * jQuery UI Button 1.14.2
8
8
  * https://jqueryui.com
9
9
  *
10
10
  * Copyright OpenJS Foundation and other contributors
@@ -47,7 +47,7 @@
47
47
  "use strict";
48
48
 
49
49
  $.widget( "ui.button", {
50
- version: "1.13.3",
50
+ version: "1.14.2",
51
51
  defaultElement: "<button>",
52
52
  options: {
53
53
  classes: {
@@ -114,9 +114,9 @@ $.widget( "ui.button", {
114
114
  if ( event.keyCode === $.ui.keyCode.SPACE ) {
115
115
  event.preventDefault();
116
116
 
117
- // Support: PhantomJS <= 1.9, IE 8 Only
118
- // If a native click is available use it so we actually cause navigation
119
- // otherwise just trigger a click event
117
+ // If a native click is available use it, so we
118
+ // actually cause navigation. Otherwise, just trigger
119
+ // a click event.
120
120
  if ( this.element[ 0 ].click ) {
121
121
  this.element[ 0 ].click();
122
122
  } else {
@@ -292,7 +292,7 @@ $.widget( "ui.button", {
292
292
  } );
293
293
 
294
294
  // DEPRECATED
295
- if ( $.uiBackCompat !== false ) {
295
+ if ( $.uiBackCompat === true ) {
296
296
 
297
297
  // Text and Icons options
298
298
  $.widget( "ui.button", $.ui.button, {
@@ -3,7 +3,7 @@
3
3
  //= require jquery-ui/widget
4
4
 
5
5
  /*!
6
- * jQuery UI Checkboxradio 1.13.3
6
+ * jQuery UI Checkboxradio 1.14.2
7
7
  * https://jqueryui.com
8
8
  *
9
9
  * Copyright OpenJS Foundation and other contributors
@@ -42,7 +42,7 @@
42
42
  "use strict";
43
43
 
44
44
  $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
45
- version: "1.13.3",
45
+ version: "1.14.2",
46
46
  options: {
47
47
  disabled: null,
48
48
  label: null,
@@ -160,7 +160,7 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
160
160
  _getRadioGroup: function() {
161
161
  var group;
162
162
  var name = this.element[ 0 ].name;
163
- var nameSelector = "input[name='" + $.escapeSelector( name ) + "']";
163
+ var nameSelector = "input[name='" + CSS.escape( name ) + "']";
164
164
 
165
165
  if ( !name ) {
166
166
  return $( [] );
@@ -172,7 +172,7 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
172
172
 
173
173
  // Not inside a form, check all inputs that also are not inside a form
174
174
  group = $( nameSelector ).filter( function() {
175
- return $( this )._form().length === 0;
175
+ return $( $( this ).prop( "form" ) ).length === 0;
176
176
  } );
177
177
  }
178
178
 
@@ -1,7 +1,7 @@
1
1
  //= require jquery-ui/widget
2
2
 
3
3
  /*!
4
- * jQuery UI Controlgroup 1.13.3
4
+ * jQuery UI Controlgroup 1.14.2
5
5
  * https://jqueryui.com
6
6
  *
7
7
  * Copyright OpenJS Foundation and other contributors
@@ -39,7 +39,7 @@
39
39
  var controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g;
40
40
 
41
41
  return $.widget( "ui.controlgroup", {
42
- version: "1.13.3",
42
+ version: "1.14.2",
43
43
  defaultElement: "<div>",
44
44
  options: {
45
45
  direction: "horizontal",
@@ -1,9 +1,9 @@
1
1
  //= require jquery-ui/version
2
2
  //= require jquery-ui/keycode
3
3
 
4
- /* eslint-disable max-len, camelcase */
4
+ /* eslint-disable max-len */
5
5
  /*!
6
- * jQuery UI Datepicker 1.13.3
6
+ * jQuery UI Datepicker 1.14.2
7
7
  * https://jqueryui.com
8
8
  *
9
9
  * Copyright OpenJS Foundation and other contributors
@@ -39,7 +39,7 @@
39
39
  } )( function( $ ) {
40
40
  "use strict";
41
41
 
42
- $.extend( $.ui, { datepicker: { version: "1.13.3" } } );
42
+ $.extend( $.ui, { datepicker: { version: "1.14.2" } } );
43
43
 
44
44
  var datepicker_instActive;
45
45
 
@@ -438,6 +438,7 @@ $.extend( Datepicker.prototype, {
438
438
  $target.removeClass( this.markerClassName ).empty();
439
439
  }
440
440
 
441
+ $.datepicker._hideDatepicker();
441
442
  if ( datepicker_instActive === inst ) {
442
443
  datepicker_instActive = null;
443
444
  this._curInst = null;
@@ -537,7 +538,7 @@ $.extend( Datepicker.prototype, {
537
538
  _getInst: function( target ) {
538
539
  try {
539
540
  return $.data( target, "datepicker" );
540
- } catch ( err ) {
541
+ } catch ( _err ) {
541
542
  throw "Missing instance data for this datepicker";
542
543
  }
543
544
  },
@@ -770,7 +771,7 @@ $.extend( Datepicker.prototype, {
770
771
  $.datepicker._updateAlternate( inst );
771
772
  $.datepicker._updateDatepicker( inst );
772
773
  }
773
- } catch ( err ) {
774
+ } catch ( _err ) {
774
775
  }
775
776
  }
776
777
  return true;
@@ -913,11 +914,8 @@ $.extend( Datepicker.prototype, {
913
914
  }
914
915
  },
915
916
 
916
- // #6694 - don't focus the input if it's already focused
917
- // this breaks the change event in IE
918
- // Support: IE and jQuery <1.9
919
917
  _shouldFocusInput: function( inst ) {
920
- return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" );
918
+ return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" );
921
919
  },
922
920
 
923
921
  /* Check positioning to remain on screen. */
@@ -974,8 +972,7 @@ $.extend( Datepicker.prototype, {
974
972
  $.datepicker._tidyDialog( inst );
975
973
  };
976
974
 
977
- // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
978
- if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {
975
+ if ( $.effects && ( $.effects.effect[ showAnim ] ) ) {
979
976
  inst.dpDiv.hide( showAnim, $.datepicker._get( inst, "showOptions" ), duration, postProcess );
980
977
  } else {
981
978
  inst.dpDiv[ ( showAnim === "slideDown" ? "slideUp" :
@@ -1546,7 +1543,7 @@ $.extend( Datepicker.prototype, {
1546
1543
 
1547
1544
  try {
1548
1545
  date = this.parseDate( dateFormat, dates, settings ) || defaultDate;
1549
- } catch ( event ) {
1546
+ } catch ( _err ) {
1550
1547
  dates = ( noDefault ? "" : dates );
1551
1548
  }
1552
1549
  inst.selectedDay = date.getDate();
@@ -1575,7 +1572,7 @@ $.extend( Datepicker.prototype, {
1575
1572
  try {
1576
1573
  return $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ),
1577
1574
  offset, $.datepicker._getFormatConfig( inst ) );
1578
- } catch ( e ) {
1575
+ } catch ( _e ) {
1579
1576
 
1580
1577
  // Ignore
1581
1578
  }
@@ -2236,7 +2233,7 @@ $.fn.datepicker = function( options ) {
2236
2233
  $.datepicker = new Datepicker(); // singleton instance
2237
2234
  $.datepicker.initialized = false;
2238
2235
  $.datepicker.uuid = new Date().getTime();
2239
- $.datepicker.version = "1.13.3";
2236
+ $.datepicker.version = "1.14.2";
2240
2237
 
2241
2238
  return $.datepicker;
2242
2239
 
@@ -5,15 +5,13 @@
5
5
  //= require jquery-ui/focusable
6
6
  //= require jquery-ui/keycode
7
7
  //= require jquery-ui/position
8
- //= require jquery-ui/safe-active-element
9
- //= require jquery-ui/safe-blur
10
8
  //= require jquery-ui/tabbable
11
9
  //= require jquery-ui/unique-id
12
10
  //= require jquery-ui/version
13
11
  //= require jquery-ui/widget
14
12
 
15
13
  /*!
16
- * jQuery UI Dialog 1.13.3
14
+ * jQuery UI Dialog 1.14.2
17
15
  * https://jqueryui.com
18
16
  *
19
17
  * Copyright OpenJS Foundation and other contributors
@@ -45,8 +43,6 @@
45
43
  "../focusable",
46
44
  "../keycode",
47
45
  "../position",
48
- "../safe-active-element",
49
- "../safe-blur",
50
46
  "../tabbable",
51
47
  "../unique-id",
52
48
  "../version",
@@ -61,7 +57,7 @@
61
57
  "use strict";
62
58
 
63
59
  $.widget( "ui.dialog", {
64
- version: "1.13.3",
60
+ version: "1.14.2",
65
61
  options: {
66
62
  appendTo: "body",
67
63
  autoOpen: true,
@@ -97,6 +93,7 @@ $.widget( "ui.dialog", {
97
93
  resizable: true,
98
94
  show: null,
99
95
  title: null,
96
+ uiDialogTitleHeadingLevel: 0,
100
97
  width: 300,
101
98
 
102
99
  // Callbacks
@@ -243,7 +240,7 @@ $.widget( "ui.dialog", {
243
240
  // Hiding a focused element doesn't trigger blur in WebKit
244
241
  // so in case we have nothing to focus on, explicitly blur the active element
245
242
  // https://bugs.webkit.org/show_bug.cgi?id=47182
246
- $.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) );
243
+ $( this.document[ 0 ].activeElement ).trigger( "blur" );
247
244
  }
248
245
 
249
246
  this._hide( this.uiDialog, this.options.hide, function() {
@@ -287,7 +284,7 @@ $.widget( "ui.dialog", {
287
284
  }
288
285
 
289
286
  this._isOpen = true;
290
- this.opener = $( $.ui.safeActiveElement( this.document[ 0 ] ) );
287
+ this.opener = $( this.document[ 0 ].activeElement );
291
288
 
292
289
  this._size();
293
290
  this._position();
@@ -343,7 +340,7 @@ $.widget( "ui.dialog", {
343
340
  },
344
341
 
345
342
  _restoreTabbableFocus: function() {
346
- var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
343
+ var activeElement = this.document[ 0 ].activeElement,
347
344
  isActive = this.uiDialog[ 0 ] === activeElement ||
348
345
  $.contains( this.uiDialog[ 0 ], activeElement );
349
346
  if ( !isActive ) {
@@ -354,11 +351,6 @@ $.widget( "ui.dialog", {
354
351
  _keepFocus: function( event ) {
355
352
  event.preventDefault();
356
353
  this._restoreTabbableFocus();
357
-
358
- // support: IE
359
- // IE <= 8 doesn't prevent moving focus even with event.preventDefault()
360
- // so we check again later
361
- this._delay( this._restoreTabbableFocus );
362
354
  },
363
355
 
364
356
  _createWrapper: function() {
@@ -368,7 +360,8 @@ $.widget( "ui.dialog", {
368
360
 
369
361
  // Setting tabIndex makes the div focusable
370
362
  tabIndex: -1,
371
- role: "dialog"
363
+ role: "dialog",
364
+ "aria-modal": this.options.modal ? "true" : null
372
365
  } )
373
366
  .appendTo( this._appendTo() );
374
367
 
@@ -441,9 +434,6 @@ $.widget( "ui.dialog", {
441
434
  }
442
435
  } );
443
436
 
444
- // Support: IE
445
- // Use type="button" to prevent enter keypresses in textboxes from closing the
446
- // dialog in IE (#9312)
447
437
  this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
448
438
  .button( {
449
439
  label: $( "<a>" ).text( this.options.closeText ).html(),
@@ -460,7 +450,13 @@ $.widget( "ui.dialog", {
460
450
  }
461
451
  } );
462
452
 
463
- uiDialogTitle = $( "<span>" ).uniqueId().prependTo( this.uiDialogTitlebar );
453
+ var uiDialogHeadingLevel = Number.isInteger( this.options.uiDialogTitleHeadingLevel ) &&
454
+ this.options.uiDialogTitleHeadingLevel > 0 &&
455
+ this.options.uiDialogTitleHeadingLevel <= 6 ?
456
+ "h" + this.options.uiDialogTitleHeadingLevel : "span";
457
+
458
+ uiDialogTitle = $( "<" + uiDialogHeadingLevel + ">" )
459
+ .uniqueId().prependTo( this.uiDialogTitlebar );
464
460
  this._addClass( uiDialogTitle, "ui-dialog-title" );
465
461
  this._title( uiDialogTitle );
466
462
 
@@ -786,6 +782,10 @@ $.widget( "ui.dialog", {
786
782
  if ( key === "title" ) {
787
783
  this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) );
788
784
  }
785
+
786
+ if ( key === "modal" ) {
787
+ uiDialog.attr( "aria-modal", value ? "true" : null );
788
+ }
789
789
  },
790
790
 
791
791
  _size: function() {
@@ -871,8 +871,6 @@ $.widget( "ui.dialog", {
871
871
  return;
872
872
  }
873
873
 
874
- var jqMinor = $.fn.jquery.substring( 0, 4 );
875
-
876
874
  // We use a delay in case the overlay is created from an
877
875
  // event that we're going to be cancelling (#2804)
878
876
  var isOpening = true;
@@ -894,18 +892,6 @@ $.widget( "ui.dialog", {
894
892
  if ( !instance._allowInteraction( event ) ) {
895
893
  event.preventDefault();
896
894
  instance._focusTabbable();
897
-
898
- // Support: jQuery >=3.4 <3.7 only
899
- // In jQuery 3.4-3.6, there are multiple issues with focus/blur
900
- // trigger chains or when triggering is done on a hidden element
901
- // at least once.
902
- // Trigger focus in a delay in addition if needed to avoid the issues.
903
- // See https://github.com/jquery/jquery/issues/4382
904
- // See https://github.com/jquery/jquery/issues/4856
905
- // See https://github.com/jquery/jquery/issues/4950
906
- if ( jqMinor === "3.4." || jqMinor === "3.5." || jqMinor === "3.6." ) {
907
- instance._delay( instance._restoreTabbableFocus );
908
- }
909
895
  }
910
896
  }.bind( this ) );
911
897
  }
@@ -944,7 +930,7 @@ $.widget( "ui.dialog", {
944
930
 
945
931
  // DEPRECATED
946
932
  // TODO: switch return back to widget declaration at top of file when this is removed
947
- if ( $.uiBackCompat !== false ) {
933
+ if ( $.uiBackCompat === true ) {
948
934
 
949
935
  // Backcompat for dialogClass option
950
936
  $.widget( "ui.dialog", $.ui.dialog, {