bootstrap 4.3.1 → 4.5.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bootstrap might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.travis.yml +15 -1
- data/CHANGELOG.md +2 -14
- data/README.md +1 -1
- data/assets/javascripts/bootstrap/alert.js +26 -35
- data/assets/javascripts/bootstrap/button.js +93 -52
- data/assets/javascripts/bootstrap/carousel.js +122 -120
- data/assets/javascripts/bootstrap/collapse.js +75 -71
- data/assets/javascripts/bootstrap/dropdown.js +143 -140
- data/assets/javascripts/bootstrap/modal.js +165 -134
- data/assets/javascripts/bootstrap/popover.js +47 -39
- data/assets/javascripts/bootstrap/scrollspy.js +71 -71
- data/assets/javascripts/bootstrap/tab.js +51 -60
- data/assets/javascripts/bootstrap/toast.js +84 -72
- data/assets/javascripts/bootstrap/tooltip.js +141 -131
- data/assets/javascripts/bootstrap/util.js +28 -7
- data/assets/javascripts/bootstrap-sprockets.js +6 -6
- data/assets/javascripts/bootstrap.js +811 -826
- data/assets/javascripts/bootstrap.min.js +3 -3
- 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/_badge.scss +1 -1
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +4 -1
- data/assets/stylesheets/bootstrap/_button-group.scss +1 -1
- data/assets/stylesheets/bootstrap/_buttons.scss +13 -8
- data/assets/stylesheets/bootstrap/_card.scss +28 -35
- data/assets/stylesheets/bootstrap/_carousel.scss +6 -6
- data/assets/stylesheets/bootstrap/_close.scss +2 -3
- data/assets/stylesheets/bootstrap/_code.scss +1 -1
- data/assets/stylesheets/bootstrap/_custom-forms.scss +24 -9
- data/assets/stylesheets/bootstrap/_dropdown.scss +5 -4
- data/assets/stylesheets/bootstrap/_forms.scss +26 -9
- data/assets/stylesheets/bootstrap/_functions.scss +60 -5
- data/assets/stylesheets/bootstrap/_grid.scss +33 -8
- data/assets/stylesheets/bootstrap/_images.scss +2 -2
- data/assets/stylesheets/bootstrap/_input-group.scss +1 -2
- data/assets/stylesheets/bootstrap/_list-group.scss +36 -31
- data/assets/stylesheets/bootstrap/_mixins.scss +3 -3
- data/assets/stylesheets/bootstrap/_modal.scss +28 -16
- data/assets/stylesheets/bootstrap/_nav.scss +4 -3
- data/assets/stylesheets/bootstrap/_navbar.scss +45 -15
- data/assets/stylesheets/bootstrap/_pagination.scss +3 -2
- data/assets/stylesheets/bootstrap/_popover.scss +8 -9
- data/assets/stylesheets/bootstrap/_print.scss +2 -2
- data/assets/stylesheets/bootstrap/_progress.scss +6 -2
- data/assets/stylesheets/bootstrap/_reboot.scss +24 -27
- data/assets/stylesheets/bootstrap/_root.scss +1 -0
- data/assets/stylesheets/bootstrap/_spinners.scss +1 -0
- data/assets/stylesheets/bootstrap/_tables.scss +3 -3
- data/assets/stylesheets/bootstrap/_type.scss +2 -2
- data/assets/stylesheets/bootstrap/_utilities.scss +2 -1
- data/assets/stylesheets/bootstrap/_variables.scss +46 -22
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +5 -3
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +26 -13
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +11 -8
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +8 -8
- data/assets/stylesheets/bootstrap/mixins/_float.scss +3 -3
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +34 -49
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +30 -15
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +4 -4
- data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +2 -1
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +3 -2
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +3 -2
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +17 -7
- data/assets/stylesheets/bootstrap/utilities/_background.scss +2 -2
- data/assets/stylesheets/bootstrap/utilities/_interactions.scss +5 -0
- data/assets/stylesheets/bootstrap/utilities/_text.scss +3 -4
- data/bootstrap.gemspec +1 -1
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/network.rb +2 -2
- data/test/dummy_rails/app/assets/config/manifest.js +3 -0
- data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
- data/test/gemfiles/rails_6_0.gemfile +7 -0
- data/test/support/dummy_rails_integration.rb +3 -1
- data/test/test_helper.rb +18 -13
- metadata +11 -5
@@ -1,17 +1,17 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap tooltip.js v4.
|
3
|
-
* Copyright 2011-
|
2
|
+
* Bootstrap tooltip.js v4.5.0 (https://getbootstrap.com/)
|
3
|
+
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
5
5
|
*/
|
6
6
|
(function (global, factory) {
|
7
7
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
|
8
8
|
typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) :
|
9
9
|
(global = global || self, global.Tooltip = factory(global.jQuery, global.Popper, global.Util));
|
10
|
-
}(this, function ($, Popper, Util) { 'use strict';
|
10
|
+
}(this, (function ($, Popper, Util) { 'use strict';
|
11
11
|
|
12
|
-
$ = $ &&
|
13
|
-
Popper = Popper &&
|
14
|
-
Util = Util &&
|
12
|
+
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
|
13
|
+
Popper = Popper && Object.prototype.hasOwnProperty.call(Popper, 'default') ? Popper['default'] : Popper;
|
14
|
+
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
|
15
15
|
|
16
16
|
function _defineProperties(target, props) {
|
17
17
|
for (var i = 0; i < props.length; i++) {
|
@@ -44,20 +44,35 @@
|
|
44
44
|
return obj;
|
45
45
|
}
|
46
46
|
|
47
|
-
function
|
47
|
+
function ownKeys(object, enumerableOnly) {
|
48
|
+
var keys = Object.keys(object);
|
49
|
+
|
50
|
+
if (Object.getOwnPropertySymbols) {
|
51
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
52
|
+
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
53
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
54
|
+
});
|
55
|
+
keys.push.apply(keys, symbols);
|
56
|
+
}
|
57
|
+
|
58
|
+
return keys;
|
59
|
+
}
|
60
|
+
|
61
|
+
function _objectSpread2(target) {
|
48
62
|
for (var i = 1; i < arguments.length; i++) {
|
49
63
|
var source = arguments[i] != null ? arguments[i] : {};
|
50
|
-
var ownKeys = Object.keys(source);
|
51
64
|
|
52
|
-
if (
|
53
|
-
ownKeys
|
54
|
-
|
55
|
-
})
|
65
|
+
if (i % 2) {
|
66
|
+
ownKeys(Object(source), true).forEach(function (key) {
|
67
|
+
_defineProperty(target, key, source[key]);
|
68
|
+
});
|
69
|
+
} else if (Object.getOwnPropertyDescriptors) {
|
70
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
71
|
+
} else {
|
72
|
+
ownKeys(Object(source)).forEach(function (key) {
|
73
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
74
|
+
});
|
56
75
|
}
|
57
|
-
|
58
|
-
ownKeys.forEach(function (key) {
|
59
|
-
_defineProperty(target, key, source[key]);
|
60
|
-
});
|
61
76
|
}
|
62
77
|
|
63
78
|
return target;
|
@@ -65,7 +80,7 @@
|
|
65
80
|
|
66
81
|
/**
|
67
82
|
* --------------------------------------------------------------------------
|
68
|
-
* Bootstrap (v4.
|
83
|
+
* Bootstrap (v4.5.0): tools/sanitizer.js
|
69
84
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
70
85
|
* --------------------------------------------------------------------------
|
71
86
|
*/
|
@@ -90,7 +105,7 @@
|
|
90
105
|
h5: [],
|
91
106
|
h6: [],
|
92
107
|
i: [],
|
93
|
-
img: ['src', 'alt', 'title', 'width', 'height'],
|
108
|
+
img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
|
94
109
|
li: [],
|
95
110
|
ol: [],
|
96
111
|
p: [],
|
@@ -103,21 +118,21 @@
|
|
103
118
|
strong: [],
|
104
119
|
u: [],
|
105
120
|
ul: []
|
106
|
-
/**
|
107
|
-
* A pattern that recognizes a commonly useful subset of URLs that are safe.
|
108
|
-
*
|
109
|
-
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
|
110
|
-
*/
|
111
|
-
|
112
121
|
};
|
113
|
-
|
122
|
+
/**
|
123
|
+
* A pattern that recognizes a commonly useful subset of URLs that are safe.
|
124
|
+
*
|
125
|
+
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
|
126
|
+
*/
|
127
|
+
|
128
|
+
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi;
|
114
129
|
/**
|
115
130
|
* A pattern that matches safe data URLs. Only matches image, video and audio types.
|
116
131
|
*
|
117
132
|
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
|
118
133
|
*/
|
119
134
|
|
120
|
-
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-
|
135
|
+
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
|
121
136
|
|
122
137
|
function allowedAttribute(attr, allowedAttributeList) {
|
123
138
|
var attrName = attr.nodeName.toLowerCase();
|
@@ -134,7 +149,7 @@
|
|
134
149
|
return attrRegex instanceof RegExp;
|
135
150
|
}); // Check if a regular expression validates the attribute.
|
136
151
|
|
137
|
-
for (var i = 0,
|
152
|
+
for (var i = 0, len = regExp.length; i < len; i++) {
|
138
153
|
if (attrName.match(regExp[i])) {
|
139
154
|
return true;
|
140
155
|
}
|
@@ -176,7 +191,7 @@
|
|
176
191
|
};
|
177
192
|
|
178
193
|
for (var i = 0, len = elements.length; i < len; i++) {
|
179
|
-
var _ret = _loop(i
|
194
|
+
var _ret = _loop(i);
|
180
195
|
|
181
196
|
if (_ret === "continue") continue;
|
182
197
|
}
|
@@ -191,7 +206,7 @@
|
|
191
206
|
*/
|
192
207
|
|
193
208
|
var NAME = 'tooltip';
|
194
|
-
var VERSION = '4.
|
209
|
+
var VERSION = '4.5.0';
|
195
210
|
var DATA_KEY = 'bs.tooltip';
|
196
211
|
var EVENT_KEY = "." + DATA_KEY;
|
197
212
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
@@ -213,7 +228,8 @@
|
|
213
228
|
boundary: '(string|element)',
|
214
229
|
sanitize: 'boolean',
|
215
230
|
sanitizeFn: '(null|function)',
|
216
|
-
whiteList: 'object'
|
231
|
+
whiteList: 'object',
|
232
|
+
popperConfig: '(null|object)'
|
217
233
|
};
|
218
234
|
var AttachmentMap = {
|
219
235
|
AUTO: 'auto',
|
@@ -237,12 +253,11 @@
|
|
237
253
|
boundary: 'scrollParent',
|
238
254
|
sanitize: true,
|
239
255
|
sanitizeFn: null,
|
240
|
-
whiteList: DefaultWhitelist
|
241
|
-
|
242
|
-
var HoverState = {
|
243
|
-
SHOW: 'show',
|
244
|
-
OUT: 'out'
|
256
|
+
whiteList: DefaultWhitelist,
|
257
|
+
popperConfig: null
|
245
258
|
};
|
259
|
+
var HOVER_STATE_SHOW = 'show';
|
260
|
+
var HOVER_STATE_OUT = 'out';
|
246
261
|
var Event = {
|
247
262
|
HIDE: "hide" + EVENT_KEY,
|
248
263
|
HIDDEN: "hidden" + EVENT_KEY,
|
@@ -255,36 +270,22 @@
|
|
255
270
|
MOUSEENTER: "mouseenter" + EVENT_KEY,
|
256
271
|
MOUSELEAVE: "mouseleave" + EVENT_KEY
|
257
272
|
};
|
258
|
-
var
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
var
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
MANUAL: 'manual'
|
272
|
-
/**
|
273
|
-
* ------------------------------------------------------------------------
|
274
|
-
* Class Definition
|
275
|
-
* ------------------------------------------------------------------------
|
276
|
-
*/
|
277
|
-
|
278
|
-
};
|
273
|
+
var CLASS_NAME_FADE = 'fade';
|
274
|
+
var CLASS_NAME_SHOW = 'show';
|
275
|
+
var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
|
276
|
+
var SELECTOR_ARROW = '.arrow';
|
277
|
+
var TRIGGER_HOVER = 'hover';
|
278
|
+
var TRIGGER_FOCUS = 'focus';
|
279
|
+
var TRIGGER_CLICK = 'click';
|
280
|
+
var TRIGGER_MANUAL = 'manual';
|
281
|
+
/**
|
282
|
+
* ------------------------------------------------------------------------
|
283
|
+
* Class Definition
|
284
|
+
* ------------------------------------------------------------------------
|
285
|
+
*/
|
279
286
|
|
280
|
-
var Tooltip =
|
281
|
-
/*#__PURE__*/
|
282
|
-
function () {
|
287
|
+
var Tooltip = /*#__PURE__*/function () {
|
283
288
|
function Tooltip(element, config) {
|
284
|
-
/**
|
285
|
-
* Check for Popper dependency
|
286
|
-
* Popper - https://popper.js.org
|
287
|
-
*/
|
288
289
|
if (typeof Popper === 'undefined') {
|
289
290
|
throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');
|
290
291
|
} // private
|
@@ -341,7 +342,7 @@
|
|
341
342
|
context._leave(null, context);
|
342
343
|
}
|
343
344
|
} else {
|
344
|
-
if ($(this.getTipElement()).hasClass(
|
345
|
+
if ($(this.getTipElement()).hasClass(CLASS_NAME_SHOW)) {
|
345
346
|
this._leave(null, this);
|
346
347
|
|
347
348
|
return;
|
@@ -355,7 +356,7 @@
|
|
355
356
|
clearTimeout(this._timeout);
|
356
357
|
$.removeData(this.element, this.constructor.DATA_KEY);
|
357
358
|
$(this.element).off(this.constructor.EVENT_KEY);
|
358
|
-
$(this.element).closest('.modal').off('hide.bs.modal');
|
359
|
+
$(this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);
|
359
360
|
|
360
361
|
if (this.tip) {
|
361
362
|
$(this.tip).remove();
|
@@ -366,7 +367,7 @@
|
|
366
367
|
this._hoverState = null;
|
367
368
|
this._activeTrigger = null;
|
368
369
|
|
369
|
-
if (this._popper
|
370
|
+
if (this._popper) {
|
370
371
|
this._popper.destroy();
|
371
372
|
}
|
372
373
|
|
@@ -401,7 +402,7 @@
|
|
401
402
|
this.setContent();
|
402
403
|
|
403
404
|
if (this.config.animation) {
|
404
|
-
$(tip).addClass(
|
405
|
+
$(tip).addClass(CLASS_NAME_FADE);
|
405
406
|
}
|
406
407
|
|
407
408
|
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
|
@@ -419,30 +420,8 @@
|
|
419
420
|
}
|
420
421
|
|
421
422
|
$(this.element).trigger(this.constructor.Event.INSERTED);
|
422
|
-
this._popper = new Popper(this.element, tip,
|
423
|
-
|
424
|
-
modifiers: {
|
425
|
-
offset: this._getOffset(),
|
426
|
-
flip: {
|
427
|
-
behavior: this.config.fallbackPlacement
|
428
|
-
},
|
429
|
-
arrow: {
|
430
|
-
element: Selector.ARROW
|
431
|
-
},
|
432
|
-
preventOverflow: {
|
433
|
-
boundariesElement: this.config.boundary
|
434
|
-
}
|
435
|
-
},
|
436
|
-
onCreate: function onCreate(data) {
|
437
|
-
if (data.originalPlacement !== data.placement) {
|
438
|
-
_this._handlePopperPlacementChange(data);
|
439
|
-
}
|
440
|
-
},
|
441
|
-
onUpdate: function onUpdate(data) {
|
442
|
-
return _this._handlePopperPlacementChange(data);
|
443
|
-
}
|
444
|
-
});
|
445
|
-
$(tip).addClass(ClassName.SHOW); // If this is a touch-enabled device we add extra
|
423
|
+
this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment));
|
424
|
+
$(tip).addClass(CLASS_NAME_SHOW); // If this is a touch-enabled device we add extra
|
446
425
|
// empty mouseover listeners to the body's immediate children;
|
447
426
|
// only needed because of broken event delegation on iOS
|
448
427
|
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
@@ -460,12 +439,12 @@
|
|
460
439
|
_this._hoverState = null;
|
461
440
|
$(_this.element).trigger(_this.constructor.Event.SHOWN);
|
462
441
|
|
463
|
-
if (prevHoverState ===
|
442
|
+
if (prevHoverState === HOVER_STATE_OUT) {
|
464
443
|
_this._leave(null, _this);
|
465
444
|
}
|
466
445
|
};
|
467
446
|
|
468
|
-
if ($(this.tip).hasClass(
|
447
|
+
if ($(this.tip).hasClass(CLASS_NAME_FADE)) {
|
469
448
|
var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
|
470
449
|
$(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
471
450
|
} else {
|
@@ -481,7 +460,7 @@
|
|
481
460
|
var hideEvent = $.Event(this.constructor.Event.HIDE);
|
482
461
|
|
483
462
|
var complete = function complete() {
|
484
|
-
if (_this2._hoverState !==
|
463
|
+
if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
|
485
464
|
tip.parentNode.removeChild(tip);
|
486
465
|
}
|
487
466
|
|
@@ -506,18 +485,18 @@
|
|
506
485
|
return;
|
507
486
|
}
|
508
487
|
|
509
|
-
$(tip).removeClass(
|
488
|
+
$(tip).removeClass(CLASS_NAME_SHOW); // If this is a touch-enabled device we remove the extra
|
510
489
|
// empty mouseover listeners we added for iOS support
|
511
490
|
|
512
491
|
if ('ontouchstart' in document.documentElement) {
|
513
492
|
$(document.body).children().off('mouseover', null, $.noop);
|
514
493
|
}
|
515
494
|
|
516
|
-
this._activeTrigger[
|
517
|
-
this._activeTrigger[
|
518
|
-
this._activeTrigger[
|
495
|
+
this._activeTrigger[TRIGGER_CLICK] = false;
|
496
|
+
this._activeTrigger[TRIGGER_FOCUS] = false;
|
497
|
+
this._activeTrigger[TRIGGER_HOVER] = false;
|
519
498
|
|
520
|
-
if ($(this.tip).hasClass(
|
499
|
+
if ($(this.tip).hasClass(CLASS_NAME_FADE)) {
|
521
500
|
var transitionDuration = Util.getTransitionDurationFromElement(tip);
|
522
501
|
$(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
523
502
|
} else {
|
@@ -549,8 +528,8 @@
|
|
549
528
|
|
550
529
|
_proto.setContent = function setContent() {
|
551
530
|
var tip = this.getTipElement();
|
552
|
-
this.setElementContent($(tip.querySelectorAll(
|
553
|
-
$(tip).removeClass(
|
531
|
+
this.setElementContent($(tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle());
|
532
|
+
$(tip).removeClass(CLASS_NAME_FADE + " " + CLASS_NAME_SHOW);
|
554
533
|
};
|
555
534
|
|
556
535
|
_proto.setElementContent = function setElementContent($element, content) {
|
@@ -589,14 +568,43 @@
|
|
589
568
|
} // Private
|
590
569
|
;
|
591
570
|
|
592
|
-
_proto.
|
571
|
+
_proto._getPopperConfig = function _getPopperConfig(attachment) {
|
593
572
|
var _this3 = this;
|
594
573
|
|
574
|
+
var defaultBsConfig = {
|
575
|
+
placement: attachment,
|
576
|
+
modifiers: {
|
577
|
+
offset: this._getOffset(),
|
578
|
+
flip: {
|
579
|
+
behavior: this.config.fallbackPlacement
|
580
|
+
},
|
581
|
+
arrow: {
|
582
|
+
element: SELECTOR_ARROW
|
583
|
+
},
|
584
|
+
preventOverflow: {
|
585
|
+
boundariesElement: this.config.boundary
|
586
|
+
}
|
587
|
+
},
|
588
|
+
onCreate: function onCreate(data) {
|
589
|
+
if (data.originalPlacement !== data.placement) {
|
590
|
+
_this3._handlePopperPlacementChange(data);
|
591
|
+
}
|
592
|
+
},
|
593
|
+
onUpdate: function onUpdate(data) {
|
594
|
+
return _this3._handlePopperPlacementChange(data);
|
595
|
+
}
|
596
|
+
};
|
597
|
+
return _objectSpread2(_objectSpread2({}, defaultBsConfig), this.config.popperConfig);
|
598
|
+
};
|
599
|
+
|
600
|
+
_proto._getOffset = function _getOffset() {
|
601
|
+
var _this4 = this;
|
602
|
+
|
595
603
|
var offset = {};
|
596
604
|
|
597
605
|
if (typeof this.config.offset === 'function') {
|
598
606
|
offset.fn = function (data) {
|
599
|
-
data.offsets =
|
607
|
+
data.offsets = _objectSpread2(_objectSpread2({}, data.offsets), _this4.config.offset(data.offsets, _this4.element) || {});
|
600
608
|
return data;
|
601
609
|
};
|
602
610
|
} else {
|
@@ -623,32 +631,35 @@
|
|
623
631
|
};
|
624
632
|
|
625
633
|
_proto._setListeners = function _setListeners() {
|
626
|
-
var
|
634
|
+
var _this5 = this;
|
627
635
|
|
628
636
|
var triggers = this.config.trigger.split(' ');
|
629
637
|
triggers.forEach(function (trigger) {
|
630
638
|
if (trigger === 'click') {
|
631
|
-
$(
|
632
|
-
return
|
639
|
+
$(_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
|
640
|
+
return _this5.toggle(event);
|
633
641
|
});
|
634
|
-
} else if (trigger !==
|
635
|
-
var eventIn = trigger ===
|
636
|
-
var eventOut = trigger ===
|
637
|
-
$(
|
638
|
-
return
|
639
|
-
}).on(eventOut,
|
640
|
-
return
|
642
|
+
} else if (trigger !== TRIGGER_MANUAL) {
|
643
|
+
var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
|
644
|
+
var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
|
645
|
+
$(_this5.element).on(eventIn, _this5.config.selector, function (event) {
|
646
|
+
return _this5._enter(event);
|
647
|
+
}).on(eventOut, _this5.config.selector, function (event) {
|
648
|
+
return _this5._leave(event);
|
641
649
|
});
|
642
650
|
}
|
643
651
|
});
|
644
|
-
|
645
|
-
|
646
|
-
|
652
|
+
|
653
|
+
this._hideModalHandler = function () {
|
654
|
+
if (_this5.element) {
|
655
|
+
_this5.hide();
|
647
656
|
}
|
648
|
-
}
|
657
|
+
};
|
658
|
+
|
659
|
+
$(this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
|
649
660
|
|
650
661
|
if (this.config.selector) {
|
651
|
-
this.config =
|
662
|
+
this.config = _objectSpread2(_objectSpread2({}, this.config), {}, {
|
652
663
|
trigger: 'manual',
|
653
664
|
selector: ''
|
654
665
|
});
|
@@ -676,16 +687,16 @@
|
|
676
687
|
}
|
677
688
|
|
678
689
|
if (event) {
|
679
|
-
context._activeTrigger[event.type === 'focusin' ?
|
690
|
+
context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
|
680
691
|
}
|
681
692
|
|
682
|
-
if ($(context.getTipElement()).hasClass(
|
683
|
-
context._hoverState =
|
693
|
+
if ($(context.getTipElement()).hasClass(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {
|
694
|
+
context._hoverState = HOVER_STATE_SHOW;
|
684
695
|
return;
|
685
696
|
}
|
686
697
|
|
687
698
|
clearTimeout(context._timeout);
|
688
|
-
context._hoverState =
|
699
|
+
context._hoverState = HOVER_STATE_SHOW;
|
689
700
|
|
690
701
|
if (!context.config.delay || !context.config.delay.show) {
|
691
702
|
context.show();
|
@@ -693,7 +704,7 @@
|
|
693
704
|
}
|
694
705
|
|
695
706
|
context._timeout = setTimeout(function () {
|
696
|
-
if (context._hoverState ===
|
707
|
+
if (context._hoverState === HOVER_STATE_SHOW) {
|
697
708
|
context.show();
|
698
709
|
}
|
699
710
|
}, context.config.delay.show);
|
@@ -709,7 +720,7 @@
|
|
709
720
|
}
|
710
721
|
|
711
722
|
if (event) {
|
712
|
-
context._activeTrigger[event.type === 'focusout' ?
|
723
|
+
context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false;
|
713
724
|
}
|
714
725
|
|
715
726
|
if (context._isWithActiveTrigger()) {
|
@@ -717,7 +728,7 @@
|
|
717
728
|
}
|
718
729
|
|
719
730
|
clearTimeout(context._timeout);
|
720
|
-
context._hoverState =
|
731
|
+
context._hoverState = HOVER_STATE_OUT;
|
721
732
|
|
722
733
|
if (!context.config.delay || !context.config.delay.hide) {
|
723
734
|
context.hide();
|
@@ -725,7 +736,7 @@
|
|
725
736
|
}
|
726
737
|
|
727
738
|
context._timeout = setTimeout(function () {
|
728
|
-
if (context._hoverState ===
|
739
|
+
if (context._hoverState === HOVER_STATE_OUT) {
|
729
740
|
context.hide();
|
730
741
|
}
|
731
742
|
}, context.config.delay.hide);
|
@@ -748,7 +759,7 @@
|
|
748
759
|
delete dataAttributes[dataAttr];
|
749
760
|
}
|
750
761
|
});
|
751
|
-
config =
|
762
|
+
config = _objectSpread2(_objectSpread2(_objectSpread2({}, this.constructor.Default), dataAttributes), typeof config === 'object' && config ? config : {});
|
752
763
|
|
753
764
|
if (typeof config.delay === 'number') {
|
754
765
|
config.delay = {
|
@@ -798,8 +809,7 @@
|
|
798
809
|
};
|
799
810
|
|
800
811
|
_proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
|
801
|
-
|
802
|
-
this.tip = popperInstance.popper;
|
812
|
+
this.tip = popperData.instance.popper;
|
803
813
|
|
804
814
|
this._cleanTipClass();
|
805
815
|
|
@@ -814,7 +824,7 @@
|
|
814
824
|
return;
|
815
825
|
}
|
816
826
|
|
817
|
-
$(tip).removeClass(
|
827
|
+
$(tip).removeClass(CLASS_NAME_FADE);
|
818
828
|
this.config.animation = false;
|
819
829
|
this.hide();
|
820
830
|
this.show();
|
@@ -903,4 +913,4 @@
|
|
903
913
|
|
904
914
|
return Tooltip;
|
905
915
|
|
906
|
-
}));
|
916
|
+
})));
|
@@ -1,19 +1,19 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap util.js v4.
|
3
|
-
* Copyright 2011-
|
2
|
+
* Bootstrap util.js v4.5.0 (https://getbootstrap.com/)
|
3
|
+
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
5
5
|
*/
|
6
6
|
(function (global, factory) {
|
7
7
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
|
8
8
|
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
9
9
|
(global = global || self, global.Util = factory(global.jQuery));
|
10
|
-
}(this, function ($) { 'use strict';
|
10
|
+
}(this, (function ($) { 'use strict';
|
11
11
|
|
12
|
-
$ = $ &&
|
12
|
+
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
|
13
13
|
|
14
14
|
/**
|
15
15
|
* --------------------------------------------------------------------------
|
16
|
-
* Bootstrap (v4.
|
16
|
+
* Bootstrap (v4.5.0): util.js
|
17
17
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
18
18
|
* --------------------------------------------------------------------------
|
19
19
|
*/
|
@@ -28,6 +28,10 @@
|
|
28
28
|
var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
29
29
|
|
30
30
|
function toType(obj) {
|
31
|
+
if (obj === null || typeof obj === 'undefined') {
|
32
|
+
return "" + obj;
|
33
|
+
}
|
34
|
+
|
31
35
|
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
32
36
|
}
|
33
37
|
|
@@ -40,7 +44,7 @@
|
|
40
44
|
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
|
41
45
|
}
|
42
46
|
|
43
|
-
return undefined;
|
47
|
+
return undefined;
|
44
48
|
}
|
45
49
|
};
|
46
50
|
}
|
@@ -162,10 +166,27 @@
|
|
162
166
|
}
|
163
167
|
|
164
168
|
return Util.findShadowRoot(element.parentNode);
|
169
|
+
},
|
170
|
+
jQueryDetection: function jQueryDetection() {
|
171
|
+
if (typeof $ === 'undefined') {
|
172
|
+
throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
|
173
|
+
}
|
174
|
+
|
175
|
+
var version = $.fn.jquery.split(' ')[0].split('.');
|
176
|
+
var minMajor = 1;
|
177
|
+
var ltMajor = 2;
|
178
|
+
var minMinor = 9;
|
179
|
+
var minPatch = 1;
|
180
|
+
var maxMajor = 4;
|
181
|
+
|
182
|
+
if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
|
183
|
+
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
|
184
|
+
}
|
165
185
|
}
|
166
186
|
};
|
187
|
+
Util.jQueryDetection();
|
167
188
|
setTransitionEndSupport();
|
168
189
|
|
169
190
|
return Util;
|
170
191
|
|
171
|
-
}));
|
192
|
+
})));
|
@@ -1,12 +1,12 @@
|
|
1
|
+
//= require ./bootstrap/button
|
1
2
|
//= require ./bootstrap/util
|
3
|
+
//= require ./bootstrap/tooltip
|
4
|
+
//= require ./bootstrap/popover
|
5
|
+
//= require ./bootstrap/tab
|
2
6
|
//= require ./bootstrap/alert
|
3
|
-
//= require ./bootstrap/button
|
4
7
|
//= require ./bootstrap/carousel
|
5
|
-
//= require ./bootstrap/collapse
|
6
8
|
//= require ./bootstrap/dropdown
|
7
9
|
//= require ./bootstrap/modal
|
8
|
-
//= require ./bootstrap/tooltip
|
9
|
-
//= require ./bootstrap/popover
|
10
|
-
//= require ./bootstrap/scrollspy
|
11
|
-
//= require ./bootstrap/tab
|
12
10
|
//= require ./bootstrap/toast
|
11
|
+
//= require ./bootstrap/collapse
|
12
|
+
//= require ./bootstrap/scrollspy
|