bootstrap 5.0.0.alpha1 → 5.0.0.alpha2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/README.md +1 -1
  4. data/assets/javascripts/bootstrap-sprockets.js +6 -6
  5. data/assets/javascripts/bootstrap.js +142 -155
  6. data/assets/javascripts/bootstrap.min.js +2 -2
  7. data/assets/javascripts/bootstrap/alert.js +17 -19
  8. data/assets/javascripts/bootstrap/button.js +14 -12
  9. data/assets/javascripts/bootstrap/carousel.js +47 -49
  10. data/assets/javascripts/bootstrap/collapse.js +50 -55
  11. data/assets/javascripts/bootstrap/dom/data.js +11 -11
  12. data/assets/javascripts/bootstrap/dom/event-handler.js +9 -5
  13. data/assets/javascripts/bootstrap/dom/manipulator.js +5 -9
  14. data/assets/javascripts/bootstrap/dom/polyfill.js +3 -3
  15. data/assets/javascripts/bootstrap/dom/selector-engine.js +3 -3
  16. data/assets/javascripts/bootstrap/dropdown.js +46 -48
  17. data/assets/javascripts/bootstrap/modal.js +77 -65
  18. data/assets/javascripts/bootstrap/popover.js +21 -23
  19. data/assets/javascripts/bootstrap/scrollspy.js +33 -39
  20. data/assets/javascripts/bootstrap/tab.js +24 -22
  21. data/assets/javascripts/bootstrap/toast.js +32 -28
  22. data/assets/javascripts/bootstrap/tooltip.js +67 -66
  23. data/assets/stylesheets/_bootstrap-grid.scss +2 -2
  24. data/assets/stylesheets/_bootstrap-reboot.scss +1 -1
  25. data/assets/stylesheets/_bootstrap.scss +1 -1
  26. data/assets/stylesheets/bootstrap/_alert.scss +3 -4
  27. data/assets/stylesheets/bootstrap/_card.scss +6 -4
  28. data/assets/stylesheets/bootstrap/_carousel.scss +17 -0
  29. data/assets/stylesheets/bootstrap/_close.scss +25 -20
  30. data/assets/stylesheets/bootstrap/_dropdown.scss +42 -1
  31. data/assets/stylesheets/bootstrap/_functions.scss +4 -1
  32. data/assets/stylesheets/bootstrap/_helpers.scss +2 -2
  33. data/assets/stylesheets/bootstrap/_list-group.scss +1 -1
  34. data/assets/stylesheets/bootstrap/_mixins.scss +1 -1
  35. data/assets/stylesheets/bootstrap/_modal.scss +7 -7
  36. data/assets/stylesheets/bootstrap/_nav.scss +4 -0
  37. data/assets/stylesheets/bootstrap/_navbar.scss +1 -0
  38. data/assets/stylesheets/bootstrap/_pagination.scss +3 -0
  39. data/assets/stylesheets/bootstrap/_reboot.scss +7 -6
  40. data/assets/stylesheets/bootstrap/_spinners.scss +2 -2
  41. data/assets/stylesheets/bootstrap/_tables.scss +1 -1
  42. data/assets/stylesheets/bootstrap/_toasts.scss +6 -2
  43. data/assets/stylesheets/bootstrap/_utilities.scss +29 -1
  44. data/assets/stylesheets/bootstrap/_variables.scss +92 -44
  45. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +1 -1
  46. data/assets/stylesheets/bootstrap/forms/_form-check.scss +1 -1
  47. data/assets/stylesheets/bootstrap/forms/_input-group.scss +2 -2
  48. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +1 -1
  49. data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
  50. data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +8 -0
  51. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +9 -9
  52. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +7 -9
  53. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +4 -3
  54. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +11 -8
  55. data/assets/stylesheets/bootstrap/mixins/_container.scss +5 -3
  56. data/assets/stylesheets/bootstrap/mixins/_grid.scss +6 -7
  57. data/assets/stylesheets/bootstrap/mixins/_transition.scss +1 -1
  58. data/assets/stylesheets/bootstrap/mixins/{_screen-reader.scss → _visually-hidden.scss} +5 -5
  59. data/lib/bootstrap/version.rb +2 -2
  60. metadata +5 -5
  61. data/assets/stylesheets/bootstrap/helpers/_embed.scss +0 -31
  62. data/assets/stylesheets/bootstrap/helpers/_screenreaders.scss +0 -8
@@ -1,21 +1,23 @@
1
1
  /*!
2
- * Bootstrap toast.js v5.0.0-alpha1 (https://getbootstrap.com/)
2
+ * Bootstrap toast.js v5.0.0-alpha2 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2020 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
7
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js')) :
8
8
  typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js'], factory) :
9
- (global = global || self, global.Toast = factory(global.Data, global.EventHandler, global.Manipulator));
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Toast = factory(global.Data, global.EventHandler, global.Manipulator));
10
10
  }(this, (function (Data, EventHandler, Manipulator) { 'use strict';
11
11
 
12
- Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
13
- EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
14
- Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
12
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
+
14
+ var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
15
+ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
16
+ var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
15
17
 
16
18
  /**
17
19
  * --------------------------------------------------------------------------
18
- * Bootstrap (v5.0.0-alpha1): util/index.js
20
+ * Bootstrap (v5.0.0-alpha2): util/index.js
19
21
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
20
22
  * --------------------------------------------------------------------------
21
23
  */
@@ -106,11 +108,7 @@
106
108
  return null;
107
109
  };
108
110
 
109
- 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; }
110
-
111
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
112
-
113
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
111
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
114
112
 
115
113
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
116
114
 
@@ -122,7 +120,7 @@
122
120
  */
123
121
 
124
122
  var NAME = 'toast';
125
- var VERSION = '5.0.0-alpha1';
123
+ var VERSION = '5.0.0-alpha2';
126
124
  var DATA_KEY = 'bs.toast';
127
125
  var EVENT_KEY = "." + DATA_KEY;
128
126
  var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
@@ -142,7 +140,7 @@
142
140
  var Default = {
143
141
  animation: true,
144
142
  autohide: true,
145
- delay: 500
143
+ delay: 5000
146
144
  };
147
145
  var SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]';
148
146
  /**
@@ -159,7 +157,7 @@
159
157
 
160
158
  this._setListeners();
161
159
 
162
- Data.setData(element, DATA_KEY, this);
160
+ Data__default['default'].setData(element, DATA_KEY, this);
163
161
  } // Getters
164
162
 
165
163
 
@@ -169,12 +167,14 @@
169
167
  _proto.show = function show() {
170
168
  var _this = this;
171
169
 
172
- var showEvent = EventHandler.trigger(this._element, EVENT_SHOW);
170
+ var showEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW);
173
171
 
174
172
  if (showEvent.defaultPrevented) {
175
173
  return;
176
174
  }
177
175
 
176
+ this._clearTimeout();
177
+
178
178
  if (this._config.animation) {
179
179
  this._element.classList.add(CLASS_NAME_FADE);
180
180
  }
@@ -184,7 +184,7 @@
184
184
 
185
185
  _this._element.classList.add(CLASS_NAME_SHOW);
186
186
 
187
- EventHandler.trigger(_this._element, EVENT_SHOWN);
187
+ EventHandler__default['default'].trigger(_this._element, EVENT_SHOWN);
188
188
 
189
189
  if (_this._config.autohide) {
190
190
  _this._timeout = setTimeout(function () {
@@ -201,7 +201,7 @@
201
201
 
202
202
  if (this._config.animation) {
203
203
  var transitionDuration = getTransitionDurationFromElement(this._element);
204
- EventHandler.one(this._element, TRANSITION_END, complete);
204
+ EventHandler__default['default'].one(this._element, TRANSITION_END, complete);
205
205
  emulateTransitionEnd(this._element, transitionDuration);
206
206
  } else {
207
207
  complete();
@@ -215,7 +215,7 @@
215
215
  return;
216
216
  }
217
217
 
218
- var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);
218
+ var hideEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE);
219
219
 
220
220
  if (hideEvent.defaultPrevented) {
221
221
  return;
@@ -224,14 +224,14 @@
224
224
  var complete = function complete() {
225
225
  _this2._element.classList.add(CLASS_NAME_HIDE);
226
226
 
227
- EventHandler.trigger(_this2._element, EVENT_HIDDEN);
227
+ EventHandler__default['default'].trigger(_this2._element, EVENT_HIDDEN);
228
228
  };
229
229
 
230
230
  this._element.classList.remove(CLASS_NAME_SHOW);
231
231
 
232
232
  if (this._config.animation) {
233
233
  var transitionDuration = getTransitionDurationFromElement(this._element);
234
- EventHandler.one(this._element, TRANSITION_END, complete);
234
+ EventHandler__default['default'].one(this._element, TRANSITION_END, complete);
235
235
  emulateTransitionEnd(this._element, transitionDuration);
236
236
  } else {
237
237
  complete();
@@ -239,22 +239,21 @@
239
239
  };
240
240
 
241
241
  _proto.dispose = function dispose() {
242
- clearTimeout(this._timeout);
243
- this._timeout = null;
242
+ this._clearTimeout();
244
243
 
245
244
  if (this._element.classList.contains(CLASS_NAME_SHOW)) {
246
245
  this._element.classList.remove(CLASS_NAME_SHOW);
247
246
  }
248
247
 
249
- EventHandler.off(this._element, EVENT_CLICK_DISMISS);
250
- Data.removeData(this._element, DATA_KEY);
248
+ EventHandler__default['default'].off(this._element, EVENT_CLICK_DISMISS);
249
+ Data__default['default'].removeData(this._element, DATA_KEY);
251
250
  this._element = null;
252
251
  this._config = null;
253
252
  } // Private
254
253
  ;
255
254
 
256
255
  _proto._getConfig = function _getConfig(config) {
257
- config = _objectSpread(_objectSpread(_objectSpread({}, Default), Manipulator.getDataAttributes(this._element)), typeof config === 'object' && config ? config : {});
256
+ config = _extends({}, Default, Manipulator__default['default'].getDataAttributes(this._element), typeof config === 'object' && config ? config : {});
258
257
  typeCheckConfig(NAME, config, this.constructor.DefaultType);
259
258
  return config;
260
259
  };
@@ -262,15 +261,20 @@
262
261
  _proto._setListeners = function _setListeners() {
263
262
  var _this3 = this;
264
263
 
265
- EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () {
264
+ EventHandler__default['default'].on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () {
266
265
  return _this3.hide();
267
266
  });
267
+ };
268
+
269
+ _proto._clearTimeout = function _clearTimeout() {
270
+ clearTimeout(this._timeout);
271
+ this._timeout = null;
268
272
  } // Static
269
273
  ;
270
274
 
271
275
  Toast.jQueryInterface = function jQueryInterface(config) {
272
276
  return this.each(function () {
273
- var data = Data.getData(this, DATA_KEY);
277
+ var data = Data__default['default'].getData(this, DATA_KEY);
274
278
 
275
279
  var _config = typeof config === 'object' && config;
276
280
 
@@ -289,7 +293,7 @@
289
293
  };
290
294
 
291
295
  Toast.getInstance = function getInstance(element) {
292
- return Data.getData(element, DATA_KEY);
296
+ return Data__default['default'].getData(element, DATA_KEY);
293
297
  };
294
298
 
295
299
  _createClass(Toast, null, [{
@@ -1,23 +1,25 @@
1
1
  /*!
2
- * Bootstrap tooltip.js v5.0.0-alpha1 (https://getbootstrap.com/)
2
+ * Bootstrap tooltip.js v5.0.0-alpha2 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2020 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
7
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('popper.js'), require('./dom/selector-engine.js')) :
8
8
  typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js', 'popper.js', './dom/selector-engine.js'], factory) :
9
- (global = global || self, global.Tooltip = factory(global.Data, global.EventHandler, global.Manipulator, global.Popper, global.SelectorEngine));
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global.Data, global.EventHandler, global.Manipulator, global.Popper, global.SelectorEngine));
10
10
  }(this, (function (Data, EventHandler, Manipulator, Popper, SelectorEngine) { 'use strict';
11
11
 
12
- Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
13
- EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
14
- Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
15
- Popper = Popper && Object.prototype.hasOwnProperty.call(Popper, 'default') ? Popper['default'] : Popper;
16
- SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
12
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
+
14
+ var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
15
+ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
16
+ var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
17
+ var Popper__default = /*#__PURE__*/_interopDefaultLegacy(Popper);
18
+ var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
17
19
 
18
20
  /**
19
21
  * --------------------------------------------------------------------------
20
- * Bootstrap (v5.0.0-alpha1): util/index.js
22
+ * Bootstrap (v5.0.0-alpha2): util/index.js
21
23
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
22
24
  * --------------------------------------------------------------------------
23
25
  */
@@ -148,7 +150,7 @@
148
150
 
149
151
  /**
150
152
  * --------------------------------------------------------------------------
151
- * Bootstrap (v5.0.0-alpha1): util/sanitizer.js
153
+ * Bootstrap (v5.0.0-alpha2): util/sanitizer.js
152
154
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
153
155
  * --------------------------------------------------------------------------
154
156
  */
@@ -193,7 +195,7 @@
193
195
  return false;
194
196
  };
195
197
 
196
- var DefaultWhitelist = {
198
+ var DefaultAllowlist = {
197
199
  // Global attributes allowed on any supplied element below.
198
200
  '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
199
201
  a: ['target', 'href', 'title', 'rel'],
@@ -226,7 +228,7 @@
226
228
  u: [],
227
229
  ul: []
228
230
  };
229
- function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
231
+ function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {
230
232
  var _ref;
231
233
 
232
234
  if (!unsafeHtml.length) {
@@ -239,7 +241,7 @@
239
241
 
240
242
  var domParser = new window.DOMParser();
241
243
  var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
242
- var whitelistKeys = Object.keys(whiteList);
244
+ var allowlistKeys = Object.keys(allowList);
243
245
 
244
246
  var elements = (_ref = []).concat.apply(_ref, createdDocument.body.querySelectorAll('*'));
245
247
 
@@ -249,16 +251,16 @@
249
251
  var el = elements[i];
250
252
  var elName = el.nodeName.toLowerCase();
251
253
 
252
- if (whitelistKeys.indexOf(elName) === -1) {
254
+ if (allowlistKeys.indexOf(elName) === -1) {
253
255
  el.parentNode.removeChild(el);
254
256
  return "continue";
255
257
  }
256
258
 
257
259
  var attributeList = (_ref2 = []).concat.apply(_ref2, el.attributes);
258
260
 
259
- var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
261
+ var allowedAttributes = [].concat(allowList['*'] || [], allowList[elName] || []);
260
262
  attributeList.forEach(function (attr) {
261
- if (!allowedAttribute(attr, whitelistedAttributes)) {
263
+ if (!allowedAttribute(attr, allowedAttributes)) {
262
264
  el.removeAttribute(attr.nodeName);
263
265
  }
264
266
  });
@@ -273,11 +275,7 @@
273
275
  return createdDocument.body.innerHTML;
274
276
  }
275
277
 
276
- 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; }
277
-
278
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
279
-
280
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
278
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
281
279
 
282
280
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
283
281
 
@@ -289,12 +287,12 @@
289
287
  */
290
288
 
291
289
  var NAME = 'tooltip';
292
- var VERSION = '5.0.0-alpha1';
290
+ var VERSION = '5.0.0-alpha2';
293
291
  var DATA_KEY = 'bs.tooltip';
294
292
  var EVENT_KEY = "." + DATA_KEY;
295
293
  var CLASS_PREFIX = 'bs-tooltip';
296
294
  var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
297
- var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
295
+ var DISALLOWED_ATTRIBUTES = ['sanitize', 'allowList', 'sanitizeFn'];
298
296
  var DefaultType = {
299
297
  animation: 'boolean',
300
298
  template: 'string',
@@ -310,7 +308,7 @@
310
308
  boundary: '(string|element)',
311
309
  sanitize: 'boolean',
312
310
  sanitizeFn: '(null|function)',
313
- whiteList: 'object',
311
+ allowList: 'object',
314
312
  popperConfig: '(null|object)'
315
313
  };
316
314
  var AttachmentMap = {
@@ -335,7 +333,7 @@
335
333
  boundary: 'scrollParent',
336
334
  sanitize: true,
337
335
  sanitizeFn: null,
338
- whiteList: DefaultWhitelist,
336
+ allowList: DefaultAllowlist,
339
337
  popperConfig: null
340
338
  };
341
339
  var Event$1 = {
@@ -368,7 +366,7 @@
368
366
 
369
367
  var Tooltip = /*#__PURE__*/function () {
370
368
  function Tooltip(element, config) {
371
- if (typeof Popper === 'undefined') {
369
+ if (typeof Popper__default['default'] === 'undefined') {
372
370
  throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org)');
373
371
  } // private
374
372
 
@@ -385,7 +383,7 @@
385
383
 
386
384
  this._setListeners();
387
385
 
388
- Data.setData(element, this.constructor.DATA_KEY, this);
386
+ Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
389
387
  } // Getters
390
388
 
391
389
 
@@ -411,11 +409,11 @@
411
409
 
412
410
  if (event) {
413
411
  var dataKey = this.constructor.DATA_KEY;
414
- var context = Data.getData(event.target, dataKey);
412
+ var context = Data__default['default'].getData(event.delegateTarget, dataKey);
415
413
 
416
414
  if (!context) {
417
- context = new this.constructor(event.target, this._getDelegateConfig());
418
- Data.setData(event.target, dataKey, context);
415
+ context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
416
+ Data__default['default'].setData(event.delegateTarget, dataKey, context);
419
417
  }
420
418
 
421
419
  context._activeTrigger.click = !context._activeTrigger.click;
@@ -438,9 +436,9 @@
438
436
 
439
437
  _proto.dispose = function dispose() {
440
438
  clearTimeout(this._timeout);
441
- Data.removeData(this.element, this.constructor.DATA_KEY);
442
- EventHandler.off(this.element, this.constructor.EVENT_KEY);
443
- EventHandler.off(this.element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);
439
+ Data__default['default'].removeData(this.element, this.constructor.DATA_KEY);
440
+ EventHandler__default['default'].off(this.element, this.constructor.EVENT_KEY);
441
+ EventHandler__default['default'].off(this.element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);
444
442
 
445
443
  if (this.tip) {
446
444
  this.tip.parentNode.removeChild(this.tip);
@@ -469,7 +467,7 @@
469
467
  }
470
468
 
471
469
  if (this.isWithContent() && this._isEnabled) {
472
- var showEvent = EventHandler.trigger(this.element, this.constructor.Event.SHOW);
470
+ var showEvent = EventHandler__default['default'].trigger(this.element, this.constructor.Event.SHOW);
473
471
  var shadowRoot = findShadowRoot(this.element);
474
472
  var isInTheDom = shadowRoot === null ? this.element.ownerDocument.documentElement.contains(this.element) : shadowRoot.contains(this.element);
475
473
 
@@ -495,14 +493,14 @@
495
493
 
496
494
  var container = this._getContainer();
497
495
 
498
- Data.setData(tip, this.constructor.DATA_KEY, this);
496
+ Data__default['default'].setData(tip, this.constructor.DATA_KEY, this);
499
497
 
500
498
  if (!this.element.ownerDocument.documentElement.contains(this.tip)) {
501
499
  container.appendChild(tip);
502
500
  }
503
501
 
504
- EventHandler.trigger(this.element, this.constructor.Event.INSERTED);
505
- this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment));
502
+ EventHandler__default['default'].trigger(this.element, this.constructor.Event.INSERTED);
503
+ this._popper = new Popper__default['default'](this.element, tip, this._getPopperConfig(attachment));
506
504
  tip.classList.add(CLASS_NAME_SHOW); // If this is a touch-enabled device we add extra
507
505
  // empty mouseover listeners to the body's immediate children;
508
506
  // only needed because of broken event delegation on iOS
@@ -512,7 +510,7 @@
512
510
  var _ref;
513
511
 
514
512
  (_ref = []).concat.apply(_ref, document.body.children).forEach(function (element) {
515
- EventHandler.on(element, 'mouseover', noop());
513
+ EventHandler__default['default'].on(element, 'mouseover', noop());
516
514
  });
517
515
  }
518
516
 
@@ -523,7 +521,7 @@
523
521
 
524
522
  var prevHoverState = _this._hoverState;
525
523
  _this._hoverState = null;
526
- EventHandler.trigger(_this.element, _this.constructor.Event.SHOWN);
524
+ EventHandler__default['default'].trigger(_this.element, _this.constructor.Event.SHOWN);
527
525
 
528
526
  if (prevHoverState === HOVER_STATE_OUT) {
529
527
  _this._leave(null, _this);
@@ -532,7 +530,7 @@
532
530
 
533
531
  if (this.tip.classList.contains(CLASS_NAME_FADE)) {
534
532
  var transitionDuration = getTransitionDurationFromElement(this.tip);
535
- EventHandler.one(this.tip, TRANSITION_END, complete);
533
+ EventHandler__default['default'].one(this.tip, TRANSITION_END, complete);
536
534
  emulateTransitionEnd(this.tip, transitionDuration);
537
535
  } else {
538
536
  complete();
@@ -543,6 +541,10 @@
543
541
  _proto.hide = function hide() {
544
542
  var _this2 = this;
545
543
 
544
+ if (!this._popper) {
545
+ return;
546
+ }
547
+
546
548
  var tip = this.getTipElement();
547
549
 
548
550
  var complete = function complete() {
@@ -554,12 +556,12 @@
554
556
 
555
557
  _this2.element.removeAttribute('aria-describedby');
556
558
 
557
- EventHandler.trigger(_this2.element, _this2.constructor.Event.HIDDEN);
559
+ EventHandler__default['default'].trigger(_this2.element, _this2.constructor.Event.HIDDEN);
558
560
 
559
561
  _this2._popper.destroy();
560
562
  };
561
563
 
562
- var hideEvent = EventHandler.trigger(this.element, this.constructor.Event.HIDE);
564
+ var hideEvent = EventHandler__default['default'].trigger(this.element, this.constructor.Event.HIDE);
563
565
 
564
566
  if (hideEvent.defaultPrevented) {
565
567
  return;
@@ -572,7 +574,7 @@
572
574
  var _ref2;
573
575
 
574
576
  (_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (element) {
575
- return EventHandler.off(element, 'mouseover', noop);
577
+ return EventHandler__default['default'].off(element, 'mouseover', noop);
576
578
  });
577
579
  }
578
580
 
@@ -582,7 +584,7 @@
582
584
 
583
585
  if (this.tip.classList.contains(CLASS_NAME_FADE)) {
584
586
  var transitionDuration = getTransitionDurationFromElement(tip);
585
- EventHandler.one(tip, TRANSITION_END, complete);
587
+ EventHandler__default['default'].one(tip, TRANSITION_END, complete);
586
588
  emulateTransitionEnd(tip, transitionDuration);
587
589
  } else {
588
590
  complete();
@@ -615,7 +617,7 @@
615
617
 
616
618
  _proto.setContent = function setContent() {
617
619
  var tip = this.getTipElement();
618
- this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle());
620
+ this.setElementContent(SelectorEngine__default['default'].findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle());
619
621
  tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW);
620
622
  };
621
623
 
@@ -644,7 +646,7 @@
644
646
 
645
647
  if (this.config.html) {
646
648
  if (this.config.sanitize) {
647
- content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
649
+ content = sanitizeHtml(content, this.config.allowList, this.config.sanitizeFn);
648
650
  }
649
651
 
650
652
  element.innerHTML = content;
@@ -690,7 +692,7 @@
690
692
  return _this3._handlePopperPlacementChange(data);
691
693
  }
692
694
  };
693
- return _objectSpread(_objectSpread({}, defaultBsConfig), this.config.popperConfig);
695
+ return _extends({}, defaultBsConfig, this.config.popperConfig);
694
696
  };
695
697
 
696
698
  _proto._addAttachmentClass = function _addAttachmentClass(attachment) {
@@ -704,7 +706,7 @@
704
706
 
705
707
  if (typeof this.config.offset === 'function') {
706
708
  offset.fn = function (data) {
707
- data.offsets = _objectSpread(_objectSpread({}, data.offsets), _this4.config.offset(data.offsets, _this4.element) || {});
709
+ data.offsets = _extends({}, data.offsets, _this4.config.offset(data.offsets, _this4.element) || {});
708
710
  return data;
709
711
  };
710
712
  } else {
@@ -723,7 +725,7 @@
723
725
  return this.config.container;
724
726
  }
725
727
 
726
- return SelectorEngine.findOne(this.config.container);
728
+ return SelectorEngine__default['default'].findOne(this.config.container);
727
729
  };
728
730
 
729
731
  _proto._getAttachment = function _getAttachment(placement) {
@@ -736,16 +738,16 @@
736
738
  var triggers = this.config.trigger.split(' ');
737
739
  triggers.forEach(function (trigger) {
738
740
  if (trigger === 'click') {
739
- EventHandler.on(_this5.element, _this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
741
+ EventHandler__default['default'].on(_this5.element, _this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
740
742
  return _this5.toggle(event);
741
743
  });
742
744
  } else if (trigger !== TRIGGER_MANUAL) {
743
745
  var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
744
746
  var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
745
- EventHandler.on(_this5.element, eventIn, _this5.config.selector, function (event) {
747
+ EventHandler__default['default'].on(_this5.element, eventIn, _this5.config.selector, function (event) {
746
748
  return _this5._enter(event);
747
749
  });
748
- EventHandler.on(_this5.element, eventOut, _this5.config.selector, function (event) {
750
+ EventHandler__default['default'].on(_this5.element, eventOut, _this5.config.selector, function (event) {
749
751
  return _this5._leave(event);
750
752
  });
751
753
  }
@@ -757,10 +759,10 @@
757
759
  }
758
760
  };
759
761
 
760
- EventHandler.on(this.element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);
762
+ EventHandler__default['default'].on(this.element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);
761
763
 
762
764
  if (this.config.selector) {
763
- this.config = _objectSpread(_objectSpread({}, this.config), {}, {
765
+ this.config = _extends({}, this.config, {
764
766
  trigger: 'manual',
765
767
  selector: ''
766
768
  });
@@ -780,11 +782,11 @@
780
782
 
781
783
  _proto._enter = function _enter(event, context) {
782
784
  var dataKey = this.constructor.DATA_KEY;
783
- context = context || Data.getData(event.target, dataKey);
785
+ context = context || Data__default['default'].getData(event.delegateTarget, dataKey);
784
786
 
785
787
  if (!context) {
786
- context = new this.constructor(event.target, this._getDelegateConfig());
787
- Data.setData(event.target, dataKey, context);
788
+ context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
789
+ Data__default['default'].setData(event.delegateTarget, dataKey, context);
788
790
  }
789
791
 
790
792
  if (event) {
@@ -813,11 +815,11 @@
813
815
 
814
816
  _proto._leave = function _leave(event, context) {
815
817
  var dataKey = this.constructor.DATA_KEY;
816
- context = context || Data.getData(event.target, dataKey);
818
+ context = context || Data__default['default'].getData(event.delegateTarget, dataKey);
817
819
 
818
820
  if (!context) {
819
- context = new this.constructor(event.target, this._getDelegateConfig());
820
- Data.setData(event.target, dataKey, context);
821
+ context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
822
+ Data__default['default'].setData(event.delegateTarget, dataKey, context);
821
823
  }
822
824
 
823
825
  if (event) {
@@ -854,7 +856,7 @@
854
856
  };
855
857
 
856
858
  _proto._getConfig = function _getConfig(config) {
857
- var dataAttributes = Manipulator.getDataAttributes(this.element);
859
+ var dataAttributes = Manipulator__default['default'].getDataAttributes(this.element);
858
860
  Object.keys(dataAttributes).forEach(function (dataAttr) {
859
861
  if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
860
862
  delete dataAttributes[dataAttr];
@@ -865,7 +867,7 @@
865
867
  config.container = config.container[0];
866
868
  }
867
869
 
868
- config = _objectSpread(_objectSpread(_objectSpread({}, this.constructor.Default), dataAttributes), typeof config === 'object' && config ? config : {});
870
+ config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
869
871
 
870
872
  if (typeof config.delay === 'number') {
871
873
  config.delay = {
@@ -885,7 +887,7 @@
885
887
  typeCheckConfig(NAME, config, this.constructor.DefaultType);
886
888
 
887
889
  if (config.sanitize) {
888
- config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
890
+ config.template = sanitizeHtml(config.template, config.allowList, config.sanitizeFn);
889
891
  }
890
892
 
891
893
  return config;
@@ -919,8 +921,7 @@
919
921
  };
920
922
 
921
923
  _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
922
- var popperInstance = popperData.instance;
923
- this.tip = popperInstance.popper;
924
+ this.tip = popperData.instance.popper;
924
925
 
925
926
  this._cleanTipClass();
926
927
 
@@ -945,7 +946,7 @@
945
946
 
946
947
  Tooltip.jQueryInterface = function jQueryInterface(config) {
947
948
  return this.each(function () {
948
- var data = Data.getData(this, DATA_KEY);
949
+ var data = Data__default['default'].getData(this, DATA_KEY);
949
950
 
950
951
  var _config = typeof config === 'object' && config;
951
952
 
@@ -968,7 +969,7 @@
968
969
  };
969
970
 
970
971
  Tooltip.getInstance = function getInstance(element) {
971
- return Data.getData(element, DATA_KEY);
972
+ return Data__default['default'].getData(element, DATA_KEY);
972
973
  };
973
974
 
974
975
  _createClass(Tooltip, null, [{