vertx-howtos-jekyll-theme 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +52 -0
- data/_layouts/page.html +61 -0
- data/_sass/bootstrap/js/dist/alert.js +199 -0
- data/_sass/bootstrap/js/dist/alert.js.map +1 -0
- data/_sass/bootstrap/js/dist/button.js +187 -0
- data/_sass/bootstrap/js/dist/button.js.map +1 -0
- data/_sass/bootstrap/js/dist/carousel.js +666 -0
- data/_sass/bootstrap/js/dist/carousel.js.map +1 -0
- data/_sass/bootstrap/js/dist/collapse.js +428 -0
- data/_sass/bootstrap/js/dist/collapse.js.map +1 -0
- data/_sass/bootstrap/js/dist/dropdown.js +591 -0
- data/_sass/bootstrap/js/dist/dropdown.js.map +1 -0
- data/_sass/bootstrap/js/dist/index.js +23 -0
- data/_sass/bootstrap/js/dist/index.js.map +1 -0
- data/_sass/bootstrap/js/dist/modal.js +644 -0
- data/_sass/bootstrap/js/dist/modal.js.map +1 -0
- data/_sass/bootstrap/js/dist/popover.js +261 -0
- data/_sass/bootstrap/js/dist/popover.js.map +1 -0
- data/_sass/bootstrap/js/dist/scrollspy.js +375 -0
- data/_sass/bootstrap/js/dist/scrollspy.js.map +1 -0
- data/_sass/bootstrap/js/dist/tab.js +266 -0
- data/_sass/bootstrap/js/dist/tab.js.map +1 -0
- data/_sass/bootstrap/js/dist/toast.js +278 -0
- data/_sass/bootstrap/js/dist/toast.js.map +1 -0
- data/_sass/bootstrap/js/dist/tooltip.js +745 -0
- data/_sass/bootstrap/js/dist/tooltip.js.map +1 -0
- data/_sass/bootstrap/js/dist/util.js +168 -0
- data/_sass/bootstrap/js/dist/util.js.map +1 -0
- data/_sass/bootstrap/js/src/alert.js +179 -0
- data/_sass/bootstrap/js/src/button.js +171 -0
- data/_sass/bootstrap/js/src/carousel.js +604 -0
- data/_sass/bootstrap/js/src/collapse.js +402 -0
- data/_sass/bootstrap/js/src/dropdown.js +538 -0
- data/_sass/bootstrap/js/src/index.js +52 -0
- data/_sass/bootstrap/js/src/modal.js +587 -0
- data/_sass/bootstrap/js/src/popover.js +184 -0
- data/_sass/bootstrap/js/src/scrollspy.js +326 -0
- data/_sass/bootstrap/js/src/tab.js +257 -0
- data/_sass/bootstrap/js/src/toast.js +223 -0
- data/_sass/bootstrap/js/src/tooltip.js +735 -0
- data/_sass/bootstrap/js/src/util.js +173 -0
- data/_sass/bootstrap/js/tests/README.md +69 -0
- data/_sass/bootstrap/js/tests/browsers.js +82 -0
- data/_sass/bootstrap/js/tests/index.html +145 -0
- data/_sass/bootstrap/js/tests/integration/bundle.js +8 -0
- data/_sass/bootstrap/js/tests/integration/index.html +66 -0
- data/_sass/bootstrap/js/tests/integration/rollup.bundle.js +20 -0
- data/_sass/bootstrap/js/tests/karma.conf.js +145 -0
- data/_sass/bootstrap/js/tests/unit/.eslintrc.json +40 -0
- data/_sass/bootstrap/js/tests/unit/alert.js +123 -0
- data/_sass/bootstrap/js/tests/unit/button.js +222 -0
- data/_sass/bootstrap/js/tests/unit/carousel.js +1273 -0
- data/_sass/bootstrap/js/tests/unit/collapse.js +892 -0
- data/_sass/bootstrap/js/tests/unit/dropdown.js +1364 -0
- data/_sass/bootstrap/js/tests/unit/modal.js +796 -0
- data/_sass/bootstrap/js/tests/unit/popover.js +471 -0
- data/_sass/bootstrap/js/tests/unit/scrollspy.js +728 -0
- data/_sass/bootstrap/js/tests/unit/tab.js +462 -0
- data/_sass/bootstrap/js/tests/unit/toast.js +239 -0
- data/_sass/bootstrap/js/tests/unit/tooltip.js +1072 -0
- data/_sass/bootstrap/js/tests/unit/util.js +164 -0
- data/_sass/bootstrap/js/tests/visual/alert.html +58 -0
- data/_sass/bootstrap/js/tests/visual/button.html +51 -0
- data/_sass/bootstrap/js/tests/visual/carousel.html +66 -0
- data/_sass/bootstrap/js/tests/visual/collapse.html +78 -0
- data/_sass/bootstrap/js/tests/visual/dropdown.html +212 -0
- data/_sass/bootstrap/js/tests/visual/modal.html +268 -0
- data/_sass/bootstrap/js/tests/visual/popover.html +46 -0
- data/_sass/bootstrap/js/tests/visual/scrollspy.html +95 -0
- data/_sass/bootstrap/js/tests/visual/tab.html +234 -0
- data/_sass/bootstrap/js/tests/visual/toast.html +72 -0
- data/_sass/bootstrap/js/tests/visual/tooltip.html +106 -0
- data/_sass/bootstrap/scss/_alert.scss +51 -0
- data/_sass/bootstrap/scss/_badge.scss +53 -0
- data/_sass/bootstrap/scss/_breadcrumb.scss +41 -0
- data/_sass/bootstrap/scss/_button-group.scss +163 -0
- data/_sass/bootstrap/scss/_buttons.scss +140 -0
- data/_sass/bootstrap/scss/_card.scss +310 -0
- data/_sass/bootstrap/scss/_carousel.scss +198 -0
- data/_sass/bootstrap/scss/_close.scss +44 -0
- data/_sass/bootstrap/scss/_code.scss +48 -0
- data/_sass/bootstrap/scss/_custom-forms.scss +507 -0
- data/_sass/bootstrap/scss/_dropdown.scss +191 -0
- data/_sass/bootstrap/scss/_forms.scss +334 -0
- data/_sass/bootstrap/scss/_functions.scss +86 -0
- data/_sass/bootstrap/scss/_grid.scss +52 -0
- data/_sass/bootstrap/scss/_images.scss +42 -0
- data/_sass/bootstrap/scss/_input-group.scss +193 -0
- data/_sass/bootstrap/scss/_jumbotron.scss +16 -0
- data/_sass/bootstrap/scss/_list-group.scss +121 -0
- data/_sass/bootstrap/scss/_media.scss +8 -0
- data/_sass/bootstrap/scss/_mixins.scss +41 -0
- data/_sass/bootstrap/scss/_modal.scss +186 -0
- data/_sass/bootstrap/scss/_nav.scss +120 -0
- data/_sass/bootstrap/scss/_navbar.scss +299 -0
- data/_sass/bootstrap/scss/_pagination.scss +78 -0
- data/_sass/bootstrap/scss/_popover.scss +183 -0
- data/_sass/bootstrap/scss/_print.scss +141 -0
- data/_sass/bootstrap/scss/_progress.scss +34 -0
- data/_sass/bootstrap/scss/_reboot.scss +462 -0
- data/_sass/bootstrap/scss/_root.scss +19 -0
- data/_sass/bootstrap/scss/_spinners.scss +53 -0
- data/_sass/bootstrap/scss/_tables.scss +187 -0
- data/_sass/bootstrap/scss/_toasts.scss +43 -0
- data/_sass/bootstrap/scss/_tooltip.scss +115 -0
- data/_sass/bootstrap/scss/_transitions.scss +22 -0
- data/_sass/bootstrap/scss/_type.scss +125 -0
- data/_sass/bootstrap/scss/_utilities.scss +16 -0
- data/_sass/bootstrap/scss/_variables.scss +1091 -0
- data/_sass/bootstrap/scss/bootstrap-grid.scss +29 -0
- data/_sass/bootstrap/scss/bootstrap-reboot.scss +12 -0
- data/_sass/bootstrap/scss/bootstrap.scss +44 -0
- data/_sass/bootstrap/scss/mixins/_alert.scss +13 -0
- data/_sass/bootstrap/scss/mixins/_background-variant.scss +21 -0
- data/_sass/bootstrap/scss/mixins/_badge.scss +11 -0
- data/_sass/bootstrap/scss/mixins/_border-radius.scss +35 -0
- data/_sass/bootstrap/scss/mixins/_box-shadow.scss +5 -0
- data/_sass/bootstrap/scss/mixins/_breakpoints.scss +123 -0
- data/_sass/bootstrap/scss/mixins/_buttons.scss +111 -0
- data/_sass/bootstrap/scss/mixins/_caret.scss +62 -0
- data/_sass/bootstrap/scss/mixins/_clearfix.scss +7 -0
- data/_sass/bootstrap/scss/mixins/_float.scss +11 -0
- data/_sass/bootstrap/scss/mixins/_forms.scss +198 -0
- data/_sass/bootstrap/scss/mixins/_gradients.scss +45 -0
- data/_sass/bootstrap/scss/mixins/_grid-framework.scss +66 -0
- data/_sass/bootstrap/scss/mixins/_grid.scss +51 -0
- data/_sass/bootstrap/scss/mixins/_hover.scss +37 -0
- data/_sass/bootstrap/scss/mixins/_image.scss +36 -0
- data/_sass/bootstrap/scss/mixins/_list-group.scss +21 -0
- data/_sass/bootstrap/scss/mixins/_lists.scss +7 -0
- data/_sass/bootstrap/scss/mixins/_nav-divider.scss +10 -0
- data/_sass/bootstrap/scss/mixins/_pagination.scss +22 -0
- data/_sass/bootstrap/scss/mixins/_reset-text.scss +17 -0
- data/_sass/bootstrap/scss/mixins/_resize.scss +6 -0
- data/_sass/bootstrap/scss/mixins/_screen-reader.scss +33 -0
- data/_sass/bootstrap/scss/mixins/_size.scss +6 -0
- data/_sass/bootstrap/scss/mixins/_table-row.scss +39 -0
- data/_sass/bootstrap/scss/mixins/_text-emphasis.scss +14 -0
- data/_sass/bootstrap/scss/mixins/_text-hide.scss +13 -0
- data/_sass/bootstrap/scss/mixins/_text-truncate.scss +8 -0
- data/_sass/bootstrap/scss/mixins/_transition.scss +16 -0
- data/_sass/bootstrap/scss/mixins/_visibility.scss +7 -0
- data/_sass/bootstrap/scss/utilities/_align.scss +8 -0
- data/_sass/bootstrap/scss/utilities/_background.scss +19 -0
- data/_sass/bootstrap/scss/utilities/_borders.scss +63 -0
- data/_sass/bootstrap/scss/utilities/_clearfix.scss +3 -0
- data/_sass/bootstrap/scss/utilities/_display.scss +38 -0
- data/_sass/bootstrap/scss/utilities/_embed.scss +39 -0
- data/_sass/bootstrap/scss/utilities/_flex.scss +51 -0
- data/_sass/bootstrap/scss/utilities/_float.scss +9 -0
- data/_sass/bootstrap/scss/utilities/_overflow.scss +5 -0
- data/_sass/bootstrap/scss/utilities/_position.scss +32 -0
- data/_sass/bootstrap/scss/utilities/_screenreaders.scss +11 -0
- data/_sass/bootstrap/scss/utilities/_shadows.scss +6 -0
- data/_sass/bootstrap/scss/utilities/_sizing.scss +20 -0
- data/_sass/bootstrap/scss/utilities/_spacing.scss +73 -0
- data/_sass/bootstrap/scss/utilities/_text.scss +67 -0
- data/_sass/bootstrap/scss/utilities/_visibility.scss +11 -0
- data/_sass/custom.scss +1 -0
- data/assets/css/style.scss +65 -0
- data/assets/images/vertx-square.svg +1 -0
- metadata +248 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"toast.js","sources":["../src/toast.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.2.1): toast.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'toast'\nconst VERSION = '4.2.1'\nconst DATA_KEY = 'bs.toast'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst Event = {\n CLICK_DISMISS : `click.dismiss${EVENT_KEY}`,\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`\n}\n\nconst ClassName = {\n FADE : 'fade',\n HIDE : 'hide',\n SHOW : 'show',\n SHOWING : 'showing'\n}\n\nconst DefaultType = {\n animation : 'boolean',\n autohide : 'boolean',\n delay : 'number'\n}\n\nconst Default = {\n animation : true,\n autohide : true,\n delay : 500\n}\n\nconst Selector = {\n DATA_DISMISS : '[data-dismiss=\"toast\"]'\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Toast {\n constructor(element, config) {\n this._element = element\n this._config = this._getConfig(config)\n this._timeout = null\n this._setListeners()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Public\n\n show() {\n $(this._element).trigger(Event.SHOW)\n\n if (this._config.animation) {\n this._element.classList.add(ClassName.FADE)\n }\n\n const complete = () => {\n this._element.classList.remove(ClassName.SHOWING)\n this._element.classList.add(ClassName.SHOW)\n\n $(this._element).trigger(Event.SHOWN)\n\n if (this._config.autohide) {\n this.hide()\n }\n }\n\n this._element.classList.remove(ClassName.HIDE)\n this._element.classList.add(ClassName.SHOWING)\n if (this._config.animation) {\n const transitionDuration = Util.getTransitionDurationFromElement(this._element)\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n } else {\n complete()\n }\n }\n\n hide(withoutTimeout) {\n if (!this._element.classList.contains(ClassName.SHOW)) {\n return\n }\n\n $(this._element).trigger(Event.HIDE)\n\n if (withoutTimeout) {\n this._close()\n } else {\n this._timeout = setTimeout(() => {\n this._close()\n }, this._config.delay)\n }\n }\n\n dispose() {\n clearTimeout(this._timeout)\n this._timeout = null\n\n if (this._element.classList.contains(ClassName.SHOW)) {\n this._element.classList.remove(ClassName.SHOW)\n }\n\n $(this._element).off(Event.CLICK_DISMISS)\n\n $.removeData(this._element, DATA_KEY)\n this._element = null\n this._config = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...$(this._element).data(),\n ...typeof config === 'object' && config ? config : {}\n }\n\n Util.typeCheckConfig(\n NAME,\n config,\n this.constructor.DefaultType\n )\n\n return config\n }\n\n _setListeners() {\n $(this._element).on(\n Event.CLICK_DISMISS,\n Selector.DATA_DISMISS,\n () => this.hide(true)\n )\n }\n\n _close() {\n const complete = () => {\n this._element.classList.add(ClassName.HIDE)\n $(this._element).trigger(Event.HIDDEN)\n }\n\n this._element.classList.remove(ClassName.SHOW)\n if (this._config.animation) {\n const transitionDuration = Util.getTransitionDurationFromElement(this._element)\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n } else {\n complete()\n }\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n const $element = $(this)\n let data = $element.data(DATA_KEY)\n const _config = typeof config === 'object' && config\n\n if (!data) {\n data = new Toast(this, _config)\n $element.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config](this)\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Toast._jQueryInterface\n$.fn[NAME].Constructor = Toast\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Toast._jQueryInterface\n}\n\nexport default Toast\n"],"names":["NAME","VERSION","DATA_KEY","EVENT_KEY","JQUERY_NO_CONFLICT","$","fn","Event","CLICK_DISMISS","HIDE","HIDDEN","SHOW","SHOWN","ClassName","FADE","SHOWING","DefaultType","animation","autohide","delay","Default","Selector","DATA_DISMISS","Toast","element","config","_element","_config","_getConfig","_timeout","_setListeners","show","trigger","classList","add","complete","remove","hide","transitionDuration","Util","getTransitionDurationFromElement","one","TRANSITION_END","emulateTransitionEnd","withoutTimeout","contains","_close","setTimeout","dispose","clearTimeout","off","removeData","data","typeCheckConfig","constructor","on","_jQueryInterface","each","$element","TypeError","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUA;;;;;;EAMA,IAAMA,IAAI,GAAiB,OAA3B;EACA,IAAMC,OAAO,GAAc,OAA3B;EACA,IAAMC,QAAQ,GAAa,UAA3B;EACA,IAAMC,SAAS,SAAgBD,QAA/B;EACA,IAAME,kBAAkB,GAAGC,CAAC,CAACC,EAAF,CAAKN,IAAL,CAA3B;EAEA,IAAMO,KAAK,GAAG;EACZC,EAAAA,aAAa,oBAAmBL,SADpB;EAEZM,EAAAA,IAAI,WAAmBN,SAFX;EAGZO,EAAAA,MAAM,aAAmBP,SAHb;EAIZQ,EAAAA,IAAI,WAAmBR,SAJX;EAKZS,EAAAA,KAAK,YAAmBT;EALZ,CAAd;EAQA,IAAMU,SAAS,GAAG;EAChBC,EAAAA,IAAI,EAAM,MADM;EAEhBL,EAAAA,IAAI,EAAM,MAFM;EAGhBE,EAAAA,IAAI,EAAM,MAHM;EAIhBI,EAAAA,OAAO,EAAG;EAJM,CAAlB;EAOA,IAAMC,WAAW,GAAG;EAClBC,EAAAA,SAAS,EAAG,SADM;EAElBC,EAAAA,QAAQ,EAAI,SAFM;EAGlBC,EAAAA,KAAK,EAAO;EAHM,CAApB;EAMA,IAAMC,OAAO,GAAG;EACdH,E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ributors)
|
4
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
5
|
+
*/
|
6
|
+
(function (global, factory) {
|
7
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
|
8
|
+
typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) :
|
9
|
+
(global.Tooltip = factory(global.jQuery,global.Popper,global.Util));
|
10
|
+
}(this, (function ($,Popper,Util) { 'use strict';
|
11
|
+
|
12
|
+
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
13
|
+
Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
|
14
|
+
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
|
15
|
+
|
16
|
+
function _defineProperties(target, props) {
|
17
|
+
for (var i = 0; i < props.length; i++) {
|
18
|
+
var descriptor = props[i];
|
19
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
20
|
+
descriptor.configurable = true;
|
21
|
+
if ("value" in descriptor) descriptor.writable = true;
|
22
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
27
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
28
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
29
|
+
return Constructor;
|
30
|
+
}
|
31
|
+
|
32
|
+
function _defineProperty(obj, key, value) {
|
33
|
+
if (key in obj) {
|
34
|
+
Object.defineProperty(obj, key, {
|
35
|
+
value: value,
|
36
|
+
enumerable: true,
|
37
|
+
configurable: true,
|
38
|
+
writable: true
|
39
|
+
});
|
40
|
+
} else {
|
41
|
+
obj[key] = value;
|
42
|
+
}
|
43
|
+
|
44
|
+
return obj;
|
45
|
+
}
|
46
|
+
|
47
|
+
function _objectSpread(target) {
|
48
|
+
for (var i = 1; i < arguments.length; i++) {
|
49
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
50
|
+
var ownKeys = Object.keys(source);
|
51
|
+
|
52
|
+
if (typeof Object.getOwnPropertySymbols === 'function') {
|
53
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
|
54
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
55
|
+
}));
|
56
|
+
}
|
57
|
+
|
58
|
+
ownKeys.forEach(function (key) {
|
59
|
+
_defineProperty(target, key, source[key]);
|
60
|
+
});
|
61
|
+
}
|
62
|
+
|
63
|
+
return target;
|
64
|
+
}
|
65
|
+
|
66
|
+
/**
|
67
|
+
* ------------------------------------------------------------------------
|
68
|
+
* Constants
|
69
|
+
* ------------------------------------------------------------------------
|
70
|
+
*/
|
71
|
+
|
72
|
+
var NAME = 'tooltip';
|
73
|
+
var VERSION = '4.2.1';
|
74
|
+
var DATA_KEY = 'bs.tooltip';
|
75
|
+
var EVENT_KEY = "." + DATA_KEY;
|
76
|
+
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
77
|
+
var CLASS_PREFIX = 'bs-tooltip';
|
78
|
+
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
|
79
|
+
var DefaultType = {
|
80
|
+
animation: 'boolean',
|
81
|
+
template: 'string',
|
82
|
+
title: '(string|element|function)',
|
83
|
+
trigger: 'string',
|
84
|
+
delay: '(number|object)',
|
85
|
+
html: 'boolean',
|
86
|
+
selector: '(string|boolean)',
|
87
|
+
placement: '(string|function)',
|
88
|
+
offset: '(number|string)',
|
89
|
+
container: '(string|element|boolean)',
|
90
|
+
fallbackPlacement: '(string|array)',
|
91
|
+
boundary: '(string|element)'
|
92
|
+
};
|
93
|
+
var AttachmentMap = {
|
94
|
+
AUTO: 'auto',
|
95
|
+
TOP: 'top',
|
96
|
+
RIGHT: 'right',
|
97
|
+
BOTTOM: 'bottom',
|
98
|
+
LEFT: 'left'
|
99
|
+
};
|
100
|
+
var Default = {
|
101
|
+
animation: true,
|
102
|
+
template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
|
103
|
+
trigger: 'hover focus',
|
104
|
+
title: '',
|
105
|
+
delay: 0,
|
106
|
+
html: false,
|
107
|
+
selector: false,
|
108
|
+
placement: 'top',
|
109
|
+
offset: 0,
|
110
|
+
container: false,
|
111
|
+
fallbackPlacement: 'flip',
|
112
|
+
boundary: 'scrollParent'
|
113
|
+
};
|
114
|
+
var HoverState = {
|
115
|
+
SHOW: 'show',
|
116
|
+
OUT: 'out'
|
117
|
+
};
|
118
|
+
var Event = {
|
119
|
+
HIDE: "hide" + EVENT_KEY,
|
120
|
+
HIDDEN: "hidden" + EVENT_KEY,
|
121
|
+
SHOW: "show" + EVENT_KEY,
|
122
|
+
SHOWN: "shown" + EVENT_KEY,
|
123
|
+
INSERTED: "inserted" + EVENT_KEY,
|
124
|
+
CLICK: "click" + EVENT_KEY,
|
125
|
+
FOCUSIN: "focusin" + EVENT_KEY,
|
126
|
+
FOCUSOUT: "focusout" + EVENT_KEY,
|
127
|
+
MOUSEENTER: "mouseenter" + EVENT_KEY,
|
128
|
+
MOUSELEAVE: "mouseleave" + EVENT_KEY
|
129
|
+
};
|
130
|
+
var ClassName = {
|
131
|
+
FADE: 'fade',
|
132
|
+
SHOW: 'show'
|
133
|
+
};
|
134
|
+
var Selector = {
|
135
|
+
TOOLTIP: '.tooltip',
|
136
|
+
TOOLTIP_INNER: '.tooltip-inner',
|
137
|
+
ARROW: '.arrow'
|
138
|
+
};
|
139
|
+
var Trigger = {
|
140
|
+
HOVER: 'hover',
|
141
|
+
FOCUS: 'focus',
|
142
|
+
CLICK: 'click',
|
143
|
+
MANUAL: 'manual'
|
144
|
+
/**
|
145
|
+
* ------------------------------------------------------------------------
|
146
|
+
* Class Definition
|
147
|
+
* ------------------------------------------------------------------------
|
148
|
+
*/
|
149
|
+
|
150
|
+
};
|
151
|
+
|
152
|
+
var Tooltip =
|
153
|
+
/*#__PURE__*/
|
154
|
+
function () {
|
155
|
+
function Tooltip(element, config) {
|
156
|
+
/**
|
157
|
+
* Check for Popper dependency
|
158
|
+
* Popper - https://popper.js.org
|
159
|
+
*/
|
160
|
+
if (typeof Popper === 'undefined') {
|
161
|
+
throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');
|
162
|
+
} // private
|
163
|
+
|
164
|
+
|
165
|
+
this._isEnabled = true;
|
166
|
+
this._timeout = 0;
|
167
|
+
this._hoverState = '';
|
168
|
+
this._activeTrigger = {};
|
169
|
+
this._popper = null; // Protected
|
170
|
+
|
171
|
+
this.element = element;
|
172
|
+
this.config = this._getConfig(config);
|
173
|
+
this.tip = null;
|
174
|
+
|
175
|
+
this._setListeners();
|
176
|
+
} // Getters
|
177
|
+
|
178
|
+
|
179
|
+
var _proto = Tooltip.prototype;
|
180
|
+
|
181
|
+
// Public
|
182
|
+
_proto.enable = function enable() {
|
183
|
+
this._isEnabled = true;
|
184
|
+
};
|
185
|
+
|
186
|
+
_proto.disable = function disable() {
|
187
|
+
this._isEnabled = false;
|
188
|
+
};
|
189
|
+
|
190
|
+
_proto.toggleEnabled = function toggleEnabled() {
|
191
|
+
this._isEnabled = !this._isEnabled;
|
192
|
+
};
|
193
|
+
|
194
|
+
_proto.toggle = function toggle(event) {
|
195
|
+
if (!this._isEnabled) {
|
196
|
+
return;
|
197
|
+
}
|
198
|
+
|
199
|
+
if (event) {
|
200
|
+
var dataKey = this.constructor.DATA_KEY;
|
201
|
+
var context = $(event.currentTarget).data(dataKey);
|
202
|
+
|
203
|
+
if (!context) {
|
204
|
+
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
|
205
|
+
$(event.currentTarget).data(dataKey, context);
|
206
|
+
}
|
207
|
+
|
208
|
+
context._activeTrigger.click = !context._activeTrigger.click;
|
209
|
+
|
210
|
+
if (context._isWithActiveTrigger()) {
|
211
|
+
context._enter(null, context);
|
212
|
+
} else {
|
213
|
+
context._leave(null, context);
|
214
|
+
}
|
215
|
+
} else {
|
216
|
+
if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {
|
217
|
+
this._leave(null, this);
|
218
|
+
|
219
|
+
return;
|
220
|
+
}
|
221
|
+
|
222
|
+
this._enter(null, this);
|
223
|
+
}
|
224
|
+
};
|
225
|
+
|
226
|
+
_proto.dispose = function dispose() {
|
227
|
+
clearTimeout(this._timeout);
|
228
|
+
$.removeData(this.element, this.constructor.DATA_KEY);
|
229
|
+
$(this.element).off(this.constructor.EVENT_KEY);
|
230
|
+
$(this.element).closest('.modal').off('hide.bs.modal');
|
231
|
+
|
232
|
+
if (this.tip) {
|
233
|
+
$(this.tip).remove();
|
234
|
+
}
|
235
|
+
|
236
|
+
this._isEnabled = null;
|
237
|
+
this._timeout = null;
|
238
|
+
this._hoverState = null;
|
239
|
+
this._activeTrigger = null;
|
240
|
+
|
241
|
+
if (this._popper !== null) {
|
242
|
+
this._popper.destroy();
|
243
|
+
}
|
244
|
+
|
245
|
+
this._popper = null;
|
246
|
+
this.element = null;
|
247
|
+
this.config = null;
|
248
|
+
this.tip = null;
|
249
|
+
};
|
250
|
+
|
251
|
+
_proto.show = function show() {
|
252
|
+
var _this = this;
|
253
|
+
|
254
|
+
if ($(this.element).css('display') === 'none') {
|
255
|
+
throw new Error('Please use show on visible elements');
|
256
|
+
}
|
257
|
+
|
258
|
+
var showEvent = $.Event(this.constructor.Event.SHOW);
|
259
|
+
|
260
|
+
if (this.isWithContent() && this._isEnabled) {
|
261
|
+
$(this.element).trigger(showEvent);
|
262
|
+
var shadowRoot = Util.findShadowRoot(this.element);
|
263
|
+
var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
|
264
|
+
|
265
|
+
if (showEvent.isDefaultPrevented() || !isInTheDom) {
|
266
|
+
return;
|
267
|
+
}
|
268
|
+
|
269
|
+
var tip = this.getTipElement();
|
270
|
+
var tipId = Util.getUID(this.constructor.NAME);
|
271
|
+
tip.setAttribute('id', tipId);
|
272
|
+
this.element.setAttribute('aria-describedby', tipId);
|
273
|
+
this.setContent();
|
274
|
+
|
275
|
+
if (this.config.animation) {
|
276
|
+
$(tip).addClass(ClassName.FADE);
|
277
|
+
}
|
278
|
+
|
279
|
+
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
|
280
|
+
|
281
|
+
var attachment = this._getAttachment(placement);
|
282
|
+
|
283
|
+
this.addAttachmentClass(attachment);
|
284
|
+
|
285
|
+
var container = this._getContainer();
|
286
|
+
|
287
|
+
$(tip).data(this.constructor.DATA_KEY, this);
|
288
|
+
|
289
|
+
if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
|
290
|
+
$(tip).appendTo(container);
|
291
|
+
}
|
292
|
+
|
293
|
+
$(this.element).trigger(this.constructor.Event.INSERTED);
|
294
|
+
this._popper = new Popper(this.element, tip, {
|
295
|
+
placement: attachment,
|
296
|
+
modifiers: {
|
297
|
+
offset: {
|
298
|
+
offset: this.config.offset
|
299
|
+
},
|
300
|
+
flip: {
|
301
|
+
behavior: this.config.fallbackPlacement
|
302
|
+
},
|
303
|
+
arrow: {
|
304
|
+
element: Selector.ARROW
|
305
|
+
},
|
306
|
+
preventOverflow: {
|
307
|
+
boundariesElement: this.config.boundary
|
308
|
+
}
|
309
|
+
},
|
310
|
+
onCreate: function onCreate(data) {
|
311
|
+
if (data.originalPlacement !== data.placement) {
|
312
|
+
_this._handlePopperPlacementChange(data);
|
313
|
+
}
|
314
|
+
},
|
315
|
+
onUpdate: function onUpdate(data) {
|
316
|
+
return _this._handlePopperPlacementChange(data);
|
317
|
+
}
|
318
|
+
});
|
319
|
+
$(tip).addClass(ClassName.SHOW); // If this is a touch-enabled device we add extra
|
320
|
+
// empty mouseover listeners to the body's immediate children;
|
321
|
+
// only needed because of broken event delegation on iOS
|
322
|
+
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
323
|
+
|
324
|
+
if ('ontouchstart' in document.documentElement) {
|
325
|
+
$(document.body).children().on('mouseover', null, $.noop);
|
326
|
+
}
|
327
|
+
|
328
|
+
var complete = function complete() {
|
329
|
+
if (_this.config.animation) {
|
330
|
+
_this._fixTransition();
|
331
|
+
}
|
332
|
+
|
333
|
+
var prevHoverState = _this._hoverState;
|
334
|
+
_this._hoverState = null;
|
335
|
+
$(_this.element).trigger(_this.constructor.Event.SHOWN);
|
336
|
+
|
337
|
+
if (prevHoverState === HoverState.OUT) {
|
338
|
+
_this._leave(null, _this);
|
339
|
+
}
|
340
|
+
};
|
341
|
+
|
342
|
+
if ($(this.tip).hasClass(ClassName.FADE)) {
|
343
|
+
var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
|
344
|
+
$(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
345
|
+
} else {
|
346
|
+
complete();
|
347
|
+
}
|
348
|
+
}
|
349
|
+
};
|
350
|
+
|
351
|
+
_proto.hide = function hide(callback) {
|
352
|
+
var _this2 = this;
|
353
|
+
|
354
|
+
var tip = this.getTipElement();
|
355
|
+
var hideEvent = $.Event(this.constructor.Event.HIDE);
|
356
|
+
|
357
|
+
var complete = function complete() {
|
358
|
+
if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
|
359
|
+
tip.parentNode.removeChild(tip);
|
360
|
+
}
|
361
|
+
|
362
|
+
_this2._cleanTipClass();
|
363
|
+
|
364
|
+
_this2.element.removeAttribute('aria-describedby');
|
365
|
+
|
366
|
+
$(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
|
367
|
+
|
368
|
+
if (_this2._popper !== null) {
|
369
|
+
_this2._popper.destroy();
|
370
|
+
}
|
371
|
+
|
372
|
+
if (callback) {
|
373
|
+
callback();
|
374
|
+
}
|
375
|
+
};
|
376
|
+
|
377
|
+
$(this.element).trigger(hideEvent);
|
378
|
+
|
379
|
+
if (hideEvent.isDefaultPrevented()) {
|
380
|
+
return;
|
381
|
+
}
|
382
|
+
|
383
|
+
$(tip).removeClass(ClassName.SHOW); // If this is a touch-enabled device we remove the extra
|
384
|
+
// empty mouseover listeners we added for iOS support
|
385
|
+
|
386
|
+
if ('ontouchstart' in document.documentElement) {
|
387
|
+
$(document.body).children().off('mouseover', null, $.noop);
|
388
|
+
}
|
389
|
+
|
390
|
+
this._activeTrigger[Trigger.CLICK] = false;
|
391
|
+
this._activeTrigger[Trigger.FOCUS] = false;
|
392
|
+
this._activeTrigger[Trigger.HOVER] = false;
|
393
|
+
|
394
|
+
if ($(this.tip).hasClass(ClassName.FADE)) {
|
395
|
+
var transitionDuration = Util.getTransitionDurationFromElement(tip);
|
396
|
+
$(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
397
|
+
} else {
|
398
|
+
complete();
|
399
|
+
}
|
400
|
+
|
401
|
+
this._hoverState = '';
|
402
|
+
};
|
403
|
+
|
404
|
+
_proto.update = function update() {
|
405
|
+
if (this._popper !== null) {
|
406
|
+
this._popper.scheduleUpdate();
|
407
|
+
}
|
408
|
+
}; // Protected
|
409
|
+
|
410
|
+
|
411
|
+
_proto.isWithContent = function isWithContent() {
|
412
|
+
return Boolean(this.getTitle());
|
413
|
+
};
|
414
|
+
|
415
|
+
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
|
416
|
+
$(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
|
417
|
+
};
|
418
|
+
|
419
|
+
_proto.getTipElement = function getTipElement() {
|
420
|
+
this.tip = this.tip || $(this.config.template)[0];
|
421
|
+
return this.tip;
|
422
|
+
};
|
423
|
+
|
424
|
+
_proto.setContent = function setContent() {
|
425
|
+
var tip = this.getTipElement();
|
426
|
+
this.setElementContent($(tip.querySelectorAll(Selector.TOOLTIP_INNER)), this.getTitle());
|
427
|
+
$(tip).removeClass(ClassName.FADE + " " + ClassName.SHOW);
|
428
|
+
};
|
429
|
+
|
430
|
+
_proto.setElementContent = function setElementContent($element, content) {
|
431
|
+
var html = this.config.html;
|
432
|
+
|
433
|
+
if (typeof content === 'object' && (content.nodeType || content.jquery)) {
|
434
|
+
// Content is a DOM node or a jQuery
|
435
|
+
if (html) {
|
436
|
+
if (!$(content).parent().is($element)) {
|
437
|
+
$element.empty().append(content);
|
438
|
+
}
|
439
|
+
} else {
|
440
|
+
$element.text($(content).text());
|
441
|
+
}
|
442
|
+
} else {
|
443
|
+
$element[html ? 'html' : 'text'](content);
|
444
|
+
}
|
445
|
+
};
|
446
|
+
|
447
|
+
_proto.getTitle = function getTitle() {
|
448
|
+
var title = this.element.getAttribute('data-original-title');
|
449
|
+
|
450
|
+
if (!title) {
|
451
|
+
title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
|
452
|
+
}
|
453
|
+
|
454
|
+
return title;
|
455
|
+
}; // Private
|
456
|
+
|
457
|
+
|
458
|
+
_proto._getContainer = function _getContainer() {
|
459
|
+
if (this.config.container === false) {
|
460
|
+
return document.body;
|
461
|
+
}
|
462
|
+
|
463
|
+
if (Util.isElement(this.config.container)) {
|
464
|
+
return $(this.config.container);
|
465
|
+
}
|
466
|
+
|
467
|
+
return $(document).find(this.config.container);
|
468
|
+
};
|
469
|
+
|
470
|
+
_proto._getAttachment = function _getAttachment(placement) {
|
471
|
+
return AttachmentMap[placement.toUpperCase()];
|
472
|
+
};
|
473
|
+
|
474
|
+
_proto._setListeners = function _setListeners() {
|
475
|
+
var _this3 = this;
|
476
|
+
|
477
|
+
var triggers = this.config.trigger.split(' ');
|
478
|
+
triggers.forEach(function (trigger) {
|
479
|
+
if (trigger === 'click') {
|
480
|
+
$(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) {
|
481
|
+
return _this3.toggle(event);
|
482
|
+
});
|
483
|
+
} else if (trigger !== Trigger.MANUAL) {
|
484
|
+
var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN;
|
485
|
+
var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT;
|
486
|
+
$(_this3.element).on(eventIn, _this3.config.selector, function (event) {
|
487
|
+
return _this3._enter(event);
|
488
|
+
}).on(eventOut, _this3.config.selector, function (event) {
|
489
|
+
return _this3._leave(event);
|
490
|
+
});
|
491
|
+
}
|
492
|
+
});
|
493
|
+
$(this.element).closest('.modal').on('hide.bs.modal', function () {
|
494
|
+
if (_this3.element) {
|
495
|
+
_this3.hide();
|
496
|
+
}
|
497
|
+
});
|
498
|
+
|
499
|
+
if (this.config.selector) {
|
500
|
+
this.config = _objectSpread({}, this.config, {
|
501
|
+
trigger: 'manual',
|
502
|
+
selector: ''
|
503
|
+
});
|
504
|
+
} else {
|
505
|
+
this._fixTitle();
|
506
|
+
}
|
507
|
+
};
|
508
|
+
|
509
|
+
_proto._fixTitle = function _fixTitle() {
|
510
|
+
var titleType = typeof this.element.getAttribute('data-original-title');
|
511
|
+
|
512
|
+
if (this.element.getAttribute('title') || titleType !== 'string') {
|
513
|
+
this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
|
514
|
+
this.element.setAttribute('title', '');
|
515
|
+
}
|
516
|
+
};
|
517
|
+
|
518
|
+
_proto._enter = function _enter(event, context) {
|
519
|
+
var dataKey = this.constructor.DATA_KEY;
|
520
|
+
context = context || $(event.currentTarget).data(dataKey);
|
521
|
+
|
522
|
+
if (!context) {
|
523
|
+
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
|
524
|
+
$(event.currentTarget).data(dataKey, context);
|
525
|
+
}
|
526
|
+
|
527
|
+
if (event) {
|
528
|
+
context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
|
529
|
+
}
|
530
|
+
|
531
|
+
if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
|
532
|
+
context._hoverState = HoverState.SHOW;
|
533
|
+
return;
|
534
|
+
}
|
535
|
+
|
536
|
+
clearTimeout(context._timeout);
|
537
|
+
context._hoverState = HoverState.SHOW;
|
538
|
+
|
539
|
+
if (!context.config.delay || !context.config.delay.show) {
|
540
|
+
context.show();
|
541
|
+
return;
|
542
|
+
}
|
543
|
+
|
544
|
+
context._timeout = setTimeout(function () {
|
545
|
+
if (context._hoverState === HoverState.SHOW) {
|
546
|
+
context.show();
|
547
|
+
}
|
548
|
+
}, context.config.delay.show);
|
549
|
+
};
|
550
|
+
|
551
|
+
_proto._leave = function _leave(event, context) {
|
552
|
+
var dataKey = this.constructor.DATA_KEY;
|
553
|
+
context = context || $(event.currentTarget).data(dataKey);
|
554
|
+
|
555
|
+
if (!context) {
|
556
|
+
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
|
557
|
+
$(event.currentTarget).data(dataKey, context);
|
558
|
+
}
|
559
|
+
|
560
|
+
if (event) {
|
561
|
+
context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
|
562
|
+
}
|
563
|
+
|
564
|
+
if (context._isWithActiveTrigger()) {
|
565
|
+
return;
|
566
|
+
}
|
567
|
+
|
568
|
+
clearTimeout(context._timeout);
|
569
|
+
context._hoverState = HoverState.OUT;
|
570
|
+
|
571
|
+
if (!context.config.delay || !context.config.delay.hide) {
|
572
|
+
context.hide();
|
573
|
+
return;
|
574
|
+
}
|
575
|
+
|
576
|
+
context._timeout = setTimeout(function () {
|
577
|
+
if (context._hoverState === HoverState.OUT) {
|
578
|
+
context.hide();
|
579
|
+
}
|
580
|
+
}, context.config.delay.hide);
|
581
|
+
};
|
582
|
+
|
583
|
+
_proto._isWithActiveTrigger = function _isWithActiveTrigger() {
|
584
|
+
for (var trigger in this._activeTrigger) {
|
585
|
+
if (this._activeTrigger[trigger]) {
|
586
|
+
return true;
|
587
|
+
}
|
588
|
+
}
|
589
|
+
|
590
|
+
return false;
|
591
|
+
};
|
592
|
+
|
593
|
+
_proto._getConfig = function _getConfig(config) {
|
594
|
+
config = _objectSpread({}, this.constructor.Default, $(this.element).data(), typeof config === 'object' && config ? config : {});
|
595
|
+
|
596
|
+
if (typeof config.delay === 'number') {
|
597
|
+
config.delay = {
|
598
|
+
show: config.delay,
|
599
|
+
hide: config.delay
|
600
|
+
};
|
601
|
+
}
|
602
|
+
|
603
|
+
if (typeof config.title === 'number') {
|
604
|
+
config.title = config.title.toString();
|
605
|
+
}
|
606
|
+
|
607
|
+
if (typeof config.content === 'number') {
|
608
|
+
config.content = config.content.toString();
|
609
|
+
}
|
610
|
+
|
611
|
+
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
612
|
+
return config;
|
613
|
+
};
|
614
|
+
|
615
|
+
_proto._getDelegateConfig = function _getDelegateConfig() {
|
616
|
+
var config = {};
|
617
|
+
|
618
|
+
if (this.config) {
|
619
|
+
for (var key in this.config) {
|
620
|
+
if (this.constructor.Default[key] !== this.config[key]) {
|
621
|
+
config[key] = this.config[key];
|
622
|
+
}
|
623
|
+
}
|
624
|
+
}
|
625
|
+
|
626
|
+
return config;
|
627
|
+
};
|
628
|
+
|
629
|
+
_proto._cleanTipClass = function _cleanTipClass() {
|
630
|
+
var $tip = $(this.getTipElement());
|
631
|
+
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
|
632
|
+
|
633
|
+
if (tabClass !== null && tabClass.length) {
|
634
|
+
$tip.removeClass(tabClass.join(''));
|
635
|
+
}
|
636
|
+
};
|
637
|
+
|
638
|
+
_proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
|
639
|
+
var popperInstance = popperData.instance;
|
640
|
+
this.tip = popperInstance.popper;
|
641
|
+
|
642
|
+
this._cleanTipClass();
|
643
|
+
|
644
|
+
this.addAttachmentClass(this._getAttachment(popperData.placement));
|
645
|
+
};
|
646
|
+
|
647
|
+
_proto._fixTransition = function _fixTransition() {
|
648
|
+
var tip = this.getTipElement();
|
649
|
+
var initConfigAnimation = this.config.animation;
|
650
|
+
|
651
|
+
if (tip.getAttribute('x-placement') !== null) {
|
652
|
+
return;
|
653
|
+
}
|
654
|
+
|
655
|
+
$(tip).removeClass(ClassName.FADE);
|
656
|
+
this.config.animation = false;
|
657
|
+
this.hide();
|
658
|
+
this.show();
|
659
|
+
this.config.animation = initConfigAnimation;
|
660
|
+
}; // Static
|
661
|
+
|
662
|
+
|
663
|
+
Tooltip._jQueryInterface = function _jQueryInterface(config) {
|
664
|
+
return this.each(function () {
|
665
|
+
var data = $(this).data(DATA_KEY);
|
666
|
+
|
667
|
+
var _config = typeof config === 'object' && config;
|
668
|
+
|
669
|
+
if (!data && /dispose|hide/.test(config)) {
|
670
|
+
return;
|
671
|
+
}
|
672
|
+
|
673
|
+
if (!data) {
|
674
|
+
data = new Tooltip(this, _config);
|
675
|
+
$(this).data(DATA_KEY, data);
|
676
|
+
}
|
677
|
+
|
678
|
+
if (typeof config === 'string') {
|
679
|
+
if (typeof data[config] === 'undefined') {
|
680
|
+
throw new TypeError("No method named \"" + config + "\"");
|
681
|
+
}
|
682
|
+
|
683
|
+
data[config]();
|
684
|
+
}
|
685
|
+
});
|
686
|
+
};
|
687
|
+
|
688
|
+
_createClass(Tooltip, null, [{
|
689
|
+
key: "VERSION",
|
690
|
+
get: function get() {
|
691
|
+
return VERSION;
|
692
|
+
}
|
693
|
+
}, {
|
694
|
+
key: "Default",
|
695
|
+
get: function get() {
|
696
|
+
return Default;
|
697
|
+
}
|
698
|
+
}, {
|
699
|
+
key: "NAME",
|
700
|
+
get: function get() {
|
701
|
+
return NAME;
|
702
|
+
}
|
703
|
+
}, {
|
704
|
+
key: "DATA_KEY",
|
705
|
+
get: function get() {
|
706
|
+
return DATA_KEY;
|
707
|
+
}
|
708
|
+
}, {
|
709
|
+
key: "Event",
|
710
|
+
get: function get() {
|
711
|
+
return Event;
|
712
|
+
}
|
713
|
+
}, {
|
714
|
+
key: "EVENT_KEY",
|
715
|
+
get: function get() {
|
716
|
+
return EVENT_KEY;
|
717
|
+
}
|
718
|
+
}, {
|
719
|
+
key: "DefaultType",
|
720
|
+
get: function get() {
|
721
|
+
return DefaultType;
|
722
|
+
}
|
723
|
+
}]);
|
724
|
+
|
725
|
+
return Tooltip;
|
726
|
+
}();
|
727
|
+
/**
|
728
|
+
* ------------------------------------------------------------------------
|
729
|
+
* jQuery
|
730
|
+
* ------------------------------------------------------------------------
|
731
|
+
*/
|
732
|
+
|
733
|
+
|
734
|
+
$.fn[NAME] = Tooltip._jQueryInterface;
|
735
|
+
$.fn[NAME].Constructor = Tooltip;
|
736
|
+
|
737
|
+
$.fn[NAME].noConflict = function () {
|
738
|
+
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
739
|
+
return Tooltip._jQueryInterface;
|
740
|
+
};
|
741
|
+
|
742
|
+
return Tooltip;
|
743
|
+
|
744
|
+
})));
|
745
|
+
//# sourceMappingURL=tooltip.js.map
|