assets/vendor/bootstrap/js/bootstrap.js in jekyll-theme-clean-blog-4.0.7 vs assets/vendor/bootstrap/js/bootstrap.js in jekyll-theme-clean-blog-4.0.8
- old
+ new
@@ -1,18 +1,18 @@
/*!
- * Bootstrap v4.2.1 (https://getbootstrap.com/)
- * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
+ * Bootstrap v4.3.1 (https://getbootstrap.com/)
+ * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('popper.js'), require('jquery')) :
- typeof define === 'function' && define.amd ? define(['exports', 'popper.js', 'jquery'], factory) :
- (factory((global.bootstrap = {}),global.Popper,global.jQuery));
-}(this, (function (exports,Popper,$) { 'use strict';
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery'), require('popper.js')) :
+ typeof define === 'function' && define.amd ? define(['exports', 'jquery', 'popper.js'], factory) :
+ (global = global || self, factory(global.bootstrap = {}, global.jQuery, global.Popper));
+}(this, function (exports, $, Popper) { 'use strict';
- Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
+ Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
@@ -68,11 +68,11 @@
subClass.__proto__ = superClass;
}
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.2.1): util.js
+ * Bootstrap (v4.3.1): util.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
@@ -144,11 +144,15 @@
if (!selector || selector === '#') {
var hrefAttr = element.getAttribute('href');
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
}
- return selector && document.querySelector(selector) ? selector : null;
+ try {
+ return document.querySelector(selector) ? selector : null;
+ } catch (err) {
+ return null;
+ }
},
getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
if (!element) {
return 0;
} // Get transition-duration of the element
@@ -224,11 +228,11 @@
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'alert';
- var VERSION = '4.2.1';
+ var VERSION = '4.3.1';
var DATA_KEY = 'bs.alert';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Selector = {
@@ -279,13 +283,13 @@
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
this._element = null;
- }; // Private
+ } // Private
+ ;
-
_proto._getRootElement = function _getRootElement(element) {
var selector = Util.getSelectorFromElement(element);
var parent = false;
if (selector) {
@@ -322,13 +326,13 @@
}).emulateTransitionEnd(transitionDuration);
};
_proto._destroyElement = function _destroyElement(element) {
$(element).detach().trigger(Event.CLOSED).remove();
- }; // Static
+ } // Static
+ ;
-
Alert._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
@@ -389,11 +393,11 @@
* Constants
* ------------------------------------------------------------------------
*/
var NAME$1 = 'button';
- var VERSION$1 = '4.2.1';
+ var VERSION$1 = '4.3.1';
var DATA_KEY$1 = 'bs.button';
var EVENT_KEY$1 = "." + DATA_KEY$1;
var DATA_API_KEY$1 = '.data-api';
var JQUERY_NO_CONFLICT$1 = $.fn[NAME$1];
var ClassName$1 = {
@@ -475,13 +479,13 @@
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY$1);
this._element = null;
- }; // Static
+ } // Static
+ ;
-
Button._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY$1);
if (!data) {
@@ -543,11 +547,11 @@
* Constants
* ------------------------------------------------------------------------
*/
var NAME$2 = 'carousel';
- var VERSION$2 = '4.2.1';
+ var VERSION$2 = '4.3.1';
var DATA_KEY$2 = 'bs.carousel';
var EVENT_KEY$2 = "." + DATA_KEY$2;
var DATA_API_KEY$2 = '.data-api';
var JQUERY_NO_CONFLICT$2 = $.fn[NAME$2];
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
@@ -738,13 +742,13 @@
this._interval = null;
this._isPaused = null;
this._isSliding = null;
this._activeElement = null;
this._indicatorsElement = null;
- }; // Private
+ } // Private
+ ;
-
_proto._getConfig = function _getConfig(config) {
config = _objectSpread({}, Default, config);
Util.typeCheckConfig(NAME$2, config, DefaultType);
return config;
};
@@ -783,11 +787,13 @@
}).on(Event$2.MOUSELEAVE, function (event) {
return _this2.cycle(event);
});
}
- this._addTouchEventListeners();
+ if (this._config.touch) {
+ this._addTouchEventListeners();
+ }
};
_proto._addTouchEventListeners = function _addTouchEventListeners() {
var _this3 = this;
@@ -1024,13 +1030,13 @@
}
if (isCycling) {
this.cycle();
}
- }; // Static
+ } // Static
+ ;
-
Carousel._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY$2);
var _config = _objectSpread({}, Default, $(this).data());
@@ -1052,11 +1058,11 @@
if (typeof data[action] === 'undefined') {
throw new TypeError("No method named \"" + action + "\"");
}
data[action]();
- } else if (_config.interval) {
+ } else if (_config.interval && _config.ride) {
data.pause();
data.cycle();
}
});
};
@@ -1141,11 +1147,11 @@
* Constants
* ------------------------------------------------------------------------
*/
var NAME$3 = 'collapse';
- var VERSION$3 = '4.2.1';
+ var VERSION$3 = '4.3.1';
var DATA_KEY$3 = 'bs.collapse';
var EVENT_KEY$3 = "." + DATA_KEY$3;
var DATA_API_KEY$3 = '.data-api';
var JQUERY_NO_CONFLICT$3 = $.fn[NAME$3];
var Default$1 = {
@@ -1363,13 +1369,13 @@
this._config = null;
this._parent = null;
this._element = null;
this._triggerArray = null;
this._isTransitioning = null;
- }; // Private
+ } // Private
+ ;
-
_proto._getConfig = function _getConfig(config) {
config = _objectSpread({}, Default$1, config);
config.toggle = Boolean(config.toggle); // Coerce string values
Util.typeCheckConfig(NAME$3, config, DefaultType$1);
@@ -1408,13 +1414,13 @@
var isOpen = $(element).hasClass(ClassName$3.SHOW);
if (triggerArray.length) {
$(triggerArray).toggleClass(ClassName$3.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
}
- }; // Static
+ } // Static
+ ;
-
Collapse._getTargetFromElement = function _getTargetFromElement(element) {
var selector = Util.getSelectorFromElement(element);
return selector ? document.querySelector(selector) : null;
};
@@ -1501,11 +1507,11 @@
* Constants
* ------------------------------------------------------------------------
*/
var NAME$4 = 'dropdown';
- var VERSION$4 = '4.2.1';
+ var VERSION$4 = '4.3.1';
var DATA_KEY$4 = 'bs.dropdown';
var EVENT_KEY$4 = "." + DATA_KEY$4;
var DATA_API_KEY$4 = '.data-api';
var JQUERY_NO_CONFLICT$4 = $.fn[NAME$4];
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
@@ -1730,13 +1736,13 @@
this._inNavbar = this._detectNavbar();
if (this._popper !== null) {
this._popper.scheduleUpdate();
}
- }; // Private
+ } // Private
+ ;
-
_proto._addEventListeners = function _addEventListeners() {
var _this = this;
$(this._element).on(Event$4.CLICK, function (event) {
event.preventDefault();
@@ -1787,28 +1793,32 @@
_proto._detectNavbar = function _detectNavbar() {
return $(this._element).closest('.navbar').length > 0;
};
- _proto._getPopperConfig = function _getPopperConfig() {
+ _proto._getOffset = function _getOffset() {
var _this2 = this;
- var offsetConf = {};
+ var offset = {};
if (typeof this._config.offset === 'function') {
- offsetConf.fn = function (data) {
- data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets) || {});
+ offset.fn = function (data) {
+ data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {});
return data;
};
} else {
- offsetConf.offset = this._config.offset;
+ offset.offset = this._config.offset;
}
+ return offset;
+ };
+
+ _proto._getPopperConfig = function _getPopperConfig() {
var popperConfig = {
placement: this._getPlacement(),
modifiers: {
- offset: offsetConf,
+ offset: this._getOffset(),
flip: {
enabled: this._config.flip
},
preventOverflow: {
boundariesElement: this._config.boundary
@@ -1822,13 +1832,13 @@
enabled: false
};
}
return popperConfig;
- }; // Static
+ } // Static
+ ;
-
Dropdown._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY$4);
var _config = typeof config === 'object' ? config : null;
@@ -1907,13 +1917,13 @@
if (selector) {
parent = document.querySelector(selector);
}
return parent || element.parentNode;
- }; // eslint-disable-next-line complexity
+ } // eslint-disable-next-line complexity
+ ;
-
Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
// If not input/textarea:
// - And not a key in REGEXP_KEYDOWN => not a dropdown command
// If input/textarea:
// - If space key => not a dropdown command
@@ -2023,11 +2033,11 @@
* Constants
* ------------------------------------------------------------------------
*/
var NAME$5 = 'modal';
- var VERSION$5 = '4.2.1';
+ var VERSION$5 = '4.3.1';
var DATA_KEY$5 = 'bs.modal';
var EVENT_KEY$5 = "." + DATA_KEY$5;
var DATA_API_KEY$5 = '.data-api';
var JQUERY_NO_CONFLICT$5 = $.fn[NAME$5];
var ESCAPE_KEYCODE$1 = 27; // KeyboardEvent.which value for Escape (Esc) key
@@ -2056,18 +2066,20 @@
MOUSEUP_DISMISS: "mouseup.dismiss" + EVENT_KEY$5,
MOUSEDOWN_DISMISS: "mousedown.dismiss" + EVENT_KEY$5,
CLICK_DATA_API: "click" + EVENT_KEY$5 + DATA_API_KEY$5
};
var ClassName$5 = {
+ SCROLLABLE: 'modal-dialog-scrollable',
SCROLLBAR_MEASURER: 'modal-scrollbar-measure',
BACKDROP: 'modal-backdrop',
OPEN: 'modal-open',
FADE: 'fade',
SHOW: 'show'
};
var Selector$5 = {
DIALOG: '.modal-dialog',
+ MODAL_BODY: '.modal-body',
DATA_TOGGLE: '[data-toggle="modal"]',
DATA_DISMISS: '[data-dismiss="modal"]',
FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
STICKY_CONTENT: '.sticky-top'
/**
@@ -2216,13 +2228,13 @@
this._scrollbarWidth = null;
};
_proto.handleUpdate = function handleUpdate() {
this._adjustDialog();
- }; // Private
+ } // Private
+ ;
-
_proto._getConfig = function _getConfig(config) {
config = _objectSpread({}, Default$3, config);
Util.typeCheckConfig(NAME$5, config, DefaultType$3);
return config;
};
@@ -2241,11 +2253,15 @@
this._element.removeAttribute('aria-hidden');
this._element.setAttribute('aria-modal', true);
- this._element.scrollTop = 0;
+ if ($(this._dialog).hasClass(ClassName$5.SCROLLABLE)) {
+ this._dialog.querySelector(Selector$5.MODAL_BODY).scrollTop = 0;
+ } else {
+ this._element.scrollTop = 0;
+ }
if (transition) {
Util.reflow(this._element);
}
@@ -2411,16 +2427,16 @@
callbackRemove();
}
} else if (callback) {
callback();
}
- }; // ----------------------------------------------------------------------
+ } // ----------------------------------------------------------------------
// the following methods are used to handle overflowing modals
// todo (fat): these should probably be refactored out of modal.js
// ----------------------------------------------------------------------
+ ;
-
_proto._adjustDialog = function _adjustDialog() {
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
if (!this._isBodyOverflowing && isModalOverflowing) {
this._element.style.paddingLeft = this._scrollbarWidth + "px";
@@ -2500,13 +2516,13 @@
scrollDiv.className = ClassName$5.SCROLLBAR_MEASURER;
document.body.appendChild(scrollDiv);
var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
document.body.removeChild(scrollDiv);
return scrollbarWidth;
- }; // Static
+ } // Static
+ ;
-
Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
return this.each(function () {
var data = $(this).data(DATA_KEY$5);
var _config = _objectSpread({}, Default$3, $(this).data(), typeof config === 'object' && config ? config : {});
@@ -2593,35 +2609,160 @@
$.fn[NAME$5] = JQUERY_NO_CONFLICT$5;
return Modal._jQueryInterface;
};
/**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v4.3.1): tools/sanitizer.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
+ var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
+ var DefaultWhitelist = {
+ // Global attributes allowed on any supplied element below.
+ '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
+ a: ['target', 'href', 'title', 'rel'],
+ area: [],
+ b: [],
+ br: [],
+ col: [],
+ code: [],
+ div: [],
+ em: [],
+ hr: [],
+ h1: [],
+ h2: [],
+ h3: [],
+ h4: [],
+ h5: [],
+ h6: [],
+ i: [],
+ img: ['src', 'alt', 'title', 'width', 'height'],
+ li: [],
+ ol: [],
+ p: [],
+ pre: [],
+ s: [],
+ small: [],
+ span: [],
+ sub: [],
+ sup: [],
+ strong: [],
+ u: [],
+ ul: []
+ /**
+ * A pattern that recognizes a commonly useful subset of URLs that are safe.
+ *
+ * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
+ */
+
+ };
+ var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
+ /**
+ * A pattern that matches safe data URLs. Only matches image, video and audio types.
+ *
+ * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
+ */
+
+ 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-z0-9+/]+=*$/i;
+
+ function allowedAttribute(attr, allowedAttributeList) {
+ var attrName = attr.nodeName.toLowerCase();
+
+ if (allowedAttributeList.indexOf(attrName) !== -1) {
+ if (uriAttrs.indexOf(attrName) !== -1) {
+ return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
+ }
+
+ return true;
+ }
+
+ var regExp = allowedAttributeList.filter(function (attrRegex) {
+ return attrRegex instanceof RegExp;
+ }); // Check if a regular expression validates the attribute.
+
+ for (var i = 0, l = regExp.length; i < l; i++) {
+ if (attrName.match(regExp[i])) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
+ if (unsafeHtml.length === 0) {
+ return unsafeHtml;
+ }
+
+ if (sanitizeFn && typeof sanitizeFn === 'function') {
+ return sanitizeFn(unsafeHtml);
+ }
+
+ var domParser = new window.DOMParser();
+ var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
+ var whitelistKeys = Object.keys(whiteList);
+ var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
+
+ var _loop = function _loop(i, len) {
+ var el = elements[i];
+ var elName = el.nodeName.toLowerCase();
+
+ if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
+ el.parentNode.removeChild(el);
+ return "continue";
+ }
+
+ var attributeList = [].slice.call(el.attributes);
+ var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
+ attributeList.forEach(function (attr) {
+ if (!allowedAttribute(attr, whitelistedAttributes)) {
+ el.removeAttribute(attr.nodeName);
+ }
+ });
+ };
+
+ for (var i = 0, len = elements.length; i < len; i++) {
+ var _ret = _loop(i, len);
+
+ if (_ret === "continue") continue;
+ }
+
+ return createdDocument.body.innerHTML;
+ }
+
+ /**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME$6 = 'tooltip';
- var VERSION$6 = '4.2.1';
+ var VERSION$6 = '4.3.1';
var DATA_KEY$6 = 'bs.tooltip';
var EVENT_KEY$6 = "." + DATA_KEY$6;
var JQUERY_NO_CONFLICT$6 = $.fn[NAME$6];
var CLASS_PREFIX = 'bs-tooltip';
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
+ var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
var DefaultType$4 = {
animation: 'boolean',
template: 'string',
title: '(string|element|function)',
trigger: 'string',
delay: '(number|object)',
html: 'boolean',
selector: '(string|boolean)',
placement: '(string|function)',
- offset: '(number|string)',
+ offset: '(number|string|function)',
container: '(string|element|boolean)',
fallbackPlacement: '(string|array)',
- boundary: '(string|element)'
+ boundary: '(string|element)',
+ sanitize: 'boolean',
+ sanitizeFn: '(null|function)',
+ whiteList: 'object'
};
var AttachmentMap$1 = {
AUTO: 'auto',
TOP: 'top',
RIGHT: 'right',
@@ -2638,11 +2779,14 @@
selector: false,
placement: 'top',
offset: 0,
container: false,
fallbackPlacement: 'flip',
- boundary: 'scrollParent'
+ boundary: 'scrollParent',
+ sanitize: true,
+ sanitizeFn: null,
+ whiteList: DefaultWhitelist
};
var HoverState = {
SHOW: 'show',
OUT: 'out'
};
@@ -2823,13 +2967,11 @@
$(this.element).trigger(this.constructor.Event.INSERTED);
this._popper = new Popper(this.element, tip, {
placement: attachment,
modifiers: {
- offset: {
- offset: this.config.offset
- },
+ offset: this._getOffset(),
flip: {
behavior: this.config.fallbackPlacement
},
arrow: {
element: Selector$6.ARROW
@@ -2934,13 +3076,13 @@
_proto.update = function update() {
if (this._popper !== null) {
this._popper.scheduleUpdate();
}
- }; // Protected
+ } // Protected
+ ;
-
_proto.isWithContent = function isWithContent() {
return Boolean(this.getTitle());
};
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
@@ -2957,23 +3099,31 @@
this.setElementContent($(tip.querySelectorAll(Selector$6.TOOLTIP_INNER)), this.getTitle());
$(tip).removeClass(ClassName$6.FADE + " " + ClassName$6.SHOW);
};
_proto.setElementContent = function setElementContent($element, content) {
- var html = this.config.html;
-
if (typeof content === 'object' && (content.nodeType || content.jquery)) {
// Content is a DOM node or a jQuery
- if (html) {
+ if (this.config.html) {
if (!$(content).parent().is($element)) {
$element.empty().append(content);
}
} else {
$element.text($(content).text());
}
+
+ return;
+ }
+
+ if (this.config.html) {
+ if (this.config.sanitize) {
+ content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
+ }
+
+ $element.html(content);
} else {
- $element[html ? 'html' : 'text'](content);
+ $element.text(content);
}
};
_proto.getTitle = function getTitle() {
var title = this.element.getAttribute('data-original-title');
@@ -2981,13 +3131,30 @@
if (!title) {
title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
}
return title;
- }; // Private
+ } // Private
+ ;
+ _proto._getOffset = function _getOffset() {
+ var _this3 = this;
+ var offset = {};
+
+ if (typeof this.config.offset === 'function') {
+ offset.fn = function (data) {
+ data.offsets = _objectSpread({}, data.offsets, _this3.config.offset(data.offsets, _this3.element) || {});
+ return data;
+ };
+ } else {
+ offset.offset = this.config.offset;
+ }
+
+ return offset;
+ };
+
_proto._getContainer = function _getContainer() {
if (this.config.container === false) {
return document.body;
}
@@ -3001,31 +3168,31 @@
_proto._getAttachment = function _getAttachment(placement) {
return AttachmentMap$1[placement.toUpperCase()];
};
_proto._setListeners = function _setListeners() {
- var _this3 = this;
+ var _this4 = this;
var triggers = this.config.trigger.split(' ');
triggers.forEach(function (trigger) {
if (trigger === 'click') {
- $(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) {
- return _this3.toggle(event);
+ $(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, function (event) {
+ return _this4.toggle(event);
});
} else if (trigger !== Trigger.MANUAL) {
- var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN;
- var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT;
- $(_this3.element).on(eventIn, _this3.config.selector, function (event) {
- return _this3._enter(event);
- }).on(eventOut, _this3.config.selector, function (event) {
- return _this3._leave(event);
+ var eventIn = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN;
+ var eventOut = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT;
+ $(_this4.element).on(eventIn, _this4.config.selector, function (event) {
+ return _this4._enter(event);
+ }).on(eventOut, _this4.config.selector, function (event) {
+ return _this4._leave(event);
});
}
});
$(this.element).closest('.modal').on('hide.bs.modal', function () {
- if (_this3.element) {
- _this3.hide();
+ if (_this4.element) {
+ _this4.hide();
}
});
if (this.config.selector) {
this.config = _objectSpread({}, this.config, {
@@ -3120,11 +3287,17 @@
return false;
};
_proto._getConfig = function _getConfig(config) {
- config = _objectSpread({}, this.constructor.Default, $(this.element).data(), typeof config === 'object' && config ? config : {});
+ var dataAttributes = $(this.element).data();
+ Object.keys(dataAttributes).forEach(function (dataAttr) {
+ if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
+ delete dataAttributes[dataAttr];
+ }
+ });
+ config = _objectSpread({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
if (typeof config.delay === 'number') {
config.delay = {
show: config.delay,
hide: config.delay
@@ -3138,10 +3311,15 @@
if (typeof config.content === 'number') {
config.content = config.content.toString();
}
Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType);
+
+ if (config.sanitize) {
+ config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
+ }
+
return config;
};
_proto._getDelegateConfig = function _getDelegateConfig() {
var config = {};
@@ -3186,13 +3364,13 @@
$(tip).removeClass(ClassName$6.FADE);
this.config.animation = false;
this.hide();
this.show();
this.config.animation = initConfigAnimation;
- }; // Static
+ } // Static
+ ;
-
Tooltip._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY$6);
var _config = typeof config === 'object' && config;
@@ -3275,11 +3453,11 @@
* Constants
* ------------------------------------------------------------------------
*/
var NAME$7 = 'popover';
- var VERSION$7 = '4.2.1';
+ var VERSION$7 = '4.3.1';
var DATA_KEY$7 = 'bs.popover';
var EVENT_KEY$7 = "." + DATA_KEY$7;
var JQUERY_NO_CONFLICT$7 = $.fn[NAME$7];
var CLASS_PREFIX$1 = 'bs-popover';
var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g');
@@ -3358,13 +3536,13 @@
content = content.call(this.element);
}
this.setElementContent($tip.find(Selector$7.CONTENT), content);
$tip.removeClass(ClassName$7.FADE + " " + ClassName$7.SHOW);
- }; // Private
+ } // Private
+ ;
-
_proto._getContent = function _getContent() {
return this.element.getAttribute('data-content') || this.config.content;
};
_proto._cleanTipClass = function _cleanTipClass() {
@@ -3372,13 +3550,13 @@
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX$1);
if (tabClass !== null && tabClass.length > 0) {
$tip.removeClass(tabClass.join(''));
}
- }; // Static
+ } // Static
+ ;
-
Popover._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY$7);
var _config = typeof config === 'object' ? config : null;
@@ -3462,11 +3640,11 @@
* Constants
* ------------------------------------------------------------------------
*/
var NAME$8 = 'scrollspy';
- var VERSION$8 = '4.2.1';
+ var VERSION$8 = '4.3.1';
var DATA_KEY$8 = 'bs.scrollspy';
var EVENT_KEY$8 = "." + DATA_KEY$8;
var DATA_API_KEY$6 = '.data-api';
var JQUERY_NO_CONFLICT$8 = $.fn[NAME$8];
var Default$6 = {
@@ -3585,13 +3763,13 @@
this._selector = null;
this._offsets = null;
this._targets = null;
this._activeTarget = null;
this._scrollHeight = null;
- }; // Private
+ } // Private
+ ;
-
_proto._getConfig = function _getConfig(config) {
config = _objectSpread({}, Default$6, typeof config === 'object' && config ? config : {});
if (typeof config.target !== 'string') {
var id = $(config.target).attr('id');
@@ -3693,13 +3871,13 @@
[].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
return node.classList.contains(ClassName$8.ACTIVE);
}).forEach(function (node) {
return node.classList.remove(ClassName$8.ACTIVE);
});
- }; // Static
+ } // Static
+ ;
-
ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY$8);
var _config = typeof config === 'object' && config;
@@ -3769,11 +3947,11 @@
* Constants
* ------------------------------------------------------------------------
*/
var NAME$9 = 'tab';
- var VERSION$9 = '4.2.1';
+ var VERSION$9 = '4.3.1';
var DATA_KEY$9 = 'bs.tab';
var EVENT_KEY$9 = "." + DATA_KEY$9;
var DATA_API_KEY$7 = '.data-api';
var JQUERY_NO_CONFLICT$9 = $.fn[NAME$9];
var Event$9 = {
@@ -3877,13 +4055,13 @@
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY$9);
this._element = null;
- }; // Private
+ } // Private
+ ;
-
_proto._activate = function _activate(element, container, callback) {
var _this2 = this;
var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(Selector$9.ACTIVE_UL) : $(container).children(Selector$9.ACTIVE);
var active = activeElements[0];
@@ -3920,12 +4098,15 @@
if (element.getAttribute('role') === 'tab') {
element.setAttribute('aria-selected', true);
}
Util.reflow(element);
- $(element).addClass(ClassName$9.SHOW);
+ if (element.classList.contains(ClassName$9.FADE)) {
+ element.classList.add(ClassName$9.SHOW);
+ }
+
if (element.parentNode && $(element.parentNode).hasClass(ClassName$9.DROPDOWN_MENU)) {
var dropdownElement = $(element).closest(Selector$9.DROPDOWN)[0];
if (dropdownElement) {
var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector$9.DROPDOWN_TOGGLE));
@@ -3936,13 +4117,13 @@
}
if (callback) {
callback();
}
- }; // Static
+ } // Static
+ ;
-
Tab._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var $this = $(this);
var data = $this.data(DATA_KEY$9);
@@ -4001,11 +4182,11 @@
* Constants
* ------------------------------------------------------------------------
*/
var NAME$a = 'toast';
- var VERSION$a = '4.2.1';
+ var VERSION$a = '4.3.1';
var DATA_KEY$a = 'bs.toast';
var EVENT_KEY$a = "." + DATA_KEY$a;
var JQUERY_NO_CONFLICT$a = $.fn[NAME$a];
var Event$a = {
CLICK_DISMISS: "click.dismiss" + EVENT_KEY$a,
@@ -4116,13 +4297,13 @@
$(this._element).off(Event$a.CLICK_DISMISS);
$.removeData(this._element, DATA_KEY$a);
this._element = null;
this._config = null;
- }; // Private
+ } // Private
+ ;
-
_proto._getConfig = function _getConfig(config) {
config = _objectSpread({}, Default$7, $(this._element).data(), typeof config === 'object' && config ? config : {});
Util.typeCheckConfig(NAME$a, config, this.constructor.DefaultType);
return config;
};
@@ -4150,13 +4331,13 @@
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
} else {
complete();
}
- }; // Static
+ } // Static
+ ;
-
Toast._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY$a);
@@ -4185,10 +4366,15 @@
}, {
key: "DefaultType",
get: function get() {
return DefaultType$7;
}
+ }, {
+ key: "Default",
+ get: function get() {
+ return Default$7;
+ }
}]);
return Toast;
}();
/**
@@ -4206,11 +4392,11 @@
return Toast._jQueryInterface;
};
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.2.1): index.js
+ * Bootstrap (v4.3.1): index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
(function () {
@@ -4243,7 +4429,7 @@
exports.Toast = Toast;
exports.Tooltip = Tooltip;
Object.defineProperty(exports, '__esModule', { value: true });
-})));
+}));
//# sourceMappingURL=bootstrap.js.map