bootstrap 4.0.0 → 4.3.1

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.
Files changed (104) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +1 -1
  3. data/CHANGELOG.md +8 -0
  4. data/README.md +2 -2
  5. data/Rakefile +4 -2
  6. data/assets/javascripts/bootstrap/alert.js +45 -22
  7. data/assets/javascripts/bootstrap/button.js +39 -19
  8. data/assets/javascripts/bootstrap/carousel.js +213 -51
  9. data/assets/javascripts/bootstrap/collapse.js +105 -52
  10. data/assets/javascripts/bootstrap/dropdown.js +169 -45
  11. data/assets/javascripts/bootstrap/modal.js +139 -71
  12. data/assets/javascripts/bootstrap/popover.js +77 -20
  13. data/assets/javascripts/bootstrap/scrollspy.js +87 -29
  14. data/assets/javascripts/bootstrap/tab.js +50 -32
  15. data/assets/javascripts/bootstrap/toast.js +282 -0
  16. data/assets/javascripts/bootstrap/tooltip.js +295 -59
  17. data/assets/javascripts/bootstrap/util.js +78 -45
  18. data/assets/javascripts/bootstrap-sprockets.js +7 -6
  19. data/assets/javascripts/bootstrap.js +1537 -996
  20. data/assets/javascripts/bootstrap.min.js +3 -3
  21. data/assets/stylesheets/_bootstrap-grid.scss +4 -7
  22. data/assets/stylesheets/_bootstrap-reboot.scss +3 -3
  23. data/assets/stylesheets/_bootstrap.scss +5 -3
  24. data/assets/stylesheets/bootstrap/_alert.scss +1 -1
  25. data/assets/stylesheets/bootstrap/_badge.scss +8 -1
  26. data/assets/stylesheets/bootstrap/_breadcrumb.scss +9 -6
  27. data/assets/stylesheets/bootstrap/_button-group.scss +16 -19
  28. data/assets/stylesheets/bootstrap/_buttons.scss +10 -16
  29. data/assets/stylesheets/bootstrap/_card.scss +53 -34
  30. data/assets/stylesheets/bootstrap/_carousel.scss +66 -60
  31. data/assets/stylesheets/bootstrap/_close.scss +15 -8
  32. data/assets/stylesheets/bootstrap/_code.scss +5 -13
  33. data/assets/stylesheets/bootstrap/_custom-forms.scss +250 -40
  34. data/assets/stylesheets/bootstrap/_dropdown.scss +65 -5
  35. data/assets/stylesheets/bootstrap/_forms.scss +32 -35
  36. data/assets/stylesheets/bootstrap/_functions.scss +9 -9
  37. data/assets/stylesheets/bootstrap/_images.scss +2 -2
  38. data/assets/stylesheets/bootstrap/_input-group.scss +45 -11
  39. data/assets/stylesheets/bootstrap/_jumbotron.scss +1 -0
  40. data/assets/stylesheets/bootstrap/_list-group.scss +39 -5
  41. data/assets/stylesheets/bootstrap/_mixins.scss +6 -1
  42. data/assets/stylesheets/bootstrap/_modal.scss +80 -19
  43. data/assets/stylesheets/bootstrap/_nav.scss +2 -0
  44. data/assets/stylesheets/bootstrap/_navbar.scss +9 -26
  45. data/assets/stylesheets/bootstrap/_pagination.scss +2 -6
  46. data/assets/stylesheets/bootstrap/_popover.scss +47 -59
  47. data/assets/stylesheets/bootstrap/_print.scss +23 -6
  48. data/assets/stylesheets/bootstrap/_progress.scss +16 -6
  49. data/assets/stylesheets/bootstrap/_reboot.scss +51 -50
  50. data/assets/stylesheets/bootstrap/_spinners.scss +55 -0
  51. data/assets/stylesheets/bootstrap/_tables.scss +16 -11
  52. data/assets/stylesheets/bootstrap/_toasts.scss +44 -0
  53. data/assets/stylesheets/bootstrap/_tooltip.scss +1 -1
  54. data/assets/stylesheets/bootstrap/_transitions.scss +4 -20
  55. data/assets/stylesheets/bootstrap/_type.scss +16 -16
  56. data/assets/stylesheets/bootstrap/_utilities.scss +3 -0
  57. data/assets/stylesheets/bootstrap/_variables.scss +430 -201
  58. data/assets/stylesheets/bootstrap/mixins/_badge.scss +7 -2
  59. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +29 -1
  60. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +16 -1
  61. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +3 -3
  62. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +12 -14
  63. data/assets/stylesheets/bootstrap/mixins/_caret.scss +5 -8
  64. data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
  65. data/assets/stylesheets/bootstrap/mixins/_float.scss +3 -0
  66. data/assets/stylesheets/bootstrap/mixins/_forms.scss +68 -13
  67. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +7 -7
  68. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +3 -4
  69. data/assets/stylesheets/bootstrap/mixins/_grid.scss +9 -10
  70. data/assets/stylesheets/bootstrap/mixins/_hover.scss +3 -5
  71. data/assets/stylesheets/bootstrap/mixins/_image.scss +2 -2
  72. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +1 -1
  73. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +2 -2
  74. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +1 -1
  75. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
  76. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +1 -3
  77. data/assets/stylesheets/bootstrap/mixins/_size.scss +1 -0
  78. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +10 -1
  79. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +5 -3
  80. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +3 -1
  81. data/assets/stylesheets/bootstrap/mixins/_transition.scss +7 -0
  82. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +1 -0
  83. data/assets/stylesheets/bootstrap/utilities/_borders.scss +17 -1
  84. data/assets/stylesheets/bootstrap/utilities/_display.scss +6 -18
  85. data/assets/stylesheets/bootstrap/utilities/_embed.scss +7 -20
  86. data/assets/stylesheets/bootstrap/utilities/_flex.scss +5 -0
  87. data/assets/stylesheets/bootstrap/utilities/_float.scss +5 -3
  88. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +5 -0
  89. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -4
  90. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +6 -0
  91. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +8 -0
  92. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +23 -1
  93. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +19 -0
  94. data/assets/stylesheets/bootstrap/utilities/_text.scss +26 -6
  95. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +4 -2
  96. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +204 -0
  97. data/bootstrap.gemspec +6 -3
  98. data/lib/bootstrap/engine.rb +3 -0
  99. data/lib/bootstrap/version.rb +4 -2
  100. data/lib/bootstrap.rb +10 -7
  101. data/tasks/updater/js.rb +1 -1
  102. data/test/test_helper.rb +7 -6
  103. metadata +19 -12
  104. data/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +0 -10
@@ -1,23 +1,75 @@
1
- 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); }
1
+ /*!
2
+ * Bootstrap scrollspy.js v4.3.1 (https://getbootstrap.com/)
3
+ * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
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('./util.js')) :
8
+ typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
9
+ (global = global || self, global.ScrollSpy = factory(global.jQuery, global.Util));
10
+ }(this, function ($, Util) { 'use strict';
11
+
12
+ $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
13
+ Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
14
+
15
+ function _defineProperties(target, props) {
16
+ for (var i = 0; i < props.length; i++) {
17
+ var descriptor = props[i];
18
+ descriptor.enumerable = descriptor.enumerable || false;
19
+ descriptor.configurable = true;
20
+ if ("value" in descriptor) descriptor.writable = true;
21
+ Object.defineProperty(target, descriptor.key, descriptor);
22
+ }
23
+ }
24
+
25
+ function _createClass(Constructor, protoProps, staticProps) {
26
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
27
+ if (staticProps) _defineProperties(Constructor, staticProps);
28
+ return Constructor;
29
+ }
30
+
31
+ function _defineProperty(obj, key, value) {
32
+ if (key in obj) {
33
+ Object.defineProperty(obj, key, {
34
+ value: value,
35
+ enumerable: true,
36
+ configurable: true,
37
+ writable: true
38
+ });
39
+ } else {
40
+ obj[key] = value;
41
+ }
42
+
43
+ return obj;
44
+ }
45
+
46
+ function _objectSpread(target) {
47
+ for (var i = 1; i < arguments.length; i++) {
48
+ var source = arguments[i] != null ? arguments[i] : {};
49
+ var ownKeys = Object.keys(source);
2
50
 
3
- 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); } }
51
+ if (typeof Object.getOwnPropertySymbols === 'function') {
52
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
53
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
54
+ }));
55
+ }
56
+
57
+ ownKeys.forEach(function (key) {
58
+ _defineProperty(target, key, source[key]);
59
+ });
60
+ }
4
61
 
5
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
62
+ return target;
63
+ }
6
64
 
7
- /**
8
- * --------------------------------------------------------------------------
9
- * Bootstrap (v4.0.0): scrollspy.js
10
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
11
- * --------------------------------------------------------------------------
12
- */
13
- var ScrollSpy = function ($) {
14
65
  /**
15
66
  * ------------------------------------------------------------------------
16
67
  * Constants
17
68
  * ------------------------------------------------------------------------
18
69
  */
70
+
19
71
  var NAME = 'scrollspy';
20
- var VERSION = '4.0.0';
72
+ var VERSION = '4.3.1';
21
73
  var DATA_KEY = 'bs.scrollspy';
22
74
  var EVENT_KEY = "." + DATA_KEY;
23
75
  var DATA_API_KEY = '.data-api';
@@ -99,13 +151,13 @@ var ScrollSpy = function ($) {
99
151
  this._offsets = [];
100
152
  this._targets = [];
101
153
  this._scrollHeight = this._getScrollHeight();
102
- var targets = $.makeArray($(this._selector));
154
+ var targets = [].slice.call(document.querySelectorAll(this._selector));
103
155
  targets.map(function (element) {
104
156
  var target;
105
157
  var targetSelector = Util.getSelectorFromElement(element);
106
158
 
107
159
  if (targetSelector) {
108
- target = $(targetSelector)[0];
160
+ target = document.querySelector(targetSelector);
109
161
  }
110
162
 
111
163
  if (target) {
@@ -140,11 +192,11 @@ var ScrollSpy = function ($) {
140
192
  this._targets = null;
141
193
  this._activeTarget = null;
142
194
  this._scrollHeight = null;
143
- }; // Private
144
-
195
+ } // Private
196
+ ;
145
197
 
146
198
  _proto._getConfig = function _getConfig(config) {
147
- config = _extends({}, Default, config);
199
+ config = _objectSpread({}, Default, typeof config === 'object' && config ? config : {});
148
200
 
149
201
  if (typeof config.target !== 'string') {
150
202
  var id = $(config.target).attr('id');
@@ -202,7 +254,9 @@ var ScrollSpy = function ($) {
202
254
  return;
203
255
  }
204
256
 
205
- for (var i = this._offsets.length; i--;) {
257
+ var offsetLength = this._offsets.length;
258
+
259
+ for (var i = offsetLength; i--;) {
206
260
  var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
207
261
 
208
262
  if (isActiveTarget) {
@@ -216,13 +270,11 @@ var ScrollSpy = function ($) {
216
270
 
217
271
  this._clear();
218
272
 
219
- var queries = this._selector.split(','); // eslint-disable-next-line arrow-body-style
220
-
221
-
222
- queries = queries.map(function (selector) {
223
- return selector + "[data-target=\"" + target + "\"]," + (selector + "[href=\"" + target + "\"]");
273
+ var queries = this._selector.split(',').map(function (selector) {
274
+ return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
224
275
  });
225
- var $link = $(queries.join(','));
276
+
277
+ var $link = $([].slice.call(document.querySelectorAll(queries.join(','))));
226
278
 
227
279
  if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
228
280
  $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
@@ -243,9 +295,13 @@ var ScrollSpy = function ($) {
243
295
  };
244
296
 
245
297
  _proto._clear = function _clear() {
246
- $(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
247
- }; // Static
248
-
298
+ [].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
299
+ return node.classList.contains(ClassName.ACTIVE);
300
+ }).forEach(function (node) {
301
+ return node.classList.remove(ClassName.ACTIVE);
302
+ });
303
+ } // Static
304
+ ;
249
305
 
250
306
  ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
251
307
  return this.each(function () {
@@ -290,9 +346,10 @@ var ScrollSpy = function ($) {
290
346
 
291
347
 
292
348
  $(window).on(Event.LOAD_DATA_API, function () {
293
- var scrollSpys = $.makeArray($(Selector.DATA_SPY));
349
+ var scrollSpys = [].slice.call(document.querySelectorAll(Selector.DATA_SPY));
350
+ var scrollSpysLength = scrollSpys.length;
294
351
 
295
- for (var i = scrollSpys.length; i--;) {
352
+ for (var i = scrollSpysLength; i--;) {
296
353
  var $spy = $(scrollSpys[i]);
297
354
 
298
355
  ScrollSpy._jQueryInterface.call($spy, $spy.data());
@@ -313,4 +370,5 @@ var ScrollSpy = function ($) {
313
370
  };
314
371
 
315
372
  return ScrollSpy;
316
- }($);
373
+
374
+ }));
@@ -1,26 +1,45 @@
1
- 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); } }
1
+ /*!
2
+ * Bootstrap tab.js v4.3.1 (https://getbootstrap.com/)
3
+ * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
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('./util.js')) :
8
+ typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
9
+ (global = global || self, global.Tab = factory(global.jQuery, global.Util));
10
+ }(this, function ($, Util) { 'use strict';
11
+
12
+ $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
13
+ Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
14
+
15
+ function _defineProperties(target, props) {
16
+ for (var i = 0; i < props.length; i++) {
17
+ var descriptor = props[i];
18
+ descriptor.enumerable = descriptor.enumerable || false;
19
+ descriptor.configurable = true;
20
+ if ("value" in descriptor) descriptor.writable = true;
21
+ Object.defineProperty(target, descriptor.key, descriptor);
22
+ }
23
+ }
24
+
25
+ function _createClass(Constructor, protoProps, staticProps) {
26
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
27
+ if (staticProps) _defineProperties(Constructor, staticProps);
28
+ return Constructor;
29
+ }
2
30
 
3
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
4
-
5
- /**
6
- * --------------------------------------------------------------------------
7
- * Bootstrap (v4.0.0): tab.js
8
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
9
- * --------------------------------------------------------------------------
10
- */
11
- var Tab = function ($) {
12
31
  /**
13
32
  * ------------------------------------------------------------------------
14
33
  * Constants
15
34
  * ------------------------------------------------------------------------
16
35
  */
36
+
17
37
  var NAME = 'tab';
18
- var VERSION = '4.0.0';
38
+ var VERSION = '4.3.1';
19
39
  var DATA_KEY = 'bs.tab';
20
40
  var EVENT_KEY = "." + DATA_KEY;
21
41
  var DATA_API_KEY = '.data-api';
22
42
  var JQUERY_NO_CONFLICT = $.fn[NAME];
23
- var TRANSITION_DURATION = 150;
24
43
  var Event = {
25
44
  HIDE: "hide" + EVENT_KEY,
26
45
  HIDDEN: "hidden" + EVENT_KEY,
@@ -75,7 +94,7 @@ var Tab = function ($) {
75
94
  var selector = Util.getSelectorFromElement(this._element);
76
95
 
77
96
  if (listElement) {
78
- var itemSelector = listElement.nodeName === 'UL' ? Selector.ACTIVE_UL : Selector.ACTIVE;
97
+ var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector.ACTIVE_UL : Selector.ACTIVE;
79
98
  previous = $.makeArray($(listElement).find(itemSelector));
80
99
  previous = previous[previous.length - 1];
81
100
  }
@@ -98,7 +117,7 @@ var Tab = function ($) {
98
117
  }
99
118
 
100
119
  if (selector) {
101
- target = $(selector)[0];
120
+ target = document.querySelector(selector);
102
121
  }
103
122
 
104
123
  this._activate(this._element, listElement);
@@ -124,29 +143,23 @@ var Tab = function ($) {
124
143
  _proto.dispose = function dispose() {
125
144
  $.removeData(this._element, DATA_KEY);
126
145
  this._element = null;
127
- }; // Private
128
-
146
+ } // Private
147
+ ;
129
148
 
130
149
  _proto._activate = function _activate(element, container, callback) {
131
150
  var _this2 = this;
132
151
 
133
- var activeElements;
134
-
135
- if (container.nodeName === 'UL') {
136
- activeElements = $(container).find(Selector.ACTIVE_UL);
137
- } else {
138
- activeElements = $(container).children(Selector.ACTIVE);
139
- }
140
-
152
+ var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(Selector.ACTIVE_UL) : $(container).children(Selector.ACTIVE);
141
153
  var active = activeElements[0];
142
- var isTransitioning = callback && Util.supportsTransitionEnd() && active && $(active).hasClass(ClassName.FADE);
154
+ var isTransitioning = callback && active && $(active).hasClass(ClassName.FADE);
143
155
 
144
156
  var complete = function complete() {
145
157
  return _this2._transitionComplete(element, active, callback);
146
158
  };
147
159
 
148
160
  if (active && isTransitioning) {
149
- $(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
161
+ var transitionDuration = Util.getTransitionDurationFromElement(active);
162
+ $(active).removeClass(ClassName.SHOW).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
150
163
  } else {
151
164
  complete();
152
165
  }
@@ -154,7 +167,7 @@ var Tab = function ($) {
154
167
 
155
168
  _proto._transitionComplete = function _transitionComplete(element, active, callback) {
156
169
  if (active) {
157
- $(active).removeClass(ClassName.SHOW + " " + ClassName.ACTIVE);
170
+ $(active).removeClass(ClassName.ACTIVE);
158
171
  var dropdownChild = $(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
159
172
 
160
173
  if (dropdownChild) {
@@ -173,13 +186,17 @@ var Tab = function ($) {
173
186
  }
174
187
 
175
188
  Util.reflow(element);
176
- $(element).addClass(ClassName.SHOW);
189
+
190
+ if (element.classList.contains(ClassName.FADE)) {
191
+ element.classList.add(ClassName.SHOW);
192
+ }
177
193
 
178
194
  if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
179
195
  var dropdownElement = $(element).closest(Selector.DROPDOWN)[0];
180
196
 
181
197
  if (dropdownElement) {
182
- $(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
198
+ var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector.DROPDOWN_TOGGLE));
199
+ $(dropdownToggleList).addClass(ClassName.ACTIVE);
183
200
  }
184
201
 
185
202
  element.setAttribute('aria-expanded', true);
@@ -188,8 +205,8 @@ var Tab = function ($) {
188
205
  if (callback) {
189
206
  callback();
190
207
  }
191
- }; // Static
192
-
208
+ } // Static
209
+ ;
193
210
 
194
211
  Tab._jQueryInterface = function _jQueryInterface(config) {
195
212
  return this.each(function () {
@@ -247,4 +264,5 @@ var Tab = function ($) {
247
264
  };
248
265
 
249
266
  return Tab;
250
- }($);
267
+
268
+ }));
@@ -0,0 +1,282 @@
1
+ /*!
2
+ * Bootstrap toast.js v4.3.1 (https://getbootstrap.com/)
3
+ * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
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('./util.js')) :
8
+ typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
9
+ (global = global || self, global.Toast = factory(global.jQuery, global.Util));
10
+ }(this, function ($, Util) { 'use strict';
11
+
12
+ $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
13
+ Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
14
+
15
+ function _defineProperties(target, props) {
16
+ for (var i = 0; i < props.length; i++) {
17
+ var descriptor = props[i];
18
+ descriptor.enumerable = descriptor.enumerable || false;
19
+ descriptor.configurable = true;
20
+ if ("value" in descriptor) descriptor.writable = true;
21
+ Object.defineProperty(target, descriptor.key, descriptor);
22
+ }
23
+ }
24
+
25
+ function _createClass(Constructor, protoProps, staticProps) {
26
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
27
+ if (staticProps) _defineProperties(Constructor, staticProps);
28
+ return Constructor;
29
+ }
30
+
31
+ function _defineProperty(obj, key, value) {
32
+ if (key in obj) {
33
+ Object.defineProperty(obj, key, {
34
+ value: value,
35
+ enumerable: true,
36
+ configurable: true,
37
+ writable: true
38
+ });
39
+ } else {
40
+ obj[key] = value;
41
+ }
42
+
43
+ return obj;
44
+ }
45
+
46
+ function _objectSpread(target) {
47
+ for (var i = 1; i < arguments.length; i++) {
48
+ var source = arguments[i] != null ? arguments[i] : {};
49
+ var ownKeys = Object.keys(source);
50
+
51
+ if (typeof Object.getOwnPropertySymbols === 'function') {
52
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
53
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
54
+ }));
55
+ }
56
+
57
+ ownKeys.forEach(function (key) {
58
+ _defineProperty(target, key, source[key]);
59
+ });
60
+ }
61
+
62
+ return target;
63
+ }
64
+
65
+ /**
66
+ * ------------------------------------------------------------------------
67
+ * Constants
68
+ * ------------------------------------------------------------------------
69
+ */
70
+
71
+ var NAME = 'toast';
72
+ var VERSION = '4.3.1';
73
+ var DATA_KEY = 'bs.toast';
74
+ var EVENT_KEY = "." + DATA_KEY;
75
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
76
+ var Event = {
77
+ CLICK_DISMISS: "click.dismiss" + EVENT_KEY,
78
+ HIDE: "hide" + EVENT_KEY,
79
+ HIDDEN: "hidden" + EVENT_KEY,
80
+ SHOW: "show" + EVENT_KEY,
81
+ SHOWN: "shown" + EVENT_KEY
82
+ };
83
+ var ClassName = {
84
+ FADE: 'fade',
85
+ HIDE: 'hide',
86
+ SHOW: 'show',
87
+ SHOWING: 'showing'
88
+ };
89
+ var DefaultType = {
90
+ animation: 'boolean',
91
+ autohide: 'boolean',
92
+ delay: 'number'
93
+ };
94
+ var Default = {
95
+ animation: true,
96
+ autohide: true,
97
+ delay: 500
98
+ };
99
+ var Selector = {
100
+ DATA_DISMISS: '[data-dismiss="toast"]'
101
+ /**
102
+ * ------------------------------------------------------------------------
103
+ * Class Definition
104
+ * ------------------------------------------------------------------------
105
+ */
106
+
107
+ };
108
+
109
+ var Toast =
110
+ /*#__PURE__*/
111
+ function () {
112
+ function Toast(element, config) {
113
+ this._element = element;
114
+ this._config = this._getConfig(config);
115
+ this._timeout = null;
116
+
117
+ this._setListeners();
118
+ } // Getters
119
+
120
+
121
+ var _proto = Toast.prototype;
122
+
123
+ // Public
124
+ _proto.show = function show() {
125
+ var _this = this;
126
+
127
+ $(this._element).trigger(Event.SHOW);
128
+
129
+ if (this._config.animation) {
130
+ this._element.classList.add(ClassName.FADE);
131
+ }
132
+
133
+ var complete = function complete() {
134
+ _this._element.classList.remove(ClassName.SHOWING);
135
+
136
+ _this._element.classList.add(ClassName.SHOW);
137
+
138
+ $(_this._element).trigger(Event.SHOWN);
139
+
140
+ if (_this._config.autohide) {
141
+ _this.hide();
142
+ }
143
+ };
144
+
145
+ this._element.classList.remove(ClassName.HIDE);
146
+
147
+ this._element.classList.add(ClassName.SHOWING);
148
+
149
+ if (this._config.animation) {
150
+ var transitionDuration = Util.getTransitionDurationFromElement(this._element);
151
+ $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
152
+ } else {
153
+ complete();
154
+ }
155
+ };
156
+
157
+ _proto.hide = function hide(withoutTimeout) {
158
+ var _this2 = this;
159
+
160
+ if (!this._element.classList.contains(ClassName.SHOW)) {
161
+ return;
162
+ }
163
+
164
+ $(this._element).trigger(Event.HIDE);
165
+
166
+ if (withoutTimeout) {
167
+ this._close();
168
+ } else {
169
+ this._timeout = setTimeout(function () {
170
+ _this2._close();
171
+ }, this._config.delay);
172
+ }
173
+ };
174
+
175
+ _proto.dispose = function dispose() {
176
+ clearTimeout(this._timeout);
177
+ this._timeout = null;
178
+
179
+ if (this._element.classList.contains(ClassName.SHOW)) {
180
+ this._element.classList.remove(ClassName.SHOW);
181
+ }
182
+
183
+ $(this._element).off(Event.CLICK_DISMISS);
184
+ $.removeData(this._element, DATA_KEY);
185
+ this._element = null;
186
+ this._config = null;
187
+ } // Private
188
+ ;
189
+
190
+ _proto._getConfig = function _getConfig(config) {
191
+ config = _objectSpread({}, Default, $(this._element).data(), typeof config === 'object' && config ? config : {});
192
+ Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
193
+ return config;
194
+ };
195
+
196
+ _proto._setListeners = function _setListeners() {
197
+ var _this3 = this;
198
+
199
+ $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function () {
200
+ return _this3.hide(true);
201
+ });
202
+ };
203
+
204
+ _proto._close = function _close() {
205
+ var _this4 = this;
206
+
207
+ var complete = function complete() {
208
+ _this4._element.classList.add(ClassName.HIDE);
209
+
210
+ $(_this4._element).trigger(Event.HIDDEN);
211
+ };
212
+
213
+ this._element.classList.remove(ClassName.SHOW);
214
+
215
+ if (this._config.animation) {
216
+ var transitionDuration = Util.getTransitionDurationFromElement(this._element);
217
+ $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
218
+ } else {
219
+ complete();
220
+ }
221
+ } // Static
222
+ ;
223
+
224
+ Toast._jQueryInterface = function _jQueryInterface(config) {
225
+ return this.each(function () {
226
+ var $element = $(this);
227
+ var data = $element.data(DATA_KEY);
228
+
229
+ var _config = typeof config === 'object' && config;
230
+
231
+ if (!data) {
232
+ data = new Toast(this, _config);
233
+ $element.data(DATA_KEY, data);
234
+ }
235
+
236
+ if (typeof config === 'string') {
237
+ if (typeof data[config] === 'undefined') {
238
+ throw new TypeError("No method named \"" + config + "\"");
239
+ }
240
+
241
+ data[config](this);
242
+ }
243
+ });
244
+ };
245
+
246
+ _createClass(Toast, null, [{
247
+ key: "VERSION",
248
+ get: function get() {
249
+ return VERSION;
250
+ }
251
+ }, {
252
+ key: "DefaultType",
253
+ get: function get() {
254
+ return DefaultType;
255
+ }
256
+ }, {
257
+ key: "Default",
258
+ get: function get() {
259
+ return Default;
260
+ }
261
+ }]);
262
+
263
+ return Toast;
264
+ }();
265
+ /**
266
+ * ------------------------------------------------------------------------
267
+ * jQuery
268
+ * ------------------------------------------------------------------------
269
+ */
270
+
271
+
272
+ $.fn[NAME] = Toast._jQueryInterface;
273
+ $.fn[NAME].Constructor = Toast;
274
+
275
+ $.fn[NAME].noConflict = function () {
276
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
277
+ return Toast._jQueryInterface;
278
+ };
279
+
280
+ return Toast;
281
+
282
+ }));