diff options
Diffstat (limited to 'js/dist/popover.js')
-rw-r--r-- | js/dist/popover.js | 45 |
1 files changed, 31 insertions, 14 deletions
diff --git a/js/dist/popover.js b/js/dist/popover.js index 8dbcee7a8f..f4809da973 100644 --- a/js/dist/popover.js +++ b/js/dist/popover.js @@ -4,8 +4,8 @@ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/selector-engine.js'), require('./tooltip.js')) : - typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/selector-engine.js', './tooltip.js'], factory) : + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../dom/data.js'), require('../dom/selector-engine.js'), require('../tooltip/tooltip.js')) : + typeof define === 'function' && define.amd ? define(['../dom/data.js', '../dom/selector-engine.js', '../tooltip/tooltip.js'], factory) : (global = global || self, global.Popover = factory(global.Data, global.SelectorEngine, global.Tooltip)); }(this, function (Data, SelectorEngine, Tooltip) { 'use strict'; @@ -44,20 +44,35 @@ return obj; } - function _objectSpread(target) { + function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } + + return keys; + } + + function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - })); + if (i % 2) { + ownKeys(source, true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(source).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); } - - ownKeys.forEach(function (key) { - _defineProperty(target, key, source[key]); - }); } return target; @@ -91,14 +106,14 @@ var CLASS_PREFIX = 'bs-popover'; var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); - var Default = _objectSpread({}, Tooltip.Default, { + var Default = _objectSpread2({}, Tooltip.Default, { placement: 'right', trigger: 'click', content: '', template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>' }); - var DefaultType = _objectSpread({}, Tooltip.DefaultType, { + var DefaultType = _objectSpread2({}, Tooltip.DefaultType, { content: '(string|element|function)' }); @@ -259,6 +274,8 @@ * ------------------------------------------------------------------------ */ + /* istanbul ignore if */ + if (typeof jQuery !== 'undefined') { var JQUERY_NO_CONFLICT = jQuery.fn[NAME]; |