bootstrap 5.0.0.beta1 → 5.0.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/README.md +3 -3
- data/assets/javascripts/bootstrap-global-this-define.js +6 -0
- data/assets/javascripts/bootstrap-global-this-undefine.js +2 -0
- data/assets/javascripts/bootstrap-sprockets.js +3 -0
- data/assets/javascripts/bootstrap.js +429 -486
- data/assets/javascripts/bootstrap.min.js +3 -3
- data/assets/javascripts/bootstrap/alert.js +81 -80
- data/assets/javascripts/bootstrap/base-component.js +75 -0
- data/assets/javascripts/bootstrap/button.js +60 -72
- data/assets/javascripts/bootstrap/carousel.js +131 -110
- data/assets/javascripts/bootstrap/collapse.js +94 -77
- data/assets/javascripts/bootstrap/dom/data.js +3 -3
- data/assets/javascripts/bootstrap/dom/event-handler.js +6 -5
- data/assets/javascripts/bootstrap/dom/manipulator.js +3 -3
- data/assets/javascripts/bootstrap/dom/selector-engine.js +6 -11
- data/assets/javascripts/bootstrap/dropdown.js +159 -90
- data/assets/javascripts/bootstrap/modal.js +132 -125
- data/assets/javascripts/bootstrap/popover.js +73 -25
- data/assets/javascripts/bootstrap/scrollspy.js +93 -76
- data/assets/javascripts/bootstrap/tab.js +78 -82
- data/assets/javascripts/bootstrap/toast.js +79 -75
- data/assets/javascripts/bootstrap/tooltip.js +207 -185
- data/assets/stylesheets/_bootstrap-grid.scss +3 -3
- data/assets/stylesheets/_bootstrap-reboot.scss +3 -3
- data/assets/stylesheets/_bootstrap.scss +3 -3
- data/assets/stylesheets/bootstrap/_accordion.scss +1 -0
- data/assets/stylesheets/bootstrap/_alert.scss +6 -6
- data/assets/stylesheets/bootstrap/_carousel.scss +12 -6
- data/assets/stylesheets/bootstrap/_close.scss +1 -1
- data/assets/stylesheets/bootstrap/_dropdown.scss +29 -15
- data/assets/stylesheets/bootstrap/_list-group.scss +5 -5
- data/assets/stylesheets/bootstrap/_nav.scss +5 -0
- data/assets/stylesheets/bootstrap/_navbar.scss +12 -1
- data/assets/stylesheets/bootstrap/_pagination.scss +2 -2
- data/assets/stylesheets/bootstrap/_popover.scss +0 -15
- data/assets/stylesheets/bootstrap/_reboot.scss +6 -6
- data/assets/stylesheets/bootstrap/_tables.scss +1 -1
- data/assets/stylesheets/bootstrap/_toasts.scss +1 -0
- data/assets/stylesheets/bootstrap/_utilities.scss +6 -0
- data/assets/stylesheets/bootstrap/_variables.scss +30 -7
- data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +5 -5
- data/assets/stylesheets/bootstrap/forms/_form-check.scss +1 -0
- data/assets/stylesheets/bootstrap/forms/_form-range.scss +1 -1
- data/assets/stylesheets/bootstrap/forms/_form-select.scss +1 -2
- data/assets/stylesheets/bootstrap/forms/_validation.scss +1 -1
- data/assets/stylesheets/bootstrap/helpers/_ratio.scss +2 -2
- data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +4 -4
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +13 -6
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +4 -0
- data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +3 -2
- data/assets/stylesheets/bootstrap/utilities/_api.scss +1 -1
- data/bootstrap.gemspec +1 -3
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +15 -2
- data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
- data/test/dummy_rails/app/views/layouts/application.html.erb +3 -1
- data/test/dummy_rails/app/views/pages/root.html +89 -0
- data/test/dummy_rails/config/application.rb +0 -3
- data/test/gemfiles/rails_6_1.gemfile +7 -0
- metadata +13 -36
- data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5d5e37165b41217709c501fa7356d6e90ac9b98467883d26585bf8589b4d222
|
4
|
+
data.tar.gz: 9e3e6b38d01382042c579f60dcb6d1a041dc088ade0643b0c14b0af876f003f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98cb291eaa0986ad4ee9daa440ee76837808379cb0119b005cb7cd09e4c8b06101bb7413cb6d9db6d082765e2380f401f13b72e7e7609295d421e04d5dbf820a
|
7
|
+
data.tar.gz: 78172724277a15f66d50c15289f42452700be4045587ed0c3bfae44e4dc7e97d971ede659de703f95eb97ab3be22b190260bd81907d1bf39339a4db958715fe5
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -20,7 +20,7 @@ Please see the appropriate guide for your environment of choice:
|
|
20
20
|
Add `bootstrap` to your Gemfile:
|
21
21
|
|
22
22
|
```ruby
|
23
|
-
gem 'bootstrap', '~> 5.0.0.
|
23
|
+
gem 'bootstrap', '~> 5.0.0.beta2'
|
24
24
|
```
|
25
25
|
|
26
26
|
Ensure that `sprockets-rails` is at least v2.3.2.
|
@@ -47,8 +47,8 @@ Then, remove all the `*= require` and `*= require_tree` statements from the Sass
|
|
47
47
|
|
48
48
|
Do not use `*= require` in Sass or your other stylesheets will not be able to access the Bootstrap mixins and variables.
|
49
49
|
|
50
|
-
Bootstrap JavaScript
|
51
|
-
If you're using Rails 5.1+, add the `jquery-rails` gem to your Gemfile:
|
50
|
+
Bootstrap JavaScript can optionally use jQuery.
|
51
|
+
If you're using Rails 5.1+, you can add add the `jquery-rails` gem to your Gemfile:
|
52
52
|
|
53
53
|
```ruby
|
54
54
|
gem 'jquery-rails'
|
@@ -1,4 +1,6 @@
|
|
1
|
+
//= require ./bootstrap-global-this-define
|
1
2
|
//= require ./bootstrap/dom/data
|
3
|
+
//= require ./bootstrap/base-component
|
2
4
|
//= require ./bootstrap/dom/event-handler
|
3
5
|
//= require ./bootstrap/alert
|
4
6
|
//= require ./bootstrap/button
|
@@ -13,3 +15,4 @@
|
|
13
15
|
//= require ./bootstrap/scrollspy
|
14
16
|
//= require ./bootstrap/tab
|
15
17
|
//= require ./bootstrap/toast
|
18
|
+
//= require ./bootstrap-global-this-undefine
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap v5.0.0-
|
3
|
-
* Copyright 2011-
|
2
|
+
* Bootstrap v5.0.0-beta2 (https://getbootstrap.com/)
|
3
|
+
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
6
6
|
(function (global, factory) {
|
@@ -68,12 +68,22 @@
|
|
68
68
|
function _inheritsLoose(subClass, superClass) {
|
69
69
|
subClass.prototype = Object.create(superClass.prototype);
|
70
70
|
subClass.prototype.constructor = subClass;
|
71
|
-
|
71
|
+
|
72
|
+
_setPrototypeOf(subClass, superClass);
|
73
|
+
}
|
74
|
+
|
75
|
+
function _setPrototypeOf(o, p) {
|
76
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
77
|
+
o.__proto__ = p;
|
78
|
+
return o;
|
79
|
+
};
|
80
|
+
|
81
|
+
return _setPrototypeOf(o, p);
|
72
82
|
}
|
73
83
|
|
74
84
|
/**
|
75
85
|
* --------------------------------------------------------------------------
|
76
|
-
* Bootstrap (v5.0.0-
|
86
|
+
* Bootstrap (v5.0.0-beta2): util/index.js
|
77
87
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
78
88
|
* --------------------------------------------------------------------------
|
79
89
|
*/
|
@@ -107,7 +117,20 @@
|
|
107
117
|
var selector = element.getAttribute('data-bs-target');
|
108
118
|
|
109
119
|
if (!selector || selector === '#') {
|
110
|
-
var hrefAttr = element.getAttribute('href');
|
120
|
+
var hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,
|
121
|
+
// so everything starting with `#` or `.`. If a "real" URL is used as the selector,
|
122
|
+
// `document.querySelector` will rightfully complain it is invalid.
|
123
|
+
// See https://github.com/twbs/bootstrap/issues/32273
|
124
|
+
|
125
|
+
if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {
|
126
|
+
return null;
|
127
|
+
} // Just in case some CMS puts out a full URL with the anchor appended
|
128
|
+
|
129
|
+
|
130
|
+
if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
|
131
|
+
hrefAttr = '#' + hrefAttr.split('#')[1];
|
132
|
+
}
|
133
|
+
|
111
134
|
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
|
112
135
|
}
|
113
136
|
|
@@ -185,7 +208,7 @@
|
|
185
208
|
var valueType = value && isElement(value) ? 'element' : toType(value);
|
186
209
|
|
187
210
|
if (!new RegExp(expectedTypes).test(valueType)) {
|
188
|
-
throw new
|
211
|
+
throw new TypeError(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
|
189
212
|
}
|
190
213
|
});
|
191
214
|
};
|
@@ -256,9 +279,27 @@
|
|
256
279
|
|
257
280
|
var isRTL = document.documentElement.dir === 'rtl';
|
258
281
|
|
282
|
+
var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) {
|
283
|
+
onDOMContentLoaded(function () {
|
284
|
+
var $ = getjQuery();
|
285
|
+
/* istanbul ignore if */
|
286
|
+
|
287
|
+
if ($) {
|
288
|
+
var JQUERY_NO_CONFLICT = $.fn[name];
|
289
|
+
$.fn[name] = plugin.jQueryInterface;
|
290
|
+
$.fn[name].Constructor = plugin;
|
291
|
+
|
292
|
+
$.fn[name].noConflict = function () {
|
293
|
+
$.fn[name] = JQUERY_NO_CONFLICT;
|
294
|
+
return plugin.jQueryInterface;
|
295
|
+
};
|
296
|
+
}
|
297
|
+
});
|
298
|
+
};
|
299
|
+
|
259
300
|
/**
|
260
301
|
* --------------------------------------------------------------------------
|
261
|
-
* Bootstrap (v5.0.0-
|
302
|
+
* Bootstrap (v5.0.0-beta2): dom/data.js
|
262
303
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
263
304
|
* --------------------------------------------------------------------------
|
264
305
|
*/
|
@@ -325,7 +366,7 @@
|
|
325
366
|
|
326
367
|
/**
|
327
368
|
* --------------------------------------------------------------------------
|
328
|
-
* Bootstrap (v5.0.0-
|
369
|
+
* Bootstrap (v5.0.0-beta2): dom/event-handler.js
|
329
370
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
330
371
|
* --------------------------------------------------------------------------
|
331
372
|
*/
|
@@ -385,6 +426,7 @@
|
|
385
426
|
event.delegateTarget = target;
|
386
427
|
|
387
428
|
if (handler.oneOff) {
|
429
|
+
// eslint-disable-next-line unicorn/consistent-destructuring
|
388
430
|
EventHandler.off(element, event.type, fn);
|
389
431
|
}
|
390
432
|
|
@@ -604,7 +646,7 @@
|
|
604
646
|
* ------------------------------------------------------------------------
|
605
647
|
*/
|
606
648
|
|
607
|
-
var VERSION = '5.0.0-
|
649
|
+
var VERSION = '5.0.0-beta2';
|
608
650
|
|
609
651
|
var BaseComponent = /*#__PURE__*/function () {
|
610
652
|
function BaseComponent(element) {
|
@@ -653,9 +695,9 @@
|
|
653
695
|
var EVENT_CLOSE = "close" + EVENT_KEY;
|
654
696
|
var EVENT_CLOSED = "closed" + EVENT_KEY;
|
655
697
|
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
656
|
-
var
|
657
|
-
var
|
658
|
-
var
|
698
|
+
var CLASS_NAME_ALERT = 'alert';
|
699
|
+
var CLASS_NAME_FADE = 'fade';
|
700
|
+
var CLASS_NAME_SHOW = 'show';
|
659
701
|
/**
|
660
702
|
* ------------------------------------------------------------------------
|
661
703
|
* Class Definition
|
@@ -686,7 +728,7 @@
|
|
686
728
|
;
|
687
729
|
|
688
730
|
_proto._getRootElement = function _getRootElement(element) {
|
689
|
-
return getElementFromSelector(element) || element.closest("." +
|
731
|
+
return getElementFromSelector(element) || element.closest("." + CLASS_NAME_ALERT);
|
690
732
|
};
|
691
733
|
|
692
734
|
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
|
@@ -696,16 +738,16 @@
|
|
696
738
|
_proto._removeElement = function _removeElement(element) {
|
697
739
|
var _this = this;
|
698
740
|
|
699
|
-
element.classList.remove(
|
741
|
+
element.classList.remove(CLASS_NAME_SHOW);
|
700
742
|
|
701
|
-
if (!element.classList.contains(
|
743
|
+
if (!element.classList.contains(CLASS_NAME_FADE)) {
|
702
744
|
this._destroyElement(element);
|
703
745
|
|
704
746
|
return;
|
705
747
|
}
|
706
748
|
|
707
749
|
var transitionDuration = getTransitionDurationFromElement(element);
|
708
|
-
EventHandler.one(element,
|
750
|
+
EventHandler.one(element, 'transitionend', function () {
|
709
751
|
return _this._destroyElement(element);
|
710
752
|
});
|
711
753
|
emulateTransitionEnd(element, transitionDuration);
|
@@ -746,8 +788,8 @@
|
|
746
788
|
|
747
789
|
_createClass(Alert, null, [{
|
748
790
|
key: "DATA_KEY",
|
749
|
-
// Getters
|
750
|
-
|
791
|
+
get: // Getters
|
792
|
+
function get() {
|
751
793
|
return DATA_KEY;
|
752
794
|
}
|
753
795
|
}]);
|
@@ -769,21 +811,7 @@
|
|
769
811
|
* add .Alert to jQuery only if jQuery is present
|
770
812
|
*/
|
771
813
|
|
772
|
-
|
773
|
-
var $ = getjQuery();
|
774
|
-
/* istanbul ignore if */
|
775
|
-
|
776
|
-
if ($) {
|
777
|
-
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
778
|
-
$.fn[NAME] = Alert.jQueryInterface;
|
779
|
-
$.fn[NAME].Constructor = Alert;
|
780
|
-
|
781
|
-
$.fn[NAME].noConflict = function () {
|
782
|
-
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
783
|
-
return Alert.jQueryInterface;
|
784
|
-
};
|
785
|
-
}
|
786
|
-
});
|
814
|
+
defineJQueryPlugin(NAME, Alert);
|
787
815
|
|
788
816
|
/**
|
789
817
|
* ------------------------------------------------------------------------
|
@@ -836,8 +864,8 @@
|
|
836
864
|
|
837
865
|
_createClass(Button, null, [{
|
838
866
|
key: "DATA_KEY",
|
839
|
-
// Getters
|
840
|
-
|
867
|
+
get: // Getters
|
868
|
+
function get() {
|
841
869
|
return DATA_KEY$1;
|
842
870
|
}
|
843
871
|
}]);
|
@@ -869,25 +897,11 @@
|
|
869
897
|
* add .Button to jQuery only if jQuery is present
|
870
898
|
*/
|
871
899
|
|
872
|
-
|
873
|
-
var $ = getjQuery();
|
874
|
-
/* istanbul ignore if */
|
875
|
-
|
876
|
-
if ($) {
|
877
|
-
var JQUERY_NO_CONFLICT = $.fn[NAME$1];
|
878
|
-
$.fn[NAME$1] = Button.jQueryInterface;
|
879
|
-
$.fn[NAME$1].Constructor = Button;
|
880
|
-
|
881
|
-
$.fn[NAME$1].noConflict = function () {
|
882
|
-
$.fn[NAME$1] = JQUERY_NO_CONFLICT;
|
883
|
-
return Button.jQueryInterface;
|
884
|
-
};
|
885
|
-
}
|
886
|
-
});
|
900
|
+
defineJQueryPlugin(NAME$1, Button);
|
887
901
|
|
888
902
|
/**
|
889
903
|
* --------------------------------------------------------------------------
|
890
|
-
* Bootstrap (v5.0.0-
|
904
|
+
* Bootstrap (v5.0.0-beta2): dom/manipulator.js
|
891
905
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
892
906
|
* --------------------------------------------------------------------------
|
893
907
|
*/
|
@@ -959,7 +973,7 @@
|
|
959
973
|
|
960
974
|
/**
|
961
975
|
* --------------------------------------------------------------------------
|
962
|
-
* Bootstrap (v5.0.0-
|
976
|
+
* Bootstrap (v5.0.0-beta2): dom/selector-engine.js
|
963
977
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
964
978
|
* --------------------------------------------------------------------------
|
965
979
|
*/
|
@@ -971,9 +985,6 @@
|
|
971
985
|
*/
|
972
986
|
var NODE_TEXT = 3;
|
973
987
|
var SelectorEngine = {
|
974
|
-
matches: function matches(element, selector) {
|
975
|
-
return element.matches(selector);
|
976
|
-
},
|
977
988
|
find: function find(selector, element) {
|
978
989
|
var _ref;
|
979
990
|
|
@@ -993,9 +1004,7 @@
|
|
993
1004
|
children: function children(element, selector) {
|
994
1005
|
var _ref2;
|
995
1006
|
|
996
|
-
|
997
|
-
|
998
|
-
return children.filter(function (child) {
|
1007
|
+
return (_ref2 = []).concat.apply(_ref2, element.children).filter(function (child) {
|
999
1008
|
return child.matches(selector);
|
1000
1009
|
});
|
1001
1010
|
},
|
@@ -1004,7 +1013,7 @@
|
|
1004
1013
|
var ancestor = element.parentNode;
|
1005
1014
|
|
1006
1015
|
while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
|
1007
|
-
if (
|
1016
|
+
if (ancestor.matches(selector)) {
|
1008
1017
|
parents.push(ancestor);
|
1009
1018
|
}
|
1010
1019
|
|
@@ -1030,7 +1039,7 @@
|
|
1030
1039
|
var next = element.nextElementSibling;
|
1031
1040
|
|
1032
1041
|
while (next) {
|
1033
|
-
if (
|
1042
|
+
if (next.matches(selector)) {
|
1034
1043
|
return [next];
|
1035
1044
|
}
|
1036
1045
|
|
@@ -1103,12 +1112,11 @@
|
|
1103
1112
|
var SELECTOR_ITEM_IMG = '.carousel-item img';
|
1104
1113
|
var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
|
1105
1114
|
var SELECTOR_INDICATORS = '.carousel-indicators';
|
1115
|
+
var SELECTOR_INDICATOR = '[data-bs-target]';
|
1106
1116
|
var SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';
|
1107
1117
|
var SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]';
|
1108
|
-
var
|
1109
|
-
|
1110
|
-
PEN: 'pen'
|
1111
|
-
};
|
1118
|
+
var POINTER_TYPE_TOUCH = 'touch';
|
1119
|
+
var POINTER_TYPE_PEN = 'pen';
|
1112
1120
|
/**
|
1113
1121
|
* ------------------------------------------------------------------------
|
1114
1122
|
* Class Definition
|
@@ -1255,12 +1263,20 @@
|
|
1255
1263
|
this.touchDeltaX = 0; // swipe left
|
1256
1264
|
|
1257
1265
|
if (direction > 0) {
|
1258
|
-
|
1266
|
+
if (isRTL) {
|
1267
|
+
this.next();
|
1268
|
+
} else {
|
1269
|
+
this.prev();
|
1270
|
+
}
|
1259
1271
|
} // swipe right
|
1260
1272
|
|
1261
1273
|
|
1262
1274
|
if (direction < 0) {
|
1263
|
-
|
1275
|
+
if (isRTL) {
|
1276
|
+
this.prev();
|
1277
|
+
} else {
|
1278
|
+
this.next();
|
1279
|
+
}
|
1264
1280
|
}
|
1265
1281
|
};
|
1266
1282
|
|
@@ -1291,7 +1307,7 @@
|
|
1291
1307
|
var _this4 = this;
|
1292
1308
|
|
1293
1309
|
var start = function start(event) {
|
1294
|
-
if (_this4._pointerEvent &&
|
1310
|
+
if (_this4._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
|
1295
1311
|
_this4.touchStartX = event.clientX;
|
1296
1312
|
} else if (!_this4._pointerEvent) {
|
1297
1313
|
_this4.touchStartX = event.touches[0].clientX;
|
@@ -1308,7 +1324,7 @@
|
|
1308
1324
|
};
|
1309
1325
|
|
1310
1326
|
var end = function end(event) {
|
1311
|
-
if (_this4._pointerEvent &&
|
1327
|
+
if (_this4._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
|
1312
1328
|
_this4.touchDeltaX = event.clientX - _this4.touchStartX;
|
1313
1329
|
}
|
1314
1330
|
|
@@ -1367,16 +1383,22 @@
|
|
1367
1383
|
return;
|
1368
1384
|
}
|
1369
1385
|
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1386
|
+
if (event.key === ARROW_LEFT_KEY) {
|
1387
|
+
event.preventDefault();
|
1388
|
+
|
1389
|
+
if (isRTL) {
|
1390
|
+
this.next();
|
1391
|
+
} else {
|
1373
1392
|
this.prev();
|
1374
|
-
|
1393
|
+
}
|
1394
|
+
} else if (event.key === ARROW_RIGHT_KEY) {
|
1395
|
+
event.preventDefault();
|
1375
1396
|
|
1376
|
-
|
1377
|
-
|
1397
|
+
if (isRTL) {
|
1398
|
+
this.prev();
|
1399
|
+
} else {
|
1378
1400
|
this.next();
|
1379
|
-
|
1401
|
+
}
|
1380
1402
|
}
|
1381
1403
|
};
|
1382
1404
|
|
@@ -1418,16 +1440,17 @@
|
|
1418
1440
|
|
1419
1441
|
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
|
1420
1442
|
if (this._indicatorsElement) {
|
1421
|
-
var
|
1443
|
+
var activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement);
|
1444
|
+
activeIndicator.classList.remove(CLASS_NAME_ACTIVE$1);
|
1445
|
+
activeIndicator.removeAttribute('aria-current');
|
1446
|
+
var indicators = SelectorEngine.find(SELECTOR_INDICATOR, this._indicatorsElement);
|
1422
1447
|
|
1423
1448
|
for (var i = 0; i < indicators.length; i++) {
|
1424
|
-
indicators[i].
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
if (nextIndicator) {
|
1430
|
-
nextIndicator.classList.add(CLASS_NAME_ACTIVE$1);
|
1449
|
+
if (Number.parseInt(indicators[i].getAttribute('data-bs-slide-to'), 10) === this._getItemIndex(element)) {
|
1450
|
+
indicators[i].classList.add(CLASS_NAME_ACTIVE$1);
|
1451
|
+
indicators[i].setAttribute('aria-current', 'true');
|
1452
|
+
break;
|
1453
|
+
}
|
1431
1454
|
}
|
1432
1455
|
}
|
1433
1456
|
};
|
@@ -1461,19 +1484,9 @@
|
|
1461
1484
|
var nextElementIndex = this._getItemIndex(nextElement);
|
1462
1485
|
|
1463
1486
|
var isCycling = Boolean(this._interval);
|
1464
|
-
var directionalClassName;
|
1465
|
-
var orderClassName;
|
1466
|
-
var eventDirectionName;
|
1467
|
-
|
1468
|
-
if (direction === DIRECTION_NEXT) {
|
1469
|
-
directionalClassName = CLASS_NAME_START;
|
1470
|
-
orderClassName = CLASS_NAME_NEXT;
|
1471
|
-
eventDirectionName = DIRECTION_LEFT;
|
1472
|
-
} else {
|
1473
|
-
directionalClassName = CLASS_NAME_END;
|
1474
|
-
orderClassName = CLASS_NAME_PREV;
|
1475
|
-
eventDirectionName = DIRECTION_RIGHT;
|
1476
|
-
}
|
1487
|
+
var directionalClassName = direction === DIRECTION_NEXT ? CLASS_NAME_START : CLASS_NAME_END;
|
1488
|
+
var orderClassName = direction === DIRECTION_NEXT ? CLASS_NAME_NEXT : CLASS_NAME_PREV;
|
1489
|
+
var eventDirectionName = direction === DIRECTION_NEXT ? DIRECTION_LEFT : DIRECTION_RIGHT;
|
1477
1490
|
|
1478
1491
|
if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE$1)) {
|
1479
1492
|
this._isSliding = false;
|
@@ -1507,7 +1520,7 @@
|
|
1507
1520
|
activeElement.classList.add(directionalClassName);
|
1508
1521
|
nextElement.classList.add(directionalClassName);
|
1509
1522
|
var transitionDuration = getTransitionDurationFromElement(activeElement);
|
1510
|
-
EventHandler.one(activeElement,
|
1523
|
+
EventHandler.one(activeElement, 'transitionend', function () {
|
1511
1524
|
nextElement.classList.remove(directionalClassName, orderClassName);
|
1512
1525
|
nextElement.classList.add(CLASS_NAME_ACTIVE$1);
|
1513
1526
|
activeElement.classList.remove(CLASS_NAME_ACTIVE$1, orderClassName, directionalClassName);
|
@@ -1635,21 +1648,7 @@
|
|
1635
1648
|
* add .Carousel to jQuery only if jQuery is present
|
1636
1649
|
*/
|
1637
1650
|
|
1638
|
-
|
1639
|
-
var $ = getjQuery();
|
1640
|
-
/* istanbul ignore if */
|
1641
|
-
|
1642
|
-
if ($) {
|
1643
|
-
var JQUERY_NO_CONFLICT = $.fn[NAME$2];
|
1644
|
-
$.fn[NAME$2] = Carousel.jQueryInterface;
|
1645
|
-
$.fn[NAME$2].Constructor = Carousel;
|
1646
|
-
|
1647
|
-
$.fn[NAME$2].noConflict = function () {
|
1648
|
-
$.fn[NAME$2] = JQUERY_NO_CONFLICT;
|
1649
|
-
return Carousel.jQueryInterface;
|
1650
|
-
};
|
1651
|
-
}
|
1652
|
-
});
|
1651
|
+
defineJQueryPlugin(NAME$2, Carousel);
|
1653
1652
|
|
1654
1653
|
/**
|
1655
1654
|
* ------------------------------------------------------------------------
|
@@ -1674,7 +1673,7 @@
|
|
1674
1673
|
var EVENT_HIDE = "hide" + EVENT_KEY$3;
|
1675
1674
|
var EVENT_HIDDEN = "hidden" + EVENT_KEY$3;
|
1676
1675
|
var EVENT_CLICK_DATA_API$3 = "click" + EVENT_KEY$3 + DATA_API_KEY$3;
|
1677
|
-
var CLASS_NAME_SHOW = 'show';
|
1676
|
+
var CLASS_NAME_SHOW$1 = 'show';
|
1678
1677
|
var CLASS_NAME_COLLAPSE = 'collapse';
|
1679
1678
|
var CLASS_NAME_COLLAPSING = 'collapsing';
|
1680
1679
|
var CLASS_NAME_COLLAPSED = 'collapsed';
|
@@ -1732,7 +1731,7 @@
|
|
1732
1731
|
|
1733
1732
|
// Public
|
1734
1733
|
_proto.toggle = function toggle() {
|
1735
|
-
if (this._element.classList.contains(CLASS_NAME_SHOW)) {
|
1734
|
+
if (this._element.classList.contains(CLASS_NAME_SHOW$1)) {
|
1736
1735
|
this.hide();
|
1737
1736
|
} else {
|
1738
1737
|
this.show();
|
@@ -1742,7 +1741,7 @@
|
|
1742
1741
|
_proto.show = function show() {
|
1743
1742
|
var _this2 = this;
|
1744
1743
|
|
1745
|
-
if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) {
|
1744
|
+
if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW$1)) {
|
1746
1745
|
return;
|
1747
1746
|
}
|
1748
1747
|
|
@@ -1814,7 +1813,7 @@
|
|
1814
1813
|
var complete = function complete() {
|
1815
1814
|
_this2._element.classList.remove(CLASS_NAME_COLLAPSING);
|
1816
1815
|
|
1817
|
-
_this2._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
|
1816
|
+
_this2._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$1);
|
1818
1817
|
|
1819
1818
|
_this2._element.style[dimension] = '';
|
1820
1819
|
|
@@ -1826,7 +1825,7 @@
|
|
1826
1825
|
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
|
1827
1826
|
var scrollSize = "scroll" + capitalizedDimension;
|
1828
1827
|
var transitionDuration = getTransitionDurationFromElement(this._element);
|
1829
|
-
EventHandler.one(this._element,
|
1828
|
+
EventHandler.one(this._element, 'transitionend', complete);
|
1830
1829
|
emulateTransitionEnd(this._element, transitionDuration);
|
1831
1830
|
this._element.style[dimension] = this._element[scrollSize] + "px";
|
1832
1831
|
};
|
@@ -1834,7 +1833,7 @@
|
|
1834
1833
|
_proto.hide = function hide() {
|
1835
1834
|
var _this3 = this;
|
1836
1835
|
|
1837
|
-
if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) {
|
1836
|
+
if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW$1)) {
|
1838
1837
|
return;
|
1839
1838
|
}
|
1840
1839
|
|
@@ -1851,7 +1850,7 @@
|
|
1851
1850
|
|
1852
1851
|
this._element.classList.add(CLASS_NAME_COLLAPSING);
|
1853
1852
|
|
1854
|
-
this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
|
1853
|
+
this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$1);
|
1855
1854
|
|
1856
1855
|
var triggerArrayLength = this._triggerArray.length;
|
1857
1856
|
|
@@ -1860,7 +1859,7 @@
|
|
1860
1859
|
var trigger = this._triggerArray[i];
|
1861
1860
|
var elem = getElementFromSelector(trigger);
|
1862
1861
|
|
1863
|
-
if (elem && !elem.classList.contains(CLASS_NAME_SHOW)) {
|
1862
|
+
if (elem && !elem.classList.contains(CLASS_NAME_SHOW$1)) {
|
1864
1863
|
trigger.classList.add(CLASS_NAME_COLLAPSED);
|
1865
1864
|
trigger.setAttribute('aria-expanded', false);
|
1866
1865
|
}
|
@@ -1881,7 +1880,7 @@
|
|
1881
1880
|
|
1882
1881
|
this._element.style[dimension] = '';
|
1883
1882
|
var transitionDuration = getTransitionDurationFromElement(this._element);
|
1884
|
-
EventHandler.one(this._element,
|
1883
|
+
EventHandler.one(this._element, 'transitionend', complete);
|
1885
1884
|
emulateTransitionEnd(this._element, transitionDuration);
|
1886
1885
|
};
|
1887
1886
|
|
@@ -1939,7 +1938,7 @@
|
|
1939
1938
|
return;
|
1940
1939
|
}
|
1941
1940
|
|
1942
|
-
var isOpen = element.classList.contains(CLASS_NAME_SHOW);
|
1941
|
+
var isOpen = element.classList.contains(CLASS_NAME_SHOW$1);
|
1943
1942
|
triggerArray.forEach(function (elem) {
|
1944
1943
|
if (isOpen) {
|
1945
1944
|
elem.classList.remove(CLASS_NAME_COLLAPSED);
|
@@ -2003,7 +2002,7 @@
|
|
2003
2002
|
|
2004
2003
|
EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$1, function (event) {
|
2005
2004
|
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
|
2006
|
-
if (event.target.tagName === 'A') {
|
2005
|
+
if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {
|
2007
2006
|
event.preventDefault();
|
2008
2007
|
}
|
2009
2008
|
|
@@ -2036,21 +2035,7 @@
|
|
2036
2035
|
* add .Collapse to jQuery only if jQuery is present
|
2037
2036
|
*/
|
2038
2037
|
|
2039
|
-
|
2040
|
-
var $ = getjQuery();
|
2041
|
-
/* istanbul ignore if */
|
2042
|
-
|
2043
|
-
if ($) {
|
2044
|
-
var JQUERY_NO_CONFLICT = $.fn[NAME$3];
|
2045
|
-
$.fn[NAME$3] = Collapse.jQueryInterface;
|
2046
|
-
$.fn[NAME$3].Constructor = Collapse;
|
2047
|
-
|
2048
|
-
$.fn[NAME$3].noConflict = function () {
|
2049
|
-
$.fn[NAME$3] = JQUERY_NO_CONFLICT;
|
2050
|
-
return Collapse.jQueryInterface;
|
2051
|
-
};
|
2052
|
-
}
|
2053
|
-
});
|
2038
|
+
defineJQueryPlugin(NAME$3, Collapse);
|
2054
2039
|
|
2055
2040
|
/**
|
2056
2041
|
* ------------------------------------------------------------------------
|
@@ -2079,7 +2064,7 @@
|
|
2079
2064
|
var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY$4 + DATA_API_KEY$4;
|
2080
2065
|
var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY$4 + DATA_API_KEY$4;
|
2081
2066
|
var CLASS_NAME_DISABLED = 'disabled';
|
2082
|
-
var CLASS_NAME_SHOW$
|
2067
|
+
var CLASS_NAME_SHOW$2 = 'show';
|
2083
2068
|
var CLASS_NAME_DROPUP = 'dropup';
|
2084
2069
|
var CLASS_NAME_DROPEND = 'dropend';
|
2085
2070
|
var CLASS_NAME_DROPSTART = 'dropstart';
|
@@ -2096,7 +2081,7 @@
|
|
2096
2081
|
var PLACEMENT_RIGHT = isRTL ? 'left-start' : 'right-start';
|
2097
2082
|
var PLACEMENT_LEFT = isRTL ? 'right-start' : 'left-start';
|
2098
2083
|
var Default$2 = {
|
2099
|
-
offset: 0,
|
2084
|
+
offset: [0, 2],
|
2100
2085
|
flip: true,
|
2101
2086
|
boundary: 'clippingParents',
|
2102
2087
|
reference: 'toggle',
|
@@ -2104,12 +2089,12 @@
|
|
2104
2089
|
popperConfig: null
|
2105
2090
|
};
|
2106
2091
|
var DefaultType$2 = {
|
2107
|
-
offset: '(
|
2092
|
+
offset: '(array|string|function)',
|
2108
2093
|
flip: 'boolean',
|
2109
2094
|
boundary: '(string|element)',
|
2110
|
-
reference: '(string|element)',
|
2095
|
+
reference: '(string|element|object)',
|
2111
2096
|
display: 'string',
|
2112
|
-
popperConfig: '(null|object)'
|
2097
|
+
popperConfig: '(null|object|function)'
|
2113
2098
|
};
|
2114
2099
|
/**
|
2115
2100
|
* ------------------------------------------------------------------------
|
@@ -2143,7 +2128,7 @@
|
|
2143
2128
|
return;
|
2144
2129
|
}
|
2145
2130
|
|
2146
|
-
var isActive = this._element.classList.contains(CLASS_NAME_SHOW$
|
2131
|
+
var isActive = this._element.classList.contains(CLASS_NAME_SHOW$2);
|
2147
2132
|
|
2148
2133
|
Dropdown.clearMenus();
|
2149
2134
|
|
@@ -2155,7 +2140,7 @@
|
|
2155
2140
|
};
|
2156
2141
|
|
2157
2142
|
_proto.show = function show() {
|
2158
|
-
if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || this._menu.classList.contains(CLASS_NAME_SHOW$
|
2143
|
+
if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || this._menu.classList.contains(CLASS_NAME_SHOW$2)) {
|
2159
2144
|
return;
|
2160
2145
|
}
|
2161
2146
|
|
@@ -2170,7 +2155,9 @@
|
|
2170
2155
|
} // Totally disable Popper for Dropdowns in Navbar
|
2171
2156
|
|
2172
2157
|
|
2173
|
-
if (
|
2158
|
+
if (this._inNavbar) {
|
2159
|
+
Manipulator.setDataAttribute(this._menu, 'popper', 'none');
|
2160
|
+
} else {
|
2174
2161
|
if (typeof Popper__namespace === 'undefined') {
|
2175
2162
|
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
|
2176
2163
|
}
|
@@ -2185,9 +2172,20 @@
|
|
2185
2172
|
if (typeof this._config.reference.jquery !== 'undefined') {
|
2186
2173
|
referenceElement = this._config.reference[0];
|
2187
2174
|
}
|
2175
|
+
} else if (typeof this._config.reference === 'object') {
|
2176
|
+
referenceElement = this._config.reference;
|
2188
2177
|
}
|
2189
2178
|
|
2190
|
-
|
2179
|
+
var popperConfig = this._getPopperConfig();
|
2180
|
+
|
2181
|
+
var isDisplayStatic = popperConfig.modifiers.find(function (modifier) {
|
2182
|
+
return modifier.name === 'applyStyles' && modifier.enabled === false;
|
2183
|
+
});
|
2184
|
+
this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig);
|
2185
|
+
|
2186
|
+
if (isDisplayStatic) {
|
2187
|
+
Manipulator.setDataAttribute(this._menu, 'popper', 'static');
|
2188
|
+
}
|
2191
2189
|
} // If this is a touch-enabled device we add extra
|
2192
2190
|
// empty mouseover listeners to the body's immediate children;
|
2193
2191
|
// only needed because of broken event delegation on iOS
|
@@ -2206,23 +2204,22 @@
|
|
2206
2204
|
|
2207
2205
|
this._element.setAttribute('aria-expanded', true);
|
2208
2206
|
|
2209
|
-
this._menu.classList.toggle(CLASS_NAME_SHOW$
|
2207
|
+
this._menu.classList.toggle(CLASS_NAME_SHOW$2);
|
2210
2208
|
|
2211
|
-
this._element.classList.toggle(CLASS_NAME_SHOW$
|
2209
|
+
this._element.classList.toggle(CLASS_NAME_SHOW$2);
|
2212
2210
|
|
2213
|
-
EventHandler.trigger(
|
2211
|
+
EventHandler.trigger(this._element, EVENT_SHOWN$1, relatedTarget);
|
2214
2212
|
};
|
2215
2213
|
|
2216
2214
|
_proto.hide = function hide() {
|
2217
|
-
if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || !this._menu.classList.contains(CLASS_NAME_SHOW$
|
2215
|
+
if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || !this._menu.classList.contains(CLASS_NAME_SHOW$2)) {
|
2218
2216
|
return;
|
2219
2217
|
}
|
2220
2218
|
|
2221
|
-
var parent = Dropdown.getParentFromElement(this._element);
|
2222
2219
|
var relatedTarget = {
|
2223
2220
|
relatedTarget: this._element
|
2224
2221
|
};
|
2225
|
-
var hideEvent = EventHandler.trigger(
|
2222
|
+
var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$1, relatedTarget);
|
2226
2223
|
|
2227
2224
|
if (hideEvent.defaultPrevented) {
|
2228
2225
|
return;
|
@@ -2232,11 +2229,12 @@
|
|
2232
2229
|
this._popper.destroy();
|
2233
2230
|
}
|
2234
2231
|
|
2235
|
-
this._menu.classList.toggle(CLASS_NAME_SHOW$
|
2232
|
+
this._menu.classList.toggle(CLASS_NAME_SHOW$2);
|
2236
2233
|
|
2237
|
-
this._element.classList.toggle(CLASS_NAME_SHOW$
|
2234
|
+
this._element.classList.toggle(CLASS_NAME_SHOW$2);
|
2238
2235
|
|
2239
|
-
|
2236
|
+
Manipulator.removeDataAttribute(this._menu, 'popper');
|
2237
|
+
EventHandler.trigger(this._element, EVENT_HIDDEN$1, relatedTarget);
|
2240
2238
|
};
|
2241
2239
|
|
2242
2240
|
_proto.dispose = function dispose() {
|
@@ -2275,6 +2273,12 @@
|
|
2275
2273
|
_proto._getConfig = function _getConfig(config) {
|
2276
2274
|
config = _extends({}, this.constructor.Default, Manipulator.getDataAttributes(this._element), config);
|
2277
2275
|
typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
|
2276
|
+
|
2277
|
+
if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
|
2278
|
+
// Popper virtual elements require a getBoundingClientRect method
|
2279
|
+
throw new TypeError(NAME$4.toUpperCase() + ": Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method.");
|
2280
|
+
}
|
2281
|
+
|
2278
2282
|
return config;
|
2279
2283
|
};
|
2280
2284
|
|
@@ -2307,26 +2311,51 @@
|
|
2307
2311
|
return this._element.closest("." + CLASS_NAME_NAVBAR) !== null;
|
2308
2312
|
};
|
2309
2313
|
|
2314
|
+
_proto._getOffset = function _getOffset() {
|
2315
|
+
var _this3 = this;
|
2316
|
+
|
2317
|
+
var offset = this._config.offset;
|
2318
|
+
|
2319
|
+
if (typeof offset === 'string') {
|
2320
|
+
return offset.split(',').map(function (val) {
|
2321
|
+
return Number.parseInt(val, 10);
|
2322
|
+
});
|
2323
|
+
}
|
2324
|
+
|
2325
|
+
if (typeof offset === 'function') {
|
2326
|
+
return function (popperData) {
|
2327
|
+
return offset(popperData, _this3._element);
|
2328
|
+
};
|
2329
|
+
}
|
2330
|
+
|
2331
|
+
return offset;
|
2332
|
+
};
|
2333
|
+
|
2310
2334
|
_proto._getPopperConfig = function _getPopperConfig() {
|
2311
|
-
var
|
2335
|
+
var defaultBsPopperConfig = {
|
2312
2336
|
placement: this._getPlacement(),
|
2313
2337
|
modifiers: [{
|
2314
2338
|
name: 'preventOverflow',
|
2315
2339
|
options: {
|
2316
2340
|
altBoundary: this._config.flip,
|
2317
|
-
|
2341
|
+
boundary: this._config.boundary
|
2342
|
+
}
|
2343
|
+
}, {
|
2344
|
+
name: 'offset',
|
2345
|
+
options: {
|
2346
|
+
offset: this._getOffset()
|
2318
2347
|
}
|
2319
2348
|
}]
|
2320
2349
|
}; // Disable Popper if we have a static display
|
2321
2350
|
|
2322
2351
|
if (this._config.display === 'static') {
|
2323
|
-
|
2352
|
+
defaultBsPopperConfig.modifiers = [{
|
2324
2353
|
name: 'applyStyles',
|
2325
2354
|
enabled: false
|
2326
2355
|
}];
|
2327
2356
|
}
|
2328
2357
|
|
2329
|
-
return _extends({},
|
2358
|
+
return _extends({}, defaultBsPopperConfig, typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig);
|
2330
2359
|
} // Static
|
2331
2360
|
;
|
2332
2361
|
|
@@ -2362,7 +2391,6 @@
|
|
2362
2391
|
var toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$2);
|
2363
2392
|
|
2364
2393
|
for (var i = 0, len = toggles.length; i < len; i++) {
|
2365
|
-
var parent = Dropdown.getParentFromElement(toggles[i]);
|
2366
2394
|
var context = Data.getData(toggles[i], DATA_KEY$4);
|
2367
2395
|
var relatedTarget = {
|
2368
2396
|
relatedTarget: toggles[i]
|
@@ -2378,7 +2406,7 @@
|
|
2378
2406
|
|
2379
2407
|
var dropdownMenu = context._menu;
|
2380
2408
|
|
2381
|
-
if (!toggles[i].classList.contains(CLASS_NAME_SHOW$
|
2409
|
+
if (!toggles[i].classList.contains(CLASS_NAME_SHOW$2)) {
|
2382
2410
|
continue;
|
2383
2411
|
}
|
2384
2412
|
|
@@ -2386,7 +2414,7 @@
|
|
2386
2414
|
continue;
|
2387
2415
|
}
|
2388
2416
|
|
2389
|
-
var hideEvent = EventHandler.trigger(
|
2417
|
+
var hideEvent = EventHandler.trigger(toggles[i], EVENT_HIDE$1, relatedTarget);
|
2390
2418
|
|
2391
2419
|
if (hideEvent.defaultPrevented) {
|
2392
2420
|
continue;
|
@@ -2408,9 +2436,10 @@
|
|
2408
2436
|
context._popper.destroy();
|
2409
2437
|
}
|
2410
2438
|
|
2411
|
-
dropdownMenu.classList.remove(CLASS_NAME_SHOW$
|
2412
|
-
toggles[i].classList.remove(CLASS_NAME_SHOW$
|
2413
|
-
|
2439
|
+
dropdownMenu.classList.remove(CLASS_NAME_SHOW$2);
|
2440
|
+
toggles[i].classList.remove(CLASS_NAME_SHOW$2);
|
2441
|
+
Manipulator.removeDataAttribute(dropdownMenu, 'popper');
|
2442
|
+
EventHandler.trigger(toggles[i], EVENT_HIDDEN$1, relatedTarget);
|
2414
2443
|
}
|
2415
2444
|
};
|
2416
2445
|
|
@@ -2438,7 +2467,7 @@
|
|
2438
2467
|
}
|
2439
2468
|
|
2440
2469
|
var parent = Dropdown.getParentFromElement(this);
|
2441
|
-
var isActive = this.classList.contains(CLASS_NAME_SHOW$
|
2470
|
+
var isActive = this.classList.contains(CLASS_NAME_SHOW$2);
|
2442
2471
|
|
2443
2472
|
if (event.key === ESCAPE_KEY) {
|
2444
2473
|
var button = this.matches(SELECTOR_DATA_TOGGLE$2) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$2)[0];
|
@@ -2447,6 +2476,14 @@
|
|
2447
2476
|
return;
|
2448
2477
|
}
|
2449
2478
|
|
2479
|
+
if (!isActive && (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY)) {
|
2480
|
+
var _button = this.matches(SELECTOR_DATA_TOGGLE$2) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$2)[0];
|
2481
|
+
|
2482
|
+
_button.click();
|
2483
|
+
|
2484
|
+
return;
|
2485
|
+
}
|
2486
|
+
|
2450
2487
|
if (!isActive || event.key === SPACE_KEY) {
|
2451
2488
|
Dropdown.clearMenus();
|
2452
2489
|
return;
|
@@ -2519,21 +2556,7 @@
|
|
2519
2556
|
* add .Dropdown to jQuery only if jQuery is present
|
2520
2557
|
*/
|
2521
2558
|
|
2522
|
-
|
2523
|
-
var $ = getjQuery();
|
2524
|
-
/* istanbul ignore if */
|
2525
|
-
|
2526
|
-
if ($) {
|
2527
|
-
var JQUERY_NO_CONFLICT = $.fn[NAME$4];
|
2528
|
-
$.fn[NAME$4] = Dropdown.jQueryInterface;
|
2529
|
-
$.fn[NAME$4].Constructor = Dropdown;
|
2530
|
-
|
2531
|
-
$.fn[NAME$4].noConflict = function () {
|
2532
|
-
$.fn[NAME$4] = JQUERY_NO_CONFLICT;
|
2533
|
-
return Dropdown.jQueryInterface;
|
2534
|
-
};
|
2535
|
-
}
|
2536
|
-
});
|
2559
|
+
defineJQueryPlugin(NAME$4, Dropdown);
|
2537
2560
|
|
2538
2561
|
/**
|
2539
2562
|
* ------------------------------------------------------------------------
|
@@ -2571,8 +2594,8 @@
|
|
2571
2594
|
var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
|
2572
2595
|
var CLASS_NAME_BACKDROP = 'modal-backdrop';
|
2573
2596
|
var CLASS_NAME_OPEN = 'modal-open';
|
2574
|
-
var CLASS_NAME_FADE = 'fade';
|
2575
|
-
var CLASS_NAME_SHOW$
|
2597
|
+
var CLASS_NAME_FADE$1 = 'fade';
|
2598
|
+
var CLASS_NAME_SHOW$3 = 'show';
|
2576
2599
|
var CLASS_NAME_STATIC = 'modal-static';
|
2577
2600
|
var SELECTOR_DIALOG = '.modal-dialog';
|
2578
2601
|
var SELECTOR_MODAL_BODY = '.modal-body';
|
@@ -2619,7 +2642,7 @@
|
|
2619
2642
|
return;
|
2620
2643
|
}
|
2621
2644
|
|
2622
|
-
if (this._element.classList.contains(CLASS_NAME_FADE)) {
|
2645
|
+
if (this._element.classList.contains(CLASS_NAME_FADE$1)) {
|
2623
2646
|
this._isTransitioning = true;
|
2624
2647
|
}
|
2625
2648
|
|
@@ -2678,7 +2701,7 @@
|
|
2678
2701
|
|
2679
2702
|
this._isShown = false;
|
2680
2703
|
|
2681
|
-
var transition = this._element.classList.contains(CLASS_NAME_FADE);
|
2704
|
+
var transition = this._element.classList.contains(CLASS_NAME_FADE$1);
|
2682
2705
|
|
2683
2706
|
if (transition) {
|
2684
2707
|
this._isTransitioning = true;
|
@@ -2690,14 +2713,14 @@
|
|
2690
2713
|
|
2691
2714
|
EventHandler.off(document, EVENT_FOCUSIN);
|
2692
2715
|
|
2693
|
-
this._element.classList.remove(CLASS_NAME_SHOW$
|
2716
|
+
this._element.classList.remove(CLASS_NAME_SHOW$3);
|
2694
2717
|
|
2695
2718
|
EventHandler.off(this._element, EVENT_CLICK_DISMISS);
|
2696
2719
|
EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
|
2697
2720
|
|
2698
2721
|
if (transition) {
|
2699
2722
|
var transitionDuration = getTransitionDurationFromElement(this._element);
|
2700
|
-
EventHandler.one(this._element,
|
2723
|
+
EventHandler.one(this._element, 'transitionend', function (event) {
|
2701
2724
|
return _this3._hideModal(event);
|
2702
2725
|
});
|
2703
2726
|
emulateTransitionEnd(this._element, transitionDuration);
|
@@ -2744,7 +2767,7 @@
|
|
2744
2767
|
_proto._showElement = function _showElement(relatedTarget) {
|
2745
2768
|
var _this4 = this;
|
2746
2769
|
|
2747
|
-
var transition = this._element.classList.contains(CLASS_NAME_FADE);
|
2770
|
+
var transition = this._element.classList.contains(CLASS_NAME_FADE$1);
|
2748
2771
|
|
2749
2772
|
var modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);
|
2750
2773
|
|
@@ -2771,7 +2794,7 @@
|
|
2771
2794
|
reflow(this._element);
|
2772
2795
|
}
|
2773
2796
|
|
2774
|
-
this._element.classList.add(CLASS_NAME_SHOW$
|
2797
|
+
this._element.classList.add(CLASS_NAME_SHOW$3);
|
2775
2798
|
|
2776
2799
|
if (this._config.focus) {
|
2777
2800
|
this._enforceFocus();
|
@@ -2790,7 +2813,7 @@
|
|
2790
2813
|
|
2791
2814
|
if (transition) {
|
2792
2815
|
var transitionDuration = getTransitionDurationFromElement(this._dialog);
|
2793
|
-
EventHandler.one(this._dialog,
|
2816
|
+
EventHandler.one(this._dialog, 'transitionend', transitionComplete);
|
2794
2817
|
emulateTransitionEnd(this._dialog, transitionDuration);
|
2795
2818
|
} else {
|
2796
2819
|
transitionComplete();
|
@@ -2872,7 +2895,7 @@
|
|
2872
2895
|
_proto._showBackdrop = function _showBackdrop(callback) {
|
2873
2896
|
var _this9 = this;
|
2874
2897
|
|
2875
|
-
var animate = this._element.classList.contains(CLASS_NAME_FADE) ? CLASS_NAME_FADE : '';
|
2898
|
+
var animate = this._element.classList.contains(CLASS_NAME_FADE$1) ? CLASS_NAME_FADE$1 : '';
|
2876
2899
|
|
2877
2900
|
if (this._isShown && this._config.backdrop) {
|
2878
2901
|
this._backdrop = document.createElement('div');
|
@@ -2904,7 +2927,7 @@
|
|
2904
2927
|
reflow(this._backdrop);
|
2905
2928
|
}
|
2906
2929
|
|
2907
|
-
this._backdrop.classList.add(CLASS_NAME_SHOW$
|
2930
|
+
this._backdrop.classList.add(CLASS_NAME_SHOW$3);
|
2908
2931
|
|
2909
2932
|
if (!animate) {
|
2910
2933
|
callback();
|
@@ -2912,10 +2935,10 @@
|
|
2912
2935
|
}
|
2913
2936
|
|
2914
2937
|
var backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
|
2915
|
-
EventHandler.one(this._backdrop,
|
2938
|
+
EventHandler.one(this._backdrop, 'transitionend', callback);
|
2916
2939
|
emulateTransitionEnd(this._backdrop, backdropTransitionDuration);
|
2917
2940
|
} else if (!this._isShown && this._backdrop) {
|
2918
|
-
this._backdrop.classList.remove(CLASS_NAME_SHOW$
|
2941
|
+
this._backdrop.classList.remove(CLASS_NAME_SHOW$3);
|
2919
2942
|
|
2920
2943
|
var callbackRemove = function callbackRemove() {
|
2921
2944
|
_this9._removeBackdrop();
|
@@ -2923,10 +2946,10 @@
|
|
2923
2946
|
callback();
|
2924
2947
|
};
|
2925
2948
|
|
2926
|
-
if (this._element.classList.contains(CLASS_NAME_FADE)) {
|
2949
|
+
if (this._element.classList.contains(CLASS_NAME_FADE$1)) {
|
2927
2950
|
var _backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
|
2928
2951
|
|
2929
|
-
EventHandler.one(this._backdrop,
|
2952
|
+
EventHandler.one(this._backdrop, 'transitionend', callbackRemove);
|
2930
2953
|
emulateTransitionEnd(this._backdrop, _backdropTransitionDuration);
|
2931
2954
|
} else {
|
2932
2955
|
callbackRemove();
|
@@ -2954,12 +2977,12 @@
|
|
2954
2977
|
this._element.classList.add(CLASS_NAME_STATIC);
|
2955
2978
|
|
2956
2979
|
var modalTransitionDuration = getTransitionDurationFromElement(this._dialog);
|
2957
|
-
EventHandler.off(this._element,
|
2958
|
-
EventHandler.one(this._element,
|
2980
|
+
EventHandler.off(this._element, 'transitionend');
|
2981
|
+
EventHandler.one(this._element, 'transitionend', function () {
|
2959
2982
|
_this10._element.classList.remove(CLASS_NAME_STATIC);
|
2960
2983
|
|
2961
2984
|
if (!isModalOverflowing) {
|
2962
|
-
EventHandler.one(_this10._element,
|
2985
|
+
EventHandler.one(_this10._element, 'transitionend', function () {
|
2963
2986
|
_this10._element.style.overflowY = '';
|
2964
2987
|
});
|
2965
2988
|
emulateTransitionEnd(_this10._element, modalTransitionDuration);
|
@@ -3000,60 +3023,50 @@
|
|
3000
3023
|
var _this11 = this;
|
3001
3024
|
|
3002
3025
|
if (this._isBodyOverflowing) {
|
3003
|
-
|
3004
|
-
|
3005
|
-
|
3006
|
-
|
3007
|
-
|
3008
|
-
|
3009
|
-
|
3010
|
-
|
3011
|
-
|
3012
|
-
|
3013
|
-
|
3014
|
-
var actualMargin = element.style.marginRight;
|
3015
|
-
var calculatedMargin = window.getComputedStyle(element)['margin-right'];
|
3016
|
-
Manipulator.setDataAttribute(element, 'margin-right', actualMargin);
|
3017
|
-
element.style.marginRight = Number.parseFloat(calculatedMargin) - _this11._scrollbarWidth + "px";
|
3018
|
-
}); // Adjust body padding
|
3019
|
-
|
3020
|
-
var actualPadding = document.body.style.paddingRight;
|
3021
|
-
var calculatedPadding = window.getComputedStyle(document.body)['padding-right'];
|
3022
|
-
Manipulator.setDataAttribute(document.body, 'padding-right', actualPadding);
|
3023
|
-
document.body.style.paddingRight = Number.parseFloat(calculatedPadding) + this._scrollbarWidth + "px";
|
3026
|
+
this._setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', function (calculatedValue) {
|
3027
|
+
return calculatedValue + _this11._scrollbarWidth;
|
3028
|
+
});
|
3029
|
+
|
3030
|
+
this._setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', function (calculatedValue) {
|
3031
|
+
return calculatedValue - _this11._scrollbarWidth;
|
3032
|
+
});
|
3033
|
+
|
3034
|
+
this._setElementAttributes('body', 'paddingRight', function (calculatedValue) {
|
3035
|
+
return calculatedValue + _this11._scrollbarWidth;
|
3036
|
+
});
|
3024
3037
|
}
|
3025
3038
|
|
3026
3039
|
document.body.classList.add(CLASS_NAME_OPEN);
|
3027
3040
|
};
|
3028
3041
|
|
3029
|
-
_proto.
|
3030
|
-
|
3031
|
-
|
3032
|
-
var
|
3042
|
+
_proto._setElementAttributes = function _setElementAttributes(selector, styleProp, callback) {
|
3043
|
+
SelectorEngine.find(selector).forEach(function (element) {
|
3044
|
+
var actualValue = element.style[styleProp];
|
3045
|
+
var calculatedValue = window.getComputedStyle(element)[styleProp];
|
3046
|
+
Manipulator.setDataAttribute(element, styleProp, actualValue);
|
3047
|
+
element.style[styleProp] = callback(Number.parseFloat(calculatedValue)) + 'px';
|
3048
|
+
});
|
3049
|
+
};
|
3033
3050
|
|
3034
|
-
|
3035
|
-
|
3036
|
-
element.style.paddingRight = padding;
|
3037
|
-
}
|
3038
|
-
}); // Restore sticky content and navbar-toggler margin
|
3051
|
+
_proto._resetScrollbar = function _resetScrollbar() {
|
3052
|
+
this._resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight');
|
3039
3053
|
|
3040
|
-
|
3041
|
-
var margin = Manipulator.getDataAttribute(element, 'margin-right');
|
3054
|
+
this._resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight');
|
3042
3055
|
|
3043
|
-
|
3044
|
-
|
3045
|
-
element.style.marginRight = margin;
|
3046
|
-
}
|
3047
|
-
}); // Restore body padding
|
3056
|
+
this._resetElementAttributes('body', 'paddingRight');
|
3057
|
+
};
|
3048
3058
|
|
3049
|
-
|
3059
|
+
_proto._resetElementAttributes = function _resetElementAttributes(selector, styleProp) {
|
3060
|
+
SelectorEngine.find(selector).forEach(function (element) {
|
3061
|
+
var value = Manipulator.getDataAttribute(element, styleProp);
|
3050
3062
|
|
3051
|
-
|
3052
|
-
|
3053
|
-
|
3054
|
-
|
3055
|
-
|
3056
|
-
|
3063
|
+
if (typeof value === 'undefined' && element === document.body) {
|
3064
|
+
element.style[styleProp] = '';
|
3065
|
+
} else {
|
3066
|
+
Manipulator.removeDataAttribute(element, styleProp);
|
3067
|
+
element.style[styleProp] = value;
|
3068
|
+
}
|
3069
|
+
});
|
3057
3070
|
};
|
3058
3071
|
|
3059
3072
|
_proto._getScrollbarWidth = function _getScrollbarWidth() {
|
@@ -3137,7 +3150,7 @@
|
|
3137
3150
|
data = new Modal(target, config);
|
3138
3151
|
}
|
3139
3152
|
|
3140
|
-
data.
|
3153
|
+
data.toggle(this);
|
3141
3154
|
});
|
3142
3155
|
/**
|
3143
3156
|
* ------------------------------------------------------------------------
|
@@ -3146,25 +3159,11 @@
|
|
3146
3159
|
* add .Modal to jQuery only if jQuery is present
|
3147
3160
|
*/
|
3148
3161
|
|
3149
|
-
|
3150
|
-
var $ = getjQuery();
|
3151
|
-
/* istanbul ignore if */
|
3152
|
-
|
3153
|
-
if ($) {
|
3154
|
-
var JQUERY_NO_CONFLICT = $.fn[NAME$5];
|
3155
|
-
$.fn[NAME$5] = Modal.jQueryInterface;
|
3156
|
-
$.fn[NAME$5].Constructor = Modal;
|
3157
|
-
|
3158
|
-
$.fn[NAME$5].noConflict = function () {
|
3159
|
-
$.fn[NAME$5] = JQUERY_NO_CONFLICT;
|
3160
|
-
return Modal.jQueryInterface;
|
3161
|
-
};
|
3162
|
-
}
|
3163
|
-
});
|
3162
|
+
defineJQueryPlugin(NAME$5, Modal);
|
3164
3163
|
|
3165
3164
|
/**
|
3166
3165
|
* --------------------------------------------------------------------------
|
3167
|
-
* Bootstrap (v5.0.0-
|
3166
|
+
* Bootstrap (v5.0.0-beta2): util/sanitizer.js
|
3168
3167
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
3169
3168
|
* --------------------------------------------------------------------------
|
3170
3169
|
*/
|
@@ -3190,7 +3189,7 @@
|
|
3190
3189
|
|
3191
3190
|
if (allowedAttributeList.includes(attrName)) {
|
3192
3191
|
if (uriAttrs.has(attrName)) {
|
3193
|
-
return Boolean(attr.nodeValue
|
3192
|
+
return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue));
|
3194
3193
|
}
|
3195
3194
|
|
3196
3195
|
return true;
|
@@ -3201,7 +3200,7 @@
|
|
3201
3200
|
}); // Check if a regular expression validates the attribute.
|
3202
3201
|
|
3203
3202
|
for (var i = 0, len = regExp.length; i < len; i++) {
|
3204
|
-
if (
|
3203
|
+
if (regExp[i].test(attrName)) {
|
3205
3204
|
return true;
|
3206
3205
|
}
|
3207
3206
|
}
|
@@ -3310,14 +3309,15 @@
|
|
3310
3309
|
html: 'boolean',
|
3311
3310
|
selector: '(string|boolean)',
|
3312
3311
|
placement: '(string|function)',
|
3312
|
+
offset: '(array|string|function)',
|
3313
3313
|
container: '(string|element|boolean)',
|
3314
|
-
fallbackPlacements: '
|
3314
|
+
fallbackPlacements: 'array',
|
3315
3315
|
boundary: '(string|element)',
|
3316
3316
|
customClass: '(string|function)',
|
3317
3317
|
sanitize: 'boolean',
|
3318
3318
|
sanitizeFn: '(null|function)',
|
3319
3319
|
allowList: 'object',
|
3320
|
-
popperConfig: '(null|object)'
|
3320
|
+
popperConfig: '(null|object|function)'
|
3321
3321
|
};
|
3322
3322
|
var AttachmentMap = {
|
3323
3323
|
AUTO: 'auto',
|
@@ -3335,8 +3335,9 @@
|
|
3335
3335
|
html: false,
|
3336
3336
|
selector: false,
|
3337
3337
|
placement: 'top',
|
3338
|
+
offset: [0, 0],
|
3338
3339
|
container: false,
|
3339
|
-
fallbackPlacements:
|
3340
|
+
fallbackPlacements: ['top', 'right', 'bottom', 'left'],
|
3340
3341
|
boundary: 'clippingParents',
|
3341
3342
|
customClass: '',
|
3342
3343
|
sanitize: true,
|
@@ -3356,9 +3357,9 @@
|
|
3356
3357
|
MOUSEENTER: "mouseenter" + EVENT_KEY$6,
|
3357
3358
|
MOUSELEAVE: "mouseleave" + EVENT_KEY$6
|
3358
3359
|
};
|
3359
|
-
var CLASS_NAME_FADE$
|
3360
|
+
var CLASS_NAME_FADE$2 = 'fade';
|
3360
3361
|
var CLASS_NAME_MODAL = 'modal';
|
3361
|
-
var CLASS_NAME_SHOW$
|
3362
|
+
var CLASS_NAME_SHOW$4 = 'show';
|
3362
3363
|
var HOVER_STATE_SHOW = 'show';
|
3363
3364
|
var HOVER_STATE_OUT = 'out';
|
3364
3365
|
var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
|
@@ -3420,13 +3421,7 @@
|
|
3420
3421
|
}
|
3421
3422
|
|
3422
3423
|
if (event) {
|
3423
|
-
var
|
3424
|
-
var context = Data.getData(event.delegateTarget, dataKey);
|
3425
|
-
|
3426
|
-
if (!context) {
|
3427
|
-
context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
|
3428
|
-
Data.setData(event.delegateTarget, dataKey, context);
|
3429
|
-
}
|
3424
|
+
var context = this._initializeOnDelegatedTarget(event);
|
3430
3425
|
|
3431
3426
|
context._activeTrigger.click = !context._activeTrigger.click;
|
3432
3427
|
|
@@ -3436,7 +3431,7 @@
|
|
3436
3431
|
context._leave(null, context);
|
3437
3432
|
}
|
3438
3433
|
} else {
|
3439
|
-
if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$
|
3434
|
+
if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$4)) {
|
3440
3435
|
this._leave(null, this);
|
3441
3436
|
|
3442
3437
|
return;
|
@@ -3451,7 +3446,7 @@
|
|
3451
3446
|
EventHandler.off(this._element, this.constructor.EVENT_KEY);
|
3452
3447
|
EventHandler.off(this._element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);
|
3453
3448
|
|
3454
|
-
if (this.tip) {
|
3449
|
+
if (this.tip && this.tip.parentNode) {
|
3455
3450
|
this.tip.parentNode.removeChild(this.tip);
|
3456
3451
|
}
|
3457
3452
|
|
@@ -3478,81 +3473,83 @@
|
|
3478
3473
|
throw new Error('Please use show on visible elements');
|
3479
3474
|
}
|
3480
3475
|
|
3481
|
-
if (this.isWithContent() && this._isEnabled) {
|
3482
|
-
|
3483
|
-
|
3484
|
-
var isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element);
|
3476
|
+
if (!(this.isWithContent() && this._isEnabled)) {
|
3477
|
+
return;
|
3478
|
+
}
|
3485
3479
|
|
3486
|
-
|
3487
|
-
|
3488
|
-
|
3480
|
+
var showEvent = EventHandler.trigger(this._element, this.constructor.Event.SHOW);
|
3481
|
+
var shadowRoot = findShadowRoot(this._element);
|
3482
|
+
var isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element);
|
3489
3483
|
|
3490
|
-
|
3491
|
-
|
3492
|
-
|
3484
|
+
if (showEvent.defaultPrevented || !isInTheDom) {
|
3485
|
+
return;
|
3486
|
+
}
|
3493
3487
|
|
3494
|
-
|
3488
|
+
var tip = this.getTipElement();
|
3489
|
+
var tipId = getUID(this.constructor.NAME);
|
3490
|
+
tip.setAttribute('id', tipId);
|
3495
3491
|
|
3496
|
-
|
3492
|
+
this._element.setAttribute('aria-describedby', tipId);
|
3497
3493
|
|
3498
|
-
|
3499
|
-
tip.classList.add(CLASS_NAME_FADE$1);
|
3500
|
-
}
|
3494
|
+
this.setContent();
|
3501
3495
|
|
3502
|
-
|
3496
|
+
if (this.config.animation) {
|
3497
|
+
tip.classList.add(CLASS_NAME_FADE$2);
|
3498
|
+
}
|
3503
3499
|
|
3504
|
-
|
3500
|
+
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this._element) : this.config.placement;
|
3505
3501
|
|
3506
|
-
|
3502
|
+
var attachment = this._getAttachment(placement);
|
3507
3503
|
|
3508
|
-
|
3504
|
+
this._addAttachmentClass(attachment);
|
3509
3505
|
|
3510
|
-
|
3506
|
+
var container = this._getContainer();
|
3511
3507
|
|
3512
|
-
|
3513
|
-
container.appendChild(tip);
|
3514
|
-
}
|
3508
|
+
Data.setData(tip, this.constructor.DATA_KEY, this);
|
3515
3509
|
|
3516
|
-
|
3517
|
-
|
3518
|
-
|
3519
|
-
var customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass;
|
3510
|
+
if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
|
3511
|
+
container.appendChild(tip);
|
3512
|
+
}
|
3520
3513
|
|
3521
|
-
|
3522
|
-
|
3514
|
+
EventHandler.trigger(this._element, this.constructor.Event.INSERTED);
|
3515
|
+
this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment));
|
3516
|
+
tip.classList.add(CLASS_NAME_SHOW$4);
|
3517
|
+
var customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass;
|
3523
3518
|
|
3524
|
-
|
3525
|
-
|
3526
|
-
// empty mouseover listeners to the body's immediate children;
|
3527
|
-
// only needed because of broken event delegation on iOS
|
3528
|
-
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
3519
|
+
if (customClass) {
|
3520
|
+
var _tip$classList;
|
3529
3521
|
|
3522
|
+
(_tip$classList = tip.classList).add.apply(_tip$classList, customClass.split(' '));
|
3523
|
+
} // If this is a touch-enabled device we add extra
|
3524
|
+
// empty mouseover listeners to the body's immediate children;
|
3525
|
+
// only needed because of broken event delegation on iOS
|
3526
|
+
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
3530
3527
|
|
3531
|
-
if ('ontouchstart' in document.documentElement) {
|
3532
|
-
var _ref;
|
3533
3528
|
|
3534
|
-
|
3535
|
-
|
3536
|
-
});
|
3537
|
-
}
|
3529
|
+
if ('ontouchstart' in document.documentElement) {
|
3530
|
+
var _ref;
|
3538
3531
|
|
3539
|
-
|
3540
|
-
|
3541
|
-
|
3542
|
-
|
3532
|
+
(_ref = []).concat.apply(_ref, document.body.children).forEach(function (element) {
|
3533
|
+
EventHandler.on(element, 'mouseover', noop());
|
3534
|
+
});
|
3535
|
+
}
|
3543
3536
|
|
3544
|
-
|
3545
|
-
|
3546
|
-
|
3547
|
-
|
3537
|
+
var complete = function complete() {
|
3538
|
+
var prevHoverState = _this2._hoverState;
|
3539
|
+
_this2._hoverState = null;
|
3540
|
+
EventHandler.trigger(_this2._element, _this2.constructor.Event.SHOWN);
|
3548
3541
|
|
3549
|
-
if (
|
3550
|
-
|
3551
|
-
EventHandler.one(this.tip, TRANSITION_END, complete);
|
3552
|
-
emulateTransitionEnd(this.tip, transitionDuration);
|
3553
|
-
} else {
|
3554
|
-
complete();
|
3542
|
+
if (prevHoverState === HOVER_STATE_OUT) {
|
3543
|
+
_this2._leave(null, _this2);
|
3555
3544
|
}
|
3545
|
+
};
|
3546
|
+
|
3547
|
+
if (this.tip.classList.contains(CLASS_NAME_FADE$2)) {
|
3548
|
+
var transitionDuration = getTransitionDurationFromElement(this.tip);
|
3549
|
+
EventHandler.one(this.tip, 'transitionend', complete);
|
3550
|
+
emulateTransitionEnd(this.tip, transitionDuration);
|
3551
|
+
} else {
|
3552
|
+
complete();
|
3556
3553
|
}
|
3557
3554
|
};
|
3558
3555
|
|
@@ -3589,7 +3586,7 @@
|
|
3589
3586
|
return;
|
3590
3587
|
}
|
3591
3588
|
|
3592
|
-
tip.classList.remove(CLASS_NAME_SHOW$
|
3589
|
+
tip.classList.remove(CLASS_NAME_SHOW$4); // If this is a touch-enabled device we remove the extra
|
3593
3590
|
// empty mouseover listeners we added for iOS support
|
3594
3591
|
|
3595
3592
|
if ('ontouchstart' in document.documentElement) {
|
@@ -3604,9 +3601,9 @@
|
|
3604
3601
|
this._activeTrigger[TRIGGER_FOCUS] = false;
|
3605
3602
|
this._activeTrigger[TRIGGER_HOVER] = false;
|
3606
3603
|
|
3607
|
-
if (this.tip.classList.contains(CLASS_NAME_FADE$
|
3604
|
+
if (this.tip.classList.contains(CLASS_NAME_FADE$2)) {
|
3608
3605
|
var transitionDuration = getTransitionDurationFromElement(tip);
|
3609
|
-
EventHandler.one(tip,
|
3606
|
+
EventHandler.one(tip, 'transitionend', complete);
|
3610
3607
|
emulateTransitionEnd(tip, transitionDuration);
|
3611
3608
|
} else {
|
3612
3609
|
complete();
|
@@ -3640,7 +3637,7 @@
|
|
3640
3637
|
_proto.setContent = function setContent() {
|
3641
3638
|
var tip = this.getTipElement();
|
3642
3639
|
this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle());
|
3643
|
-
tip.classList.remove(CLASS_NAME_FADE$
|
3640
|
+
tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$4);
|
3644
3641
|
};
|
3645
3642
|
|
3646
3643
|
_proto.setElementContent = function setElementContent(element, content) {
|
@@ -3700,26 +3697,58 @@
|
|
3700
3697
|
} // Private
|
3701
3698
|
;
|
3702
3699
|
|
3703
|
-
_proto.
|
3700
|
+
_proto._initializeOnDelegatedTarget = function _initializeOnDelegatedTarget(event, context) {
|
3701
|
+
var dataKey = this.constructor.DATA_KEY;
|
3702
|
+
context = context || Data.getData(event.delegateTarget, dataKey);
|
3703
|
+
|
3704
|
+
if (!context) {
|
3705
|
+
context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
|
3706
|
+
Data.setData(event.delegateTarget, dataKey, context);
|
3707
|
+
}
|
3708
|
+
|
3709
|
+
return context;
|
3710
|
+
};
|
3711
|
+
|
3712
|
+
_proto._getOffset = function _getOffset() {
|
3704
3713
|
var _this4 = this;
|
3705
3714
|
|
3706
|
-
var
|
3707
|
-
|
3708
|
-
|
3709
|
-
|
3710
|
-
|
3711
|
-
|
3715
|
+
var offset = this.config.offset;
|
3716
|
+
|
3717
|
+
if (typeof offset === 'string') {
|
3718
|
+
return offset.split(',').map(function (val) {
|
3719
|
+
return Number.parseInt(val, 10);
|
3720
|
+
});
|
3721
|
+
}
|
3712
3722
|
|
3713
|
-
if (
|
3714
|
-
|
3723
|
+
if (typeof offset === 'function') {
|
3724
|
+
return function (popperData) {
|
3725
|
+
return offset(popperData, _this4._element);
|
3726
|
+
};
|
3715
3727
|
}
|
3716
3728
|
|
3717
|
-
|
3729
|
+
return offset;
|
3730
|
+
};
|
3731
|
+
|
3732
|
+
_proto._getPopperConfig = function _getPopperConfig(attachment) {
|
3733
|
+
var _this5 = this;
|
3734
|
+
|
3735
|
+
var defaultBsPopperConfig = {
|
3718
3736
|
placement: attachment,
|
3719
|
-
modifiers: [
|
3737
|
+
modifiers: [{
|
3738
|
+
name: 'flip',
|
3739
|
+
options: {
|
3740
|
+
altBoundary: true,
|
3741
|
+
fallbackPlacements: this.config.fallbackPlacements
|
3742
|
+
}
|
3743
|
+
}, {
|
3744
|
+
name: 'offset',
|
3745
|
+
options: {
|
3746
|
+
offset: this._getOffset()
|
3747
|
+
}
|
3748
|
+
}, {
|
3720
3749
|
name: 'preventOverflow',
|
3721
3750
|
options: {
|
3722
|
-
|
3751
|
+
boundary: this.config.boundary
|
3723
3752
|
}
|
3724
3753
|
}, {
|
3725
3754
|
name: 'arrow',
|
@@ -3731,16 +3760,16 @@
|
|
3731
3760
|
enabled: true,
|
3732
3761
|
phase: 'afterWrite',
|
3733
3762
|
fn: function fn(data) {
|
3734
|
-
return
|
3763
|
+
return _this5._handlePopperPlacementChange(data);
|
3735
3764
|
}
|
3736
3765
|
}],
|
3737
3766
|
onFirstUpdate: function onFirstUpdate(data) {
|
3738
3767
|
if (data.options.placement !== data.placement) {
|
3739
|
-
|
3768
|
+
_this5._handlePopperPlacementChange(data);
|
3740
3769
|
}
|
3741
3770
|
}
|
3742
3771
|
};
|
3743
|
-
return _extends({},
|
3772
|
+
return _extends({}, defaultBsPopperConfig, typeof this.config.popperConfig === 'function' ? this.config.popperConfig(defaultBsPopperConfig) : this.config.popperConfig);
|
3744
3773
|
};
|
3745
3774
|
|
3746
3775
|
_proto._addAttachmentClass = function _addAttachmentClass(attachment) {
|
@@ -3764,29 +3793,29 @@
|
|
3764
3793
|
};
|
3765
3794
|
|
3766
3795
|
_proto._setListeners = function _setListeners() {
|
3767
|
-
var
|
3796
|
+
var _this6 = this;
|
3768
3797
|
|
3769
3798
|
var triggers = this.config.trigger.split(' ');
|
3770
3799
|
triggers.forEach(function (trigger) {
|
3771
3800
|
if (trigger === 'click') {
|
3772
|
-
EventHandler.on(
|
3773
|
-
return
|
3801
|
+
EventHandler.on(_this6._element, _this6.constructor.Event.CLICK, _this6.config.selector, function (event) {
|
3802
|
+
return _this6.toggle(event);
|
3774
3803
|
});
|
3775
3804
|
} else if (trigger !== TRIGGER_MANUAL) {
|
3776
|
-
var eventIn = trigger === TRIGGER_HOVER ?
|
3777
|
-
var eventOut = trigger === TRIGGER_HOVER ?
|
3778
|
-
EventHandler.on(
|
3779
|
-
return
|
3805
|
+
var eventIn = trigger === TRIGGER_HOVER ? _this6.constructor.Event.MOUSEENTER : _this6.constructor.Event.FOCUSIN;
|
3806
|
+
var eventOut = trigger === TRIGGER_HOVER ? _this6.constructor.Event.MOUSELEAVE : _this6.constructor.Event.FOCUSOUT;
|
3807
|
+
EventHandler.on(_this6._element, eventIn, _this6.config.selector, function (event) {
|
3808
|
+
return _this6._enter(event);
|
3780
3809
|
});
|
3781
|
-
EventHandler.on(
|
3782
|
-
return
|
3810
|
+
EventHandler.on(_this6._element, eventOut, _this6.config.selector, function (event) {
|
3811
|
+
return _this6._leave(event);
|
3783
3812
|
});
|
3784
3813
|
}
|
3785
3814
|
});
|
3786
3815
|
|
3787
3816
|
this._hideModalHandler = function () {
|
3788
|
-
if (
|
3789
|
-
|
3817
|
+
if (_this6._element) {
|
3818
|
+
_this6.hide();
|
3790
3819
|
}
|
3791
3820
|
};
|
3792
3821
|
|
@@ -3819,19 +3848,13 @@
|
|
3819
3848
|
};
|
3820
3849
|
|
3821
3850
|
_proto._enter = function _enter(event, context) {
|
3822
|
-
|
3823
|
-
context = context || Data.getData(event.delegateTarget, dataKey);
|
3824
|
-
|
3825
|
-
if (!context) {
|
3826
|
-
context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
|
3827
|
-
Data.setData(event.delegateTarget, dataKey, context);
|
3828
|
-
}
|
3851
|
+
context = this._initializeOnDelegatedTarget(event, context);
|
3829
3852
|
|
3830
3853
|
if (event) {
|
3831
3854
|
context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
|
3832
3855
|
}
|
3833
3856
|
|
3834
|
-
if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$
|
3857
|
+
if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$4) || context._hoverState === HOVER_STATE_SHOW) {
|
3835
3858
|
context._hoverState = HOVER_STATE_SHOW;
|
3836
3859
|
return;
|
3837
3860
|
}
|
@@ -3852,13 +3875,7 @@
|
|
3852
3875
|
};
|
3853
3876
|
|
3854
3877
|
_proto._leave = function _leave(event, context) {
|
3855
|
-
|
3856
|
-
context = context || Data.getData(event.delegateTarget, dataKey);
|
3857
|
-
|
3858
|
-
if (!context) {
|
3859
|
-
context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
|
3860
|
-
Data.setData(event.delegateTarget, dataKey, context);
|
3861
|
-
}
|
3878
|
+
context = this._initializeOnDelegatedTarget(event, context);
|
3862
3879
|
|
3863
3880
|
if (event) {
|
3864
3881
|
context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false;
|
@@ -4039,21 +4056,7 @@
|
|
4039
4056
|
*/
|
4040
4057
|
|
4041
4058
|
|
4042
|
-
|
4043
|
-
var $ = getjQuery();
|
4044
|
-
/* istanbul ignore if */
|
4045
|
-
|
4046
|
-
if ($) {
|
4047
|
-
var JQUERY_NO_CONFLICT = $.fn[NAME$6];
|
4048
|
-
$.fn[NAME$6] = Tooltip.jQueryInterface;
|
4049
|
-
$.fn[NAME$6].Constructor = Tooltip;
|
4050
|
-
|
4051
|
-
$.fn[NAME$6].noConflict = function () {
|
4052
|
-
$.fn[NAME$6] = JQUERY_NO_CONFLICT;
|
4053
|
-
return Tooltip.jQueryInterface;
|
4054
|
-
};
|
4055
|
-
}
|
4056
|
-
});
|
4059
|
+
defineJQueryPlugin(NAME$6, Tooltip);
|
4057
4060
|
|
4058
4061
|
/**
|
4059
4062
|
* ------------------------------------------------------------------------
|
@@ -4069,6 +4072,7 @@
|
|
4069
4072
|
|
4070
4073
|
var Default$5 = _extends({}, Tooltip.Default, {
|
4071
4074
|
placement: 'right',
|
4075
|
+
offset: [0, 8],
|
4072
4076
|
trigger: 'click',
|
4073
4077
|
content: '',
|
4074
4078
|
template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>'
|
@@ -4090,8 +4094,8 @@
|
|
4090
4094
|
MOUSEENTER: "mouseenter" + EVENT_KEY$7,
|
4091
4095
|
MOUSELEAVE: "mouseleave" + EVENT_KEY$7
|
4092
4096
|
};
|
4093
|
-
var CLASS_NAME_FADE$
|
4094
|
-
var CLASS_NAME_SHOW$
|
4097
|
+
var CLASS_NAME_FADE$3 = 'fade';
|
4098
|
+
var CLASS_NAME_SHOW$5 = 'show';
|
4095
4099
|
var SELECTOR_TITLE = '.popover-header';
|
4096
4100
|
var SELECTOR_CONTENT = '.popover-body';
|
4097
4101
|
/**
|
@@ -4126,7 +4130,7 @@
|
|
4126
4130
|
}
|
4127
4131
|
|
4128
4132
|
this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content);
|
4129
|
-
tip.classList.remove(CLASS_NAME_FADE$
|
4133
|
+
tip.classList.remove(CLASS_NAME_FADE$3, CLASS_NAME_SHOW$5);
|
4130
4134
|
} // Private
|
4131
4135
|
;
|
4132
4136
|
|
@@ -4179,8 +4183,8 @@
|
|
4179
4183
|
|
4180
4184
|
_createClass(Popover, null, [{
|
4181
4185
|
key: "Default",
|
4182
|
-
// Getters
|
4183
|
-
|
4186
|
+
get: // Getters
|
4187
|
+
function get() {
|
4184
4188
|
return Default$5;
|
4185
4189
|
}
|
4186
4190
|
}, {
|
@@ -4220,21 +4224,7 @@
|
|
4220
4224
|
*/
|
4221
4225
|
|
4222
4226
|
|
4223
|
-
|
4224
|
-
var $ = getjQuery();
|
4225
|
-
/* istanbul ignore if */
|
4226
|
-
|
4227
|
-
if ($) {
|
4228
|
-
var JQUERY_NO_CONFLICT = $.fn[NAME$7];
|
4229
|
-
$.fn[NAME$7] = Popover.jQueryInterface;
|
4230
|
-
$.fn[NAME$7].Constructor = Popover;
|
4231
|
-
|
4232
|
-
$.fn[NAME$7].noConflict = function () {
|
4233
|
-
$.fn[NAME$7] = JQUERY_NO_CONFLICT;
|
4234
|
-
return Popover.jQueryInterface;
|
4235
|
-
};
|
4236
|
-
}
|
4237
|
-
});
|
4227
|
+
defineJQueryPlugin(NAME$7, Popover);
|
4238
4228
|
|
4239
4229
|
/**
|
4240
4230
|
* ------------------------------------------------------------------------
|
@@ -4290,8 +4280,8 @@
|
|
4290
4280
|
_this._targets = [];
|
4291
4281
|
_this._activeTarget = null;
|
4292
4282
|
_this._scrollHeight = 0;
|
4293
|
-
EventHandler.on(_this._scrollElement, EVENT_SCROLL, function (
|
4294
|
-
return _this._process(
|
4283
|
+
EventHandler.on(_this._scrollElement, EVENT_SCROLL, function () {
|
4284
|
+
return _this._process();
|
4295
4285
|
});
|
4296
4286
|
|
4297
4287
|
_this.refresh();
|
@@ -4520,21 +4510,7 @@
|
|
4520
4510
|
* add .ScrollSpy to jQuery only if jQuery is present
|
4521
4511
|
*/
|
4522
4512
|
|
4523
|
-
|
4524
|
-
var $ = getjQuery();
|
4525
|
-
/* istanbul ignore if */
|
4526
|
-
|
4527
|
-
if ($) {
|
4528
|
-
var JQUERY_NO_CONFLICT = $.fn[NAME$8];
|
4529
|
-
$.fn[NAME$8] = ScrollSpy.jQueryInterface;
|
4530
|
-
$.fn[NAME$8].Constructor = ScrollSpy;
|
4531
|
-
|
4532
|
-
$.fn[NAME$8].noConflict = function () {
|
4533
|
-
$.fn[NAME$8] = JQUERY_NO_CONFLICT;
|
4534
|
-
return ScrollSpy.jQueryInterface;
|
4535
|
-
};
|
4536
|
-
}
|
4537
|
-
});
|
4513
|
+
defineJQueryPlugin(NAME$8, ScrollSpy);
|
4538
4514
|
|
4539
4515
|
/**
|
4540
4516
|
* ------------------------------------------------------------------------
|
@@ -4554,8 +4530,8 @@
|
|
4554
4530
|
var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
|
4555
4531
|
var CLASS_NAME_ACTIVE$3 = 'active';
|
4556
4532
|
var CLASS_NAME_DISABLED$1 = 'disabled';
|
4557
|
-
var CLASS_NAME_FADE$
|
4558
|
-
var CLASS_NAME_SHOW$
|
4533
|
+
var CLASS_NAME_FADE$4 = 'fade';
|
4534
|
+
var CLASS_NAME_SHOW$6 = 'show';
|
4559
4535
|
var SELECTOR_DROPDOWN$1 = '.dropdown';
|
4560
4536
|
var SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group';
|
4561
4537
|
var SELECTOR_ACTIVE$1 = '.active';
|
@@ -4597,14 +4573,9 @@
|
|
4597
4573
|
previous = previous[previous.length - 1];
|
4598
4574
|
}
|
4599
4575
|
|
4600
|
-
var hideEvent =
|
4601
|
-
|
4602
|
-
|
4603
|
-
hideEvent = EventHandler.trigger(previous, EVENT_HIDE$3, {
|
4604
|
-
relatedTarget: this._element
|
4605
|
-
});
|
4606
|
-
}
|
4607
|
-
|
4576
|
+
var hideEvent = previous ? EventHandler.trigger(previous, EVENT_HIDE$3, {
|
4577
|
+
relatedTarget: this._element
|
4578
|
+
}) : null;
|
4608
4579
|
var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {
|
4609
4580
|
relatedTarget: previous
|
4610
4581
|
});
|
@@ -4637,7 +4608,7 @@
|
|
4637
4608
|
|
4638
4609
|
var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine.find(SELECTOR_ACTIVE_UL, container) : SelectorEngine.children(container, SELECTOR_ACTIVE$1);
|
4639
4610
|
var active = activeElements[0];
|
4640
|
-
var isTransitioning = callback && active && active.classList.contains(CLASS_NAME_FADE$
|
4611
|
+
var isTransitioning = callback && active && active.classList.contains(CLASS_NAME_FADE$4);
|
4641
4612
|
|
4642
4613
|
var complete = function complete() {
|
4643
4614
|
return _this2._transitionComplete(element, active, callback);
|
@@ -4645,8 +4616,8 @@
|
|
4645
4616
|
|
4646
4617
|
if (active && isTransitioning) {
|
4647
4618
|
var transitionDuration = getTransitionDurationFromElement(active);
|
4648
|
-
active.classList.remove(CLASS_NAME_SHOW$
|
4649
|
-
EventHandler.one(active,
|
4619
|
+
active.classList.remove(CLASS_NAME_SHOW$6);
|
4620
|
+
EventHandler.one(active, 'transitionend', complete);
|
4650
4621
|
emulateTransitionEnd(active, transitionDuration);
|
4651
4622
|
} else {
|
4652
4623
|
complete();
|
@@ -4675,8 +4646,8 @@
|
|
4675
4646
|
|
4676
4647
|
reflow(element);
|
4677
4648
|
|
4678
|
-
if (element.classList.contains(CLASS_NAME_FADE$
|
4679
|
-
element.classList.add(CLASS_NAME_SHOW$
|
4649
|
+
if (element.classList.contains(CLASS_NAME_FADE$4)) {
|
4650
|
+
element.classList.add(CLASS_NAME_SHOW$6);
|
4680
4651
|
}
|
4681
4652
|
|
4682
4653
|
if (element.parentNode && element.parentNode.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {
|
@@ -4713,8 +4684,8 @@
|
|
4713
4684
|
|
4714
4685
|
_createClass(Tab, null, [{
|
4715
4686
|
key: "DATA_KEY",
|
4716
|
-
// Getters
|
4717
|
-
|
4687
|
+
get: // Getters
|
4688
|
+
function get() {
|
4718
4689
|
return DATA_KEY$9;
|
4719
4690
|
}
|
4720
4691
|
}]);
|
@@ -4740,21 +4711,7 @@
|
|
4740
4711
|
* add .Tab to jQuery only if jQuery is present
|
4741
4712
|
*/
|
4742
4713
|
|
4743
|
-
|
4744
|
-
var $ = getjQuery();
|
4745
|
-
/* istanbul ignore if */
|
4746
|
-
|
4747
|
-
if ($) {
|
4748
|
-
var JQUERY_NO_CONFLICT = $.fn[NAME$9];
|
4749
|
-
$.fn[NAME$9] = Tab.jQueryInterface;
|
4750
|
-
$.fn[NAME$9].Constructor = Tab;
|
4751
|
-
|
4752
|
-
$.fn[NAME$9].noConflict = function () {
|
4753
|
-
$.fn[NAME$9] = JQUERY_NO_CONFLICT;
|
4754
|
-
return Tab.jQueryInterface;
|
4755
|
-
};
|
4756
|
-
}
|
4757
|
-
});
|
4714
|
+
defineJQueryPlugin(NAME$9, Tab);
|
4758
4715
|
|
4759
4716
|
/**
|
4760
4717
|
* ------------------------------------------------------------------------
|
@@ -4770,9 +4727,9 @@
|
|
4770
4727
|
var EVENT_HIDDEN$4 = "hidden" + EVENT_KEY$a;
|
4771
4728
|
var EVENT_SHOW$4 = "show" + EVENT_KEY$a;
|
4772
4729
|
var EVENT_SHOWN$4 = "shown" + EVENT_KEY$a;
|
4773
|
-
var CLASS_NAME_FADE$
|
4730
|
+
var CLASS_NAME_FADE$5 = 'fade';
|
4774
4731
|
var CLASS_NAME_HIDE = 'hide';
|
4775
|
-
var CLASS_NAME_SHOW$
|
4732
|
+
var CLASS_NAME_SHOW$7 = 'show';
|
4776
4733
|
var CLASS_NAME_SHOWING = 'showing';
|
4777
4734
|
var DefaultType$7 = {
|
4778
4735
|
animation: 'boolean',
|
@@ -4822,13 +4779,13 @@
|
|
4822
4779
|
this._clearTimeout();
|
4823
4780
|
|
4824
4781
|
if (this._config.animation) {
|
4825
|
-
this._element.classList.add(CLASS_NAME_FADE$
|
4782
|
+
this._element.classList.add(CLASS_NAME_FADE$5);
|
4826
4783
|
}
|
4827
4784
|
|
4828
4785
|
var complete = function complete() {
|
4829
4786
|
_this2._element.classList.remove(CLASS_NAME_SHOWING);
|
4830
4787
|
|
4831
|
-
_this2._element.classList.add(CLASS_NAME_SHOW$
|
4788
|
+
_this2._element.classList.add(CLASS_NAME_SHOW$7);
|
4832
4789
|
|
4833
4790
|
EventHandler.trigger(_this2._element, EVENT_SHOWN$4);
|
4834
4791
|
|
@@ -4847,7 +4804,7 @@
|
|
4847
4804
|
|
4848
4805
|
if (this._config.animation) {
|
4849
4806
|
var transitionDuration = getTransitionDurationFromElement(this._element);
|
4850
|
-
EventHandler.one(this._element,
|
4807
|
+
EventHandler.one(this._element, 'transitionend', complete);
|
4851
4808
|
emulateTransitionEnd(this._element, transitionDuration);
|
4852
4809
|
} else {
|
4853
4810
|
complete();
|
@@ -4857,7 +4814,7 @@
|
|
4857
4814
|
_proto.hide = function hide() {
|
4858
4815
|
var _this3 = this;
|
4859
4816
|
|
4860
|
-
if (!this._element.classList.contains(CLASS_NAME_SHOW$
|
4817
|
+
if (!this._element.classList.contains(CLASS_NAME_SHOW$7)) {
|
4861
4818
|
return;
|
4862
4819
|
}
|
4863
4820
|
|
@@ -4873,11 +4830,11 @@
|
|
4873
4830
|
EventHandler.trigger(_this3._element, EVENT_HIDDEN$4);
|
4874
4831
|
};
|
4875
4832
|
|
4876
|
-
this._element.classList.remove(CLASS_NAME_SHOW$
|
4833
|
+
this._element.classList.remove(CLASS_NAME_SHOW$7);
|
4877
4834
|
|
4878
4835
|
if (this._config.animation) {
|
4879
4836
|
var transitionDuration = getTransitionDurationFromElement(this._element);
|
4880
|
-
EventHandler.one(this._element,
|
4837
|
+
EventHandler.one(this._element, 'transitionend', complete);
|
4881
4838
|
emulateTransitionEnd(this._element, transitionDuration);
|
4882
4839
|
} else {
|
4883
4840
|
complete();
|
@@ -4887,8 +4844,8 @@
|
|
4887
4844
|
_proto.dispose = function dispose() {
|
4888
4845
|
this._clearTimeout();
|
4889
4846
|
|
4890
|
-
if (this._element.classList.contains(CLASS_NAME_SHOW$
|
4891
|
-
this._element.classList.remove(CLASS_NAME_SHOW$
|
4847
|
+
if (this._element.classList.contains(CLASS_NAME_SHOW$7)) {
|
4848
|
+
this._element.classList.remove(CLASS_NAME_SHOW$7);
|
4892
4849
|
}
|
4893
4850
|
|
4894
4851
|
EventHandler.off(this._element, EVENT_CLICK_DISMISS$1);
|
@@ -4966,25 +4923,11 @@
|
|
4966
4923
|
*/
|
4967
4924
|
|
4968
4925
|
|
4969
|
-
|
4970
|
-
var $ = getjQuery();
|
4971
|
-
/* istanbul ignore if */
|
4972
|
-
|
4973
|
-
if ($) {
|
4974
|
-
var JQUERY_NO_CONFLICT = $.fn[NAME$a];
|
4975
|
-
$.fn[NAME$a] = Toast.jQueryInterface;
|
4976
|
-
$.fn[NAME$a].Constructor = Toast;
|
4977
|
-
|
4978
|
-
$.fn[NAME$a].noConflict = function () {
|
4979
|
-
$.fn[NAME$a] = JQUERY_NO_CONFLICT;
|
4980
|
-
return Toast.jQueryInterface;
|
4981
|
-
};
|
4982
|
-
}
|
4983
|
-
});
|
4926
|
+
defineJQueryPlugin(NAME$a, Toast);
|
4984
4927
|
|
4985
4928
|
/**
|
4986
4929
|
* --------------------------------------------------------------------------
|
4987
|
-
* Bootstrap (v5.0.0-
|
4930
|
+
* Bootstrap (v5.0.0-beta2): index.umd.js
|
4988
4931
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
4989
4932
|
* --------------------------------------------------------------------------
|
4990
4933
|
*/
|