bootstrap.esm.js 143 KB
Newer Older
XhmikosR's avatar
Dist.  
XhmikosR committed
5001

XhmikosR's avatar
XhmikosR committed
5002
  _proto.dispose = function dispose() {
XhmikosR's avatar
Dist.  
XhmikosR committed
5003
5004
5005
    clearTimeout(this._timeout);
    this._timeout = null;

XhmikosR's avatar
XhmikosR committed
5006
5007
    if (this._element.classList.contains(CLASS_NAME_SHOW$6)) {
      this._element.classList.remove(CLASS_NAME_SHOW$6);
XhmikosR's avatar
Dist.  
XhmikosR committed
5008
5009
    }

XhmikosR's avatar
XhmikosR committed
5010
    EventHandler.off(this._element, EVENT_CLICK_DISMISS$1);
XhmikosR's avatar
Dist.  
XhmikosR committed
5011
5012
5013
5014
    Data.removeData(this._element, DATA_KEY$a);
    this._element = null;
    this._config = null;
  } // Private
XhmikosR's avatar
XhmikosR committed
5015
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
5016

XhmikosR's avatar
XhmikosR committed
5017
  _proto._getConfig = function _getConfig(config) {
XhmikosR's avatar
XhmikosR committed
5018
    config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default$7), Manipulator.getDataAttributes(this._element)), typeof config === 'object' && config ? config : {});
XhmikosR's avatar
Dist.  
XhmikosR committed
5019
5020
    typeCheckConfig(NAME$a, config, this.constructor.DefaultType);
    return config;
XhmikosR's avatar
XhmikosR committed
5021
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
5022

XhmikosR's avatar
XhmikosR committed
5023
5024
  _proto._setListeners = function _setListeners() {
    var _this3 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
5025

XhmikosR's avatar
XhmikosR committed
5026
    EventHandler.on(this._element, EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, function () {
XhmikosR's avatar
XhmikosR committed
5027
5028
      return _this3.hide();
    });
XhmikosR's avatar
Dist.  
XhmikosR committed
5029
  } // Static
XhmikosR's avatar
XhmikosR committed
5030
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
5031

XhmikosR's avatar
XhmikosR committed
5032
  Toast.jQueryInterface = function jQueryInterface(config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
5033
    return this.each(function () {
XhmikosR's avatar
XhmikosR committed
5034
      var data = Data.getData(this, DATA_KEY$a);
XhmikosR's avatar
Dist.  
XhmikosR committed
5035

XhmikosR's avatar
XhmikosR committed
5036
      var _config = typeof config === 'object' && config;
XhmikosR's avatar
Dist.  
XhmikosR committed
5037
5038
5039
5040
5041
5042
5043

      if (!data) {
        data = new Toast(this, _config);
      }

      if (typeof config === 'string') {
        if (typeof data[config] === 'undefined') {
XhmikosR's avatar
XhmikosR committed
5044
          throw new TypeError("No method named \"" + config + "\"");
XhmikosR's avatar
Dist.  
XhmikosR committed
5045
5046
5047
5048
5049
        }

        data[config](this);
      }
    });
XhmikosR's avatar
XhmikosR committed
5050
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
5051

XhmikosR's avatar
XhmikosR committed
5052
  Toast.getInstance = function getInstance(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
5053
    return Data.getData(element, DATA_KEY$a);
XhmikosR's avatar
XhmikosR committed
5054
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
5055

XhmikosR's avatar
XhmikosR committed
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
  _createClass(Toast, null, [{
    key: "VERSION",
    get: function get() {
      return VERSION$a;
    }
  }, {
    key: "DefaultType",
    get: function get() {
      return DefaultType$7;
    }
  }, {
    key: "Default",
    get: function get() {
      return Default$7;
    }
  }]);

  return Toast;
}();
XhmikosR's avatar
XhmikosR committed
5075
5076

var $$b = getjQuery();
XhmikosR's avatar
Dist.  
XhmikosR committed
5077
5078
5079
5080
5081
5082
5083
/**
 * ------------------------------------------------------------------------
 * jQuery
 * ------------------------------------------------------------------------
 *  add .toast to jQuery only if jQuery is present
 */

5084
5085
/* istanbul ignore if */

XhmikosR's avatar
XhmikosR committed
5086
5087
5088
5089
if ($$b) {
  var JQUERY_NO_CONFLICT$a = $$b.fn[NAME$a];
  $$b.fn[NAME$a] = Toast.jQueryInterface;
  $$b.fn[NAME$a].Constructor = Toast;
XhmikosR's avatar
Dist.  
XhmikosR committed
5090

XhmikosR's avatar
XhmikosR committed
5091
5092
5093
  $$b.fn[NAME$a].noConflict = function () {
    $$b.fn[NAME$a] = JQUERY_NO_CONFLICT$a;
    return Toast.jQueryInterface;
XhmikosR's avatar
Dist.  
XhmikosR committed
5094
5095
5096
5097
5098
  };
}

export { Alert, Button, Carousel, Collapse, Dropdown, Modal, Popover, ScrollSpy, Tab, Toast, Tooltip };
//# sourceMappingURL=bootstrap.esm.js.map
For faster browsing, not all history is shown. View entire blame