bootstrap 4.6.2 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/README.md +7 -4
- data/assets/javascripts/bootstrap/alert.js +192 -115
- data/assets/javascripts/bootstrap/base-component.js +63 -0
- data/assets/javascripts/bootstrap/button.js +96 -179
- data/assets/javascripts/bootstrap/carousel.js +472 -359
- data/assets/javascripts/bootstrap/collapse.js +379 -225
- data/assets/javascripts/bootstrap/dom/data.js +68 -0
- data/assets/javascripts/bootstrap/dom/event-handler.js +322 -0
- data/assets/javascripts/bootstrap/dom/manipulator.js +88 -0
- data/assets/javascripts/bootstrap/dom/selector-engine.js +85 -0
- data/assets/javascripts/bootstrap/dropdown.js +472 -355
- data/assets/javascripts/bootstrap/modal.js +612 -438
- data/assets/javascripts/bootstrap/offcanvas.js +671 -0
- data/assets/javascripts/bootstrap/popover.js +138 -167
- data/assets/javascripts/bootstrap/scrollspy.js +250 -192
- data/assets/javascripts/bootstrap/tab.js +241 -144
- data/assets/javascripts/bootstrap/toast.js +223 -157
- data/assets/javascripts/bootstrap/tooltip.js +651 -487
- data/assets/javascripts/bootstrap-global-this-define.js +6 -0
- data/assets/javascripts/bootstrap-global-this-undefine.js +2 -0
- data/assets/javascripts/bootstrap-sprockets.js +8 -1
- data/assets/javascripts/bootstrap.js +3277 -2590
- data/assets/javascripts/bootstrap.min.js +3 -3
- data/assets/stylesheets/_bootstrap-grid.scss +53 -18
- data/assets/stylesheets/_bootstrap-reboot.scss +6 -3
- data/assets/stylesheets/_bootstrap.scss +18 -10
- data/assets/stylesheets/bootstrap/_accordion.scss +118 -0
- data/assets/stylesheets/bootstrap/_alert.scss +15 -10
- data/assets/stylesheets/bootstrap/_badge.scss +2 -27
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +3 -17
- data/assets/stylesheets/bootstrap/_button-group.scss +21 -45
- data/assets/stylesheets/bootstrap/_buttons.scss +29 -60
- data/assets/stylesheets/bootstrap/_card.scss +20 -91
- data/assets/stylesheets/bootstrap/_carousel.scss +64 -35
- data/assets/stylesheets/bootstrap/_close.scss +30 -30
- data/assets/stylesheets/bootstrap/_containers.scss +41 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +84 -36
- data/assets/stylesheets/bootstrap/_forms.scss +9 -347
- data/assets/stylesheets/bootstrap/_functions.scss +84 -69
- data/assets/stylesheets/bootstrap/_grid.scss +3 -54
- data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
- data/assets/stylesheets/bootstrap/_images.scss +1 -1
- data/assets/stylesheets/bootstrap/_list-group.scss +28 -8
- data/assets/stylesheets/bootstrap/_mixins.scss +8 -13
- data/assets/stylesheets/bootstrap/_modal.scss +45 -57
- data/assets/stylesheets/bootstrap/_nav.scss +20 -6
- data/assets/stylesheets/bootstrap/_navbar.scss +45 -71
- data/assets/stylesheets/bootstrap/_offcanvas.scss +77 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +10 -20
- data/assets/stylesheets/bootstrap/_popover.scss +24 -36
- data/assets/stylesheets/bootstrap/_progress.scss +5 -4
- data/assets/stylesheets/bootstrap/_reboot.scss +316 -179
- data/assets/stylesheets/bootstrap/_root.scss +5 -8
- data/assets/stylesheets/bootstrap/_spinners.scss +11 -7
- data/assets/stylesheets/bootstrap/_tables.scss +79 -114
- data/assets/stylesheets/bootstrap/_toasts.scss +20 -15
- data/assets/stylesheets/bootstrap/_tooltip.scss +21 -21
- data/assets/stylesheets/bootstrap/_transitions.scss +2 -7
- data/assets/stylesheets/bootstrap/_type.scss +38 -59
- data/assets/stylesheets/bootstrap/_utilities.scss +594 -18
- data/assets/stylesheets/bootstrap/_variables.scss +800 -485
- data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
- data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +61 -0
- data/assets/stylesheets/bootstrap/forms/_form-check.scss +152 -0
- data/assets/stylesheets/bootstrap/forms/_form-control.scss +219 -0
- data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
- data/assets/stylesheets/bootstrap/forms/_form-select.scss +67 -0
- data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
- data/assets/stylesheets/bootstrap/forms/_input-group.scss +121 -0
- data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
- data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
- data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
- data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
- data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
- data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
- data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
- data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_alert.scss +3 -5
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +10 -8
- data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +7 -9
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +14 -10
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +71 -48
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +10 -8
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
- data/assets/stylesheets/bootstrap/mixins/_color-scheme.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +39 -97
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +90 -34
- data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +5 -2
- data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +17 -8
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +3 -3
- data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_utilities.scss +68 -0
- data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +29 -0
- data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
- data/assets/stylesheets/bootstrap/vendor/_rfs.scss +214 -130
- data/bootstrap.gemspec +1 -3
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +19 -16
- data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
- data/test/dummy_rails/app/views/layouts/application.html.erb +3 -1
- data/test/dummy_rails/app/views/pages/root.html +89 -0
- data/test/dummy_rails/config/application.rb +0 -3
- data/test/gemfiles/rails_6_1.gemfile +7 -0
- metadata +45 -73
- data/assets/javascripts/bootstrap/util.js +0 -189
- data/assets/stylesheets/bootstrap/_code.scss +0 -48
- data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -526
- data/assets/stylesheets/bootstrap/_input-group.scss +0 -211
- data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
- data/assets/stylesheets/bootstrap/_media.scss +0 -8
- data/assets/stylesheets/bootstrap/_print.scss +0 -132
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -23
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
- data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -80
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -34
- data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -17
- data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
- data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
- data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
- data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
- data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
- data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
- data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
- data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
- data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
- data/assets/stylesheets/bootstrap/utilities/_interactions.scss +0 -5
- data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
- data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
- data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
- data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
- data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
- data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
- data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
- data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
- data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
- data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
- /data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
@@ -1,171 +1,184 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap popover.js
|
3
|
-
* Copyright 2011-
|
2
|
+
* Bootstrap popover.js v5.0.0 (https://getbootstrap.com/)
|
3
|
+
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
6
6
|
(function (global, factory) {
|
7
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('
|
8
|
-
typeof define === 'function' && define.amd ? define(['
|
9
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.
|
10
|
-
}
|
7
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/selector-engine.js'), require('./tooltip.js')) :
|
8
|
+
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/selector-engine', './tooltip'], factory) :
|
9
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.Data, global.SelectorEngine, global.Tooltip));
|
10
|
+
}(this, (function (Data, SelectorEngine, Tooltip) { 'use strict';
|
11
11
|
|
12
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
13
13
|
|
14
|
-
var
|
14
|
+
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
|
15
|
+
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
|
15
16
|
var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
|
16
17
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
24
|
-
}
|
25
|
-
}
|
18
|
+
/**
|
19
|
+
* --------------------------------------------------------------------------
|
20
|
+
* Bootstrap (v5.0.0): util/index.js
|
21
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
22
|
+
* --------------------------------------------------------------------------
|
23
|
+
*/
|
26
24
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
writable: false
|
32
|
-
});
|
33
|
-
return Constructor;
|
34
|
-
}
|
25
|
+
const getjQuery = () => {
|
26
|
+
const {
|
27
|
+
jQuery
|
28
|
+
} = window;
|
35
29
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
var source = arguments[i];
|
30
|
+
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
|
31
|
+
return jQuery;
|
32
|
+
}
|
40
33
|
|
41
|
-
|
42
|
-
|
43
|
-
target[key] = source[key];
|
44
|
-
}
|
45
|
-
}
|
46
|
-
}
|
34
|
+
return null;
|
35
|
+
};
|
47
36
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
37
|
+
const onDOMContentLoaded = callback => {
|
38
|
+
if (document.readyState === 'loading') {
|
39
|
+
document.addEventListener('DOMContentLoaded', callback);
|
40
|
+
} else {
|
41
|
+
callback();
|
42
|
+
}
|
43
|
+
};
|
52
44
|
|
53
|
-
|
54
|
-
|
55
|
-
|
45
|
+
const defineJQueryPlugin = (name, plugin) => {
|
46
|
+
onDOMContentLoaded(() => {
|
47
|
+
const $ = getjQuery();
|
48
|
+
/* istanbul ignore if */
|
56
49
|
|
57
|
-
|
58
|
-
|
50
|
+
if ($) {
|
51
|
+
const JQUERY_NO_CONFLICT = $.fn[name];
|
52
|
+
$.fn[name] = plugin.jQueryInterface;
|
53
|
+
$.fn[name].Constructor = plugin;
|
59
54
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
}
|
55
|
+
$.fn[name].noConflict = () => {
|
56
|
+
$.fn[name] = JQUERY_NO_CONFLICT;
|
57
|
+
return plugin.jQueryInterface;
|
58
|
+
};
|
59
|
+
}
|
60
|
+
});
|
61
|
+
};
|
67
62
|
|
68
63
|
/**
|
64
|
+
* --------------------------------------------------------------------------
|
65
|
+
* Bootstrap (v5.0.0): popover.js
|
66
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
67
|
+
* --------------------------------------------------------------------------
|
68
|
+
*/
|
69
|
+
/**
|
70
|
+
* ------------------------------------------------------------------------
|
69
71
|
* Constants
|
72
|
+
* ------------------------------------------------------------------------
|
70
73
|
*/
|
71
74
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
|
79
|
-
var CLASS_NAME_FADE = 'fade';
|
80
|
-
var CLASS_NAME_SHOW = 'show';
|
81
|
-
var SELECTOR_TITLE = '.popover-header';
|
82
|
-
var SELECTOR_CONTENT = '.popover-body';
|
83
|
-
|
84
|
-
var Default = _extends({}, Tooltip__default["default"].Default, {
|
75
|
+
const NAME = 'popover';
|
76
|
+
const DATA_KEY = 'bs.popover';
|
77
|
+
const EVENT_KEY = `.${DATA_KEY}`;
|
78
|
+
const CLASS_PREFIX = 'bs-popover';
|
79
|
+
const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g');
|
80
|
+
const Default = { ...Tooltip__default['default'].Default,
|
85
81
|
placement: 'right',
|
82
|
+
offset: [0, 8],
|
86
83
|
trigger: 'click',
|
87
84
|
content: '',
|
88
|
-
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div
|
89
|
-
}
|
90
|
-
|
91
|
-
var DefaultType = _extends({}, Tooltip__default["default"].DefaultType, {
|
85
|
+
template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>'
|
86
|
+
};
|
87
|
+
const DefaultType = { ...Tooltip__default['default'].DefaultType,
|
92
88
|
content: '(string|element|function)'
|
93
|
-
});
|
94
|
-
|
95
|
-
var Event = {
|
96
|
-
HIDE: "hide" + EVENT_KEY,
|
97
|
-
HIDDEN: "hidden" + EVENT_KEY,
|
98
|
-
SHOW: "show" + EVENT_KEY,
|
99
|
-
SHOWN: "shown" + EVENT_KEY,
|
100
|
-
INSERTED: "inserted" + EVENT_KEY,
|
101
|
-
CLICK: "click" + EVENT_KEY,
|
102
|
-
FOCUSIN: "focusin" + EVENT_KEY,
|
103
|
-
FOCUSOUT: "focusout" + EVENT_KEY,
|
104
|
-
MOUSEENTER: "mouseenter" + EVENT_KEY,
|
105
|
-
MOUSELEAVE: "mouseleave" + EVENT_KEY
|
106
89
|
};
|
90
|
+
const Event = {
|
91
|
+
HIDE: `hide${EVENT_KEY}`,
|
92
|
+
HIDDEN: `hidden${EVENT_KEY}`,
|
93
|
+
SHOW: `show${EVENT_KEY}`,
|
94
|
+
SHOWN: `shown${EVENT_KEY}`,
|
95
|
+
INSERTED: `inserted${EVENT_KEY}`,
|
96
|
+
CLICK: `click${EVENT_KEY}`,
|
97
|
+
FOCUSIN: `focusin${EVENT_KEY}`,
|
98
|
+
FOCUSOUT: `focusout${EVENT_KEY}`,
|
99
|
+
MOUSEENTER: `mouseenter${EVENT_KEY}`,
|
100
|
+
MOUSELEAVE: `mouseleave${EVENT_KEY}`
|
101
|
+
};
|
102
|
+
const CLASS_NAME_FADE = 'fade';
|
103
|
+
const CLASS_NAME_SHOW = 'show';
|
104
|
+
const SELECTOR_TITLE = '.popover-header';
|
105
|
+
const SELECTOR_CONTENT = '.popover-body';
|
107
106
|
/**
|
108
|
-
*
|
107
|
+
* ------------------------------------------------------------------------
|
108
|
+
* Class Definition
|
109
|
+
* ------------------------------------------------------------------------
|
109
110
|
*/
|
110
111
|
|
111
|
-
|
112
|
-
|
112
|
+
class Popover extends Tooltip__default['default'] {
|
113
|
+
// Getters
|
114
|
+
static get Default() {
|
115
|
+
return Default;
|
116
|
+
}
|
117
|
+
|
118
|
+
static get NAME() {
|
119
|
+
return NAME;
|
120
|
+
}
|
113
121
|
|
114
|
-
|
115
|
-
return
|
122
|
+
static get DATA_KEY() {
|
123
|
+
return DATA_KEY;
|
116
124
|
}
|
117
125
|
|
118
|
-
|
126
|
+
static get Event() {
|
127
|
+
return Event;
|
128
|
+
}
|
119
129
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
};
|
130
|
+
static get EVENT_KEY() {
|
131
|
+
return EVENT_KEY;
|
132
|
+
}
|
124
133
|
|
125
|
-
|
126
|
-
|
127
|
-
}
|
134
|
+
static get DefaultType() {
|
135
|
+
return DefaultType;
|
136
|
+
} // Overrides
|
128
137
|
|
129
|
-
_proto.getTipElement = function getTipElement() {
|
130
|
-
this.tip = this.tip || $__default["default"](this.config.template)[0];
|
131
|
-
return this.tip;
|
132
|
-
};
|
133
138
|
|
134
|
-
|
135
|
-
|
139
|
+
isWithContent() {
|
140
|
+
return this.getTitle() || this._getContent();
|
141
|
+
}
|
136
142
|
|
137
|
-
|
143
|
+
setContent() {
|
144
|
+
const tip = this.getTipElement(); // we use append for html objects to maintain js events
|
138
145
|
|
139
|
-
|
146
|
+
this.setElementContent(SelectorEngine__default['default'].findOne(SELECTOR_TITLE, tip), this.getTitle());
|
147
|
+
|
148
|
+
let content = this._getContent();
|
140
149
|
|
141
150
|
if (typeof content === 'function') {
|
142
|
-
content = content.call(this.
|
151
|
+
content = content.call(this._element);
|
143
152
|
}
|
144
153
|
|
145
|
-
this.setElementContent(
|
146
|
-
|
154
|
+
this.setElementContent(SelectorEngine__default['default'].findOne(SELECTOR_CONTENT, tip), content);
|
155
|
+
tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW);
|
147
156
|
} // Private
|
148
|
-
;
|
149
157
|
|
150
|
-
_proto._getContent = function _getContent() {
|
151
|
-
return this.element.getAttribute('data-content') || this.config.content;
|
152
|
-
};
|
153
158
|
|
154
|
-
|
155
|
-
|
156
|
-
|
159
|
+
_addAttachmentClass(attachment) {
|
160
|
+
this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`);
|
161
|
+
}
|
162
|
+
|
163
|
+
_getContent() {
|
164
|
+
return this._element.getAttribute('data-bs-content') || this.config.content;
|
165
|
+
}
|
166
|
+
|
167
|
+
_cleanTipClass() {
|
168
|
+
const tip = this.getTipElement();
|
169
|
+
const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
|
157
170
|
|
158
171
|
if (tabClass !== null && tabClass.length > 0) {
|
159
|
-
|
172
|
+
tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
|
160
173
|
}
|
161
174
|
} // Static
|
162
|
-
;
|
163
175
|
|
164
|
-
|
176
|
+
|
177
|
+
static jQueryInterface(config) {
|
165
178
|
return this.each(function () {
|
166
|
-
|
179
|
+
let data = Data__default['default'].get(this, DATA_KEY);
|
167
180
|
|
168
|
-
|
181
|
+
const _config = typeof config === 'object' ? config : null;
|
169
182
|
|
170
183
|
if (!data && /dispose|hide/.test(config)) {
|
171
184
|
return;
|
@@ -173,72 +186,30 @@
|
|
173
186
|
|
174
187
|
if (!data) {
|
175
188
|
data = new Popover(this, _config);
|
176
|
-
|
189
|
+
Data__default['default'].set(this, DATA_KEY, data);
|
177
190
|
}
|
178
191
|
|
179
192
|
if (typeof config === 'string') {
|
180
193
|
if (typeof data[config] === 'undefined') {
|
181
|
-
throw new TypeError(
|
194
|
+
throw new TypeError(`No method named "${config}"`);
|
182
195
|
}
|
183
196
|
|
184
197
|
data[config]();
|
185
198
|
}
|
186
199
|
});
|
187
|
-
}
|
188
|
-
|
189
|
-
_createClass(Popover, null, [{
|
190
|
-
key: "VERSION",
|
191
|
-
get: // Getters
|
192
|
-
function get() {
|
193
|
-
return VERSION;
|
194
|
-
}
|
195
|
-
}, {
|
196
|
-
key: "Default",
|
197
|
-
get: function get() {
|
198
|
-
return Default;
|
199
|
-
}
|
200
|
-
}, {
|
201
|
-
key: "NAME",
|
202
|
-
get: function get() {
|
203
|
-
return NAME;
|
204
|
-
}
|
205
|
-
}, {
|
206
|
-
key: "DATA_KEY",
|
207
|
-
get: function get() {
|
208
|
-
return DATA_KEY;
|
209
|
-
}
|
210
|
-
}, {
|
211
|
-
key: "Event",
|
212
|
-
get: function get() {
|
213
|
-
return Event;
|
214
|
-
}
|
215
|
-
}, {
|
216
|
-
key: "EVENT_KEY",
|
217
|
-
get: function get() {
|
218
|
-
return EVENT_KEY;
|
219
|
-
}
|
220
|
-
}, {
|
221
|
-
key: "DefaultType",
|
222
|
-
get: function get() {
|
223
|
-
return DefaultType;
|
224
|
-
}
|
225
|
-
}]);
|
200
|
+
}
|
226
201
|
|
227
|
-
|
228
|
-
}(Tooltip__default["default"]);
|
202
|
+
}
|
229
203
|
/**
|
204
|
+
* ------------------------------------------------------------------------
|
230
205
|
* jQuery
|
206
|
+
* ------------------------------------------------------------------------
|
207
|
+
* add .Popover to jQuery only if jQuery is present
|
231
208
|
*/
|
232
209
|
|
233
210
|
|
234
|
-
|
235
|
-
$__default["default"].fn[NAME].Constructor = Popover;
|
236
|
-
|
237
|
-
$__default["default"].fn[NAME].noConflict = function () {
|
238
|
-
$__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
|
239
|
-
return Popover._jQueryInterface;
|
240
|
-
};
|
211
|
+
defineJQueryPlugin(NAME, Popover);
|
241
212
|
|
242
213
|
return Popover;
|
243
214
|
|
244
|
-
}));
|
215
|
+
})));
|