Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/dist/alert.js')
-rw-r--r--js/dist/alert.js80
1 files changed, 57 insertions, 23 deletions
diff --git a/js/dist/alert.js b/js/dist/alert.js
index 5d3acacf28..f1407141d7 100644
--- a/js/dist/alert.js
+++ b/js/dist/alert.js
@@ -5,7 +5,7 @@
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js')) :
- typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js'], factory) :
+ typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.Data, global.EventHandler));
}(this, (function (Data, EventHandler) { 'use strict';
@@ -112,8 +112,53 @@
* ------------------------------------------------------------------------
*/
- var NAME = 'alert';
var VERSION = '5.0.0-alpha3';
+
+ var BaseComponent = /*#__PURE__*/function () {
+ function BaseComponent(element) {
+ if (!element) {
+ return;
+ }
+
+ this._element = element;
+ Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
+ }
+
+ var _proto = BaseComponent.prototype;
+
+ _proto.dispose = function dispose() {
+ Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
+ this._element = null;
+ }
+ /** Static */
+ ;
+
+ BaseComponent.getInstance = function getInstance(element) {
+ return Data__default['default'].getData(element, this.DATA_KEY);
+ };
+
+ _createClass(BaseComponent, null, [{
+ key: "VERSION",
+ get: function get() {
+ return VERSION;
+ }
+ }]);
+
+ return BaseComponent;
+ }();
+
+ function _defineProperties$1(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); } }
+
+ function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
+
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+
+ var NAME = 'alert';
var DATA_KEY = 'bs.alert';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
@@ -130,15 +175,12 @@
* ------------------------------------------------------------------------
*/
- var Alert = /*#__PURE__*/function () {
- function Alert(element) {
- this._element = element;
-
- if (this._element) {
- Data__default['default'].setData(element, DATA_KEY, this);
- }
- } // Getters
+ var Alert = /*#__PURE__*/function (_BaseComponent) {
+ _inheritsLoose(Alert, _BaseComponent);
+ function Alert() {
+ return _BaseComponent.apply(this, arguments) || this;
+ }
var _proto = Alert.prototype;
@@ -153,11 +195,6 @@
}
this._removeElement(rootElement);
- };
-
- _proto.dispose = function dispose() {
- Data__default['default'].removeData(this._element, DATA_KEY);
- this._element = null;
} // Private
;
@@ -220,19 +257,16 @@
};
};
- Alert.getInstance = function getInstance(element) {
- return Data__default['default'].getData(element, DATA_KEY);
- };
-
- _createClass(Alert, null, [{
- key: "VERSION",
+ _createClass$1(Alert, null, [{
+ key: "DATA_KEY",
+ // Getters
get: function get() {
- return VERSION;
+ return DATA_KEY;
}
}]);
return Alert;
- }();
+ }(BaseComponent);
/**
* ------------------------------------------------------------------------
* Data Api implementation