aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/js/src/popover.js
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/twbs/bootstrap/js/src/popover.js')
-rw-r--r--vendor/twbs/bootstrap/js/src/popover.js50
1 files changed, 26 insertions, 24 deletions
diff --git a/vendor/twbs/bootstrap/js/src/popover.js b/vendor/twbs/bootstrap/js/src/popover.js
index 885d16234..ee7a4ca9a 100644
--- a/vendor/twbs/bootstrap/js/src/popover.js
+++ b/vendor/twbs/bootstrap/js/src/popover.js
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.5.2): popover.js
+ * Bootstrap (v4.5.3): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -14,20 +14,20 @@ import Tooltip from './tooltip'
* ------------------------------------------------------------------------
*/
-const NAME = 'popover'
-const VERSION = '4.5.2'
-const DATA_KEY = 'bs.popover'
-const EVENT_KEY = `.${DATA_KEY}`
-const JQUERY_NO_CONFLICT = $.fn[NAME]
-const CLASS_PREFIX = 'bs-popover'
-const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g')
+const NAME = 'popover'
+const VERSION = '4.5.3'
+const DATA_KEY = 'bs.popover'
+const EVENT_KEY = `.${DATA_KEY}`
+const JQUERY_NO_CONFLICT = $.fn[NAME]
+const CLASS_PREFIX = 'bs-popover'
+const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g')
const Default = {
...Tooltip.Default,
- placement : 'right',
- trigger : 'click',
- content : '',
- template : '<div class="popover" role="tooltip">' +
+ placement: 'right',
+ trigger: 'click',
+ content: '',
+ template: '<div class="popover" role="tooltip">' +
'<div class="arrow"></div>' +
'<h3 class="popover-header"></h3>' +
'<div class="popover-body"></div></div>'
@@ -35,26 +35,26 @@ const Default = {
const DefaultType = {
...Tooltip.DefaultType,
- content : '(string|element|function)'
+ content: '(string|element|function)'
}
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_SHOW = 'show'
-const SELECTOR_TITLE = '.popover-header'
+const SELECTOR_TITLE = '.popover-header'
const SELECTOR_CONTENT = '.popover-body'
const Event = {
- HIDE : `hide${EVENT_KEY}`,
- HIDDEN : `hidden${EVENT_KEY}`,
- SHOW : `show${EVENT_KEY}`,
- SHOWN : `shown${EVENT_KEY}`,
- INSERTED : `inserted${EVENT_KEY}`,
- CLICK : `click${EVENT_KEY}`,
- FOCUSIN : `focusin${EVENT_KEY}`,
- FOCUSOUT : `focusout${EVENT_KEY}`,
- MOUSEENTER : `mouseenter${EVENT_KEY}`,
- MOUSELEAVE : `mouseleave${EVENT_KEY}`
+ HIDE: `hide${EVENT_KEY}`,
+ HIDDEN: `hidden${EVENT_KEY}`,
+ SHOW: `show${EVENT_KEY}`,
+ SHOWN: `shown${EVENT_KEY}`,
+ INSERTED: `inserted${EVENT_KEY}`,
+ CLICK: `click${EVENT_KEY}`,
+ FOCUSIN: `focusin${EVENT_KEY}`,
+ FOCUSOUT: `focusout${EVENT_KEY}`,
+ MOUSEENTER: `mouseenter${EVENT_KEY}`,
+ MOUSELEAVE: `mouseleave${EVENT_KEY}`
}
/**
@@ -118,6 +118,7 @@ class Popover extends Tooltip {
if (typeof content === 'function') {
content = content.call(this.element)
}
+
this.setElementContent($tip.find(SELECTOR_CONTENT), content)
$tip.removeClass(`${CLASS_NAME_FADE} ${CLASS_NAME_SHOW}`)
@@ -158,6 +159,7 @@ class Popover extends Tooltip {
if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`)
}
+
data[config]()
}
})